<commit_before><?php

/**
 * Manage attachments.
 *
 * @package wp-cli
 */
class Media_Command extends WP_CLI_Command {

	/**
	 * Regenerate thumbnail(s).
	 *
	 * ## OPTIONS
	 *
	 * --yes
	 * : Answer yes to the confirmation message.
	 *
	 * <attachment-id>
	 * : One or more IDs of the attachments to regenerate.
	 *
	 * ## EXAMPLES
	 *
	 *     wp media regenerate 123 1337
	 *
	 *     wp media regenerate --yes
	 *
	 * @synopsis <attachment-id>... [--yes]
	 */
	function regenerate( $args, $assoc_args = array() ) {
		global $wpdb;

		// If id is given, skip confirm because it is only one file
		if( !empty( $args ) ) {
			$assoc_args['yes'] = true;
		}

		WP_CLI::confirm('Do you realy want to regenerate all images?', $assoc_args);
<commit_msg>media regenerate: attachment IDs are optional<commit_after><?php

/**
 * Manage attachments.
 *
 * @package wp-cli
 */
class Media_Command extends WP_CLI_Command {

	/**
	 * Regenerate thumbnail(s).
	 *
	 * ## OPTIONS
	 *
	 * --yes
	 * : Answer yes to the confirmation message.
	 *
	 * <attachment-id>
	 * : One or more IDs of the attachments to regenerate.
	 *
	 * ## EXAMPLES
	 *
	 *     wp media regenerate 123 1337
	 *
	 *     wp media regenerate --yes
	 *
	 * @synopsis [<attachment-id>...] [--yes]
	 */
	function regenerate( $args, $assoc_args = array() ) {
		global $wpdb;

		if ( empty( $args ) ) {
			WP_CLI::confirm( 'Do you realy want to regenerate all images?', $assoc_args );
		}

{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.009708737864077669, 'mean_word_length': 2.7, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6054009', 'n_tokens_mistral': 553, 'n_tokens_neox': 480, 'n_words': 142}