Skip to:
Content
Pages
Categories
Search
Top
Bottom

problem using another plugin's class…

  • @grosbouff

    Participant

    I would like to adapt a WP plugin for BuddyPress. My BP plugin uses the WP plugin; which is contained inside a class “mapress”.

    The WP plugin fires it like this : $mappress = new mapress().

    But in my BP plugin, if I set $bp_mappress = new mapress();

    I got an error : Class ‘mappress’ not found.

    Why is the class not found ?

    Thanks !

Viewing 2 replies - 1 through 2 (of 2 total)
  • @apeatling

    Keymaster

    Did you activate the plugin, and are you using it in the root blog?

    @detective

    Participant

    Maybe your BP plugin is loaded before the WP plugin, and therefore the mapress class is undeclared. Perhaps it’s best for you to do the following:

    function init_my_plugin() { global $bp_mapress; $bp_mapress = new mapress; }
    add_action( 'plugins_loaded', 'init_my_plugin' );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘problem using another plugin's class…’ is closed to new replies.
Skip to toolbar