Title: _wp_get_abilities_match_meta
Published: August 20, 2026

---

# _wp_get_abilities_match_meta( array $meta, array $conditions ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Checks whether an ability’s meta array matches a set of required key/value conditions.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#description)󠁿

All conditions must match (AND logic). Supports nested arrays for structured meta,
e.g. `array( 'mcp' => array( 'public' => true ) )`.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#parameters)󠁿

 `$meta`arrayrequired

The ability’s meta array.

`$conditions`arrayrequired

The required key/value conditions to match against.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#return)󠁿

 bool True if all conditions match, false otherwise.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#source)󠁿

    ```php
    function _wp_get_abilities_match_meta( array $meta, array $conditions ): bool {
    	foreach ( $conditions as $key => $value ) {
    		if ( ! array_key_exists( $key, $meta ) ) {
    			return false;
    		}

    		if ( is_array( $value ) ) {
    			if ( ! is_array( $meta[ $key ] ) || ! _wp_get_abilities_match_meta( $meta[ $key ], $value ) ) {
    				return false;
    			}
    		} elseif ( $meta[ $key ] !== $value ) {
    			return false;
    		}
    	}

    	return true;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/abilities-api.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/abilities-api.php#L588)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/abilities-api.php#L588-L604)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#related)󠁿

| Uses | Description | 
| [_wp_get_abilities_match_meta()](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/)`wp-includes/abilities-api.php` |

Checks whether an ability’s meta array matches a set of required key/value conditions.

  |

| Used by | Description | 
| [_wp_get_abilities_match_meta()](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/)`wp-includes/abilities-api.php` |

Checks whether an ability’s meta array matches a set of required key/value conditions.

  | 
| [wp_get_abilities()](https://developer.wordpress.org/reference/functions/wp_get_abilities/)`wp-includes/abilities-api.php` |

Retrieves registered abilities, optionally filtered by the given arguments.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/_wp_get_abilities_match_meta/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.1.0](https://developer.wordpress.org/reference/since/7.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_wp_get_abilities_match_meta%2F)
before being able to contribute a note or feedback.