@@ -169,7 +169,7 @@ public function __construct( string $name, array $args ) {
169169						__ ( 'Property "%1$s" is not a valid property for ability "%2$s". Please check the %3$s class for allowed properties. '  ),
170170						'<code> '  . esc_html ( $ property_name'</code> ' ,
171171						'<code> '  . esc_html ( $ this name  ) . '</code> ' ,
172- 						'<code> '  . self ::class  . '</code> ' 
172+ 						'<code> '  . __CLASS__  . '</code> ' 
173173					),
174174					'6.9.0 ' 
175175				);
@@ -445,7 +445,7 @@ public function validate_input( $input = null ) {
445445				sprintf (
446446					/* translators: %s ability name. */ 
447447					__ ( 'Ability "%s" does not define an input schema required to validate the provided input. '  ),
448- 					$ this name 
448+ 					esc_html (  $ this name  ) 
449449				)
450450			);
451451		}
@@ -457,7 +457,7 @@ public function validate_input( $input = null ) {
457457				sprintf (
458458					/* translators: %1$s ability name, %2$s error message. */ 
459459					__ ( 'Ability "%1$s" has invalid input. Reason: %2$s '  ),
460- 					$ this name ,
460+ 					esc_html (  $ this name  ) ,
461461					$ valid_inputget_error_message ()
462462				)
463463			);
@@ -514,7 +514,7 @@ protected function do_execute( $input = null ) {
514514			return  new  WP_Error (
515515				'ability_invalid_execute_callback ' ,
516516				/* 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  )  )
518518			);
519519		}
520520
@@ -542,7 +542,7 @@ protected function validate_output( $output ) {
542542				sprintf (
543543					/* translators: %1$s ability name, %2$s error message. */ 
544544					__ ( 'Ability "%1$s" has invalid output. Reason: %2$s '  ),
545- 					$ this name ,
545+ 					esc_html (  $ this name  ) ,
546546					$ valid_outputget_error_message ()
547547				)
548548			);
@@ -581,7 +581,7 @@ public function execute( $input = null ) {
581581			return  new  WP_Error (
582582				'ability_invalid_permissions ' ,
583583				/* 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  )  )
585585			);
586586		}
587587
@@ -638,6 +638,6 @@ public function __wakeup(): void {
638638	 *                        This is a security hardening measure to prevent serialization of the ability. 
639639	 */ 
640640	public  function  __sleep (): array  {
641- 		throw  new  LogicException ( __CLASS__  . ' should never be serialized '  );
641+ 		throw  new  LogicException ( __CLASS__  . ' should never be serialized.  '  );
642642	}
643643}
0 commit comments