Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | Menu Icons by ThemeIsle |
Version | 0.12.7 |
Comparing to | |
See all releases |
Code changes from version 0.12.6 to 0.12.7
- .releaserc.yml +0 -34
- CHANGELOG.md +4 -0
- includes/front.php +17 -7
- menu-icons.php +2 -2
- readme.txt +7 -3
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +9 -7
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.php +6 -6
.releaserc.yml
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
---
|
2 |
-
branch: master
|
3 |
-
plugins:
|
4 |
-
- - "@semantic-release/commit-analyzer"
|
5 |
-
- preset: simple-preset
|
6 |
-
releaseRules: conventional-changelog-simple-preset/release-rules
|
7 |
-
- - "@semantic-release/changelog"
|
8 |
-
- changelogFile: CHANGELOG.md
|
9 |
-
- - "@semantic-release/release-notes-generator"
|
10 |
-
- preset: simple-preset
|
11 |
-
- - "@semantic-release/exec"
|
12 |
-
- prepareCmd: "replace-in-file \"== Changelog ==\" \"== Changelog ==\n\n${nextRelease.notes}\" readme.txt"
|
13 |
-
- - "@semantic-release/exec"
|
14 |
-
- prepareCmd: grunt version::${nextRelease.version} && grunt wp_readme_to_markdown
|
15 |
-
- - "semantic-release-slack-bot"
|
16 |
-
- notifyOnSuccess: false
|
17 |
-
notifyOnFail: false
|
18 |
-
markdownReleaseNotes: true
|
19 |
-
branchesConfig:
|
20 |
-
- pattern: master
|
21 |
-
notifyOnSuccess: true
|
22 |
-
notifyOnFail: false
|
23 |
-
- - "@semantic-release/git"
|
24 |
-
- assets:
|
25 |
-
- CHANGELOG.md
|
26 |
-
- readme.md
|
27 |
-
- readme.txt
|
28 |
-
- classes/Visualizer/Plugin.php
|
29 |
-
- css/media.css
|
30 |
-
- index.php
|
31 |
-
- package-lock.json
|
32 |
-
- package.json
|
33 |
-
message: "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
|
34 |
-
- - "@semantic-release/github"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 0.12.6](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.5...v0.12.6) (2021-05-05)
|
2 |
|
3 |
* Adds explicit width/height to icons to prevent layout shifts issues
|
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
|
4 |
+
|
5 |
##### [Version 0.12.6](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.5...v0.12.6) (2021-05-05)
|
6 |
|
7 |
* Adds explicit width/height to icons to prevent layout shifts issues
|
includes/front.php
CHANGED
@@ -424,13 +424,23 @@ final class Menu_Icons_Front_End {
|
|
424 |
$svg_icon_content = file_get_contents( $svg_icon );
|
425 |
$width = 0;
|
426 |
$height = 0;
|
427 |
-
if ( $
|
428 |
-
$
|
429 |
-
$
|
430 |
-
$
|
431 |
-
|
432 |
-
|
433 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
}
|
435 |
return sprintf(
|
436 |
'<img src="%s" class="%s" aria-hidden="true" width="%dpx" height="%dpx"%s/>',
|
424 |
$svg_icon_content = file_get_contents( $svg_icon );
|
425 |
$width = 0;
|
426 |
$height = 0;
|
427 |
+
if ( 'image/svg+xml' === get_post_mime_type( $meta['icon'] ) ) {
|
428 |
+
$svg_icon = esc_url( wp_get_attachment_url( $meta['icon'] ) );
|
429 |
+
$svg_icon_content = file_get_contents( $svg_icon );
|
430 |
+
if ( $svg_icon_content ) {
|
431 |
+
$xmlget = simplexml_load_string( $svg_icon_content );
|
432 |
+
$xmlattributes = $xmlget->attributes();
|
433 |
+
$width = (string) $xmlattributes->width;
|
434 |
+
$width = (int) filter_var( $xmlattributes->width, FILTER_SANITIZE_NUMBER_INT );
|
435 |
+
$height = (string) $xmlattributes->height;
|
436 |
+
$height = (int) filter_var( $xmlattributes->height, FILTER_SANITIZE_NUMBER_INT );
|
437 |
+
}
|
438 |
+
} else {
|
439 |
+
$attachment_meta = wp_get_attachment_metadata( $meta['icon'] );
|
440 |
+
if ( $attachment_meta ) {
|
441 |
+
$width = isset( $attachment_meta['width'] ) ? $attachment_meta['width'] : $width;
|
442 |
+
$height = isset( $attachment_meta['height'] ) ? $attachment_meta['height'] : $height;
|
443 |
+
}
|
444 |
}
|
445 |
return sprintf(
|
446 |
'<img src="%s" class="%s" aria-hidden="true" width="%dpx" height="%dpx"%s/>',
|
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.7
|
15 |
* Author: ThemeIsle
|
16 |
* Author URI: https://themeisle.com
|
17 |
* License: GPLv2
|
27 |
*/
|
28 |
final class Menu_Icons {
|
29 |
|
30 |
+
const VERSION = '0.12.7';
|
31 |
|
32 |
/**
|
33 |
* Holds plugin data
|
readme.txt
CHANGED
@@ -225,15 +225,19 @@ Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
|
|
225 |
|
226 |
== Changelog ==
|
227 |
|
228 |
-
##### [Version 0.12.
|
|
|
|
|
229 |
|
230 |
-
* Adds explicit width/height to icons to prevent layout shifts issues
|
231 |
|
232 |
|
233 |
|
|
|
|
|
|
|
234 |
|
235 |
|
236 |
-
= 0.12.4 - 2020-07-13 =
|
237 |
|
238 |
* Fix Font Awesome not loading
|
239 |
|
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
|
231 |
|
|
|
232 |
|
233 |
|
234 |
|
235 |
+
##### [Version 0.12.6](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.5...v0.12.6) (2021-05-05)
|
236 |
+
|
237 |
+
* Adds explicit width/height to icons to prevent layout shifts issues
|
238 |
|
239 |
|
240 |
+
= 0.12.4 - 2020-07-13 =
|
241 |
|
242 |
* Fix Font Awesome not loading
|
243 |
|
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 ComposerAutoloaderInita0c8e595536034e79d3abf34436c776b::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -20,17 +20,19 @@ use Composer\Semver\VersionParser;
|
|
20 |
|
21 |
|
22 |
|
|
|
|
|
23 |
class InstalledVersions
|
24 |
{
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
-
'pretty_version' => 'v0.12.
|
29 |
-
'version' => '0.12.
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
33 |
-
'reference' => '
|
34 |
'name' => 'codeinwp/wp-menu-icons',
|
35 |
),
|
36 |
'versions' =>
|
@@ -76,12 +78,12 @@ private static $installed = array (
|
|
76 |
),
|
77 |
'codeinwp/wp-menu-icons' =>
|
78 |
array (
|
79 |
-
'pretty_version' => 'v0.12.
|
80 |
-
'version' => '0.12.
|
81 |
'aliases' =>
|
82 |
array (
|
83 |
),
|
84 |
-
'reference' => '
|
85 |
),
|
86 |
'composer/installers' =>
|
87 |
array (
|
@@ -108,7 +110,6 @@ foreach (self::getInstalled() as $installed) {
|
|
108 |
$packages[] = array_keys($installed['versions']);
|
109 |
}
|
110 |
|
111 |
-
|
112 |
if (1 === \count($packages)) {
|
113 |
return $packages[0];
|
114 |
}
|
@@ -304,6 +305,7 @@ self::$installedByVendor = array();
|
|
304 |
|
305 |
|
306 |
|
|
|
307 |
private static function getInstalled()
|
308 |
{
|
309 |
if (null === self::$canGetVendors) {
|
20 |
|
21 |
|
22 |
|
23 |
+
|
24 |
+
|
25 |
class InstalledVersions
|
26 |
{
|
27 |
private static $installed = array (
|
28 |
'root' =>
|
29 |
array (
|
30 |
+
'pretty_version' => 'v0.12.7',
|
31 |
+
'version' => '0.12.7.0',
|
32 |
'aliases' =>
|
33 |
array (
|
34 |
),
|
35 |
+
'reference' => '7aba45243d9fab287bf5479eff17fc9056736d9b',
|
36 |
'name' => 'codeinwp/wp-menu-icons',
|
37 |
),
|
38 |
'versions' =>
|
78 |
),
|
79 |
'codeinwp/wp-menu-icons' =>
|
80 |
array (
|
81 |
+
'pretty_version' => 'v0.12.7',
|
82 |
+
'version' => '0.12.7.0',
|
83 |
'aliases' =>
|
84 |
array (
|
85 |
),
|
86 |
+
'reference' => '7aba45243d9fab287bf5479eff17fc9056736d9b',
|
87 |
),
|
88 |
'composer/installers' =>
|
89 |
array (
|
110 |
$packages[] = array_keys($installed['versions']);
|
111 |
}
|
112 |
|
|
|
113 |
if (1 === \count($packages)) {
|
114 |
return $packages[0];
|
115 |
}
|
305 |
|
306 |
|
307 |
|
308 |
+
|
309 |
private static function getInstalled()
|
310 |
{
|
311 |
if (null === self::$canGetVendors) {
|
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 ComposerAutoloaderInit66e1d66cf653b778d8f616ff7b2c524b
|
|
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 ComposerAutoloaderInit66e1d66cf653b778d8f616ff7b2c524b
|
|
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 ComposerAutoloaderInita0c8e595536034e79d3abf34436c776b
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInita0c8e595536034e79d3abf34436c776b', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInita0c8e595536034e79d3abf34436c776b', '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\ComposerStaticInita0c8e595536034e79d3abf34436c776b::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\ComposerStaticInita0c8e595536034e79d3abf34436c776b::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequirea0c8e595536034e79d3abf34436c776b($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequirea0c8e595536034e79d3abf34436c776b($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 ComposerStaticInit66e1d66cf653b778d8f616ff7b2c524b
|
|
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 ComposerStaticInita0c8e595536034e79d3abf34436c776b
|
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 = ComposerStaticInita0c8e595536034e79d3abf34436c776b::$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.7',
|
5 |
+
'version' => '0.12.7.0',
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
+
'reference' => '7aba45243d9fab287bf5479eff17fc9056736d9b',
|
10 |
'name' => 'codeinwp/wp-menu-icons',
|
11 |
),
|
12 |
'versions' =>
|
52 |
),
|
53 |
'codeinwp/wp-menu-icons' =>
|
54 |
array (
|
55 |
+
'pretty_version' => 'v0.12.7',
|
56 |
+
'version' => '0.12.7.0',
|
57 |
'aliases' =>
|
58 |
array (
|
59 |
),
|
60 |
+
'reference' => '7aba45243d9fab287bf5479eff17fc9056736d9b',
|
61 |
),
|
62 |
'composer/installers' =>
|
63 |
array (
|