Hide custom image sizes from media library

Using unset and intermediate_image_sizes_advanced will work but only on images uploaded after the function is added. To change it for existing images you need to regenerate them using a plugin ( in essence deleting that image size) or just hide that option from being visible. Tested on 3.5.1 // add custom image size function mytheme_95344() … Read more

“Add Media” only shows “Full Size” under Attachment Display Settings

In order to show new image dimension options in the WordPress admin media library you would need to use the image_size_names_choose filter to assign them a name. So the code in your functions.php should look something like this: if ( function_exists( ‘add_image_size’ ) ) { add_image_size( ‘single-post-medium’, 515 ); add_image_size( ‘single-post-small’, 250 ); } add_filter( … Read more

image_size_names_choose filter doesn’t show

No, that seems to work right. You could test it by doing <?php echo get_the_post_thumbnail(‘grade-image’); ?> try this. add_image_size( “grade-image”, 320, 300, true ); add_filter( ‘image_size_names_choose’, ‘my_custom_sizes’ ); function my_custom_sizes( $sizes ) { return array_merge( $sizes, array( ‘grade-image’ => __(‘Grade Image’), ) ); }

How to get the image EXIF date/time and use it for the WP post date/time

PHP has a function for this purpose: exif_read_data I used this image for testing. Try this code for your purpose: add_action( ‘add_attachment’, ‘create_post_from_image’ ); function create_post_from_image( $id ) { if ( wp_attachment_is_image( $id ) ) { $image = get_post( $id ); // Get image height/width for auto inserting the image later @list( $width, $height ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)