[wp-hackers] WP_CONTENT_DIR and PLUGINDIR

Viper007Bond viper at viper007bond.com
Wed Sep 10 08:35:26 GMT 2008


Of course that's just AFAIK.

On Wed, Sep 10, 2008 at 1:34 AM, Viper007Bond <viper at viper007bond.com>wrote:

> WP_SITEURL is for overriding the database value (I use it so I can use a
> copy of my database on my localhost without editing it). It should not be
> used nor set by a plugin.
>
>
> On Tue, Sep 9, 2008 at 10:24 PM, DD32 <wordpress at dd32.id.au> wrote:
>
>> 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
>>>
>>>
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
>
>
> --
> Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/
>



-- 
Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/


More information about the wp-hackers mailing list