WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WPSEO_Submenu_Capability_Normalize::normalize_submenus_capability() public Yoast 1.0

Normalizes any manage_options to wpseo_manage_options.

This is needed as the module plugins are not updated with the new capabilities directly, but they should not be shown as main menu items.

{} Это метод класса: WPSEO_Submenu_Capability_Normalize{}

Хуков нет.


Массив. Converted subpages.


$WPSEO_Submenu_Capability_Normalize = new WPSEO_Submenu_Capability_Normalize();
$WPSEO_Submenu_Capability_Normalize->normalize_submenus_capability( $submenu_pages );
$submenu_pages(массив) (обязательный)
List of subpages to convert.

Код WPSEO_Submenu_Capability_Normalize::normalize_submenus_capability() Yoast 15.2

public function normalize_submenus_capability( $submenu_pages ) {
	foreach ( $submenu_pages as $index => $submenu_page ) {
		if ( $submenu_page[3] === 'manage_options' ) {
			$submenu_pages[ $index ][3] = 'wpseo_manage_options';

	return $submenu_pages;