Source View: network_edit_site_nav_links

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1057       *     @type array $link_slug {
1058       *         An array of information about the individual link to a page.
1059       *
1060       *         $type string $label Label to use for the link.
1061       *         $type string $url   URL, relative to `network_admin_url()` to use for the link.
1062       *         $type string $cap   Capability required to see the link.
1063       *     }
1064       * }
1065       */
1066      $links = apply_filters( 'network_edit_site_nav_links', array(
1067           'site-info'     => array( 'label' => __( 'Info' ),     'url' => 'site-info.php',     'cap' => 'manage_sites' ),
1068           'site-users'    => array( 'label' => __( 'Users' ),    'url' => 'site-users.php',    'cap' => 'manage_sites' ),
1069           'site-themes'   => array( 'label' => __( 'Themes' ),   'url' => 'site-themes.php',   'cap' => 'manage_sites' ),
1070           'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php', 'cap' => 'manage_sites' )
1071      ) );
1072
1073      // Parse arguments
1074      $r = wp_parse_args( $args, array(
1075           'blog_id'  => isset( $_GET['blog_id'] ) ? (int) $_GET['blog_id'] : 0,