Skip to:
Content
Pages
Categories
Search
Top
Bottom

dashboard settings page: WP 3.6 (multisite) and BP 1.8.1 (multiblog)

  • Avatar of shanebpdev
    shanebp
    Participant

    @shanebp

    What is the proper way to add a Dashboard > Settings page for a custom plugin in
    WP 3.6 (multisite) and BP 1.8.1 (multiblog) ?

    Currently:
    When network activating the plugin it only shows on the settings on
    Network Admin. The plugin settings don’t show on the subsites.

    When deactivating the plugin network wide it’s active on the subsite
    but there’s no menu for the settings.

    Current Code:

    
    add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', array( $this, 'bp_CustomPlug_data_admin_menu' ) );
    
    function bp_CustomPlug_data_admin_menu() {
    			
    	if( is_multisite() ) {
    		add_submenu_page( 'settings.php', __( 'CustomPlugData', 'bp-show-CustomPlug-data'), __( 'CustomPlugData', 'bp-show-CustomPlug-data' ), 'manage_options', 'bp-show-CustomPlug-data', array( $this, 'bp_CustomPlug_data_admin_screen' ) );
    	} else {
    		add_options_page(  __( 'CustomPlugData', 'bp-show-CustomPlug-data'), __( 'CustomPlugData', 'bp-show-CustomPlug-data' ), 'manage_options', 'bp-show-CustomPlug-data', array( $this, 'bp_CustomPlug_data_admin_screen' ) );
    	}
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.