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
This commit is contained in:
parent
cf863ab2a8
commit
1134b18c6e
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user