Executes the ability callback.
Parameters
$inputmixedoptional- The input data for the ability.
Default:
null
Source
protected function do_execute( $input = null ) {
if ( ! is_callable( $this->execute_callback ) ) {
return new WP_Error(
'ability_invalid_execute_callback',
/* translators: %s ability name. */
sprintf( __( 'Ability "%s" does not have a valid execute callback.' ), esc_html( $this->name ) )
);
}
return $this->invoke_callback( $this->execute_callback, $input );
}
Changelog
| Version | Description |
|---|---|
| 6.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.