network_edit_site_nav_links
Filter HookDescription
Filters the links that appear on site-editing network pages. Default links: 'site-info', 'site-users', 'site-themes', and 'site-settings'. An array of information about the individual link to a page. $type string $label Label to use for the link. $type string $url URL, relative to `network_admin_url()` to use for the link. $type string $cap Capability required to see the link. } }Hook Information
File Location |
wp-admin/includes/ms.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1064 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$links
|
{ An array of link data representing individual network admin pages. |
Usage Examples
Basic Usage
<?php
// Hook into network_edit_site_nav_links
add_filter('network_edit_site_nav_links', 'my_custom_filter', 10, 1);
function my_custom_filter($links) {
// Your custom filtering logic here
return $links;
}
Source Code Context
wp-admin/includes/ms.php:1064
- How this hook is used in WordPress core
<?php
1059 * $type string $url URL, relative to `network_admin_url()` to use for the link.
1060 * $type string $cap Capability required to see the link.
1061 * }
1062 * }
1063 */
1064 $links = apply_filters(
1065 'network_edit_site_nav_links',
1066 array(
1067 'site-info' => array(
1068 'label' => __( 'Info' ),
1069 'url' => 'site-info.php',
PHP Documentation
<?php
/**
* Filters the links that appear on site-editing network pages.
*
* Default links: 'site-info', 'site-users', 'site-themes', and 'site-settings'.
*
* @since 4.6.0
*
* @param array $links {
* An array of link data representing individual network admin pages.
*
* @type array $link_slug {
* An array of information about the individual link to a page.
*
* $type string $label Label to use for the link.
* $type string $url URL, relative to `network_admin_url()` to use for the link.
* $type string $cap Capability required to see the link.
* }
* }
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/ms.php
Related Hooks
Related hooks will be displayed here in future updates.