[wp-hackers] absolute URLs in plug-ins and custom types

Shasta Willson shastaw at gmail.com
Mon Jul 2 22:13:02 UTC 2012


A number of the plug-ins I use, such as sliders, involve inputting an
absolute URL for the image.  This is a problem at deployment (or any
other move) obviously, but I'm not sure I've seen it done any other
way.

I'm building a custom type that includes two image uploads using the
built-in media box.  I'd really like it to store a relative URL rather
than an absolute one so I've considered using regex to just strip off
everything to "/uploads".  Is there a downside to doing this?  Is
there a better way to accomplish the goal?  Am I missing some reason
everyone seems to store the absolute link?

Thanks,
Shasta


More information about the wp-hackers mailing list