Not everyone uses the standard wp-content folder for their plugins.
WP_CONTENT_DIR and the corresponding WP_CONTENT_URL for the entire wp-content directory
These also exist, but you probably don’t need to use them:
WP_PLUGIN_DIR — plugins directory (full server path)
PLUGINDIR — (deprecated) plugin directory relative to ABSPATH
I recommend putting this in the start of your plugin somewhere:
if ( ! defined( ‘WP_CONTENT_URL’ ) )
define( ‘WP_CONTENT_URL’, get_option(‘url’) . ‘/wp-content’ );
if ( ! defined( ‘WP_PLUGIN_URL’ ) )
define( ‘WP_PLUGIN_URL’, WP_CONTENT_URL. ‘/plugins’ )
…and then use URLs based on WP_PLUGIN_URL when calling scripts
- The topic ‘[Plugin: WP Page Numbers] link to css files’ is closed to new replies.