is_first_install(); if ( $is_first_install && WPSEO_Utils::is_api_available() ) { add_action( 'wpseo_activate', [ $this, 'set_first_install_options' ] ); } } /** * When the option doesn't exist, it should be a new install. * * @return bool */ private function is_first_install() { return ( get_option( 'wpseo' ) === false ); } /** * Sets the options on first install for showing the installation notice and disabling of the settings pages. */ public function set_first_install_options() { $options = get_option( 'wpseo' ); $options['show_onboarding_notice'] = true; $options['first_activated_on'] = time(); update_option( 'wpseo', $options ); } }