public static function get_image_sizes()
    {
        global $_wp_additional_image_sizes;

        $sizes = [];

        $dynamic_sizes = Size_Manager::get_dynamic_sizes();

        foreach (\get_intermediate_image_sizes() as $size) {
            if (\in_array($size, ['thumbnail', 'medium', 'medium_large', 'large'])) {
                $sizes[ $size ] = [
                    'width' => \get_option("{$size}_size_w"),
                    'height' => \get_option("{$size}_size_h"),
                    'crop' => (bool) \get_option("{$size}_crop"),
                    'generated_on_upload' => ! \in_array($size, $dynamic_sizes),
                ];
            }

            if (isset($_wp_additional_image_sizes[ $size ])) {
                $sizes[ $size ] = [
                    'width'  => $_wp_additional_image_sizes[ $size ]['width'],
                    'height' => $_wp_additional_image_sizes[ $size ]['height'],
                    'crop'   => $_wp_additional_image_sizes[ $size ]['crop'],
                    'generated_on_upload' => ! \in_array($size, $dynamic_sizes),
                ];
            }
        }

        return $sizes;
    }
public static function get_image_sizes()
    {
        global $_wp_additional_image_sizes;

        $sizes = [];

        $dynamic_sizes = Size_Manager::get_dynamic_sizes();

        foreach (\get_intermediate_image_sizes() as $size) {
            if (\in_array($size, ['thumbnail', 'medium', 'medium_large', 'large'])) {
                $sizes[ $size ] = [
                    'width' => \get_option("{$size}_size_w"),
                    'height' => \get_option("{$size}_size_h"),
                    'crop' => (bool) \get_option("{$size}_crop"),
                    'generated_on_upload' => ! \in_array($size, $dynamic_sizes),
                ];
            }

            if (isset($_wp_additional_image_sizes[ $size ])) {
                $sizes[ $size ] = [
                    'width'  => $_wp_additional_image_sizes[ $size ]['width'],
                    'height' => $_wp_additional_image_sizes[ $size ]['height'],
                    'crop'   => $_wp_additional_image_sizes[ $size ]['crop'],
                    'generated_on_upload' => ! \in_array($size, $dynamic_sizes),
                ];
            }
        }

        return $sizes;
    }
public static function get_image_sizes ( ) { global $ _wp_additional_image_sizes ; $ sizes = [ ] ; $ dynamic_sizes = Size_Manager :: get_dynamic_sizes ( ) ; foreach ( \ get_intermediate_image_sizes ( ) as $ size ) { if ( \ in_array ( $ size , [ 'thumbnail' , 'medium' , 'medium_large' , 'large' ] ) ) { $ sizes [ $ size ] = [ 'width' => \ get_option ( "{$size}_size_w" ) , 'height' => \ get_option ( "{$size}_size_h" ) , 'crop' => ( bool ) \ get_option ( "{$size}_crop" ) , 'generated_on_upload' => ! \ in_array ( $ size , $ dynamic_sizes ) , ] ; } if ( isset ( $ _wp_additional_image_sizes [ $ size ] ) ) { $ sizes [ $ size ] = [ 'width' => $ _wp_additional_image_sizes [ $ size ] [ 'width' ] , 'height' => $ _wp_additional_image_sizes [ $ size ] [ 'height' ] , 'crop' => $ _wp_additional_image_sizes [ $ size ] [ 'crop' ] , 'generated_on_upload' => ! \ in_array ( $ size , $ dynamic_sizes ) , ] ; } } return $ sizes ; }
Get size information for all currently registered image sizes.

@global $_wp_additional_image_sizes

@since  1.0.0

@return array Data for all currently registered image sizes.
Get size information for all currently registered image sizes .