WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Page Numbers] link to css files (2 posts)

  1. MACscr
    Member
    Posted 4 years ago #

    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

    http://wordpress.org/extend/plugins/wp-page-numbers/

  2. Jenst
    Member
    Posted 4 years ago #

    Thanks! I made a new one called WP Paging. It takes care of these kinds of problems.

    The code is much better written this time.

Topic Closed

This topic has been closed to new replies.

About this Topic