Changeset 2713694
- Timestamp:
- 04/23/2022 12:22:15 PM (4 years ago)
- Location:
- fiber-admin
- Files:
-
- 13 edited
- 1 copied
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
assets/screenshot-3.png (modified) (previous)
-
assets/screenshot-4.png (modified) (previous)
-
assets/screenshot-5.png (modified) (previous)
-
tags/2.0.3 (copied) (copied from fiber-admin/trunk)
-
tags/2.0.3/changelog.txt (modified) (1 diff)
-
tags/2.0.3/fiberadmin.php (modified) (2 diffs)
-
tags/2.0.3/includes/image.php (modified) (7 diffs)
-
tags/2.0.3/readme.txt (modified) (3 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/fiberadmin.php (modified) (2 diffs)
-
trunk/includes/image.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fiber-admin/tags/2.0.3/changelog.txt
r2707981 r2713694 1 1 == Changelog == 2 3 = 2.0.3 = 4 *Release Date - 23 April 2022* 5 6 * Fixed: Round up image size for SVG to be valid with W3C rule. 2 7 3 8 = 2.0.2 = -
fiber-admin/tags/2.0.3/fiberadmin.php
r2707981 r2713694 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. 26 * Version: 2.0.3 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.0 … … 26 26 */ 27 27 28 const FIBERADMIN_VERSION = '2.0. 2';28 const FIBERADMIN_VERSION = '2.0.3'; 29 29 const FIBERADMIN_DEV_MODE = false; 30 30 const FIBERADMIN_FILENAME = __FILE__; -
fiber-admin/tags/2.0.3/includes/image.php
r2659242 r2713694 46 46 // SVG metadata 47 47 add_filter('wp_get_attachment_metadata', array($this, 'fiad_svg_attachment_metadata'), 10, 2); 48 add_filter('wp_generate_attachment_metadata', array($this, 'fiad_svg_attachment_metadata'), 10, 2); 48 49 // Fix the output of images using wp_get_attachment_image 49 50 add_filter('wp_get_attachment_image_attributes', array($this, 'fiad_svg_image_attributes'), 10, 3); … … 51 52 } 52 53 53 public function fiad_svg_enqueue_scripts( $hook_suffix){54 public function fiad_svg_enqueue_scripts(){ 54 55 $screen = get_current_screen(); 55 56 if($screen->id == 'upload'){ … … 127 128 //then get the attributes from xml. 128 129 if(empty($data) || empty($data['width']) || empty($data['height'])){ 129 $xml = simplexml_load_file(wp_get_attachment_url($id)); 130 $attr = $xml->attributes(); 131 $viewbox = explode(' ', $attr->viewBox); 132 $data['width'] = isset($attr->width) && preg_match('/\d+/', $attr->width, $value) ? (int) $value[0] : (count($viewbox) == 4 ? (int) $viewbox[2] : null); 133 $data['height'] = isset($attr->height) && preg_match('/\d+/', $attr->height, $value) ? (int) $value[0] : (count($viewbox) == 4 ? (int) $viewbox[3] : null); 130 $xml = simplexml_load_file(wp_get_attachment_url($id)); 131 $attr = $xml->attributes(); 132 $viewbox = explode(' ', $attr->viewBox); 133 $width = isset($attr->width) && preg_match('/\d+/', $attr->width, $value) ? (int) $value[0] : (count($viewbox) == 4 ? (int) $viewbox[2] : null); 134 $height = isset($attr->height) && preg_match('/\d+/', $attr->height, $value) ? (int) $value[0] : (count($viewbox) == 4 ? (int) $viewbox[3] : null); 135 136 $data['width'] = ceil($width); 137 $data['height'] = ceil($height); 134 138 } 135 139 } … … 138 142 } 139 143 140 public function fiad_svg_image_attributes($attr, $attachment, $size = 'thumbnail'){144 public function fiad_svg_image_attributes($attr, $attachment, $size){ 141 145 142 146 // If we're not getting a WP_Post object, bail early. … … 158 162 } 159 163 160 $attr['height'] = $default_height;161 $attr['width'] = $default_width;164 $attr['height'] = ceil($default_height); 165 $attr['width'] = ceil($default_width); 162 166 } 163 167 … … 171 175 if($svg){ 172 176 $attributes = $svg->attributes(); 173 if(isset($attributes->width, $attributes->height) && is_numeric($attributes->width) && is_numeric($attributes->height)){177 if(isset($attributes->width, $attributes->height)){ 174 178 $width = floatval($attributes->width); 175 179 $height = floatval($attributes->height); … … 186 190 187 191 return array( 188 'width' => $width,189 'height' => $height,192 'width' => ceil($width), 193 'height' => ceil($height), 190 194 'orientation' => ($width > $height) ? 'landscape' : 'portrait' 191 195 ); -
fiber-admin/tags/2.0.3/readme.txt
r2707981 r2713694 3 3 Tags: white label, admin tool, duplicate post, content protection 4 4 Requires at least: 4.7 5 Tested up to: 5.9. 15 Tested up to: 5.9.3 6 6 Requires PHP: 7.0 7 Stable tag: 2.0. 27 Stable tag: 2.0.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 29 29 = Why can't I save the settings for Customized WordPress Database Error page? = 30 30 31 At the first time using this setting, Fiber Admin will ask you to save it to create the db-error.php file. When your site has some security plugins like iThemes Security or Wordfence Security..., these plugins will have an option to prevent file editor. All you need is disable this option temporarily and save the Fiber Admin Database Error first, then you can activate the option to disable File Editor in security plugins.31 At the first time using this setting, Fiber Admin will ask you to save it to create the db-error.php file. When your site has some security plugins like Sucuri or Wordfence Security..., these plugins will have an option to prevent file editor. All you need is whitelist wp-content/db-error.php from plugin setting. 32 32 33 33 == Installation == … … 47 47 == Changelog == 48 48 49 = 2.0. 2=50 *Release Date - 11April 2022*49 = 2.0.3 = 50 *Release Date - 23 April 2022* 51 51 52 * Changed: Update require PHP version to 7.0.52 * Fixed: Round up image size for SVG to be valid with W3C rule. -
fiber-admin/trunk/changelog.txt
r2707981 r2713694 1 1 == Changelog == 2 3 = 2.0.3 = 4 *Release Date - 23 April 2022* 5 6 * Fixed: Round up image size for SVG to be valid with W3C rule. 2 7 3 8 = 2.0.2 = -
fiber-admin/trunk/fiberadmin.php
r2707981 r2713694 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. 26 * Version: 2.0.3 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.0 … … 26 26 */ 27 27 28 const FIBERADMIN_VERSION = '2.0. 2';28 const FIBERADMIN_VERSION = '2.0.3'; 29 29 const FIBERADMIN_DEV_MODE = false; 30 30 const FIBERADMIN_FILENAME = __FILE__; -
fiber-admin/trunk/includes/image.php
r2659242 r2713694 46 46 // SVG metadata 47 47 add_filter('wp_get_attachment_metadata', array($this, 'fiad_svg_attachment_metadata'), 10, 2); 48 add_filter('wp_generate_attachment_metadata', array($this, 'fiad_svg_attachment_metadata'), 10, 2); 48 49 // Fix the output of images using wp_get_attachment_image 49 50 add_filter('wp_get_attachment_image_attributes', array($this, 'fiad_svg_image_attributes'), 10, 3); … … 51 52 } 52 53 53 public function fiad_svg_enqueue_scripts( $hook_suffix){54 public function fiad_svg_enqueue_scripts(){ 54 55 $screen = get_current_screen(); 55 56 if($screen->id == 'upload'){ … … 127 128 //then get the attributes from xml. 128 129 if(empty($data) || empty($data['width']) || empty($data['height'])){ 129 $xml = simplexml_load_file(wp_get_attachment_url($id)); 130 $attr = $xml->attributes(); 131 $viewbox = explode(' ', $attr->viewBox); 132 $data['width'] = isset($attr->width) && preg_match('/\d+/', $attr->width, $value) ? (int) $value[0] : (count($viewbox) == 4 ? (int) $viewbox[2] : null); 133 $data['height'] = isset($attr->height) && preg_match('/\d+/', $attr->height, $value) ? (int) $value[0] : (count($viewbox) == 4 ? (int) $viewbox[3] : null); 130 $xml = simplexml_load_file(wp_get_attachment_url($id)); 131 $attr = $xml->attributes(); 132 $viewbox = explode(' ', $attr->viewBox); 133 $width = isset($attr->width) && preg_match('/\d+/', $attr->width, $value) ? (int) $value[0] : (count($viewbox) == 4 ? (int) $viewbox[2] : null); 134 $height = isset($attr->height) && preg_match('/\d+/', $attr->height, $value) ? (int) $value[0] : (count($viewbox) == 4 ? (int) $viewbox[3] : null); 135 136 $data['width'] = ceil($width); 137 $data['height'] = ceil($height); 134 138 } 135 139 } … … 138 142 } 139 143 140 public function fiad_svg_image_attributes($attr, $attachment, $size = 'thumbnail'){144 public function fiad_svg_image_attributes($attr, $attachment, $size){ 141 145 142 146 // If we're not getting a WP_Post object, bail early. … … 158 162 } 159 163 160 $attr['height'] = $default_height;161 $attr['width'] = $default_width;164 $attr['height'] = ceil($default_height); 165 $attr['width'] = ceil($default_width); 162 166 } 163 167 … … 171 175 if($svg){ 172 176 $attributes = $svg->attributes(); 173 if(isset($attributes->width, $attributes->height) && is_numeric($attributes->width) && is_numeric($attributes->height)){177 if(isset($attributes->width, $attributes->height)){ 174 178 $width = floatval($attributes->width); 175 179 $height = floatval($attributes->height); … … 186 190 187 191 return array( 188 'width' => $width,189 'height' => $height,192 'width' => ceil($width), 193 'height' => ceil($height), 190 194 'orientation' => ($width > $height) ? 'landscape' : 'portrait' 191 195 ); -
fiber-admin/trunk/readme.txt
r2707981 r2713694 3 3 Tags: white label, admin tool, duplicate post, content protection 4 4 Requires at least: 4.7 5 Tested up to: 5.9. 15 Tested up to: 5.9.3 6 6 Requires PHP: 7.0 7 Stable tag: 2.0. 27 Stable tag: 2.0.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 29 29 = Why can't I save the settings for Customized WordPress Database Error page? = 30 30 31 At the first time using this setting, Fiber Admin will ask you to save it to create the db-error.php file. When your site has some security plugins like iThemes Security or Wordfence Security..., these plugins will have an option to prevent file editor. All you need is disable this option temporarily and save the Fiber Admin Database Error first, then you can activate the option to disable File Editor in security plugins.31 At the first time using this setting, Fiber Admin will ask you to save it to create the db-error.php file. When your site has some security plugins like Sucuri or Wordfence Security..., these plugins will have an option to prevent file editor. All you need is whitelist wp-content/db-error.php from plugin setting. 32 32 33 33 == Installation == … … 47 47 == Changelog == 48 48 49 = 2.0. 2=50 *Release Date - 11April 2022*49 = 2.0.3 = 50 *Release Date - 23 April 2022* 51 51 52 * Changed: Update require PHP version to 7.0.52 * Fixed: Round up image size for SVG to be valid with W3C rule.
Note: See TracChangeset
for help on using the changeset viewer.