Make WordPress Core

Changeset 61059


Ignore:
Timestamp:
10/24/2025 11:55:17 AM (4 months ago)
Author:
gziolo
Message:

Abilities API: Ensure public method is used in the codebase

Discovered when syncing code back to Abilities API repository in https://github.com/WordPress/abilities-api/pull/126.

Follow-up to [61032].
See #64098.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/abilities-api/class-wp-abilities-registry.php

    r61032 r61059  
    122122        // Validate ability category exists if provided (will be validated as required in WP_Ability).
    123123        if ( isset( $args['category'] ) ) {
    124             $category_registry = WP_Ability_Categories_Registry::get_instance();
    125             if ( ! $category_registry->is_registered( $args['category'] ) ) {
     124            if ( ! wp_has_ability_category( $args['category'] ) ) {
    126125                _doing_it_wrong(
    127126                    __METHOD__,
Note: See TracChangeset for help on using the changeset viewer.