add_notification(); return; } $this->remove_notification(); } /** * Adds a notification to the notification center. */ protected function add_notification() { $notification_center = Yoast_Notification_Center::get(); $notification_center->add_notification( $this->get_notification() ); } /** * Removes a notification to the notification center. */ protected function remove_notification() { $notification_center = Yoast_Notification_Center::get(); $notification_center->remove_notification( $this->get_notification() ); } /** * Gets the notification object. * * @return Yoast_Notification */ protected function get_notification() { $message = sprintf( /* translators: %1$s is a link start tag to the Configuration Wizard, %2$s is the link closing tag. */ __( 'You have previously set your site to represent a person. We’ve improved our functionality around Schema and the Knowledge Graph, so you should go in and %1$scomplete those settings%2$s.', 'wordpress-seo' ), '', '' ); $notification = new Yoast_Notification( $message, [ 'type' => Yoast_Notification::WARNING, 'id' => 'wpseo-schema-person-upgrade', 'capabilities' => 'wpseo_manage_options', 'priority' => 0.8, ] ); return $notification; } }