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.' ); } }
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/abilities-api/class-wp-ability-categories-registry.php:1) in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Sitemap.php on line 406

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/abilities-api/class-wp-ability-categories-registry.php:1) in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Sitemap.php on line 407