When uploading images or connecting pages in wordpress WYSIWYG editor the default behavior is the fact that wordpress creates the hyperlinks while using siteurl database attribute. This turns into a hassle when building the sites' content on the test server or perhaps in a subfolder after which moving it to it's final place.
For instance placing a picture creates this html on my small dev server or production server temporary subfolder:
<img class="alignnone size-full wp-image-60" title="bigcircuits" src="http://<ip>/<subfolder>/wp-content/uploads/2011/02/bigcircuits.jpg" alt="" />
Let me change that to presenting shortcode or something like that that may obtain the current siteurl in the database. For example:
<img class="alignnone size-full wp-image-60" title="bigcircuits" src="[getsiteurl]/wp-content/uploads/2011/02/bigcircuits.jpg" alt="" />
Can there be something of that nature inside a standard wordpress installation? I could not find anything within the paperwork.
I have fixed this previously by utilizing plug ins for example professional-php which translates php directly within the publish (which provides the energy to make use of getbloginfo('siteurl') but i would like a cleaner more customer-friendly approach.
I possibly could code the shortcode myself i suppose but i'd desire to use standard functionality whether it is available.
What about a filter ? attachment_fields_to_save ... Put on fields connected by having an attachment just before saving them within the database. So that you can perform a realy small pluggin with this and employ it in which you whant .
I authored this plugin to cope with that exact problem. In it's configurations page, just enter all of the link to your dev and push atmosphere on new lines. Try it out and tell me for those who have any problems.