Changeset 2659826
- Timestamp:
- 01/19/2022 08:06:41 AM (4 years ago)
- Location:
- featured-favicons
- Files:
-
- 4 edited
- 1 copied
-
tags/1.2 (copied) (copied from featured-favicons/trunk)
-
tags/1.2/featured-favicons.php (modified) (5 diffs)
-
tags/1.2/readme.txt (modified) (2 diffs)
-
trunk/featured-favicons.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
featured-favicons/tags/1.2/featured-favicons.php
r1306139 r2659826 6 6 Author: Claude Vedovini 7 7 Author URI: http://vdvn.me/ 8 Version: 1. 1.18 Version: 1.2 9 9 Text Domain: featured-favicons 10 10 Domain Path: /languages … … 41 41 function ff_init() { 42 42 add_image_size('favicon', 64, 64, true); 43 add_image_size('apple-touch-icon', 180, 180, true); 43 44 add_action('wp_head', 'ff_head'); 44 45 … … 79 80 if (!empty($thumb_url)) { 80 81 echo "<link rel=\"shortcut icon\" href=\"$thumb_url\" type=\"$thumb_mime\" />"; 82 83 if (get_option('ff_favicon_as_apple_touch_icon')) { 84 $thumb_src = wp_get_attachment_image_src($thumb_id, 'apple-touch-icon'); 85 $thumb_url = $thumb_src[0]; 86 if (!empty($thumb_url)) echo "<link rel=\"apple-touch-icon\" href=\"$thumb_url\" />"; 87 } 81 88 } 82 89 } … … 129 136 add_settings_field('ff_use_as_default_image', __('Use as default featured image', 'featured-favicons'), 130 137 'ff_use_as_default_image_field', 'featured-favicons', 'default'); 138 139 register_setting('featured-favicons', 'ff_favicon_as_apple_touch_icon'); 140 add_settings_field('ff_favicon_as_apple_touch_icon', __('Favicon as Apple Touch icon', 'featured-favicons'), 141 'ff_favicon_as_apple_touch_icon_field', 'featured-favicons', 'default'); 131 142 } 132 143 … … 196 207 value="1" <?php checked(get_option('ff_use_as_default_image')); ?> /> 197 208 <?php _e('Check this option if you also want to use that image as the default featured image.', 'featured-favicons') ?></label><?php 209 } 210 211 function ff_favicon_as_apple_touch_icon_field() { ?> 212 <label><input type="checkbox" name="ff_favicon_as_apple_touch_icon" 213 value="1" <?php checked(get_option('ff_favicon_as_apple_touch_icon')); ?> /> 214 <?php _e('Check this option if you want to use the favicon as a page\'s icon on Apple touch devices.', 'featured-favicons') ?></label><?php 198 215 } 199 216 -
featured-favicons/tags/1.2/readme.txt
r1876890 r2659826 5 5 Tags: featured image,favicon,icon 6 6 Requires at least: 2.7 7 Tested up to: 4.98 Stable tag: 1. 1.17 Tested up to: 5.8.3 8 Stable tag: 1.2 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 29 29 == Changelog == 30 30 31 = Version 1.2 = 32 - Added option for Apple Touch icon 33 31 34 = Version 1.1.1 = 32 35 - Preparing for language packs -
featured-favicons/trunk/featured-favicons.php
r1306139 r2659826 6 6 Author: Claude Vedovini 7 7 Author URI: http://vdvn.me/ 8 Version: 1. 1.18 Version: 1.2 9 9 Text Domain: featured-favicons 10 10 Domain Path: /languages … … 41 41 function ff_init() { 42 42 add_image_size('favicon', 64, 64, true); 43 add_image_size('apple-touch-icon', 180, 180, true); 43 44 add_action('wp_head', 'ff_head'); 44 45 … … 79 80 if (!empty($thumb_url)) { 80 81 echo "<link rel=\"shortcut icon\" href=\"$thumb_url\" type=\"$thumb_mime\" />"; 82 83 if (get_option('ff_favicon_as_apple_touch_icon')) { 84 $thumb_src = wp_get_attachment_image_src($thumb_id, 'apple-touch-icon'); 85 $thumb_url = $thumb_src[0]; 86 if (!empty($thumb_url)) echo "<link rel=\"apple-touch-icon\" href=\"$thumb_url\" />"; 87 } 81 88 } 82 89 } … … 129 136 add_settings_field('ff_use_as_default_image', __('Use as default featured image', 'featured-favicons'), 130 137 'ff_use_as_default_image_field', 'featured-favicons', 'default'); 138 139 register_setting('featured-favicons', 'ff_favicon_as_apple_touch_icon'); 140 add_settings_field('ff_favicon_as_apple_touch_icon', __('Favicon as Apple Touch icon', 'featured-favicons'), 141 'ff_favicon_as_apple_touch_icon_field', 'featured-favicons', 'default'); 131 142 } 132 143 … … 196 207 value="1" <?php checked(get_option('ff_use_as_default_image')); ?> /> 197 208 <?php _e('Check this option if you also want to use that image as the default featured image.', 'featured-favicons') ?></label><?php 209 } 210 211 function ff_favicon_as_apple_touch_icon_field() { ?> 212 <label><input type="checkbox" name="ff_favicon_as_apple_touch_icon" 213 value="1" <?php checked(get_option('ff_favicon_as_apple_touch_icon')); ?> /> 214 <?php _e('Check this option if you want to use the favicon as a page\'s icon on Apple touch devices.', 'featured-favicons') ?></label><?php 198 215 } 199 216 -
featured-favicons/trunk/readme.txt
r1876890 r2659826 5 5 Tags: featured image,favicon,icon 6 6 Requires at least: 2.7 7 Tested up to: 4.98 Stable tag: 1. 1.17 Tested up to: 5.8.3 8 Stable tag: 1.2 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 29 29 == Changelog == 30 30 31 = Version 1.2 = 32 - Added option for Apple Touch icon 33 31 34 = Version 1.1.1 = 32 35 - Preparing for language packs
Note: See TracChangeset
for help on using the changeset viewer.