wp-includes/abilities-api/class-wp-ability-category.php:21Encapsulates the properties and methods related to a specific ability category.
$slugstringprotected$labelstringprotected$descriptionstringprotected$metaarray<string,protectedfinal class WP_Ability_Category { /** * The unique slug for the ability category. * * @since 6.9.0 * @var string */ protected $slug; /** * The human-readable ability category label. * * @since 6.9.0 * @var string */ protected $label; /** * The detailed ability category description. * * @since 6.9.0 * @var string */ protected $description; /** * The optional ability category metadata. * * @since 6.9.0 * @var array<string, mixed> */ protected $meta = array(); /** * Constructor. * * Do not use this constructor directly. Instead, use the `wp_register_ability_category()` function. * * @access private * * @since 6.9.0 * * @see wp_register_ability_category() * * @param string $slug The unique slug for the ability category. * @param array<string, mixed> $args { * An associative array of arguments for the ability category. * * @type string $label The human-readable label for the ability category. * @type string $description A description of the ability category. * @type array<string, mixed> $meta Optional. Additional metadata for the ability category. * } */ public function __construct( string $slug, array $args ) { if ( empty( $slug ) ) { throw new InvalidArgumentException( __( 'The ability category slug cannot be empty.' ) ); } $this->slug = $slug; $properties = $this->prepare_properties( $args ); foreach ( $properties as $property_name => $property_value ) { if ( ! property_exists( $this, $property_name ) ) { _doing_it_wrong( __METHOD__, sprintf( /* translators: %s: Property name. */ __( 'Property "%1$s" is not a valid property for ability category "%2$s". Please check the %3$s class for allowed properties.' ), '<code>' . esc_html( $property_name ) . '</code>', '<code>' . esc_html( $this->slug ) . '</code>', '<code>' . __CLASS__ . '</code>' ), '6.9.0' ); continue; }Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
src/wp-includes/abilities-api/class-wp-ability-category.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.