From 0f9f8418f86365f4cf4c05cdf9b81e1963d97346 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Thu, 3 Mar 2016 21:45:26 +0000 Subject: [PATCH] Customize: Don't show custom image sizes in the media modal. Custom image sizes for logos should only be used for their intended purpose. See #33755. Built from https://develop.svn.wordpress.org/trunk@36839 git-svn-id: http://core.svn.wordpress.org/trunk@36806 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-custom-logo.php | 29 ---------------------- wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/wp-admin/includes/class-wp-custom-logo.php b/wp-admin/includes/class-wp-custom-logo.php index 517fded36b..5549eefcb9 100644 --- a/wp-admin/includes/class-wp-custom-logo.php +++ b/wp-admin/includes/class-wp-custom-logo.php @@ -23,7 +23,6 @@ class WP_Custom_Logo { public function __construct() { add_action( 'wp_head', array( $this, 'head_text_styles' ) ); add_action( 'delete_attachment', array( $this, 'delete_attachment_data' ) ); - add_filter( 'image_size_names_choose', array( $this, 'media_manager_image_sizes' ) ); } /** @@ -66,34 +65,6 @@ class WP_Custom_Logo { } } - /** - * Makes custom image sizes available to the media manager. - * - * @since 4.5.0 - * @access public - * - * @param array $sizes Image sizes. - * @return array All default and registered custom image sizes. - */ - public function media_manager_image_sizes( $sizes ) { - - // Get an array of all registered image sizes. - $intermediate = get_intermediate_image_sizes(); - - // Is there anything fun to work with? - if ( is_array( $intermediate ) && ! empty( $intermediate ) ) { - foreach ( $intermediate as $key => $size ) { - - // If the size isn't already in the $sizes array, add it. - if ( ! array_key_exists( $size, $sizes ) ) { - $sizes[ $size ] = $size; - } - } - } - - return $sizes; - } - /** * Retrieves the header text classes. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 10e20a1834..75a27abe0f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-beta2-36838'; +$wp_version = '4.5-beta2-36839'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.