WPSEO_Schema_Person_Upgrade_Notification::handle_notification()publicYoast 1.0

Handles if the notification should be added or removed.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Schema_Person_Upgrade_Notification = new WPSEO_Schema_Person_Upgrade_Notification();
$WPSEO_Schema_Person_Upgrade_Notification->handle_notification();

Код WPSEO_Schema_Person_Upgrade_Notification::handle_notification() Yoast 22.4

public function handle_notification() {
	$company_or_person_user_id = WPSEO_Options::get( 'company_or_person_user_id', false );
	if ( WPSEO_Options::get( 'company_or_person' ) === 'person' && empty( $company_or_person_user_id ) ) {
		$this->add_notification();
		return;
	}

	$this->remove_notification();
}