array( 'type' => 'array', 'items' => array( 'type' => 'string' ), 'description' => __( 'LiteSpeed cache tags.', 'acrossai-abilities-manager' ), ), ); } protected function required_input(): array { return array( 'tags', ); } protected function output_properties(): array { return array( 'purged' => array( 'type' => 'array' ), ); } protected function annotations(): array { return array( 'readonly' => false, 'destructive' => false, 'idempotent' => true, ); } protected function run( array $input ) { $tags = isset( $input['tags'] ) && is_array( $input['tags'] ) ? $input['tags'] : array(); $purged = Purge_Repository::purge_tags( $tags ); if ( is_wp_error( $purged ) ) { return $purged; } return array( 'purged' => $purged, 'message' => sprintf( /* translators: %d: number of tags */ _n( 'Purged %d cache tag.', 'Purged %d cache tags.', count( $purged ), 'acrossai-abilities-manager' ), count( $purged ) ), ); } }