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

WPSEO_Admin_Init::show_hook_deprecation_warnings() public Yoast 1.0

Shows deprecation warnings to the user if a plugin has registered a filter we have deprecated.

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

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WPSEO_Admin_Init = new WPSEO_Admin_Init();
$WPSEO_Admin_Init->show_hook_deprecation_warnings();

Код WPSEO_Admin_Init::show_hook_deprecation_warnings() Yoast 15.1.1

<?php
public function show_hook_deprecation_warnings() {
	global $wp_filter;

	if ( wp_doing_ajax() ) {
		return;
	}

	// WordPress hooks that have been deprecated since a Yoast SEO version.
	$deprecated_filters = [
		'wpseo_genesis_force_adjacent_rel_home' => [
			'version'     => '9.4',
			'alternative' => null,
		],
		'wpseo_opengraph'                       => [
			'version'     => '14.0',
			'alternative' => null,
		],
		'wpseo_twitter'                         => [
			'version'     => '14.0',
			'alternative' => null,
		],
		'wpseo_twitter_taxonomy_image'          => [
			'version'     => '14.0',
			'alternative' => null,
		],
		'wpseo_twitter_metatag_key'             => [
			'version'     => '14.0',
			'alternative' => null,
		],
		'wp_seo_get_bc_ancestors'               => [
			'version'     => '14.0',
			'alternative' => 'wpseo_breadcrumb_links',
		],
	];

	// Determine which filters have been registered.
	$deprecated_notices = array_intersect(
		array_keys( $deprecated_filters ),
		array_keys( $wp_filter )
	);

	// Show notice for each deprecated filter or action that has been registered.
	foreach ( $deprecated_notices as $deprecated_filter ) {
		$deprecation_info = $deprecated_filters[ $deprecated_filter ];
		// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Only uses the hardcoded values from above.
		_deprecated_hook(
			$deprecated_filter,
			'WPSEO ' . $deprecation_info['version'],
			$deprecation_info['alternative']
		);
		// phpcs:enable
	}
}