| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/wordpress-seo/admin/menu/ |
Upload File : |
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Menu
*/
/**
* Network Admin Menu handler.
*/
class WPSEO_Network_Admin_Menu extends WPSEO_Base_Menu {
/**
* Registers all hooks to WordPress.
*
* @return void
*/
public function register_hooks() {
// Needs the lower than default priority so other plugins can hook underneath it without issue.
add_action( 'network_admin_menu', [ $this, 'register_settings_page' ], 5 );
}
/**
* Register the settings page for the Network settings.
*
* @return void
*/
public function register_settings_page() {
if ( ! $this->check_manage_capability() ) {
return;
}
add_menu_page(
__( 'Network Settings', 'wordpress-seo' ) . ' - Yoast SEO',
'Yoast SEO',
$this->get_manage_capability(),
$this->get_page_identifier(),
[ $this, 'network_config_page' ],
$this->get_icon_svg(),
);
$submenu_pages = $this->get_submenu_pages();
$this->register_submenu_pages( $submenu_pages );
}
/**
* Returns the list of registered submenu pages.
*
* @return array List of registered submenu pages.
*/
public function get_submenu_pages() {
// Submenu pages.
$submenu_pages = [
$this->get_submenu_page(
__( 'General', 'wordpress-seo' ),
$this->get_page_identifier(),
[ $this, 'network_config_page' ],
),
];
if ( WPSEO_Utils::allow_system_file_edit() === true ) {
$submenu_pages[] = $this->get_submenu_page( __( 'Edit Files', 'wordpress-seo' ), 'wpseo_files' );
}
/**
* Filter: 'wpseo_network_submenu_pages' - Collects all network submenus that need to be shown.
*
* @internal For internal Yoast SEO use only.
*
* @param array $submenu_pages List with all submenu pages.
*/
return (array) apply_filters( 'wpseo_network_submenu_pages', $submenu_pages );
}
/**
* Loads the form for the network configuration page.
*
* @return void
*/
public function network_config_page() {
require_once WPSEO_PATH . 'admin/pages/network.php';
}
/**
* Checks whether the current user has capabilities to manage all options.
*
* @return bool True if capabilities are sufficient, false otherwise.
*/
protected function check_manage_capability() {
return current_user_can( $this->get_manage_capability() );
}
/**
* Returns the capability that is required to manage all options.
*
* @return string Capability to check against.
*/
protected function get_manage_capability() {
return 'wpseo_manage_network_options';
}
}