diff --git a/features/media-image-size.feature b/features/media-image-size.feature index 8814340f..2f6fe921 100644 --- a/features/media-image-size.feature +++ b/features/media-image-size.feature @@ -48,10 +48,10 @@ Feature: List image sizes */ add_action( - 'after_setup_theme', - function () { - add_image_size( 'foo-bar-thumb', 50, 50, true ); - } + 'after_setup_theme', + function () { + add_image_size( 'foo-bar-thumb', 50, 50, true ); + } ); """ And I try `wp plugin activate foo-bar.php` diff --git a/features/media-prune.feature b/features/media-prune.feature index c070ecf1..84a5de85 100644 --- a/features/media-prune.feature +++ b/features/media-prune.feature @@ -100,9 +100,12 @@ Feature: Prune WordPress attachment thumbnails And a wp-content/mu-plugins/media-settings.php file: """ $size_data ) { - $backup[ $size . '-orig' ] = $size_data; - } + foreach ( $meta['sizes'] as $size => $size_data ) { + $backup[ $size . '-orig' ] = $size_data; + } } if ( empty( $backup ) ) { - $backup['full-orig'] = array( - 'file' => wp_basename( $old_file ), - 'width' => isset( $meta['width'] ) ? $meta['width'] : 0, - 'height' => isset( $meta['height'] ) ? $meta['height'] : 0, - 'mime-type' => get_post_mime_type( $id ), - ); + $backup['full-orig'] = array( + 'file' => wp_basename( $old_file ), + 'width' => isset( $meta['width'] ) ? $meta['width'] : 0, + 'height' => isset( $meta['height'] ) ? $meta['height'] : 0, + 'mime-type' => get_post_mime_type( $id ), + ); } update_post_meta( $id, '_wp_attachment_backup_sizes', $backup ); """ @@ -1865,9 +2026,12 @@ Feature: Regenerate WordPress attachments And a wp-content/mu-plugins/media-settings.php file: """