WPSEO_Installation::set_first_install_options()publicYoast 1.0

Sets the options on first install for showing the installation notice and disabling of the settings pages.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$WPSEO_Installation = new WPSEO_Installation();
$WPSEO_Installation->set_first_install_options();

Код WPSEO_Installation::set_first_install_options() Yoast 22.3

public function set_first_install_options() {
	$options = get_option( 'wpseo' );

	$options['show_onboarding_notice'] = true;
	$options['first_activated_on']     = time();

	update_option( 'wpseo', $options );
}