gd_edit_image_support [ WordPress Function ]
gd_edit_image_support ( $mime_type )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_theme_support, add_theme_support, get_image_tag, wp_timezone_supported, add_post_type_support
Check if the installed version of GD supports particular image type
Source
<?php
function gd_edit_image_support($mime_type) {
if ( function_exists('imagetypes') ) {
switch( $mime_type ) {
case 'image/jpeg':
return (imagetypes() & IMG_JPG) != 0;
case 'image/png':
return (imagetypes() & IMG_PNG) != 0;
case 'image/gif':
return (imagetypes() & IMG_GIF) != 0;
}
} else {
switch( $mime_type ) {
case 'image/jpeg':
return function_exists('imagecreatefromjpeg');
case 'image/png':
return function_exists('imagecreatefrompng');
case 'image/gif':
return function_exists('imagecreatefromgif');
}
}
return false;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- gd_edit_image_support | A HitchHackers guide through WordPress
Feb 11, 2011 ... function gd_edit_image_support($mime_type) { if ( function_exists('imagetypes') ) { switch( $mime_type ) { case 'image/jpeg': return ...
hitchhackerguide.com - gd_edit_image_support() WordPress function reference, arguments ...
function gd_edit_image_support($mime_type) { if ( function_exists('imagetypes') ) { switch( $mime_type ) { case 'image/jpeg': return (imagetypes() & IMG_JPG) !
queryposts.com - Docs for page media.php
gd_edit_image_support (line 992). Check if the installed version of GD supports particular image type. since: 2.9.0. bool gd_edit_image_support (string ...
phpdoc.wordpress.org - post thumbnails - Add Image Dimensions to Media Library Tab on ...
May 2, 2012... $image_edit_button = ''; if ( gd_edit_image_support( $post->post_mime_type ) ) { $nonce = wp_create_nonce( "image_editor-$post->ID" ) ...
wordpress.stackexchange.com