@—&'¡À®T#¡0–&'¡P&'¡ IÚA€''¡à€''¡`&'¡ÖAp&'¡(¡™B€&'¡ &'¡è\¼AÐ&'¡&'¡àG1'¡$@‘&'¡‘&'¡£‘&'¡à&'¡ð&'¡_db ‘&'¡À&'¡è\¼Aø¹-'¡Д&'¡ †''¡ð”&'¡‘&'¡(LÈBà‡''¡•&'¡À‘&'¡Àˆ''¡à‘&'¡(LÈB ‰''¡0•&'¡€Š''¡ ’&'¡`‹''¡@•&'¡`’&'¡@Œ''¡ ''¡p’&'¡’&'¡àŽ''¡P•&'¡°;'¡p•&'¡à°;'¡ð’&'¡(LÈBÀ±;'¡€•&'¡•&'¡`´;'¡ •&'¡P“&'¡@µ;'¡p“&'¡ ¶;'¡°•&'¡·;'¡ “&'¡À“&'¡à·;'¡à“&'¡À¸;'¡”&'¡ ¹;'¡”&'¡0”&'¡€º;'¡P”&'¡`»;'¡p”&'¡@¼;'¡À”&'¡ ½;'¡°”&'¡(LÈB¾;'¡Е&'¡”&'¡à”&'¡`‘&'¡p‘&'¡•&'¡ •&'¡ ‘&'¡’&'¡0’&'¡`•&'¡°’&'¡Ð’&'¡“&'¡ “&'¡0“&'¡“&'¡à•&'¡À•&'¡ð•&'¡&'¡&'¡ÀlìAh©dD`–&'¡ –&'¡–&'¡i UEp–&'¡–&'¡@–&'¡put°–&'¡ð–&'¡ –&'¡ÎlF—&'¡Ж&'¡à–&'¡ —&'¡€–&'¡—&'¡ˆBÜG3c"¡±p"¡tputà{›@ŒÉ@¡ °/'¡ f2HàïÕAPª²@ cÈ@ cÈ@ª²@p×’@ª²@p×’@ª²@¡ @³@ª²@‘€ YÈ@ª²@‘E›@ª²@¡q q €ðe"¡ª²@p PPP€pÀ×’@¸ž³@Ô À×’@ •@À×’@Èš³@€ p•@ •@P™³@@¼³@À×’@x<˜@€ À×’@ •@`³@°O•@`³@°O•@À×’@Øù±@À×’@P³@À×’@€é’@Ä ÔpÄ € PÀ×’@p×’@À×’@Èš³@p¡`³@°O•@p`³@°O•@Ô À×’@ •@À×’@Èš³@p•@ •@‘T P`ðlÉ@h³@„8•@h³@„„„PpPP„„pPPpPxš³@ÀÕ’@xš³@ÀÕ’@  #$PPP@&³@à_g"¡@&³@ÀWg"¡à ÈaÈ@ü³@À P ³@ü³@À è×’@ü³@À è(³@€0›@° X{›@xǹ@pÒ’@E›@`•³@Ðh³@Ðh³@ü³@° pÒ’@ •@è•@ •@`³@°O•@À×’@X{›@À×’@@&³@`ðJ„"¡@&³@ÐpÒ’@ •@è•@ •@`³@°O•@pÀ×’@@&³@è•@À×’@px€q"¡H è@P$%X{›@Hú³@è•@ •@pÒ’@ •@X{›@X»É@p×’@XÀ—@      `€`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; } }