{filename}
', 'regenerate-thumbnails' ),
'thumbnailSizeItemWithoutCropMethod' => __( '{label}: {width}×{height} pixels {filename}
', 'regenerate-thumbnails' ),
'thumbnailSizeBiggerThanOriginal' => __( '{label}: {width}×{height} pixels (thumbnail would be larger than original)', 'regenerate-thumbnails' ),
'thumbnailSizeItemIsCropped' => __( 'cropped to fit', 'regenerate-thumbnails' ),
'thumbnailSizeItemIsProportional' => __( 'proportionally resized to fit inside dimensions', 'regenerate-thumbnails' ),
),
'Home' => array(
'intro1' => sprintf(
__( 'When you change WordPress themes or change the sizes of your thumbnails at Settings → Media, images that you have previously uploaded to you media library will be missing thumbnail files for those new image sizes. This tool will allow you to create those missing thumbnail files for all images.', 'regenerate-thumbnails' ),
esc_url( admin_url( 'options-media.php' ) )
),
'intro2' => sprintf(
__( 'To process a specific image, visit your media library and click the "Regenerate Thumbnails" link or button. To process multiple specific images, make sure you\'re in the list view and then use the Bulk Actions dropdown after selecting one or more images.', 'regenerate-thumbnails' ),
esc_url( admin_url( 'upload.php?mode=list' ) )
),
'updatePostContents' => __( 'Update the content of posts to use the new sizes.', 'regenerate-thumbnails' ),
'RegenerateThumbnailsForAllAttachments' => __( 'Regenerate Thumbnails For All Attachments', 'regenerate-thumbnails' ),
'RegenerateThumbnailsForAllXAttachments' => __( 'Regenerate Thumbnails For All {attachmentCount} Attachments', 'regenerate-thumbnails' ),
'RegenerateThumbnailsForFeaturedImagesOnly' => __( 'Regenerate Thumbnails For Featured Images Only', 'regenerate-thumbnails' ),
'RegenerateThumbnailsForXFeaturedImagesOnly' => __( 'Regenerate Thumbnails For The {attachmentCount} Featured Images Only', 'regenerate-thumbnails' ),
'thumbnailSizes' => __( 'Thumbnail Sizes', 'regenerate-thumbnails' ),
'thumbnailSizesDescription' => __( 'These are all of the thumbnail sizes that are currently registered:', 'regenerate-thumbnails' ),
'alternatives' => __( 'Alternatives', 'regenerate-thumbnails' ),
'alternativesText1' => __( 'If you have command-line access to your site\'s server, consider using WP-CLI instead of this tool. It has a built-in regenerate command that works similarly to this tool but should be significantly faster since it has the advantage of being a command-line tool.', 'regenerate-thumbnails' ),
'alternativesText2' => __( 'Another alternative is to use the Photon functionality that comes with the Jetpack plugin. It generates thumbnails on-demand using WordPress.com\'s infrastructure. Disclaimer: The author of this plugin, Regenerate Thumbnails, is an employee of the company behind WordPress.com and Jetpack but I would recommend it even if I wasn\'t.', 'regenerate-thumbnails' ),
),
'RegenerateSingle' => array(
/* translators: Admin screen title. */
'title' => __( 'Regenerate Thumbnails: {name} — WordPress', 'regenerate-thumbnails' ),
'errorWithMessage' => __( 'ERROR: {error}', 'regenerate-thumbnails' ),
'filenameAndDimensions' => __( '{filename}
{width}×{height} pixels', 'regenerate-thumbnails' ),
'preview' => __( 'Preview', 'regenerate-thumbnails' ),
'updatePostContents' => __( 'Update the content of posts that use this attachment to use the new sizes.', 'regenerate-thumbnails' ),
'regenerating' => __( 'Regenerating…', 'regenerate-thumbnails' ),
'done' => __( 'Done! Click here to go back.', 'regenerate-thumbnails' ),
'errorRegenerating' => __( 'Error Regenerating', 'regenerate-thumbnails' ),
'errorRegeneratingMessage' => __( 'There was an error regenerating this attachment. The error was: {message}', 'regenerate-thumbnails' ),
'registeredSizes' => __( 'These are the currently registered thumbnail sizes, whether they exist for this attachment, and their filenames:', 'regenerate-thumbnails' ),
'unregisteredSizes' => __( 'The attachment says it also has these thumbnail sizes but they are no longer in use by WordPress. You can probably safely have this plugin delete them, especially if you have this plugin update any posts that make use of this attachment.', 'regenerate-thumbnails' ),
),
'RegenerateMultiple' => array(
'errorsEncountered' => __( 'Errors Encountered', 'regenerate-thumbnails' ),
'regenerationLog' => __( 'Regeneration Log', 'regenerate-thumbnails' ),
'pause' => __( 'Pause', 'regenerate-thumbnails' ),
'resume' => __( 'Resume', 'regenerate-thumbnails' ),
'logRegeneratedItem' => __( 'Regenerated {name}', 'regenerate-thumbnails' ),
'logSkippedItem' => __( 'Skipped Attachment ID {id} ({name}): {reason}', 'regenerate-thumbnails' ),
'logSkippedItemNoName' => __( 'Skipped Attachment ID {id}: {reason}', 'regenerate-thumbnails' ),
'duration' => __( 'All done in {duration}.', 'regenerate-thumbnails' ),
'hours' => __( '{count} hours', 'regenerate-thumbnails' ),
'minutes' => __( '{count} minutes', 'regenerate-thumbnails' ),
'seconds' => __( '{count} seconds', 'regenerate-thumbnails' ),
'error' => __( "Unable to fetch a list of attachment IDs to process from the WordPress REST API. You can check your browser's console for details.", 'regenerate-thumbnails' ),
),
),
);
// Bulk regeneration.
if ( ! empty( $_GET['ids'] ) ) {
$script_data['data']['thumbnailIDs'] = array_map( 'intval', explode( ',', $_GET['ids'] ) );
$script_data['l10n']['Home']['RegenerateThumbnailsForXAttachments'] = sprintf(
__( 'Regenerate Thumbnails For The %d Selected Attachments', 'regenerate-thumbnails' ),
count( $script_data['data']['thumbnailIDs'] )
);
}
wp_localize_script( 'regenerate-thumbnails', 'regenerateThumbnails', $script_data );
wp_enqueue_style(
'regenerate-thumbnails-progressbar',
plugins_url( 'css/progressbar.css', __FILE__ ),
array(),
( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? filemtime( dirname( __FILE__ ) . '/css/progressbar.css' ) : $this->version
);
}
/**
* The main Regenerate Thumbnails interface, as displayed at Tools → Regenerate Thumbnails.
*/
public function regenerate_interface() {
global $wp_version;
echo '' . sprintf( __( 'This plugin requires WordPress 4.7 or newer. You are on version %1$s. Please upgrade.', 'regenerate-thumbnails' ), esc_html( $wp_version ), esc_url( admin_url( 'update-core.php' ) ) ) . '
'; } else { ?>