<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anmari &#187; constants</title>
	<atom:link href="http://webdesign.anmari.com/tag/constants/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesign.anmari.com</link>
	<description>Simply effective web services</description>
	<lastBuildDate>Wed, 16 Nov 2011 05:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress Constants</title>
		<link>http://webdesign.anmari.com/1160/wordpress-constants/</link>
		<comments>http://webdesign.anmari.com/1160/wordpress-constants/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 05:46:48 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[constants]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=1160</guid>
		<description><![CDATA[How should plugins cope with a relocated wordpress in another folder?
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/728/multiple-blogs-domains-with-wordpress/' rel='bookmark' title='Multiple Blogs, Domains with wordpress'>Multiple Blogs, Domains with wordpress</a> <small>The configuration features now available in wp-config.php now offer you a great deal of flexibility if you have multiple domains...</small></li>
<li><a href='http://webdesign.anmari.com/822/moving-wordpress/' rel='bookmark' title='Moving wordpress'>Moving wordpress</a> <small>Step by Step Guide to Moving the wordpress admin code and optionally relocating your content directory. This facilitates sharing of...</small></li>
<li><a href='http://webdesign.anmari.com/1038/amember-with-wordpress-a-trial/' rel='bookmark' title='Amember with wordpress &#8211; a trial'>Amember with wordpress &#8211; a trial</a> <small>Install Amember Download the trial to somewhere on your web server.  If re-uploading to another server, do it in binary...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Plugins really should be using the wordpress constants more effectively.   It will enable their plugins to deal with the structures the wordpress website owners want to use and that wordpress now allows.   Web owners can now define where they want various bits to live, by editing</p>
<ul>
<li><a href="http://codex.wordpress.org/Editing_wp-config.php">the wp-config.php</a> file, and</li>
<li>the uploads folder in miscellaneous settings</li>
</ul>
<p>Some constants  plugins should use to deal with a variety of wordpress setups are:</p>
<ul>
<li> WP_CONTENT_DIR  &#8211; eg: www/www/something/publichtml/wp-content</li>
<li> WP_CONTENT_URL &#8211; eg:  http:domainname/wp-content</li>
<li> WP_LANG_DIR</li>
<li> WP_PLUGIN_DIR</li>
<li> WP_PLUGIN_URL</li>
<li> STYLESHEETPATH (in case a theme uses another as it&#8217;s template, this and the next can be different)</li>
<li> TEMPLATEPATH</li>
</ul>
<p>For the full list of the latest version,<br />
<a href="http://xref.yoast.com/trunk/nav.html?index.html">see http://xref.yoast.com/trunk/nav.html?index.html</a></p>
<p>There are some &#8216;constants&#8217; that can be defined in wp-config, but are not then defined if not set in wp-config.  these are</p>
<ul>
<li>WP_SITEURL  (where the wordpress code is &#8211; eg:  http:domainname/wp)</li>
<li>WP_HOME (what your website calls home &#8211; eg:  http:domainname )</li>
</ul>
<p>It would have been much simpler if wordpress would do as it does with the other others.  check for defintion and if not set, then set them based on the DB options.  Perhaps plugin authors can do this instead of multiple calls to bloginfo(&#8216;siteurl&#8217;) or get_option(&#8216;home&#8217;).</p>
<p>Example:</p>
<p>The 2.7 code has:</p>
<pre>	if ( defined( 'WP_SITEURL' ) &amp;&amp; '' != WP_SITEURL )</pre>
<pre>		$admin_dir = WP_SITEURL . '/wp-admin/';</pre>
<pre>	elseif ( function_exists( 'get_bloginfo' ) &amp;&amp; '' != get_bloginfo( 'wpurl' ) )</pre>
<pre>		$admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/';</pre>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/728/multiple-blogs-domains-with-wordpress/' rel='bookmark' title='Multiple Blogs, Domains with wordpress'>Multiple Blogs, Domains with wordpress</a> <small>The configuration features now available in wp-config.php now offer you a great deal of flexibility if you have multiple domains...</small></li>
<li><a href='http://webdesign.anmari.com/822/moving-wordpress/' rel='bookmark' title='Moving wordpress'>Moving wordpress</a> <small>Step by Step Guide to Moving the wordpress admin code and optionally relocating your content directory. This facilitates sharing of...</small></li>
<li><a href='http://webdesign.anmari.com/1038/amember-with-wordpress-a-trial/' rel='bookmark' title='Amember with wordpress &#8211; a trial'>Amember with wordpress &#8211; a trial</a> <small>Install Amember Download the trial to somewhere on your web server.  If re-uploading to another server, do it in binary...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/1160/wordpress-constants/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

