Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // To create custom component I need to include this file.
- // I didn't find the way to avoid this.
- // BP_Component is not visible until I put this code
- if ( !class_exists( 'BP_Component' ) ){
- require_once( WP_PLUGIN_DIR . '/buddypress/bp-loader.php' );
- }
- // so now BP is in the air and I can use it.
- class BP_SHOP_Component extends BP_Component{
- function BP_SHOP_Component(){}
- // other code
- }
- $bp->shop = new BP_SHOP_Component();
- // using bp_loaded doesn't help. It just doesn't work for me
- // Any suggestions what I'm doing wrong?
- // AS I understand, WP loads plugins step by step - using the order in plugins' folder. My component (/bp-shop/) is higher, than /buddypress/. So there is no BP at that loading time.
Advertisement
Add Comment
Please, Sign In to add comment