Guest User

Untitled

a guest
Jul 23rd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. ##Andy, I still have problems with that
  2.  
  3. Here's how I load the plugin now. I put the plugin into a new class; and the Extension class is stored in another file which is called at the init.
  4.  
  5. ////////
  6. ////////
  7. $classified3s_groups = new Classified3s_Groups();
  8.  
  9. if ( defined( 'BP_VERSION' ) )
  10. $classified3s_groups->init();
  11. else
  12. add_action( 'bp_init', array(&$classified3s_groups,'init'));
  13.  
  14.  
  15. ##Classified3s_Groups
  16.  
  17. class Classified3s_Groups {
  18. function init(){
  19.  
  20. define ( 'BP_CLASSIFIED3S_PLUGIN_NAME', 'buddypress-classified3s' );
  21. define ( 'BP_CLASSIFIED3S_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . BP_CLASSIFIED3S_PLUGIN_NAME );
  22. define ( 'BP_CLASSIFIED3S_PLUGIN_URL', WP_PLUGIN_URL . '/' . BP_CLASSIFIED3S_PLUGIN_NAME );
  23. require_once ( BP_CLASSIFIED3S_PLUGIN_DIR . '/bp-classified3s-groups-classes.php' );
  24. bp_register_classified3_extension( 'Classified3_Groups_Extension' );
  25. ...
  26.  
  27. ##still have the error :
  28. Fatal error: Class 'BP_Classified3_Extension' not found in F:\web\kinetest\wordpress-mu\wp-content\plugins\buddypress-classified3s\bp-classified3s-groups-classes.php on line 3
Add Comment
Please, Sign In to add comment