WPSEO_Admin::map_manage_options_cap()
Maps the manage_options cap on saving an options page to wpseo_manage_options.
Метод класса: WPSEO_Admin{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WPSEO_Admin = new WPSEO_Admin(); $WPSEO_Admin->map_manage_options_cap();
Код WPSEO_Admin::map_manage_options_cap() WPSEO Admin::map manage options cap Yoast 23.6
public function map_manage_options_cap() { // phpcs:ignore WordPress.Security -- The variable is only used in strpos and thus safe to not unslash or sanitize. $option_page = ! empty( $_POST['option_page'] ) ? $_POST['option_page'] : ''; if ( strpos( $option_page, 'yoast_wpseo' ) === 0 || strpos( $option_page, Settings_Integration::PAGE ) === 0 ) { add_filter( 'option_page_capability_' . $option_page, [ $this, 'get_manage_options_cap' ] ); } }