Changeset 2615765
- Timestamp:
- 10/18/2021 11:17:51 AM (4 years ago)
- Location:
- photographers-galleries/trunk
- Files:
-
- 3 edited
-
admin/media-admin.php (modified) (4 diffs)
-
photographers-galleries.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
photographers-galleries/trunk/admin/media-admin.php
r2506921 r2615765 7 7 if ( is_admin() ): 8 8 9 /* 9 /* 10 10 * Display exif tags in media library 11 11 * Credit : Kevin Chard http://wpsnipp.com/index.php/functions-php/display-exif-metadata-in-media-library-admin-column/ … … 22 22 function posts_custom_columns_attachment_exif( $column_name, $id ){ 23 23 if( $column_name === 'wps_post_attachments_exif' ) { 24 24 25 25 $meta = wp_get_attachment_metadata( $id ); 26 26 $time_format = get_option( 'date_format' ) . " – H:i:s"; 27 27 28 28 if( !empty( $meta[image_meta][camera] ) ) { 29 29 echo date_i18n( $time_format , $meta[image_meta][created_timestamp] ) ."<hr />"; … … 33 33 echo "ISO " . $meta[image_meta][iso] . " – "; 34 34 echo "1/" . round(1 / floatval($meta[image_meta][shutter_speed])) . "<hr />"; 35 echo $meta[image_meta][copyright]. " | ";35 echo "© " . $meta[image_meta][copyright] . " | "; 36 36 echo $meta[image_meta][credit]; 37 37 } … … 39 39 } 40 40 41 function display_exif_in_attachment_modal( $form_fields, $post ){ 42 $meta = wp_get_attachment_metadata( $post->ID ); 43 $time_format = get_option( 'date_format' ) . " – H:i:s"; 44 $exif_string = ''; 45 46 if( !empty( $meta[image_meta][camera] ) ) { 47 $exif_string .= date_i18n( $time_format , $meta[image_meta][created_timestamp] ) ."<hr />"; 48 $exif_string .= $meta[image_meta][camera] . " | "; 49 $exif_string .= $meta[image_meta][focal_length] . " mm<hr />"; 50 $exif_string .= "F/" . $meta[image_meta][aperture] . " – "; 51 $exif_string .= "ISO " . $meta[image_meta][iso] . " – "; 52 $exif_string .= "1/" . round(1 / floatval($meta[image_meta][shutter_speed])) . "<hr />"; 53 $exif_string .= "© " . $meta[image_meta][copyright] . " | "; 54 $exif_string .= $meta[image_meta][credit]; 55 } 56 57 if( !empty($exif_string) ) { 58 $form_fields['exif'] = array ( 59 'label' => __('EXIF'), 60 'input' => 'html', 61 'html' => $exif_string 62 ); 63 } 64 return $form_fields; 65 } 66 add_filter('attachment_fields_to_edit', 'display_exif_in_attachment_modal', 10 , 2); 67 41 68 endif; -
photographers-galleries/trunk/photographers-galleries.php
r2605796 r2615765 15 15 * Plugin URI: https://wordpress.org/plugins/photographers-galleries/ 16 16 * Description: Enhance your galleries with HTML5, metadata, dynamic galleries and add a lightweight carousel to display a sequence of pictures without distractions. 17 * Version: 1.0. 817 * Version: 1.0.9 18 18 * Author: Aurélien PIERRE 19 19 * Author URI: https://photo.aurelienpierre.com … … 43 43 44 44 function register_pg_styles() { 45 wp_register_style('pg-css', plugin_dir_url( __FILE__ ).'css/pg-style.min.css', array(), '1.0. 8');46 wp_register_script('pg-js', plugin_dir_url( __FILE__ ).'js/pg-script.min.js', array(), '1.0. 8', true);45 wp_register_style('pg-css', plugin_dir_url( __FILE__ ).'css/pg-style.min.css', array(), '1.0.9'); 46 wp_register_script('pg-js', plugin_dir_url( __FILE__ ).'js/pg-script.min.js', array(), '1.0.9', true); 47 47 } 48 48 … … 194 194 ) ); 195 195 } 196 197 // Use a quality setting of 90 for WebP images. 198 // 75 is clearly not enough for photographs. 199 function filter_webp_quality( $quality, $mime_type ) { 200 if ( 'image/webp' === $mime_type ) { 201 return 90; 202 } 203 return $quality; 204 } 205 add_filter( 'wp_editor_set_quality', 'filter_webp_quality', 10, 2 ); -
photographers-galleries/trunk/readme.txt
r2605796 r2615765 257 257 == Changelog == 258 258 259 = 1.0.9 = 260 261 Add EXIF metadata display in media view. 262 Force WebP thumbnails to quality = 90 because WP default (quality = 75) shows posterization in smooth gradients 263 259 264 = 1.0.8 = 260 265
Note: See TracChangeset
for help on using the changeset viewer.