Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_create_thumbnail [ WordPress Function ]

wp_create_thumbnail ( $file, $max_side, $deprecated = '' )
Parameters:
  • (mixed) $file Filename of the original image, Or attachment id.
  • (int) $max_side Maximum length of a single side for the thumbnail.
  • (mixed) $deprecated Never used.
Returns:
  • (string) Thumbnail path on success, Error string on failure.
Defined at:



Create a thumbnail from an Image given a maximum side size.

This function can handle most image file formats which PHP supports. If PHP does not have the functionality to save in a file of the same format, the thumbnail will be created as a jpeg.

Source


<?php
function wp_create_thumbnail$file$max_side$deprecated '' ) {
    if ( !empty( 
$deprecated ) )
        
_deprecated_argument__FUNCTION__'1.2' );
    
$thumbpath image_resize$file$max_side$max_side );
    return 
apply_filters'wp_create_thumbnail'$thumbpath );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics