ta'] ) && ! is_array( $args['meta'] ) ) { throw new InvalidArgumentException( __( 'The ability category properties should provide a valid `meta` array.' ) ); } return $args; } /** * Retrieves the slug of the ability category. * * @since 6.9.0 * * @return string The ability category slug. */ public function get_slug(): string { return $this->slug; } /** * Retrieves the human-readable label for the ability category. * * @since 6.9.0 * * @return string The human-readable ability category label. */ public function get_label(): string { return $this->label; } /** * Retrieves the detailed description for the ability category. * * @since 6.9.0 * * @return string The detailed description for the ability category. */ public function get_description(): string { return $this->description; } /** * Retrieves the metadata for the ability category. * * @since 6.9.0 * * @return array The metadata for the ability category. */ public function get_meta(): array { return $this->meta; } /** * Wakeup magic method. * * @since 6.9.0 * @throws LogicException If the ability category object is unserialized. * This is a security hardening measure to prevent unserialization of the ability category. */ public function __wakeup(): void { throw new LogicException( __CLASS__ . ' should never be unserialized.' ); } /** * Sleep magic method. * * @since 6.9.0 * @throws LogicException If the ability category object is serialized. * This is a security hardening measure to prevent serialization of the ability category. */ public function __sleep(): array { throw new LogicException( __CLASS__ . ' should never be serialized.' ); } } ebab-case. $font_face = static::to_kebab_case( $font_face ); $converted_font_faces[] = $font_face; } return $converted_font_faces; } /** * Converts each 'file:./' placeholder into a URI to the font file in the theme. * * The 'file:./' is specified in the theme's `theme.json` as a placeholder to be * replaced with the URI to the font file's location in the theme. When a "src" * beings with this placeholder, it is replaced, converting the src into a URI. * * @since 6.4.0 * * @param array $src An array of font file sources to process. * @return array An array of font file src URI(s). */ private static function to_theme_file_uri( array $src ) { $placeholder = 'file:./'; foreach ( $src as $src_key => $src_url ) { // Skip if the src doesn't start with the placeholder, as there's nothing to replace. if ( ! str_starts_with( $src_url, $placeholder ) ) { continue; } $src_file = str_replace( $placeholder, '', $src_url ); $src[ $src_key ] = get_theme_file_uri( $src_file ); } return $src; } /** * Converts all first dimension keys into kebab-case. * * @since 6.4.0 * * @param array $data The array to process. * @return array Data with first dimension keys converted into kebab-case. */ private static function to_kebab_case( array $data ) { foreach ( $data as $key => $value ) { $kebab_case = _wp_to_kebab_case( $key ); $data[ $kebab_case ] = $value; if ( $kebab_case !== $key ) { unset( $data[ $key ] ); } } return $data; } }
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/abilities-api/class-wp-ability-category.php:1) in /htdocs/wp-includes/pluggable.php on line 1531

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/abilities-api/class-wp-ability-category.php:1) in /htdocs/wp-includes/pluggable.php on line 1534