WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

Yoast\WP\SEO\Integrations\Admin

Migration_Error_Integration{} Yoast 1.0

Migration_Error_Integration class.

Хуков нет.

Возвращает

Null. Ничего.

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

$Migration_Error_Integration = new Migration_Error_Integration();
// use class methods

Методы

  1. __construct( Migration_Status $migration_status )
  2. get_conditionals()
  3. register_hooks()
  4. render_migration_error()

Код Migration_Error_Integration{} Yoast 15.6.2

<?php
class Migration_Error_Integration implements Integration_Interface {

	/**
	 * The migration status object.
	 *
	 * @var Migration_Status
	 */
	protected $migration_status;

	/**
	 * @inheritDoc
	 */
	public static function get_conditionals() {
		return [ Admin_Conditional::class ];
	}

	/**
	 * Migration_Error_Integration constructor.
	 *
	 * @param Migration_Status $migration_status The migration status object.
	 */
	public function __construct( Migration_Status $migration_status ) {
		$this->migration_status = $migration_status;
	}

	/**
	 * @inheritDoc
	 */
	public function register_hooks() {
		if ( $this->migration_status->get_error( 'free' ) === false ) {
			return;
		}

		\add_action( 'admin_notices', [ $this, 'render_migration_error' ] );
	}

	/**
	 * Renders the migration error.
	 *
	 * @return void
	 */
	public function render_migration_error() {
		echo new Migration_Error_Presenter( $this->migration_status->get_error( 'free' ) );
	}
}