Menu Icons by ThemeIsle - Version 0.12.0

Version Description

  • 2019-11-15
Download this release

Release Info

Developer codeinwp
Plugin Icon 128x128 Menu Icons by ThemeIsle
Version 0.12.0
Comparing to
See all releases

Code changes from version 0.11.5 to 0.12.0

CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
2
### v0.11.5 - 2019-05-23
3
**Changes:**
4
* Sync composer dependencies with the latest version
1
2
+ ### v0.12.0 - 2019-11-15
3
+ **Changes:**
4
+ * Fix issues with WordPress 5.3.
5
+
6
### v0.11.5 - 2019-05-23
7
**Changes:**
8
* Sync composer dependencies with the latest version
includes/settings.php CHANGED
@@ -697,72 +697,20 @@ final class Menu_Icons_Settings {
697
}
698
}
699
$box_data = '<div id="menu-icons-sidebar">';
700
- if ( ( $menu_current_theme != 'Hestia' ) && ( $menu_current_theme != 'Hestia Pro' ) ) {
701
702
- $menu_upgrade_hestia_box_text = 'Check-out our latest FREE multi-purpose theme: <strong>Hestia</strong>';
703
-
704
- if ( $menu_current_theme == 'Zerif Lite' ) {
705
- $menu_upgrade_hestia_box_text = 'Check-out our latest FREE multi-purpose theme: <strong>Hestia</strong>, your Zerif Lite content will be imported automatically! ';
706
- }
707
708
$menu_upgrade_hestia_url = add_query_arg(
709
array(
710
- 'theme' => 'hestia',
711
), admin_url( 'theme-install.php' )
712
);
713
$box_data .= '<div class="menu-icons-upgrade-hestia postbox new-card">';
714
$box_data .= '<p>' . wp_kses_post( $menu_upgrade_hestia_box_text ) . '</p>';
715
- $box_data .= '<a class="button" href="' . $menu_upgrade_hestia_url . '" target="_blank">Preview Hestia</a>';
716
$box_data .= '</div>';
717
}
718
-
719
- if ( ! empty( $_POST['menu_icons_mail'] ) ) {
720
- require( plugin_dir_path( __DIR__ ) . 'mailin.php' );
721
- $user_info = get_userdata( 1 );
722
- $mailin = new Mailin( 'https://api.sendinblue.com/v2.0', 'cHW5sxZnzE7mhaYb' );
723
- $data = array(
724
- 'email' => $_POST['menu_icons_mail'],
725
- 'attributes' => array(
726
- 'NAME' => $user_info->first_name,
727
- 'SURNAME' => $user_info->last_name,
728
- ),
729
- 'blacklisted' => 0,
730
- 'listid' => array( 145 ),
731
- 'blacklisted_sms' => 0,
732
- );
733
- $status = $mailin->create_update_user( $data );
734
- if ( $status['code'] == 'success' ) {
735
- update_option( 'menu_icons_subscribe', true );
736
- }
737
- }
738
- $email_output = '<div class="menu-icons-subscribe postbox new-card">';
739
- $email_output .= '<h3 class="title">' . esc_html__( 'Get Our Free Email Course', 'menu-icons' ) . '</h3>';
740
- $email_output .= '<div id="formdata"><p>' . esc_html__( 'Ready to learn how to reduce your website loading times by half? Come and join the 1st lesson here!', 'menu-icons' ) . ' </p><form class="menu-icons-submit-mail" method="post"><input name="menu_icons_mail" type="email" value="' . get_option( 'admin_email' ) . '" /><input id="ebutton" class="button" type="submit" value="Submit"></form></div>';
741
- $email_output .= '<p id="success">' . esc_html__( 'Thank you for subscribing! You have been added to the mailing list and will receive the next email information in the coming weeks. If you ever wish to unsubscribe, simply use the "Unsubscribe" link included in each newsletter.', 'menu-icons' ) . '</p>';
742
- $email_output .= '<p id="failiure">' . esc_html__( 'Unable to Subscribe.', 'menu-icons' ) . '</p>';
743
- $email_output .= '</div>';
744
- $email_output .= '</div>';
745
- $email_output .= '<script>';
746
- $email_output .= '$( \'#failiure\' ).hide();';
747
- $email_output .= '$( \'#success\' ).hide();';
748
- $email_output .= '$( \'form.menu-icons-submit-mail\' ).submit(function(event) {';
749
- $email_output .= 'event.preventDefault();';
750
- $email_output .= '$.ajax({';
751
- $email_output .= 'type: \'POST\',';
752
- $email_output .= 'data: $( \'form.menu-icons-submit-mail\' ).serialize(),';
753
- $email_output .= 'success: function(result) {';
754
- $email_output .= '$( \'#formdata\' ).hide();';
755
- $email_output .= '$( \'#success\' ).show();';
756
- $email_output .= '},';
757
- $email_output .= 'error: function(result) { $( \'#failiure\' ).show(); }';
758
- $email_output .= '}); });';
759
- $email_output .= '</script>';
760
- $shown = (bool) get_option( 'menu_icons_subscribe', false );
761
-
762
- if ( $shown === true ) {
763
- $email_output = '';
764
- }
765
- $box_data .= $email_output;
766
$js_data = apply_filters(
767
'menu_icons_settings_js_data',
768
array(
697
}
698
}
699
$box_data = '<div id="menu-icons-sidebar">';
700
+ if ( ( $menu_current_theme != 'Neve' ) ) {
701
702
+ $menu_upgrade_hestia_box_text = '<h4>Check-out our latest fast and lightweight FREE theme - <strong>Neve</strong></h4>Neve’s mobile-first approach, compatibility with AMP and popular page-builders makes website building accessible for everyone.';
703
704
$menu_upgrade_hestia_url = add_query_arg(
705
array(
706
+ 'theme' => 'Neve',
707
), admin_url( 'theme-install.php' )
708
);
709
$box_data .= '<div class="menu-icons-upgrade-hestia postbox new-card">';
710
$box_data .= '<p>' . wp_kses_post( $menu_upgrade_hestia_box_text ) . '</p>';
711
+ $box_data .= '<a class="button" href="' . $menu_upgrade_hestia_url . '" target="_blank">Preview Neve</a>';
712
$box_data .= '</div>';
713
}
714
$js_data = apply_filters(
715
'menu_icons_settings_js_data',
716
array(
js/admin.js CHANGED
@@ -6,9 +6,9 @@
6
/******/ function __webpack_require__(moduleId) {
7
/******/
8
/******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId])
10
/******/ return installedModules[moduleId].exports;
11
- /******/
12
/******/ // Create a new module (and put it into the cache)
13
/******/ var module = installedModules[moduleId] = {
14
/******/ i: moduleId,
@@ -63,7 +63,7 @@
63
/******/ __webpack_require__.p = "";
64
/******/
65
/******/ // Load entry module and return exports
66
- /******/ return __webpack_require__(__webpack_require__.s = 11);
67
/******/ })
68
/************************************************************************/
69
/******/ ([
@@ -72,7 +72,7 @@
72
73
/* global menuIcons:false */
74
75
- __webpack_require__(2);
76
77
(function ($) {
78
var miPicker;
@@ -318,18 +318,25 @@ __webpack_require__(2);
318
/* 2 */
319
/***/ (function(module, exports, __webpack_require__) {
320
321
- wp.media.model.MenuIconsItemSettingField = __webpack_require__(3);
322
- wp.media.model.MenuIconsItemSettings = __webpack_require__(4);
323
- wp.media.model.MenuIconsItem = __webpack_require__(5);
324
-
325
- wp.media.view.MenuIconsItemSettingField = __webpack_require__(8);
326
- wp.media.view.MenuIconsItemSettings = __webpack_require__(9);
327
- wp.media.view.MenuIconsItemPreview = __webpack_require__(7);
328
- wp.media.view.MenuIconsSidebar = __webpack_require__(10);
329
- wp.media.view.MediaFrame.MenuIcons = __webpack_require__(6);
330
331
/***/ }),
332
/* 3 */
333
/***/ (function(module, exports) {
334
335
/**
@@ -350,7 +357,7 @@ var MenuIconsItemSettingField = Backbone.Model.extend({
350
module.exports = MenuIconsItemSettingField;
351
352
/***/ }),
353
- /* 4 */
354
/***/ (function(module, exports) {
355
356
/**
@@ -366,7 +373,7 @@ var MenuIconsItemSettings = Backbone.Collection.extend({
366
module.exports = MenuIconsItemSettings;
367
368
/***/ }),
369
- /* 5 */
370
/***/ (function(module, exports) {
371
372
/**
@@ -398,7 +405,7 @@ var Item = Backbone.Model.extend({
398
module.exports = Item;
399
400
/***/ }),
401
- /* 6 */
402
/***/ (function(module, exports) {
403
404
/**
@@ -413,6 +420,7 @@ module.exports = Item;
413
* @augments wp.Backbone.View
414
* @augments Backbone.View
415
*/
416
var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
417
initialize: function initialize() {
418
this.menuItems = new Backbone.Collection([], {
@@ -420,6 +428,14 @@ var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
420
});
421
422
wp.media.view.MediaFrame.IconPicker.prototype.initialize.apply(this, arguments);
423
424
this.listenTo(this.target, 'change', this.miUpdateItemProps);
425
this.on('select', this.miClearTarget, this);
@@ -439,7 +455,7 @@ var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
439
module.exports = MenuIcons;
440
441
/***/ }),
442
- /* 7 */
443
/***/ (function(module, exports) {
444
445
/**
@@ -495,7 +511,7 @@ var MenuIconsItemPreview = wp.media.View.extend({
495
module.exports = MenuIconsItemPreview;
496
497
/***/ }),
498
- /* 8 */
499
/***/ (function(module, exports) {
500
501
var $ = jQuery,
@@ -538,7 +554,7 @@ MenuIconsItemSettingField = wp.media.View.extend({
538
module.exports = MenuIconsItemSettingField;
539
540
/***/ }),
541
- /* 9 */
542
/***/ (function(module, exports) {
543
544
/**
@@ -573,7 +589,7 @@ var MenuIconsItemSettings = wp.media.view.PriorityList.extend({
573
module.exports = MenuIconsItemSettings;
574
575
/***/ }),
576
- /* 10 */
577
/***/ (function(module, exports) {
578
579
/**
@@ -595,7 +611,7 @@ var MenuIconsSidebar = wp.media.view.IconPickerSidebar.extend({
595
});
596
597
var info = new wp.media.View({
598
- tagName: 'div',
599
className: '_info',
600
priority: 1000
601
});
@@ -678,12 +694,5 @@ var MenuIconsSidebar = wp.media.view.IconPickerSidebar.extend({
678
679
module.exports = MenuIconsSidebar;
680
681
- /***/ }),
682
- /* 11 */
683
- /***/ (function(module, exports, __webpack_require__) {
684
-
685
- __webpack_require__(1);
686
- __webpack_require__(0);
687
-
688
/***/ })
689
/******/ ]);
6
/******/ function __webpack_require__(moduleId) {
7
/******/
8
/******/ // Check if module is in cache
9
+ /******/ if(installedModules[moduleId]) {
10
/******/ return installedModules[moduleId].exports;
11
+ /******/ }
12
/******/ // Create a new module (and put it into the cache)
13
/******/ var module = installedModules[moduleId] = {
14
/******/ i: moduleId,
63
/******/ __webpack_require__.p = "";
64
/******/
65
/******/ // Load entry module and return exports
66
+ /******/ return __webpack_require__(__webpack_require__.s = 2);
67
/******/ })
68
/************************************************************************/
69
/******/ ([
72
73
/* global menuIcons:false */
74
75
+ __webpack_require__(3);
76
77
(function ($) {
78
var miPicker;
318
/* 2 */
319
/***/ (function(module, exports, __webpack_require__) {
320
321
+ __webpack_require__(1);
322
+ __webpack_require__(0);
323
324
/***/ }),
325
/* 3 */
326
+ /***/ (function(module, exports, __webpack_require__) {
327
+
328
+ wp.media.model.MenuIconsItemSettingField = __webpack_require__(4);
329
+ wp.media.model.MenuIconsItemSettings = __webpack_require__(5);
330
+ wp.media.model.MenuIconsItem = __webpack_require__(6);
331
+
332
+ wp.media.view.MenuIconsItemSettingField = __webpack_require__(9);
333
+ wp.media.view.MenuIconsItemSettings = __webpack_require__(10);
334
+ wp.media.view.MenuIconsItemPreview = __webpack_require__(8);
335
+ wp.media.view.MenuIconsSidebar = __webpack_require__(11);
336
+ wp.media.view.MediaFrame.MenuIcons = __webpack_require__(7);
337
+
338
+ /***/ }),
339
+ /* 4 */
340
/***/ (function(module, exports) {
341
342
/**
357
module.exports = MenuIconsItemSettingField;
358
359
/***/ }),
360
+ /* 5 */
361
/***/ (function(module, exports) {
362
363
/**
373
module.exports = MenuIconsItemSettings;
374
375
/***/ }),
376
+ /* 6 */
377
/***/ (function(module, exports) {
378
379
/**
405
module.exports = Item;
406
407
/***/ }),
408
+ /* 7 */
409
/***/ (function(module, exports) {
410
411
/**
420
* @augments wp.Backbone.View
421
* @augments Backbone.View
422
*/
423
+
424
var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
425
initialize: function initialize() {
426
this.menuItems = new Backbone.Collection([], {
428
});
429
430
wp.media.view.MediaFrame.IconPicker.prototype.initialize.apply(this, arguments);
431
+ this.off('open', this.setMenuTabPanelAriaAttributes, this);
432
+ // Set the router ARIA tab panel attributes when the modal opens.
433
+ this.off('open', this.setRouterTabPanelAriaAttributes, this);
434
+
435
+ // Update the menu ARIA tab panel attributes when the content updates.
436
+ this.off('content:render', this.setMenuTabPanelAriaAttributes, this);
437
+ // Update the router ARIA tab panel attributes when the content updates.
438
+ this.off('content:render', this.setRouterTabPanelAriaAttributes, this);
439
440
this.listenTo(this.target, 'change', this.miUpdateItemProps);
441
this.on('select', this.miClearTarget, this);
455
module.exports = MenuIcons;
456
457
/***/ }),
458
+ /* 8 */
459
/***/ (function(module, exports) {
460
461
/**
511
module.exports = MenuIconsItemPreview;
512
513
/***/ }),
514
+ /* 9 */
515
/***/ (function(module, exports) {
516
517
var $ = jQuery,
554
module.exports = MenuIconsItemSettingField;
555
556
/***/ }),
557
+ /* 10 */
558
/***/ (function(module, exports) {
559
560
/**
589
module.exports = MenuIconsItemSettings;
590
591
/***/ }),
592
+ /* 11 */
593
/***/ (function(module, exports) {
594
595
/**
611
});
612
613
var info = new wp.media.View({
614
+ tagName: 'p',
615
className: '_info',
616
priority: 1000
617
});
694
695
module.exports = MenuIconsSidebar;
696
697
/***/ })
698
/******/ ]);
js/admin.min.js CHANGED
@@ -1 +1,698 @@
1
- !function(a){a("#menu-icons-settings-tabs").on("click","a.mi-settings-nav-tab",function(b){var c=a(this).blur(),d=a("#"+c.data("type"));b.preventDefault(),b.stopPropagation(),c.parent().addClass("tabs").siblings().removeClass("tabs"),d.removeClass("tabs-panel-inactive").addClass("tabs-panel-active").show().siblings("div.tabs-panel").hide().addClass("tabs-panel-inactive").removeClass("tabs-panel-active")}).find("a.mi-settings-nav-tab").first().click(),a("#menu-icons-settings-save").on("click",function(b){var c=a(this).prop("disabled",!0),d=c.siblings("span.spinner");b.preventDefault(),b.stopPropagation(),d.css({display:"inline-block",visibility:"visible"}),a.ajax({type:"POST",url:menuIcons.ajaxUrls.update,data:a("#menu-icons-settings :input").serialize(),success:function(a){!0===a.success&&a.data.redirectUrl?window.location=a.data.redirectUrl:c.prop("disabled",!1)},always:function(){d.hide()}})})}(jQuery),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){wp.media.model.MenuIconsItemSettingField=a("./models/item-setting-field.js"),wp.media.model.MenuIconsItemSettings=a("./models/item-settings.js"),wp.media.model.MenuIconsItem=a("./models/item.js"),wp.media.view.MenuIconsItemSettingField=a("./views/item-setting-field.js"),wp.media.view.MenuIconsItemSettings=a("./views/item-settings.js"),wp.media.view.MenuIconsItemPreview=a("./views/item-preview.js"),wp.media.view.MenuIconsSidebar=a("./views/sidebar.js"),wp.media.view.MediaFrame.MenuIcons=a("./views/frame.js")},{"./models/item-setting-field.js":2,"./models/item-settings.js":3,"./models/item.js":4,"./views/frame.js":5,"./views/item-preview.js":6,"./views/item-setting-field.js":7,"./views/item-settings.js":8,"./views/sidebar.js":9}],2:[function(a,b,c){var d=Backbone.Model.extend({defaults:{id:"",label:"",value:"",type:"text"}});b.exports=d},{}],3:[function(a,b,c){var d=Backbone.Collection.extend({model:wp.media.model.MenuIconsItemSettingField});b.exports=d},{}],4:[function(a,b,c){var d=Backbone.Model.extend({initialize:function(){this.on("change",this.updateValues,this)},updateValues:function(){_.each(this.get("$inputs"),function(a,b){a.val(this.get(b))},this),this.get("$el").trigger("mi:update")}});b.exports=d},{}],5:[function(a,b,c){var d=wp.media.view.MediaFrame.IconPicker.extend({initialize:function(){this.menuItems=new Backbone.Collection([],{model:wp.media.model.MenuIconsItem}),wp.media.view.MediaFrame.IconPicker.prototype.initialize.apply(this,arguments),this.listenTo(this.target,"change",this.miUpdateItemProps),this.on("select",this.miClearTarget,this)},miUpdateItemProps:function(a){var b=this.menuItems.get(a.id);b.set(a.changed)},miClearTarget:function(){this.target.clear({silent:!0})}});b.exports=d},{}],6:[function(a,b,c){var d=wp.media.View.extend({tagName:"p",className:"mi-preview menu-item attachment-info",events:{"click a":"preventDefault"},initialize:function(){wp.media.View.prototype.initialize.apply(this,arguments),this.model.on("change",this.render,this)},render:function(){var a=this.controller,b=a.state(),c=b.get("selection").single(),d=this.model.toJSON(),e=_.extend(d,{type:b.id,icon:c.id,title:this.model.get("$title").val(),url:b.ipGetIconUrl(c,d.image_size)}),f="menu-icons-item-sidebar-preview-"+iconPicker.types[b.id].templateId+"-";return f+=e.hide_label?"hide_label":e.position,this.template=wp.media.template(f),this.$el.html(this.template(e)),this},preventDefault:function(a){a.preventDefault()}});b.exports=d},{}],7:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"label",className:"setting",events:{"change :input":"_update"},initialize:function(){wp.media.View.prototype.initialize.apply(this,arguments),this.template=wp.media.template("menu-icons-settings-field-"+this.model.get("type")),this.model.on("change",this.render,this)},prepare:function(){return this.model.toJSON()},_update:function(a){var b=e(a.currentTarget).val();this.model.set("value",b),this.options.item.set(this.model.id,b)}}),b.exports=d},{}],8:[function(a,b,c){var d=wp.media.view.PriorityList.extend({className:"mi-settings attachment-info",prepare:function(){_.each(this.collection.map(this.createField,this),function(a){this.set(a.model.id,a)},this)},createField:function(a){var b=new wp.media.view.MenuIconsItemSettingField({item:this.model,model:a,collection:this.collection});return b}});b.exports=d},{}],9:[function(a,b,c){var d=wp.media.view.IconPickerSidebar.extend({initialize:function(){var a=new wp.media.View({tagName:"h3",priority:-10}),b=new wp.media.View({tagName:"div",className:"_info",priority:1e3});wp.media.view.IconPickerSidebar.prototype.initialize.apply(this,arguments),a.$el.text(menuIcons.text.preview),this.set("title",a),b.$el.html(menuIcons.text.settingsInfo),this.set("info",b)},createSingle:function(){this.createPreview(),this.createSettings()},disposeSingle:function(){this.unset("preview"),this.unset("settings")},createPreview:function(){var a=this,b=a.controller,c=b.state();return c.dfd&&"pending"===c.dfd.state()?void c.dfd.done(function(){a.createPreview()}):void a.set("preview",new wp.media.view.MenuIconsItemPreview({controller:b,model:b.target,priority:80}))},createSettings:function(){var a=this.controller,b=a.state(),c=b.get("data").settingsFields,d=[];_.each(c,function(b){var c,e=menuIcons.settingsFields[b];e&&(c=_.defaults({value:a.target.get(b)||e["default"]},e),d.push(c))}),d.length&&this.set("settings",new wp.media.view.MenuIconsItemSettings({controller:this.controller,collection:new wp.media.model.MenuIconsItemSettings(d),model:a.target,type:this.options.type,priority:120}))}});b.exports=d},{}]},{},[1]),function(a){"use strict";var b;menuIcons.activeTypes&&!_.isEmpty(menuIcons.activeTypes)&&(b={templates:{},wrapClass:"div.menu-icons-wrap",frame:null,target:new wp.media.model.IconPickerTarget,typesFilter:function(b){return-1<a.inArray(b.id,menuIcons.activeTypes)},createFrame:function(){b.frame=new wp.media.view.MediaFrame.MenuIcons({target:b.target,ipTypes:_.filter(iconPicker.types,b.typesFilter),SidebarView:wp.media.view.MenuIconsSidebar})},pickIcon:function(a){b.frame.target.set(a,{silent:!0}),b.frame.open()},setUnset:function(c){var d=a(c.currentTarget),e=a(c.target);c.preventDefault(),e.hasClass("_select")||e.hasClass("_icon")?b.setIcon(d):e.hasClass("_remove")&&b.unsetIcon(d)},setIcon:function(c){var d=c.data("id"),e=b.frame,f=e.menuItems,g=f.get(d);return g?void b.pickIcon(g.toJSON()):(g={id:d,$el:c,$title:a("#edit-menu-item-title-"+d),$inputs:{}},c.find("div._settings input").each(function(){var b=a(this),c=b.attr("class").replace("_mi-",""),d=b.val();d||(_.has(menuIcons.menuSettings,c)?d=menuIcons.menuSettings[c]:_.has(menuIcons.settingsFields,c)&&(d=menuIcons.settingsFields[c]["default"])),g[c]=d,g.$inputs[c]=b}),f.add(g),void b.pickIcon(g))},unsetIcon:function(a){var c=a.data("id");a.find("div._settings input").val(""),a.trigger("mi:update"),b.frame.menuItems.remove(c)},updateField:function(c){var d,e=a(c.currentTarget),f=e.find("a._select"),g=e.find("a._remove"),h=e.find("input._mi-type").val(),i=e.find("input._mi-icon").val(),j=e.find("input._mi-url").val();return""===h||""===i||0>_.indexOf(menuIcons.activeTypes,h)?(f.text(menuIcons.text.select).attr("title",""),void g.addClass("hidden")):(d=b.templates[h]?b.templates[h]:b.templates[h]=wp.template("menu-icons-item-field-preview-"+iconPicker.types[h].templateId),g.removeClass("hidden"),f.attr("title",menuIcons.text.change),void f.html(d({type:h,icon:i,url:j})))},init:function(){b.createFrame(),a(document).on("click",b.wrapClass,b.setUnset).on("mi:update",b.wrapClass,b.updateField),a(b.wrapClass).trigger("mi:update")}},b.init())}(jQuery);
1
+ /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // The module cache
3
+ /******/ var installedModules = {};
4
+ /******/
5
+ /******/ // The require function
6
+ /******/ function __webpack_require__(moduleId) {
7
+ /******/
8
+ /******/ // Check if module is in cache
9
+ /******/ if(installedModules[moduleId]) {
10
+ /******/ return installedModules[moduleId].exports;
11
+ /******/ }
12
+ /******/ // Create a new module (and put it into the cache)
13
+ /******/ var module = installedModules[moduleId] = {
14
+ /******/ i: moduleId,
15
+ /******/ l: false,
16
+ /******/ exports: {}
17
+ /******/ };
18
+ /******/
19
+ /******/ // Execute the module function
20
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+ /******/
22
+ /******/ // Flag the module as loaded
23
+ /******/ module.l = true;
24
+ /******/
25
+ /******/ // Return the exports of the module
26
+ /******/ return module.exports;
27
+ /******/ }
28
+ /******/
29
+ /******/
30
+ /******/ // expose the modules object (__webpack_modules__)
31
+ /******/ __webpack_require__.m = modules;
32
+ /******/
33
+ /******/ // expose the module cache
34
+ /******/ __webpack_require__.c = installedModules;
35
+ /******/
36
+ /******/ // identity function for calling harmony imports with the correct context
37
+ /******/ __webpack_require__.i = function(value) { return value; };
38
+ /******/
39
+ /******/ // define getter function for harmony exports
40
+ /******/ __webpack_require__.d = function(exports, name, getter) {
41
+ /******/ if(!__webpack_require__.o(exports, name)) {
42
+ /******/ Object.defineProperty(exports, name, {
43
+ /******/ configurable: false,
44
+ /******/ enumerable: true,
45
+ /******/ get: getter
46
+ /******/ });
47
+ /******/ }
48
+ /******/ };
49
+ /******/
50
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
51
+ /******/ __webpack_require__.n = function(module) {
52
+ /******/ var getter = module && module.__esModule ?
53
+ /******/ function getDefault() { return module['default']; } :
54
+ /******/ function getModuleExports() { return module; };
55
+ /******/ __webpack_require__.d(getter, 'a', getter);
56
+ /******/ return getter;
57
+ /******/ };
58
+ /******/
59
+ /******/ // Object.prototype.hasOwnProperty.call
60
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61
+ /******/
62
+ /******/ // __webpack_public_path__
63
+ /******/ __webpack_require__.p = "";
64
+ /******/
65
+ /******/ // Load entry module and return exports
66
+ /******/ return __webpack_require__(__webpack_require__.s = 2);
67
+ /******/ })
68
+ /************************************************************************/
69
+ /******/ ([
70
+ /* 0 */
71
+ /***/ (function(module, exports, __webpack_require__) {
72
+
73
+ /* global menuIcons:false */
74
+
75
+ __webpack_require__(3);
76
+
77
+ (function ($) {
78
+ var miPicker;
79
+
80
+ if (!menuIcons.activeTypes || _.isEmpty(menuIcons.activeTypes)) {
81
+ return;
82
+ }
83
+
84
+ /**
85
+ * @namespace
86
+ * @property {object} templates - Cached templates for the item previews on the fields
87
+ * @property {string} wrapClass - Field wrapper's class
88
+ * @property {object} frame - Menu Icons' media frame instance
89
+ * @property {object} target - Frame's target model
90
+ */
91
+ miPicker = {
92
+ templates: {},
93
+ wrapClass: 'div.menu-icons-wrap',
94
+ frame: null,
95
+ target: new wp.media.model.IconPickerTarget(),
96
+
97
+ /**
98
+ * Callback function to filter active icon types
99
+ *
100
+ * TODO: Maybe move to frame view?
101
+ *
102
+ * @param {string} type - Icon type.
103
+ */
104
+ typesFilter: function typesFilter(type) {
105
+ return $.inArray(type.id, menuIcons.activeTypes) >= 0;
106
+ },
107
+
108
+ /**
109
+ * Create Menu Icons' media frame
110
+ */
111
+ createFrame: function createFrame() {
112
+ miPicker.frame = new wp.media.view.MediaFrame.MenuIcons({
113
+ target: miPicker.target,
114
+ ipTypes: _.filter(iconPicker.types, miPicker.typesFilter),
115
+ SidebarView: wp.media.view.MenuIconsSidebar
116
+ });
117
+ },
118
+
119
+ /**
120
+ * Pick icon for a menu item and open the frame
121
+ *
122
+ * @param {object} model - Menu item model.
123
+ */
124
+ pickIcon: function pickIcon(model) {
125
+ miPicker.frame.target.set(model, { silent: true });
126
+ miPicker.frame.open();
127
+ },
128
+
129
+ /**
130
+ * Set or unset icon
131
+ *
132
+ * @param {object} e - jQuery click event.
133
+ */
134
+ setUnset: function setUnset(e) {
135
+ var $el = $(e.currentTarget),
136
+ $clicked = $(e.target);
137
+
138
+ e.preventDefault();
139
+
140
+ if ($clicked.hasClass('_select') || $clicked.hasClass('_icon')) {
141
+ miPicker.setIcon($el);
142
+ } else if ($clicked.hasClass('_remove')) {
143
+ miPicker.unsetIcon($el);
144
+ }
145
+ },
146
+
147
+ /**
148
+ * Set Icon
149
+ *
150
+ * @param {object} $el - jQuery object.
151
+ */
152
+ setIcon: function setIcon($el) {
153
+ var id = $el.data('id'),
154
+ frame = miPicker.frame,
155
+ items = frame.menuItems,
156
+ model = items.get(id);
157
+
158
+ if (model) {
159
+ miPicker.pickIcon(model.toJSON());
160
+ return;
161
+ }
162
+
163
+ model = {
164
+ id: id,
165
+ $el: $el,
166
+ $title: $('#edit-menu-item-title-' + id),
167
+ $inputs: {}
168
+ };
169
+
170
+ // Collect menu item's settings fields and use them
171
+ // as the model's attributes.
172
+ $el.find('div._settings input').each(function () {
173
+ var $input = $(this),
174
+ key = $input.attr('class').replace('_mi-', ''),
175
+ value = $input.val();
176
+
177
+ if (!value) {
178
+ if (_.has(menuIcons.menuSettings, key)) {
179
+ value = menuIcons.menuSettings[key];
180
+ } else if (_.has(menuIcons.settingsFields, key)) {
181
+ value = menuIcons.settingsFields[key]['default'];
182
+ }
183
+ }
184
+
185
+ model[key] = value;
186
+ model.$inputs[key] = $input;
187
+ });
188
+
189
+ items.add(model);
190
+ miPicker.pickIcon(model);
191
+ },
192
+
193
+ /**
194
+ * Unset icon
195
+ *
196
+ * @param {object} $el - jQuery object.
197
+ */
198
+ unsetIcon: function unsetIcon($el) {
199
+ var id = $el.data('id');
200
+
201
+ $el.find('div._settings input').val('');
202
+ $el.trigger('mi:update');
203
+ miPicker.frame.menuItems.remove(id);
204
+ },
205
+
206
+ /**
207
+ * Update valeus of menu item's setting fields
208
+ *
209
+ * When the type and icon is set, this will (re)generate the icon
210
+ * preview on the menu item field.
211
+ *
212
+ * @param {object} e - jQuery event.
213
+ */
214
+ updateField: function updateField(e) {
215
+ var $el = $(e.currentTarget),
216
+ $set = $el.find('a._select'),
217
+ $unset = $el.find('a._remove'),
218
+ type = $el.find('input._mi-type').val(),
219
+ icon = $el.find('input._mi-icon').val(),
220
+ url = $el.find('input._mi-url').val(),
221
+ template;
222
+
223
+ if (type === '' || icon === '' || _.indexOf(menuIcons.activeTypes, type) < 0) {
224
+ $set.text(menuIcons.text.select).attr('title', '');
225
+ $unset.addClass('hidden');
226
+
227
+ return;
228
+ }
229
+
230
+ if (miPicker.templates[type]) {
231
+ template = miPicker.templates[type];
232
+ } else {
233
+ template = miPicker.templates[type] = wp.template('menu-icons-item-field-preview-' + iconPicker.types[type].templateId);
234
+ }
235
+
236
+ $unset.removeClass('hidden');
237
+ $set.attr('title', menuIcons.text.change);
238
+ $set.html(template({
239
+ type: type,
240
+ icon: icon,
241
+ url: url
242
+ }));
243
+ },
244
+
245
+ /**
246
+ * Initialize picker functionality
247
+ *
248
+ * #fires mi:update
249
+ */
250
+ init: function init() {
251
+ miPicker.createFrame();
252
+ $(document).on('click', miPicker.wrapClass, miPicker.setUnset).on('mi:update', miPicker.wrapClass, miPicker.updateField);
253
+
254
+ // Trigger 'mi:update' event to generate the icons on the item fields.
255
+ $(miPicker.wrapClass).trigger('mi:update');
256
+ }
257
+ };
258
+
259
+ miPicker.init();
260
+ })(jQuery);
261
+
262
+ /***/ }),
263
+ /* 1 */
264
+ /***/ (function(module, exports) {
265
+
266
+ (function ($) {
267
+ /**
268
+ * Settings box tabs
269
+ *
270
+ * We can't use core's tabs script here because it will clear the
271
+ * checkboxes upon tab switching
272
+ */
273
+ $('#menu-icons-settings-tabs').on('click', 'a.mi-settings-nav-tab', function (e) {
274
+ var $el = $(this).blur(),
275
+ $target = $('#' + $el.data('type'));
276
+
277
+ e.preventDefault();
278
+ e.stopPropagation();
279
+
280
+ $el.parent().addClass('tabs').siblings().removeClass('tabs');
281
+ $target.removeClass('tabs-panel-inactive').addClass('tabs-panel-active').show().siblings('div.tabs-panel').hide().addClass('tabs-panel-inactive').removeClass('tabs-panel-active');
282
+ }).find('a.mi-settings-nav-tab').first().click();
283
+
284
+ // Settings meta box
285
+ $('#menu-icons-settings-save').on('click', function (e) {
286
+ var $button = $(this).prop('disabled', true),
287
+ $spinner = $button.siblings('span.spinner');
288
+
289
+ e.preventDefault();
290
+ e.stopPropagation();
291
+
292
+ $spinner.css({
293
+ display: 'inline-block',
294
+ visibility: 'visible'
295
+ });
296
+
297
+ $.ajax({
298
+ type: 'POST',
299
+ url: window.menuIcons.ajaxUrls.update,
300
+ data: $('#menu-icons-settings :input').serialize(),
301
+
302
+ success: function success(response) {
303
+ if (response.success && response.data.redirectUrl === true) {
304
+ window.location = response.data.redirectUrl;
305
+ } else {
306
+ $button.prop('disabled', false);
307
+ }
308
+ },
309
+
310
+ always: function always() {
311
+ $spinner.hide();
312
+ }
313
+ });
314
+ });
315
+ })(jQuery);
316
+
317
+ /***/ }),
318
+ /* 2 */
319
+ /***/ (function(module, exports, __webpack_require__) {
320
+
321
+ __webpack_require__(1);
322
+ __webpack_require__(0);
323
+
324
+ /***/ }),
325
+ /* 3 */
326
+ /***/ (function(module, exports, __webpack_require__) {
327
+
328
+ wp.media.model.MenuIconsItemSettingField = __webpack_require__(4);
329
+ wp.media.model.MenuIconsItemSettings = __webpack_require__(5);
330
+ wp.media.model.MenuIconsItem = __webpack_require__(6);
331
+
332
+ wp.media.view.MenuIconsItemSettingField = __webpack_require__(9);
333
+ wp.media.view.MenuIconsItemSettings = __webpack_require__(10);
334
+ wp.media.view.MenuIconsItemPreview = __webpack_require__(8);
335
+ wp.media.view.MenuIconsSidebar = __webpack_require__(11);
336
+ wp.media.view.MediaFrame.MenuIcons = __webpack_require__(7);
337
+
338
+ /***/ }),
339
+ /* 4 */
340
+ /***/ (function(module, exports) {
341
+
342
+ /**
343
+ * wp.media.model.MenuIconsItemSettingField
344
+ *
345
+ * @class
346
+ * @augments Backbone.Model
347
+ */
348
+ var MenuIconsItemSettingField = Backbone.Model.extend({
349
+ defaults: {
350
+ id: '',
351
+ label: '',
352
+ value: '',
353
+ type: 'text'
354
+ }
355
+ });
356
+
357
+ module.exports = MenuIconsItemSettingField;
358
+
359
+ /***/ }),
360
+ /* 5 */
361
+ /***/ (function(module, exports) {
362
+
363
+ /**
364
+ * wp.media.model.MenuIconsItemSettings
365
+ *
366
+ * @class
367
+ * @augments Backbone.Collection
368
+ */
369
+ var MenuIconsItemSettings = Backbone.Collection.extend({
370
+ model: wp.media.model.MenuIconsItemSettingField
371
+ });
372
+
373
+ module.exports = MenuIconsItemSettings;
374
+
375
+ /***/ }),
376
+ /* 6 */
377
+ /***/ (function(module, exports) {
378
+
379
+ /**
380
+ * wp.media.model.MenuIconsItem
381
+ *
382
+ * @class
383
+ * @augments Backbone.Model
384
+ */
385
+ var Item = Backbone.Model.extend({
386
+ initialize: function initialize() {
387
+ this.on('change', this.updateValues, this);
388
+ },
389
+
390
+ /**
391
+ * Update the values of menu item's settings fields
392
+ *
393
+ * #fires mi:update
394
+ */
395
+ updateValues: function updateValues() {
396
+ _.each(this.get('$inputs'), function ($input, key) {
397
+ $input.val(this.get(key));
398
+ }, this);
399
+
400
+ // Trigger the 'mi:update' event to regenerate the icon on the field.
401
+ this.get('$el').trigger('mi:update');
402
+ }
403
+ });
404
+
405
+ module.exports = Item;
406
+
407
+ /***/ }),
408
+ /* 7 */
409
+ /***/ (function(module, exports) {
410
+
411
+ /**
412
+ * wp.media.view.MediaFrame.MenuIcons
413
+ *
414
+ * @class
415
+ * @augments wp.media.view.MediaFrame.IconPicker
416
+ * @augments wp.media.view.MediaFrame.Select
417
+ * @augments wp.media.view.MediaFrame
418
+ * @augments wp.media.view.Frame
419
+ * @augments wp.media.View
420
+ * @augments wp.Backbone.View
421
+ * @augments Backbone.View
422
+ */
423
+
424
+ var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
425
+ initialize: function initialize() {
426
+ this.menuItems = new Backbone.Collection([], {
427
+ model: wp.media.model.MenuIconsItem
428
+ });
429
+
430
+ wp.media.view.MediaFrame.IconPicker.prototype.initialize.apply(this, arguments);
431
+ this.off('open', this.setMenuTabPanelAriaAttributes, this);
432
+ // Set the router ARIA tab panel attributes when the modal opens.
433
+ this.off('open', this.setRouterTabPanelAriaAttributes, this);
434
+
435
+ // Update the menu ARIA tab panel attributes when the content updates.
436
+ this.off('content:render', this.setMenuTabPanelAriaAttributes, this);
437
+ // Update the router ARIA tab panel attributes when the content updates.
438
+ this.off('content:render', this.setRouterTabPanelAriaAttributes, this);
439
+
440
+ this.listenTo(this.target, 'change', this.miUpdateItemProps);
441
+ this.on('select', this.miClearTarget, this);
442
+ },
443
+
444
+ miUpdateItemProps: function miUpdateItemProps(props) {
445
+ var model = this.menuItems.get(props.id);
446
+
447
+ model.set(props.changed);
448
+ },
449
+
450
+ miClearTarget: function miClearTarget() {
451
+ this.target.clear({ silent: true });
452
+ }
453
+ });
454
+
455
+ module.exports = MenuIcons;
456
+
457
+ /***/ }),
458
+ /* 8 */
459
+ /***/ (function(module, exports) {
460
+
461
+ /**
462
+ * wp.media.view.MenuIconsItemPreview
463
+ *
464
+ * @class
465
+ * @augments wp.media.View
466
+ * @augments wp.Backbone.View
467
+ * @augments Backbone.View
468
+ */
469
+ var MenuIconsItemPreview = wp.media.View.extend({
470
+ tagName: 'p',
471
+ className: 'mi-preview menu-item attachment-info',
472
+ events: {
473
+ 'click a': 'preventDefault'
474
+ },
475
+
476
+ initialize: function initialize() {
477
+ wp.media.View.prototype.initialize.apply(this, arguments);
478
+ this.model.on('change', this.render, this);
479
+ },
480
+
481
+ render: function render() {
482
+ var frame = this.controller,
483
+ state = frame.state(),
484
+ selected = state.get('selection').single(),
485
+ props = this.model.toJSON(),
486
+ data = _.extend(props, {
487
+ type: state.id,
488
+ icon: selected.id,
489
+ title: this.model.get('$title').val(),
490
+ url: state.ipGetIconUrl(selected, props.image_size)
491
+ }),
492
+ template = 'menu-icons-item-sidebar-preview-' + iconPicker.types[state.id].templateId + '-';
493
+
494
+ if (data.hide_label) {
495
+ template += 'hide_label';
496
+ } else {
497
+ template += data.position;
498
+ }
499
+
500
+ this.template = wp.media.template(template);
501
+ this.$el.html(this.template(data));
502
+
503
+ return this;
504
+ },
505
+
506
+ preventDefault: function preventDefault(e) {
507
+ e.preventDefault();
508
+ }
509
+ });
510
+
511
+ module.exports = MenuIconsItemPreview;
512
+
513
+ /***/ }),
514
+ /* 9 */
515
+ /***/ (function(module, exports) {
516
+
517
+ var $ = jQuery,
518
+ MenuIconsItemSettingField;
519
+
520
+ /**
521
+ * wp.media.view.MenuIconsItemSettingField
522
+ *
523
+ * @class
524
+ * @augments wp.media.View
525
+ * @augments wp.Backbone.View
526
+ * @augments Backbone.View
527
+ */
528
+ MenuIconsItemSettingField = wp.media.View.extend({
529
+ tagName: 'label',
530
+ className: 'setting',
531
+ events: {
532
+ 'change :input': '_update'
533
+ },
534
+
535
+ initialize: function initialize() {
536
+ wp.media.View.prototype.initialize.apply(this, arguments);
537
+
538
+ this.template = wp.media.template('menu-icons-settings-field-' + this.model.get('type'));
539
+ this.model.on('change', this.render, this);
540
+ },
541
+
542
+ prepare: function prepare() {
543
+ return this.model.toJSON();
544
+ },
545
+
546
+ _update: function _update(e) {
547
+ var value = $(e.currentTarget).val();
548
+
549
+ this.model.set('value', value);
550
+ this.options.item.set(this.model.id, value);
551
+ }
552
+ });
553
+
554
+ module.exports = MenuIconsItemSettingField;
555
+
556
+ /***/ }),
557
+ /* 10 */
558
+ /***/ (function(module, exports) {
559
+
560
+ /**
561
+ * wp.media.view.MenuIconsItemSettings
562
+ *
563
+ * @class
564
+ * @augments wp.media.view.PriorityList
565
+ * @augments wp.media.View
566
+ * @augments wp.Backbone.View
567
+ * @augments Backbone.View
568
+ */
569
+ var MenuIconsItemSettings = wp.media.view.PriorityList.extend({
570
+ className: 'mi-settings attachment-info',
571
+
572
+ prepare: function prepare() {
573
+ _.each(this.collection.map(this.createField, this), function (view) {
574
+ this.set(view.model.id, view);
575
+ }, this);
576
+ },
577
+
578
+ createField: function createField(model) {
579
+ var field = new wp.media.view.MenuIconsItemSettingField({
580
+ item: this.model,
581
+ model: model,
582
+ collection: this.collection
583
+ });
584
+
585
+ return field;
586
+ }
587
+ });
588
+
589
+ module.exports = MenuIconsItemSettings;
590
+
591
+ /***/ }),
592
+ /* 11 */
593
+ /***/ (function(module, exports) {
594
+
595
+ /**
596
+ * wp.media.view.MenuIconsSidebar
597
+ *
598
+ * @class
599
+ * @augments wp.media.view.IconPickerSidebar
600
+ * @augments wp.media.view.Sidebar
601
+ * @augments wp.media.view.PriorityList
602
+ * @augments wp.media.View
603
+ * @augments wp.Backbone.View
604
+ * @augments Backbone.View
605
+ */
606
+ var MenuIconsSidebar = wp.media.view.IconPickerSidebar.extend({
607
+ initialize: function initialize() {
608
+ var title = new wp.media.View({
609
+ tagName: 'h3',
610
+ priority: -10
611
+ });
612
+
613
+ var info = new wp.media.View({
614
+ tagName: 'p',
615
+ className: '_info',
616
+ priority: 1000
617
+ });
618
+
619
+ wp.media.view.IconPickerSidebar.prototype.initialize.apply(this, arguments);
620
+
621
+ title.$el.text(window.menuIcons.text.preview);
622
+ this.set('title', title);
623
+
624
+ info.$el.html(window.menuIcons.text.settingsInfo);
625
+ this.set('info', info);
626
+ },
627
+
628
+ createSingle: function createSingle() {
629
+ this.createPreview();
630
+ this.createSettings();
631
+ },
632
+
633
+ disposeSingle: function disposeSingle() {
634
+ this.unset('preview');
635
+ this.unset('settings');
636
+ },
637
+
638
+ createPreview: function createPreview() {
639
+ var self = this,
640
+ frame = self.controller,
641
+ state = frame.state();
642
+
643
+ // If the selected icon is still being downloaded (image or svg type),
644
+ // wait for it to complete before creating the preview.
645
+ if (state.dfd && state.dfd.state() === 'pending') {
646
+ state.dfd.done(function () {
647
+ self.createPreview();
648
+ });
649
+
650
+ return;
651
+ }
652
+
653
+ self.set('preview', new wp.media.view.MenuIconsItemPreview({
654
+ controller: frame,
655
+ model: frame.target,
656
+ priority: 80
657
+ }));
658
+ },
659
+
660
+ createSettings: function createSettings() {
661
+ var frame = this.controller,
662
+ state = frame.state(),
663
+ fieldIds = state.get('data').settingsFields,
664
+ fields = [];
665
+
666
+ _.each(fieldIds, function (fieldId) {
667
+ var field = window.menuIcons.settingsFields[fieldId],
668
+ model;
669
+
670
+ if (!field) {
671
+ return;
672
+ }
673
+
674
+ model = _.defaults({
675
+ value: frame.target.get(fieldId) || field['default']
676
+ }, field);
677
+
678
+ fields.push(model);
679
+ });
680
+
681
+ if (!fields.length) {
682
+ return;
683
+ }
684
+
685
+ this.set('settings', new wp.media.view.MenuIconsItemSettings({
686
+ controller: this.controller,
687
+ collection: new wp.media.model.MenuIconsItemSettings(fields),
688
+ model: frame.target,
689
+ type: this.options.type,
690
+ priority: 120
691
+ }));
692
+ }
693
+ });
694
+
695
+ module.exports = MenuIconsSidebar;
696
+
697
+ /***/ })
698
+ /******/ ]);
js/src/media/views/frame.js CHANGED
@@ -10,6 +10,7 @@
10
* @augments wp.Backbone.View
11
* @augments Backbone.View
12
*/
13
var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
14
initialize: function() {
15
this.menuItems = new Backbone.Collection([], {
@@ -17,6 +18,14 @@ var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
17
});
18
19
wp.media.view.MediaFrame.IconPicker.prototype.initialize.apply( this, arguments );
20
21
this.listenTo( this.target, 'change', this.miUpdateItemProps );
22
this.on( 'select', this.miClearTarget, this );
10
* @augments wp.Backbone.View
11
* @augments Backbone.View
12
*/
13
+
14
var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
15
initialize: function() {
16
this.menuItems = new Backbone.Collection([], {
18
});
19
20
wp.media.view.MediaFrame.IconPicker.prototype.initialize.apply( this, arguments );
21
+ this.off( 'open', this.setMenuTabPanelAriaAttributes, this );
22
+ // Set the router ARIA tab panel attributes when the modal opens.
23
+ this.off( 'open', this.setRouterTabPanelAriaAttributes, this );
24
+
25
+ // Update the menu ARIA tab panel attributes when the content updates.
26
+ this.off( 'content:render', this.setMenuTabPanelAriaAttributes, this );
27
+ // Update the router ARIA tab panel attributes when the content updates.
28
+ this.off( 'content:render', this.setRouterTabPanelAriaAttributes, this );
29
30
this.listenTo( this.target, 'change', this.miUpdateItemProps );
31
this.on( 'select', this.miClearTarget, this );
languages/menu-icons.pot CHANGED
@@ -1,17 +1,56 @@
1
- # Copyright (C) 2016 Dzikri Aziz
2
# This file is distributed under the GPLv2.
3
msgid ""
4
msgstr ""
5
- "Project-Id-Version: Menu Icons 0.10.1\n"
6
- "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/menu-icons\n"
7
- "POT-Creation-Date: 2016-05-09 00:02:22+00:00\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=utf-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
- "X-Generator: grunt-wp-i18n 0.5.3\n"
15
16
#: includes/picker.php:75
17
msgid "Type"
@@ -25,179 +64,4020 @@ msgstr ""
25
msgid "Icon:"
26
msgstr ""
27
28
- #: includes/picker.php:129 includes/settings.php:684
29
msgid "Select"
30
msgstr ""
31
32
- #: includes/picker.php:130 includes/settings.php:685
33
msgid "Remove"
34
msgstr ""
35
36
- #: includes/settings.php:288
37
msgid "<strong>Menu Icons Settings</strong> have been successfully updated."
38
msgstr ""
39
40
- #: includes/settings.php:289
41
msgid "<strong>Menu Icons Settings</strong> have been successfully reset."
42
msgstr ""
43
44
- #: includes/settings.php:314
45
- msgid "Menu Icons Settings"
46
msgstr ""
47
48
- #: includes/settings.php:362
49
msgid "Hide Label"
50
msgstr ""
51
52
- #: includes/settings.php:367
53
msgid "No"
54
msgstr ""
55
56
- #: includes/settings.php:371
57
msgid "Yes"
58
msgstr ""
59
60
- #: includes/settings.php:378
61
msgid "Position"
62
msgstr ""
63
64
- #: includes/settings.php:383
65
msgid "Before"
66
msgstr ""
67
68
- #: includes/settings.php:387
69
msgid "After"
70
msgstr ""
71
72
- #: includes/settings.php:394
73
msgid "Vertical Align"
74
msgstr ""
75
76
- #: includes/settings.php:399
77
msgid "Super"
78
msgstr ""
79
80
- #: includes/settings.php:403
81
msgid "Top"
82
msgstr ""
83
84
- #: includes/settings.php:407
85
msgid "Text Top"
86
msgstr ""
87
88
- #: includes/settings.php:411
89
msgid "Middle"
90
msgstr ""
91
92
- #: includes/settings.php:415
93
msgid "Baseline"
94
msgstr ""
95
96
- #: includes/settings.php:419
97
msgid "Text Bottom"
98
msgstr ""
99
100
- #: includes/settings.php:423
101
msgid "Bottom"
102
msgstr ""
103
104
- #: includes/settings.php:427
105
msgid "Sub"
106
msgstr ""
107
108
- #: includes/settings.php:434
109
msgid "Font Size"
110
msgstr ""
111
112
- #: includes/settings.php:445
113
msgid "SVG Width"
114
msgstr ""
115
116
- #: includes/settings.php:456
117
msgid "Image Size"
118
msgstr ""
119
120
- #: includes/settings.php:496
121
- msgid "Global"
122
msgstr ""
123
124
- #: includes/settings.php:497
125
- msgid "Global settings"
126
msgstr ""
127
128
- #: includes/settings.php:502
129
- msgid "Icon Types"
130
msgstr ""
131
132
- #: includes/settings.php:518
133
- msgid "Current Menu"
134
msgstr ""
135
136
- #: includes/settings.php:520
137
- msgid "\"%s\" menu settings"
138
msgstr ""
139
140
- #: includes/settings.php:586 includes/settings.php:608
141
- msgid "Extensions"
142
msgstr ""
143
144
- #: includes/settings.php:627
145
- msgid "Discard all changes and reset to default state"
146
msgstr ""
147
148
- #: includes/settings.php:628
149
- msgid "Reset"
150
msgstr ""
151
152
- #: includes/settings.php:637
153
- msgid "Save Settings"
154
msgstr ""
155
156
- #: includes/settings.php:683
157
- msgid "Select Icon"
158
msgstr ""
159
160
- #: includes/settings.php:686
161
- msgid "Change"
162
msgstr ""
163
164
- #: includes/settings.php:687
165
- msgid "All"
166
msgstr ""
167
168
- #: includes/settings.php:688
169
- msgid "Preview"
170
msgstr ""
171
172
- #: includes/settings.php:690
173
- msgid ""
174
- "Please note that the actual look of the icons on the front-end will also be "
175
- "affected by your active theme's style. You can use %s if you need to "
176
- "override it."
177
msgstr ""
178
179
- #: menu-icons.php:132
180
- msgid "Menu Icons: No registered icon types found."
181
msgstr ""
182
183
- #: menu-icons.php:161
184
msgid ""
185
- "Looks like Menu Icons was installed via Composer. Please activate Icon "
186
- "Picker first."
187
msgstr ""
188
189
- #. Plugin Name of the plugin/theme
190
- msgid "Menu Icons"
191
msgstr ""
192
193
- #. Author URI of the plugin/theme
194
- msgid "http://kucrut.org/"
195
msgstr ""
196
197
- #. Description of the plugin/theme
198
- msgid "Spice up your navigation menus with pretty icons, easily."
199
msgstr ""
200
201
- #. Author of the plugin/theme
202
- msgid "Dzikri Aziz"