mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Media: add a function, wp_get_additional_image_sizes(), that wraps the retrieval of the global $_wp_additional_image_sizes. Removes 6 global imports.
See #37699. git-svn-id: https://develop.svn.wordpress.org/trunk@38303 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -700,13 +700,11 @@ function wp_restore_image($post_id) {
|
||||
* Saves image to post along with enqueued changes
|
||||
* in $_REQUEST['history']
|
||||
*
|
||||
* @global array $_wp_additional_image_sizes
|
||||
*
|
||||
* @param int $post_id
|
||||
* @return \stdClass
|
||||
*/
|
||||
function wp_save_image( $post_id ) {
|
||||
global $_wp_additional_image_sizes;
|
||||
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
|
||||
|
||||
$return = new stdClass;
|
||||
$success = $delete = $scaled = $nocrop = false;
|
||||
|
||||
Reference in New Issue
Block a user