private function get_registered_image_sizes() {
		global $_wp_additional_image_sizes;

		$image_sizes         = array();
		$default_image_sizes = get_intermediate_image_sizes();

		foreach ( $default_image_sizes as $size ) {
			$image_sizes[] = $this->get_intermediate_size_metadata( $size );
		}

		if ( is_array( $_wp_additional_image_sizes ) ) {
			foreach ( $_wp_additional_image_sizes as $size => $size_args ) {
				$crop          = filter_var( $size_args['crop'], FILTER_VALIDATE_BOOLEAN );
				$image_sizes[] = array(
					'name'   => $size,
					'width'  => $size_args['width'],
					'height' => $size_args['height'],
					'crop'   => empty( $crop ) || is_array( $size_args['crop'] ) ? 'soft' : 'hard',
					'ratio'  => empty( $crop ) || is_array( $size_args['crop'] ) ? 'N/A' : $this->get_ratio( $size_args['width'], $size_args['height'] ),
				);
			}
		}

		return $image_sizes;
	}
private function get_registered_image_sizes() {
		global $_wp_additional_image_sizes;

		$image_sizes         = array();
		$default_image_sizes = get_intermediate_image_sizes();

		foreach ( $default_image_sizes as $size ) {
			$image_sizes[] = $this->get_intermediate_size_metadata( $size );
		}

		if ( is_array( $_wp_additional_image_sizes ) ) {
			foreach ( $_wp_additional_image_sizes as $size => $size_args ) {
				$crop          = filter_var( $size_args['crop'], FILTER_VALIDATE_BOOLEAN );
				$image_sizes[] = array(
					'name'   => $size,
					'width'  => $size_args['width'],
					'height' => $size_args['height'],
					'crop'   => empty( $crop ) || is_array( $size_args['crop'] ) ? 'soft' : 'hard',
					'ratio'  => empty( $crop ) || is_array( $size_args['crop'] ) ? 'N/A' : $this->get_ratio( $size_args['width'], $size_args['height'] ),
				);
			}
		}

		return $image_sizes;
	}
private function get_registered_image_sizes ( ) { global $ _wp_additional_image_sizes ; $ image_sizes = array ( ) ; $ default_image_sizes = get_intermediate_image_sizes ( ) ; foreach ( $ default_image_sizes as $ size ) { $ image_sizes [ ] = $ this -> get_intermediate_size_metadata ( $ size ) ; } if ( is_array ( $ _wp_additional_image_sizes ) ) { foreach ( $ _wp_additional_image_sizes as $ size => $ size_args ) { $ crop = filter_var ( $ size_args [ 'crop' ] , FILTER_VALIDATE_BOOLEAN ) ; $ image_sizes [ ] = array ( 'name' => $ size , 'width' => $ size_args [ 'width' ] , 'height' => $ size_args [ 'height' ] , 'crop' => empty ( $ crop ) || is_array ( $ size_args [ 'crop' ] ) ? 'soft' : 'hard' , 'ratio' => empty ( $ crop ) || is_array ( $ size_args [ 'crop' ] ) ? 'N/A' : $ this -> get_ratio ( $ size_args [ 'width' ] , $ size_args [ 'height' ] ) , ) ; } } return $ image_sizes ; }
Get all the registered image sizes along with their dimensions.

@global array $_wp_additional_image_sizes The additional image sizes to parse.

@link https://wordpress.stackexchange.com/a/251602 Original solution.

@return array $image_sizes The image sizes
Get all the registered image sizes along with their dimensions .