Changeset 61086
- Timestamp:
- 10/29/2025 01:43:52 PM (6 weeks ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
-
abilities-api.php (modified) (1 diff)
-
abilities-api/class-wp-abilities-registry.php (modified) (1 diff)
-
abilities-api/class-wp-ability.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/abilities-api.php
r61071 r61086 255 255 * Optional. Additional metadata for the ability. 256 256 * 257 * @type array<string, bool|null> $annotations Optional. Annotation metadata for the ability. Provides 258 * additional semantic information about the ability's 259 * characteristics and behavior. 257 * @type array<string, bool|null> $annotations { 258 * Optional. Semantic annotations describing the ability's behavioral characteristics. 259 * These annotations are hints for tooling and documentation. 260 * 261 * @type bool|null $readonly Optional. If true, the ability does not modify its environment. 262 * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its environment. 263 * If false, the ability performs only additive updates. 264 * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments 265 * will have no additional effect on its environment. 266 * } 260 267 * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. 261 268 * When true, the ability can be invoked via HTTP requests. -
trunk/src/wp-includes/abilities-api/class-wp-abilities-registry.php
r61071 r61086 62 62 * Optional. Additional metadata for the ability. 63 63 * 64 * @type array<string, null|bool> $annotations Optional. Annotation metadata for the ability. 64 * @type array<string, bool|null> $annotations { 65 * Optional. Semantic annotations describing the ability's behavioral characteristics. 66 * These annotations are hints for tooling and documentation. 67 * 68 * @type bool|null $readonly Optional. If true, the ability does not modify its environment. 69 * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its environment. 70 * If false, the ability performs only additive updates. 71 * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments 72 * will have no additional effect on its environment. 73 * } 65 74 * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. Default false. 66 75 * } -
trunk/src/wp-includes/abilities-api/class-wp-ability.php
r61071 r61086 34 34 * 35 35 * @since 6.9.0 36 * @var array<string, (null|bool)>36 * @var array<string, bool|null> 37 37 */ 38 38 protected static $default_annotations = array( … … 151 151 * Optional. Additional metadata for the ability. 152 152 * 153 * @type array<string, null|bool> $annotations Optional. Annotation metadata for the ability. 153 * @type array<string, bool|null> $annotations { 154 * Optional. Semantic annotations describing the ability's behavioral characteristics. 155 * These annotations are hints for tooling and documentation. 156 * 157 * @type bool|null $readonly Optional. If true, the ability does not modify its environment. 158 * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its environment. 159 * If false, the ability performs only additive updates. 160 * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments 161 * will have no additional effect on its environment. 162 * } 154 163 * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. Default false. 155 164 * } … … 206 215 * Optional. Additional metadata for the ability. 207 216 * 208 * @type array<string, null|bool> $annotations Optional. Annotation metadata for the ability. 217 * @type array<string, bool|null> $annotations { 218 * Optional. Semantic annotations describing the ability's behavioral characteristics. 219 * These annotations are hints for tooling and documentation. 220 * 221 * @type bool|null $readonly Optional. If true, the ability does not modify its environment. 222 * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its environment. 223 * If false, the ability performs only additive updates. 224 * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments 225 * will have no additional effect on its environment. 226 * } 209 227 * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. Default false. 210 228 * } … … 225 243 * Additional metadata for the ability. 226 244 * 227 * @type array<string, null|bool> $annotations Optional. Annotation metadata for the ability. 245 * @type array<string, bool|null> $annotations { 246 * Semantic annotations describing the ability's behavioral characteristics. 247 * These annotations are hints for tooling and documentation. 248 * 249 * @type bool|null $readonly If true, the ability does not modify its environment. 250 * @type bool|null $destructive If true, the ability may perform destructive updates to its environment. 251 * If false, the ability performs only additive updates. 252 * @type bool|null $idempotent If true, calling the ability repeatedly with the same arguments 253 * will have no additional effect on its environment. 254 * } 228 255 * @type bool $show_in_rest Whether to expose this ability in the REST API. Default false. 229 256 * } … … 499 526 */ 500 527 public function check_permissions( $input = null ) { 528 if ( ! is_callable( $this->permission_callback ) ) { 529 return new WP_Error( 530 'ability_invalid_permission_callback', 531 /* translators: %s ability name. */ 532 sprintf( __( 'Ability "%s" does not have a valid permission callback.' ), esc_html( $this->name ) ) 533 ); 534 } 535 501 536 return $this->invoke_callback( $this->permission_callback, $input ); 502 537 }
Note: See TracChangeset
for help on using the changeset viewer.