WordPress at a glance

get_intermediate_image_sizes() WP 1.0

Gets the available intermediate image sizes.

✈ 1 time = 0.000018s = very fast | 50000 times = 0.14s = very fast PHP 7.0.5, WP 4.5.2

No Hooks.

Return

Array. Returns a filtered array of image size strings.

Usage

get_intermediate_image_sizes();

Code of get_intermediate_image_sizes: wp-includes/media.php VER 5.0.1

<?php
function get_intermediate_image_sizes() {
	$_wp_additional_image_sizes = wp_get_additional_image_sizes();
	$image_sizes = array('thumbnail', 'medium', 'medium_large', 'large'); // Standard sizes
	if ( ! empty( $_wp_additional_image_sizes ) ) {
		$image_sizes = array_merge( $image_sizes, array_keys( $_wp_additional_image_sizes ) );
	}

	/**
	 * Filters the list of intermediate image sizes.
	 *
	 * @since 2.5.0
	 *
	 * @param array $image_sizes An array of intermediate image sizes. Defaults
	 *                           are 'thumbnail', 'medium', 'medium_large', 'large'.
	 */
	return apply_filters( 'intermediate_image_sizes', $image_sizes );
}

Related Functions

From tag: Thumbnail (images)

More from category: Thumbnails

No comments
    Hello, !     Log In . Register