WPSEO_Import_Settings::import()
Imports the data submitted by the user.
Метод класса: WPSEO_Import_Settings{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WPSEO_Import_Settings = new WPSEO_Import_Settings(); $WPSEO_Import_Settings->import();
Код WPSEO_Import_Settings::import() WPSEO Import Settings::import Yoast 24.0
public function import() { check_admin_referer( self::NONCE_ACTION ); if ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) { return; } if ( ! isset( $_POST['settings_import'] ) || ! is_string( $_POST['settings_import'] ) ) { return; } // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: The raw content will be parsed afterwards. $content = wp_unslash( $_POST['settings_import'] ); if ( empty( $content ) ) { return; } $this->parse_options( $content ); }