[wp-hackers] WP_CONTENT_DIR and PLUGINDIR
DD32
wordpress at dd32.id.au
Wed Sep 10 05:24:53 GMT 2008
The WP_SITEURL branch is redundant, get_option has a filter for siteurl on
it by default to return that on get_option('siteurl):
http://trac.wordpress.org/browser/trunk/wp-includes/functions.php#L2359
On Wed, 10 Sep 2008 14:59:53 +1000, Stephen Rider
<wp-hackers at striderweb.com> wrote:
> Question: Is it necessary to check for SITEURL or is that redundant?
> Should that test be excised in favor of simply using
> get_option( 'siteurl' ) ?
>
> (It certainly won't _hurt_, but I prefer code to be only as long as
> necessary.)
>
> Stephen
>
>
>> if ( ! defined( 'WP_CONTENT_URL' ) ) {
>> if ( defined( 'WP_SITEURL' ) )
>> define( 'WP_CONTENT_URL', WP_SITEURL . '/wp-content' );
>> else
>> define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/
>> wp-content' );
>> }
>> if ( ! defined( 'WP_CONTENT_DIR' ) )
>> define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
>> if ( ! defined( 'WP_PLUGIN_URL' ) )
>> define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
>> if ( ! defined( 'WP_PLUGIN_DIR' ) )
>> define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list