From 1134b18c6e2ae824b218783d4b91a26dcd2200d8 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Thu, 3 Mar 2016 21:44: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. git-svn-id: https://develop.svn.wordpress.org/trunk@36839 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-custom-logo.php | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/src/wp-admin/includes/class-wp-custom-logo.php b/src/wp-admin/includes/class-wp-custom-logo.php index 517fded36b..5549eefcb9 100644 --- a/src/wp-admin/includes/class-wp-custom-logo.php +++ b/src/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. *