Version Description
Download this release
Release Info
| Developer | themeisle |
| Plugin | |
| Version | 0.12.8 |
| Comparing to | |
| See all releases | |
Code changes from version 0.12.7 to 0.12.8
- CHANGELOG.md +4 -0
- includes/front.php +17 -6
- menu-icons.php +2 -2
- readme.txt +7 -0
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +6 -6
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.php +6 -6
CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
##### [Version 0.12.7](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.6...v0.12.7) (2021-05-07)
|
| 2 |
|
| 3 |
Fix PHP fatal error when uploading SVG with the image uploader
|
| 1 |
+
##### [Version 0.12.8](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.7...v0.12.8) (2021-05-12)
|
| 2 |
+
|
| 3 |
+
* Fix issue when the image is not accessible to fetch the width/height metadata.
|
| 4 |
+
|
| 5 |
##### [Version 0.12.7](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.6...v0.12.7) (2021-05-07)
|
| 6 |
|
| 7 |
Fix PHP fatal error when uploading SVG with the image uploader
|
includes/front.php
CHANGED
|
@@ -421,12 +421,17 @@ final class Menu_Icons_Front_End {
|
|
| 421 |
$style = self::get_icon_style( $meta, array( 'svg_width', 'vertical_align' ) );
|
| 422 |
|
| 423 |
$svg_icon = esc_url( wp_get_attachment_url( $meta['icon'] ) );
|
| 424 |
-
$
|
| 425 |
-
$
|
| 426 |
-
$height = 0;
|
| 427 |
if ( 'image/svg+xml' === get_post_mime_type( $meta['icon'] ) ) {
|
| 428 |
-
|
| 429 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 430 |
if ( $svg_icon_content ) {
|
| 431 |
$xmlget = simplexml_load_string( $svg_icon_content );
|
| 432 |
$xmlattributes = $xmlget->attributes();
|
|
@@ -442,8 +447,14 @@ final class Menu_Icons_Front_End {
|
|
| 442 |
$height = isset( $attachment_meta['height'] ) ? $attachment_meta['height'] : $height;
|
| 443 |
}
|
| 444 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 445 |
return sprintf(
|
| 446 |
-
'<img src="%s" class="%s" aria-hidden="true"
|
| 447 |
esc_url( wp_get_attachment_url( $meta['icon'] ) ),
|
| 448 |
esc_attr( $classes ),
|
| 449 |
$width,
|
| 421 |
$style = self::get_icon_style( $meta, array( 'svg_width', 'vertical_align' ) );
|
| 422 |
|
| 423 |
$svg_icon = esc_url( wp_get_attachment_url( $meta['icon'] ) );
|
| 424 |
+
$width = '';
|
| 425 |
+
$height = '';
|
|
|
|
| 426 |
if ( 'image/svg+xml' === get_post_mime_type( $meta['icon'] ) ) {
|
| 427 |
+
|
| 428 |
+
// Check `WP_Filesystem` function exists OR not.
|
| 429 |
+
require_once ABSPATH . '/wp-admin/includes/file.php';
|
| 430 |
+
\WP_Filesystem();
|
| 431 |
+
global $wp_filesystem;
|
| 432 |
+
|
| 433 |
+
$svg_icon = get_attached_file( $meta['icon'] );
|
| 434 |
+
$svg_icon_content = $wp_filesystem->get_contents( $svg_icon );
|
| 435 |
if ( $svg_icon_content ) {
|
| 436 |
$xmlget = simplexml_load_string( $svg_icon_content );
|
| 437 |
$xmlattributes = $xmlget->attributes();
|
| 447 |
$height = isset( $attachment_meta['height'] ) ? $attachment_meta['height'] : $height;
|
| 448 |
}
|
| 449 |
}
|
| 450 |
+
if ( ! empty( $width ) ) {
|
| 451 |
+
$width = sprintf( ' width="%dpx"', $width );
|
| 452 |
+
}
|
| 453 |
+
if ( ! empty( $height ) ) {
|
| 454 |
+
$height = sprintf( ' height="%dpx"', $height );
|
| 455 |
+
}
|
| 456 |
return sprintf(
|
| 457 |
+
'<img src="%s" class="%s" aria-hidden="true"%s%s%s/>',
|
| 458 |
esc_url( wp_get_attachment_url( $meta['icon'] ) ),
|
| 459 |
esc_attr( $classes ),
|
| 460 |
$width,
|
menu-icons.php
CHANGED
|
@@ -11,7 +11,7 @@
|
|
| 11 |
* Plugin name: Menu Icons
|
| 12 |
* Plugin URI: https://github.com/Codeinwp/wp-menu-icons
|
| 13 |
* Description: Spice up your navigation menus with pretty icons, easily.
|
| 14 |
-
* Version: 0.12.
|
| 15 |
* Author: ThemeIsle
|
| 16 |
* Author URI: https://themeisle.com
|
| 17 |
* License: GPLv2
|
|
@@ -27,7 +27,7 @@
|
|
| 27 |
*/
|
| 28 |
final class Menu_Icons {
|
| 29 |
|
| 30 |
-
const VERSION = '0.12.
|
| 31 |
|
| 32 |
/**
|
| 33 |
* Holds plugin data
|
| 11 |
* Plugin name: Menu Icons
|
| 12 |
* Plugin URI: https://github.com/Codeinwp/wp-menu-icons
|
| 13 |
* Description: Spice up your navigation menus with pretty icons, easily.
|
| 14 |
+
* Version: 0.12.8
|
| 15 |
* Author: ThemeIsle
|
| 16 |
* Author URI: https://themeisle.com
|
| 17 |
* License: GPLv2
|
| 27 |
*/
|
| 28 |
final class Menu_Icons {
|
| 29 |
|
| 30 |
+
const VERSION = '0.12.8';
|
| 31 |
|
| 32 |
/**
|
| 33 |
* Holds plugin data
|
readme.txt
CHANGED
|
@@ -225,6 +225,13 @@ Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
|
|
| 225 |
|
| 226 |
== Changelog ==
|
| 227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
##### [Version 0.12.7](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.6...v0.12.7) (2021-05-07)
|
| 229 |
|
| 230 |
Fix PHP fatal error when uploading SVG with the image uploader
|
| 225 |
|
| 226 |
== Changelog ==
|
| 227 |
|
| 228 |
+
##### [Version 0.12.8](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.7...v0.12.8) (2021-05-12)
|
| 229 |
+
|
| 230 |
+
* Fix issue when the image is not accessible to fetch the width/height metadata.
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
|
| 235 |
##### [Version 0.12.7](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.6...v0.12.7) (2021-05-07)
|
| 236 |
|
| 237 |
Fix PHP fatal error when uploading SVG with the image uploader
|
vendor/autoload.php
CHANGED
|
@@ -4,4 +4,4 @@
|
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 6 |
|
| 7 |
-
return
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 6 |
|
| 7 |
+
return ComposerAutoloaderInit45b19aab4a02085424168fe90bd9d9df::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
|
@@ -27,12 +27,12 @@ class InstalledVersions
|
|
| 27 |
private static $installed = array (
|
| 28 |
'root' =>
|
| 29 |
array (
|
| 30 |
-
'pretty_version' => 'v0.12.
|
| 31 |
-
'version' => '0.12.
|
| 32 |
'aliases' =>
|
| 33 |
array (
|
| 34 |
),
|
| 35 |
-
'reference' => '
|
| 36 |
'name' => 'codeinwp/wp-menu-icons',
|
| 37 |
),
|
| 38 |
'versions' =>
|
|
@@ -78,12 +78,12 @@ private static $installed = array (
|
|
| 78 |
),
|
| 79 |
'codeinwp/wp-menu-icons' =>
|
| 80 |
array (
|
| 81 |
-
'pretty_version' => 'v0.12.
|
| 82 |
-
'version' => '0.12.
|
| 83 |
'aliases' =>
|
| 84 |
array (
|
| 85 |
),
|
| 86 |
-
'reference' => '
|
| 87 |
),
|
| 88 |
'composer/installers' =>
|
| 89 |
array (
|
| 27 |
private static $installed = array (
|
| 28 |
'root' =>
|
| 29 |
array (
|
| 30 |
+
'pretty_version' => 'v0.12.8',
|
| 31 |
+
'version' => '0.12.8.0',
|
| 32 |
'aliases' =>
|
| 33 |
array (
|
| 34 |
),
|
| 35 |
+
'reference' => 'f61cb2a3f967814d168c9a2a7725bbad1d26859a',
|
| 36 |
'name' => 'codeinwp/wp-menu-icons',
|
| 37 |
),
|
| 38 |
'versions' =>
|
| 78 |
),
|
| 79 |
'codeinwp/wp-menu-icons' =>
|
| 80 |
array (
|
| 81 |
+
'pretty_version' => 'v0.12.8',
|
| 82 |
+
'version' => '0.12.8.0',
|
| 83 |
'aliases' =>
|
| 84 |
array (
|
| 85 |
),
|
| 86 |
+
'reference' => 'f61cb2a3f967814d168c9a2a7725bbad1d26859a',
|
| 87 |
),
|
| 88 |
'composer/installers' =>
|
| 89 |
array (
|
vendor/composer/autoload_real.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
-
class
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInita0c8e595536034e79d3abf34436c776b
|
|
| 22 |
return self::$loader;
|
| 23 |
}
|
| 24 |
|
| 25 |
-
spl_autoload_register(array('
|
| 26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
| 27 |
-
spl_autoload_unregister(array('
|
| 28 |
|
| 29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
| 30 |
if ($useStaticLoader) {
|
| 31 |
require __DIR__ . '/autoload_static.php';
|
| 32 |
|
| 33 |
-
call_user_func(\Composer\Autoload\
|
| 34 |
} else {
|
| 35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 36 |
foreach ($map as $namespace => $path) {
|
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInita0c8e595536034e79d3abf34436c776b
|
|
| 51 |
$loader->register(true);
|
| 52 |
|
| 53 |
if ($useStaticLoader) {
|
| 54 |
-
$includeFiles = Composer\Autoload\
|
| 55 |
} else {
|
| 56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 57 |
}
|
| 58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 59 |
-
|
| 60 |
}
|
| 61 |
|
| 62 |
return $loader;
|
| 63 |
}
|
| 64 |
}
|
| 65 |
|
| 66 |
-
function
|
| 67 |
{
|
| 68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 69 |
require $file;
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
+
class ComposerAutoloaderInit45b19aab4a02085424168fe90bd9d9df
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
| 22 |
return self::$loader;
|
| 23 |
}
|
| 24 |
|
| 25 |
+
spl_autoload_register(array('ComposerAutoloaderInit45b19aab4a02085424168fe90bd9d9df', 'loadClassLoader'), true, true);
|
| 26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
| 27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit45b19aab4a02085424168fe90bd9d9df', 'loadClassLoader'));
|
| 28 |
|
| 29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
| 30 |
if ($useStaticLoader) {
|
| 31 |
require __DIR__ . '/autoload_static.php';
|
| 32 |
|
| 33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit45b19aab4a02085424168fe90bd9d9df::getInitializer($loader));
|
| 34 |
} else {
|
| 35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 36 |
foreach ($map as $namespace => $path) {
|
| 51 |
$loader->register(true);
|
| 52 |
|
| 53 |
if ($useStaticLoader) {
|
| 54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit45b19aab4a02085424168fe90bd9d9df::$files;
|
| 55 |
} else {
|
| 56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 57 |
}
|
| 58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 59 |
+
composerRequire45b19aab4a02085424168fe90bd9d9df($fileIdentifier, $file);
|
| 60 |
}
|
| 61 |
|
| 62 |
return $loader;
|
| 63 |
}
|
| 64 |
}
|
| 65 |
|
| 66 |
+
function composerRequire45b19aab4a02085424168fe90bd9d9df($fileIdentifier, $file)
|
| 67 |
{
|
| 68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
namespace Composer\Autoload;
|
| 6 |
|
| 7 |
-
class
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'2c2d2fe92db4cd03403dbb108ac263b7' => __DIR__ . '/..' . '/codeinwp/gutenberg-menu-icons/load.php',
|
|
@@ -20,7 +20,7 @@ class ComposerStaticInita0c8e595536034e79d3abf34436c776b
|
|
| 20 |
public static function getInitializer(ClassLoader $loader)
|
| 21 |
{
|
| 22 |
return \Closure::bind(function () use ($loader) {
|
| 23 |
-
$loader->classMap =
|
| 24 |
|
| 25 |
}, null, ClassLoader::class);
|
| 26 |
}
|
| 4 |
|
| 5 |
namespace Composer\Autoload;
|
| 6 |
|
| 7 |
+
class ComposerStaticInit45b19aab4a02085424168fe90bd9d9df
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'2c2d2fe92db4cd03403dbb108ac263b7' => __DIR__ . '/..' . '/codeinwp/gutenberg-menu-icons/load.php',
|
| 20 |
public static function getInitializer(ClassLoader $loader)
|
| 21 |
{
|
| 22 |
return \Closure::bind(function () use ($loader) {
|
| 23 |
+
$loader->classMap = ComposerStaticInit45b19aab4a02085424168fe90bd9d9df::$classMap;
|
| 24 |
|
| 25 |
}, null, ClassLoader::class);
|
| 26 |
}
|
vendor/composer/installed.php
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
<?php return array (
|
| 2 |
'root' =>
|
| 3 |
array (
|
| 4 |
-
'pretty_version' => 'v0.12.
|
| 5 |
-
'version' => '0.12.
|
| 6 |
'aliases' =>
|
| 7 |
array (
|
| 8 |
),
|
| 9 |
-
'reference' => '
|
| 10 |
'name' => 'codeinwp/wp-menu-icons',
|
| 11 |
),
|
| 12 |
'versions' =>
|
|
@@ -52,12 +52,12 @@
|
|
| 52 |
),
|
| 53 |
'codeinwp/wp-menu-icons' =>
|
| 54 |
array (
|
| 55 |
-
'pretty_version' => 'v0.12.
|
| 56 |
-
'version' => '0.12.
|
| 57 |
'aliases' =>
|
| 58 |
array (
|
| 59 |
),
|
| 60 |
-
'reference' => '
|
| 61 |
),
|
| 62 |
'composer/installers' =>
|
| 63 |
array (
|
| 1 |
<?php return array (
|
| 2 |
'root' =>
|
| 3 |
array (
|
| 4 |
+
'pretty_version' => 'v0.12.8',
|
| 5 |
+
'version' => '0.12.8.0',
|
| 6 |
'aliases' =>
|
| 7 |
array (
|
| 8 |
),
|
| 9 |
+
'reference' => 'f61cb2a3f967814d168c9a2a7725bbad1d26859a',
|
| 10 |
'name' => 'codeinwp/wp-menu-icons',
|
| 11 |
),
|
| 12 |
'versions' =>
|
| 52 |
),
|
| 53 |
'codeinwp/wp-menu-icons' =>
|
| 54 |
array (
|
| 55 |
+
'pretty_version' => 'v0.12.8',
|
| 56 |
+
'version' => '0.12.8.0',
|
| 57 |
'aliases' =>
|
| 58 |
array (
|
| 59 |
),
|
| 60 |
+
'reference' => 'f61cb2a3f967814d168c9a2a7725bbad1d26859a',
|
| 61 |
),
|
| 62 |
'composer/installers' =>
|
| 63 |
array (
|
