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

Yoast_Network_Admin::handle_restore_site_request() public Yoast 1.0

Handles a request to restore a site's default settings.

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

Хуков нет.

Возвращает

null.

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

$Yoast_Network_Admin = new Yoast_Network_Admin();
$Yoast_Network_Admin->handle_restore_site_request();

Код Yoast_Network_Admin::handle_restore_site_request() Yoast 15.2

<?php
public function handle_restore_site_request() {
	$this->verify_request( 'wpseo-network-restore', 'restore_site_nonce' );

	$option_group = 'wpseo_ms';

	// phpcs:ignore WordPress.Security.NonceVerification -- Nonce verified via `verify_request()` above.
	$site_id = ! empty( $_POST[ $option_group ]['site_id'] ) ? (int) $_POST[ $option_group ]['site_id'] : 0;
	if ( ! $site_id ) {
		add_settings_error( $option_group, 'settings_updated', __( 'No site has been selected to restore.', 'wordpress-seo' ), 'error' );

		$this->terminate_request();
		return;
	}

	$site = get_site( $site_id );
	if ( ! $site ) {
		/* translators: %s expands to the ID of a site within a multisite network. */
		add_settings_error( $option_group, 'settings_updated', sprintf( __( 'Site with ID %d not found.', 'wordpress-seo' ), $site_id ), 'error' );
	}
	else {
		WPSEO_Options::reset_ms_blog( $site_id );

		/* translators: %s expands to the name of a site within a multisite network. */
		add_settings_error( $option_group, 'settings_updated', sprintf( __( '%s restored to default SEO settings.', 'wordpress-seo' ), esc_html( $site->blogname ) ), 'updated' );
	}

	$this->terminate_request();
}