network_edit_site_nav_links

Filters the links that appear on site-editing network pages.

Description

apply_filters( 'network_edit_site_nav_links', (callback) $array ); 

Default links: site-info,, site-users., site-themes, and site-settings.

Parameters (1)

0. $array — Optional. (callback) => array( 'site-info' => array( 'label' => __( 'Info' ), 'url' => 'site-info.php', 'cap' => 'manage_sites' ), 'site-users' => array( 'label' => __( 'Users' ), 'url' => 'site-users.php', 'cap' => 'manage_sites' ), 'site-themes' => array( 'label' => __( 'Themes' ), 'url' => 'site-themes.php', 'cap' => 'manage_sites' ), 'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php', 'cap' => 'manage_sites' ) )

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'network_edit_site_nav_links', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the network_edit_site_nav_links callback 
  2. function filter_network_edit_site_nav_links( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'network_edit_site_nav_links', 'filter_network_edit_site_nav_links', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'network_edit_site_nav_links', 'filter_network_edit_site_nav_links', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/ms.php  
  1. $links = apply_filters( 'network_edit_site_nav_links', array(