list of all registered ability categories. * * Do not use this method directly. Instead, use the `wp_get_ability_categories()` function. * * @since 6.9.0 * * @see wp_get_ability_categories() * * @return array The array of registered ability categories. */ public function get_all_registered(): array { return $this->registered_categories; } /** * Checks if an ability category is registered. * * Do not use this method directly. Instead, use the `wp_has_ability_category()` function. * * @since 6.9.0 * * @see wp_has_ability_category() * * @param string $slug The slug of the ability category. * @return bool True if the ability category is registered, false otherwise. */ public function is_registered( string $slug ): bool { return isset( $this->registered_categories[ $slug ] ); } /** * Retrieves a registered ability category. * * Do not use this method directly. Instead, use the `wp_get_ability_category()` function. * * @since 6.9.0 * * @see wp_get_ability_category() * * @param string $slug The slug of the registered ability category. * @return WP_Ability_Category|null The registered ability category instance, or null if it is not registered. */ public function get_registered( string $slug ): ?WP_Ability_Category { if ( ! $this->is_registered( $slug ) ) { _doing_it_wrong( __METHOD__, /* translators: %s: Ability category slug. */ sprintf( __( 'Ability category "%s" not found.' ), esc_html( $slug ) ), '6.9.0' ); return null; } return $this->registered_categories[ $slug ]; } /** * Utility method to retrieve the main instance of the registry class. * * The instance will be created if it does not exist yet. * * @since 6.9.0 * * @return WP_Ability_Categories_Registry|null The main registry instance, or null when `init` action has not fired. */ public static function get_instance(): ?self { if ( ! did_action( 'init' ) ) { _doing_it_wrong( __METHOD__, sprintf( // translators: %s: init action. __( 'Ability API should not be initialized before the %s action has fired.' ), 'init' ), '6.9.0' ); return null; } if ( null === self::$instance ) { self::$instance = new self(); /** * Fires when preparing ability categories registry. * * Ability categories should be registered on this action to ensure they're available when needed. * * @since 6.9.0 * * @param WP_Ability_Categories_Registry $instance Ability categories registry object. */ do_action( 'wp_abilities_api_categories_init', self::$instance ); } return self::$instance; } /** * Wakeup magic method. * * @since 6.9.0 * @throws LogicException If the registry object is unserialized. * This is a security hardening measure to prevent unserialization of the registry. */ public function __wakeup(): void { throw new LogicException( __CLASS__ . ' should never be unserialized.' ); } /** * Sleep magic method. * * @since 6.9.0 * @throws LogicException If the registry object is serialized. * This is a security hardening measure to prevent serialization of the registry. */ public function __sleep(): array { throw new LogicException( __CLASS__ . ' should never be serialized.' ); } } this->is_allowed( $optimization_type ) ) { return; } $this->query->make_status_pending( $url, $job_id, $queue_name, $is_mobile ); } /** * Increment retries number and change status back to pending. * * @param string $url Url from DB row. * @param boolean $is_mobile Is mobile from DB row. * @param string $error_code error code. * @param string $error_message error message. * * @return void */ public function increment_retries( string $url, bool $is_mobile, string $error_code, string $error_message ): void { if ( ! $this->is_allowed() ) { return; } $this->query->increment_retries( $url, $is_mobile, $error_code, $error_message ); } /** * Update the error message. * * @param string $url Url from DB row. * @param boolean $is_mobile Is mobile from DB row. * @param int $error_code error code. * @param string $error_message error message. * @param string $previous_message Previous saved message. * * @return void */ public function update_message( string $url, bool $is_mobile, int $error_code, string $error_message, string $previous_message ): void { if ( ! $this->is_allowed() ) { return; } $this->query->update_message( $url, $is_mobile, $error_code, $error_message, $previous_message ); } /** * Updates the next_retry_time field * * @param string $url Url from DB row. * @param boolean $is_mobile Is mobile from DB row. * @param string|int $next_retry_time timestamp or mysql format date. * * @return void */ public function update_next_retry_time( string $url, bool $is_mobile, $next_retry_time ): void { if ( ! $this->is_allowed() ) { return; } $this->query->update_next_retry_time( $url, $is_mobile, $next_retry_time ); } }
Fatal error: Trait "WP_Rocket\Engine\Common\JobManager\Managers\AbstractManager" not found in /htdocs/le-blog.fr/wp-content/plugins/wp-rocket/inc/Engine/Optimization/RUCSS/Jobs/Manager.php on line 15