Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

  • @shanebp

    Moderator

    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)
  • The topic ‘dashboard settings page: WP 3.6 (multisite) and BP 1.8.1 (multiblog)’ is closed to new replies.
Skip to toolbar