Changeset 2723306
- Timestamp:
- 05/13/2022 11:11:51 AM (4 years ago)
- Location:
- fiber-admin
- Files:
-
- 8 edited
- 1 copied
-
tags/2.0.6 (copied) (copied from fiber-admin/trunk)
-
tags/2.0.6/changelog.txt (modified) (1 diff)
-
tags/2.0.6/fiberadmin.php (modified) (2 diffs)
-
tags/2.0.6/includes/image.php (modified) (2 diffs)
-
tags/2.0.6/readme.txt (modified) (2 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/fiberadmin.php (modified) (2 diffs)
-
trunk/includes/image.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fiber-admin/tags/2.0.6/changelog.txt
r2715179 r2723306 1 1 == Changelog == 2 3 = 2.0.6 = 4 *Release Date - 13 May 2022* 5 6 * Fixed: Fix duplicate width height attribute for SVG images. 2 7 3 8 = 2.0.5 = -
fiber-admin/tags/2.0.6/fiberadmin.php
r2715179 r2723306 4 4 * Plugin URI: https://wordpress.org/plugins/fiber-admin/ 5 5 * Description: 💈 Bring multiple customization features to make your own WordPress admin. 6 * Version: 2.0. 56 * Version: 2.0.6 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.0 … … 26 26 */ 27 27 28 const FIBERADMIN_VERSION = '2.0. 5';28 const FIBERADMIN_VERSION = '2.0.6'; 29 29 const FIBERADMIN_DEV_MODE = false; 30 30 const FIBERADMIN_FILENAME = __FILE__; -
fiber-admin/tags/2.0.6/includes/image.php
r2715179 r2723306 47 47 add_filter('wp_get_attachment_metadata', array($this, 'fiad_svg_attachment_metadata'), 10, 2); 48 48 add_filter('wp_generate_attachment_metadata', array($this, 'fiad_svg_attachment_metadata'), 10, 2); 49 // Fix the output of images using wp_get_attachment_image50 add_filter('wp_get_attachment_image_attributes', array($this, 'fiad_svg_image_attributes'), 10, 3);51 49 } 52 50 } … … 142 140 } 143 141 144 public function fiad_svg_image_attributes($attr, $attachment, $size){145 146 // If we're not getting a WP_Post object, bail early.147 // @see https://wordpress.org/support/topic/notice-trying-to-get-property-id/148 if(!$attachment instanceof WP_Post){149 return $attr;150 }151 152 $mime = get_post_mime_type($attachment->ID);153 if('image/svg+xml' === $mime){154 $default_height = 100;155 $default_width = 100;156 157 $dimensions = $this->fiad_get_svg_dimensions(get_attached_file($attachment->ID));158 159 if($dimensions){160 $default_height = $dimensions['height'];161 $default_width = $dimensions['width'];162 }163 164 $attr['height'] = ceil($default_height);165 $attr['width'] = ceil($default_width);166 }167 168 return $attr;169 }170 171 142 protected function fiad_get_svg_dimensions($svg){ 172 143 $svg = @simplexml_load_file($svg); -
fiber-admin/tags/2.0.6/readme.txt
r2715179 r2723306 5 5 Tested up to: 5.9.3 6 6 Requires PHP: 7.0 7 Stable tag: 2.0. 57 Stable tag: 2.0.6 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 47 47 == Changelog == 48 48 49 = 2.0. 5=50 *Release Date - 27 April2022*49 = 2.0.6 = 50 *Release Date - 13 May 2022* 51 51 52 * Fixed: Fix conflicts with SVG Support plugin.52 * Fixed: Fix duplicate width height attribute for SVG images. -
fiber-admin/trunk/changelog.txt
r2715179 r2723306 1 1 == Changelog == 2 3 = 2.0.6 = 4 *Release Date - 13 May 2022* 5 6 * Fixed: Fix duplicate width height attribute for SVG images. 2 7 3 8 = 2.0.5 = -
fiber-admin/trunk/fiberadmin.php
r2715179 r2723306 4 4 * Plugin URI: https://wordpress.org/plugins/fiber-admin/ 5 5 * Description: 💈 Bring multiple customization features to make your own WordPress admin. 6 * Version: 2.0. 56 * Version: 2.0.6 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.0 … … 26 26 */ 27 27 28 const FIBERADMIN_VERSION = '2.0. 5';28 const FIBERADMIN_VERSION = '2.0.6'; 29 29 const FIBERADMIN_DEV_MODE = false; 30 30 const FIBERADMIN_FILENAME = __FILE__; -
fiber-admin/trunk/includes/image.php
r2715179 r2723306 47 47 add_filter('wp_get_attachment_metadata', array($this, 'fiad_svg_attachment_metadata'), 10, 2); 48 48 add_filter('wp_generate_attachment_metadata', array($this, 'fiad_svg_attachment_metadata'), 10, 2); 49 // Fix the output of images using wp_get_attachment_image50 add_filter('wp_get_attachment_image_attributes', array($this, 'fiad_svg_image_attributes'), 10, 3);51 49 } 52 50 } … … 142 140 } 143 141 144 public function fiad_svg_image_attributes($attr, $attachment, $size){145 146 // If we're not getting a WP_Post object, bail early.147 // @see https://wordpress.org/support/topic/notice-trying-to-get-property-id/148 if(!$attachment instanceof WP_Post){149 return $attr;150 }151 152 $mime = get_post_mime_type($attachment->ID);153 if('image/svg+xml' === $mime){154 $default_height = 100;155 $default_width = 100;156 157 $dimensions = $this->fiad_get_svg_dimensions(get_attached_file($attachment->ID));158 159 if($dimensions){160 $default_height = $dimensions['height'];161 $default_width = $dimensions['width'];162 }163 164 $attr['height'] = ceil($default_height);165 $attr['width'] = ceil($default_width);166 }167 168 return $attr;169 }170 171 142 protected function fiad_get_svg_dimensions($svg){ 172 143 $svg = @simplexml_load_file($svg); -
fiber-admin/trunk/readme.txt
r2715179 r2723306 5 5 Tested up to: 5.9.3 6 6 Requires PHP: 7.0 7 Stable tag: 2.0. 57 Stable tag: 2.0.6 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 47 47 == Changelog == 48 48 49 = 2.0. 5=50 *Release Date - 27 April2022*49 = 2.0.6 = 50 *Release Date - 13 May 2022* 51 51 52 * Fixed: Fix conflicts with SVG Support plugin.52 * Fixed: Fix duplicate width height attribute for SVG images.
Note: See TracChangeset
for help on using the changeset viewer.