WPSEO_Ryte::fetch_from_ryte()publicYoast 1.0

Устарела с версии 18.5. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

Fetches the data from Ryte.

Метод класса: WPSEO_Ryte{}

Хуков нет.

Возвращает

true|false|null. Whether the request ran.

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

$WPSEO_Ryte = new WPSEO_Ryte();
$WPSEO_Ryte->fetch_from_ryte();

Список изменений

Устарела с 18.5

Код WPSEO_Ryte::fetch_from_ryte() Yoast 20.3

public function fetch_from_ryte() {
	_deprecated_function( __METHOD__, 'WPSEO 18.5' );
	// Don't do anything when the WordPress environment type isn't "production".
	if ( wp_get_environment_type() !== 'production' ) {
		return;
	}

	$ryte_option = $this->get_option();
	if ( ! $ryte_option->should_be_fetched() ) {
		return false;
	}

	$new_status = $this->request_indexability();

	// Updates the timestamp in the option.
	$ryte_option->set_last_fetch( time() );

	$ryte_option->set_status( $new_status );
	$ryte_option->save_option();

	return true;
}