[wp-hackers] absolute URLs in plug-ins and custom types
otto at ottodestruct.com
Fri Jul 6 20:57:46 UTC 2012
On Fri, Jul 6, 2012 at 3:51 PM, Bryan Petty <bpetty at bluehost.com> wrote:
> It does if they are developing themes around your content, especially
> when that content revolves around custom post types, and tons of
> metadata. Remember, content precedes design [1,2,3].
If you're developing themes around the content, then what happens when
the content changes? Recreate the theme?
The theme isn't part of the content. It's the shell in which the
content is displayed. Now, it may *depend* on the content looking a
certain way, but it certainly won't contain fixed URLs and such. Or
rather, it doesn't have to.
> What we're talking about here is *having the option* of running a
> development server with a snapshot of the live site for real-world
> testing/design/development for those of us smart enough to not be
> storing sensitive information in our WordPress sites.
You have that option now. It's easily done. URLs don't have to be tied
to one server or one IP address. There's loads of ways to do DNS
trickery to make a local server think it's example.com or whatever you
want it to be.
Alternatively, you can write a simple 4-5 line script that will
convert all mentions of example.com to test-example.com on the fly,
shove that in as a plugin, and Bob's your uncle. Output buffering is
handy for development.
More information about the wp-hackers