Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



set_post_thumbnail_size ›

Seit2.9.0
Veraltetn/v
set_post_thumbnail_size ( $width = 0, $height = 0, $crop = false )
Parameter: (3)
  • (int) $width Image width in pixels.
    Erforderlich: Nein
    Standard:
  • (int) $height Image height in pixels.
    Erforderlich: Nein
    Standard:
  • (bool|array) $crop Optional. Whether to crop images to specified width and height or resize. An array can specify positioning of the crop area. Default false.
    Erforderlich: Nein
    Standard: false
Siehe:
Definiert in:
Codex:

Registers an image size for the post thumbnail.



Quellcode

function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) {
	add_image_size( 'post-thumbnail', $width, $height, $crop );
}