[resolved] need plugins directory constant compatible with 2.5 and 2.6 (4 posts)

  1. teamplaylotto
    Posted 7 years ago #

    I am using the constant wp_plugin_url in my plugin which works nicely with wp2.6 but 2.5.1 hasn't got this constant defined.

    I thought putting

    if ( ! defined( 'WP_PLUGIN_URL' ) )
    define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );

    would do it but the source of a 2.5.1 wordpress page is showing WP_CONTENT_URL instead of the path

    is wp_content_url defined in 2.5.1? I searched high and low and couldn't find an answer :-(

    is there a backwards compatible way of using wp_plugin_url as a constant?

  2. teamplaylotto
    Posted 7 years ago #

    lol, spent bleedin ages searching and got nothing and then a tag I placed in this post links to this

    it gave me what I want. phew!

  3. Andy Potanin
    Posted 7 years ago #

    Thank you, exactly what I needed.

  4. blogsdna
    Posted 6 years ago #

    Thanks teamplaylotto, This is what i am looking for. i hope in future more like this constants will be added to wordpress codex

Topic Closed

This topic has been closed to new replies.

About this Topic