updated plugin Menu Icons version 0.13.6

This commit is contained in:
2023-07-19 21:09:05 +00:00
committed by Gitium
parent 9a42dc17d2
commit 42e98ecd14
43 changed files with 1227 additions and 278 deletions

View File

@ -1,3 +1,7 @@
##### [Version 1.0.5](https://github.com/Codeinwp/gutenberg-menu-icons/compare/v1.0.4...v1.0.5) (2021-06-23)
- Redo with @wp/scripts
##### [Version 1.0.4](https://github.com/Codeinwp/gutenberg-menu-icons/compare/v1.0.3...v1.0.4) (2020-05-17)
- Make it compatible with the latest version of Gutenberg

View File

@ -1,2 +0,0 @@
.wp-block-themeisle-blocks-menu-icon-picker-popover:not(.is-mobile).is-bottom{z-index:9999999}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content{overflow-y:hidden}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-menu-group{padding:7px}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items{max-height:300px;overflow-y:auto;display:grid;grid-template-columns:auto auto auto auto;grid-column-gap:10px;grid-row-gap:10px}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button{display:flex;justify-content:center}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button:hover{box-shadow:inset 0 0 0 1px #007cba}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button.is-selected{background:#f8f9f9}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button.is-selected i{color:#007cba}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button i.remove-icon{color:#d92222}.fas.wp-block-navigation-link,.fab.wp-block-navigation-link,.far.wp-block-navigation-link{display:flex;align-items:center;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit;line-height:inherit}.fas.wp-block-navigation-link:before,.fab.wp-block-navigation-link:before,.far.wp-block-navigation-link:before{margin-right:5px}.fas.wp-block-navigation-link .wp-block-navigation-link__content,.fab.wp-block-navigation-link .wp-block-navigation-link__content,.far.wp-block-navigation-link .wp-block-navigation-link__content{display:flex;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit}.fas.wp-block-navigation-link .wp-block-navigation-link__content:before,.fab.wp-block-navigation-link .wp-block-navigation-link__content:before,.far.wp-block-navigation-link .wp-block-navigation-link__content:before{margin-right:5px}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '0168e17510d72c2dc5a2d893e33e5086');

View File

@ -1 +1 @@
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=3)}([,,,function(e,n,t){"use strict";t.r(n);t(4);var r=document.querySelectorAll(".wp-block-navigation-link");0<r.length&&Array.from(r).forEach((function(e){var n=e.querySelector(".wp-block-navigation-link__content"),t=Array.from(e.classList),r=t.find((function(e){return e.includes("fab")||e.includes("far")||e.includes("fas")}))||"fas",o=t.find((function(e){return e.includes("fa-")}));o&&(e.classList.remove(r,o),n.classList.add(r,o))}))},function(e,n,t){}]);
(window.webpackJsonp_themeisle_gutenberg_menu_icons=window.webpackJsonp_themeisle_gutenberg_menu_icons||[]).push([[2],{9:function(e,n,t){}}]),function(e){function n(n){for(var r,u,c=n[0],l=n[1],s=n[2],f=0,p=[];f<c.length;f++)u=c[f],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&p.push(o[u][0]),o[u]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(a&&a(n);p.length;)p.shift()();return i.push.apply(i,s||[]),t()}function t(){for(var e,n=0;n<i.length;n++){for(var t=i[n],r=!0,c=1;c<t.length;c++){var l=t[c];0!==o[l]&&(r=!1)}r&&(i.splice(n--,1),e=u(u.s=t[0]))}return e}var r={},o={0:0},i=[];function u(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,u),t.l=!0,t.exports}u.m=e,u.c=r,u.d=function(e,n,t){u.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,n){if(1&n&&(e=u(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(u.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)u.d(t,r,function(n){return e[n]}.bind(null,r));return t},u.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(n,"a",n),n},u.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},u.p="";var c=window.webpackJsonp_themeisle_gutenberg_menu_icons=window.webpackJsonp_themeisle_gutenberg_menu_icons||[],l=c.push.bind(c);c.push=n,c=c.slice();for(var s=0;s<c.length;s++)n(c[s]);var a=l;i.push([8,2]),t()}({8:function(e,n,t){"use strict";t.r(n),t(9);const r=document.querySelectorAll(".wp-block-navigation-link");0<r.length&&Array.from(r).forEach(e=>{const n=e.querySelector(".wp-block-navigation-link__content");let t=Array.from(e.classList);const r=t.find(e=>e.includes("fab")||e.includes("far")||e.includes("fas"))||"fas",o=t.find(e=>e.includes("fa-"));o&&(e.classList.remove(r,o),n.classList.add(r,o))})}});

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '2c1513ca91e5dc3cbe8c5cbdd71ea894');

View File

@ -0,0 +1 @@
.wp-block-themeisle-blocks-menu-icon-picker-popover:not(.is-mobile).is-bottom{z-index:9999999}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content{overflow-y:hidden}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-menu-group{padding:7px}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items{max-height:300px;overflow-y:auto;display:-ms-grid;display:grid;-ms-grid-columns:auto auto auto auto;grid-template-columns:auto auto auto auto;grid-column-gap:10px;grid-row-gap:10px}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button{display:flex;justify-content:center}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button:hover{box-shadow:inset 0 0 0 1px #007cba}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button.is-selected{background:#f8f9f9}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button.is-selected i{color:#007cba}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button i.remove-icon{color:#d92222}.fas.wp-block-navigation-link,.fab.wp-block-navigation-link,.far.wp-block-navigation-link{display:flex;align-items:center;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit;line-height:inherit}.fas.wp-block-navigation-link:before,.fab.wp-block-navigation-link:before,.far.wp-block-navigation-link:before{margin-right:5px}.fas.wp-block-navigation-link .wp-block-navigation-link__content,.fab.wp-block-navigation-link .wp-block-navigation-link__content,.far.wp-block-navigation-link .wp-block-navigation-link__content{display:flex;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit}.fas.wp-block-navigation-link .wp-block-navigation-link__content:before,.fab.wp-block-navigation-link .wp-block-navigation-link__content:before,.far.wp-block-navigation-link .wp-block-navigation-link__content:before{margin-right:5px}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1 @@
.fas.wp-block-navigation-link:before,.fab.wp-block-navigation-link:before,.far.wp-block-navigation-link:before{display:none}.fas.wp-block-navigation-link__content,.fab.wp-block-navigation-link__content,.far.wp-block-navigation-link__content{font-family:inherit;display:flex;align-items:center;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit;line-height:inherit}.fas.wp-block-navigation-link__content:before,.fab.wp-block-navigation-link__content:before,.far.wp-block-navigation-link__content:before{font-family:"Font Awesome 5 Free";margin-right:5px}.fab.wp-block-navigation-link__content:before,.far.wp-block-navigation-link__content:before{font-weight:400}.fas.wp-block-navigation-link__content:before{font-weight:900}.fab.wp-block-navigation-link__content:before{font-family:"Font Awesome 5 Brands"}

View File

@ -51,35 +51,31 @@ class GutenbergMenuIcons {
return;
}
if ( THEMEISLE_GUTENBERG_MENU_ICONS_DEV ) {
$version = time();
} else {
$version = THEMEISLE_GUTENBERG_MENU_ICONS_VERSION;
}
$asset_file = include plugin_dir_path( __FILE__ ) . 'build/index.asset.php';
wp_enqueue_script(
'themeisle-gutenberg-menu-icons',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/editor.js',
array( 'wp-i18n', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-editor', 'wp-element', 'wp-hooks' ),
$version,
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/index.js',
$asset_file['dependencies'],
$asset_file['version'],
true
);
wp_enqueue_style(
'themeisle-gutenberg-menu-icons',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/editor.css',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/index.css',
array( 'font-awesome-5' ),
$version
$asset_file['version']
);
wp_enqueue_style(
'themeisle-gutenberg-menu-icons-font-awesome',
plugins_url( '/', __FILE__ ) . 'assets/css/font-awesome.min.css',
array( 'font-awesome-5' ),
$version
$asset_file['version']
);
wp_set_script_translations( 'themeisle-gutenberg-menu-icons', 'textdomain' );
wp_set_script_translations( 'themeisle-gutenberg-menu-icons', 'otter-blocks' );
}
/**
@ -93,29 +89,25 @@ class GutenbergMenuIcons {
return;
}
if ( THEMEISLE_GUTENBERG_MENU_ICONS_DEV ) {
$version = time();
} else {
$version = THEMEISLE_GUTENBERG_MENU_ICONS_VERSION;
}
if ( is_admin() ) {
return;
}
$asset_file = include plugin_dir_path( __FILE__ ) . 'build/frontend.asset.php';
wp_enqueue_script(
'themeisle-gutenberg-menu-icons-frontend',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/frontend.js',
array(),
$version,
$asset_file['dependencies'],
$asset_file['version'],
true
);
wp_enqueue_style(
'themeisle-gutenberg-menu-icons-frontend',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/frontend.css',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/style-frontend.css',
array( 'font-awesome-5' ),
$version
$asset_file['version']
);
}
@ -160,7 +152,7 @@ class GutenbergMenuIcons {
*/
public function __clone() {
// Cloning instances of the class is forbidden.
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'otter-blocks' ), '1.0.0' );
}
/**
@ -172,6 +164,6 @@ class GutenbergMenuIcons {
*/
public function __wakeup() {
// Unserializing instances of the class is forbidden.
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'otter-blocks' ), '1.0.0' );
}
}

View File

@ -8,8 +8,7 @@
* @since 1.0.0
*/
define( 'THEMEISLE_GUTENBERG_MENU_ICONS_VERSION', '1.0.4' );
define( 'THEMEISLE_GUTENBERG_MENU_ICONS_DEV', false );
define( 'THEMEISLE_GUTENBERG_MENU_ICONS_VERSION', '1.0.5' );
if ( function_exists( 'add_action' ) ) {
add_action(