<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Don&#8217;t include wp-load, please.</title>
	<atom:link href="http://ottopress.com/2010/dont-include-wp-load-please/feed/" rel="self" type="application/rss+xml" />
	<link>http://ottopress.com/2010/dont-include-wp-load-please/</link>
	<description>You have to use an Ottopress to get fresh squeezed Otto.</description>
	<lastBuildDate>Fri, 17 May 2013 22:57:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-beta2-24237</generator>
	<item>
		<title>By: Matt</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-11133</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 08 Aug 2012 20:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-11133</guid>
		<description><![CDATA[Hi, 2 years later...
Just wanted to say thanks for posting this, and point out that method #2 can be used for more than just generating javascript or css.
Say you are building a plugin that accepts POST requests from an outside source (i.e. PayPal IPN listener) and you want to use plugin options or $wpdb in manipulating the POST data. Instead of putting your data processing functions in a separate file and using wp-load.php, you can build them into the plugin file using method #2 and set the listener URL to http:www.example.com/?ipn_trigger=1
Less files to worry about, no wp-load.php tomfoolery, and no &quot;double-loading&quot; of wordpress.]]></description>
		<content:encoded><![CDATA[<p>Hi, 2 years later&#8230;<br />
Just wanted to say thanks for posting this, and point out that method #2 can be used for more than just generating javascript or css.<br />
Say you are building a plugin that accepts POST requests from an outside source (i.e. PayPal IPN listener) and you want to use plugin options or $wpdb in manipulating the POST data. Instead of putting your data processing functions in a separate file and using wp-load.php, you can build them into the plugin file using method #2 and set the listener URL to http:www.example.com/?ipn_trigger=1<br />
Less files to worry about, no wp-load.php tomfoolery, and no &#8220;double-loading&#8221; of wordpress.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WordPress Options Passed To JavaScript #1 &#124; Software City</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-10846</link>
		<dc:creator>WordPress Options Passed To JavaScript #1 &#124; Software City</dc:creator>
		<pubDate>Sun, 20 May 2012 09:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-10846</guid>
		<description><![CDATA[[...] solutions in loading the wp-load.php and therefore access to all features of WordPress. Long ago Otto (Samuel Wood) already referred to this fact and this articles shows solutions. Questions still there and still [...]]]></description>
		<content:encoded><![CDATA[<p>[...] solutions in loading the wp-load.php and therefore access to all features of WordPress. Long ago Otto (Samuel Wood) already referred to this fact and this articles shows solutions. Questions still there and still [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WordPress Options Passed To JavaScript #1 &#124; WPhub.biz</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-10841</link>
		<dc:creator>WordPress Options Passed To JavaScript #1 &#124; WPhub.biz</dc:creator>
		<pubDate>Thu, 17 May 2012 08:12:36 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-10841</guid>
		<description><![CDATA[[...] solutions in loading the wp-load.php and therefore access to all features of WordPress. Long ago Otto (Samuel Wood) already referred to this fact and this articles shows solutions. Questions still there and still [...]]]></description>
		<content:encoded><![CDATA[<p>[...] solutions in loading the wp-load.php and therefore access to all features of WordPress. Long ago Otto (Samuel Wood) already referred to this fact and this articles shows solutions. Questions still there and still [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WordPress Options Passed To JavaScript #1 &#124; Wbcom Designs &#124; WordPress, WPMU, Buddypress &#38; WP Performance Optimization Expert - Programmer / Developer</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-10840</link>
		<dc:creator>WordPress Options Passed To JavaScript #1 &#124; Wbcom Designs &#124; WordPress, WPMU, Buddypress &#38; WP Performance Optimization Expert - Programmer / Developer</dc:creator>
		<pubDate>Wed, 16 May 2012 21:47:38 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-10840</guid>
		<description><![CDATA[[...] solutions in loading the wp-load.php and therefore access to all features of WordPress. Long ago Otto (Samuel Wood) already referred to this fact and this articles shows solutions. Questions still there and still [...]]]></description>
		<content:encoded><![CDATA[<p>[...] solutions in loading the wp-load.php and therefore access to all features of WordPress. Long ago Otto (Samuel Wood) already referred to this fact and this articles shows solutions. Questions still there and still [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: error 404 when requesting a .php as a styleheet in wp 3.0.1 &#171; maniac.vardhan</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-10674</link>
		<dc:creator>error 404 when requesting a .php as a styleheet in wp 3.0.1 &#171; maniac.vardhan</dc:creator>
		<pubDate>Sun, 18 Mar 2012 04:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-10674</guid>
		<description><![CDATA[[...] B ] : &#8220;Right way the second&#8221; as defined here : http://ottopress.com/2010/dont-include-wp-load-please/. This is not a great alternative, but it will work if you&#8217;re a stickler for using separated [...]]]></description>
		<content:encoded><![CDATA[<p>[...] B ] : &#8220;Right way the second&#8221; as defined here : <a href="http://ottopress.com/2010/dont-include-wp-load-please/" rel="nofollow">http://ottopress.com/2010/dont-include-wp-load-please/</a>. This is not a great alternative, but it will work if you&#8217;re a stickler for using separated [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wp-load.php &#124; WP Honey Badger</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-10432</link>
		<dc:creator>wp-load.php &#124; WP Honey Badger</dc:creator>
		<pubDate>Fri, 20 Jan 2012 00:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-10432</guid>
		<description><![CDATA[[...] watch out!&#8221; says that core dev. The WP Honey Badger is just cuh-razy, including wp-load.php all over the place. It has no regard for how heavy the page is getting from loading WordPress over and over again. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] watch out!&#8221; says that core dev. The WP Honey Badger is just cuh-razy, including wp-load.php all over the place. It has no regard for how heavy the page is getting from loading WordPress over and over again. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-8004</link>
		<dc:creator>Otto</dc:creator>
		<pubDate>Wed, 06 Apr 2011 22:42:10 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-8004</guid>
		<description><![CDATA[Don&#039;t bother generating a script, just generate the variables you need to pass to a static script, then use wp_localize_script to pass those variables to it via the page.

See http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/ for more information.]]></description>
		<content:encoded><![CDATA[<p>Don&#8217;t bother generating a script, just generate the variables you need to pass to a static script, then use wp_localize_script to pass those variables to it via the page.</p>
<p>See <a href="http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/" rel="nofollow">http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/</a> for more information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loni Huff</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-7995</link>
		<dc:creator>Loni Huff</dc:creator>
		<pubDate>Wed, 06 Apr 2011 15:21:01 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-7995</guid>
		<description><![CDATA[I apologize for posting on an older thread, but I am facing a dilemma and would welcome your thoughts on best approach. I need to generate a couple of JavaScript arrays from my database as well as a set of functions that are based on the contents of those arrays. The total script length is such that I don&#039;t want to incur this overhead on every page. Is it possible to dynamically generate a then-static *.js file when the plugin is first activated and subsequently regenerate the file when the user changes the plugin options? I have Googled for information on this approach without success, so perhaps such a thing is not possible or is regarded as bad practice for some reason. What are your thoughts?]]></description>
		<content:encoded><![CDATA[<p>I apologize for posting on an older thread, but I am facing a dilemma and would welcome your thoughts on best approach. I need to generate a couple of JavaScript arrays from my database as well as a set of functions that are based on the contents of those arrays. The total script length is such that I don&#8217;t want to incur this overhead on every page. Is it possible to dynamically generate a then-static *.js file when the plugin is first activated and subsequently regenerate the file when the user changes the plugin options? I have Googled for information on this approach without success, so perhaps such a thing is not possible or is regarded as bad practice for some reason. What are your thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-5871</link>
		<dc:creator>Otto</dc:creator>
		<pubDate>Mon, 29 Nov 2010 21:37:04 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-5871</guid>
		<description><![CDATA[Well, mainly, there&#039;s almost never a good reason to actually do that. 

Javascript can use variables in the main page and have the actual code itself be static and unchanging (See http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/ for an example). 

CSS is additive. The few variable items (and they should be few) can be put into a separate file or call. If you really want to allow CSS input, you can use the second method given in the post above, or you can just hook to the init action and notice a custom $_POST variable to make it output the CSS. This isn&#039;t the best way as it still requires another hit to the site, but it does mean that you don&#039;t have to find and try to load WordPress manually, since you can just load WordPress normally then change the output to what you want it to be. It&#039;s lighter-weight to do that than to include wp-load.]]></description>
		<content:encoded><![CDATA[<p>Well, mainly, there&#8217;s almost never a good reason to actually do that. </p>
<p>Javascript can use variables in the main page and have the actual code itself be static and unchanging (See <a href="http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/" rel="nofollow">http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/</a> for an example). </p>
<p>CSS is additive. The few variable items (and they should be few) can be put into a separate file or call. If you really want to allow CSS input, you can use the second method given in the post above, or you can just hook to the init action and notice a custom $_POST variable to make it output the CSS. This isn&#8217;t the best way as it still requires another hit to the site, but it does mean that you don&#8217;t have to find and try to load WordPress manually, since you can just load WordPress normally then change the output to what you want it to be. It&#8217;s lighter-weight to do that than to include wp-load.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Miller</title>
		<link>http://ottopress.com/2010/dont-include-wp-load-please/comment-page-1/#comment-5870</link>
		<dc:creator>Kevin Miller</dc:creator>
		<pubDate>Mon, 29 Nov 2010 19:27:36 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=35#comment-5870</guid>
		<description><![CDATA[Hi Otto-

Nice write-up, and you are correct that the way you outline is much nicer and cleaner than loading the whole system.   However this doesn&#039;t take into account more robust situations...

What if when I generate a js/css file I need to pull 10 different things, query the database, etc?   Is this the case where loading in wp-load is &#039;acceptable&#039; or is there another method that is preferable?

Thanks,

Kevin]]></description>
		<content:encoded><![CDATA[<p>Hi Otto-</p>
<p>Nice write-up, and you are correct that the way you outline is much nicer and cleaner than loading the whole system.   However this doesn&#8217;t take into account more robust situations&#8230;</p>
<p>What if when I generate a js/css file I need to pull 10 different things, query the database, etc?   Is this the case where loading in wp-load is &#8216;acceptable&#8217; or is there another method that is preferable?</p>
<p>Thanks,</p>
<p>Kevin</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Object Caching 415/450 objects using xcache

 Served from: ottodestruct.com @ 2013-05-18 08:41:03 by W3 Total Cache -->