array( 'type' => 'integer' ), 'before' => array( 'type' => 'object' ), 'after' => array( 'type' => 'object' ), ); } /** * 'confirm' is intentionally absent — see Base_Rank_Math_Ability::ability(). */ protected function required_input(): array { return array(); } protected function annotations(): array { return array( 'readonly' => false, 'destructive' => true, 'idempotent' => true ); } /** * @param array $input * @return array|WP_Error */ protected function run( array $input ) { $result = Role_Capability_Repository::reset(); if ( is_wp_error( $result ) ) { return $result; } $result['message'] = sprintf( /* translators: %d: number of roles reset */ _n( 'Reset Rank Math capabilities for %d role.', 'Reset Rank Math capabilities for %d roles.', $result['roles_reset'], 'acrossai-abilities-manager' ), $result['roles_reset'] ); return $result; } }