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
This commit is contained in:
Konstantin Obenland 2016-03-03 21:45:26 +00:00
parent 1ef0d464d7
commit 0f9f8418f8
2 changed files with 1 additions and 30 deletions

View File

@ -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.
*

View File

@ -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.