Switch language

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




wp_save_image_file [ WordPress Function ]

wp_save_image_file ( $filename, $image, $mime_type, $post_id )
Defined at:



No description yet.

Source


<?php
function wp_save_image_file($filename$image$mime_type$post_id) {
    
$image apply_filters('image_save_pre'$image$post_id);
    
$saved apply_filters('wp_save_image_file'null$filename$image$mime_type$post_id);
    if ( 
null !== $saved )
        return 
$saved;

    switch ( 
$mime_type ) {
        case 
'image/jpeg':
            return 
imagejpeg$image$filenameapply_filters'jpeg_quality'90'edit_image' ) );
        case 
'image/png':
            return 
imagepng($image$filename);
        case 
'image/gif':
            return 
imagegif($image$filename);
        default:
            return 
false;
    }
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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