lass, Not_Admin_Ajax_Conditional::class, User_Can_Manage_Wpseo_Options_Conditional::class, ]; } /** * Checks whether the notification should be shown and adds * it to the notification center if this is the case. * * @return void */ public function maybe_create_notification() { if ( ! $this->should_show_notification() ) { return; } if ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) { $notification = $this->notification(); $this->notification_helper->restore_notification( $notification ); $this->notification_center->add_notification( $notification ); } } /** * Checks whether the notification should not be shown anymore and removes * it from the notification center if this is the case. * * @return void */ public function maybe_cleanup_notification() { $notification = $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ); if ( $notification === null ) { return; } if ( $this->should_show_notification() ) { return; } $this->notification_center->remove_notification_by_id( self::NOTIFICATION_ID ); } /** * Checks whether the notification should be shown. * * @return bool If the notification should be shown. */ protected function should_show_notification() { if ( ! $this->environment_helper->is_production_mode() ) { return false; } // Don't show a notification if the indexing has already been started earlier. if ( $this->indexing_helper->get_started() > 0 ) { return false; } // We're about to perform expensive queries, let's inform. \add_filter( 'wpseo_unindexed_count_queries_ran', '__return_true' ); // Never show a notification when nothing should be indexed. return $this->indexing_helper->get_limited_filtered_unindexed_count( 1 ) > 0; } /** * Returns an instance of the notification. * * @return Yoast_Notification The notification to show. */ protected function notification() { $reason = $this->indexing_helper->get_reason(); $presenter = $this->get_presenter( $reason ); return new Yoast_Notification( $presenter, [ 'type' => Yoast_Notification::WARNING, 'id' => self::NOTIFICATION_ID, 'capabilities' => 'wpseo_manage_options', 'priority' => 0.8, ] ); } /** * Gets the presenter to use to show the notification. * * @param string $reason The reason for the notification. * * @return Indexing_Failed_Notification_Presenter|Indexing_Notification_Presenter */ protected function get_presenter( $reason ) { if ( $reason === Indexing_Reasons::REASON_INDEXING_FAILED ) { $presenter = new Indexing_Failed_Notification_Presenter( $this->product_helper, $this->short_link_helper, $this->addon_manager ); } else { $total_unindexed = $this->indexing_helper->get_filtered_unindexed_count(); $presenter = new Indexing_Notification_Presenter( $this->short_link_helper, $total_unindexed, $reason ); } return $presenter; } } te_execution() { exit; } } {"id":832,"count":1,"description":"","link":"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/","name":"Mention tr\u00e8s honorable","slug":"mention-tres-honorable","taxonomy":"post_tag","meta":[],"yoast_head":"\nMention tr\u00e8s honorable Archives - JusteInfos- Information g\u00e9n\u00e9rale<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mention tr\u00e8s honorable Archives - JusteInfos- Information g\u00e9n\u00e9rale\" \/>\n<meta property=\"og:url\" content=\"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/\" \/>\n<meta property=\"og:site_name\" content=\"JusteInfos- Information g\u00e9n\u00e9rale\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"CollectionPage\",\"@id\":\"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/\",\"url\":\"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/\",\"name\":\"Mention tr\u00e8s honorable Archives - JusteInfos- Information g\u00e9n\u00e9rale\",\"isPartOf\":{\"@id\":\"https:\/\/justeinfos.net\/#website\"},\"breadcrumb\":{\"@id\":\"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/#breadcrumb\"},\"inLanguage\":\"fr-FR\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/justeinfos.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mention tr\u00e8s honorable\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/justeinfos.net\/#website\",\"url\":\"https:\/\/justeinfos.net\/\",\"name\":\"JusteInfos- Information g\u00e9n\u00e9rale\",\"description\":\"L'Information-Juste M\u00e9sur\u00e9e ett Sans Passion\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/justeinfos.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mention tr\u00e8s honorable Archives - JusteInfos- Information g\u00e9n\u00e9rale","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/","og_locale":"fr_FR","og_type":"article","og_title":"Mention tr\u00e8s honorable Archives - JusteInfos- Information g\u00e9n\u00e9rale","og_url":"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/","og_site_name":"JusteInfos- Information g\u00e9n\u00e9rale","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"CollectionPage","@id":"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/","url":"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/","name":"Mention tr\u00e8s honorable Archives - JusteInfos- Information g\u00e9n\u00e9rale","isPartOf":{"@id":"https:\/\/justeinfos.net\/#website"},"breadcrumb":{"@id":"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/#breadcrumb"},"inLanguage":"fr-FR"},{"@type":"BreadcrumbList","@id":"https:\/\/justeinfos.net\/tag\/mention-tres-honorable\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/justeinfos.net\/"},{"@type":"ListItem","position":2,"name":"Mention tr\u00e8s honorable"}]},{"@type":"WebSite","@id":"https:\/\/justeinfos.net\/#website","url":"https:\/\/justeinfos.net\/","name":"JusteInfos- Information g\u00e9n\u00e9rale","description":"L'Information-Juste M\u00e9sur\u00e9e ett Sans Passion","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/justeinfos.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"}]}},"_links":{"self":[{"href":"https:\/\/justeinfos.net\/wp-json\/wp\/v2\/tags\/832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justeinfos.net\/wp-json\/wp\/v2\/tags"}],"about":[{"href":"https:\/\/justeinfos.net\/wp-json\/wp\/v2\/taxonomies\/post_tag"}],"wp:post_type":[{"href":"https:\/\/justeinfos.net\/wp-json\/wp\/v2\/posts?tags=832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}