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

Yoast\WP\SEO\Config\Migrations

WpYoastDropIndexableMetaTableIfExists{} Yoast 1.0

Class WpYoastDropIndexableMetaTableIfExists.

Хуков нет.

Возвращает

Null. Ничего.

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

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

Методы

  1. down()
  2. get_table_name()
  3. up()

Код WpYoastDropIndexableMetaTableIfExists{} Yoast 15.1.1

<?php
class WpYoastDropIndexableMetaTableIfExists extends Migration {

	/**
	 * The plugin this migration belongs to.
	 *
	 * @var string
	 */
	public static $plugin = 'free';

	/**
	 * Migration up.
	 */
	public function up() {
		$table_name = $this->get_table_name();

		// This can be done safely as it executes a DROP IF EXISTS.
		$this->drop_table( $table_name );
	}

	/**
	 * Migration down.
	 */
	public function down() {
		// No down required. This specific table should never exist.
	}

	/**
	 * Retrieves the table name to use.
	 *
	 * @return string The table name to use.
	 */
	protected function get_table_name() {
		return Model::get_table_name( 'Indexable_Meta' );
	}
}