-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathsettings.php
More file actions
779 lines (693 loc) · 20.1 KB
/
settings.php
File metadata and controls
779 lines (693 loc) · 20.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
<?php
/**
* Settings
*
* @package Menu_Icons
* @author Dzikri Aziz <kvcrvt@gmail.com>
*/
/**
* Menu Icons Settings module
*/
final class Menu_Icons_Settings {
const UPDATE_KEY = 'menu-icons-settings-update';
const RESET_KEY = 'menu-icons-settings-reset';
const TRANSIENT_KEY = 'menu_icons_message';
/**
* Default setting values
*
* @since 0.3.0
* @var array
* @access protected
*/
protected static $defaults = array(
'global' => array(
'icon_types' => array( 'dashicons' ),
),
);
/**
* Setting values
*
* @since 0.3.0
* @var array
* @access protected
*/
protected static $settings = array();
/**
* Script dependencies
*
* @since 0.9.0
* @access protected
* @var array
*/
protected static $script_deps = array( 'jquery' );
/**
* Settings init
*
* @since 0.3.0
*/
public static function init() {
// Include Menu Icons for Block Editor
if ( class_exists( '\ThemeIsle\GutenbergMenuIcons' ) ) {
\ThemeIsle\GutenbergMenuIcons::instance();
add_action( 'enqueue_block_assets', array( __CLASS__, '_enqueue_font_awesome' ) );
}
/**
* Allow themes/plugins to override the default settings
*
* @since 0.9.0
*
* @param array $default_settings Default settings.
*/
self::$defaults = apply_filters( 'menu_icons_settings_defaults', self::$defaults );
self::$settings = get_option( 'menu-icons', self::$defaults );
foreach ( self::$settings as $key => &$value ) {
if ( 'global' === $key ) {
// Remove unregistered icon types.
$value['icon_types'] = array_values(
array_intersect(
array_keys( Menu_Icons::get( 'types' ) ),
array_filter( (array) $value['icon_types'] )
)
);
} else {
// Backward-compatibility.
if ( isset( $value['width'] ) && ! isset( $value['svg_width'] ) ) {
$value['svg_width'] = $value['width'];
}
unset( $value['width'] );
}
}
unset( $value );
/**
* Allow themes/plugins to override the settings
*
* @since 0.9.0
*
* @param array $settings Menu Icons settings.
*/
self::$settings = apply_filters( 'menu_icons_settings', self::$settings );
if ( self::is_menu_icons_disabled_for_menu() ) {
return;
}
if ( ! empty( self::$settings['global']['icon_types'] ) ) {
require_once Menu_Icons::get( 'dir' ) . 'includes/picker.php';
Menu_Icons_Picker::init();
self::$script_deps[] = 'icon-picker';
}
add_action( 'load-nav-menus.php', array( __CLASS__, '_load_nav_menus' ), 1 );
add_action( 'wp_ajax_menu_icons_update_settings', array( __CLASS__, '_ajax_menu_icons_update_settings' ) );
}
/**
* Check if menu icons is disabled for a menu
*
* @since 0.8.0
*
* @param int $menu_id Menu ID. Defaults to current menu being edited.
*
* @return bool
*/
public static function is_menu_icons_disabled_for_menu( $menu_id = 0 ) {
if ( empty( $menu_id ) ) {
$menu_id = self::get_current_menu_id();
}
// When we're creating a new menu or the recently edited menu
// could not be found.
if ( empty( $menu_id ) ) {
return true;
}
$menu_settings = self::get_menu_settings( $menu_id );
$is_disabled = ! empty( $menu_settings['disabled'] );
return $is_disabled;
}
/**
* Get ID of menu being edited
*
* @since 0.7.0
* @since 0.8.0 Get the recently edited menu from user option.
*
* @return int
*/
public static function get_current_menu_id() {
global $nav_menu_selected_id;
if ( ! empty( $nav_menu_selected_id ) ) {
return $nav_menu_selected_id;
}
if ( is_admin() && isset( $_REQUEST['menu'] ) ) {
$menu_id = absint( $_REQUEST['menu'] );
} else {
$menu_id = absint( get_user_option( 'nav_menu_recently_edited' ) );
}
return $menu_id;
}
/**
* Get menu settings
*
* @since 0.3.0
*
* @param int $menu_id
*
* @return array
*/
public static function get_menu_settings( $menu_id ) {
$menu_settings = self::get( sprintf( 'menu_%d', $menu_id ) );
$menu_settings = apply_filters( 'menu_icons_menu_settings', $menu_settings, $menu_id );
if ( ! is_array( $menu_settings ) ) {
$menu_settings = array();
}
return $menu_settings;
}
/**
* Get setting value
*
* @since 0.3.0
* @return mixed
*/
public static function get() {
$args = func_get_args();
return kucrut_get_array_value_deep( self::$settings, $args );
}
/**
* Prepare wp-admin/nav-menus.php page
*
* @since 0.3.0
* @wp_hook action load-nav-menus.php
*/
public static function _load_nav_menus() {
add_action( 'admin_enqueue_scripts', array( __CLASS__, '_enqueue_assets' ), 99 );
/**
* Allow settings meta box to be disabled.
*
* @since 0.4.0
*
* @param bool $disabled Defaults to FALSE.
*/
$settings_disabled = apply_filters( 'menu_icons_disable_settings', false );
if ( true === $settings_disabled ) {
return;
}
self::_maybe_update_settings();
self::_add_settings_meta_box();
add_action( 'admin_notices', array( __CLASS__, '_admin_notices' ) );
}
/**
* Update settings
*
* @since 0.3.0
*/
public static function _maybe_update_settings() {
if ( ! empty( $_POST['menu-icons']['settings'] ) ) {
check_admin_referer( self::UPDATE_KEY, self::UPDATE_KEY );
$redirect_url = self::_update_settings( $_POST['menu-icons']['settings'] ); // Input var okay.
wp_redirect( $redirect_url );
} elseif ( ! empty( $_REQUEST[ self::RESET_KEY ] ) ) {
check_admin_referer( self::RESET_KEY, self::RESET_KEY );
wp_redirect( self::_reset_settings() );
}
}
/**
* Update settings
*
* @since 0.7.0
* @access protected
*
* @param array $values Settings values.
*
* @return string Redirect URL.
*/
protected static function _update_settings( $values ) {
update_option(
'menu-icons',
wp_parse_args(
kucrut_validate( $values ),
self::$settings
)
);
set_transient( self::TRANSIENT_KEY, 'updated', 30 );
$redirect_url = remove_query_arg(
array( 'menu-icons-reset' ),
wp_get_referer()
);
return $redirect_url;
}
/**
* Reset settings
*
* @since 0.7.0
* @access protected
* @return string Redirect URL.
*/
protected static function _reset_settings() {
delete_option( 'menu-icons' );
set_transient( self::TRANSIENT_KEY, 'reset', 30 );
$redirect_url = remove_query_arg(
array( self::RESET_KEY, 'menu-icons-updated' ),
wp_get_referer()
);
return $redirect_url;
}
/**
* Settings meta box
*
* @since 0.3.0
* @access private
*/
private static function _add_settings_meta_box() {
add_meta_box(
'menu-icons-settings',
__( 'Menu Icons Settings', 'menu-icons' ),
array( __CLASS__, '_meta_box' ),
'nav-menus',
'side',
'low',
array()
);
}
/**
* Update settings via ajax
*
* @since 0.7.0
* @wp_hook action wp_ajax_menu_icons_update_settings
*/
public static function _ajax_menu_icons_update_settings() {
check_ajax_referer( self::UPDATE_KEY, self::UPDATE_KEY );
if ( empty( $_POST['menu-icons']['settings'] ) ) {
wp_send_json_error();
}
$redirect_url = self::_update_settings( $_POST['menu-icons']['settings'] ); // Input var okay.
wp_send_json_success( array( 'redirectUrl' => $redirect_url ) );
}
/**
* Print admin notices
*
* @since 0.3.0
* @wp_hook action admin_notices
*/
public static function _admin_notices() {
$messages = array(
'updated' => __( '<strong>Menu Icons Settings</strong> have been successfully updated.', 'menu-icons' ),
'reset' => __( '<strong>Menu Icons Settings</strong> have been successfully reset.', 'menu-icons' ),
);
$message_type = get_transient( self::TRANSIENT_KEY );
if ( ! empty( $message_type ) && ! empty( $messages[ $message_type ] ) ) {
printf(
'<div class="updated notice is-dismissible"><p>%s</p></div>',
wp_kses( $messages[ $message_type ], array( 'strong' => true ) )
);
}
delete_transient( self::TRANSIENT_KEY );
}
/**
* Settings meta box
*
* @since 0.3.0
*/
public static function _meta_box() {
?>
<div class="taxonomydiv">
<ul id="menu-icons-settings-tabs" class="taxonomy-tabs add-menu-item-tabs hide-if-no-js">
<?php foreach ( self::get_fields() as $section ) : ?>
<?php
printf(
'<li><a href="#" title="%s" class="mi-settings-nav-tab" data-type="menu-icons-settings-%s">%s</a></li>',
esc_attr( $section['description'] ),
esc_attr( $section['id'] ),
esc_html( $section['title'] )
);
?>
<?php endforeach; ?>
</ul>
<?php foreach ( self::_get_fields() as $section_index => $section ) : ?>
<div id="menu-icons-settings-<?php echo esc_attr( $section['id'] ) ?>"
class="tabs-panel _<?php echo esc_attr( $section_index ) ?>">
<h4 class="hide-if-js"><?php echo esc_html( $section['title'] ) ?></h4>
<?php foreach ( $section['fields'] as $field ) : ?>
<div class="_field">
<?php
printf(
'<label for="%s" class="_main">%s</label>',
esc_attr( $field->id ),
esc_html( $field->label )
);
// Help text.
if ( $field->help_text ) :
printf( '<i>%s</i>', esc_html( $field->help_text ) );
endif;
$field->render();
?>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
<p class="submitbox button-controls">
<?php wp_nonce_field( self::UPDATE_KEY, self::UPDATE_KEY ) ?>
<span class="list-controls">
<?php
printf(
'<a href="%s" title="%s" class="select-all submitdelete">%s</a>',
esc_url(
wp_nonce_url(
admin_url( '/nav-menus.php' ),
self::RESET_KEY,
self::RESET_KEY
)
),
esc_attr__( 'Discard all changes and reset to default state', 'menu-icons' ),
esc_html__( 'Reset', 'menu-icons' )
);
?>
</span>
<span class="add-to-menu">
<span class="spinner"></span>
<?php
submit_button(
__( 'Save Settings', 'menu-icons' ),
'secondary',
'menu-icons-settings-save',
false
);
?>
</span>
</p>
<?php
}
/**
* Get settings sections
*
* @since 0.3.0
* @uses apply_filters() Calls 'menu_icons_settings_sections'.
* @return array
*/
public static function get_fields() {
$menu_id = self::get_current_menu_id();
$icon_types = wp_list_pluck( Menu_Icons::get( 'types' ), 'name' );
asort( $icon_types );
$sections = array(
'global' => array(
'id' => 'global',
'title' => __( 'Global', 'menu-icons' ),
'description' => __( 'Global settings', 'menu-icons' ),
'fields' => array(
array(
'id' => 'icon_types',
'type' => 'checkbox',
'label' => __( 'Icon Types', 'menu-icons' ),
'choices' => $icon_types,
'value' => self::get( 'global', 'icon_types' ),
),
array(
'id' => 'fa5_extra_icons',
'type' => 'textarea',
'label' => __( 'FA Custom Icon Classes', 'menu-icons' ),
'value' => self::get( 'global', 'fa5_extra_icons' ),
'help_text' => '( comma separated icons )',
),
),
'args' => array(),
),
);
if ( ! empty( $menu_id ) ) {
$menu_term = get_term( $menu_id, 'nav_menu' );
$menu_key = sprintf( 'menu_%d', $menu_id );
$menu_settings = self::get_menu_settings( $menu_id );
$sections['menu'] = array(
'id' => $menu_key,
'title' => __( 'Current Menu', 'menu-icons' ),
'description' => sprintf(
// translators: %s - the name of the menu.
__( '"%s" menu settings', 'menu-icons' ),
apply_filters( 'single_term_title', $menu_term->name )
),
'fields' => self::get_settings_fields( $menu_settings ),
'args' => array( 'inline_description' => true ),
);
}
return apply_filters( 'menu_icons_settings_sections', $sections, $menu_id );
}
/**
* Get settings fields
*
* @since 0.4.0
*
* @param array $values Values to be applied to each field.
*
* @uses apply_filters() Calls 'menu_icons_settings_fields'.
* @return array
*/
public static function get_settings_fields( array $values = array() ) {
$fields = array(
'hide_label' => array(
'id' => 'hide_label',
'type' => 'select',
'label' => __( 'Hide Label', 'menu-icons' ),
'default' => '',
'choices' => array(
array(
'value' => '',
'label' => __( 'No', 'menu-icons' ),
),
array(
'value' => '1',
'label' => __( 'Yes', 'menu-icons' ),
),
),
),
'position' => array(
'id' => 'position',
'type' => 'select',
'label' => __( 'Position', 'menu-icons' ),
'default' => 'before',
'choices' => array(
array(
'value' => 'before',
'label' => __( 'Before', 'menu-icons' ),
),
array(
'value' => 'after',
'label' => __( 'After', 'menu-icons' ),
),
),
),
'vertical_align' => array(
'id' => 'vertical_align',
'type' => 'select',
'label' => __( 'Vertical Align', 'menu-icons' ),
'default' => 'middle',
'choices' => array(
array(
'value' => 'top',
'label' => __( 'Top', 'menu-icons' ),
),
array(
'value' => 'middle',
'label' => __( 'Middle', 'menu-icons' ),
),
array(
'value' => 'baseline',
'label' => __( 'Baseline', 'menu-icons' ),
),
array(
'value' => 'bottom',
'label' => __( 'Bottom', 'menu-icons' ),
),
),
),
'font_size' => array(
'id' => 'font_size',
'type' => 'number',
'label' => __( 'Font Size', 'menu-icons' ),
'default' => '1.2',
'description' => 'em',
'attributes' => array(
'min' => '0.1',
'step' => '0.1',
),
),
'svg_width' => array(
'id' => 'svg_width',
'type' => 'number',
'label' => __( 'SVG Width', 'menu-icons' ),
'default' => '1',
'description' => 'em',
'attributes' => array(
'min' => '.5',
'step' => '.1',
),
),
'image_size' => array(
'id' => 'image_size',
'type' => 'select',
'label' => __( 'Image Size', 'menu-icons' ),
'default' => 'thumbnail',
'choices' => kucrut_get_image_sizes(),
),
);
$fields = apply_filters( 'menu_icons_settings_fields', $fields );
foreach ( $fields as &$field ) {
if ( isset( $values[ $field['id'] ] ) ) {
$field['value'] = $values[ $field['id'] ];
}
if ( ! isset( $field['value'] ) && isset( $field['default'] ) ) {
$field['value'] = $field['default'];
}
}
unset( $field );
return $fields;
}
/**
* Get processed settings fields
*
* @since 0.3.0
* @access private
* @return array
*/
private static function _get_fields() {
if ( ! class_exists( 'Kucrut_Form_Field' ) ) {
require_once Menu_Icons::get( 'dir' ) . 'includes/library/form-fields.php';
}
$keys = array( 'menu-icons', 'settings' );
$sections = self::get_fields();
foreach ( $sections as &$section ) {
$_keys = array_merge( $keys, array( $section['id'] ) );
$_args = array_merge( array( 'keys' => $_keys ), $section['args'] );
foreach ( $section['fields'] as &$field ) {
$field = Kucrut_Form_Field::create( $field, $_args );
}
unset( $field );
}
unset( $section );
return $sections;
}
/**
* Enqueue scripts & styles for Block Icons
*
* @since 0.3.0
* @wp_hook action enqueue_block_assets
*/
public static function _enqueue_font_awesome() {
$url = Menu_Icons::get( 'url' );
wp_register_style(
'font-awesome-5',
"{$url}css/fontawesome/css/all.min.css"
);
}
/**
* Enqueue scripts & styles for Appearance > Menus page
*
* @since 0.3.0
* @wp_hook action admin_enqueue_scripts
*/
public static function _enqueue_assets() {
$url = Menu_Icons::get( 'url' );
$suffix = kucrut_get_script_suffix();
if ( defined( 'MENU_ICONS_SCRIPT_DEBUG' ) && MENU_ICONS_SCRIPT_DEBUG ) {
$script_url = '//localhost:8081/';
} else {
$script_url = $url;
}
wp_enqueue_style(
'menu-icons',
"{$url}css/admin{$suffix}.css",
false,
Menu_Icons::VERSION
);
wp_enqueue_script(
'menu-icons',
"{$script_url}js/admin{$suffix}.js",
self::$script_deps,
Menu_Icons::VERSION,
true
);
$customizer_url = add_query_arg(
array(
'autofocus[section]' => 'custom_css',
'return' => admin_url( 'nav-menus.php' ),
),
admin_url( 'customize.php' )
);
/**
* Allow plugins/themes to filter the settings' JS data
*
* @since 0.9.0
*
* @param array $js_data JS Data.
*/
$menu_current_theme = '';
$theme = wp_get_theme();
if ( ! empty( $theme ) ) {
if ( is_child_theme() && $theme->parent() ) {
$menu_current_theme = $theme->parent()->get( 'Name' );
} else {
$menu_current_theme = $theme->get( 'Name' );
}
}
$upsell_notices = array();
$box_data = '<div id="menu-icons-sidebar">';
if ( ( $menu_current_theme != 'Neve' ) ) {
$upsell_notices['neve'] = array(
'content' => wp_sprintf( '<div class="menu-icon-notice-popup-img"><img src="%s"/></div><div class="menu-icon-notice-popup"><h4>%s</h4>%s', plugin_dir_url( __FILE__ ) . '../images/neve-theme.jpg', __( 'Check-out our latest lightweight FREE theme - Neve', 'menu-icons' ), __( 'Neve’s mobile-first approach, compatibility with AMP and popular page-builders makes website building accessible for everyone.', 'menu-icons' ) ),
'url' => add_query_arg(
array(
'theme' => 'neve',
),
admin_url( 'theme-install.php' )
),
'btn_text' => __( 'Preview Neve', 'menu-icons' ),
);
}
if ( ! in_array( 'otter-blocks/otter-blocks.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) ) {
$upsell_notices['otter-blocks'] = array(
'content' => wp_sprintf( '<div class="menu-icon-notice-popup-img"><img src="%s"/></div><div class="menu-icon-notice-popup"><h4>%s</h4>%s', plugin_dir_url( __FILE__ ) . '../images/otter-block.png', __( 'Build professional pages with Otter Blocks', 'menu-icons' ), __( 'Otter is a dynamic collection of page building blocks and templates, covering all the elements you need to build your WordPress site.', 'menu-icons' ) ),
'url' => add_query_arg(
array(
'tab' => 'plugin-information',
'plugin' => 'otter-blocks',
'TB_iframe' => true,
'width' => 772,
'height' => 551,
),
admin_url( 'plugin-install.php' )
),
'btn_text' => __( 'Preview Otter Blocks', 'menu-icons' ),
);
}
if ( ! empty( $upsell_notices ) ) {
$rand_key = array_rand( $upsell_notices );
$menu_upgrade_hestia_box_text = $upsell_notices[ $rand_key ]['content'];
$box_data .= '<div class="nv-upgrade-notice postbox new-card">';
$box_data .= wp_kses_post( wpautop( $menu_upgrade_hestia_box_text ) );
$box_data .= '<a class="button" href="' . $upsell_notices[ $rand_key ]['url'] . '" target="_blank">' . $upsell_notices[ $rand_key ]['btn_text'] . '</a>';
$box_data .= '</div></div>';
}
$js_data = apply_filters(
'menu_icons_settings_js_data',
array(
'text' => array(
'title' => __( 'Select Icon', 'menu-icons' ),
'select' => __( 'Select', 'menu-icons' ),
'remove' => __( 'Remove', 'menu-icons' ),
'change' => __( 'Change', 'menu-icons' ),
'all' => __( 'All', 'menu-icons' ),
'preview' => __( 'Preview', 'menu-icons' ),
'settingsInfo' => sprintf(
// translators: %2$s - a link to the Customizer with the label `the customizer`.
'<div> %1$s <p>' . esc_html__( 'Please note that the actual look of the icons on the front-end will also be affected by the style of your active theme. You can add your own CSS using %2$s.', 'menu-icons' ) . '</p></div>',
$box_data,
sprintf(
'<a href="%s">%s</a>',
esc_url( $customizer_url ),
esc_html__( 'the customizer', 'menu-icons' )
)
),
),
'settingsFields' => self::get_settings_fields(),
'activeTypes' => self::get( 'global', 'icon_types' ),
'ajaxUrls' => array(
'update' => add_query_arg( 'action', 'menu_icons_update_settings', admin_url( '/admin-ajax.php' ) ),
),
'menuSettings' => self::get_menu_settings( self::get_current_menu_id() ),
)
);
wp_localize_script( 'menu-icons', 'menuIcons', $js_data );
}
}