e hU ;S^ `U i AAAA]N^ aN^ p F]U _N^ _N^ 0 @]U 7E.bY rotateImage q hU ;S^ age A hU ;S^ bU i AAAA^N^ aN^ p ]U _N^ U @ _N^ 0 F~]U ʆjs sampleImage hU ;S^ age hU ;S^ @8U cU i AAAA]N^ aN^ p ~]U ^N^ $^N^ 0 }]U J9B solarizeImage hU ;S^ solarizeimage hU ;S^ @8U dU i AAAAp]N^ aN^ P &H]U _N^ 0 |]U ɴ` shadowImage q hU ;S^ shadowimage A ^U U @8U fU i AAAA0]N^ aN^ U 0rU .^N^ _N^ _N^ _N^ @ N]U 0HNY setImageAttribute a `(U ;S^ attribute ! `(U ;S^ gU i AAAA:\N^ aN^ p &|]U _N^ @ _N^ @ @ y]U 3hz`96 setImageBackgroundColor `(U ;S^ backgroundcolor `(U ;S^ `iU i AAAA]N^ aN^ P {]U _N^ U @ 0 Fz]U *o setImageCompose `pU ;S^ compose `pU ;S^ jU j AAAA}]N^ aN^ P Fv]U P_N^ 0 v]U l'f setImageDelay `pU ;S^ setimagedelay a `pU ;S^ @8U kU j AAAA]N^ aN^ P u]U -^N^ 0 u]U i l'f setImageDepth Q `pU ;S^ setimagedepth ! `pU ;S^ @8U mU j AAAA ]N^ aN^ P t]U ^N^ 0 Fs]U 'l'f setImageGamma `pU ;S^ setimagegamma oU `lU @8U `nU j AAAA]N^ aN^ P s]U ^N^ @ w]U 6]NF setImageIterations `(U ;S^ iterations A `(U ;S^ oU !j AAAA]N^ aN^ P Fq]U _N^ @ q]U 0XG 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. */ 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. */ 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; } // 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; } }