Changeset 1586810
- Timestamp:
- 02/01/2017 09:49:35 PM (9 years ago)
- Location:
- display-all-image-sizes/trunk
- Files:
-
- 2 edited
-
display-all-image-sizes.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
display-all-image-sizes/trunk/display-all-image-sizes.php
r1218226 r1586810 4 4 Description: Displays all sizes of each image, including name, dimensions, and permalink for each size. A major time-saver if you frequently use custom-generated image sizes. 5 5 Author: Press Up 6 Version: 1.1. 36 Version: 1.1.4 7 7 Author URI: http://pressupinc.com/ 8 8 Text Domain: display-all-image-sizes … … 102 102 return $size_data_html; 103 103 } 104 105 // Register the three useful image sizes for use in Add Media modal 106 add_filter( 'image_size_names_choose', 'wpshout_custom_sizes' ); 107 function wpshout_custom_sizes( $sizes ) { 108 global $post; 109 $size_names = get_intermediate_image_sizes( $post->ID ); 110 111 $size_merge = []; 112 foreach( $size_names as $size ) { 113 $size_merge[$size] = wpshout_deslug( $size ); 114 } 115 116 return array_merge( $sizes, $size_merge ); 117 } 118 119 function wpshout_deslug( $string ) { 120 return ucwords( str_replace( '-', ' ', $string ) ); 121 } -
display-all-image-sizes/trunk/readme.txt
r1218226 r1586810 4 4 Requires at least: 3.5 5 5 Tested up to: 4.2.4 6 Stable tag: 1.1. 36 Stable tag: 1.1.4 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/MIT … … 52 52 == CHANGELOG == 53 53 54 = 1.1.4 (02.01.2017) = 55 Added all sizes directly to "Attachment Display Settings" dialog 56 54 57 = 1.1.3 (11.08.2015) = 55 58 Styling cleanup
Note: See TracChangeset
for help on using the changeset viewer.