[wp-hackers] WP_CONTENT_DIR and PLUGINDIR
Stephen Rider
wp-hackers at striderweb.com
Wed Sep 10 04:59:53 GMT 2008
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' );
More information about the wp-hackers
mailing list