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

WPSEO_Admin_Init::yoast_plugin_update_notification() public Yoast 1.0

Determines whether a update notification needs to be displayed.

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

Хуки из метода
Возвращает

null.

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

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

Код WPSEO_Admin_Init::yoast_plugin_update_notification() Yoast 15.1.1

<?php
public function yoast_plugin_update_notification() {
	$notification_center   = Yoast_Notification_Center::get();
	$current_minor_version = $this->get_major_minor_version( WPSEO_Options::get( 'version', WPSEO_VERSION ) );
	$file                  = plugin_dir_path( WPSEO_FILE ) . 'release-info.json';

	// Remove if file is not present.
	if ( ! file_exists( $file ) ) {
		$notification_center->remove_notification_by_id( 'wpseo-plugin-updated' );
		return;
	}

	// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents -- Retrieving a local file.
	$release_json = file_get_contents( $file );

	/**
	 * Filter: 'wpseo_update_notice_content' - Allow filtering of the content
	 * of the update notice read from the release-info.json file.
	 *
	 * @api object The object from the release-info.json file.
	 */
	$release_info = apply_filters( 'wpseo_update_notice_content', json_decode( $release_json ) );

	// Remove if file is malformed or for a different version.
	if ( is_null( $release_info )
		|| empty( $release_info->version )
		|| version_compare( $this->get_major_minor_version( $release_info->version ), $current_minor_version, '!=' )
		|| empty( $release_info->release_description )
	) {
		$notification_center->remove_notification_by_id( 'wpseo-plugin-updated' );
		return;
	}

	$notification = $this->get_yoast_seo_update_notification( $release_info );

	// Restore notification if it was dismissed in a previous minor version.
	$last_dismissed_version = get_user_option( $notification->get_dismissal_key() );
	if ( ! $last_dismissed_version
		|| version_compare( $this->get_major_minor_version( $last_dismissed_version ), $current_minor_version, '<' )
	) {
		Yoast_Notification_Center::restore_notification( $notification );
	}
	$notification_center->add_notification( $notification );
}