network_admin_url( string $path = '', string $scheme = 'admin' ): string
- Since
- 3.0.0
- Source
wp-includes/link-template.php:3822
Retrieves the URL to the admin area for the network.
Parameters
$pathstringoptional- Optional path relative to the admin URL. Default empty.Default:
'' $schemestringoptional- The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.Default:
'admin'
Return
string- Admin URL link with optional path appended.
Hooks fired · 1
One hook fires while network_admin_url() runs, in this order:
Uses · 4
- is_multisite()Determines whether Multisite is enabled.
- admin_url()Retrieves the URL to the admin area for the current site.
- network_site_url()Retrieves the site URL for the current network.
- apply_filters()Calls the callback functions that have been added to a filter hook.
Used by · 38
- WP_Automatic_Updater::send_email()Sends an email upon the completion or failure of a background core update.
- WP_Customize_Manager::handle_load_themes_request()Loads themes into the theme browsing/installation UI.
- WP_MS_Sites_List_Table::column_blogname()Handles the site name column output.
- WP_MS_Sites_List_Table::column_users()Handles the users column output.
- WP_MS_Sites_List_Table::handle_row_actions()Generates and displays row action links.
- WP_MS_Users_List_Table::column_blogs()Handles the sites column output.
- WP_MS_Users_List_Table::get_views()
- WP_MS_Users_List_Table::handle_row_actions()Generates and displays row action links.
- WP_Plugin_Dependencies::check_plugin_dependencies_during_ajax()Checks plugin dependencies after a plugin is installed via AJAX.
- WP_Plugin_Dependencies::display_admin_notice_for_unmet_dependencies()Displays an admin notice if dependencies are not installed.
- WP_Plugin_Install_List_Table::get_more_details_link()Creates a 'More details' link for the plugin.
- WP_Plugins_List_Table::get_view_details_link()Returns a 'View details' link for the plugin.
Show all 38
- WP_Plugins_List_Table::single_row()
- WP_Site_Health::get_test_plugin_version()Tests if plugins are outdated, or unnecessary.
- WP_Themes_List_Table::no_items()
- core_update_footer()Returns core update footer message.
- get_edit_profile_url()Retrieves the URL to the user's profile editor.
- get_site_screen_help_tab_args()Returns the arguments for the help tab on the Edit Site screens.
- network_edit_site_nav()Outputs the HTML for a network's "Edit Site" tabular interface.
- newblog_notify_siteadmin()Notifies the network admin that a new site has been activated.
- newuser_notify_siteadmin()Notifies the network admin that a new user has been activated.
- self_admin_url()Retrieves the URL to the admin area for either the current site or the network depending on context.
- site_admin_notice()Displays an admin notice to upgrade all sites after a core upgrade.
- update_nag()Returns core update notification message.
- update_network_option_new_admin_email()Sends a confirmation request email when a change of network admin email address is attempted.
- update_right_now_message()Displays WordPress version and active theme in the 'At a Glance' dashboard widget.
- validate_plugin_requirements()Validates the plugin requirements for WordPress version and PHP version.
- wp_admin_bar_my_sites_menu()Adds the "My Sites/[Site Name]" menu and all submenus.
- wp_admin_bar_new_content_menu()Adds "Add New" menu.
- wp_admin_bar_site_menu()Adds the "Site Name" menu.
- wp_admin_bar_updates_menu()Provides an update link if theme/plugin/core updates are available.
- wp_ajax_install_plugin()Handles installing a plugin via AJAX.
- wp_ajax_install_theme()Handles installing a theme via AJAX.
- wp_ajax_query_themes()Handles getting themes from themes_api() via AJAX.
- wp_ajax_search_install_plugins()Handles searching plugins to install via AJAX.
- wp_ajax_search_plugins()Handles searching plugins via AJAX.
- wp_get_plugin_action_button()Gets the markup for the plugin install action button.
- wp_network_dashboard_right_now()
Source
function network_admin_url( $path = '', $scheme = 'admin' ) { if ( ! is_multisite() ) { return admin_url( $path, $scheme ); } $url = network_site_url( 'wp-admin/network/', $scheme ); if ( $path && is_string( $path ) ) { $url .= ltrim( $path, '/' ); } /** * Filters the network admin URL. * * @since 3.0.0 * @since 5.8.0 The `$scheme` parameter was added. * * @param string $url The complete network admin URL including scheme and path. * @param string $path Path relative to the network admin URL. Blank string if * no path is specified. * @param string|null $scheme The scheme to use. Accepts 'http', 'https', * 'admin', or null. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). */ return apply_filters( 'network_admin_url', $url, $path, $scheme );}History
Introduced in 3.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/link-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.