wp_constrain_dimensions

Advertisement

Summery Summery

Filters dimensions to constrain down-sampled images to.

Syntax Syntax

apply_filters( 'wp_constrain_dimensions', int[] $dimensions, int $current_width, int $current_height, int $max_width, int $max_height )

Parameters Parameters

$dimensions

(int[]) An array of width and height values.

  • (int) The width in pixels.
  • '1'
    (int) The height in pixels.

$current_width

(int) The current width of the image.

$current_height

(int) The current height of the image.

$max_width

(int) The maximum width permitted.

$max_height

(int) The maximum height permitted.

Source Source

File: wp-includes/media.php

Advertisement

Changelog Changelog

Changelog
Version Description
4.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.