Changeset 61071
- Timestamp:
- 10/27/2025 11:55:51 AM (6 weeks ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 5 edited
-
abilities-api.php (modified) (1 diff)
-
abilities-api/class-wp-abilities-registry.php (modified) (4 diffs)
-
abilities-api/class-wp-ability-categories-registry.php (modified) (2 diffs)
-
abilities-api/class-wp-ability-category.php (modified) (2 diffs)
-
abilities-api/class-wp-ability.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/abilities-api.php
r61067 r61071 275 275 sprintf( 276 276 /* translators: 1: wp_abilities_api_init, 2: string value of the ability name. */ 277 esc_html__( 'Abilities must be registered on the %1$s action. The ability %2$s was not registered.' ),277 __( 'Abilities must be registered on the %1$s action. The ability %2$s was not registered.' ), 278 278 '<code>wp_abilities_api_init</code>', 279 279 '<code>' . esc_html( $name ) . '</code>' -
trunk/src/wp-includes/abilities-api/class-wp-abilities-registry.php
r61059 r61071 237 237 * 238 238 * @param string $name The name of the registered ability, with its namespace. 239 * @return ?WP_AbilityThe registered ability instance, or null if it is not registered.239 * @return WP_Ability|null The registered ability instance, or null if it is not registered. 240 240 */ 241 241 public function get_registered( string $name ): ?WP_Ability { … … 244 244 __METHOD__, 245 245 /* translators: %s: Ability name. */ 246 sprintf( esc_html__( 'Ability "%s" not found.' ), esc_attr( $name ) ),246 sprintf( __( 'Ability "%s" not found.' ), esc_html( $name ) ), 247 247 '6.9.0' 248 248 ); … … 266 266 __METHOD__, 267 267 sprintf( 268 __( 'Ability API should not be initialized before the <code>init</code> action has fired' ) 268 // translators: %s: init action. 269 __( 'Ability API should not be initialized before the %s action has fired.' ), 270 '<code>init</code>' 269 271 ), 270 272 '6.9.0' … … 315 317 */ 316 318 public function __sleep(): array { 317 throw new LogicException( __CLASS__ . ' should never be serialized ' );319 throw new LogicException( __CLASS__ . ' should never be serialized.' ); 318 320 } 319 321 } -
trunk/src/wp-includes/abilities-api/class-wp-ability-categories-registry.php
r61032 r61071 206 206 __METHOD__, 207 207 sprintf( 208 __( 'Ability API should not be initialized before the <code>init</code> action has fired' ) 208 // translators: %s: init action. 209 __( 'Ability API should not be initialized before the %s action has fired.' ), 210 '<code>init</code>' 209 211 ), 210 212 '6.9.0' … … 250 252 */ 251 253 public function __sleep(): array { 252 throw new LogicException( __CLASS__ . ' should never be serialized ' );254 throw new LogicException( __CLASS__ . ' should never be serialized.' ); 253 255 } 254 256 } -
trunk/src/wp-includes/abilities-api/class-wp-ability-category.php
r61032 r61071 76 76 if ( empty( $slug ) ) { 77 77 throw new InvalidArgumentException( 78 esc_html__( 'The ability category slug cannot be empty.' )78 __( 'The ability category slug cannot be empty.' ) 79 79 ); 80 80 } … … 212 212 */ 213 213 public function __sleep(): array { 214 throw new LogicException( __CLASS__ . ' should never be serialized ' );214 throw new LogicException( __CLASS__ . ' should never be serialized.' ); 215 215 } 216 216 } -
trunk/src/wp-includes/abilities-api/class-wp-ability.php
r61047 r61071 170 170 '<code>' . esc_html( $property_name ) . '</code>', 171 171 '<code>' . esc_html( $this->name ) . '</code>', 172 '<code>' . self::class. '</code>'172 '<code>' . __CLASS__ . '</code>' 173 173 ), 174 174 '6.9.0' … … 446 446 /* translators: %s ability name. */ 447 447 __( 'Ability "%s" does not define an input schema required to validate the provided input.' ), 448 $this->name448 esc_html( $this->name ) 449 449 ) 450 450 ); … … 458 458 /* translators: %1$s ability name, %2$s error message. */ 459 459 __( 'Ability "%1$s" has invalid input. Reason: %2$s' ), 460 $this->name,460 esc_html( $this->name ), 461 461 $valid_input->get_error_message() 462 462 ) … … 515 515 'ability_invalid_execute_callback', 516 516 /* translators: %s ability name. */ 517 sprintf( __( 'Ability "%s" does not have a valid execute callback.' ), $this->name)517 sprintf( __( 'Ability "%s" does not have a valid execute callback.' ), esc_html( $this->name ) ) 518 518 ); 519 519 } … … 543 543 /* translators: %1$s ability name, %2$s error message. */ 544 544 __( 'Ability "%1$s" has invalid output. Reason: %2$s' ), 545 $this->name,545 esc_html( $this->name ), 546 546 $valid_output->get_error_message() 547 547 ) … … 582 582 'ability_invalid_permissions', 583 583 /* translators: %s ability name. */ 584 sprintf( __( 'Ability "%s" does not have necessary permission.' ), $this->name)584 sprintf( __( 'Ability "%s" does not have necessary permission.' ), esc_html( $this->name ) ) 585 585 ); 586 586 } … … 639 639 */ 640 640 public function __sleep(): array { 641 throw new LogicException( __CLASS__ . ' should never be serialized ' );641 throw new LogicException( __CLASS__ . ' should never be serialized.' ); 642 642 } 643 643 }
Note: See TracChangeset
for help on using the changeset viewer.