WP Mobile Menu - Version 2.8.2.5

Version Description

  • New! - Proof of concept new Elementor widget for the Let Menu button
  • New! - Logo is now translated with WPML to use different mobile header logos per language
  • New! - Closing menu with enter is now possible when focusing on the close button
  • Fix! - Improve Onboarding
  • Fix! - Improve UX Settings in admin area making it easier
  • Fix! - Complete removal of TitanFramework
  • Fix! - Adding more acessibility practices in the menus
  • Fix! - Code refactoring for better organization
Download this release

Release Info

Developer takanakui
Plugin Icon 128x128 WP Mobile Menu
Version 2.8.2.5
Comparing to
See all releases

Code changes from version 2.8.2.4 to 2.8.2.5

Files changed (98) hide show
  1. includes/assets/cart-icon.png +0 -0
  2. includes/assets/freshlight-product.png +0 -0
  3. includes/assets/language-icon.png +0 -0
  4. includes/assets/left-menu-icon.png +0 -0
  5. includes/assets/logo-icon.png +0 -0
  6. includes/assets/logo_mobile_menu.png +0 -0
  7. includes/assets/mobile_hamburger_menu_option.png +0 -0
  8. includes/assets/mobile_header.png +0 -0
  9. includes/assets/mobile_menu_welcome.jpg +0 -0
  10. includes/assets/product-filter-icon.png +0 -0
  11. includes/assets/right-menu-icon.png +0 -0
  12. includes/assets/search-icon.png +0 -0
  13. includes/assets/svgs/cart.svg +17 -0
  14. includes/assets/svgs/search.svg +8 -0
  15. includes/class-wp-mobile-menu-core.php +209 -156
  16. includes/class-wp-mobile-menu-options.php +291 -170
  17. includes/class-wp-mobile-menu-walker-nav-menu.php +4 -3
  18. includes/css/mobmenu-admin.css +207 -106
  19. includes/css/mobmenu.css +4 -1
  20. includes/dynamic-style.php +125 -124
  21. includes/js/mobmenu-admin.js +439 -124
  22. includes/js/mobmenu.js +28 -3
  23. {options-framework → includes/plugin-settings}/css/admin-styles.css +95 -95
  24. {options-framework → includes/plugin-settings}/css/admin-theme-customizer-styles.css +55 -55
  25. {options-framework → includes/plugin-settings}/css/class-option-date.css +46 -46
  26. {options-framework → includes/plugin-settings}/css/class-option-font.css +19 -19
  27. {options-framework → includes/plugin-settings}/css/class-option-select.css +2 -2
  28. {options-framework → includes/plugin-settings}/css/select2/select2.min.css +0 -0
  29. {options-framework → includes/plugin-settings}/inc/scssphp/LICENSE.md +0 -0
  30. {options-framework → includes/plugin-settings}/inc/scssphp/README.md +0 -0
  31. {options-framework → includes/plugin-settings}/inc/scssphp/composer.json +0 -0
  32. {options-framework → includes/plugin-settings}/inc/scssphp/scss.inc.php +10 -174
  33. {options-framework → includes/plugin-settings}/js/admin-styling.js +1 -1
  34. {options-framework → includes/plugin-settings}/js/dev/admin-styling.js +1 -1
  35. {options-framework → includes/plugin-settings}/js/dev/jquery-ui-timepicker-addon.js +0 -0
  36. {options-framework → includes/plugin-settings}/js/dev/serialize.js +0 -0
  37. {options-framework → includes/plugin-settings}/js/dev/wp-color-picker-alpha.js +0 -0
  38. {options-framework → includes/plugin-settings}/js/jquery-ui-timepicker-addon.js +0 -0
  39. includes/plugin-settings/js/min/admin-styling-min.js +1 -0
  40. {options-framework → includes/plugin-settings}/js/min/jquery-ui-timepicker-addon-min.js +0 -0
  41. {options-framework → includes/plugin-settings}/js/min/serialize-min.js +0 -0
  42. {options-framework → includes/plugin-settings}/js/min/wp-color-picker-alpha-min.js +0 -0
  43. {options-framework → includes/plugin-settings}/js/multicheck-select-all.js +0 -0
  44. {options-framework → includes/plugin-settings}/js/select2/select2.min.js +0 -0
  45. {options-framework → includes/plugin-settings}/js/serialize.js +0 -0
  46. {options-framework → includes/plugin-settings}/js/wp-color-picker-alpha.js +0 -0
  47. {options-framework → includes/plugin-settings}/lib/class-admin-notification.php +1 -1
  48. {options-framework → includes/plugin-settings}/lib/class-admin-page.php +33 -67
  49. {options-framework → includes/plugin-settings}/lib/class-admin-tab.php +50 -35
  50. {options-framework → includes/plugin-settings}/lib/class-meta-box.php +7 -8
  51. options-framework/lib/class-titan-framework.php → includes/plugin-settings/lib/class-mobile-menu-options.php +42 -318
  52. options-framework/lib/class-titan-css.php → includes/plugin-settings/lib/class-mobmenu-css.php +28 -45
  53. {options-framework → includes/plugin-settings}/lib/class-option-ajax-button.php +4 -4
  54. {options-framework → includes/plugin-settings}/lib/class-option-checkbox.php +1 -1
  55. {options-framework → includes/plugin-settings}/lib/class-option-code.php +10 -28
  56. {options-framework → includes/plugin-settings}/lib/class-option-color.php +6 -6
  57. {options-framework → includes/plugin-settings}/lib/class-option-custom.php +2 -2
  58. {options-framework → includes/plugin-settings}/lib/class-option-date.php +7 -7
  59. {options-framework → includes/plugin-settings}/lib/class-option-editor.php +1 -1
  60. {options-framework → includes/plugin-settings}/lib/class-option-enable.php +4 -4
  61. includes/plugin-settings/lib/class-option-file.php +219 -0
  62. {options-framework → includes/plugin-settings}/lib/class-option-font.php +77 -94
  63. {options-framework → includes/plugin-settings}/lib/class-option-group.php +7 -7
  64. {options-framework → includes/plugin-settings}/lib/class-option-heading.php +3 -3
  65. {options-framework → includes/plugin-settings}/lib/class-option-iframe.php +2 -2
  66. {options-framework → includes/plugin-settings}/lib/class-option-multicheck-categories.php +1 -1
  67. {options-framework → includes/plugin-settings}/lib/class-option-multicheck-pages.php +1 -1
  68. {options-framework → includes/plugin-settings}/lib/class-option-multicheck-post-types.php +2 -2
  69. {options-framework → includes/plugin-settings}/lib/class-option-multicheck-posts.php +1 -1
  70. {options-framework → includes/plugin-settings}/lib/class-option-multicheck.php +4 -4
  71. {options-framework → includes/plugin-settings}/lib/class-option-note.php +1 -1
  72. {options-framework → includes/plugin-settings}/lib/class-option-number.php +5 -7
  73. {options-framework → includes/plugin-settings}/lib/class-option-radio-image.php +2 -2
  74. {options-framework → includes/plugin-settings}/lib/class-option-radio-palette.php +2 -2
  75. {options-framework → includes/plugin-settings}/lib/class-option-radio.php +1 -1
  76. {options-framework → includes/plugin-settings}/lib/class-option-save.php +1 -1
  77. {options-framework → includes/plugin-settings}/lib/class-option-select-categories.php +1 -1
  78. {options-framework → includes/plugin-settings}/lib/class-option-select-pages.php +1 -1
  79. {options-framework → includes/plugin-settings}/lib/class-option-select-post-types.php +2 -2
  80. {options-framework → includes/plugin-settings}/lib/class-option-select-posts.php +1 -1
  81. {options-framework → includes/plugin-settings}/lib/class-option-select.php +11 -11
  82. {options-framework → includes/plugin-settings}/lib/class-option-separator.php +1 -1
  83. {options-framework → includes/plugin-settings}/lib/class-option-sortable.php +9 -17
  84. {options-framework → includes/plugin-settings}/lib/class-option-text.php +2 -2
  85. {options-framework → includes/plugin-settings}/lib/class-option-textarea.php +1 -1
  86. {options-framework → includes/plugin-settings}/lib/class-option-upload.php +22 -22
  87. {options-framework → includes/plugin-settings}/lib/class-option.php +30 -157
  88. {options-framework → includes/plugin-settings}/lib/functions-googlefonts.php +2 -2
  89. {options-framework → includes/plugin-settings}/lib/functions-utils.php +6 -12
  90. {options-framework → includes/plugin-settings}/lib/iframe-font-preview.php +0 -0
  91. includes/plugin-settings/mobile-menu-options.php +48 -0
  92. includes/widgets/mobile-menu.php +150 -0
  93. mobmenu.php +31 -32
  94. options-framework/js/min/admin-styling-min.js +0 -1
  95. options-framework/lib/class-option-file.php +0 -226
  96. options-framework/lib/class-option-gallery.php +0 -203
  97. options-framework/option-framework.php +0 -134
  98. readme.txt +13 -3
includes/assets/cart-icon.png ADDED
Binary file
includes/assets/freshlight-product.png ADDED
Binary file
includes/assets/language-icon.png ADDED
Binary file
includes/assets/left-menu-icon.png ADDED
Binary file
includes/assets/logo-icon.png ADDED
Binary file
includes/assets/logo_mobile_menu.png ADDED
Binary file
includes/assets/mobile_hamburger_menu_option.png ADDED
Binary file
includes/assets/mobile_header.png ADDED
Binary file
includes/assets/mobile_menu_welcome.jpg ADDED
Binary file
includes/assets/product-filter-icon.png ADDED
Binary file
includes/assets/right-menu-icon.png ADDED
Binary file
includes/assets/search-icon.png ADDED
Binary file
includes/assets/svgs/cart.svg ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ width="32px" height="32px" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
5
+ <g>
6
+ <g>
7
+ <g>
8
+ <path fill="#000 " d="M27.996,8.91C27.949,8.395,27.519,8,27,8h-5V6c0-3.309-2.69-6-6-6c-3.309,0-6,2.691-6,6v2H5
9
+ C4.482,8,4.051,8.395,4.004,8.91l-2,22c-0.025,0.279,0.068,0.557,0.258,0.764C2.451,31.882,2.719,32,3,32h26
10
+ c0.281,0,0.549-0.118,0.738-0.326c0.188-0.207,0.283-0.484,0.258-0.764L27.996,8.91z M12,6c0-2.206,1.795-4,4-4s4,1.794,4,4v2h-8
11
+ V6z M4.096,30l1.817-20H10v2.277C9.404,12.624,9,13.262,9,14c0,1.104,0.896,2,2,2s2-0.896,2-2c0-0.738-0.404-1.376-1-1.723V10h8
12
+ v2.277c-0.596,0.347-1,0.984-1,1.723c0,1.104,0.896,2,2,2c1.104,0,2-0.896,2-2c0-0.738-0.403-1.376-1-1.723V10h4.087l1.817,20
13
+ H4.096z"/>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </svg>
includes/assets/svgs/search.svg ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
3
+ viewBox="0 0 52.966 52.966" style="enable-background:new 0 0 52.966 52.966;" xml:space="preserve">
4
+ <path fill="#000000" d="M51.704,51.273L36.845,35.82c3.79-3.801,6.138-9.041,6.138-14.82c0-11.58-9.42-21-21-21s-21,9.42-21,21s9.42,21,21,21
5
+ c5.083,0,9.748-1.817,13.384-4.832l14.895,15.491c0.196,0.205,0.458,0.307,0.721,0.307c0.25,0,0.499-0.093,0.693-0.279
6
+ C52.074,52.304,52.086,51.671,51.704,51.273z M21.983,40c-10.477,0-19-8.523-19-19s8.523-19,19-19s19,8.523,19,19
7
+ S32.459,40,21.983,40z"/>
8
+ </svg>
includes/class-wp-mobile-menu-core.php CHANGED
@@ -14,7 +14,7 @@ class WP_Mobile_Menu_Core
14
  /**
15
  * @var object
16
  */
17
- public $titan ;
18
  /**
19
  * @var String
20
  */
@@ -57,10 +57,10 @@ class WP_Mobile_Menu_Core
57
  */
58
  public function mobmenu_add_body_class( $classes )
59
  {
60
- $titan = TitanFramework::getInstance( 'mobmenu' );
61
- $display_type = $titan->getOption( 'menu_display_type' );
62
- $lpanel_elements = $titan->getOption( 'left_menu_content_position' );
63
- $rpanel_elements = $titan->getOption( 'right_menu_content_position' );
64
  // If the User profile is being used at the Top of the left panel.
65
  if ( isset( $lpanel_elements[0] ) && 'user-profile' === $lpanel_elements[0] ) {
66
  $classes[] = 'left-mobmenu-user-profile';
@@ -78,15 +78,15 @@ class WP_Mobile_Menu_Core
78
  $menu_display_type = $this->get_menu_display_type( $display_type );
79
  $classes[] = $menu_display_type;
80
  // Check if the Auto-hide Header option is on so it can be added a new class.
81
- if ( $titan->getOption( 'autohide_header' ) ) {
82
  array_push( $classes, 'mob-menu-autohide-header' );
83
  }
84
  // Check if the Auto-hide Footer option is on so it can be added a new class.
85
- if ( $titan->getOption( 'autohide_footer' ) ) {
86
  array_push( $classes, 'mob-menu-autohide-footer' );
87
  }
88
  // Check if the Sliding Menus option is on so it can be added a new class.
89
- if ( $titan->getOption( 'sliding_submenus' ) ) {
90
  array_push( $classes, 'mob-menu-sliding-menus' );
91
  }
92
  return $classes;
@@ -125,17 +125,6 @@ class WP_Mobile_Menu_Core
125
  );
126
  }
127
 
128
- /**
129
- * Dismiss the WP Mobile Menu Pro Banner.
130
- */
131
- public function dismiss_wp_mobile_notice()
132
- {
133
- if ( check_ajax_referer( 'wp-mobile-menu-security-nonce', 'security' ) ) {
134
- update_option( 'wp_mobile_menu_banner_dismissed', 'yes' );
135
- }
136
- wp_die();
137
- }
138
-
139
  /**
140
  * Build the icons HTML.
141
  */
@@ -183,6 +172,85 @@ class WP_Mobile_Menu_Core
183
  wp_die();
184
  }
185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  /**
187
  * Build the WP Mobile Menu Html Markup.
188
  */
@@ -192,8 +260,8 @@ class WP_Mobile_Menu_Core
192
  global $woocommerce ;
193
  $left_logged_in_user = false;
194
  $right_logged_in_user = false;
195
- $titan = TitanFramework::getInstance( 'mobmenu' );
196
- $this->titan = $titan;
197
  $this->mobmenu_depth = 3;
198
  $this->mobmenu_parent_link = '';
199
  $header_search = '';
@@ -203,141 +271,96 @@ class WP_Mobile_Menu_Core
203
  $right_menu_content = '';
204
  $shop_filter = '';
205
  $header_ajax_search = '';
206
- $close_icon = $titan->getOption( 'close_icon_font' );
207
  $this->close_icon = $close_icon;
208
- $submenu_open_icon_font = $titan->getOption( 'submenu_open_icon_font' );
209
- $submenu_close_icon_font = $titan->getOption( 'submenu_close_icon_font' );
210
  $mm_open_cart_menu = '';
211
  $this->logo_content = '';
212
  $this->search_form = '<div class="mm-panel-search-form"><form action="' . esc_url( home_url( '/' ) ) . '" method="get" class="search-form">
213
  <input type="text" name="s" id="s" class="search" placeholder="Search for.." value="' . esc_attr( get_search_query() ) . '" required>
214
  <button type="submit" id="search-submit" class="search-submit"><i class="mob-icon-search-6"></i></button>
215
  </form></div>';
216
- $menu_display_type = $this->get_menu_display_type( $titan->getOption( 'menu_display_type' ) );
217
  $output = '';
218
  $output .= '<div class="mobmenu-overlay"></div>';
219
- $header_text = $titan->getOption( 'header_text' );
220
  if ( '' === $header_text ) {
221
  $header_text = get_bloginfo();
222
  }
223
  $sticky_el_data_detach = '';
224
  $autoclose_menus_el_data = '';
225
  // Check for Sticky elements and add them to the HTML.
226
- if ( $titan->getOption( 'sticky_elements' ) ) {
227
- $sticky_el_data_detach = 'data-detach-el="' . $titan->getOption( 'sticky_elements' ) . '"';
228
  }
229
  // Check for Autoclose submenu option.
230
- if ( $titan->getOption( 'autoclose_submenus' ) ) {
231
- $autoclose_menus_el_data = ' data-autoclose-submenus="' . $titan->getOption( 'autoclose_submenus' ) . '"';
232
  }
233
- if ( $titan->getOption( 'enable_mm_woo_open_cart_menu' ) ) {
234
  $mm_open_cart_menu = ' data-open-cart="true"';
235
  }
236
  $menu_display_class = ' data-menu-display="' . $menu_display_type . '"';
237
  $output .= '<div class="mob-menu-header-holder mobmenu" ' . $menu_display_class . $sticky_el_data_detach . $autoclose_menus_el_data . $mm_open_cart_menu . ' data-open-icon="' . $submenu_open_icon_font . '" data-close-icon="' . $submenu_close_icon_font . '">';
238
  // Left Menu Content.
239
 
240
- if ( $titan->getOption( 'enable_left_menu' ) && !$left_logged_in_user ) {
241
- $left_menu_text = '';
242
- if ( '' !== $titan->getOption( 'left_menu_text' ) ) {
243
- $left_menu_text .= '<span class="left-menu-icon-text">' . __( $titan->getOption( 'left_menu_text' ), 'mobile-menu' ) . '</span>';
244
- }
245
-
246
- if ( $titan->getOption( 'left_menu_icon_action' ) ) {
247
- $left_menu_content .= '<a href="#" class="mobmenu-left-bt mobmenu-trigger-action" data-panel-target="mobmenu-left-panel" aria-label="' . __( 'Left Menu Button', 'mobile-menu' ) . '">';
248
- } else {
249
-
250
- if ( $titan->getOption( 'left_icon_url_target' ) ) {
251
- $left_icon_url_target = '_self';
252
- } else {
253
- $left_icon_url_target = '_blank';
254
- }
255
-
256
- $left_menu_content .= '<a href="' . $titan->getOption( 'left_icon_url' ) . '" target="' . $left_icon_url_target . '" id="mobmenu-center">';
257
- }
258
-
259
- $left_icon_image = wp_get_attachment_image_src( $titan->getOption( 'left_menu_icon' ) );
260
-
261
- if ( $left_icon_image ) {
262
- $left_icon_image = $left_icon_image[0];
263
- } else {
264
- $left_icon_image = '';
265
- }
266
-
267
- $left_menu_icon = $titan->getOption( 'left_menu_icon_new' );
268
- switch ( $left_menu_icon ) {
269
- case 'image':
270
- $left_menu_content .= '<img src="' . $left_icon_image . '" alt="' . __( 'Left Menu Icon', 'mobile-menu' ) . '">';
271
- break;
272
- case 'icon':
273
- $left_menu_content .= '<i class="mob-icon-' . $titan->getOption( 'left_menu_icon_font' ) . ' mob-menu-icon"></i>' . $this->mobmenu_close_button( $close_icon );
274
- break;
275
- case 'animated-icon':
276
- $hamburger_animation = $titan->getOption( 'left_menu_icon_animation' );
277
- $left_menu_content .= '<button class="hamburger hamburger ' . $hamburger_animation . '" type="button" aria-label="Menu" aria-controls="navigation"><span class="hamburger-box"><span class="hamburger-inner"></span></span></button>';
278
- break;
279
- }
280
- $left_menu_content .= $left_menu_text;
281
- $left_menu_content .= '</a>';
282
- $left_menu_content = apply_filters( 'mm_left_menu_filter', $left_menu_content );
283
  }
284
 
285
- if ( !$titan->getOption( 'disabled_logo_text' ) ) {
286
  // Format the Header Branding.
287
- $this->logo_content = $this->format_header_branding( $titan, $header_text );
288
  }
289
  // Right Menu Content.
290
 
291
- if ( $titan->getOption( 'enable_right_menu' ) && !$right_logged_in_user ) {
292
- $right_menu_text = '';
293
- $right_menu_content = apply_filters( 'mm_before_right_menu_filter', $right_menu_content );
294
- if ( '' !== $titan->getOption( 'right_menu_text' ) ) {
295
- $right_menu_text .= '<span class="right-menu-icon-text">' . __( $titan->getOption( 'right_menu_text' ), 'mobile-menu' ) . '</span>';
296
- }
297
-
298
- if ( $titan->getOption( 'right_menu_icon_action' ) ) {
299
- $right_menu_content .= '<a href="#" class="mobmenu-right-bt mobmenu-trigger-action" data-panel-target="mobmenu-right-panel" aria-label="' . __( 'Right Menu Button', 'mobile-menu' ) . '">';
300
- } else {
301
-
302
- if ( $titan->getOption( 'right_icon_url_target' ) ) {
303
- $right_icon_url_target = '_self';
304
- } else {
305
- $right_icon_url_target = '_blank';
306
- }
307
-
308
- $right_menu_content .= '<a href="' . $titan->getOption( 'right_icon_url' ) . '" target="' . $right_icon_url_target . '">';
309
- }
310
-
311
- $right_icon_image = wp_get_attachment_image_src( $titan->getOption( 'right_menu_icon' ) );
312
-
313
- if ( $right_icon_image ) {
314
- $right_icon_image = $right_icon_image[0];
315
- } else {
316
- $right_icon_image = '';
317
- }
318
-
319
- $right_menu_icon = $titan->getOption( 'right_menu_icon_new' );
320
- switch ( $right_menu_icon ) {
321
- case 'image':
322
- $right_menu_content .= '<img src="' . $right_icon_image . '" alt="' . __( 'Right Menu Icon', 'mobile-menu' ) . '">';
323
- break;
324
- case 'icon':
325
- $right_menu_content .= '<i class="mob-icon-' . $titan->getOption( 'right_menu_icon_font' ) . ' mob-menu-icon"></i>' . $this->mobmenu_close_button( $close_icon );
326
- break;
327
- case 'animated-icon':
328
- $hamburger_animation = $titan->getOption( 'right_menu_icon_animation' );
329
- $right_menu_content .= '<button class="hamburger hamburger ' . $hamburger_animation . '" type="button" aria-label="Menu" aria-controls="navigation"><span class="hamburger-box"><span class="hamburger-inner"></span></span></button>';
330
- break;
331
- }
332
- $right_menu_content .= $right_menu_text;
333
- $right_menu_content .= '</a>';
334
- $right_menu_content = apply_filters( 'mm_right_menu_filter', $right_menu_content );
335
  }
336
 
337
  $language_selector = '';
338
  $header_elements_order = array( 'left-menu', 'logo', 'right-menu' );
339
  $header_output = '';
340
- if ( $titan->getOption( 'enable_left_menu' ) ) {
341
  $header_output = '<div class="mobmenul-container">';
342
  }
343
  if ( !empty($header_elements_order) ) {
@@ -357,7 +380,7 @@ class WP_Mobile_Menu_Core
357
  break;
358
  case 'logo':
359
 
360
- if ( $titan->getOption( 'enable_left_menu' ) ) {
361
  $header_output .= '</div>' . $this->logo_content . '<div class="mobmenur-container">';
362
  } else {
363
  $header_output .= $this->logo_content . '<div class="mobmenur-container">';
@@ -379,13 +402,13 @@ class WP_Mobile_Menu_Core
379
  // Echo the Header HTML.
380
  echo $output ;
381
  // Build the left menu panel.
382
- if ( $titan->getOption( 'enable_left_menu' ) && !$left_logged_in_user ) {
383
  $this->build_left_menu_content();
384
  }
385
 
386
- if ( $titan->getOption( 'enable_right_menu' ) && !$right_logged_in_user ) {
387
  $this->mobmenu_parent_link = '';
388
- if ( $titan->getOption( 'right_menu_parent_link_submenu' ) ) {
389
  $this->mobmenu_parent_link = 'mobmenu-parent-link';
390
  }
391
  ?>
@@ -419,7 +442,7 @@ class WP_Mobile_Menu_Core
419
  switch ( $element ) {
420
  case 'right-menu':
421
 
422
- if ( $this->titan->getOption( 'right_menu_tabbed_menus', false ) ) {
423
  $right_menu = $this->display_tabbed_menu( 'right' );
424
  } else {
425
  $right_menu = $this->display_menu( 'right' );
@@ -469,7 +492,7 @@ class WP_Mobile_Menu_Core
469
  global $mm_fs ;
470
  // Build the left menu panel.
471
  $this->mobmenu_parent_link = '';
472
- if ( $this->titan->getOption( 'left_menu_parent_link_submenu' ) ) {
473
  $this->mobmenu_parent_link = 'mobmenu-parent-link';
474
  }
475
  ?>
@@ -504,7 +527,7 @@ class WP_Mobile_Menu_Core
504
  switch ( $element ) {
505
  case 'left-menu':
506
 
507
- if ( $this->titan->getOption( 'left_menu_tabbed_menus', false ) ) {
508
  $left_menu = $this->display_tabbed_menu( 'left' );
509
  } else {
510
  $left_menu = $this->display_menu( 'left' );
@@ -550,8 +573,8 @@ class WP_Mobile_Menu_Core
550
  public function display_menu( $menu )
551
  {
552
  global $mm_fs ;
553
- $titan = TitanFramework::getInstance( 'mobmenu' );
554
- $current_menu = $titan->getOption( $menu . '_menu' );
555
  if ( !is_nav_menu( $current_menu ) ) {
556
  $current_menu = '';
557
  }
@@ -570,7 +593,7 @@ class WP_Mobile_Menu_Core
570
  // Display the menu.
571
  $output = wp_nav_menu( array(
572
  $menu_param => $current_menu,
573
- 'items_wrap' => '<ul id="mobmenu' . $menu . '" role="navigation" aria-label="' . __( 'Main navigation for mobile devices', 'mobile-menu' ) . '">%3$s</ul>',
574
  'fallback_cb' => false,
575
  'depth' => $this->mobmenu_depth,
576
  'walker' => new WP_Mobile_Menu_Walker_Nav_Menu( $menu, '' ),
@@ -599,24 +622,24 @@ class WP_Mobile_Menu_Core
599
  public function display_tabbed_menu( $menu )
600
  {
601
  global $mm_fs ;
602
- $tab_title_1 = $this->titan->getOption( $menu . '_tab_title_1' );
603
- $tab_title_2 = $this->titan->getOption( $menu . '_tab_title_2' );
604
  $output = '<div class="mobmenu-tabs-container"><ul class="mobmenu-tabs-header"><li class="active-tab" data-tab-id="mobmenu-tab-1">' . $tab_title_1 . '</li><li data-tab-id="mobmenu-tab-2">' . $tab_title_2 . '</li></ul>';
605
  $output .= '<div class="mobmenu-tab mobmenu-tab-1 active-tab">';
606
- $current_menu = $this->titan->getOption( $menu . '_menu_tab_1' );
607
  $output .= wp_nav_menu( array(
608
  'menu' => $current_menu,
609
- 'items_wrap' => '<ul id="mobmenu' . $menu . '" role="navigation" aria-label="' . __( 'Main navigation for mobile devices', 'mobile-menu' ) . '">%3$s</ul>',
610
  'fallback_cb' => false,
611
  'depth' => $this->mobmenu_depth,
612
  'walker' => new WP_Mobile_Menu_Walker_Nav_Menu( $menu, '' ),
613
  'echo' => false,
614
  ) );
615
- $current_menu = $this->titan->getOption( $menu . '_menu_tab_2' );
616
  $output .= '</div><div class="mobmenu-tab mobmenu-tab-2">';
617
  $output .= wp_nav_menu( array(
618
  'menu' => $current_menu,
619
- 'items_wrap' => '<ul id="mobmenu' . $menu . '" role="navigation" aria-label="' . __( 'Main navigation for mobile devices', 'mobile-menu' ) . '">%3$s</ul>',
620
  'fallback_cb' => false,
621
  'depth' => $this->mobmenu_depth,
622
  'walker' => new WP_Mobile_Menu_Walker_Nav_Menu( $menu, '' ),
@@ -624,7 +647,7 @@ class WP_Mobile_Menu_Core
624
  ) );
625
  $output .= "</div></div>";
626
  return $output;
627
- $current_menu = $titan->getOption( $menu . '_menu' );
628
  if ( !is_nav_menu( $current_menu ) ) {
629
  $current_menu = '';
630
  }
@@ -643,7 +666,7 @@ class WP_Mobile_Menu_Core
643
  // Display the menu.
644
  $output = wp_nav_menu( array(
645
  $menu_param => $current_menu,
646
- 'items_wrap' => '<ul id="mobmenu' . $menu . '" role="navigation" aria-label="' . __( 'Main navigation for mobile devices', 'mobile-menu' ) . '">%3$s</ul>',
647
  'fallback_cb' => false,
648
  'depth' => $this->mobmenu_depth,
649
  'walker' => new WP_Mobile_Menu_Walker_Nav_Menu( $menu, '' ),
@@ -681,6 +704,20 @@ class WP_Mobile_Menu_Core
681
 
682
  }
683
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
684
  /**
685
  * Register the Mobile Menus.
686
  */
@@ -699,13 +736,27 @@ class WP_Mobile_Menu_Core
699
  * Format Header Branding (Logo + Text).
700
  *
701
  * @since 2.6
702
- * @var $titan
703
  * @var $header_text
704
  */
705
- public function format_header_branding( $titan, $header_text )
706
  {
707
  global $mm_fs ;
708
- $logo_img = wp_get_attachment_image_src( $titan->getOption( 'logo_img' ), 'full' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
709
 
710
  if ( $logo_img == null ) {
711
  $logo_img = '';
@@ -716,11 +767,11 @@ class WP_Mobile_Menu_Core
716
  $logo_output = '';
717
  $logo_url = '';
718
  $logo_url_end = '';
719
- $logo_alt = get_post_meta( intval( $titan->getOption( 'logo_img' ) ), '_wp_attachment_image_alt', true );
720
  // Retina Logo.
721
 
722
- if ( $titan->getOption( 'logo_img_retina' ) ) {
723
- $logo_img_retina = wp_get_attachment_image_src( $titan->getOption( 'logo_img_retina' ), 'full' );
724
 
725
  if ( $logo_img_retina == null ) {
726
  $logo_img_retina = '';
@@ -728,16 +779,16 @@ class WP_Mobile_Menu_Core
728
  $logo_img_retina = $logo_img_retina[0];
729
  }
730
 
731
- $logo_img_retina_metadata = wp_get_attachment_metadata( $titan->getOption( 'logo_img_retina' ) );
732
  }
733
 
734
 
735
- if ( $titan->getOption( 'disabled_logo_url' ) ) {
736
  $logo_url = '<h3 class="headertext">';
737
  $logo_url_end = '</h3>';
738
  } else {
739
 
740
- if ( '' === $titan->getOption( 'logo_url' ) ) {
741
 
742
  if ( function_exists( 'pll_home_url' ) ) {
743
  $logo_url = pll_home_url();
@@ -746,7 +797,7 @@ class WP_Mobile_Menu_Core
746
  }
747
 
748
  } else {
749
- $logo_url = $titan->getOption( 'logo_url' );
750
  }
751
 
752
  $logo_url_end = '</a>';
@@ -754,7 +805,7 @@ class WP_Mobile_Menu_Core
754
  }
755
 
756
  $output = '<div class="mob-menu-logo-holder">' . $logo_url;
757
- $header_branding = $titan->getOption( 'header_branding' );
758
  // Assign the image alt valude with the blog title in case it's not provided on the image. It the blog title also doesn't exist default it to Organization Logo.
759
  if ( '' === $logo_alt ) {
760
 
@@ -770,7 +821,7 @@ class WP_Mobile_Menu_Core
770
  $logo_output .= '<img class="mob-standard-logo" src="' . $logo_img . '" alt="' . $logo_alt . '">';
771
  // If there is a retina logo.
772
  if ( isset( $logo_img_retina ) ) {
773
- $logo_output .= '<img class="mob-retina-logo" src="' . $logo_img_retina . '" alt=" ' . __( 'Logo Header Menu', 'mobile-menu' ) . '">';
774
  }
775
  }
776
 
@@ -975,10 +1026,12 @@ class WP_Mobile_Menu_Core
975
  public function mobile_menu_import_settings( $settings_id )
976
  {
977
  global $mm_fs ;
 
 
978
  $message = '';
979
  $message_code = '';
980
- $titan = TitanFramework::getInstance( 'mobmenu' );
981
- $left_menu = $titan->getOption( 'left_menu' );
982
  // If we are importing an oficial demo.
983
 
984
  if ( isset( $_REQUEST['demo'] ) ) {
@@ -1009,7 +1062,7 @@ class WP_Mobile_Menu_Core
1009
  if ( $result ) {
1010
  $message = __( 'Settings Imported successfully.', 'mobile-menu' );
1011
  $message_code = 'success';
1012
- $titan->cssInstance->generateSaveCSS();
1013
  } else {
1014
  $message = __( 'Something went wrong. Upload a new file and try again.', 'mobile-menu' );
1015
  $message_code = 'error';
@@ -1143,7 +1196,7 @@ class WP_Mobile_Menu_Core
1143
 
1144
  <?php
1145
  // Security Nonce.
1146
- wp_nonce_field( $settings_id, TF . '_nonce' );
1147
  ?>
1148
 
1149
  <header>
@@ -1170,7 +1223,7 @@ class WP_Mobile_Menu_Core
1170
 
1171
  ?>
1172
  <section>
1173
- <table class="form-table">
1174
  <tbody>
1175
  <tr>
1176
  <th scope="row">
14
  /**
15
  * @var object
16
  */
17
+ public $plugin_settings ;
18
  /**
19
  * @var String
20
  */
57
  */
58
  public function mobmenu_add_body_class( $classes )
59
  {
60
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
61
+ $display_type = $plugin_settings->getOption( 'menu_display_type' );
62
+ $lpanel_elements = $plugin_settings->getOption( 'left_menu_content_position' );
63
+ $rpanel_elements = $plugin_settings->getOption( 'right_menu_content_position' );
64
  // If the User profile is being used at the Top of the left panel.
65
  if ( isset( $lpanel_elements[0] ) && 'user-profile' === $lpanel_elements[0] ) {
66
  $classes[] = 'left-mobmenu-user-profile';
78
  $menu_display_type = $this->get_menu_display_type( $display_type );
79
  $classes[] = $menu_display_type;
80
  // Check if the Auto-hide Header option is on so it can be added a new class.
81
+ if ( $plugin_settings->getOption( 'autohide_header' ) ) {
82
  array_push( $classes, 'mob-menu-autohide-header' );
83
  }
84
  // Check if the Auto-hide Footer option is on so it can be added a new class.
85
+ if ( $plugin_settings->getOption( 'autohide_footer' ) ) {
86
  array_push( $classes, 'mob-menu-autohide-footer' );
87
  }
88
  // Check if the Sliding Menus option is on so it can be added a new class.
89
+ if ( $plugin_settings->getOption( 'sliding_submenus' ) ) {
90
  array_push( $classes, 'mob-menu-sliding-menus' );
91
  }
92
  return $classes;
125
  );
126
  }
127
 
 
 
 
 
 
 
 
 
 
 
 
128
  /**
129
  * Build the icons HTML.
130
  */
172
  wp_die();
173
  }
174
 
175
+ /**
176
+ * Add the plugin page row links.
177
+ */
178
+ public function add_plugin_row_meta( $links, $file )
179
+ {
180
+
181
+ if ( 'mobile-menu-premium/mobmenu.php' == $file || 'mobile-menu-premium/mobmenu.php' == $file ) {
182
+ $row_meta = array(
183
+ 'docs' => '<a href="' . esc_url( 'https://www.wpmobilemenu.com/knowledgebase/' ) . '" aria-label="' . esc_attr__( 'Documentation', 'mobile-menu' ) . '">' . esc_html__( 'Docs', 'mobile-menu' ) . '</a>',
184
+ 'support' => '<a href="' . esc_url( 'https://www.wpmobilemenu.com/support-contact/' ) . '" aria-label="' . esc_attr__( 'Support', 'mobile-menu' ) . '">' . esc_html__( 'Support', 'mobile-menu' ) . '</a>',
185
+ );
186
+ return array_merge( $links, $row_meta );
187
+ } else {
188
+ return $links;
189
+ }
190
+
191
+ }
192
+
193
+ /**
194
+ * Build the WP Mobile Menu Html Markup.
195
+ */
196
+ public function load_mobile_menu_html(
197
+ $type,
198
+ $menu_text,
199
+ $icon_action,
200
+ $icon_target,
201
+ $icon_url,
202
+ $icon_font,
203
+ $icon,
204
+ $icon_new,
205
+ $hamburger_animation,
206
+ $close_icon
207
+ )
208
+ {
209
+ $menu_content = '';
210
+ //$menu_text = '';
211
+ if ( '' !== $menu_text ) {
212
+ $menu_text = '<span class="' . $type . '-menu-icon-text">' . __( $menu_text, 'mobile-menu' ) . '</span>';
213
+ }
214
+
215
+ if ( $icon_action ) {
216
+ $menu_content .= '<a href="#" class="mobmenu-' . $type . '-bt mobmenu-trigger-action" data-panel-target="mobmenu-' . $type . '-panel" aria-label="' . __( ucfirst( $type ) . ' Menu Button', 'mobile-menu' ) . '">';
217
+ } else {
218
+
219
+ if ( $icon_target ) {
220
+ $icon_url_target = '_self';
221
+ } else {
222
+ $icon_url_target = '_blank';
223
+ }
224
+
225
+ $menu_content .= '<a href="' . $icon_url . '" target="' . $icon_url_target . '" id="mobmenu-center">';
226
+ }
227
+
228
+ $icon_image = wp_get_attachment_image_src( $icon );
229
+
230
+ if ( $icon_image ) {
231
+ $icon_image = $icon_image[0];
232
+ } else {
233
+ $icon_image = '';
234
+ }
235
+
236
+ $menu_icon = $icon_new;
237
+ switch ( $menu_icon ) {
238
+ case 'image':
239
+ $menu_content .= '<img src="' . $icon_image . '" alt="' . __( ucfirst( $type ) . ' Menu Icon', 'mobile-menu' ) . '">';
240
+ break;
241
+ case 'icon':
242
+ $menu_content .= '<i class="mob-icon-' . $icon_font . ' mob-menu-icon"></i>' . $this->mobmenu_close_button( $close_icon );
243
+ break;
244
+ case 'animated-icon':
245
+ $menu_content .= '<button class="hamburger hamburger ' . $hamburger_animation . '" type="button" aria-label="Menu" aria-controls="navigation"><span class="hamburger-box"><span class="hamburger-inner"></span></span></button>';
246
+ break;
247
+ }
248
+ $menu_content .= $menu_text;
249
+ $menu_content .= '</a>';
250
+ $menu_content = apply_filters( 'mm_' . $type . '_menu_filter', $menu_content );
251
+ return $menu_content;
252
+ }
253
+
254
  /**
255
  * Build the WP Mobile Menu Html Markup.
256
  */
260
  global $woocommerce ;
261
  $left_logged_in_user = false;
262
  $right_logged_in_user = false;
263
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
264
+ $this->plugin_settings = $plugin_settings;
265
  $this->mobmenu_depth = 3;
266
  $this->mobmenu_parent_link = '';
267
  $header_search = '';
271
  $right_menu_content = '';
272
  $shop_filter = '';
273
  $header_ajax_search = '';
274
+ $close_icon = $plugin_settings->getOption( 'close_icon_font' );
275
  $this->close_icon = $close_icon;
276
+ $submenu_open_icon_font = $plugin_settings->getOption( 'submenu_open_icon_font' );
277
+ $submenu_close_icon_font = $plugin_settings->getOption( 'submenu_close_icon_font' );
278
  $mm_open_cart_menu = '';
279
  $this->logo_content = '';
280
  $this->search_form = '<div class="mm-panel-search-form"><form action="' . esc_url( home_url( '/' ) ) . '" method="get" class="search-form">
281
  <input type="text" name="s" id="s" class="search" placeholder="Search for.." value="' . esc_attr( get_search_query() ) . '" required>
282
  <button type="submit" id="search-submit" class="search-submit"><i class="mob-icon-search-6"></i></button>
283
  </form></div>';
284
+ $menu_display_type = $this->get_menu_display_type( $plugin_settings->getOption( 'menu_display_type' ) );
285
  $output = '';
286
  $output .= '<div class="mobmenu-overlay"></div>';
287
+ $header_text = $plugin_settings->getOption( 'header_text' );
288
  if ( '' === $header_text ) {
289
  $header_text = get_bloginfo();
290
  }
291
  $sticky_el_data_detach = '';
292
  $autoclose_menus_el_data = '';
293
  // Check for Sticky elements and add them to the HTML.
294
+ if ( $plugin_settings->getOption( 'sticky_elements' ) ) {
295
+ $sticky_el_data_detach = 'data-detach-el="' . $plugin_settings->getOption( 'sticky_elements' ) . '"';
296
  }
297
  // Check for Autoclose submenu option.
298
+ if ( $plugin_settings->getOption( 'autoclose_submenus' ) ) {
299
+ $autoclose_menus_el_data = ' data-autoclose-submenus="' . $plugin_settings->getOption( 'autoclose_submenus' ) . '"';
300
  }
301
+ if ( $plugin_settings->getOption( 'enable_mm_woo_open_cart_menu' ) ) {
302
  $mm_open_cart_menu = ' data-open-cart="true"';
303
  }
304
  $menu_display_class = ' data-menu-display="' . $menu_display_type . '"';
305
  $output .= '<div class="mob-menu-header-holder mobmenu" ' . $menu_display_class . $sticky_el_data_detach . $autoclose_menus_el_data . $mm_open_cart_menu . ' data-open-icon="' . $submenu_open_icon_font . '" data-close-icon="' . $submenu_close_icon_font . '">';
306
  // Left Menu Content.
307
 
308
+ if ( $plugin_settings->getOption( 'enable_left_menu' ) && !$left_logged_in_user ) {
309
+ $menu_text = $plugin_settings->getOption( 'left_menu_text' );
310
+ $icon_action = $plugin_settings->getOption( 'left_menu_icon_action' );
311
+ $icon_target = $plugin_settings->getOption( 'left_icon_url_target' );
312
+ $icon_url = $plugin_settings->getOption( 'left_icon_url' );
313
+ $icon_font = $plugin_settings->getOption( 'left_menu_icon_font' );
314
+ $icon = $plugin_settings->getOption( 'left_menu_icon' );
315
+ $icon_new = $plugin_settings->getOption( 'left_menu_icon_new' );
316
+ $animation = $plugin_settings->getOption( 'left_menu_icon_animation' );
317
+ $left_menu_content = $this->load_mobile_menu_html(
318
+ 'left',
319
+ $menu_text,
320
+ $icon_action,
321
+ $icon_target,
322
+ $icon_url,
323
+ $icon_font,
324
+ $icon,
325
+ $icon_new,
326
+ $animation,
327
+ $close_icon
328
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  }
330
 
331
+ if ( !$plugin_settings->getOption( 'disabled_logo_text' ) && !$plugin_settings->getOption( 'enabled_naked_header' ) ) {
332
  // Format the Header Branding.
333
+ $this->logo_content = $this->format_header_branding( $plugin_settings, $header_text );
334
  }
335
  // Right Menu Content.
336
 
337
+ if ( $plugin_settings->getOption( 'enable_right_menu' ) && !$right_logged_in_user ) {
338
+ $menu_text = $plugin_settings->getOption( 'right_menu_text' );
339
+ $icon_action = $plugin_settings->getOption( 'right_menu_icon_action' );
340
+ $icon_target = $plugin_settings->getOption( 'right_icon_url_target' );
341
+ $icon_url = $plugin_settings->getOption( 'right_icon_url' );
342
+ $icon_font = $plugin_settings->getOption( 'right_menu_icon_font' );
343
+ $icon = $plugin_settings->getOption( 'right_menu_icon' );
344
+ $icon_new = $plugin_settings->getOption( 'right_menu_icon_new' );
345
+ $animation = $plugin_settings->getOption( 'right_menu_icon_animation' );
346
+ $right_menu_content = $this->load_mobile_menu_html(
347
+ 'right',
348
+ $menu_text,
349
+ $icon_action,
350
+ $icon_target,
351
+ $icon_url,
352
+ $icon_font,
353
+ $icon,
354
+ $icon_new,
355
+ $animation,
356
+ $close_icon
357
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  }
359
 
360
  $language_selector = '';
361
  $header_elements_order = array( 'left-menu', 'logo', 'right-menu' );
362
  $header_output = '';
363
+ if ( $plugin_settings->getOption( 'enable_left_menu' ) ) {
364
  $header_output = '<div class="mobmenul-container">';
365
  }
366
  if ( !empty($header_elements_order) ) {
380
  break;
381
  case 'logo':
382
 
383
+ if ( $plugin_settings->getOption( 'enable_left_menu' ) ) {
384
  $header_output .= '</div>' . $this->logo_content . '<div class="mobmenur-container">';
385
  } else {
386
  $header_output .= $this->logo_content . '<div class="mobmenur-container">';
402
  // Echo the Header HTML.
403
  echo $output ;
404
  // Build the left menu panel.
405
+ if ( $plugin_settings->getOption( 'enable_left_menu' ) && !$left_logged_in_user ) {
406
  $this->build_left_menu_content();
407
  }
408
 
409
+ if ( $plugin_settings->getOption( 'enable_right_menu' ) && !$right_logged_in_user ) {
410
  $this->mobmenu_parent_link = '';
411
+ if ( $plugin_settings->getOption( 'right_menu_parent_link_submenu' ) ) {
412
  $this->mobmenu_parent_link = 'mobmenu-parent-link';
413
  }
414
  ?>
442
  switch ( $element ) {
443
  case 'right-menu':
444
 
445
+ if ( $this->plugin_settings->getOption( 'right_menu_tabbed_menus', false ) ) {
446
  $right_menu = $this->display_tabbed_menu( 'right' );
447
  } else {
448
  $right_menu = $this->display_menu( 'right' );
492
  global $mm_fs ;
493
  // Build the left menu panel.
494
  $this->mobmenu_parent_link = '';
495
+ if ( $this->plugin_settings->getOption( 'left_menu_parent_link_submenu' ) ) {
496
  $this->mobmenu_parent_link = 'mobmenu-parent-link';
497
  }
498
  ?>
527
  switch ( $element ) {
528
  case 'left-menu':
529
 
530
+ if ( $this->plugin_settings->getOption( 'left_menu_tabbed_menus', false ) ) {
531
  $left_menu = $this->display_tabbed_menu( 'left' );
532
  } else {
533
  $left_menu = $this->display_menu( 'left' );
573
  public function display_menu( $menu )
574
  {
575
  global $mm_fs ;
576
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
577
+ $current_menu = $plugin_settings->getOption( $menu . '_menu' );
578
  if ( !is_nav_menu( $current_menu ) ) {
579
  $current_menu = '';
580
  }
593
  // Display the menu.
594
  $output = wp_nav_menu( array(
595
  $menu_param => $current_menu,
596
+ 'items_wrap' => '<ul id="mobmenu' . $menu . '" role="menubar" aria-label="' . __( 'Main navigation for mobile devices', 'mobile-menu' ) . '">%3$s</ul>',
597
  'fallback_cb' => false,
598
  'depth' => $this->mobmenu_depth,
599
  'walker' => new WP_Mobile_Menu_Walker_Nav_Menu( $menu, '' ),
622
  public function display_tabbed_menu( $menu )
623
  {
624
  global $mm_fs ;
625
+ $tab_title_1 = $this->plugin_settings->getOption( $menu . '_tab_title_1' );
626
+ $tab_title_2 = $this->plugin_settings->getOption( $menu . '_tab_title_2' );
627
  $output = '<div class="mobmenu-tabs-container"><ul class="mobmenu-tabs-header"><li class="active-tab" data-tab-id="mobmenu-tab-1">' . $tab_title_1 . '</li><li data-tab-id="mobmenu-tab-2">' . $tab_title_2 . '</li></ul>';
628
  $output .= '<div class="mobmenu-tab mobmenu-tab-1 active-tab">';
629
+ $current_menu = $this->plugin_settings->getOption( $menu . '_menu_tab_1' );
630
  $output .= wp_nav_menu( array(
631
  'menu' => $current_menu,
632
+ 'items_wrap' => '<ul id="mobmenu' . $menu . '" role="menubar" aria-label="' . __( 'Main navigation for mobile devices', 'mobile-menu' ) . '">%3$s</ul>',
633
  'fallback_cb' => false,
634
  'depth' => $this->mobmenu_depth,
635
  'walker' => new WP_Mobile_Menu_Walker_Nav_Menu( $menu, '' ),
636
  'echo' => false,
637
  ) );
638
+ $current_menu = $this->plugin_settings->getOption( $menu . '_menu_tab_2' );
639
  $output .= '</div><div class="mobmenu-tab mobmenu-tab-2">';
640
  $output .= wp_nav_menu( array(
641
  'menu' => $current_menu,
642
+ 'items_wrap' => '<ul id="mobmenu' . $menu . '" role="menubar" aria-label="' . __( 'Main navigation for mobile devices', 'mobile-menu' ) . '">%3$s</ul>',
643
  'fallback_cb' => false,
644
  'depth' => $this->mobmenu_depth,
645
  'walker' => new WP_Mobile_Menu_Walker_Nav_Menu( $menu, '' ),
647
  ) );
648
  $output .= "</div></div>";
649
  return $output;
650
+ $current_menu = $plugin_settings->getOption( $menu . '_menu' );
651
  if ( !is_nav_menu( $current_menu ) ) {
652
  $current_menu = '';
653
  }
666
  // Display the menu.
667
  $output = wp_nav_menu( array(
668
  $menu_param => $current_menu,
669
+ 'items_wrap' => '<ul id="mobmenu' . $menu . '" role="menubar" aria-label="' . __( 'Main navigation for mobile devices', 'mobile-menu' ) . '">%3$s</ul>',
670
  'fallback_cb' => false,
671
  'depth' => $this->mobmenu_depth,
672
  'walker' => new WP_Mobile_Menu_Walker_Nav_Menu( $menu, '' ),
704
 
705
  }
706
 
707
+ /**
708
+ *
709
+ * Register Pay With Stripe Elementor Widget.
710
+ *
711
+ * @since 1.0.1
712
+ */
713
+ public function mobmenu_el_init_widgets()
714
+ {
715
+ // Include Widget files
716
+ require_once __DIR__ . '/widgets/mobile-menu.php';
717
+ // Register widget
718
+ \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Mobile_Menu_El_Menu_Widget() );
719
+ }
720
+
721
  /**
722
  * Register the Mobile Menus.
723
  */
736
  * Format Header Branding (Logo + Text).
737
  *
738
  * @since 2.6
739
+ * @var $plugin_settings
740
  * @var $header_text
741
  */
742
+ public function format_header_branding( $plugin_settings, $header_text )
743
  {
744
  global $mm_fs ;
745
+ $logo = $plugin_settings->getOption( 'logo_img' );
746
+ // Translate Logo with WPML.
747
+
748
+ if ( class_exists( 'SitePress' ) ) {
749
+ $current_language = apply_filters( 'wpml_current_language', NULL );
750
+ $logo = apply_filters(
751
+ 'wpml_object_id',
752
+ $logo,
753
+ 'attachment',
754
+ FALSE,
755
+ $current_language
756
+ );
757
+ }
758
+
759
+ $logo_img = wp_get_attachment_image_src( $logo, 'full' );
760
 
761
  if ( $logo_img == null ) {
762
  $logo_img = '';
767
  $logo_output = '';
768
  $logo_url = '';
769
  $logo_url_end = '';
770
+ $logo_alt = get_post_meta( intval( $plugin_settings->getOption( 'logo_img' ) ), '_wp_attachment_image_alt', true );
771
  // Retina Logo.
772
 
773
+ if ( $plugin_settings->getOption( 'logo_img_retina' ) ) {
774
+ $logo_img_retina = wp_get_attachment_image_src( $plugin_settings->getOption( 'logo_img_retina' ), 'full' );
775
 
776
  if ( $logo_img_retina == null ) {
777
  $logo_img_retina = '';
779
  $logo_img_retina = $logo_img_retina[0];
780
  }
781
 
782
+ $logo_img_retina_metadata = wp_get_attachment_metadata( $plugin_settings->getOption( 'logo_img_retina' ) );
783
  }
784
 
785
 
786
+ if ( $plugin_settings->getOption( 'disabled_logo_url' ) ) {
787
  $logo_url = '<h3 class="headertext">';
788
  $logo_url_end = '</h3>';
789
  } else {
790
 
791
+ if ( '' === $plugin_settings->getOption( 'logo_url' ) ) {
792
 
793
  if ( function_exists( 'pll_home_url' ) ) {
794
  $logo_url = pll_home_url();
797
  }
798
 
799
  } else {
800
+ $logo_url = $plugin_settings->getOption( 'logo_url' );
801
  }
802
 
803
  $logo_url_end = '</a>';
805
  }
806
 
807
  $output = '<div class="mob-menu-logo-holder">' . $logo_url;
808
+ $header_branding = $plugin_settings->getOption( 'header_branding' );
809
  // Assign the image alt valude with the blog title in case it's not provided on the image. It the blog title also doesn't exist default it to Organization Logo.
810
  if ( '' === $logo_alt ) {
811
 
821
  $logo_output .= '<img class="mob-standard-logo" src="' . $logo_img . '" alt="' . $logo_alt . '">';
822
  // If there is a retina logo.
823
  if ( isset( $logo_img_retina ) ) {
824
+ $logo_output .= '<img class="mob-retina-logo" src="' . $logo_img_retina . '" alt="' . __( 'Logo Header Menu', 'mobile-menu' ) . '">';
825
  }
826
  }
827
 
1026
  public function mobile_menu_import_settings( $settings_id )
1027
  {
1028
  global $mm_fs ;
1029
+ global $message ;
1030
+ global $message_code ;
1031
  $message = '';
1032
  $message_code = '';
1033
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
1034
+ $left_menu = $plugin_settings->getOption( 'left_menu' );
1035
  // If we are importing an oficial demo.
1036
 
1037
  if ( isset( $_REQUEST['demo'] ) ) {
1062
  if ( $result ) {
1063
  $message = __( 'Settings Imported successfully.', 'mobile-menu' );
1064
  $message_code = 'success';
1065
+ $plugin_settings->cssInstance->generateSaveCSS();
1066
  } else {
1067
  $message = __( 'Something went wrong. Upload a new file and try again.', 'mobile-menu' );
1068
  $message_code = 'error';
1196
 
1197
  <?php
1198
  // Security Nonce.
1199
+ wp_nonce_field( $settings_id, 'mobmenu_settings_nonce' );
1200
  ?>
1201
 
1202
  <header>
1223
 
1224
  ?>
1225
  <section>
1226
+ <table class="mm-form-table">
1227
  <tbody>
1228
  <tr>
1229
  <th scope="row">
includes/class-wp-mobile-menu-options.php CHANGED
@@ -41,7 +41,7 @@ class WP_Mobile_Menu_Options
41
  */
42
  private function init_options()
43
  {
44
- add_action( 'tf_create_options', array( $this, 'create_plugin_options' ) );
45
  }
46
 
47
  /**
@@ -54,6 +54,8 @@ class WP_Mobile_Menu_Options
54
  {
55
  global $mm_fs ;
56
  global $general_tab ;
 
 
57
  $prefix = '';
58
  $menus = get_terms( 'nav_menu', array(
59
  'hide_empty' => true,
@@ -62,8 +64,7 @@ class WP_Mobile_Menu_Options
62
  $menus_options[''] = __( 'Choose one menu', 'mobile-menu' );
63
  $icons_positions = array();
64
  $icon_types = array();
65
- // Initialize Titan with my special unique namespace.
66
- $titan = TitanFramework::getInstance( 'mobmenu' );
67
  foreach ( $menus as $menu ) {
68
  $menus_options[$menu->name] = $menu->name;
69
  }
@@ -90,11 +91,10 @@ class WP_Mobile_Menu_Options
90
  'search' => 'Search',
91
  'left-menu' => 'Left Menu',
92
  );
93
- $plugin_title = 'Mobile Menu Options';
94
  // Create my admin options panel.
95
- $panel = $titan->createAdminPanel( array(
96
  'name' => 'Mobile Menu Options',
97
- 'title' => __( $plugin_title, 'mobile-menu' ),
98
  'icon' => 'dashicons-smartphone',
99
  ) );
100
  // Only proceed if we are in the plugin page.
@@ -130,10 +130,127 @@ class WP_Mobile_Menu_Options
130
  'id' => 'colors',
131
  ) );
132
  $general_tab = $general_tab2;
133
- $this->create_footer_options_upsell( $panel, $titan );
134
- // Create Woocommerce options upsell.
135
- $this->create_woocommerce_options_upsell( $panel, $titan );
136
- $custom_html = '<h3>' . __( 'Choose the style of your Mobile Menu', 'mobile-menu' ) . '</h3><div class="mm-mobile-header-type">';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  $custom_html .= '<div><h4>' . __( 'Hamburger Menu', 'mobile-menu' ) . '</h4><img src="' . plugins_url( '/assets/mobile_hamburger_menu_option.png', __FILE__ ) . '" class="hamburger-menu"></div>';
138
  $custom_html .= '<div><h4>' . __( 'Header Menu', 'mobile-menu' ) . '</h4><img src="' . plugins_url( '/assets/mobile_header.png', __FILE__ ) . '"></div></div>';
139
  // Mobile Header type.
@@ -171,7 +288,7 @@ class WP_Mobile_Menu_Options
171
  'type' => 'select',
172
  'desc' => __( 'Select the menu that will open in the left side.', 'mobile-menu' ),
173
  'options' => $menus_options,
174
- 'default' => $titan->getOption( 'left_menu' ),
175
  'class' => 'general-options left-menu-options',
176
  ) );
177
  // Enable/Disable Right Header Menu.
@@ -191,9 +308,33 @@ class WP_Mobile_Menu_Options
191
  'type' => 'select',
192
  'desc' => __( 'Select the menu that will open in the right side.', 'mobile-menu' ),
193
  'options' => $menus_options,
194
- 'default' => $titan->getOption( 'right_menu' ),
195
  'class' => 'general-options right-menu-options',
196
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  // Width trigger.
198
  $general_tab->createOption( array(
199
  'name' => __( 'Mobile Menu Visibility(Width Trigger)', 'mobile-menu' ),
@@ -206,25 +347,24 @@ class WP_Mobile_Menu_Options
206
  'unit' => 'px',
207
  'class' => 'general-visibility-options',
208
  ) );
 
209
  $general_tab->createOption( array(
210
- 'type' => 'note',
211
- 'desc' => __( 'The Width trigger field is very important because it determines the width that will show the Mobile Menu. If you want it always visible set it to 5000px', 'mobile-menu' ),
212
- 'class' => 'general-visibility-options',
213
- ) );
214
- // Enable/Disable only in Mobile Devices.
215
- $general_tab->createOption( array(
216
- 'name' => __( 'Enable only in Mobile devices', 'mobile-menu' ),
217
- 'id' => 'only_mobile_devices',
218
- 'type' => 'enable',
219
- 'default' => false,
220
- 'desc' => __( 'Enable only in Mobiles devices. This will disable the Mobile Menu Visibilty option above (using resolution width trigger).', 'mobile-menu' ),
221
- 'enabled' => __( 'On', 'mobile-menu' ),
222
- 'disabled' => __( 'Off', 'mobile-menu' ),
223
- 'class' => 'general-visibility-options',
224
  ) );
 
 
 
 
 
 
225
  // Enable/Disable Testing Mode.
226
  $general_tab->createOption( array(
227
- 'name' => __( 'Enable Testing Mode (only visible for admins).', 'mobile-menu' ),
228
  'id' => 'only_testing_mode',
229
  'type' => 'enable',
230
  'default' => false,
@@ -233,19 +373,10 @@ class WP_Mobile_Menu_Options
233
  'disabled' => __( 'Off', 'mobile-menu' ),
234
  'class' => 'general-visibility-options',
235
  ) );
236
- // Hide Html Elements.
237
- $general_tab->createOption( array(
238
- 'name' => __( 'Hide Elements', 'mobile-menu' ),
239
- 'id' => 'hide_elements',
240
- 'type' => 'text',
241
- 'default' => '',
242
- 'desc' => __( 'Use the Find element button and click in the elements you want to hide. When you are done hit the Save Changes button.<br>Example: .menu , #nav</p>', 'mobile-menu' ),
243
- 'class' => 'general-hide-elements',
244
- ) );
245
  $general_tab->createOption( array(
246
  'type' => 'note',
247
  'desc' => __( 'If you somehow couldn\'t find the necessary elements using the visual tool to pick elements just create a new ticket in our <a href="https://www.wpmobilemenu.com/support-contact/?utm_source=wprepo-dash&utm_medium=user%20website&utm_campaign=hide_original_menu_help" target="_blank">support page</a> with your site url and a screenshot of the element you want to hide. We reply fast.', 'mobile-menu' ),
248
- 'class' => 'general-hide-elements',
249
  ) );
250
  $general_tab->createOption( array(
251
  'name' => __( 'Hide elements by default', 'mobile-menu' ),
@@ -290,17 +421,7 @@ class WP_Mobile_Menu_Options
290
  '16',
291
  '17'
292
  ),
293
- 'class' => 'general-hide-elements',
294
- ) );
295
- // Menu Display Type.
296
- $general_tab->createOption( array(
297
- 'name' => __( 'Menu Display Type', 'mobile-menu' ),
298
- 'id' => 'menu_display_type',
299
- 'type' => 'select',
300
- 'desc' => __( 'Choose the display type for the mobile menu.', 'mobile-menu' ),
301
- 'options' => $display_type,
302
- 'default' => 'slideout-over',
303
- 'class' => 'general-misc-options',
304
  ) );
305
  // Automatically Close Sub Menus.
306
  $general_tab->createOption( array(
@@ -311,7 +432,7 @@ class WP_Mobile_Menu_Options
311
  'default' => false,
312
  'enabled' => __( 'On', 'mobile-menu' ),
313
  'disabled' => __( 'Off', 'mobile-menu' ),
314
- 'class' => 'general-misc-options',
315
  ) );
316
  // Menu Border Style.
317
  $general_tab->createOption( array(
@@ -323,7 +444,25 @@ class WP_Mobile_Menu_Options
323
  'max' => '5',
324
  'min' => '0',
325
  'unit' => 'px',
326
- 'class' => 'general-misc-options',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
  ) );
328
  // Close Menu Icon Font.
329
  $general_tab->createOption( array(
@@ -332,7 +471,7 @@ class WP_Mobile_Menu_Options
332
  'type' => 'text',
333
  'desc' => __( '<div class="mobmenu-icon-holder"></div><a href="#" class="mobmenu-icon-picker button">Select menu icon</a>', 'mobile-menu' ),
334
  'default' => 'cancel-1',
335
- 'class' => 'general-misc-options',
336
  ) );
337
  // Close Menu Icon Font Size.
338
  $general_tab->createOption( array(
@@ -344,7 +483,7 @@ class WP_Mobile_Menu_Options
344
  'max' => '100',
345
  'min' => '5',
346
  'unit' => 'px',
347
- 'class' => 'general-misc-options',
348
  ) );
349
  // Submenu Open Icon Font.
350
  $general_tab->createOption( array(
@@ -353,7 +492,7 @@ class WP_Mobile_Menu_Options
353
  'type' => 'text',
354
  'desc' => __( '<div class="mobmenu-icon-holder"></div><a href="#" class="mobmenu-icon-picker button">Select menu icon</a>', 'mobile-menu' ),
355
  'default' => 'down-open',
356
- 'class' => 'general-misc-options',
357
  ) );
358
  // Submenu Close Icon Font.
359
  $general_tab->createOption( array(
@@ -362,7 +501,7 @@ class WP_Mobile_Menu_Options
362
  'type' => 'text',
363
  'desc' => __( '<div class="mobmenu-icon-holder"></div><a href="#" class="mobmenu-icon-picker button">Select menu icon</a>', 'mobile-menu' ),
364
  'default' => 'up-open',
365
- 'class' => 'general-misc-options',
366
  ) );
367
  // Submenu Icon Font Size.
368
  $general_tab->createOption( array(
@@ -374,7 +513,7 @@ class WP_Mobile_Menu_Options
374
  'max' => '100',
375
  'min' => '0',
376
  'unit' => 'px',
377
- 'class' => 'general-misc-options',
378
  ) );
379
  // Automatically Close Sub Menus.
380
  $general_tab->createOption( array(
@@ -385,7 +524,7 @@ class WP_Mobile_Menu_Options
385
  'default' => false,
386
  'enabled' => __( 'On', 'mobile-menu' ),
387
  'disabled' => __( 'Off', 'mobile-menu' ),
388
- 'class' => 'general-advanced-options',
389
  ) );
390
  // Sticky Html Elements.
391
  $general_tab->createOption( array(
@@ -394,39 +533,21 @@ class WP_Mobile_Menu_Options
394
  'type' => 'text',
395
  'default' => '',
396
  'desc' => __( '<p>If you are having issues with sticky elements that dont assume a sticky behaviour, enter the ids or class name that identify that element.</p>', 'mobile-menu' ),
397
- 'class' => 'general-advanced-options',
398
- ) );
399
- // Custom css.
400
- $general_tab->createOption( array(
401
- 'name' => __( 'Custom CSS', 'mobile-menu' ),
402
- 'id' => 'custom_css',
403
- 'type' => 'code',
404
- 'desc' => __( 'Put your custom CSS rules here', 'mobile-menu' ),
405
- 'lang' => 'css',
406
- 'class' => 'general-advanced-options',
407
- ) );
408
- // Custom js.
409
- $general_tab->createOption( array(
410
- 'name' => __( 'Custom JS', 'mobile-menu' ),
411
- 'id' => 'custom_js',
412
- 'type' => 'code',
413
- 'desc' => __( 'Put your custom JS rules here', 'mobile-menu' ),
414
- 'lang' => 'javascript',
415
- 'class' => 'general-advanced-options',
416
  ) );
417
  // Export settings.
418
  $general_tab->createOption( array(
419
  'name' => __( 'Export Settings', 'mobile-menu' ),
420
  'type' => 'custom',
421
  'custom' => '<button class="button button-secondary export-mobile-menu-settings">' . __( 'Export', 'mobile-menu' ) . '</button>',
422
- 'class' => 'general-import-export',
423
  ) );
424
  // Import settings.
425
  $general_tab->createOption( array(
426
  'name' => __( 'Import Settings', 'mobile-menu' ),
427
  'type' => 'custom',
428
  'custom' => '<button class="button button-secondary import-mobile-menu-settings">' . __( 'Import', 'mobile-menu' ) . '</button>',
429
- 'class' => 'general-import-export',
430
  ) );
431
  // Enable/Disable Sticky Header.
432
  $general_tab->createOption( array(
@@ -533,11 +654,11 @@ class WP_Mobile_Menu_Options
533
  'class' => 'header-options',
534
  ) );
535
  $header_branding = array(
536
- 'logo' => __( 'Logo', 'mobile-menu' ),
537
  'text' => __( 'Text', 'mobile-menu' ),
538
  );
539
 
540
- if ( $titan->getOption( 'enabled_logo' ) ) {
541
  $default_header_branding = 'logo';
542
  } else {
543
  $default_header_branding = 'text';
@@ -555,16 +676,25 @@ class WP_Mobile_Menu_Options
555
  ) );
556
  // Site Logo Image.
557
  $general_tab->createOption( array(
558
- 'name' => __( 'Logo', 'mobile-menu' ),
559
  'id' => 'logo_img',
560
  'type' => 'upload',
561
  'desc' => __( 'Upload your logo image', 'mobile-menu' ),
562
  'default' => '',
563
  'class' => 'logo-options',
564
  ) );
 
 
 
 
 
 
 
 
 
565
  // Header Height.
566
  $general_tab->createOption( array(
567
- 'name' => __( 'Logo Height', 'mobile-menu' ),
568
  'id' => 'logo_height',
569
  'type' => 'number',
570
  'desc' => __( 'Enter the height of the logo', 'mobile-menu' ),
@@ -574,15 +704,6 @@ class WP_Mobile_Menu_Options
574
  'unit' => 'px',
575
  'class' => 'logo-options',
576
  ) );
577
- // Site Logo Retina Image.
578
- $general_tab->createOption( array(
579
- 'name' => __( 'Retina Logo', 'mobile-menu' ),
580
- 'id' => 'logo_img_retina',
581
- 'type' => 'upload',
582
- 'desc' => __( 'Upload your logo image for retina devices', 'mobile-menu' ),
583
- 'default' => '',
584
- 'class' => 'logo-options',
585
- ) );
586
  // Enable/Disable Logo Url.
587
  $general_tab->createOption( array(
588
  'name' => __( 'Disable Logo URL ', 'mobile-menu' ),
@@ -615,7 +736,7 @@ class WP_Mobile_Menu_Options
615
  'unit' => 'px',
616
  'class' => 'logo-options',
617
  ) );
618
- $def_value = $titan->getOption( 'header_font_size' );
619
 
620
  if ( $def_value > 0 ) {
621
  $def_value .= 'px';
@@ -640,7 +761,7 @@ class WP_Mobile_Menu_Options
640
  'font-family' => 'Dosis',
641
  'font-size' => $def_value,
642
  ),
643
- 'class' => 'font-options header-options',
644
  ) );
645
  // Click Menu Parent link to open Sub menu.
646
  $general_tab->createOption( array(
@@ -654,7 +775,7 @@ class WP_Mobile_Menu_Options
654
  'class' => 'left-menu-options',
655
  ) );
656
 
657
- if ( true === $titan->getOption( 'left_menu_icon_opt' ) ) {
658
  $icon_type = 'image';
659
  } else {
660
  $icon_type = 'icon';
@@ -698,38 +819,9 @@ class WP_Mobile_Menu_Options
698
  'type' => 'upload',
699
  'placeholder' => 'Click here to select the icon',
700
  'desc' => __( 'Upload your left menu icon image', 'mobile-menu' ),
701
- 'default' => 'menu',
702
  'class' => 'left-menu-icon',
703
  ) );
704
- // Text After Left Icon.
705
- $general_tab->createOption( array(
706
- 'name' => __( 'Text After Icon', 'mobile-menu' ),
707
- 'id' => 'left_menu_text',
708
- 'type' => 'text',
709
- 'desc' => __( 'Enter the text that will appear after the Icon.', 'mobile-menu' ),
710
- 'default' => '',
711
- 'class' => 'left-menu-icon',
712
- ) );
713
- // Text After Left Icon Font Options.
714
- $general_tab->createOption( array(
715
- 'name' => __( 'Text After Icon Font', 'mobile-menu' ),
716
- 'id' => 'text_after_left_icon_font',
717
- 'type' => 'font',
718
- 'desc' => __( 'Select a style', 'mobile-menu' ),
719
- 'show_font_weight' => true,
720
- 'show_font_style' => true,
721
- 'show_line_height' => true,
722
- 'show_letter_spacing' => true,
723
- 'show_text_transform' => true,
724
- 'show_font_variant' => false,
725
- 'show_text_shadow' => false,
726
- 'show_color' => true,
727
- 'default' => array(
728
- 'line-height' => '1.5em',
729
- 'font-family' => 'Dosis',
730
- ),
731
- 'class' => 'font-options left-menu-icon',
732
- ) );
733
  // Icon Action Option.
734
  $general_tab->createOption( array(
735
  'name' => __( 'Icon Action', 'mobile-menu' ),
@@ -761,6 +853,35 @@ class WP_Mobile_Menu_Options
761
  'disabled' => 'Blank',
762
  'class' => 'left-menu-icon',
763
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
764
  // Left Menu Icon Top Margin.
765
  $general_tab->createOption( array(
766
  'name' => __( 'Icon Top Margin', 'mobile-menu' ),
@@ -899,7 +1020,7 @@ class WP_Mobile_Menu_Options
899
  'line-height' => '1.5em',
900
  'font-family' => 'Dosis',
901
  ),
902
- 'class' => 'font-options left-panel-options',
903
  ) );
904
  // Click Menu Parent link to open Sub menu.
905
  $general_tab->createOption( array(
@@ -913,7 +1034,7 @@ class WP_Mobile_Menu_Options
913
  'class' => 'right-menu-options',
914
  ) );
915
 
916
- if ( true === $titan->getOption( 'right_menu_icon_opt' ) ) {
917
  $icon_type = 'image';
918
  } else {
919
  $icon_type = 'icon';
@@ -956,7 +1077,7 @@ class WP_Mobile_Menu_Options
956
  'id' => 'right_menu_icon',
957
  'type' => 'upload',
958
  'desc' => __( 'Upload your right menu icon image', 'mobile-menu' ),
959
- 'default' => 'menu',
960
  'class' => 'right-menu-icon',
961
  ) );
962
  // Icon Action Option.
@@ -970,6 +1091,26 @@ class WP_Mobile_Menu_Options
970
  'disabled' => __( 'Open Link Url', 'mobile-menu' ),
971
  'class' => 'right-menu-icon',
972
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
973
  // Text Before Right Icon.
974
  $general_tab->createOption( array(
975
  'name' => __( 'Text Before Icon', 'mobile-menu' ),
@@ -998,27 +1139,7 @@ class WP_Mobile_Menu_Options
998
  'line-height' => '1.5em',
999
  'font-family' => 'Dosis',
1000
  ),
1001
- 'class' => 'font-options right-menu-icon',
1002
- ) );
1003
- // Icon URL.
1004
- $general_tab->createOption( array(
1005
- 'name' => __( 'Icon Link URL', 'mobile-menu' ),
1006
- 'id' => 'right_icon_url',
1007
- 'type' => 'text',
1008
- 'desc' => __( 'Enter the Icon Link Url.', 'mobile-menu' ),
1009
- 'default' => '',
1010
- 'class' => 'right-menu-icon',
1011
- ) );
1012
- // Icon URL Target.
1013
- $general_tab->createOption( array(
1014
- 'name' => __( 'Icon Link Url Target', 'mobile-menu' ),
1015
- 'id' => 'right_icon_url_target',
1016
- 'type' => 'enable',
1017
- 'default' => true,
1018
- 'desc' => __( 'Choose it the link will open in the same window or in the new window.', 'mobile-menu' ),
1019
- 'enabled' => 'Self',
1020
- 'disabled' => 'Blank',
1021
- 'class' => 'right-menu-icon',
1022
  ) );
1023
  // Right Menu Icon Top Margin.
1024
  $general_tab->createOption( array(
@@ -1158,7 +1279,7 @@ class WP_Mobile_Menu_Options
1158
  'line-height' => '1.5em',
1159
  'font-family' => 'Dosis',
1160
  ),
1161
- 'class' => 'font-options right-panel-options',
1162
  ) );
1163
  // Overlay Background color.
1164
  $general_tab->createOption( array(
@@ -1207,7 +1328,7 @@ class WP_Mobile_Menu_Options
1207
  ) );
1208
  // Left Menu Icon color.
1209
  $general_tab->createOption( array(
1210
- 'name' => __( 'Left Menu Icon Color', 'mobile-menu' ),
1211
  'id' => 'left_menu_icon_color',
1212
  'type' => 'color',
1213
  'desc' => '',
@@ -1297,7 +1418,7 @@ class WP_Mobile_Menu_Options
1297
  ) );
1298
  // Right Menu Icon color.
1299
  $general_tab->createOption( array(
1300
- 'name' => __( 'Right Menu Icon Color', 'mobile-menu' ),
1301
  'id' => 'right_menu_icon_color',
1302
  'type' => 'color',
1303
  'desc' => '',
@@ -1387,83 +1508,83 @@ class WP_Mobile_Menu_Options
1387
  ) );
1388
  // Left Panel 3rd Level Left Menu Items Text color.
1389
  $general_tab->createOption( array(
1390
- 'name' => __( 'Left Menu Text Color', 'mobile-menu' ),
1391
  'id' => 'left_panel_3rd_menu_text_color',
1392
  'type' => 'color',
1393
  'desc' => '',
1394
  'alpha' => true,
1395
  'default' => '#fff',
1396
- 'class' => '3rd-level-menu-colors',
1397
  ) );
1398
  // Left Panel 3rd Level Left Menu Items Text color Hover.
1399
  $general_tab->createOption( array(
1400
- 'name' => __( 'Left Menu Text Color Hover', 'mobile-menu' ),
1401
  'id' => 'left_panel_3rd_menu_text_color_hover',
1402
  'type' => 'color',
1403
  'desc' => '',
1404
  'alpha' => true,
1405
  'default' => '#ccc',
1406
- 'class' => '3rd-level-menu-colors',
1407
  ) );
1408
  // Left Panel 3rd Level Left Menu Items Background color.
1409
  $general_tab->createOption( array(
1410
- 'name' => __( 'Left Menu Background Color', 'mobile-menu' ),
1411
  'id' => 'left_panel_3rd_menu_bg_color',
1412
  'type' => 'color',
1413
  'desc' => '',
1414
  'alpha' => true,
1415
  'default' => '#222',
1416
- 'class' => '3rd-level-menu-colors',
1417
  ) );
1418
  // Left Panel 3rd Level Left Menu Items Background color Hover.
1419
  $general_tab->createOption( array(
1420
- 'name' => __( 'Left Menu Background Color Hover', 'mobile-menu' ),
1421
  'id' => 'left_panel_3rd_menu_bg_color_hover',
1422
  'type' => 'color',
1423
  'desc' => '',
1424
  'alpha' => true,
1425
  'default' => '#666',
1426
- 'class' => '3rd-level-menu-colors',
1427
  ) );
1428
  // Right Panel 3rd Level Right Menu Items Text color.
1429
  $general_tab->createOption( array(
1430
- 'name' => __( 'Right Menu Text Color', 'mobile-menu' ),
1431
  'id' => 'right_panel_3rd_menu_text_color',
1432
  'type' => 'color',
1433
  'desc' => '',
1434
  'alpha' => true,
1435
  'default' => '#fff',
1436
- 'class' => '3rd-level-menu-colors',
1437
  ) );
1438
  // Right Panel 3rd Level Right Menu Items Text color Hover.
1439
  $general_tab->createOption( array(
1440
- 'name' => __( 'Right Menu Text Color Hover', 'mobile-menu' ),
1441
  'id' => 'right_panel_3rd_menu_text_color_hover',
1442
  'type' => 'color',
1443
  'desc' => '',
1444
  'alpha' => true,
1445
  'default' => '#ccc',
1446
- 'class' => '3rd-level-menu-colors',
1447
  ) );
1448
  // Right Panel 3rd Level Right Menu Items Background color.
1449
  $general_tab->createOption( array(
1450
- 'name' => __( 'Right Menu Background Color', 'mobile-menu' ),
1451
  'id' => 'right_panel_3rd_menu_bg_color',
1452
  'type' => 'color',
1453
  'desc' => '',
1454
  'alpha' => true,
1455
  'default' => '#222',
1456
- 'class' => '3rd-level-menu-colors',
1457
  ) );
1458
  // Right Panel 3rd Level Right Menu Items Background color Hover.
1459
  $general_tab->createOption( array(
1460
- 'name' => __( 'Right Menu Background Color Hover', 'mobile-menu' ),
1461
  'id' => 'right_panel_3rd_menu_bg_color_hover',
1462
  'type' => 'color',
1463
  'desc' => '',
1464
  'alpha' => true,
1465
  'default' => '#666',
1466
- 'class' => '3rd-level-menu-colors',
1467
  ) );
1468
  $panel->createOption( array(
1469
  'type' => 'save',
@@ -1479,9 +1600,9 @@ class WP_Mobile_Menu_Options
1479
  * @since 2.6
1480
  *
1481
  * @param type $panel Panel Options.
1482
- * @param Object $titan TitanFramework object that is being edited.
1483
  */
1484
- public function create_woocommerce_options_upsell( $panel, $titan )
1485
  {
1486
  global $mm_fs ;
1487
  global $general_tab ;
@@ -1513,9 +1634,9 @@ class WP_Mobile_Menu_Options
1513
  * @since 2.6
1514
  *
1515
  * @param type $panel Panel Options.
1516
- * @param Object $titan TitanFramework object that is being edited.
1517
  */
1518
- public function create_footer_options_upsell( $panel, $titan )
1519
  {
1520
  global $mm_fs ;
1521
  global $general_tab ;
41
  */
42
  private function init_options()
43
  {
44
+ add_action( 'init', array( $this, 'create_plugin_options' ) );
45
  }
46
 
47
  /**
54
  {
55
  global $mm_fs ;
56
  global $general_tab ;
57
+ global $message_code ;
58
+ global $message ;
59
  $prefix = '';
60
  $menus = get_terms( 'nav_menu', array(
61
  'hide_empty' => true,
64
  $menus_options[''] = __( 'Choose one menu', 'mobile-menu' );
65
  $icons_positions = array();
66
  $icon_types = array();
67
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
 
68
  foreach ( $menus as $menu ) {
69
  $menus_options[$menu->name] = $menu->name;
70
  }
91
  'search' => 'Search',
92
  'left-menu' => 'Left Menu',
93
  );
 
94
  // Create my admin options panel.
95
+ $panel = $plugin_settings->createAdminPanel( array(
96
  'name' => 'Mobile Menu Options',
97
+ 'title' => __( 'Mobile Menu Options', 'mobile-menu' ),
98
  'icon' => 'dashicons-smartphone',
99
  ) );
100
  // Only proceed if we are in the plugin page.
130
  'id' => 'colors',
131
  ) );
132
  $general_tab = $general_tab2;
133
+ $version_class = 'mm-free-version';
134
+ ob_start();
135
+ ?>
136
+ <div class="mobile-menu-demos-wrapper">
137
+ <!-- Add text when implement the Tour steps - "or follow our initial tour to learn the basic steps." -->
138
+ <p><span style="float:left;max-width:65%"><?php
139
+ esc_html_e( 'WP Mobile Menu is ready to help you with your mobile visitor. You can quickly start by importing one of the demos.', 'mobile-menu' );
140
+ ?></span>
141
+ <!--<a href="#" style="font-size: 22px;text-decoration: auto;border: 2px solid #2271b1;float: right; padding: 8px 15px 8px 15px;border-radius: 4px;"><i class="dashicons-before dashicons-video-alt3"></i> Start Tour</a></p>-->
142
+
143
+ <ul class="demos-importer">
144
+ <li>
145
+ <a href="https://demo.wpmobilemenu.com/?utm_source=wprepo-dash&utm_medium=user%20website&utm_campaign=import-demo" target="_blank">
146
+ <img src="<?php
147
+ echo plugins_url( 'demo-content/assets/freedemo-mobile-menu.png', __FILE__ ) ;
148
+ ?>">
149
+ <span><?php
150
+ esc_html_e( 'See Demo Site', 'mobile-menu' );
151
+ ?></span>
152
+ </a>
153
+ <div>
154
+ <h4><?php
155
+ esc_html_e( 'Free Demo', 'mobile-menu' );
156
+ ?></h4>
157
+ <button type="submit" class="button button-secondary button-next mobile-menu-import-demo" data-demo-id="free-demo" value="<?php
158
+ esc_attr_e( 'Import Demo', 'mobile-menu' );
159
+ ?>"><?php
160
+ esc_html_e( 'Import Demo', 'mobile-menu' );
161
+ ?></button>
162
+ <?php
163
+
164
+ if ( isset( $_REQUEST['demo'] ) && 'free-demo' === $_REQUEST['demo'] ) {
165
+ ?>
166
+ <h4 class="<?php
167
+ echo $message_code ;
168
+ ?>"><?php
169
+ _e( $message, 'mobile-menu' );
170
+ ?></h4>
171
+ <?php
172
+ }
173
+
174
+ ?>
175
+ </div>
176
+
177
+ </li>
178
+ <li>
179
+ <a href="https://shopdemo.wpmobilemenu.com/?utm_source=wprepo-dash&utm_medium=user%20website&utm_campaign=demo_importer_option" target="_blank">
180
+ <img src="<?php
181
+ echo plugins_url( 'demo-content/assets/shopdemo-mobile-menu.png', __FILE__ ) ;
182
+ ?>">
183
+ <span><?php
184
+ esc_html_e( 'See Demo Site', 'mobile-menu' );
185
+ ?></span>
186
+ </a>
187
+ <div>
188
+ <h4><?php
189
+ esc_html_e( 'WooCommerce Shop Demo (Business)', 'mobile-menu' );
190
+ ?></h4>
191
+ <button type="submit" class="button button-secondary button-next mobile-menu-import-demo <?php
192
+ echo $version_class ;
193
+ ?>" data-demo-id="shop-demo" value="<?php
194
+ esc_attr_e( 'Import Demo', 'mobile-menu' );
195
+ ?>"><?php
196
+ esc_html_e( 'Import Demo', 'mobile-menu' );
197
+ ?></button>
198
+ <?php
199
+
200
+ if ( isset( $_REQUEST['demo'] ) && 'shop-demo' === $_REQUEST['demo'] ) {
201
+ ?>
202
+ <h4 class="<?php
203
+ echo $message_code ;
204
+ ?>"><?php
205
+ _e( $message, 'mobile-menu' );
206
+ ?></h4>
207
+ <?php
208
+ }
209
+
210
+ ?>
211
+ </div>
212
+ </li>
213
+ <li>
214
+ <a href="https://prodemo.wpmobilemenu.com/?utm_source=wprepo-dash&utm_medium=user%20website&utm_campaign=demo_importer_option" target="_blank">
215
+ <img src="<?php
216
+ echo plugins_url( 'demo-content/assets/prodemo-mobile-menu.png', __FILE__ ) ;
217
+ ?>">
218
+ <span><?php
219
+ esc_html_e( 'See Demo Site', 'mobile-menu' );
220
+ ?></span>
221
+ </a>
222
+ <div>
223
+ <h4><?php
224
+ esc_html_e( 'Professional Demo', 'mobile-menu' );
225
+ ?></h4>
226
+ <button type="submit" class="button button-secondary button-next mobile-menu-import-demo <?php
227
+ echo $version_class ;
228
+ ?>" data-demo-id="professional-demo" value="<?php
229
+ esc_attr_e( 'Import Demo', 'mobile-menu' );
230
+ ?>"><?php
231
+ esc_html_e( 'Import Demo', 'mobile-menu' );
232
+ ?></button>
233
+ <?php
234
+
235
+ if ( isset( $_REQUEST['demo'] ) && 'professional-demo' === $_REQUEST['demo'] ) {
236
+ ?>
237
+ <h4 class="<?php
238
+ echo $message_code ;
239
+ ?>"><?php
240
+ _e( $message, 'mobile-menu' );
241
+ ?></h4>
242
+ <?php
243
+ }
244
+
245
+ ?>
246
+ </div>
247
+ </li>
248
+ </ul>
249
+ </div>
250
+ <?php
251
+ $demos_content = ob_get_clean();
252
+ $custom_html = '<div class="mm-welcome-box"><h3>Welcome to WP Mobile Menu</h3>' . $demos_content . '</div>';
253
+ $custom_html .= '<h3>' . __( 'Choose the style of your Mobile Menu', 'mobile-menu' ) . '</h3><div class="mm-mobile-header-type">';
254
  $custom_html .= '<div><h4>' . __( 'Hamburger Menu', 'mobile-menu' ) . '</h4><img src="' . plugins_url( '/assets/mobile_hamburger_menu_option.png', __FILE__ ) . '" class="hamburger-menu"></div>';
255
  $custom_html .= '<div><h4>' . __( 'Header Menu', 'mobile-menu' ) . '</h4><img src="' . plugins_url( '/assets/mobile_header.png', __FILE__ ) . '"></div></div>';
256
  // Mobile Header type.
288
  'type' => 'select',
289
  'desc' => __( 'Select the menu that will open in the left side.', 'mobile-menu' ),
290
  'options' => $menus_options,
291
+ 'default' => $plugin_settings->getOption( 'left_menu' ),
292
  'class' => 'general-options left-menu-options',
293
  ) );
294
  // Enable/Disable Right Header Menu.
308
  'type' => 'select',
309
  'desc' => __( 'Select the menu that will open in the right side.', 'mobile-menu' ),
310
  'options' => $menus_options,
311
+ 'default' => $plugin_settings->getOption( 'right_menu' ),
312
  'class' => 'general-options right-menu-options',
313
  ) );
314
+ // Menu Display Type.
315
+ $general_tab->createOption( array(
316
+ 'name' => __( 'Menu Display Type', 'mobile-menu' ),
317
+ 'id' => 'menu_display_type',
318
+ 'type' => 'select',
319
+ 'desc' => __( 'Choose the display type for the mobile menu.', 'mobile-menu' ),
320
+ 'options' => $display_type,
321
+ 'default' => 'slideout-over',
322
+ 'class' => 'general-options',
323
+ ) );
324
+ $this->create_footer_options_upsell( $panel, $plugin_settings );
325
+ // Create Woocommerce options upsell.
326
+ $this->create_woocommerce_options_upsell( $panel, $plugin_settings );
327
+ // Enable/Disable only in Mobile Devices.
328
+ $general_tab->createOption( array(
329
+ 'name' => __( 'Enable only in Mobile devices', 'mobile-menu' ),
330
+ 'id' => 'only_mobile_devices',
331
+ 'type' => 'enable',
332
+ 'default' => false,
333
+ 'desc' => __( 'Enable only in Mobiles devices. This will disable the Mobile Menu Visibilty option above (using resolution width trigger).', 'mobile-menu' ),
334
+ 'enabled' => __( 'On', 'mobile-menu' ),
335
+ 'disabled' => __( 'Off', 'mobile-menu' ),
336
+ 'class' => 'general-visibility-options',
337
+ ) );
338
  // Width trigger.
339
  $general_tab->createOption( array(
340
  'name' => __( 'Mobile Menu Visibility(Width Trigger)', 'mobile-menu' ),
347
  'unit' => 'px',
348
  'class' => 'general-visibility-options',
349
  ) );
350
+ // Hide Html Elements.
351
  $general_tab->createOption( array(
352
+ 'name' => __( 'Hide Elements', 'mobile-menu' ),
353
+ 'id' => 'hide_elements',
354
+ 'type' => 'text',
355
+ 'default' => '',
356
+ 'desc' => __( 'Use the Find element button and click in the elements you want to hide. When you are done hit the Save Changes button.<br>Example: .menu , #nav</p>', 'mobile-menu' ),
357
+ 'class' => 'general-visibility-options',
 
 
 
 
 
 
 
 
358
  ) );
359
+ /*
360
+ $general_tab->createOption( array(
361
+ 'type' => 'note',
362
+ 'desc' => __( 'The Width trigger field is very important because it determines the width that will show the Mobile Menu. If you want it always visible set it to 5000px', 'mobile-menu' ),
363
+ 'class' => 'general-visibility-options',
364
+ ) );*/
365
  // Enable/Disable Testing Mode.
366
  $general_tab->createOption( array(
367
+ 'name' => __( 'Testing Mode (only visible for admins).', 'mobile-menu' ),
368
  'id' => 'only_testing_mode',
369
  'type' => 'enable',
370
  'default' => false,
373
  'disabled' => __( 'Off', 'mobile-menu' ),
374
  'class' => 'general-visibility-options',
375
  ) );
 
 
 
 
 
 
 
 
 
376
  $general_tab->createOption( array(
377
  'type' => 'note',
378
  'desc' => __( 'If you somehow couldn\'t find the necessary elements using the visual tool to pick elements just create a new ticket in our <a href="https://www.wpmobilemenu.com/support-contact/?utm_source=wprepo-dash&utm_medium=user%20website&utm_campaign=hide_original_menu_help" target="_blank">support page</a> with your site url and a screenshot of the element you want to hide. We reply fast.', 'mobile-menu' ),
379
+ 'class' => 'general-visibility-options',
380
  ) );
381
  $general_tab->createOption( array(
382
  'name' => __( 'Hide elements by default', 'mobile-menu' ),
421
  '16',
422
  '17'
423
  ),
424
+ 'class' => 'general-visibility-options hide',
 
 
 
 
 
 
 
 
 
 
425
  ) );
426
  // Automatically Close Sub Menus.
427
  $general_tab->createOption( array(
432
  'default' => false,
433
  'enabled' => __( 'On', 'mobile-menu' ),
434
  'disabled' => __( 'Off', 'mobile-menu' ),
435
+ 'class' => 'left-menu-options right-menu-options',
436
  ) );
437
  // Menu Border Style.
438
  $general_tab->createOption( array(
444
  'max' => '5',
445
  'min' => '0',
446
  'unit' => 'px',
447
+ 'class' => 'left-menu-options right-menu-options',
448
+ ) );
449
+ // Custom css.
450
+ $general_tab->createOption( array(
451
+ 'name' => __( 'Custom CSS', 'mobile-menu' ),
452
+ 'id' => 'custom_css',
453
+ 'type' => 'code',
454
+ 'desc' => __( 'Put your custom CSS rules here', 'mobile-menu' ),
455
+ 'lang' => 'css',
456
+ 'class' => 'advanced-options',
457
+ ) );
458
+ // Custom js.
459
+ $general_tab->createOption( array(
460
+ 'name' => __( 'Custom JS', 'mobile-menu' ),
461
+ 'id' => 'custom_js',
462
+ 'type' => 'code',
463
+ 'desc' => __( 'Put your custom JS rules here', 'mobile-menu' ),
464
+ 'lang' => 'javascript',
465
+ 'class' => 'advanced-options',
466
  ) );
467
  // Close Menu Icon Font.
468
  $general_tab->createOption( array(
471
  'type' => 'text',
472
  'desc' => __( '<div class="mobmenu-icon-holder"></div><a href="#" class="mobmenu-icon-picker button">Select menu icon</a>', 'mobile-menu' ),
473
  'default' => 'cancel-1',
474
+ 'class' => 'advanced-options',
475
  ) );
476
  // Close Menu Icon Font Size.
477
  $general_tab->createOption( array(
483
  'max' => '100',
484
  'min' => '5',
485
  'unit' => 'px',
486
+ 'class' => 'advanced-options',
487
  ) );
488
  // Submenu Open Icon Font.
489
  $general_tab->createOption( array(
492
  'type' => 'text',
493
  'desc' => __( '<div class="mobmenu-icon-holder"></div><a href="#" class="mobmenu-icon-picker button">Select menu icon</a>', 'mobile-menu' ),
494
  'default' => 'down-open',
495
+ 'class' => 'advanced-options',
496
  ) );
497
  // Submenu Close Icon Font.
498
  $general_tab->createOption( array(
501
  'type' => 'text',
502
  'desc' => __( '<div class="mobmenu-icon-holder"></div><a href="#" class="mobmenu-icon-picker button">Select menu icon</a>', 'mobile-menu' ),
503
  'default' => 'up-open',
504
+ 'class' => 'advanced-options',
505
  ) );
506
  // Submenu Icon Font Size.
507
  $general_tab->createOption( array(
513
  'max' => '100',
514
  'min' => '0',
515
  'unit' => 'px',
516
+ 'class' => 'advanced-options',
517
  ) );
518
  // Automatically Close Sub Menus.
519
  $general_tab->createOption( array(
524
  'default' => false,
525
  'enabled' => __( 'On', 'mobile-menu' ),
526
  'disabled' => __( 'Off', 'mobile-menu' ),
527
+ 'class' => 'advanced-options',
528
  ) );
529
  // Sticky Html Elements.
530
  $general_tab->createOption( array(
533
  'type' => 'text',
534
  'default' => '',
535
  'desc' => __( '<p>If you are having issues with sticky elements that dont assume a sticky behaviour, enter the ids or class name that identify that element.</p>', 'mobile-menu' ),
536
+ 'class' => 'advanced-options',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  ) );
538
  // Export settings.
539
  $general_tab->createOption( array(
540
  'name' => __( 'Export Settings', 'mobile-menu' ),
541
  'type' => 'custom',
542
  'custom' => '<button class="button button-secondary export-mobile-menu-settings">' . __( 'Export', 'mobile-menu' ) . '</button>',
543
+ 'class' => 'advanced-import-export',
544
  ) );
545
  // Import settings.
546
  $general_tab->createOption( array(
547
  'name' => __( 'Import Settings', 'mobile-menu' ),
548
  'type' => 'custom',
549
  'custom' => '<button class="button button-secondary import-mobile-menu-settings">' . __( 'Import', 'mobile-menu' ) . '</button>',
550
+ 'class' => 'advanced-import-export',
551
  ) );
552
  // Enable/Disable Sticky Header.
553
  $general_tab->createOption( array(
654
  'class' => 'header-options',
655
  ) );
656
  $header_branding = array(
657
+ 'logo' => __( 'Image', 'mobile-menu' ),
658
  'text' => __( 'Text', 'mobile-menu' ),
659
  );
660
 
661
+ if ( $plugin_settings->getOption( 'enabled_logo' ) ) {
662
  $default_header_branding = 'logo';
663
  } else {
664
  $default_header_branding = 'text';
676
  ) );
677
  // Site Logo Image.
678
  $general_tab->createOption( array(
679
+ 'name' => __( 'Logo Image', 'mobile-menu' ),
680
  'id' => 'logo_img',
681
  'type' => 'upload',
682
  'desc' => __( 'Upload your logo image', 'mobile-menu' ),
683
  'default' => '',
684
  'class' => 'logo-options',
685
  ) );
686
+ // Site Logo Retina Image.
687
+ $general_tab->createOption( array(
688
+ 'name' => __( 'Logo Image for Retina devices', 'mobile-menu' ),
689
+ 'id' => 'logo_img_retina',
690
+ 'type' => 'upload',
691
+ 'desc' => __( 'Upload your logo image for retina devices', 'mobile-menu' ),
692
+ 'default' => '',
693
+ 'class' => 'logo-options',
694
+ ) );
695
  // Header Height.
696
  $general_tab->createOption( array(
697
+ 'name' => __( 'Logo Image Height', 'mobile-menu' ),
698
  'id' => 'logo_height',
699
  'type' => 'number',
700
  'desc' => __( 'Enter the height of the logo', 'mobile-menu' ),
704
  'unit' => 'px',
705
  'class' => 'logo-options',
706
  ) );
 
 
 
 
 
 
 
 
 
707
  // Enable/Disable Logo Url.
708
  $general_tab->createOption( array(
709
  'name' => __( 'Disable Logo URL ', 'mobile-menu' ),
736
  'unit' => 'px',
737
  'class' => 'logo-options',
738
  ) );
739
+ $def_value = $plugin_settings->getOption( 'header_font_size' );
740
 
741
  if ( $def_value > 0 ) {
742
  $def_value .= 'px';
761
  'font-family' => 'Dosis',
762
  'font-size' => $def_value,
763
  ),
764
+ 'class' => 'font-options',
765
  ) );
766
  // Click Menu Parent link to open Sub menu.
767
  $general_tab->createOption( array(
775
  'class' => 'left-menu-options',
776
  ) );
777
 
778
+ if ( true === $plugin_settings->getOption( 'left_menu_icon_opt' ) ) {
779
  $icon_type = 'image';
780
  } else {
781
  $icon_type = 'icon';
819
  'type' => 'upload',
820
  'placeholder' => 'Click here to select the icon',
821
  'desc' => __( 'Upload your left menu icon image', 'mobile-menu' ),
822
+ 'default' => '',
823
  'class' => 'left-menu-icon',
824
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
825
  // Icon Action Option.
826
  $general_tab->createOption( array(
827
  'name' => __( 'Icon Action', 'mobile-menu' ),
853
  'disabled' => 'Blank',
854
  'class' => 'left-menu-icon',
855
  ) );
856
+ // Text After Left Icon.
857
+ $general_tab->createOption( array(
858
+ 'name' => __( 'Text After Icon', 'mobile-menu' ),
859
+ 'id' => 'left_menu_text',
860
+ 'type' => 'text',
861
+ 'desc' => __( 'Enter the text that will appear after the Icon.', 'mobile-menu' ),
862
+ 'default' => '',
863
+ 'class' => 'left-menu-icon',
864
+ ) );
865
+ // Text After Left Icon Font Options.
866
+ $general_tab->createOption( array(
867
+ 'name' => __( 'Text After Icon Font', 'mobile-menu' ),
868
+ 'id' => 'text_after_left_icon_font',
869
+ 'type' => 'font',
870
+ 'desc' => __( 'Select a style', 'mobile-menu' ),
871
+ 'show_font_weight' => true,
872
+ 'show_font_style' => true,
873
+ 'show_line_height' => true,
874
+ 'show_letter_spacing' => true,
875
+ 'show_text_transform' => true,
876
+ 'show_font_variant' => false,
877
+ 'show_text_shadow' => false,
878
+ 'show_color' => true,
879
+ 'default' => array(
880
+ 'line-height' => '1.5em',
881
+ 'font-family' => 'Dosis',
882
+ ),
883
+ 'class' => 'font-options',
884
+ ) );
885
  // Left Menu Icon Top Margin.
886
  $general_tab->createOption( array(
887
  'name' => __( 'Icon Top Margin', 'mobile-menu' ),
1020
  'line-height' => '1.5em',
1021
  'font-family' => 'Dosis',
1022
  ),
1023
+ 'class' => 'font-options',
1024
  ) );
1025
  // Click Menu Parent link to open Sub menu.
1026
  $general_tab->createOption( array(
1034
  'class' => 'right-menu-options',
1035
  ) );
1036
 
1037
+ if ( true === $plugin_settings->getOption( 'right_menu_icon_opt' ) ) {
1038
  $icon_type = 'image';
1039
  } else {
1040
  $icon_type = 'icon';
1077
  'id' => 'right_menu_icon',
1078
  'type' => 'upload',
1079
  'desc' => __( 'Upload your right menu icon image', 'mobile-menu' ),
1080
+ 'default' => '',
1081
  'class' => 'right-menu-icon',
1082
  ) );
1083
  // Icon Action Option.
1091
  'disabled' => __( 'Open Link Url', 'mobile-menu' ),
1092
  'class' => 'right-menu-icon',
1093
  ) );
1094
+ // Icon URL.
1095
+ $general_tab->createOption( array(
1096
+ 'name' => __( 'Icon Link URL', 'mobile-menu' ),
1097
+ 'id' => 'right_icon_url',
1098
+ 'type' => 'text',
1099
+ 'desc' => __( 'Enter the Icon Link Url.', 'mobile-menu' ),
1100
+ 'default' => '',
1101
+ 'class' => 'right-menu-icon',
1102
+ ) );
1103
+ // Icon URL Target.
1104
+ $general_tab->createOption( array(
1105
+ 'name' => __( 'Icon Link Url Target', 'mobile-menu' ),
1106
+ 'id' => 'right_icon_url_target',
1107
+ 'type' => 'enable',
1108
+ 'default' => true,
1109
+ 'desc' => __( 'Choose it the link will open in the same window or in the new window.', 'mobile-menu' ),
1110
+ 'enabled' => 'Self',
1111
+ 'disabled' => 'Blank',
1112
+ 'class' => 'right-menu-icon',
1113
+ ) );
1114
  // Text Before Right Icon.
1115
  $general_tab->createOption( array(
1116
  'name' => __( 'Text Before Icon', 'mobile-menu' ),
1139
  'line-height' => '1.5em',
1140
  'font-family' => 'Dosis',
1141
  ),
1142
+ 'class' => 'font-options',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1143
  ) );
1144
  // Right Menu Icon Top Margin.
1145
  $general_tab->createOption( array(
1279
  'line-height' => '1.5em',
1280
  'font-family' => 'Dosis',
1281
  ),
1282
+ 'class' => 'font-options',
1283
  ) );
1284
  // Overlay Background color.
1285
  $general_tab->createOption( array(
1328
  ) );
1329
  // Left Menu Icon color.
1330
  $general_tab->createOption( array(
1331
+ 'name' => __( 'Menu Icon Color', 'mobile-menu' ),
1332
  'id' => 'left_menu_icon_color',
1333
  'type' => 'color',
1334
  'desc' => '',
1418
  ) );
1419
  // Right Menu Icon color.
1420
  $general_tab->createOption( array(
1421
+ 'name' => __( 'Menu Icon Color', 'mobile-menu' ),
1422
  'id' => 'right_menu_icon_color',
1423
  'type' => 'color',
1424
  'desc' => '',
1508
  ) );
1509
  // Left Panel 3rd Level Left Menu Items Text color.
1510
  $general_tab->createOption( array(
1511
+ 'name' => __( '3rd Level Text Color', 'mobile-menu' ),
1512
  'id' => 'left_panel_3rd_menu_text_color',
1513
  'type' => 'color',
1514
  'desc' => '',
1515
  'alpha' => true,
1516
  'default' => '#fff',
1517
+ 'class' => 'left-menu-colors',
1518
  ) );
1519
  // Left Panel 3rd Level Left Menu Items Text color Hover.
1520
  $general_tab->createOption( array(
1521
+ 'name' => __( '3rd Level Text Color Hover', 'mobile-menu' ),
1522
  'id' => 'left_panel_3rd_menu_text_color_hover',
1523
  'type' => 'color',
1524
  'desc' => '',
1525
  'alpha' => true,
1526
  'default' => '#ccc',
1527
+ 'class' => 'left-menu-colors',
1528
  ) );
1529
  // Left Panel 3rd Level Left Menu Items Background color.
1530
  $general_tab->createOption( array(
1531
+ 'name' => __( '3rd Level Background Color', 'mobile-menu' ),
1532
  'id' => 'left_panel_3rd_menu_bg_color',
1533
  'type' => 'color',
1534
  'desc' => '',
1535
  'alpha' => true,
1536
  'default' => '#222',
1537
+ 'class' => 'left-menu-colors',
1538
  ) );
1539
  // Left Panel 3rd Level Left Menu Items Background color Hover.
1540
  $general_tab->createOption( array(
1541
+ 'name' => __( '3rd Level Background Color Hover', 'mobile-menu' ),
1542
  'id' => 'left_panel_3rd_menu_bg_color_hover',
1543
  'type' => 'color',
1544
  'desc' => '',
1545
  'alpha' => true,
1546
  'default' => '#666',
1547
+ 'class' => 'left-menu-colors',
1548
  ) );
1549
  // Right Panel 3rd Level Right Menu Items Text color.
1550
  $general_tab->createOption( array(
1551
+ 'name' => __( '3rd Level Menu Text', 'mobile-menu' ),
1552
  'id' => 'right_panel_3rd_menu_text_color',
1553
  'type' => 'color',
1554
  'desc' => '',
1555
  'alpha' => true,
1556
  'default' => '#fff',
1557
+ 'class' => 'right-menu-colors',
1558
  ) );
1559
  // Right Panel 3rd Level Right Menu Items Text color Hover.
1560
  $general_tab->createOption( array(
1561
+ 'name' => __( '3rd Level Text Color Hover', 'mobile-menu' ),
1562
  'id' => 'right_panel_3rd_menu_text_color_hover',
1563
  'type' => 'color',
1564
  'desc' => '',
1565
  'alpha' => true,
1566
  'default' => '#ccc',
1567
+ 'class' => 'right-menu-colors',
1568
  ) );
1569
  // Right Panel 3rd Level Right Menu Items Background color.
1570
  $general_tab->createOption( array(
1571
+ 'name' => __( '3rd Level Background Color', 'mobile-menu' ),
1572
  'id' => 'right_panel_3rd_menu_bg_color',
1573
  'type' => 'color',
1574
  'desc' => '',
1575
  'alpha' => true,
1576
  'default' => '#222',
1577
+ 'class' => 'right-menu-colors',
1578
  ) );
1579
  // Right Panel 3rd Level Right Menu Items Background color Hover.
1580
  $general_tab->createOption( array(
1581
+ 'name' => __( '3rd Level Background Color Hover', 'mobile-menu' ),
1582
  'id' => 'right_panel_3rd_menu_bg_color_hover',
1583
  'type' => 'color',
1584
  'desc' => '',
1585
  'alpha' => true,
1586
  'default' => '#666',
1587
+ 'class' => 'right-menu-colors',
1588
  ) );
1589
  $panel->createOption( array(
1590
  'type' => 'save',
1600
  * @since 2.6
1601
  *
1602
  * @param type $panel Panel Options.
1603
+ * @param Object $plugin_settings plugin settings object that is being edited.
1604
  */
1605
+ public function create_woocommerce_options_upsell( $panel, $plugin_settings )
1606
  {
1607
  global $mm_fs ;
1608
  global $general_tab ;
1634
  * @since 2.6
1635
  *
1636
  * @param type $panel Panel Options.
1637
+ * @param Object $plugin_settings plugin settings object that is being edited.
1638
  */
1639
+ public function create_footer_options_upsell( $panel, $plugin_settings )
1640
  {
1641
  global $mm_fs ;
1642
  global $general_tab ;
includes/class-wp-mobile-menu-walker-nav-menu.php CHANGED
@@ -49,13 +49,14 @@ class WP_Mobile_Menu_Walker_Nav_Menu extends Walker_Nav_Menu
49
  $attributes .= ( !empty($item->target) ? ' target="' . esc_attr( $item->target ) . '"' : '' );
50
  $attributes .= ( !empty($item->xfn) ? ' rel="' . esc_attr( $item->xfn ) . '"' : '' );
51
  $attributes .= ( !empty($item->url) ? ' href="' . esc_attr( $item->url ) . '"' : '' );
 
52
  $item_output = $args->before;
53
 
54
  if ( 'below' === $menu_position ) {
55
- $item_output .= '<li ' . $class_names . '><a' . $attributes . ' class="' . $icon_class . '">';
56
  $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $mobile_icon . $args->link_after;
57
  } else {
58
- $item_output .= '<li ' . $class_names . '><a' . $attributes . ' class="' . $icon_class . '">' . $mobile_icon;
59
  $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
60
  }
61
 
@@ -88,7 +89,7 @@ class WP_Mobile_Menu_Walker_Nav_Menu extends Walker_Nav_Menu
88
  {
89
  global $mm_fs ;
90
  $indent = str_repeat( "\t", $depth );
91
- $output .= "\n{$indent}<ul class=\"sub-menu \">\n";
92
  }
93
 
94
  }
49
  $attributes .= ( !empty($item->target) ? ' target="' . esc_attr( $item->target ) . '"' : '' );
50
  $attributes .= ( !empty($item->xfn) ? ' rel="' . esc_attr( $item->xfn ) . '"' : '' );
51
  $attributes .= ( !empty($item->url) ? ' href="' . esc_attr( $item->url ) . '"' : '' );
52
+ $attributes .= ' role="menuitem"';
53
  $item_output = $args->before;
54
 
55
  if ( 'below' === $menu_position ) {
56
+ $item_output .= '<li role="none" ' . $class_names . '><a' . $attributes . ' class="' . $icon_class . '">';
57
  $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $mobile_icon . $args->link_after;
58
  } else {
59
+ $item_output .= '<li role="none" ' . $class_names . '><a' . $attributes . ' class="' . $icon_class . '">' . $mobile_icon;
60
  $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
61
  }
62
 
89
  {
90
  global $mm_fs ;
91
  $indent = str_repeat( "\t", $depth );
92
+ $output .= "\n{$indent}<ul role='menu' class=\"sub-menu \">\n";
93
  }
94
 
95
  }
includes/css/mobmenu-admin.css CHANGED
@@ -13,6 +13,7 @@
13
  opacity: 0;
14
  width: 10px;
15
  padding: 0px!important;
 
16
  }
17
  .mobmenu-standard .general-options th.first:nth-child(0) {
18
  opacity: 0;
@@ -235,20 +236,19 @@
235
  font-size: 16px;
236
  }
237
 
238
- /* Titan Framework Custom css */
239
- td.second.tf-select .select2 {
240
  width: 50%!important;
241
  }
242
- .titan-framework-panel-wrap td.second.tf-iframe iframe {
243
  margin-left: -200px!important;
244
  }
245
- .options-container .tf-sortable .vertical li {
246
  width: 50%;
247
  }
248
- .titan-framework-panel-wrap{
249
 
250
  }
251
- .tf-sortable li {
252
  width: 12%;
253
  float: left;
254
  line-height: 20px;
@@ -261,40 +261,43 @@ td.second.tf-select .select2 {
261
  .general-options .dashicons.dashicons-menu {
262
  display: none;
263
  }
264
- .active-tab-general-options .tf-sortable div {
265
  margin-top: 20px;
266
  }
267
- .active-tab-general-options .form-table td fieldset label {
268
  float: left;
269
  width: 50%;
270
  }
271
- .active-tab-general-options .form-table td fieldset br {
272
- display: none;
273
  }
274
  .options-container th.first {
275
  padding: 20px!important;
 
 
 
276
  }
277
- .tf-sortable ul{
278
  width: 100%;
279
  }
280
- .tf-sortable ul li i:last-of-type{
281
  margin-left: 0px!important;
282
  }
283
- .tf-font .wp-picker-container {
284
  display: none;
285
  }
286
- .active-tab-colors .form-table tr {
287
  width: 50%;
288
  float: left;
289
  }
290
- .active-tab-colors .form-table th {
291
  width: 100vh;
292
  }
293
- .active-tab-colors tr.even.first.tf-heading {
294
  width: 100%;
295
  background: #f4f4f4;
296
  }
297
- .tf-heading th.first.last h3 {
298
  color: #656e77;
299
  letter-spacing: 1px;
300
  }
@@ -309,30 +312,30 @@ td.second.tf-select .select2 {
309
  display: block!important;
310
  padding-bottom: 30px;
311
  }
312
- .titan-framework-panel-wrap .tf-heading th {
313
  background:none repeat scroll 0 0 #fbfbfb!important;
314
  width: 100vw;
315
  }
316
- .titan-framework-panel-wrap .form-table tr.heading label {
317
- color: #5b7ff7;
318
  font-weight: 500;
319
  font-size: 15px;
320
  }
321
- .titan-framework-panel-wrap .active-tab-fonts .form-table th label {
322
- font-weight: 600;
323
  }
324
- .titan-framework-panel-wrap .active, .titan-framework-panel-wrap .active:hover {
325
  background: #FFF!important;
326
  }
327
- .titan-framework-panel-wrap .button-primary{
328
- background: #8995B2!important;
329
  }
330
- .titan-framework-panel-wrap .button-secondary{
331
  color: #8995B2!important;
332
  border-color: #8995B2!important;
333
  background-color: #FFF!important;
334
  }
335
- td.second.tf-multicheck-pages fieldset {
336
  max-height: 500px;
337
  overflow: scroll;
338
  min-height: 200px;
@@ -365,10 +368,16 @@ td.second.tf-multicheck-pages fieldset {
365
  background: #fff;
366
  }
367
  .mobile-menu-demos-wrapper {
368
- width: 60%;
369
  padding:20px;
 
 
 
 
 
 
370
  }
371
- .titan-framework-panel-wrap .mobile-menu-importer-wrapper .form-table tr, .titan-framework-panel-wrap .mobile-menu-importer-wrapper .form-table th {
372
  border:none!important;
373
  }
374
  .mobmenu-message-holder h4.success, .demos-importer h4.success {
@@ -393,19 +402,30 @@ td.second.tf-multicheck-pages fieldset {
393
  width: 220px;
394
  }
395
  .demos-importer li {
396
- width: 50%;
397
  float: left;
398
  text-align: center;
399
- min-width: 250px;
400
  }
401
  .demos-importer {
402
- display: flex;
 
 
403
  }
404
- .demos-importer li a:hover img {
405
- opacity: 0.2;
406
  }
407
  .demos-importer li a:hover span {
408
  opacity: 1;
 
 
 
 
 
 
 
 
 
409
  }
410
  .demos-importer li a span {
411
  display: block;
@@ -420,34 +440,38 @@ td.second.tf-multicheck-pages fieldset {
420
  opacity: 0.5;
421
  }
422
  /* Setting panel layout changes */
423
- .titan-framework-panel-wrap .nav-tab-wrapper {
424
  max-width: 250px;
425
  min-width: 160px;
426
  }
427
- .titan-framework-panel-wrap .form-table tr {
428
  display: none;
429
  }
430
- .titan-framework-panel-wrap .nav-tab-wrapper, .wrap .titan-framework-panel-wrap h2.nav-tab-wrapper {
431
  border-bottom: none;
432
- background: #f9f9f9;
433
  margin-top: 0px;
434
- border-right: 1px solid #98a2bc;
 
 
435
  }
436
- .titan-framework-panel-wrap {
437
  display: flex;
438
  min-height: 80vh;
439
  background: #fff;
440
  }
441
- .titan-framework-panel-wrap .nav-tab {
442
  width: 100%;
443
  border: none;
444
  margin-left: 0px;
445
- color: #737b8d;
446
- background: #f9f9f9;
447
- font-weight: 500;
448
- line-height: 2.5em;
449
- letter-spacing: 0.5px;
450
- padding: 0px 0px 10px 20px;
 
 
451
  }
452
  [data-link-id=general-alerts]{
453
  display: none;
@@ -463,9 +487,8 @@ td.second.tf-multicheck-pages fieldset {
463
  display: none;
464
  }
465
  .nav-tab-wrapper ul li {
466
- padding: 2px;
467
- font-size: 13px;
468
- font-weight: 500;
469
  margin: 0;
470
  color: #737b8d;
471
  line-height: 2em;
@@ -473,17 +496,17 @@ td.second.tf-multicheck-pages fieldset {
473
  margin-top: 6px;
474
  margin-bottom: 6px;
475
  }
476
- .titan-framework-panel-wrap .nav-tab:focus {
477
  box-shadow: none;
478
  }
479
  .nav-tab-wrapper ul li:hover {
480
- background: #f7f7f7;
481
- color: #3695ef;
482
  }
483
- .titan-framework-panel-wrap .active, .titan-framework-panel-wrap .active:hover {
484
- color: #5C7FF7;
 
485
  }
486
- .wrap .titan-framework-panel-wrap .nav-tab-wrapper {
487
  padding: 0;
488
  position: relative;
489
  min-height: 80vh;
@@ -496,29 +519,33 @@ td.second.tf-multicheck-pages fieldset {
496
  padding: 12px;
497
  }
498
  .mobmenu-header-wrap-inner h2 {
499
- color: #FFF;
500
  font-size: 1.5em;
501
  }
502
  .mobmenu-title-h2{
503
  font-size: 0px;
504
  }
 
 
 
505
  .mobmenu-header-wrap-inner {
506
  padding-top: 15px;
507
  padding-bottom: 15px;
508
  padding-left: 20px;
509
- background: #5C7FF7;
 
510
  display: flex;
511
  }
512
- .titan-framework-panel-wrap .form-table th label {
513
  font-weight: 300;
514
- font-family: sans-serif;
515
  color: #5e667c;
516
  font-size: 13px;
517
  }
518
- .titan-framework-panel-wrap .form-table td .description {
519
  color: #8995b2;
520
  font-size: 13px;
521
  padding-top: 10px;
 
522
  }
523
  .nav-tab-wrapper ul li:hover {
524
  cursor: pointer;
@@ -527,29 +554,34 @@ td.second.tf-multicheck-pages fieldset {
527
  float: right;
528
  margin-right: 20px;
529
  }
530
- .titan-framework-panel-wrap .tf-font iframe {
531
  width: 100%;
532
  height: 100px;
533
  }
534
- .titan-framework-panel-wrap .active-tab-fonts .form-table tr {
535
  display: inline-grid;
536
  }
537
- .titan-framework-panel-wrap .active-tab-colors .form-table th label {
538
  font-weight: normal;
539
  line-height: 3em;
540
  color: #676767;
541
  }
542
- .titan-framework-panel-wrap .form-table {
543
- margin-top: 5px;
544
  background: #fff;
545
  }
546
- .titan-framework-panel-wrap .active-tab-documentation {
 
 
 
547
  width: 100%;
548
  }
549
  .mm-panel-search-bar {
550
- padding: 10px 10px;
551
  color: #FFF;
552
- margin-left: 50px;
 
 
553
  }
554
  .mm-panel-search-bar span {
555
  padding-left: 30px;
@@ -578,36 +610,49 @@ td.second.tf-multicheck-pages fieldset {
578
  opacity: 0;
579
  }
580
  .mm-doc-icon {
581
- color: #fff;
582
  margin-top: 25px;
583
- right: 50px;
584
  position: absolute;
585
  }
586
  .mm-doc-icon a {
587
  text-decoration: none;
588
- color: #fff;
589
  }
590
  .mm-doc-icon a:hover {
591
- color: #e0e7ec
 
 
 
592
  }
593
  .mm-panel-search-bar #mm_search_settings {
594
  border-radius: 4px;
595
- border: 2px solid #0085ba;
596
  font-size: 15px;
597
  color: #656e76;
598
  }
599
  .mm-panel-search-bar label {
600
  color: #b3dcf0;
601
  }
 
 
 
 
 
 
 
 
 
 
602
  .mm-scan-alerts {
603
  margin-top: 25px;
604
- right: 190px;
605
  position: absolute;
606
- color: #fff;
607
  }
608
  .mm-scan-alerts a {
609
  text-decoration: none;
610
- color: #fff;
611
  }
612
  .mm-scan-alerts a:hover {
613
  color: #e0e7ec;
@@ -615,17 +660,17 @@ td.second.tf-multicheck-pages fieldset {
615
  .CodeMirror {
616
  border: 1px solid #ddd;
617
  }
618
- .options-container .tf-sortable li {
619
  padding: 0 0 0 0px;
620
  background: #fff;
621
  cursor: grab;
622
  border: 1px solid #efefef;
623
  }
624
  /*
625
- .options-container.active-tab-general-options .tf-sortable li[data-value="logo"]{
626
  width:120px;
627
  }*/
628
- .options-container .tf-sortable li span {
629
  padding-top: 40px;
630
  display: block;
631
  text-align: center;
@@ -639,12 +684,13 @@ td.second.tf-multicheck-pages fieldset {
639
  position: absolute;
640
  left: 35px;
641
  margin-top: 45px;
642
- color: #fff;
643
  width: 90px;
644
  font-size: 11px;
 
645
  }
646
  .mm-version-holder a {
647
- color: #e0e7ec;
648
  }
649
  .mm-bussiness-features .dashicons-yes {
650
  color:#008000;
@@ -665,13 +711,18 @@ td.second.tf-multicheck-pages fieldset {
665
  }
666
  .mm-business-features-holder {
667
  padding: 20px;
 
668
  }
669
  .mm-business-image {
670
- float: right;
671
- padding-right: 5%;
672
  }
673
- .titan-framework-panel-wrap .options-container {
674
  width: 100%;
 
 
 
 
675
  }
676
  .mm-business-image p {
677
  text-align: center;
@@ -696,7 +747,7 @@ td.second.tf-multicheck-pages fieldset {
696
  overflow-y: scroll;
697
  margin-bottom: 30px;
698
  }
699
- .tf-upload .tf-image-preview, .tf-gallery .tf-image-preview {
700
  line-height: 0;
701
  position: relative;
702
  display: inline-block;
@@ -707,7 +758,7 @@ td.second.tf-multicheck-pages fieldset {
707
  cursor: pointer;
708
  opacity: 1;
709
  }
710
- .tf-upload .tf-image-preview:before, .tf-gallery .tf-image-preview:before {
711
  content: '\f132';
712
  font-family: 'dashicons';
713
  position: absolute;
@@ -720,11 +771,11 @@ td.second.tf-multicheck-pages fieldset {
720
  color: #ddd;
721
  }
722
  .mobmenu-find-element {
723
- border: 1px solid #2d7ab0;
724
- padding: 5px;
725
  margin-left: 10px;
726
  color: #fff;
727
- background: #5c7ff7;
728
  text-decoration: none;
729
  cursor: pointer;
730
  }
@@ -738,8 +789,8 @@ td.second.tf-multicheck-pages fieldset {
738
  border-radius: 25px;
739
  }
740
  .mm-alerts-bubble.alert-number-0 {
741
- color: #4ebb4e;
742
- box-shadow: 0 0 0 .1rem var(--white,#4ebb4e)
743
  }
744
 
745
 
@@ -748,7 +799,7 @@ td.second.tf-multicheck-pages fieldset {
748
  font-size: 10px;
749
  font-weight: 700;
750
  top: -11px;
751
- right: -5px;
752
  position: relative;
753
  box-shadow: 0 0 0 .1rem var(--white,#FF5722);
754
  border-radius: 25px;
@@ -757,32 +808,82 @@ td.second.tf-multicheck-pages fieldset {
757
  background: #ffffff;
758
  }
759
  .nav-tab-wrapper ul li.active {
760
- border-left: 2px solid #5c7ff7;
761
- color: #5c7ff7;
762
  }
763
  .active-tab-general-options .general-hide-elements, .active-tab-general-options .general-import-export, .active-tab-general-options .general-misc-options, .active-tab-general-options .general-visibility-options, .active-tab-general-options .general-advanced-options{
764
  display:none;
765
  }
766
- tr.even.first.tf-heading {
767
  display: none;
768
  }
769
  .select2-container--default .select2-results__option--highlighted[aria-selected] {
770
  background-color: #8995b2!important;
771
  }
772
- .titan-framework-panel-wrap .form-table td {
773
- padding: 15px 10px!important;
774
- }
775
- .titan-framework-panel-wrap .form-table {
776
- max-width: 1000px;
777
  }
778
  .submit button.button.button-primary {
779
- background: #5c7ff7!important;
780
  }
781
- .general-advanced-options td .CodeMirror-wrap pre {
 
782
  padding-left: 35px;
783
  }
784
  .mm-mobile-header-type {
785
  display: flex;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
786
  }
787
  .mm-mobile-header-type img {
788
  height: 300px;
@@ -793,13 +894,13 @@ tr.even.first.tf-heading {
793
  }
794
 
795
  .mm-mobile-header-type img.active {
796
- border: 2px solid #5b7ff7;
797
  border-radius: 15px;
798
  }
799
  .mm-mobile-header-type h4 {
800
  text-align: center;
801
- color: #5b7ff7;
802
  }
803
- #wpbody-content > div.wrap > div.titan-framework-panel-wrap.mobmenu-standard > div > form > table > tbody > tr.row-3.odd.general-options > th > label {
804
  display: none;
805
  }
13
  opacity: 0;
14
  width: 10px;
15
  padding: 0px!important;
16
+ min-width: 0px!important;
17
  }
18
  .mobmenu-standard .general-options th.first:nth-child(0) {
19
  opacity: 0;
236
  font-size: 16px;
237
  }
238
 
239
+ td.second.mm-select .select2 {
 
240
  width: 50%!important;
241
  }
242
+ .mobmenu-settings-panel-wrap td.second.mm-iframe iframe {
243
  margin-left: -200px!important;
244
  }
245
+ .options-container .mm-sortable .vertical li {
246
  width: 50%;
247
  }
248
+ .mobmenu-settings-panel-wrap{
249
 
250
  }
251
+ .mm-sortable li {
252
  width: 12%;
253
  float: left;
254
  line-height: 20px;
261
  .general-options .dashicons.dashicons-menu {
262
  display: none;
263
  }
264
+ .active-tab-general-options .mm-sortable div {
265
  margin-top: 20px;
266
  }
267
+ .active-tab-general-options .mm-form-table td fieldset label {
268
  float: left;
269
  width: 50%;
270
  }
271
+ .active-tab-general-options .mm-form-table td fieldset br, .mm-form-table .hide {
272
+ display: none!important;
273
  }
274
  .options-container th.first {
275
  padding: 20px!important;
276
+ display: flex!important;
277
+ width: fit-content;
278
+ min-width: 280px!important;
279
  }
280
+ .mm-sortable ul{
281
  width: 100%;
282
  }
283
+ .mm-sortable ul li i:last-of-type{
284
  margin-left: 0px!important;
285
  }
286
+ .mm-font .wp-picker-container {
287
  display: none;
288
  }
289
+ .active-tab-colors .mm-form-table tr {
290
  width: 50%;
291
  float: left;
292
  }
293
+ .active-tab-colors .mm-form-table th {
294
  width: 100vh;
295
  }
296
+ .active-tab-colors tr.even.first.mm-heading {
297
  width: 100%;
298
  background: #f4f4f4;
299
  }
300
+ .mm-heading th.first.last h3 {
301
  color: #656e77;
302
  letter-spacing: 1px;
303
  }
312
  display: block!important;
313
  padding-bottom: 30px;
314
  }
315
+ .mobmenu-settings-panel-wrap .mm-heading th {
316
  background:none repeat scroll 0 0 #fbfbfb!important;
317
  width: 100vw;
318
  }
319
+ .mobmenu-settings-panel-wrap .mm-form-table tr.heading label {
320
+ color: #183247;
321
  font-weight: 500;
322
  font-size: 15px;
323
  }
324
+ .mobmenu-settings-panel-wrap .active-tab-fonts .mm-form-table th label {
325
+ font-weight: 500;
326
  }
327
+ .mobmenu-settings-panel-wrap .active, .mobmenu-settings-panel-wrap .active:hover {
328
  background: #FFF!important;
329
  }
330
+ .mobmenu-settings-panel-wrap .button-primary{
331
+ background: #4d5167!important;
332
  }
333
+ .mobmenu-settings-panel-wrap .button-secondary{
334
  color: #8995B2!important;
335
  border-color: #8995B2!important;
336
  background-color: #FFF!important;
337
  }
338
+ td.second.mm-multicheck-pages fieldset {
339
  max-height: 500px;
340
  overflow: scroll;
341
  min-height: 200px;
368
  background: #fff;
369
  }
370
  .mobile-menu-demos-wrapper {
371
+ width: 80%;
372
  padding:20px;
373
+ margin-left: 30px;
374
+ }
375
+ .mm-welcome-box .dashicons-video-alt3:before {
376
+ content: "\f236";
377
+ margin-top: 6px;
378
+ padding-right: 10px;
379
  }
380
+ .mobmenu-settings-panel-wrap .mobile-menu-importer-wrapper .mm-form-table tr, .mobmenu-settings-panel-wrap .mobile-menu-importer-wrapper .mm-form-table th {
381
  border:none!important;
382
  }
383
  .mobmenu-message-holder h4.success, .demos-importer h4.success {
402
  width: 220px;
403
  }
404
  .demos-importer li {
405
+ width: 25%;
406
  float: left;
407
  text-align: center;
408
+ margin: 4%;
409
  }
410
  .demos-importer {
411
+ display: inline-block;
412
+ clear: both;
413
+ margin-top: 80px;
414
  }
415
+ .demos-importer li a:hover{
416
+ opacity: 0.5;
417
  }
418
  .demos-importer li a:hover span {
419
  opacity: 1;
420
+ background: #565656;
421
+ color: #fff;
422
+ padding-left: 0px;
423
+ padding-top: 10px;
424
+ padding-bottom: 10px;
425
+ width: 180px;
426
+ border-radius: 4px;
427
+ margin-left: 33px;
428
+ text-decoration: none!important;
429
  }
430
  .demos-importer li a span {
431
  display: block;
440
  opacity: 0.5;
441
  }
442
  /* Setting panel layout changes */
443
+ .mobmenu-settings-panel-wrap .nav-tab-wrapper {
444
  max-width: 250px;
445
  min-width: 160px;
446
  }
447
+ .mobmenu-settings-panel-wrap .mm-form-table tr {
448
  display: none;
449
  }
450
+ .mobmenu-settings-panel-wrap .nav-tab-wrapper, .wrap .mobmenu-settings-panel-wrap h2.nav-tab-wrapper {
451
  border-bottom: none;
452
+ background: #fff;
453
  margin-top: 0px;
454
+ padding-left: 10px;
455
+ border-left: 10px solid #ebeff3;
456
+ border-bottom: 10px solid #ebeff3;
457
  }
458
+ .mobmenu-settings-panel-wrap {
459
  display: flex;
460
  min-height: 80vh;
461
  background: #fff;
462
  }
463
+ .mobmenu-settings-panel-wrap .nav-tab {
464
  width: 100%;
465
  border: none;
466
  margin-left: 0px;
467
+ color: #183247;
468
+ background: #fff;
469
+ line-height: 2em;
470
+ letter-spacing: 0.3px;
471
+ padding: 10px 0px 10px 20px;
472
+ font-weight: 400;
473
+ font-size: 15px;
474
+ border-bottom: 1px solid #ebeff3;
475
  }
476
  [data-link-id=general-alerts]{
477
  display: none;
487
  display: none;
488
  }
489
  .nav-tab-wrapper ul li {
490
+ font-size: 14px;
491
+ font-weight: 300;
 
492
  margin: 0;
493
  color: #737b8d;
494
  line-height: 2em;
496
  margin-top: 6px;
497
  margin-bottom: 6px;
498
  }
499
+ .mobmenu-settings-panel-wrap .nav-tab:focus {
500
  box-shadow: none;
501
  }
502
  .nav-tab-wrapper ul li:hover {
503
+ color: #a5a4a0;
 
504
  }
505
+ .mobmenu-settings-panel-wrap .active, .mobmenu-settings-panel-wrap .active:hover {
506
+ color: #183247;
507
+ font-size: 15px;
508
  }
509
+ .wrap .mobmenu-settings-panel-wrap .nav-tab-wrapper {
510
  padding: 0;
511
  position: relative;
512
  min-height: 80vh;
519
  padding: 12px;
520
  }
521
  .mobmenu-header-wrap-inner h2 {
522
+ color: #183247;
523
  font-size: 1.5em;
524
  }
525
  .mobmenu-title-h2{
526
  font-size: 0px;
527
  }
528
+ .mobile-menu-logo img {
529
+ max-height: 50px;
530
+ }
531
  .mobmenu-header-wrap-inner {
532
  padding-top: 15px;
533
  padding-bottom: 15px;
534
  padding-left: 20px;
535
+ background: #fff;
536
+ border: 10px solid #ebeff3;
537
  display: flex;
538
  }
539
+ .mobmenu-settings-panel-wrap .mm-form-table th label {
540
  font-weight: 300;
 
541
  color: #5e667c;
542
  font-size: 13px;
543
  }
544
+ .mobmenu-settings-panel-wrap .mm-form-table td .description {
545
  color: #8995b2;
546
  font-size: 13px;
547
  padding-top: 10px;
548
+ display: none;
549
  }
550
  .nav-tab-wrapper ul li:hover {
551
  cursor: pointer;
554
  float: right;
555
  margin-right: 20px;
556
  }
557
+ .mobmenu-settings-panel-wrap .mm-font iframe {
558
  width: 100%;
559
  height: 100px;
560
  }
561
+ .mobmenu-settings-panel-wrap .active-tab-fonts .mm-form-table tr {
562
  display: inline-grid;
563
  }
564
+ .mobmenu-settings-panel-wrap .active-tab-colors .mm-form-table th label {
565
  font-weight: normal;
566
  line-height: 3em;
567
  color: #676767;
568
  }
569
+ .mobmenu-settings-panel-wrap .mm-form-table {
570
+ margin-top: 45px!important;
571
  background: #fff;
572
  }
573
+ .row-1.general-options label{
574
+ display: none;
575
+ }
576
+ .mobmenu-settings-panel-wrap .active-tab-documentation {
577
  width: 100%;
578
  }
579
  .mm-panel-search-bar {
580
+ padding: 20px 10px;
581
  color: #FFF;
582
+ right: 270px;
583
+ position: absolute;
584
+ display:none;
585
  }
586
  .mm-panel-search-bar span {
587
  padding-left: 30px;
610
  opacity: 0;
611
  }
612
  .mm-doc-icon {
613
+ color: #183247;
614
  margin-top: 25px;
615
+ right: 170px;
616
  position: absolute;
617
  }
618
  .mm-doc-icon a {
619
  text-decoration: none;
620
+ color: #183247;
621
  }
622
  .mm-doc-icon a:hover {
623
+ color: #ffcd33;
624
+ }
625
+ .options-container h3{
626
+ color:#183247;
627
  }
628
  .mm-panel-search-bar #mm_search_settings {
629
  border-radius: 4px;
630
+ border: 2px solid #ffcd33;
631
  font-size: 15px;
632
  color: #656e76;
633
  }
634
  .mm-panel-search-bar label {
635
  color: #b3dcf0;
636
  }
637
+ .mm-support-icon {
638
+ margin-top: 25px;
639
+ right: 70px;
640
+ position: absolute;
641
+ color: #183247;
642
+ }
643
+ .mm-support-icon a {
644
+ text-decoration: none;
645
+ color: #183247;
646
+ }
647
  .mm-scan-alerts {
648
  margin-top: 25px;
649
+ right: 310px;
650
  position: absolute;
651
+ color: #183247;
652
  }
653
  .mm-scan-alerts a {
654
  text-decoration: none;
655
+ color: #183247;
656
  }
657
  .mm-scan-alerts a:hover {
658
  color: #e0e7ec;
660
  .CodeMirror {
661
  border: 1px solid #ddd;
662
  }
663
+ .options-container .mm-sortable li {
664
  padding: 0 0 0 0px;
665
  background: #fff;
666
  cursor: grab;
667
  border: 1px solid #efefef;
668
  }
669
  /*
670
+ .options-container.active-tab-general-options .mm-sortable li[data-value="logo"]{
671
  width:120px;
672
  }*/
673
+ .options-container .mm-sortable li span {
674
  padding-top: 40px;
675
  display: block;
676
  text-align: center;
684
  position: absolute;
685
  left: 35px;
686
  margin-top: 45px;
687
+ color: #183247;
688
  width: 90px;
689
  font-size: 11px;
690
+ display: none;
691
  }
692
  .mm-version-holder a {
693
+ color: #183247;
694
  }
695
  .mm-bussiness-features .dashicons-yes {
696
  color:#008000;
711
  }
712
  .mm-business-features-holder {
713
  padding: 20px;
714
+ width: 100%;
715
  }
716
  .mm-business-image {
717
+ float: left;
718
+ padding-left: 5%;
719
  }
720
+ .mobmenu-settings-panel-wrap .options-container {
721
  width: 100%;
722
+ padding-left: 10px;
723
+ background: #fff;
724
+ border-right: 10px solid #ebeff3;
725
+ border-left: 10px solid #ebeff3;
726
  }
727
  .mm-business-image p {
728
  text-align: center;
747
  overflow-y: scroll;
748
  margin-bottom: 30px;
749
  }
750
+ .mm-upload .mm-image-preview, .mm-gallery .mm-image-preview {
751
  line-height: 0;
752
  position: relative;
753
  display: inline-block;
758
  cursor: pointer;
759
  opacity: 1;
760
  }
761
+ .mm-upload .mm-image-preview:before, .mm-gallery .mm-image-preview:before {
762
  content: '\f132';
763
  font-family: 'dashicons';
764
  position: absolute;
771
  color: #ddd;
772
  }
773
  .mobmenu-find-element {
774
+ border-radius: 8px;
775
+ padding: 8px 20px 8px 20px;
776
  margin-left: 10px;
777
  color: #fff;
778
+ background: #193247;
779
  text-decoration: none;
780
  cursor: pointer;
781
  }
789
  border-radius: 25px;
790
  }
791
  .mm-alerts-bubble.alert-number-0 {
792
+ color: #02b875;
793
+ box-shadow: 0 0 0 .1rem var(--white,#02b875)
794
  }
795
 
796
 
799
  font-size: 10px;
800
  font-weight: 700;
801
  top: -11px;
802
+ right: -2px;
803
  position: relative;
804
  box-shadow: 0 0 0 .1rem var(--white,#FF5722);
805
  border-radius: 25px;
808
  background: #ffffff;
809
  }
810
  .nav-tab-wrapper ul li.active {
811
+ border-left: 2px solid #ffcd33;
812
+ color: #183247;
813
  }
814
  .active-tab-general-options .general-hide-elements, .active-tab-general-options .general-import-export, .active-tab-general-options .general-misc-options, .active-tab-general-options .general-visibility-options, .active-tab-general-options .general-advanced-options{
815
  display:none;
816
  }
817
+ tr.even.first.mm-heading {
818
  display: none;
819
  }
820
  .select2-container--default .select2-results__option--highlighted[aria-selected] {
821
  background-color: #8995b2!important;
822
  }
823
+ .mobmenu-settings-panel-wrap .mm-form-table td {
824
+ padding: 10px 10px!important;
825
+ width: 100%;
 
 
826
  }
827
  .submit button.button.button-primary {
828
+ background: #4d5167!important;
829
  }
830
+
831
+ .advanced-options td .CodeMirror-wrap pre {
832
  padding-left: 35px;
833
  }
834
  .mm-mobile-header-type {
835
  display: flex;
836
+ margin-left: -25%;
837
+ }
838
+ tr.left-color-options, tr.right-color-options {
839
+ width: 50%;
840
+ float: left;
841
+ }
842
+
843
+ .dashicons.rotate-90-cw{
844
+ -webkit-transform: rotate(90deg);
845
+ -moz-transform: rotate(90deg);
846
+ -o-transform: rotate(90deg);
847
+ -ms-transform: rotate(90deg);
848
+ transform: rotate(90deg);
849
+ margin-left: -4px;
850
+ margin-right: 4px;
851
+ margin-top: 10px!important;
852
+ }
853
+ .dashicons.rotate-90-ccw{
854
+ -webkit-transform: rotate(270deg);
855
+ -moz-transform: rotate(270deg);
856
+ -o-transform: rotate(270deg);
857
+ -ms-transform: rotate(270deg);
858
+ transform: rotate(270deg);
859
+ margin-left: -4px;
860
+ margin-right: 4px;
861
+ margin-top: 2px!important;
862
+ }
863
+
864
+ .mobmenu-settings-panel-wrap .nav-tab-wrapper span.dashicons {
865
+ margin-top: 5px;
866
+ padding-right: 10px;
867
+ }
868
+ .mm-welcome-box {
869
+ background: #ebeff3;
870
+ width: 120%;
871
+ min-height: 150px;
872
+ margin-left: -16vw;
873
+ margin-bottom: 120px;
874
+ }
875
+ .mm-welcome-box span {
876
+ font-size: 15px;
877
+ font-weight: 300;
878
+ }
879
+ .mm-welcome-box img{
880
+ width: 220px;
881
+ }
882
+ .mm-welcome-box h3{
883
+ padding-top: 60px;
884
+ padding-left: 50px;
885
+ font-size: 30px;
886
+ font-weight: 300;
887
  }
888
  .mm-mobile-header-type img {
889
  height: 300px;
894
  }
895
 
896
  .mm-mobile-header-type img.active {
897
+ border: 2px solid #ffcd33;
898
  border-radius: 15px;
899
  }
900
  .mm-mobile-header-type h4 {
901
  text-align: center;
902
+ color: #61687e;
903
  }
904
+ #wpbody-content > div.wrap > div.mobmenu-settings-panel-wrap.mobmenu-standard > div > form > table > tbody > tr.row-1.odd.general-options > th > label {
905
  display: none;
906
  }
includes/css/mobmenu.css CHANGED
@@ -146,6 +146,9 @@ body.admin-bar .mobmenu, body.admin-bar .mobmenu-panel {
146
  left: 15px;
147
  padding-left: 0px;
148
  }
 
 
 
149
  .mob-expand-submenu {
150
  position: relative;
151
  right: 0px;
@@ -216,7 +219,7 @@ body.admin-bar .mobmenu, body.admin-bar .mobmenu-panel {
216
  margin-top: 45px;
217
  padding-bottom: 120px;
218
  z-index: 1;
219
- height: 100%;
220
  overflow: auto;
221
  padding-top: 10px;
222
  }
146
  left: 15px;
147
  padding-left: 0px;
148
  }
149
+ .rtl .mob-expand-submenu {
150
+ float: left;
151
+ }
152
  .mob-expand-submenu {
153
  position: relative;
154
  right: 0px;
219
  margin-top: 45px;
220
  padding-bottom: 120px;
221
  z-index: 1;
222
+ height: calc( 100% - 45px);
223
  overflow: auto;
224
  padding-top: 10px;
225
  }
includes/dynamic-style.php CHANGED
@@ -9,20 +9,20 @@
9
  * CUSTOM CSS OUTPUT
10
  */
11
  global $mm_fs ;
12
- $titan = TitanFramework::getInstance( 'mobmenu' );
13
  $default_elements = '';
14
  $logo_height = '';
15
  $header_logo_float = '';
16
- $def_el_arr = $titan->getOption( 'default_hided_elements' );
17
- $trigger_res = $titan->getOption( 'width_trigger' );
18
- $right_menu_width = $titan->getOption( 'right_menu_width' ) . 'px';
19
  $right_menu_width_translate = '100%';
20
  $left_menu_width_translate = '100%';
21
  $left_menu_height_translate = '100%';
22
  $woo_menu_width_translate = '100%';
23
  $woo_menu_width = 0;
24
  $woo_menu_font = '';
25
- $search_results_font = $titan->getOption( 'search_results_font' );
26
  if ( in_array( '1', $def_el_arr, true ) ) {
27
  $default_elements .= '.nav, ';
28
  }
@@ -53,103 +53,104 @@ if ( in_array( '9', $def_el_arr, true ) ) {
53
  $default_elements .= '.hide';
54
  // Check if the Naked Header is enabled.
55
 
56
- if ( $titan->getOption( 'enabled_naked_header' ) ) {
57
  $header_bg_color = 'transparent';
58
  $wrap_padding_top = '0';
 
59
  // If we are only using one of the menus without any logo.
60
- if ( $titan->getOption( 'disabled_logo_text' ) && (!$titan->getOption( 'enable_left_menu' ) || !$titan->getOption( 'enable_right_menu' )) ) {
61
  $header_width = '10%';
62
  }
63
  } else {
64
- $header_bg_color = $titan->getOption( 'header_bg_color' );
65
- $wrap_padding_top = $titan->getOption( 'header_height' );
66
  }
67
 
68
  // Determine the Width of the Left menu panel.
69
 
70
- if ( $titan->getOption( 'left_menu_width_units' ) ) {
71
- $left_menu_width = $titan->getOption( 'left_menu_width' ) . 'px';
72
- $left_menu_width_translate = $titan->getOption( 'left_menu_width' ) - 1 . 'px';
73
  } else {
74
- $left_menu_width = $titan->getOption( 'left_menu_width_percentage' ) . '%';
75
  }
76
 
77
  // Determine the Width of the Right menu panel.
78
 
79
- if ( $titan->getOption( 'right_menu_width_units' ) ) {
80
- $right_menu_width = $titan->getOption( 'right_menu_width' ) . 'px';
81
  } else {
82
- $right_menu_width = $titan->getOption( 'right_menu_width_percentage' ) . '%';
83
  }
84
 
85
 
86
- if ( $titan->getOption( 'logo_height' ) > 0 ) {
87
- $logo_height = $titan->getOption( 'logo_height' );
88
  } else {
89
- $logo_height = $titan->getOption( 'header_height' );
90
  }
91
 
92
  $logo_height = 'height:' . $logo_height . 'px!important;';
93
- $header_height = $titan->getOption( 'header_height' );
94
  $total_header_height = $header_height;
95
  $banner_height = 0;
96
- $header_margin_top = $titan->getOption( 'logo_top_margin' );
97
  $header_banner_padding_top = 0;
98
  $header_width = '100%';
99
  // Left Menu Background Image.
100
- $left_menu_bg_image = $titan->getOption( 'left_menu_bg_image' );
101
  $left_menu_bg_image_size = 'initial';
102
  $cart_menu_icon_font_size = 0;
103
  $cart_icon_top_margin = 0;
104
  $woo_menu_panel_bg_color = 'initial';
105
  $search_icon_font_size = 0;
106
- if ( $titan->getOption( 'search_icon_font_size' ) ) {
107
- $search_icon_font_size = $titan->getOption( 'search_icon_font_size' );
108
  }
109
- if ( $titan->getOption( 'woo_menu_panel_bg_color' ) ) {
110
- $woo_menu_panel_bg_color = $titan->getOption( 'woo_menu_panel_bg_color' );
111
  }
112
- if ( $titan->getOption( 'left_menu_bg_image_size' ) ) {
113
- $left_menu_bg_image_size = $titan->getOption( 'left_menu_bg_image_size' );
114
  }
115
- if ( $titan->getOption( 'mm_woo_menu_icon_font_size' ) ) {
116
- $cart_menu_icon_font_size = $titan->getOption( 'mm_woo_menu_icon_font_size' );
117
  }
118
- if ( $titan->getOption( 'cart_icon_top_margin' ) ) {
119
- $cart_icon_top_margin = $titan->getOption( 'cart_icon_top_margin' );
120
  }
121
  $header_margin_top = $header_margin_top . 'px';
122
  $header_margin_left = '0';
123
  $header_margin_right = '0';
124
  $header_text_position = 'absolute';
125
- $border_menu_size = $titan->getOption( 'menu_items_border_size' );
126
- $submenu_open_icon_font = $titan->getOption( 'submenu_open_icon_font' );
127
  // Sticky Header.
128
 
129
- if ( $titan->getOption( 'enabled_sticky_header' ) ) {
130
  $header_position = 'fixed';
131
  } else {
132
  $header_position = 'absolute';
133
  }
134
 
135
 
136
- if ( 'center' === $titan->getOption( 'header_text_align' ) ) {
137
  $logo_header_position = 'absolute';
138
  } else {
139
  $logo_header_position = 'relative';
140
  }
141
 
142
  // Header Text alignment.
143
- if ( 'center' === $titan->getOption( 'header_text_align' ) ) {
144
  $header_text_position = 'initial';
145
  }
146
- if ( 'left' === $titan->getOption( 'header_text_align' ) ) {
147
- $header_margin_left = $titan->getOption( 'header_text_left_margin' ) . 'px;';
148
  }
149
- if ( 'right' === $titan->getOption( 'header_text_align' ) ) {
150
- $header_margin_right = $titan->getOption( 'header_text_right_margin' ) . 'px;';
151
  }
152
- if ( $titan->getOption( 'logo_img_retina' ) ) {
153
  ?>
154
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
155
 
@@ -219,12 +220,12 @@ echo $header_height ;
219
  @media screen and ( min-width: 782px ) {
220
  #mobmenu-footer li:hover {
221
  background-color: <?php
222
- echo $titan->getOption( 'footer_bg_color_hover' ) ;
223
  ?>;
224
  }
225
  #mobmenu-footer li:hover i {
226
  color: <?php
227
- echo $titan->getOption( 'footer_icon_color_hover' ) ;
228
  ?>;
229
  }
230
  }
@@ -239,7 +240,7 @@ echo $trigger_res + 1 ;
239
  <?php
240
 
241
  if ( 0 < $border_menu_size ) {
242
- $border_menu_color = $titan->getOption( 'menu_items_border_color' );
243
  $border_style = $border_menu_size . 'px solid ' . $border_menu_color;
244
  ?>
245
 
@@ -253,8 +254,8 @@ if ( 0 < $border_menu_size ) {
253
  }
254
 
255
 
256
- if ( $titan->getOption( 'left_menu_tabbed_menus', false ) ) {
257
- $border_menu_color = $titan->getOption( 'menu_items_border_color' );
258
  $border_style = '2px solid ' . $border_menu_color;
259
  ?>
260
 
@@ -268,8 +269,8 @@ if ( $titan->getOption( 'left_menu_tabbed_menus', false ) ) {
268
  }
269
 
270
 
271
- if ( $titan->getOption( 'right_menu_tabbed_menus', false ) ) {
272
- $border_menu_color = $titan->getOption( 'menu_items_border_color' );
273
  $border_style = '2px solid ' . $border_menu_color;
274
  ?>
275
 
@@ -283,14 +284,14 @@ if ( $titan->getOption( 'right_menu_tabbed_menus', false ) ) {
283
  }
284
 
285
 
286
- if ( '' !== $titan->getOption( 'hide_elements' ) ) {
287
  ?>
288
  /* Our css Custom Options values */
289
  @media only screen and (max-width:<?php
290
  echo $trigger_res ;
291
  ?>px){
292
  <?php
293
- echo $titan->getOption( 'hide_elements' ) ;
294
  ?> {
295
  display:none !important;
296
  }
@@ -310,80 +311,80 @@ echo $trigger_res ;
310
 
311
  .mobmenur-container i {
312
  color: <?php
313
- echo $titan->getOption( 'right_menu_icon_color' ) ;
314
  ?>;
315
  }
316
  .mobmenul-container i {
317
  color: <?php
318
- echo $titan->getOption( 'left_menu_icon_color' ) ;
319
  ?>;
320
  }
321
  .mobmenul-container img {
322
  max-height: <?php
323
- echo $titan->getOption( 'header_height' ) ;
324
  ?>px;
325
  float: left;
326
  }
327
  .mobmenur-container img {
328
  max-height: <?php
329
- echo $titan->getOption( 'header_height' ) ;
330
  ?>px;
331
  float: right;
332
  }
333
  .mob-expand-submenu i {
334
  font-size: <?php
335
- echo $titan->getOption( 'submenu_icon_font_size' ) ;
336
  ?>px;
337
  }
338
  #mobmenuleft li a , #mobmenuleft li a:visited, .mobmenu-content h2, .mobmenu-content h3, .show-nav-left .mob-menu-copyright, .show-nav-left .mob-expand-submenu i {
339
  color: <?php
340
- echo $titan->getOption( 'left_panel_text_color' ) ;
341
  ?>;
342
 
343
  }
344
  .mob-cancel-button {
345
  font-size: <?php
346
- echo $titan->getOption( 'close_icon_font_size' ) ;
347
  ?>px!important;
348
  }
349
 
350
  /* 3rd Level Left Menu Items Background color on Hover*/
351
  .mobmenu-content #mobmenuleft .sub-menu .sub-menu li a:hover {
352
  color: <?php
353
- echo $titan->getOption( 'left_panel_3rd_menu_text_color_hover' ) ;
354
  ?>;
355
  }
356
  /* 3rd Level Left Menu Items Background color on Hover*/
357
  .mobmenu-content #mobmenuleft .sub-menu .sub-menu li:hover {
358
  background-color: <?php
359
- echo $titan->getOption( 'left_panel_3rd_menu_bg_color_hover' ) ;
360
  ?>;
361
  }
362
  .mobmenu-content #mobmenuleft li:hover, .mobmenu-content #mobmenuright li:hover {
363
  background-color: <?php
364
- echo $titan->getOption( 'left_panel_hover_bgcolor' ) ;
365
  ?>;
366
  }
367
  .mobmenu-content #mobmenuright li:hover {
368
  background-color: <?php
369
- echo $titan->getOption( 'right_panel_hover_bgcolor' ) ;
370
  ?> ;
371
  }
372
  /* 3rd Level Right Menu Items Background color on Hover*/
373
  .mobmenu-content #mobmenuright .sub-menu .sub-menu li:hover {
374
  background-color: <?php
375
- echo $titan->getOption( 'right_panel_3rd_menu_bg_color_hover' ) ;
376
  ?>;
377
  }
378
  /* 3rd Level Right Menu Items Background color on Hover*/
379
  .mobmenu-content #mobmenuright .sub-menu .sub-menu li a:hover {
380
  color: <?php
381
- echo $titan->getOption( 'right_panel_3rd_menu_text_color_hover' ) ;
382
  ?>;
383
  }
384
 
385
  <?php
386
- if ( $titan->getOption( 'header_shadow' ) && !$titan->getOption( 'enabled_naked_header' ) ) {
387
  ?>
388
  .mob-menu-header-holder {
389
  box-shadow:0px 0px 8px 0px rgba(0,0,0,0.15);
@@ -393,11 +394,11 @@ if ( $titan->getOption( 'header_shadow' ) && !$titan->getOption( 'enabled_naked_
393
  ?>
394
  .mobmenu-content #mobmenuleft .sub-menu {
395
  background-color: <?php
396
- echo $titan->getOption( 'left_panel_submenu_bgcolor' ) ;
397
  ?> ;
398
  margin: 0;
399
  color: <?php
400
- echo $titan->getOption( 'left_panel_submenu_text_color' ) ;
401
  ?> ;
402
  width: 100%;
403
  position: initial;
@@ -416,7 +417,7 @@ if ( $left_menu_bg_image ) {
416
 
417
  ?>
418
  opacity: <?php
419
- echo $titan->getOption( 'left_menu_bg_opacity' ) / 100 ;
420
  ?>;
421
  background-attachment: fixed ;
422
  background-position: center top ;
@@ -433,40 +434,40 @@ echo $left_menu_bg_image_size ;
433
  .mob-menu-right-bg-holder {
434
  <?php
435
 
436
- if ( $titan->getOption( 'right_menu_bg_image' ) ) {
437
  ?>
438
  background: url(<?php
439
- echo wp_get_attachment_url( $titan->getOption( 'right_menu_bg_image' ) ) ;
440
  ?>);
441
  <?php
442
  }
443
 
444
  ?>
445
  opacity: <?php
446
- echo $titan->getOption( 'right_menu_bg_opacity' ) / 100 ;
447
  ?>;
448
  background-attachment: fixed ;
449
  background-position: center top ;
450
  -webkit-background-size: <?php
451
- echo $titan->getOption( 'right_menu_bg_image_size' ) ;
452
  ?>;
453
  -moz-background-size: <?php
454
- echo $titan->getOption( 'right_menu_bg_image_size' ) ;
455
  ?>;
456
  background-size: <?php
457
- echo $titan->getOption( 'right_menu_bg_image_size' ) ;
458
  ?>;
459
  }
460
  <?php
461
  ?>
462
  .mobmenu-content #mobmenuleft .sub-menu a {
463
  color: <?php
464
- echo $titan->getOption( 'left_panel_submenu_text_color' ) ;
465
  ?> ;
466
  }
467
  .mobmenu-content #mobmenuright .sub-menu a {
468
  color: <?php
469
- echo $titan->getOption( 'right_panel_submenu_text_color' ) ;
470
  ?> ;
471
  }
472
  .mobmenu-content #mobmenuright .sub-menu .sub-menu {
@@ -474,36 +475,36 @@ echo $titan->getOption( 'right_panel_submenu_text_color' ) ;
474
  }
475
  .mobmenu-content #mobmenuright .sub-menu {
476
  background-color: <?php
477
- echo $titan->getOption( 'right_panel_submenu_bgcolor' ) ;
478
  ?> ;
479
  margin: 0;
480
  color: <?php
481
- echo $titan->getOption( 'right_panel_submenu_text_color' ) ;
482
  ?> ;
483
  position: initial;
484
  width: 100%;
485
  }
486
  #mobmenuleft li:hover a, #mobmenuleft li:hover i {
487
  color: <?php
488
- echo $titan->getOption( 'left_panel_hover_text_color' ) ;
489
  ?>;
490
  }
491
  #mobmenuright li a , #mobmenuright li a:visited, .show-nav-right .mob-menu-copyright, .show-nav-right .mob-expand-submenu i {
492
  color: <?php
493
- echo $titan->getOption( 'right_panel_text_color' ) ;
494
  ?> ;
495
  }
496
  #mobmenuright li a:hover {
497
  color: <?php
498
- echo $titan->getOption( 'right_panel_hover_text_color' ) ;
499
  ?> ;
500
  }
501
  .mobmenul-container {
502
  top: <?php
503
- echo $titan->getOption( 'left_icon_top_margin' ) ;
504
  ?>px;
505
  margin-left: <?php
506
- echo $titan->getOption( 'left_icon_left_margin' ) ;
507
  ?>px;
508
  margin-top: <?php
509
  echo $header_margin_top ;
@@ -515,17 +516,17 @@ echo $header_height ;
515
  }
516
  .mobmenur-container {
517
  top: <?php
518
- echo $titan->getOption( 'right_icon_top_margin' ) ;
519
  ?>px;
520
  margin-right: <?php
521
- echo $titan->getOption( 'right_icon_right_margin' ) ;
522
  ?>px;
523
  margin-top: <?php
524
  echo $header_margin_top ;
525
  ?>;
526
  }
527
  <?php
528
- switch ( $titan->getOption( 'header_text_align' ) ) {
529
  case 'left':
530
  $header_logo_float = 'float:left;';
531
  break;
@@ -542,7 +543,7 @@ switch ( $titan->getOption( 'header_text_align' ) ) {
542
  echo $header_margin_top ;
543
  ?>;
544
  text-align: <?php
545
- echo $titan->getOption( 'header_text_align' ) ;
546
  ?>;
547
  margin-left: <?php
548
  echo $header_margin_left ;
@@ -578,26 +579,26 @@ echo $wrap_padding_top ;
578
  }
579
  <?php
580
 
581
- if ( '' !== $titan->getOption( 'left_menu_bg_gradient' ) ) {
582
- $left_panel_bg_color = $titan->getOption( 'left_menu_bg_gradient' ) . ';';
583
  } else {
584
- $left_panel_bg_color = 'background-color:' . $titan->getOption( 'left_panel_bg_color' ) . ';';
585
  }
586
 
587
 
588
- if ( '' !== $titan->getOption( 'right_menu_bg_gradient' ) ) {
589
- $right_panel_bg_color = $titan->getOption( 'right_menu_bg_gradient' ) . ';';
590
  } else {
591
- $right_panel_bg_color = 'background-color:' . $titan->getOption( 'right_panel_bg_color' ) . ';';
592
  }
593
 
594
  $mm_woo_menu_panel_bg_color = '#CCC';
595
- if ( $titan->getOption( 'mm_woo_menu_panel_bg_color' ) ) {
596
- $mm_woo_menu_panel_bg_color = $titan->getOption( 'mm_woo_menu_panel_bg_color' );
597
  }
598
 
599
- if ( $titan->getOption( 'mm_woo_menu_bg_gradient' ) ) {
600
- $cart_panel_bg_color = $titan->getOption( 'mm_woo_menu_bg_gradient' ) . ';';
601
  } else {
602
  $cart_panel_bg_color = 'background-color:' . $mm_woo_menu_panel_bg_color . ';';
603
  }
@@ -626,7 +627,7 @@ echo $right_menu_width ;
626
  }
627
  .show-nav-left .mobmenu-overlay, .show-nav-right .mobmenu-overlay, .show-mob-menu-search .mobmenu-overlay {
628
  background: <?php
629
- echo $titan->getOption( 'overlay_bg_color' ) ;
630
  ?>;
631
  }
632
  .mob-menu-slideout-top .mobmenu-overlay {
@@ -721,7 +722,7 @@ echo $left_menu_height_translate ;
721
  /*End of Mobmenu Slide Over */
722
  .mobmenu .headertext {
723
  color: <?php
724
- echo $titan->getOption( 'header_text_color' ) ;
725
  ?> ;
726
  text-decoration: none;
727
  }
@@ -749,64 +750,64 @@ echo $total_header_height ;
749
 
750
  .mobmenu-left-panel li a, .leftmbottom, .leftmtop{
751
  padding-left: <?php
752
- echo $titan->getOption( 'left_menu_content_padding' ) ;
753
  ?>%;
754
  padding-right: <?php
755
- echo $titan->getOption( 'left_menu_content_padding' ) ;
756
  ?>%;
757
  }
758
  .mobmenu-content li > .sub-menu li {
759
  padding-left: calc(<?php
760
- echo $titan->getOption( 'left_menu_content_padding' ) ;
761
  ?>*1%);
762
  }
763
 
764
  .mobmenu-right-panel li, .rightmbottom, .rightmtop{
765
  padding-left: <?php
766
- echo $titan->getOption( 'right_menu_content_padding' ) ;
767
  ?>%;
768
  padding-right: <?php
769
- echo $titan->getOption( 'right_menu_content_padding' ) ;
770
  ?>%;
771
  }
772
  .mobmenul-container i {
773
  line-height: <?php
774
- echo $titan->getOption( 'left_icon_font_size' ) ;
775
  ?>px;
776
  font-size: <?php
777
- echo $titan->getOption( 'left_icon_font_size' ) ;
778
  ?>px;
779
  float: left;
780
  }
781
  .left-menu-icon-text {
782
  float: left;
783
  line-height: <?php
784
- echo $titan->getOption( 'left_icon_font_size' ) ;
785
  ?>px;
786
  color: <?php
787
- echo $titan->getOption( 'header_text_after_icon' ) ;
788
  ?>;
789
  }
790
  .mobmenu-left-panel .mobmenu-display-name {
791
  color: <?php
792
- echo $titan->getOption( 'left_panel_text_color' ) ;
793
  ?>;
794
  }
795
  .right-menu-icon-text {
796
  float: right;
797
  line-height: <?php
798
- echo $titan->getOption( 'right_icon_font_size' ) ;
799
  ?>px;
800
  color: <?php
801
- echo $titan->getOption( 'header_text_before_icon' ) ;
802
  ?>;
803
  }
804
  .mobmenur-container i {
805
  line-height: <?php
806
- echo $titan->getOption( 'right_icon_font_size' ) ;
807
  ?>px;
808
  font-size: <?php
809
- echo $titan->getOption( 'right_icon_font_size' ) ;
810
  ?>px;
811
  float: right;
812
  }
@@ -829,36 +830,36 @@ echo $logo_height ;
829
  }
830
  .mobmenu-content #mobmenuleft > li > a:hover {
831
  background-color: <?php
832
- echo $titan->getOption( 'left_panel_hover_bgcolor' ) ;
833
  ?>;
834
  }
835
 
836
  .mobmenu-content #mobmenuright > li > a:hover {
837
  background-color: <?php
838
- echo $titan->getOption( 'right_panel_hover_bgcolor' ) ;
839
  ?>;
840
  }
841
  .mobmenu-left-panel .mob-cancel-button {
842
  color: <?php
843
- echo $titan->getOption( 'left_panel_cancel_button_color' ) ;
844
  ?>;
845
  }
846
  .mobmenu-right-panel .mob-cancel-button {
847
  color: <?php
848
- echo $titan->getOption( 'right_panel_cancel_button_color' ) ;
849
  ?>;
850
  }
851
 
852
  }
853
 
854
  <?php
855
- $text_after_left_icon_font = $titan->getOption( 'text_after_left_icon_font' );
856
- $footer_text_font = $titan->getOption( 'footer_text_font' );
857
- $header_banner_font = $titan->getOption( 'header_banner_font' );
858
- $header_menu_font = $titan->getOption( 'header_menu_font' );
859
- $left_menu_font = $titan->getOption( 'left_menu_font' );
860
- $text_before_right_icon_font = $titan->getOption( 'text_before_right_icon_font' );
861
- $right_menu_font = $titan->getOption( 'right_menu_font' );
862
  ?>
863
 
864
  .mob-menu-logo-holder > .headertext span,.mobmenu input.mob-menu-search-field {
9
  * CUSTOM CSS OUTPUT
10
  */
11
  global $mm_fs ;
12
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
13
  $default_elements = '';
14
  $logo_height = '';
15
  $header_logo_float = '';
16
+ $def_el_arr = $plugin_settings->getOption( 'default_hided_elements' );
17
+ $trigger_res = $plugin_settings->getOption( 'width_trigger' );
18
+ $right_menu_width = $plugin_settings->getOption( 'right_menu_width' ) . 'px';
19
  $right_menu_width_translate = '100%';
20
  $left_menu_width_translate = '100%';
21
  $left_menu_height_translate = '100%';
22
  $woo_menu_width_translate = '100%';
23
  $woo_menu_width = 0;
24
  $woo_menu_font = '';
25
+ $search_results_font = $plugin_settings->getOption( 'search_results_font' );
26
  if ( in_array( '1', $def_el_arr, true ) ) {
27
  $default_elements .= '.nav, ';
28
  }
53
  $default_elements .= '.hide';
54
  // Check if the Naked Header is enabled.
55
 
56
+ if ( $plugin_settings->getOption( 'enabled_naked_header' ) ) {
57
  $header_bg_color = 'transparent';
58
  $wrap_padding_top = '0';
59
+ $header_width = '10%';
60
  // If we are only using one of the menus without any logo.
61
+ if ( $plugin_settings->getOption( 'disabled_logo_text' ) && (!$plugin_settings->getOption( 'enable_left_menu' ) || !$plugin_settings->getOption( 'enable_right_menu' )) ) {
62
  $header_width = '10%';
63
  }
64
  } else {
65
+ $header_bg_color = $plugin_settings->getOption( 'header_bg_color' );
66
+ $wrap_padding_top = $plugin_settings->getOption( 'header_height' );
67
  }
68
 
69
  // Determine the Width of the Left menu panel.
70
 
71
+ if ( $plugin_settings->getOption( 'left_menu_width_units' ) ) {
72
+ $left_menu_width = $plugin_settings->getOption( 'left_menu_width' ) . 'px';
73
+ $left_menu_width_translate = $plugin_settings->getOption( 'left_menu_width' ) - 1 . 'px';
74
  } else {
75
+ $left_menu_width = $plugin_settings->getOption( 'left_menu_width_percentage' ) . '%';
76
  }
77
 
78
  // Determine the Width of the Right menu panel.
79
 
80
+ if ( $plugin_settings->getOption( 'right_menu_width_units' ) ) {
81
+ $right_menu_width = $plugin_settings->getOption( 'right_menu_width' ) . 'px';
82
  } else {
83
+ $right_menu_width = $plugin_settings->getOption( 'right_menu_width_percentage' ) . '%';
84
  }
85
 
86
 
87
+ if ( $plugin_settings->getOption( 'logo_height' ) > 0 ) {
88
+ $logo_height = $plugin_settings->getOption( 'logo_height' );
89
  } else {
90
+ $logo_height = $plugin_settings->getOption( 'header_height' );
91
  }
92
 
93
  $logo_height = 'height:' . $logo_height . 'px!important;';
94
+ $header_height = $plugin_settings->getOption( 'header_height' );
95
  $total_header_height = $header_height;
96
  $banner_height = 0;
97
+ $header_margin_top = $plugin_settings->getOption( 'logo_top_margin' );
98
  $header_banner_padding_top = 0;
99
  $header_width = '100%';
100
  // Left Menu Background Image.
101
+ $left_menu_bg_image = $plugin_settings->getOption( 'left_menu_bg_image' );
102
  $left_menu_bg_image_size = 'initial';
103
  $cart_menu_icon_font_size = 0;
104
  $cart_icon_top_margin = 0;
105
  $woo_menu_panel_bg_color = 'initial';
106
  $search_icon_font_size = 0;
107
+ if ( $plugin_settings->getOption( 'search_icon_font_size' ) ) {
108
+ $search_icon_font_size = $plugin_settings->getOption( 'search_icon_font_size' );
109
  }
110
+ if ( $plugin_settings->getOption( 'woo_menu_panel_bg_color' ) ) {
111
+ $woo_menu_panel_bg_color = $plugin_settings->getOption( 'woo_menu_panel_bg_color' );
112
  }
113
+ if ( $plugin_settings->getOption( 'left_menu_bg_image_size' ) ) {
114
+ $left_menu_bg_image_size = $plugin_settings->getOption( 'left_menu_bg_image_size' );
115
  }
116
+ if ( $plugin_settings->getOption( 'mm_woo_menu_icon_font_size' ) ) {
117
+ $cart_menu_icon_font_size = $plugin_settings->getOption( 'mm_woo_menu_icon_font_size' );
118
  }
119
+ if ( $plugin_settings->getOption( 'cart_icon_top_margin' ) ) {
120
+ $cart_icon_top_margin = $plugin_settings->getOption( 'cart_icon_top_margin' );
121
  }
122
  $header_margin_top = $header_margin_top . 'px';
123
  $header_margin_left = '0';
124
  $header_margin_right = '0';
125
  $header_text_position = 'absolute';
126
+ $border_menu_size = $plugin_settings->getOption( 'menu_items_border_size' );
127
+ $submenu_open_icon_font = $plugin_settings->getOption( 'submenu_open_icon_font' );
128
  // Sticky Header.
129
 
130
+ if ( $plugin_settings->getOption( 'enabled_sticky_header' ) ) {
131
  $header_position = 'fixed';
132
  } else {
133
  $header_position = 'absolute';
134
  }
135
 
136
 
137
+ if ( 'center' === $plugin_settings->getOption( 'header_text_align' ) ) {
138
  $logo_header_position = 'absolute';
139
  } else {
140
  $logo_header_position = 'relative';
141
  }
142
 
143
  // Header Text alignment.
144
+ if ( 'center' === $plugin_settings->getOption( 'header_text_align' ) ) {
145
  $header_text_position = 'initial';
146
  }
147
+ if ( 'left' === $plugin_settings->getOption( 'header_text_align' ) ) {
148
+ $header_margin_left = $plugin_settings->getOption( 'header_text_left_margin' ) . 'px;';
149
  }
150
+ if ( 'right' === $plugin_settings->getOption( 'header_text_align' ) ) {
151
+ $header_margin_right = $plugin_settings->getOption( 'header_text_right_margin' ) . 'px;';
152
  }
153
+ if ( $plugin_settings->getOption( 'logo_img_retina' ) ) {
154
  ?>
155
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
156
 
220
  @media screen and ( min-width: 782px ) {
221
  #mobmenu-footer li:hover {
222
  background-color: <?php
223
+ echo $plugin_settings->getOption( 'footer_bg_color_hover' ) ;
224
  ?>;
225
  }
226
  #mobmenu-footer li:hover i {
227
  color: <?php
228
+ echo $plugin_settings->getOption( 'footer_icon_color_hover' ) ;
229
  ?>;
230
  }
231
  }
240
  <?php
241
 
242
  if ( 0 < $border_menu_size ) {
243
+ $border_menu_color = $plugin_settings->getOption( 'menu_items_border_color' );
244
  $border_style = $border_menu_size . 'px solid ' . $border_menu_color;
245
  ?>
246
 
254
  }
255
 
256
 
257
+ if ( $plugin_settings->getOption( 'left_menu_tabbed_menus', false ) ) {
258
+ $border_menu_color = $plugin_settings->getOption( 'menu_items_border_color' );
259
  $border_style = '2px solid ' . $border_menu_color;
260
  ?>
261
 
269
  }
270
 
271
 
272
+ if ( $plugin_settings->getOption( 'right_menu_tabbed_menus', false ) ) {
273
+ $border_menu_color = $plugin_settings->getOption( 'menu_items_border_color' );
274
  $border_style = '2px solid ' . $border_menu_color;
275
  ?>
276
 
284
  }
285
 
286
 
287
+ if ( '' !== $plugin_settings->getOption( 'hide_elements' ) ) {
288
  ?>
289
  /* Our css Custom Options values */
290
  @media only screen and (max-width:<?php
291
  echo $trigger_res ;
292
  ?>px){
293
  <?php
294
+ echo $plugin_settings->getOption( 'hide_elements' ) ;
295
  ?> {
296
  display:none !important;
297
  }
311
 
312
  .mobmenur-container i {
313
  color: <?php
314
+ echo $plugin_settings->getOption( 'right_menu_icon_color' ) ;
315
  ?>;
316
  }
317
  .mobmenul-container i {
318
  color: <?php
319
+ echo $plugin_settings->getOption( 'left_menu_icon_color' ) ;
320
  ?>;
321
  }
322
  .mobmenul-container img {
323
  max-height: <?php
324
+ echo $plugin_settings->getOption( 'header_height' ) - $plugin_settings->getOption( 'logo_top_margin' ) * 2 - $plugin_settings->getOption( 'left_icon_top_margin' ) ;
325
  ?>px;
326
  float: left;
327
  }
328
  .mobmenur-container img {
329
  max-height: <?php
330
+ echo $plugin_settings->getOption( 'header_height' ) - $plugin_settings->getOption( 'logo_top_margin' ) * 2 - $plugin_settings->getOption( 'right_icon_top_margin' ) ;
331
  ?>px;
332
  float: right;
333
  }
334
  .mob-expand-submenu i {
335
  font-size: <?php
336
+ echo $plugin_settings->getOption( 'submenu_icon_font_size' ) ;
337
  ?>px;
338
  }
339
  #mobmenuleft li a , #mobmenuleft li a:visited, .mobmenu-content h2, .mobmenu-content h3, .show-nav-left .mob-menu-copyright, .show-nav-left .mob-expand-submenu i {
340
  color: <?php
341
+ echo $plugin_settings->getOption( 'left_panel_text_color' ) ;
342
  ?>;
343
 
344
  }
345
  .mob-cancel-button {
346
  font-size: <?php
347
+ echo $plugin_settings->getOption( 'close_icon_font_size' ) ;
348
  ?>px!important;
349
  }
350
 
351
  /* 3rd Level Left Menu Items Background color on Hover*/
352
  .mobmenu-content #mobmenuleft .sub-menu .sub-menu li a:hover {
353
  color: <?php
354
+ echo $plugin_settings->getOption( 'left_panel_3rd_menu_text_color_hover' ) ;
355
  ?>;
356
  }
357
  /* 3rd Level Left Menu Items Background color on Hover*/
358
  .mobmenu-content #mobmenuleft .sub-menu .sub-menu li:hover {
359
  background-color: <?php
360
+ echo $plugin_settings->getOption( 'left_panel_3rd_menu_bg_color_hover' ) ;
361
  ?>;
362
  }
363
  .mobmenu-content #mobmenuleft li:hover, .mobmenu-content #mobmenuright li:hover {
364
  background-color: <?php
365
+ echo $plugin_settings->getOption( 'left_panel_hover_bgcolor' ) ;
366
  ?>;
367
  }
368
  .mobmenu-content #mobmenuright li:hover {
369
  background-color: <?php
370
+ echo $plugin_settings->getOption( 'right_panel_hover_bgcolor' ) ;
371
  ?> ;
372
  }
373
  /* 3rd Level Right Menu Items Background color on Hover*/
374
  .mobmenu-content #mobmenuright .sub-menu .sub-menu li:hover {
375
  background-color: <?php
376
+ echo $plugin_settings->getOption( 'right_panel_3rd_menu_bg_color_hover' ) ;
377
  ?>;
378
  }
379
  /* 3rd Level Right Menu Items Background color on Hover*/
380
  .mobmenu-content #mobmenuright .sub-menu .sub-menu li a:hover {
381
  color: <?php
382
+ echo $plugin_settings->getOption( 'right_panel_3rd_menu_text_color_hover' ) ;
383
  ?>;
384
  }
385
 
386
  <?php
387
+ if ( $plugin_settings->getOption( 'header_shadow' ) && !$plugin_settings->getOption( 'enabled_naked_header' ) ) {
388
  ?>
389
  .mob-menu-header-holder {
390
  box-shadow:0px 0px 8px 0px rgba(0,0,0,0.15);
394
  ?>
395
  .mobmenu-content #mobmenuleft .sub-menu {
396
  background-color: <?php
397
+ echo $plugin_settings->getOption( 'left_panel_submenu_bgcolor' ) ;
398
  ?> ;
399
  margin: 0;
400
  color: <?php
401
+ echo $plugin_settings->getOption( 'left_panel_submenu_text_color' ) ;
402
  ?> ;
403
  width: 100%;
404
  position: initial;
417
 
418
  ?>
419
  opacity: <?php
420
+ echo $plugin_settings->getOption( 'left_menu_bg_opacity' ) / 100 ;
421
  ?>;
422
  background-attachment: fixed ;
423
  background-position: center top ;
434
  .mob-menu-right-bg-holder {
435
  <?php
436
 
437
+ if ( $plugin_settings->getOption( 'right_menu_bg_image' ) ) {
438
  ?>
439
  background: url(<?php
440
+ echo wp_get_attachment_url( $plugin_settings->getOption( 'right_menu_bg_image' ) ) ;
441
  ?>);
442
  <?php
443
  }
444
 
445
  ?>
446
  opacity: <?php
447
+ echo $plugin_settings->getOption( 'right_menu_bg_opacity' ) / 100 ;
448
  ?>;
449
  background-attachment: fixed ;
450
  background-position: center top ;
451
  -webkit-background-size: <?php
452
+ echo $plugin_settings->getOption( 'right_menu_bg_image_size' ) ;
453
  ?>;
454
  -moz-background-size: <?php
455
+ echo $plugin_settings->getOption( 'right_menu_bg_image_size' ) ;
456
  ?>;
457
  background-size: <?php
458
+ echo $plugin_settings->getOption( 'right_menu_bg_image_size' ) ;
459
  ?>;
460
  }
461
  <?php
462
  ?>
463
  .mobmenu-content #mobmenuleft .sub-menu a {
464
  color: <?php
465
+ echo $plugin_settings->getOption( 'left_panel_submenu_text_color' ) ;
466
  ?> ;
467
  }
468
  .mobmenu-content #mobmenuright .sub-menu a {
469
  color: <?php
470
+ echo $plugin_settings->getOption( 'right_panel_submenu_text_color' ) ;
471
  ?> ;
472
  }
473
  .mobmenu-content #mobmenuright .sub-menu .sub-menu {
475
  }
476
  .mobmenu-content #mobmenuright .sub-menu {
477
  background-color: <?php
478
+ echo $plugin_settings->getOption( 'right_panel_submenu_bgcolor' ) ;
479
  ?> ;
480
  margin: 0;
481
  color: <?php
482
+ echo $plugin_settings->getOption( 'right_panel_submenu_text_color' ) ;
483
  ?> ;
484
  position: initial;
485
  width: 100%;
486
  }
487
  #mobmenuleft li:hover a, #mobmenuleft li:hover i {
488
  color: <?php
489
+ echo $plugin_settings->getOption( 'left_panel_hover_text_color' ) ;
490
  ?>;
491
  }
492
  #mobmenuright li a , #mobmenuright li a:visited, .show-nav-right .mob-menu-copyright, .show-nav-right .mob-expand-submenu i {
493
  color: <?php
494
+ echo $plugin_settings->getOption( 'right_panel_text_color' ) ;
495
  ?> ;
496
  }
497
  #mobmenuright li a:hover {
498
  color: <?php
499
+ echo $plugin_settings->getOption( 'right_panel_hover_text_color' ) ;
500
  ?> ;
501
  }
502
  .mobmenul-container {
503
  top: <?php
504
+ echo $plugin_settings->getOption( 'left_icon_top_margin' ) ;
505
  ?>px;
506
  margin-left: <?php
507
+ echo $plugin_settings->getOption( 'left_icon_left_margin' ) ;
508
  ?>px;
509
  margin-top: <?php
510
  echo $header_margin_top ;
516
  }
517
  .mobmenur-container {
518
  top: <?php
519
+ echo $plugin_settings->getOption( 'right_icon_top_margin' ) ;
520
  ?>px;
521
  margin-right: <?php
522
+ echo $plugin_settings->getOption( 'right_icon_right_margin' ) ;
523
  ?>px;
524
  margin-top: <?php
525
  echo $header_margin_top ;
526
  ?>;
527
  }
528
  <?php
529
+ switch ( $plugin_settings->getOption( 'header_text_align' ) ) {
530
  case 'left':
531
  $header_logo_float = 'float:left;';
532
  break;
543
  echo $header_margin_top ;
544
  ?>;
545
  text-align: <?php
546
+ echo $plugin_settings->getOption( 'header_text_align' ) ;
547
  ?>;
548
  margin-left: <?php
549
  echo $header_margin_left ;
579
  }
580
  <?php
581
 
582
+ if ( '' !== $plugin_settings->getOption( 'left_menu_bg_gradient' ) ) {
583
+ $left_panel_bg_color = $plugin_settings->getOption( 'left_menu_bg_gradient' ) . ';';
584
  } else {
585
+ $left_panel_bg_color = 'background-color:' . $plugin_settings->getOption( 'left_panel_bg_color' ) . ';';
586
  }
587
 
588
 
589
+ if ( '' !== $plugin_settings->getOption( 'right_menu_bg_gradient' ) ) {
590
+ $right_panel_bg_color = $plugin_settings->getOption( 'right_menu_bg_gradient' ) . ';';
591
  } else {
592
+ $right_panel_bg_color = 'background-color:' . $plugin_settings->getOption( 'right_panel_bg_color' ) . ';';
593
  }
594
 
595
  $mm_woo_menu_panel_bg_color = '#CCC';
596
+ if ( $plugin_settings->getOption( 'mm_woo_menu_panel_bg_color' ) ) {
597
+ $mm_woo_menu_panel_bg_color = $plugin_settings->getOption( 'mm_woo_menu_panel_bg_color' );
598
  }
599
 
600
+ if ( $plugin_settings->getOption( 'mm_woo_menu_bg_gradient' ) ) {
601
+ $cart_panel_bg_color = $plugin_settings->getOption( 'mm_woo_menu_bg_gradient' ) . ';';
602
  } else {
603
  $cart_panel_bg_color = 'background-color:' . $mm_woo_menu_panel_bg_color . ';';
604
  }
627
  }
628
  .show-nav-left .mobmenu-overlay, .show-nav-right .mobmenu-overlay, .show-mob-menu-search .mobmenu-overlay {
629
  background: <?php
630
+ echo $plugin_settings->getOption( 'overlay_bg_color' ) ;
631
  ?>;
632
  }
633
  .mob-menu-slideout-top .mobmenu-overlay {
722
  /*End of Mobmenu Slide Over */
723
  .mobmenu .headertext {
724
  color: <?php
725
+ echo $plugin_settings->getOption( 'header_text_color' ) ;
726
  ?> ;
727
  text-decoration: none;
728
  }
750
 
751
  .mobmenu-left-panel li a, .leftmbottom, .leftmtop{
752
  padding-left: <?php
753
+ echo $plugin_settings->getOption( 'left_menu_content_padding' ) ;
754
  ?>%;
755
  padding-right: <?php
756
+ echo $plugin_settings->getOption( 'left_menu_content_padding' ) ;
757
  ?>%;
758
  }
759
  .mobmenu-content li > .sub-menu li {
760
  padding-left: calc(<?php
761
+ echo $plugin_settings->getOption( 'left_menu_content_padding' ) ;
762
  ?>*1%);
763
  }
764
 
765
  .mobmenu-right-panel li, .rightmbottom, .rightmtop{
766
  padding-left: <?php
767
+ echo $plugin_settings->getOption( 'right_menu_content_padding' ) ;
768
  ?>%;
769
  padding-right: <?php
770
+ echo $plugin_settings->getOption( 'right_menu_content_padding' ) ;
771
  ?>%;
772
  }
773
  .mobmenul-container i {
774
  line-height: <?php
775
+ echo $plugin_settings->getOption( 'left_icon_font_size' ) ;
776
  ?>px;
777
  font-size: <?php
778
+ echo $plugin_settings->getOption( 'left_icon_font_size' ) ;
779
  ?>px;
780
  float: left;
781
  }
782
  .left-menu-icon-text {
783
  float: left;
784
  line-height: <?php
785
+ echo $plugin_settings->getOption( 'left_icon_font_size' ) ;
786
  ?>px;
787
  color: <?php
788
+ echo $plugin_settings->getOption( 'header_text_after_icon' ) ;
789
  ?>;
790
  }
791
  .mobmenu-left-panel .mobmenu-display-name {
792
  color: <?php
793
+ echo $plugin_settings->getOption( 'left_panel_text_color' ) ;
794
  ?>;
795
  }
796
  .right-menu-icon-text {
797
  float: right;
798
  line-height: <?php
799
+ echo $plugin_settings->getOption( 'right_icon_font_size' ) ;
800
  ?>px;
801
  color: <?php
802
+ echo $plugin_settings->getOption( 'header_text_before_icon' ) ;
803
  ?>;
804
  }
805
  .mobmenur-container i {
806
  line-height: <?php
807
+ echo $plugin_settings->getOption( 'right_icon_font_size' ) ;
808
  ?>px;
809
  font-size: <?php
810
+ echo $plugin_settings->getOption( 'right_icon_font_size' ) ;
811
  ?>px;
812
  float: right;
813
  }
830
  }
831
  .mobmenu-content #mobmenuleft > li > a:hover {
832
  background-color: <?php
833
+ echo $plugin_settings->getOption( 'left_panel_hover_bgcolor' ) ;
834
  ?>;
835
  }
836
 
837
  .mobmenu-content #mobmenuright > li > a:hover {
838
  background-color: <?php
839
+ echo $plugin_settings->getOption( 'right_panel_hover_bgcolor' ) ;
840
  ?>;
841
  }
842
  .mobmenu-left-panel .mob-cancel-button {
843
  color: <?php
844
+ echo $plugin_settings->getOption( 'left_panel_cancel_button_color' ) ;
845
  ?>;
846
  }
847
  .mobmenu-right-panel .mob-cancel-button {
848
  color: <?php
849
+ echo $plugin_settings->getOption( 'right_panel_cancel_button_color' ) ;
850
  ?>;
851
  }
852
 
853
  }
854
 
855
  <?php
856
+ $text_after_left_icon_font = $plugin_settings->getOption( 'text_after_left_icon_font' );
857
+ $footer_text_font = $plugin_settings->getOption( 'footer_text_font' );
858
+ $header_banner_font = $plugin_settings->getOption( 'header_banner_font' );
859
+ $header_menu_font = $plugin_settings->getOption( 'header_menu_font' );
860
+ $left_menu_font = $plugin_settings->getOption( 'left_menu_font' );
861
+ $text_before_right_icon_font = $plugin_settings->getOption( 'text_before_right_icon_font' );
862
+ $right_menu_font = $plugin_settings->getOption( 'right_menu_font' );
863
  ?>
864
 
865
  .mob-menu-logo-holder > .headertext span,.mobmenu input.mob-menu-search-field {
includes/js/mobmenu-admin.js CHANGED
@@ -13,13 +13,442 @@
13
 
14
  "use strict";
15
  var searchTerm = '';
 
16
 
17
  (function ($) {
18
 
19
  jQuery( document ).ready( function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  var editorSettings = null;
21
 
22
- $( '#mobmenu_hide_elements' ).after( '<a href="#" class="mobmenu-find-element"><span class="dashicons-before dashicons-search">Find element</a>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  $('body').append('<iframe class="mobmenu-preview-iframe" scrolling="no" id="mobmenu-preview-iframe" width="380" height="650" >');
24
  setTimeout(function(){
25
  const urlParams = new URLSearchParams( window.location.search );
@@ -33,10 +462,9 @@
33
  $( '[data-link-id=' + subMenu + ']' ).click();
34
 
35
  }, 100);
36
-
37
 
38
  // Initilialize the CodeMirror on the custom CSS option.
39
- if ( $('#mobmenu_custom_css').length > 0 ) {
40
  editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
41
 
42
  editorSettings.codemirror = _.extend(
@@ -53,7 +481,7 @@
53
  }
54
 
55
  // Initilialize the CodeMirror on the custom JS option.
56
- if ( $('#mobmenu_custom_js').length > 0 ) {
57
 
58
 
59
  editorSettings.codemirror = _.extend(
@@ -83,8 +511,9 @@
83
  }
84
  });
85
 
 
86
 
87
- $( document ).on( 'click', '.mm-search-settings-results li' , function ( e ) {
88
 
89
  e.preventDefault();
90
  var dataTarget = jQuery( this ).find('a').attr( 'data-target-id' );
@@ -300,109 +729,6 @@
300
  });
301
  });
302
 
303
- $( '.mm-panel-search-bar #mm_search_settings' ).on( 'keyup', function( e ) {
304
- e.preventDefault();
305
- searchTerm = $( this ).val();
306
- var previousTerm = '';
307
- var termsList = [];
308
- termsList = [['Header Options','url'],['Left Menu Options','left-menu-options'],['Right Menu Options','value6'], ['Color Options', 'url']];
309
-
310
- // General Options Tab - Main Options
311
- termsList.push(['Mobile Menu Visibility (Width trigger)', 'general-visibility-options'],['Enable only in Mobile devices', 'general-visibility-options'],['Enable Testing Mode', 'general-visibility-options'],['Enable Left Menu', 'left-menu-options'],['Enable Right Menu', 'right-menu-options'],['Enable Footer Menu', 'footer-options']);
312
-
313
- // General Options Tab - Hide Original Theme menu
314
- termsList.push(['Hide Elements', 'general-hide-elements'],['Hide Elements by default', 'general-hide-elements']);
315
-
316
- // General Options Tab - Miscellaneous Options
317
- termsList.push(['Menu Display Type', 'general-misc-options'],['Enable Over effects', 'general-misc-options'],['Sliding Submenus', 'general-misc-options'],['Automatically Close Submenus', 'general-misc-options'],['Menu items border size', 'general-misc-options'],['Close icon', 'general-misc-options'],['Close icon font size', 'general-misc-options'],['Submenu Open icon', 'general-misc-options'],['Submenu Close icon', 'general-misc-options'],['Submenu icon font size', 'general-misc-options']);
318
-
319
- // General Options Tab - Advanced Options
320
- termsList.push(['Sticky HTML Elements', 'general-advanced-options'],['Custom CSS', 'general-advanced-options'],['Custom JS', 'general-advanced-options'],['Disable Mobile Menu on specific custom post types', 'general-advanced-options'],['Disable Mobile Menu on seleted pages', 'general-advanced-options']);
321
-
322
- // General Options Tab - Import and Export Options
323
- termsList.push(['Export Settings', 'general-import-export'],['Import Settings', 'general-import-export']);
324
-
325
- // Header Tab - Logo
326
- termsList.push(['Site Logo', 'logo-options'],['Upload Logo', 'logo-options'],['Logo Height', 'logo-options'],['Retina Logo', 'logo-options'],['Disable Logo URL', 'logo-options'],['Alternative Logo URL', 'logo-options'],['Logo/Text Top Margin', 'logo-options']);
327
-
328
- // Header Tab - Header Main Options
329
- termsList.push(['Header Elements Position', 'header'],['Sticky Header', 'header-options'],['Naked Header', 'header-options'],['Disable Logo/Text', 'header-options'],['Auto-hide Header when scrolling down.', 'header-options']);
330
-
331
- // Header Tab - Header
332
- termsList.push(['Header Shadow', 'header-options'],['Header Height', 'header-options'],['Header Text', 'header-options'],['Use page title text', 'header-options'],['Header Logo/Text Alignment', 'header-options'],['Header Logo/Text Left Margin', 'header-options'],['Header Logo/text Spacing', 'header-options'],['Header Logo/text Right Margin', 'header-options']);
333
-
334
- // Header Tab - Header Banner
335
- termsList.push(['Enable Header Banner', 'header#header-banner-options'],['Header Banner Position', 'header#header-banner-options'],['Header Banner Content', 'header#header-banner-options'],['Header Banner Height', 'header#header-banner-options'],['Disable Logo URL', 'header#header-banner-options'],['Header Banner Alignment', 'header#header-banner-options'],['Header Banner Padding', 'header#header-banner-options']);
336
-
337
- // Header Tab - Header Search
338
- termsList.push(['Enable Header Search', 'header#header-search-options'],['Header Elements Order', 'header#header-search-options'],['Live Search (Ajax)', 'header#header-search-options'],['Search Results Alignment', 'header#header-search-options'],['Search Icon Image', 'header#header-search-options'],['Search Icon Top Margin', 'header#header-search-options'],['Search Icon Font Size', 'header#header-search-options'],['Use text instead Icon', 'header#header-search-options'],['Placeholder Text', 'header#header-search-options']);
339
-
340
- // Footer Tab - Main options
341
- termsList.push(['Footer Menu', 'footer'],['Auto-hide Footer when scrolling up', 'footer'],['Footer style', 'footer'],['Footer padding', 'footer'],['Icon font size', 'footer'],['Footer Text Font/Size', 'footer']);
342
-
343
- // Left Menu Tab - Main options
344
- termsList.push(['Left Menu Content', 'left-menu-options'],['Left Menu', 'left-menu-options'],['Parent Link open submenu', 'left-menu-options'],['Only visible for logged users', 'left-menu-options']);
345
-
346
- // Left Menu Tab - Left Menu Icon
347
- termsList.push(['Text After Icon', 'left-menu-icon'],['Icon Action', 'left-menu-icon'],['Icon Link URL', 'left-menu-icon'],['Icon Link URL target', 'left-menu-icon'],['Icon Type', 'left-menu-icon'],['Icon Animation Type', 'left-menu-icon'],['Icon Font', 'left-menu-icon'],['Icon Font Size', 'left-menu-icon'],['Icon Image', 'left-menu-icon'],['Icon Top Margin', 'left-menu-icon'],['Icon Left Margin', 'left-menu-icon'],['Menu item icons position', 'left-menu-icon'],['Menu Item icons Horizontal Padding', 'left-menu-icon']);
348
-
349
- // Left Menu Tab - Left Panel options
350
- termsList.push(['Left Panel Background Image', 'left-panel-options'],['Left Panel Background Image Opacity', 'left-panel-options'],['Left Panel Background Image Size', 'left-panel-options'],['Left Panel Background Gradient CSS', 'left-panel-options'],['Left Menu Panel Widht Units', 'left-panel-options'],['Left Menu Panel Width (Pixels)', 'left-panel-options'],['Left Menu Panel Width (Percentage)', 'left-panel-options'],['Left Menu content padding', 'left-panel-options'],['Left Menu Copyright content', 'left-panel-options']);
351
-
352
- // Right Menu Tab - Main options
353
- termsList.push(['Right Menu Content', 'right-menu-options'],['Right Menu', 'right-menu-options'],['Parent Link open submenu', 'right-menu-options'],['Only visible for logged users', 'right-menu-options']);
354
-
355
- // Right Menu Tab - Right Menu Icon
356
- termsList.push(['Text After Icon', 'right-menu-options'],['Icon Action', 'right-menu-options'],['Icon Link URL', 'right-menu-options'],['Icon Link URL target', 'right-menu-options'],['Icon Type', 'right-menu-icon'],['Icon Animation Type', 'right-menu-icon'],['Icon Font', 'right-menu-icon'],['Icon Font Size', 'right-menu-icon'],['Icon Image', 'right-menu-icon'],['Icon Top Margin', 'right-menu-icon'],['Icon Left Margin', 'right-menu-icon'],['Menu item icons position', 'right-menu-icon'],['Menu Item icons Horizontal Padding', 'right-menu-icon']);
357
-
358
- // Right Menu Tab - Right Panel options
359
- termsList.push(['Right Panel Background Image', 'right-panel-options'],['Right Panel Background Image Opacity', 'right-panel-options'],['Right Panel Background Image Size', 'right-panel-options'],['Right Panel Background Gradient CSS', 'right-panel-options'],['Right Menu Panel Widht Units', 'right-panel-options'],['Right Menu Panel Width (Pixels)', 'right-panel-options'],['Right Menu Panel Width (Percentage)', 'right-panel-options'],['Right Menu content padding', 'right-panel-options'],['Right Menu Copyright content', 'right-panel-options']);
360
-
361
- // WooCommerce Tab - Main options
362
- termsList.push(['Enable WooCommerce Menu', 'woocommerce'],['Open cart after adding a product', 'woocommerce'],['Enable Account links in Mobile Cart Panel', 'woocommerce'],['Header Search only in products', 'woocommerce'],['Cart Total in Footer', 'woocommerce']);
363
-
364
- // WooCommerce Tab - Product filter
365
- termsList.push(['Enable Mobile Product Filter', 'woocommerce#product-filter'],['Filter icon font', 'woocommerce#product-filter'],['Filter icon font size', 'woocommerce#product-filter'],['Shop Filter Top Margin', 'woocommerce#product-filter'],['Shop Filter Location', 'woocommerce#product-filter']);
366
-
367
- // WooCommerce Tab - Cart Icon
368
- termsList.push(['Icon Type', 'woocommerce#cart-icon'],['Icon font', 'woocommerce#cart-icon'],['Icon font size', 'woocommerce#cart-icon'],['Icon Image', 'woocommerce#cart-icon'],['Cart Icon Top Margin', 'woocommerce#cart-icon']);
369
-
370
- // WooCommerce Tab - Cart translations
371
- termsList.push(['Cart Header Text', 'woocommerce#cart-translations'],['Cart No Items Text', 'woocommerce#cart-translations'],['Cart Link to the Shop Page Text', 'woocommerce#cart-translations'],['Filter Icon Text', 'woocommerce#cart-translations']);
372
-
373
- // WooCommerce Tab - Cart Panel
374
- termsList.push(['Cart Panel Background Image', 'woocommerce#cart-panel'],['Cart Panel Background Image Opacity', 'woocommerce#cart-panel'],['Cart Panel Background Gradient CSS', 'woocommerce#cart-panel'],['Cart Panel Width Units', 'woocommerce#cart-panel'],['Cart Menu Panel Width (Pixels)', 'woocommerce#cart-panel'],['Cart Menu Panel Width (Percentage)', 'woocommerce#cart-panel'],['Cart Menu Content Padding', 'woocommerce#cart-panel']);
375
-
376
- // Fonts Tab - Main options
377
- termsList.push(['WooCommerce Menu Font', 'fonts'],['Header Menu Font', 'fonts'],['Header Banner Font', 'fonts'],['Footer Text Font', 'fonts'],['Text After Icon Font', 'fonts'],['Left Menu Font', 'fonts'],['Copyright Font', 'fonts'],['Right Menu Font', 'fonts']);
378
-
379
- if ( searchTerm == previousTerm ) return;
380
- previousTerm = searchTerm;
381
-
382
- if ( searchTerm && searchTerm.length > 2 ) {
383
- var $searchResult = '';
384
-
385
- var found = termsList.find(function(element) {
386
- if ( 0 <= element[0].toLowerCase().indexOf(searchTerm.toLowerCase()) ) {
387
- var linkURL = window.location.origin + window.location.pathname + '?page=mobile-menu-options&tab=' + element[1];
388
-
389
- $searchResult += '<li><a href="' + linkURL + '" data-target-id="' + element[1] + ' ">' + element[0] + '</a></li>';
390
- }
391
- });
392
-
393
- if ( $searchResult.length > 0 ) {
394
- $searchResult = '<ul>' + $searchResult + '</ul>';
395
- }
396
-
397
- $( '.mm-search-settings-results' ).html( $searchResult );
398
- $( '.mm-search-settings-results' ).css( 'opacity', '1' );
399
- }
400
- else {
401
- $( '.mm-search-settings-results' ).html( '' );
402
- $( '.mm-search-settings-results' ).css( 'opacity', '0');
403
- }
404
- });
405
-
406
  $( document ).on( 'click', '.mm-scan-alerts a' , function( e ) {
407
  e.preventDefault();
408
  $( '[data-link-id=general-alerts]' ).click();
@@ -474,8 +800,9 @@
474
 
475
  $( '.nav-tab-wrapper .nav-tab li' ).removeClass( 'active' );
476
  $(this).addClass( 'active' );
477
- $( '.titan-framework-panel-wrap .form-table tr' ).hide();
478
  $( '.' + dataLinkId ).show();
 
479
  const url = new URL(window.location);
480
  url.searchParams.set('tab', dataLinkId);
481
  window.history.pushState({}, '', url);
@@ -483,7 +810,7 @@
483
  return false;
484
  });
485
 
486
- $( document ).on( 'click', '.titan-framework-panel-wrap .nav-tab-wrapper .nav-tab', function(e) {
487
  e.preventDefault();
488
  $( '.nav-tab-wrapper .nav-tab.active ul' ).hide();
489
  $( '.nav-tab-wrapper .nav-tab' ).removeClass( 'active' );
@@ -491,8 +818,9 @@
491
  $(this).addClass( 'active' );
492
  $( '.nav-tab-wrapper .nav-tab li' ).removeClass( 'active' );
493
  $(this).find( 'ul li' ).first().addClass( 'active' );
494
- $( '.titan-framework-panel-wrap .form-table tr' ).hide();
495
  $( '.' + $(this).attr( 'data-tab-id' ) ).show();
 
496
 
497
  });
498
 
@@ -509,19 +837,6 @@
509
 
510
  });
511
 
512
- $( document ).on( 'click', '.wp-mobile-menu-notice .notice-dismiss' , function( e ) {
513
-
514
- $.ajax({
515
- type: 'POST',
516
- url: ajaxurl,
517
-
518
- data: {
519
- action: 'dismiss_wp_mobile_notice',
520
- security: $( this ).parent().attr( 'data-ajax-nonce' )
521
- }
522
- });
523
- });
524
-
525
  $( document ).on( 'click', ' .mobmenu-find-element' , function( e ) {
526
 
527
  e.preventDefault();
13
 
14
  "use strict";
15
  var searchTerm = '';
16
+
17
 
18
  (function ($) {
19
 
20
  jQuery( document ).ready( function(){
21
+
22
+ function hideFieldsNotNeeded(){
23
+
24
+
25
+ // General options.
26
+ if ( $( "[data-link-id='general-options']" ).hasClass('active') ) {
27
+
28
+ if ( $( '#mobmenu_enable_right_menu' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
29
+ $( '.mobmenu_right_menu' ).show();
30
+ } else {
31
+ $( '.mobmenu_right_menu' ).hide();
32
+ }
33
+
34
+ if ( $( '#mobmenu_enable_left_menu' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
35
+ $( '.mobmenu_left_menu' ).show();
36
+ } else {
37
+ $( '.mobmenu_left_menu' ).hide();
38
+ }
39
+ }
40
+
41
+ // Left Panel options.
42
+ if ( $( "[data-link-id='left-panel-options']" ).hasClass('active') ) {
43
+ if ( $('#mobmenu_left_menu_bg_image').val() == '' ) {
44
+ $( '.mobmenu_left_menu_bg_opacity' ).hide();
45
+ $( '.mobmenu_left_menu_bg_image_size' ).hide();
46
+ $( '.mobmenu_left_menu_bg_gradient' ).show();
47
+ } else {
48
+ $( '.mobmenu_left_menu_bg_opacity' ).show();
49
+ $( '.mobmenu_left_menu_bg_image_size' ).show();
50
+ $( '.mobmenu_left_menu_bg_gradient' ).hide();
51
+ }
52
+ if ( $( '#mobmenu_left_menu_width_units' ).parent().find( '.button-primary' ).text() == 'Pixels' ) {
53
+ $( '.mobmenu_left_menu_width' ).show();
54
+ $( '.mobmenu_left_menu_width_percentage' ).hide();
55
+ } else {
56
+ $( '.mobmenu_left_menu_width' ).hide();
57
+ $( '.mobmenu_left_menu_width_percentage' ).show();
58
+ }
59
+ }
60
+
61
+ // Right Panel options.
62
+ if ( $( "[data-link-id='right-panel-options']" ).hasClass('active') ) {
63
+ if ( $('#mobmenu_right_menu_bg_image').val() == '' ) {
64
+ $( '.mobmenu_right_menu_bg_opacity' ).hide();
65
+ $( '.mobmenu_right_menu_bg_image_size' ).hide();
66
+ $( '.mobmenu_right_menu_bg_gradient' ).show();
67
+ } else {
68
+ $( '.mobmenu_right_menu_bg_opacity' ).show();
69
+ $( '.mobmenu_right_menu_bg_image_size' ).show();
70
+ $( '.mobmenu_right_menu_bg_gradient' ).hide();
71
+ }
72
+ if ( $( '#mobmenu_right_menu_width_units' ).parent().find( '.button-primary' ).text() == 'Pixels' ) {
73
+ $( '.mobmenu_right_menu_width' ).show();
74
+ $( '.mobmenu_right_menu_width_percentage' ).hide();
75
+ } else {
76
+ $( '.mobmenu_right_menu_width' ).hide();
77
+ $( '.mobmenu_right_menu_width_percentage' ).show();
78
+ }
79
+ }
80
+
81
+ // Right Menu options.
82
+ if ( $( "[data-link-id='right-menu-options']" ).hasClass('active') ) {
83
+
84
+ if ( $( '#mobmenu_enable_right_menu' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
85
+ $( '.mobmenu_right_menu' ).show();
86
+ $( '.mobmenu_right_menu_content_position' ).show();
87
+ $( '.mobmenu_right_menu_parent_link_submenu' ).show();
88
+ $( '.mobmenu_enable_right_menu_logged_in' ).show();
89
+ $( '.mobmenu_sliding_submenus' ).show();
90
+ $( '.mobmenu_autoclose_submenus' ).show();
91
+ $( '.mobmenu_menu_items_border_size' ).show();
92
+ } else {
93
+ $( '.mobmenu_right_menu' ).hide();
94
+ $( '.mobmenu_right_menu_content_position' ).hide();
95
+ $( '.mobmenu_right_menu_parent_link_submenu' ).hide();
96
+ $( '.mobmenu_enable_right_menu_logged_in' ).hide();
97
+ $( '.mobmenu_sliding_submenus' ).hide();
98
+ $( '.mobmenu_autoclose_submenus' ).hide();
99
+ $( '.mobmenu_menu_items_border_size' ).hide();
100
+ }
101
+ }
102
+
103
+ // Left Menu options.
104
+ if ( $( "[data-link-id='left-menu-options']" ).hasClass('active') ) {
105
+ if ( $( '#mobmenu_enable_left_menu' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
106
+ $( '.mobmenu_left_menu' ).show();
107
+ $( '.mobmenu_left_menu_content_position' ).show();
108
+ $( '.mobmenu_left_menu_parent_link_submenu' ).show();
109
+ $( '.mobmenu_enable_left_menu_logged_in' ).show();
110
+ $( '.mobmenu_sliding_submenus' ).show();
111
+ $( '.mobmenu_autoclose_submenus' ).show();
112
+ $( '.mobmenu_menu_items_border_size' ).show();
113
+ } else {
114
+ $( '.mobmenu_left_menu' ).hide();
115
+ $( '.mobmenu_left_menu_content_position' ).hide();
116
+ $( '.mobmenu_left_menu_parent_link_submenu' ).hide();
117
+ $( '.mobmenu_enable_left_menu_logged_in' ).hide();
118
+ $( '.mobmenu_sliding_submenus' ).hide();
119
+ $( '.mobmenu_autoclose_submenus' ).hide();
120
+ $( '.mobmenu_menu_items_border_size' ).hide();
121
+ }
122
+ }
123
+
124
+ if ( $( "[data-link-id='right-tabbed-menusicon']" ).hasClass('active') ) {
125
+ if ( $( '#mobmenu_right_menu_tabbed_menus' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
126
+ $( '.mobmenu_right_tab_title_1' ).show();
127
+ $( '.mobmenu_right_menu_tab_1' ).show();
128
+ $( '.mobmenu_right_tab_title_2' ).show();
129
+ $( '.mobmenu_right_menu_tab_2' ).show();
130
+ $( '.mobmenu_right_menu_tab_margin_top' ).show();
131
+ } else {
132
+ $( '.mobmenu_right_tab_title_1' ).hide();
133
+ $( '.mobmenu_right_menu_tab_1' ).hide();
134
+ $( '.mobmenu_right_tab_title_2' ).hide();
135
+ $( '.mobmenu_right_menu_tab_2' ).hide();
136
+ $( '.mobmenu_right_menu_tab_margin_top' ).hide();
137
+ }
138
+ }
139
+
140
+ if ( $( "[data-link-id='header-banner-options']" ).hasClass('active') ) {
141
+ if ( $( '#mobmenu_enable_header_banner' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
142
+ $( '.mobmenu_header_banner_position' ).show();
143
+ $( '.mobmenu_header_banner_content' ).show();
144
+ $( '.mobmenu_header_banner_height' ).show();
145
+ $( '.mobmenu_header_banner_align' ).show();
146
+ $( '.mobmenu_header_banner_left_padding' ).show();
147
+ $( '.mobmenu_page_title_header_global' ).show();
148
+ $( '.mobmenu_header_banner_right_padding' ).show();
149
+ } else {
150
+ $( '.mobmenu_header_banner_position' ).hide();
151
+ $( '.mobmenu_header_banner_content' ).hide();
152
+ $( '.mobmenu_header_banner_height' ).hide();
153
+ $( '.mobmenu_header_banner_align' ).hide();
154
+ $( '.mobmenu_header_banner_left_padding' ).hide();
155
+ $( '.mobmenu_page_title_header_global' ).hide();
156
+ $( '.mobmenu_header_banner_right_padding' ).hide();
157
+ }
158
+ }
159
+
160
+ if ( $( "[data-link-id='header-search-options']" ).hasClass('active') ) {
161
+ if ( $( '#mobmenu_enable_header_search' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
162
+ $( '.mobmenu_header_ajax_search' ).show();
163
+ $( '.mobmenu_header_search_results_align' ).show();
164
+ $( '.mobmenu_search_icon_image' ).show();
165
+ $( '.mobmenu_search_icon_top_margin' ).show();
166
+ $( '.mobmenu_search_icon_font_size' ).show();
167
+ $( '.mobmenu_search_icon_text' ).show();
168
+ $( '.mobmenu_placeholder_text' ).show();
169
+ } else {
170
+ $( '.mobmenu_header_ajax_search' ).hide();
171
+ $( '.mobmenu_header_search_results_align' ).hide();
172
+ $( '.mobmenu_search_icon_image' ).hide();
173
+ $( '.mobmenu_search_icon_top_margin' ).hide();
174
+ $( '.mobmenu_search_icon_font_size' ).hide();
175
+ $( '.mobmenu_search_icon_text' ).hide();
176
+ $( '.mobmenu_placeholder_text' ).hide();
177
+ }
178
+ }
179
+
180
+ if ( $( "[data-link-id='left-tabbed-menus']" ).hasClass('active') ) {
181
+ if ( $( '#mobmenu_left_menu_tabbed_menus' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
182
+ $( '.mobmenu_left_tab_title_1' ).show();
183
+ $( '.mobmenu_left_menu_tab_1' ).show();
184
+ $( '.mobmenu_left_tab_title_2' ).show();
185
+ $( '.mobmenu_left_menu_tab_2' ).show();
186
+ $( '.mobmenu_left_menu_tab_margin_top' ).show();
187
+ } else {
188
+ $( '.mobmenu_left_tab_title_1' ).hide();
189
+ $( '.mobmenu_left_menu_tab_1' ).hide();
190
+ $( '.mobmenu_left_tab_title_2' ).hide();
191
+ $( '.mobmenu_left_menu_tab_2' ).hide();
192
+ $( '.mobmenu_left_menu_tab_margin_top' ).hide();
193
+ }
194
+ }
195
+
196
+ if ( $( "[data-link-id='left-menu-icon']" ).hasClass('active') ) {
197
+
198
+ // Icon.
199
+ if ( $( '.mobmenu_left_menu_icon_new .select2-hidden-accessible').val() == 'icon' ) {
200
+ $( '.mobmenu_left_menu_icon_animation' ).hide();
201
+ $( '.mobmenu_left_menu_icon_font' ).show();
202
+ $( '.mobmenu_left_icon_font_size' ).show();
203
+ $( '.mobmenu_left_menu_icon' ).hide();
204
+ }
205
+
206
+ // Animated Icon.
207
+ if ( $( '.mobmenu_left_menu_icon_new .select2-hidden-accessible').val() == 'animated-icon' ) {
208
+ $( '.mobmenu_left_menu_icon_animation' ).show();
209
+ $( '.mobmenu_left_menu_icon_font' ).hide();
210
+ $( '.mobmenu_left_icon_font_size' ).show();
211
+ $( '.mobmenu_left_menu_icon' ).hide();
212
+ }
213
+
214
+ // Image.
215
+ if ( $( '.mobmenu_left_menu_icon_new .select2-hidden-accessible').val() == 'image' ) {
216
+ $( '.mobmenu_left_menu_icon_animation' ).hide();
217
+ $( '.mobmenu_left_menu_icon_font' ).hide();
218
+ $( '.mobmenu_left_icon_font_size' ).hide();
219
+ $( '.mobmenu_left_menu_icon' ).show();
220
+ }
221
+
222
+ // If the icon opens a link.
223
+ if ( $( '#mobmenu_left_menu_icon_action' ).parent().find( '.button-primary' ).text() == 'Open Menu' ) {
224
+ $( '.mobmenu_left_icon_url' ).hide();
225
+ $( '.mobmenu_left_icon_url_target' ).hide();
226
+ } else {
227
+ $( '.mobmenu_left_icon_url' ).show();
228
+ $( '.mobmenu_left_icon_url_target' ).show();
229
+ }
230
+
231
+ }
232
+
233
+ if ( $( "[data-link-id='right-menu-icon']" ).hasClass('active') ) {
234
+
235
+ // Icon.
236
+ if ( $( '.mobmenu_right_menu_icon_new .select2-hidden-accessible').val() == 'icon' ) {
237
+ $( '.mobmenu_right_menu_icon_animation' ).hide();
238
+ $( '.mobmenu_right_menu_icon_font' ).show();
239
+ $( '.mobmenu_right_icon_font_size' ).show();
240
+ $( '.mobmenu_right_menu_icon' ).hide();
241
+ }
242
+
243
+ // Animated Icon.
244
+ if ( $( '.mobmenu_right_menu_icon_new .select2-hidden-accessible').val() == 'animated-icon' ) {
245
+ $( '.mobmenu_right_menu_icon_animation' ).show();
246
+ $( '.mobmenu_right_menu_icon_font' ).hide();
247
+ $( '.mobmenu_right_icon_font_size' ).show();
248
+ $( '.mobmenu_right_menu_icon' ).hide();
249
+ }
250
+
251
+ // Image.
252
+ if ( $( '.mobmenu_right_menu_icon_new .select2-hidden-accessible').val() == 'image' ) {
253
+ $( '.mobmenu_right_menu_icon_animation' ).hide();
254
+ $( '.mobmenu_right_menu_icon_font' ).hide();
255
+ $( '.mobmenu_right_icon_font_size' ).hide();
256
+ $( '.mobmenu_right_menu_icon' ).show();
257
+ }
258
+
259
+ // If the icon opens a link.
260
+ if ( $( '#mobmenu_right_menu_icon_action' ).parent().find( '.button-primary' ).text() == 'Open Menu' ) {
261
+ $( '.mobmenu_right_icon_url' ).hide();
262
+ $( '.mobmenu_right_icon_url_target' ).hide();
263
+ } else {
264
+ $( '.mobmenu_right_icon_url' ).show();
265
+ $( '.mobmenu_right_icon_url_target' ).show();
266
+ }
267
+ }
268
+
269
+ if ( $( "[data-link-id='header-options']" ).hasClass('active') ) {
270
+ if ( $( '#mobmenu_enabled_naked_header' ).parent().find( '.button-primary' ).text() == 'Hamburger Menu' ) {
271
+ $( '.mobmenu_disabled_logo_text' ).hide();
272
+ $( '.mobmenu_header_shadow' ).hide();
273
+ $( '.mobmenu_header_text' ).hide();
274
+ $( '.mobmenu_header_height' ).hide();
275
+ $( '.mobmenu_header_text_align' ).hide();
276
+ $( '.mobmenu_header_font_size' ).hide();
277
+ $( '.mobmenu_header_text_left_margin' ).hide();
278
+ $( '.mobmenu_header_text_logo_spacing' ).hide();
279
+ $( '.mobmenu_header_text_right_margin' ).hide();
280
+ } else {
281
+ $( '.mobmenu_disabled_logo_text' ).show();
282
+ $( '.mobmenu_header_shadow' ).show();
283
+ $( '.mobmenu_header_text' ).show();
284
+ $( '.mobmenu_header_height' ).show();
285
+ $( '.mobmenu_header_text_align' ).show();
286
+ $( '.mobmenu_header_font_size' ).show();
287
+ $( '.mobmenu_header_text_left_margin' ).show();
288
+ $( '.mobmenu_header_text_logo_spacing' ).show();
289
+ $( '.mobmenu_header_text_right_margin' ).show();
290
+ }
291
+ }
292
+
293
+ if ( $( "[data-link-id='logo-options']" ).hasClass('active') ) {
294
+ if ( $( '.mobmenu_header_branding .select2-hidden-accessible').val() == 'text' ) {
295
+ $( '.mobmenu_logo_img' ).hide();
296
+ $( '.mobmenu_logo_img_retina' ).hide();
297
+ $( '.mobmenu_logo_height' ).hide();
298
+ }
299
+ if ( $( '.mobmenu_header_branding .select2-hidden-accessible').val() == 'logo' || $( '.mobmenu_header_branding .select2-hidden-accessible').val() == 'logo-text' || $( '.mobmenu_header_branding .select2-hidden-accessible').val() == 'text-logo' ) {
300
+ $( '.mobmenu_logo_img' ).show();
301
+ $( '.mobmenu_logo_img_retina' ).show();
302
+ $( '.mobmenu_logo_height' ).show();
303
+
304
+ }
305
+ }
306
+
307
+ if ( $( "[data-tab-id='footer-options']" ).hasClass('active') ) {
308
+ if ( $( '#mobmenu_enable_footer_icons' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
309
+ $('.mobmenu_footer_menu').show();
310
+ $('.mobmenu_enable_footer_menu_logged_in').show();
311
+ $('.mobmenu_autohide_footer').show();
312
+ $('.mobmenu_footer_style').show();
313
+ $('.mobmenu_footer_padding').show();
314
+ $('.mobmenu_footer_icon_font_size').show();
315
+ }
316
+ else {
317
+ $('.mobmenu_footer_menu').hide();
318
+ $('.mobmenu_enable_footer_menu_logged_in').hide();
319
+ $('.mobmenu_autohide_footer').hide();
320
+ $('.mobmenu_footer_style').hide();
321
+ $('.mobmenu_footer_padding').hide();
322
+ $('.mobmenu_footer_icon_font_size').hide();
323
+ }
324
+ }
325
+
326
+ if ( $( "[data-link-id='cart-icon']" ).hasClass('active') ) {
327
+ if ( $( '#mobmenu_mm_woo_menu_icon_opt' ).parent().find( '.button-primary' ).text() == 'Default Cart SVG Icon' ) {
328
+ $('.mobmenu_mm_woo_menu_icon_font' ).hide();
329
+ $('.mobmenu_mm_woo_menu_icon_font_size' ).hide();
330
+ } else {
331
+ $('.mobmenu_mm_woo_menu_icon_font' ).show();
332
+ $('.mobmenu_mm_woo_menu_icon_font_size' ).show();
333
+ }
334
+ }
335
+ if ( $( "[data-link-id='woocommerce-options']" ).hasClass('active') ) {
336
+ if ( $( '#mobmenu_enable_mm_woo_menu' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
337
+ $( '.mobmenu_enable_mm_woo_cart_page' ).show();
338
+ $( '.mobmenu_enable_mm_woo_open_cart_menu' ).show();
339
+ $( '.mobmenu_enable_mm_woo_menu_account' ).show();
340
+ $( '.mobmenu_enable_mm_woo_cart_total_footer' ).show();
341
+ } else {
342
+ $( '.mobmenu_enable_mm_woo_cart_page' ).hide();
343
+ $( '.mobmenu_enable_mm_woo_open_cart_menu' ).hide();
344
+ $( '.mobmenu_enable_mm_woo_menu_account' ).hide();
345
+ $( '.mobmenu_enable_mm_woo_cart_total_footer' ).hide();
346
+ }
347
+ }
348
+
349
+ if ( $( "[data-link-id='cart-panel']" ).hasClass('active') ) {
350
+ if ( $('#mobmenu_mm_woo_menu_bg_image').val() == '' ) {
351
+ $('.mobmenu_mm_woo_menu_bg_opacity' ).hide();
352
+ $('.mobmenu_mm_woo_menu_bg_image_size' ).hide();
353
+ $('.mobmenu_mm_woo_menu_bg_gradient' ).show();
354
+ }
355
+ else {
356
+ $('.mobmenu_mm_woo_menu_bg_opacity' ).show();
357
+ $('.mobmenu_mm_woo_menu_bg_image_size' ).show();
358
+ $('.mobmenu_mm_woo_menu_bg_gradient' ).hide();
359
+ }
360
+ if ( $( '#mobmenu_mm_woo_menu_width_units' ).parent().find( '.button-primary' ).text() == 'Pixels' ) {
361
+ $( '.mobmenu_mm_woo_menu_width' ).show();
362
+ $( '.mobmenu_mm_woo_menu_width_percentage' ).hide();
363
+ } else {
364
+ $( '.mobmenu_mm_woo_menu_width' ).hide();
365
+ $( '.mobmenu_mm_woo_menu_width_percentage' ).show();
366
+ }
367
+ }
368
+
369
+ if ( $( "[data-link-id='product-filter']" ).hasClass('active') ) {
370
+ if ( $( '#mobmenu_enable_mm_woo_product_filter' ).parent().find( '.button-primary' ).text() == 'Yes' ) {
371
+ $('.mobmenu_enable_mm_woo_widget_product_filter' ).show();
372
+ $('.mobmenu_mm_woo_filter_icon_font' ).show();
373
+ $('.mobmenu_mm_woo_filter_icon_font_size' ).show();
374
+ $('.mobmenu_shop_filter_top_margin' ).show();
375
+ $('.mobmenu_mm_woo_shop_filter_location' ).show();
376
+ }
377
+ else {
378
+ $('.mobmenu_enable_mm_woo_widget_product_filter' ).hide();
379
+ $('.mobmenu_mm_woo_filter_icon_font' ).hide();
380
+ $('.mobmenu_mm_woo_filter_icon_font_size' ).hide();
381
+ $('.mobmenu_shop_filter_top_margin' ).hide();
382
+ $('.mobmenu_mm_woo_shop_filter_location' ).hide();
383
+ }
384
+
385
+ }
386
+
387
+ }
388
+
389
+ setTimeout(function(){
390
+
391
+ hideFieldsNotNeeded();
392
+
393
+ }, 1000);
394
+
395
  var editorSettings = null;
396
 
397
+ const tour = new Shepherd.Tour({
398
+ defaultStepOptions: {
399
+ classes: 'shadow-md bg-purple-dark',
400
+ scrollTo: true,
401
+ cancelIcon: {
402
+ enabled: true,
403
+ },
404
+ useModalOverlay: true
405
+ },
406
+ confirmCancel: true,
407
+ });
408
+
409
+ //Construct the steps
410
+ const steps = [{
411
+ title: 'Welcome to Mobile Menu - Lets improve your website navigation: Step One',
412
+ text: 'Lets choose the type of mobile header',
413
+ attachTo: {
414
+ element: '#mobmenu_enabled_naked_header',
415
+ on: 'bottom'
416
+ },
417
+ classes: 'my-awesome-additional-class',
418
+ buttons: [{
419
+ text: 'Next',
420
+ action: tour.next
421
+ }]
422
+ },
423
+
424
+ {
425
+ title: 'My Awesome Tour Guide : Step Two',
426
+ text: 'This step is attached to the bottom of the <code>.entry-content</code> element. If no such element is found, the step appears in the center of the screen.',
427
+ attachTo: {
428
+ element: '.entry-content',
429
+ on: 'bottom'
430
+ },
431
+ classes: 'my-awesome-additional-class',
432
+ buttons: [{
433
+ text: 'Back',
434
+ action: tour.back
435
+ },
436
+ {
437
+ text: 'Finish',
438
+ classes: 'shepherd-button-close',
439
+ action: tour.hide
440
+ }
441
+ ]
442
+ },
443
+
444
+ ]
445
+
446
+ tour.addSteps(steps);
447
+
448
+ // Initiate the tour
449
+ //tour.start();
450
+
451
+ $( '#mobmenu_hide_elements' ).after( '<a href="#" class="mobmenu-find-element">Find element</a>' );
452
  $('body').append('<iframe class="mobmenu-preview-iframe" scrolling="no" id="mobmenu-preview-iframe" width="380" height="650" >');
453
  setTimeout(function(){
454
  const urlParams = new URLSearchParams( window.location.search );
462
  $( '[data-link-id=' + subMenu + ']' ).click();
463
 
464
  }, 100);
 
465
 
466
  // Initilialize the CodeMirror on the custom CSS option.
467
+ if ( $('#mobmenu_custom_css').length > 0 && wp.codeEditor != undefined ) {
468
  editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
469
 
470
  editorSettings.codemirror = _.extend(
481
  }
482
 
483
  // Initilialize the CodeMirror on the custom JS option.
484
+ if ( $('#mobmenu_custom_js').length > 0 && wp.codeEditor != undefined ) {
485
 
486
 
487
  editorSettings.codemirror = _.extend(
511
  }
512
  });
513
 
514
+ $( document ).on( 'change', '.mm-form-table', hideFieldsNotNeeded );
515
 
516
+ $( document ).on( 'click', '.mm-search-settings-results li' , function ( e ) {
517
 
518
  e.preventDefault();
519
  var dataTarget = jQuery( this ).find('a').attr( 'data-target-id' );
729
  });
730
  });
731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
  $( document ).on( 'click', '.mm-scan-alerts a' , function( e ) {
733
  e.preventDefault();
734
  $( '[data-link-id=general-alerts]' ).click();
800
 
801
  $( '.nav-tab-wrapper .nav-tab li' ).removeClass( 'active' );
802
  $(this).addClass( 'active' );
803
+ $( '.mobmenu-settings-panel-wrap .mm-form-table tr' ).hide();
804
  $( '.' + dataLinkId ).show();
805
+ hideFieldsNotNeeded();
806
  const url = new URL(window.location);
807
  url.searchParams.set('tab', dataLinkId);
808
  window.history.pushState({}, '', url);
810
  return false;
811
  });
812
 
813
+ $( document ).on( 'click', '.mobmenu-settings-panel-wrap .nav-tab-wrapper .nav-tab', function(e) {
814
  e.preventDefault();
815
  $( '.nav-tab-wrapper .nav-tab.active ul' ).hide();
816
  $( '.nav-tab-wrapper .nav-tab' ).removeClass( 'active' );
818
  $(this).addClass( 'active' );
819
  $( '.nav-tab-wrapper .nav-tab li' ).removeClass( 'active' );
820
  $(this).find( 'ul li' ).first().addClass( 'active' );
821
+ $( '.mobmenu-settings-panel-wrap .mm-form-table tr' ).hide();
822
  $( '.' + $(this).attr( 'data-tab-id' ) ).show();
823
+ hideFieldsNotNeeded();
824
 
825
  });
826
 
837
 
838
  });
839
 
 
 
 
 
 
 
 
 
 
 
 
 
 
840
  $( document ).on( 'click', ' .mobmenu-find-element' , function( e ) {
841
 
842
  e.preventDefault();
includes/js/mobmenu.js CHANGED
@@ -188,14 +188,36 @@
188
  mobmenuOpenSubmenus( $( '.mob-expand-submenu.show-sub' ) );
189
  }
190
  }
191
-
192
  mobmenuOpenSubmenus( $(this) );
193
  e.preventDefault();
194
  e.stopPropagation();
195
 
196
  });
197
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  $( document ).on( 'click', '.mobmenu-panel.show-panel .mob-cancel-button, .show-nav-right .mobmenu-overlay, .show-nav-left .mobmenu-overlay', function ( e ) {
 
 
199
 
200
  e.preventDefault();
201
  mobmenuClosePanel( 'show-panel' );
@@ -293,8 +315,11 @@
293
 
294
  setTimeout(function(){
295
  $( '.mob-menu-sliding-menus [data-menu-level]' ).scrollTop( '0' );
296
- $( '.mob-expand-submenu.show-sub' ).parent().click();
297
- $( '.mobmenu-content .show-sub-menu' ).removeClass( 'show-sub-menu' );
 
 
 
298
  }, 400);
299
 
300
  }
188
  mobmenuOpenSubmenus( $( '.mob-expand-submenu.show-sub' ) );
189
  }
190
  }
191
+
192
  mobmenuOpenSubmenus( $(this) );
193
  e.preventDefault();
194
  e.stopPropagation();
195
 
196
  });
197
 
198
+ $( document ).on( 'keyup', '.mobmenu-left-bt', function(e){
199
+ if( e.type != 'click' && e.which != 13 || e.which == 9 ) {
200
+ return;
201
+ }
202
+
203
+ mobmenuClosePanel( 'mobmenu-left-panel' );
204
+ e.stopPropagation();
205
+ });
206
+
207
+ $( document ).on( 'keyup', '.mobmenu-right-bt', function(e){
208
+ if( e.type != 'click' && e.which != 13 || e.which == 9 ) {
209
+ return;
210
+ }
211
+
212
+ mobmenuClosePanel( 'mobmenu-right-panel' );
213
+ e.stopPropagation();
214
+ });
215
+
216
+
217
+
218
  $( document ).on( 'click', '.mobmenu-panel.show-panel .mob-cancel-button, .show-nav-right .mobmenu-overlay, .show-nav-left .mobmenu-overlay', function ( e ) {
219
+
220
+
221
 
222
  e.preventDefault();
223
  mobmenuClosePanel( 'show-panel' );
315
 
316
  setTimeout(function(){
317
  $( '.mob-menu-sliding-menus [data-menu-level]' ).scrollTop( '0' );
318
+ if ( 1 == $( '.mob-menu-header-holder' ).attr( 'data-autoclose-submenus' ) ) {
319
+ $( '.mob-expand-submenu.show-sub' ).click();
320
+ $( '.mobmenu-content .show-sub-menu' ).removeClass( 'show-sub-menu' );
321
+ }
322
+
323
  }, 400);
324
 
325
  }
{options-framework → includes/plugin-settings}/css/admin-styles.css RENAMED
@@ -30,19 +30,19 @@
30
  @import "class-option-date.css";
31
 
32
  /* note option padding issue */
33
- .tf-note .updated p {
34
  margin-bottom: 4px;
35
  }
36
 
37
  @media screen and (min-width: 783px) {
38
- .tf-select-googlefont iframe {
39
  width: 100%;
40
  height: 120px;
41
  background: #FFF;
42
  background: rgba(255, 255, 255, .7);
43
  margin-top: 4px;
44
  }
45
- .form-table td.tf-select-googlefont fieldset label {
46
  display: inline-block;
47
  padding-left: 20px;
48
  width: 200px;
@@ -52,28 +52,28 @@
52
  /*
53
  * 1.0 - Styles for metaboxes in the sidebar
54
  */
55
- #side-sortables .tf-form-table,
56
- #side-sortables .tf-form-table tbody,
57
- #side-sortables .tf-form-table tr,
58
- #side-sortables .tf-form-table th,
59
- #side-sortables .tf-form-table td {
60
  display:block;
61
  }
62
 
63
- #side-sortables .tf-form-table th {
64
  padding: 10px 0px 0px;
65
  }
66
 
67
- #side-sortables .tf-form-table td {
68
  padding: 5px 0px;
69
  }
70
 
71
- #side-sortables .tf-form-table td input {
72
  max-width:100%;
73
  }
74
 
75
- #side-sortables .tf-radio-image label:first-child,
76
- #side-sortables .tf-radio-image label {
77
  display: inline-block;
78
  margin-left: 10px;
79
  margin-top: 10px;
@@ -84,88 +84,88 @@
84
  */
85
 
86
  /* 2.2 - Tabs */
87
- .titan-framework-panel-wrap .nav-tab-wrapper { margin-bottom: 20px; }
88
 
89
  /* 2.3 - option tables */
90
- .titan-framework-panel-wrap .form-table th,
91
- .titan-framework-panel-wrap .form-table td {
92
  padding: 4px 20px;
93
  }
94
  /*
95
- .titan-framework-panel-wrap .form-table tbody:first-child tr th:last-child,
96
- .titan-framework-panel-wrap .form-table tbody:first-child tr td:last-child {
97
  border-right: 1px solid #DFDFDF;
98
  }
99
  */
100
- .titan-framework-panel-wrap .wp_themeSkin table td {
101
  padding: 0;
102
  }
103
 
104
- .titan-framework-panel-wrap .form-table {
105
  margin-top: 0;
106
  }
107
 
108
- .titan-framework-panel-wrap .nav-tab-active,
109
- .titan-framework-panel-wrap .nav-tab-active:hover {
110
  background: #ffffff;
111
  border-bottom: 1px solid #ffffff;
112
  }
113
 
114
- .titan-framework-panel-wrap .form-table tr {
115
  background: white;
116
  border-bottom: 1px solid #eee;
117
  padding-top: 10px;
118
  }
119
 
120
- .titan-framework-panel-wrap .form-table .wp_themeSkin .mceStatusbar { padding: 0 0 0 8px; }
121
- .titan-framework-panel-wrap .form-table .wp_themeSkin .mceToolbar { padding: 1px; }
122
 
123
- .titan-framework-panel-wrap p.submit {
124
  background: #FFF;
125
  margin-top: 0;
126
  margin-bottom: 0;
127
  padding: 15px 20px;
128
  border-bottom: 1px solid #eee;
129
  }
130
- .titan-framework-panel-wrap .form-table + p.submit {
131
  padding: 14px 10px;
132
  background: #fff;
133
  z-index: 999999;
134
  }
135
 
136
  /* 2.4 - font options description */
137
- .titan-framework-panel-wrap .tf-font p.description,
138
- .titan-framework-panel-wrap .tf-radio p.description,
139
- .titan-framework-panel-wrap .tf-multicheck p.description {
140
  margin-bottom: 8px;
141
  }
142
 
143
  /* 2.5 - google font iframe */
144
- .tf-select-googlefont iframe {
145
  background: #fafafa;
146
  }
147
 
148
  /* 2.6 - notifications */
149
- .titan-framework-panel-wrap div.updated,
150
- .titan-framework-panel-wrap div.error {
151
 
152
  }
153
 
154
- .titan-framework-panel-wrap h2 + div.updated,
155
- .titan-framework-panel-wrap h2 + div.error {
156
 
157
  }
158
 
159
- .titan-framework-panel-wrap h2 + div.error {
160
  }
161
 
162
  /* 2.7 - notes */
163
- .titan-framework-panel-wrap .tf-note .updated {
164
 
165
  }
166
 
167
  /* 2.8 - heading */
168
- .titan-framework-panel-wrap .tf-heading th {
169
  background: #F1F1F1;
170
  background: none repeat scroll 0 0 #F5F5F5;
171
  border-left: 1px solid #DFDFDF;
@@ -175,7 +175,7 @@
175
  color: #222222;
176
  padding: 10px 20px;
177
  }
178
- .titan-framework-panel-wrap .tf-heading h3 {
179
  margin: 0;
180
  font-size: 14px;
181
  font-weight: 600;
@@ -183,15 +183,15 @@
183
  font-family: sans-serif;
184
  text-transform: capitalize;
185
  }
186
- .titan-framework-panel-wrap .tf-heading p {
187
  font-weight: normal;
188
  margin-top: 5px;
189
  }
190
- .titan-framework-panel-wrap .tf-heading p:last-child {
191
  margin-bottom: 0;
192
  }
193
 
194
- .titan-framework-panel-wrap .options-container h2 {
195
  background: none repeat scroll 0 0 #F5F5F5;
196
  border-left: 1px solid #DFDFDF;
197
  border-top: 1px solid #DFDFDF;
@@ -205,59 +205,59 @@
205
  padding: 10px 20px;
206
  }
207
 
208
- .titan-framework-panel-wrap .options-container h2 { margin-bottom: -6px; }
209
 
210
  /* 2.9 - radio-palette */
211
- .tf-radio-palette span {
212
  display: inline-block;
213
  height: 40px;
214
  }
215
 
216
- .tf-radio-palette span span {
217
  width: 15px;
218
  }
219
 
220
- .tf-radio-palette > label > span {
221
  padding: 2px;
222
  border: 1px solid #ddd;
223
  }
224
 
225
- .tf-radio-palette input[type=radio] {
226
  vertical-align: top;
227
  margin-top: 17px;
228
  }
229
 
230
- .tf-radio-palette label {
231
  margin: 0 30px 10px 0;
232
  display: inline-block;
233
  }
234
 
235
- .tf-radio-palette label:first-child {
236
  margin-left: 0
237
  }
238
 
239
- .tf-ajax-button .button + .button {
240
  margin-left: 5px;
241
  }
242
 
243
  /* 2.10 - radio images */
244
- .tf-radio-image label {
245
  white-space: nowrap;
246
  display: inline-block;
247
  margin-right: 30px;
248
  margin-bottom: 10px;
249
  }
250
 
251
- .form-table .tf-radio-image input[type=radio] {
252
  margin-top: 0;
253
  }
254
 
255
- .tf-radio-image img {
256
  vertical-align: middle;
257
  }
258
 
259
  /* 2.11 - code */
260
- .tf-code > div:first-of-type {
261
  border-radius: 3px;
262
  border: 1px solid #DDD;
263
  -webkit-box-sizing: border-box;
@@ -269,7 +269,7 @@
269
  }
270
 
271
  /* 2.12 - sortable */
272
- .tf-sortable li {
273
  cursor: move;
274
  background: #fafafa;
275
  padding: 0 0 0 15px;
@@ -278,7 +278,7 @@
278
  line-height: 40px;
279
  }
280
 
281
- .tf-sortable ul {
282
  margin-top: 0;
283
  background: rgba(0, 0, 0, 0);
284
  border: 1px solid #EEE;
@@ -286,11 +286,11 @@
286
  display: inline-block;
287
  }
288
 
289
- .tf-sortable ul li:last-of-type {
290
  margin-bottom: 0;
291
  }
292
 
293
- .tf-sortable ul li i {
294
  float: right;
295
  background: #fcfcfc;
296
  display: inline-block;
@@ -302,21 +302,21 @@
302
  color: #777;
303
  }
304
 
305
- .tf-sortable ul li i.visibility {
306
  cursor: pointer;
307
  }
308
 
309
- .tf-sortable ul li i:last-of-type {
310
  margin-left: 50px;
311
  }
312
 
313
- .tf-sortable li.tf-invisible {
314
  color: #ccc;
315
  background: transparent;
316
  }
317
 
318
  /* 2.13 - number slider */
319
- .tf-number .ui-slider-handle {
320
  position: absolute;
321
  z-index: 2;
322
  border-radius: 3px;
@@ -331,16 +331,16 @@
331
  width: 12px;
332
  }
333
 
334
- .tf-number .ui-slider a:focus {
335
  outline: none;
336
  }
337
 
338
- .tf-number .ui-slider-range {
339
  background: #eee;
340
  height: 100%;
341
  }
342
 
343
- .tf-number .number-slider {
344
  position: relative;
345
  background: #fcfcfc;
346
  border: 1px solid #ddd;
@@ -354,7 +354,7 @@
354
  }
355
 
356
  /* 2.14 - google webfont new */
357
- .tf-font label {
358
  border: 1px solid #DDD;
359
  vertical-align: middle;
360
  display: inline-block;
@@ -364,36 +364,36 @@
364
  margin-bottom: 10px;
365
  }
366
 
367
- .tf-font select {
368
  margin-left: 10px;
369
  }
370
 
371
- .tf-font .wp-picker-container {
372
  line-height: 28px;
373
  height: 28px;
374
  margin: 1px;
375
  }
376
 
377
- .tf-font .wp-picker-container > a {
378
  margin: 2px 7px 2px 10px;
379
  }
380
 
381
- .tf-font .wp-picker-container .wp-picker-default {
382
  margin: 2px 2px 2px 7px;
383
  }
384
 
385
- .tf-font iframe {
386
  width: 100%;
387
  height: 200px;
388
  background: #FCFCFC;
389
  border: 1px solid #DDD;
390
  }
391
 
392
- .tf-font div {
393
  position: relative;
394
  }
395
 
396
- .tf-font i {
397
  position: absolute;
398
  top: 0;
399
  left: 0;
@@ -405,14 +405,14 @@
405
  cursor: pointer;
406
  }
407
 
408
- .tf-font i:hover {
409
  background: #333;
410
  color: #FFF;
411
  border-bottom: 1px solid #333;
412
  border-right: 1px solid #333;
413
  }
414
 
415
- .tf-font .wp-picker-container {
416
  z-index: 9;
417
  }
418
 
@@ -421,7 +421,7 @@
421
  }
422
 
423
  /* We're using dashicons instead of font-awesome, this fixed the incompatibility */
424
- [class*=tf-] i.dashicons {
425
  height: auto;
426
  }
427
 
@@ -429,24 +429,24 @@
429
  * 2.16 - group
430
  */
431
 
432
- .tf-group .wp-color-result {
433
  margin: 0 0 -2px;
434
  }
435
- .tf-group .wp-picker-active .wp-color-result {
436
  margin: 2px 6px -2px 0;
437
  }
438
- .tf-group .wp-picker-active .wp-picker-input-wrap {
439
  margin-top: 2px;
440
  margin-bottom: -2px;
441
  }
442
- .tf-group .wp-picker-active .wp-picker-holder {
443
  margin-top: 12px;
444
  }
445
- .tf-group {
446
  padding-left: 16px;
447
  padding-right: 16px;
448
  }
449
- .tf-group > * {
450
  margin: 0 4px;
451
  display: inline-block;
452
  }
@@ -456,7 +456,7 @@
456
  * 3.0 - Enable option styles
457
  */
458
 
459
- .tf-enable input {
460
  width: 0;
461
  height: 0;
462
  overflow: hidden;
@@ -464,13 +464,13 @@
464
  z-index: -9999;
465
  position: absolute;
466
  }
467
- .tf-enable .button {
468
  -moz-user-select: none;
469
  -khtml-user-select: none;
470
  -webkit-user-select: none;
471
  user-select: none;
472
  }
473
- .tf-enable .button + .button-primary {
474
  background: #6C7A89;
475
  border-color: #56606B;
476
  -webkit-box-shadow: none;
@@ -478,24 +478,24 @@
478
  color: #fff;
479
  pointer-events: none;
480
  }
481
- .tf-enable .button-primary:first-of-type {
482
  pointer-events: none;
483
  }
484
- .tf-enable .button:first-of-type {
485
  border-top-right-radius: 0;
486
  border-bottom-right-radius: 0;
487
  }
488
- .tf-enable .button-secondary:first-of-type {
489
  -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
490
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
491
  }
492
- .tf-enable .button + .button {
493
  border-top-left-radius: 0;
494
  border-bottom-left-radius: 0;
495
  -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
496
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
497
  }
498
- .tf-upload .tf-image-preview img {
499
  margin-top: 0px;
500
  margin-left: 0px;
501
  top: 50%;
@@ -505,7 +505,7 @@
505
  -moz-transform: translateX(-50%) translateY(-50%);
506
  -ms-transform: translateX(-50%) translateY(-50%);
507
  }
508
- .tf-file-upload {
509
  min-height: 20px;
510
  padding: 10px 20px;
511
  width: 250px;
@@ -514,16 +514,16 @@
514
  cursor: pointer;
515
  position: relative;
516
  }
517
- .tf-file-upload:hover {
518
  box-shadow: inset 0 0 0 4px #EEE;
519
  }
520
- .tf-file-upload p{
521
  margin-top: 0 !important;
522
  }
523
- .tf-file-upload i{
524
  position: absolute;
525
  right: 10px;
526
  }
527
- .titan-framework-panel-wrap .wp-picker-container .iris-picker {
528
  float: left;
529
  }
30
  @import "class-option-date.css";
31
 
32
  /* note option padding issue */
33
+ .mm-note .updated p {
34
  margin-bottom: 4px;
35
  }
36
 
37
  @media screen and (min-width: 783px) {
38
+ .mm-select-googlefont iframe {
39
  width: 100%;
40
  height: 120px;
41
  background: #FFF;
42
  background: rgba(255, 255, 255, .7);
43
  margin-top: 4px;
44
  }
45
+ .mm-form-table td.mm-select-googlefont fieldset label {
46
  display: inline-block;
47
  padding-left: 20px;
48
  width: 200px;
52
  /*
53
  * 1.0 - Styles for metaboxes in the sidebar
54
  */
55
+ #side-sortables .mm-form-table,
56
+ #side-sortables .mm-form-table tbody,
57
+ #side-sortables .mm-form-table tr,
58
+ #side-sortables .mm-form-table th,
59
+ #side-sortables .mm-form-table td {
60
  display:block;
61
  }
62
 
63
+ #side-sortables .mm-form-table th {
64
  padding: 10px 0px 0px;
65
  }
66
 
67
+ #side-sortables .mm-form-table td {
68
  padding: 5px 0px;
69
  }
70
 
71
+ #side-sortables .mm-form-table td input {
72
  max-width:100%;
73
  }
74
 
75
+ #side-sortables .mm-radio-image label:first-child,
76
+ #side-sortables .mm-radio-image label {
77
  display: inline-block;
78
  margin-left: 10px;
79
  margin-top: 10px;
84
  */
85
 
86
  /* 2.2 - Tabs */
87
+ .mobmenu-settings-panel-wrap .nav-tab-wrapper { margin-bottom: 20px; }
88
 
89
  /* 2.3 - option tables */
90
+ .mobmenu-settings-panel-wrap .mm-form-table th,
91
+ .mobmenu-settings-panel-wrap .mm-form-table td {
92
  padding: 4px 20px;
93
  }
94
  /*
95
+ .mobmenu-settings-panel-wrap .mm-form-table tbody:first-child tr th:last-child,
96
+ .mobmenu-settings-panel-wrap .mm-form-table tbody:first-child tr td:last-child {
97
  border-right: 1px solid #DFDFDF;
98
  }
99
  */
100
+ .mobmenu-settings-panel-wrap .wp_themeSkin table td {
101
  padding: 0;
102
  }
103
 
104
+ .mobmenu-settings-panel-wrap .mm-form-table {
105
  margin-top: 0;
106
  }
107
 
108
+ .mobmenu-settings-panel-wrap .nav-tab-active,
109
+ .mobmenu-settings-panel-wrap .nav-tab-active:hover {
110
  background: #ffffff;
111
  border-bottom: 1px solid #ffffff;
112
  }
113
 
114
+ .mobmenu-settings-panel-wrap .mm-form-table tr {
115
  background: white;
116
  border-bottom: 1px solid #eee;
117
  padding-top: 10px;
118
  }
119
 
120
+ .mobmenu-settings-panel-wrap .mm-form-table .wp_themeSkin .mceStatusbar { padding: 0 0 0 8px; }
121
+ .mobmenu-settings-panel-wrap .mm-form-table .wp_themeSkin .mceToolbar { padding: 1px; }
122
 
123
+ .mobmenu-settings-panel-wrap p.submit {
124
  background: #FFF;
125
  margin-top: 0;
126
  margin-bottom: 0;
127
  padding: 15px 20px;
128
  border-bottom: 1px solid #eee;
129
  }
130
+ .mobmenu-settings-panel-wrap .mm-form-table + p.submit {
131
  padding: 14px 10px;
132
  background: #fff;
133
  z-index: 999999;
134
  }
135
 
136
  /* 2.4 - font options description */
137
+ .mobmenu-settings-panel-wrap .mm-font p.description,
138
+ .mobmenu-settings-panel-wrap .mm-radio p.description,
139
+ .mobmenu-settings-panel-wrap .mm-multicheck p.description {
140
  margin-bottom: 8px;
141
  }
142
 
143
  /* 2.5 - google font iframe */
144
+ .mm-select-googlefont iframe {
145
  background: #fafafa;
146
  }
147
 
148
  /* 2.6 - notifications */
149
+ .mobmenu-settings-panel-wrap div.updated,
150
+ .mobmenu-settings-panel-wrap div.error {
151
 
152
  }
153
 
154
+ .mobmenu-settings-panel-wrap h2 + div.updated,
155
+ .mobmenu-settings-panel-wrap h2 + div.error {
156
 
157
  }
158
 
159
+ .mobmenu-settings-panel-wrap h2 + div.error {
160
  }
161
 
162
  /* 2.7 - notes */
163
+ .mobmenu-settings-panel-wrap .mm-note .updated {
164
 
165
  }
166
 
167
  /* 2.8 - heading */
168
+ .mobmenu-settings-panel-wrap .mm-heading th {
169
  background: #F1F1F1;
170
  background: none repeat scroll 0 0 #F5F5F5;
171
  border-left: 1px solid #DFDFDF;
175
  color: #222222;
176
  padding: 10px 20px;
177
  }
178
+ .mobmenu-settings-panel-wrap .mm-heading h3 {
179
  margin: 0;
180
  font-size: 14px;
181
  font-weight: 600;
183
  font-family: sans-serif;
184
  text-transform: capitalize;
185
  }
186
+ .mobmenu-settings-panel-wrap .mm-heading p {
187
  font-weight: normal;
188
  margin-top: 5px;
189
  }
190
+ .mobmenu-settings-panel-wrap .mm-heading p:last-child {
191
  margin-bottom: 0;
192
  }
193
 
194
+ .mobmenu-settings-panel-wrap .options-container h2 {
195
  background: none repeat scroll 0 0 #F5F5F5;
196
  border-left: 1px solid #DFDFDF;
197
  border-top: 1px solid #DFDFDF;
205
  padding: 10px 20px;
206
  }
207
 
208
+ .mobmenu-settings-panel-wrap .options-container h2 { margin-bottom: -6px; }
209
 
210
  /* 2.9 - radio-palette */
211
+ .mm-radio-palette span {
212
  display: inline-block;
213
  height: 40px;
214
  }
215
 
216
+ .mm-radio-palette span span {
217
  width: 15px;
218
  }
219
 
220
+ .mm-radio-palette > label > span {
221
  padding: 2px;
222
  border: 1px solid #ddd;
223
  }
224
 
225
+ .mm-radio-palette input[type=radio] {
226
  vertical-align: top;
227
  margin-top: 17px;
228
  }
229
 
230
+ .mm-radio-palette label {
231
  margin: 0 30px 10px 0;
232
  display: inline-block;
233
  }
234
 
235
+ .mm-radio-palette label:first-child {
236
  margin-left: 0
237
  }
238
 
239
+ .mm-ajax-button .button + .button {
240
  margin-left: 5px;
241
  }
242
 
243
  /* 2.10 - radio images */
244
+ .mm-radio-image label {
245
  white-space: nowrap;
246
  display: inline-block;
247
  margin-right: 30px;
248
  margin-bottom: 10px;
249
  }
250
 
251
+ .mm-form-table .mm-radio-image input[type=radio] {
252
  margin-top: 0;
253
  }
254
 
255
+ .mm-radio-image img {
256
  vertical-align: middle;
257
  }
258
 
259
  /* 2.11 - code */
260
+ .mm-code > div:first-of-type {
261
  border-radius: 3px;
262
  border: 1px solid #DDD;
263
  -webkit-box-sizing: border-box;
269
  }
270
 
271
  /* 2.12 - sortable */
272
+ .mm-sortable li {
273
  cursor: move;
274
  background: #fafafa;
275
  padding: 0 0 0 15px;
278
  line-height: 40px;
279
  }
280
 
281
+ .mm-sortable ul {
282
  margin-top: 0;
283
  background: rgba(0, 0, 0, 0);
284
  border: 1px solid #EEE;
286
  display: inline-block;
287
  }
288
 
289
+ .mm-sortable ul li:last-of-type {
290
  margin-bottom: 0;
291
  }
292
 
293
+ .mm-sortable ul li i {
294
  float: right;
295
  background: #fcfcfc;
296
  display: inline-block;
302
  color: #777;
303
  }
304
 
305
+ .mm-sortable ul li i.visibility {
306
  cursor: pointer;
307
  }
308
 
309
+ .mm-sortable ul li i:last-of-type {
310
  margin-left: 50px;
311
  }
312
 
313
+ .mm-sortable li.mm-invisible {
314
  color: #ccc;
315
  background: transparent;
316
  }
317
 
318
  /* 2.13 - number slider */
319
+ .mm-number .ui-slider-handle {
320
  position: absolute;
321
  z-index: 2;
322
  border-radius: 3px;
331
  width: 12px;
332
  }
333
 
334
+ .mm-number .ui-slider a:focus {
335
  outline: none;
336
  }
337
 
338
+ .mm-number .ui-slider-range {
339
  background: #eee;
340
  height: 100%;
341
  }
342
 
343
+ .mm-number .number-slider {
344
  position: relative;
345
  background: #fcfcfc;
346
  border: 1px solid #ddd;
354
  }
355
 
356
  /* 2.14 - google webfont new */
357
+ .mm-font label {
358
  border: 1px solid #DDD;
359
  vertical-align: middle;
360
  display: inline-block;
364
  margin-bottom: 10px;
365
  }
366
 
367
+ .mm-font select {
368
  margin-left: 10px;
369
  }
370
 
371
+ .mm-font .wp-picker-container {
372
  line-height: 28px;
373
  height: 28px;
374
  margin: 1px;
375
  }
376
 
377
+ .mm-font .wp-picker-container > a {
378
  margin: 2px 7px 2px 10px;
379
  }
380
 
381
+ .mm-font .wp-picker-container .wp-picker-default {
382
  margin: 2px 2px 2px 7px;
383
  }
384
 
385
+ .mm-font iframe {
386
  width: 100%;
387
  height: 200px;
388
  background: #FCFCFC;
389
  border: 1px solid #DDD;
390
  }
391
 
392
+ .mm-font div {
393
  position: relative;
394
  }
395
 
396
+ .mm-font i {
397
  position: absolute;
398
  top: 0;
399
  left: 0;
405
  cursor: pointer;
406
  }
407
 
408
+ .mm-font i:hover {
409
  background: #333;
410
  color: #FFF;
411
  border-bottom: 1px solid #333;
412
  border-right: 1px solid #333;
413
  }
414
 
415
+ .mm-font .wp-picker-container {
416
  z-index: 9;
417
  }
418
 
421
  }
422
 
423
  /* We're using dashicons instead of font-awesome, this fixed the incompatibility */
424
+ [class*=mm-] i.dashicons {
425
  height: auto;
426
  }
427
 
429
  * 2.16 - group
430
  */
431
 
432
+ .mm-group .wp-color-result {
433
  margin: 0 0 -2px;
434
  }
435
+ .mm-group .wp-picker-active .wp-color-result {
436
  margin: 2px 6px -2px 0;
437
  }
438
+ .mm-group .wp-picker-active .wp-picker-input-wrap {
439
  margin-top: 2px;
440
  margin-bottom: -2px;
441
  }
442
+ .mm-group .wp-picker-active .wp-picker-holder {
443
  margin-top: 12px;
444
  }
445
+ .mm-group {
446
  padding-left: 16px;
447
  padding-right: 16px;
448
  }
449
+ .mm-group > * {
450
  margin: 0 4px;
451
  display: inline-block;
452
  }
456
  * 3.0 - Enable option styles
457
  */
458
 
459
+ .mm-enable input {
460
  width: 0;
461
  height: 0;
462
  overflow: hidden;
464
  z-index: -9999;
465
  position: absolute;
466
  }
467
+ .mm-enable .button {
468
  -moz-user-select: none;
469
  -khtml-user-select: none;
470
  -webkit-user-select: none;
471
  user-select: none;
472
  }
473
+ .mm-enable .button + .button-primary {
474
  background: #6C7A89;
475
  border-color: #56606B;
476
  -webkit-box-shadow: none;
478
  color: #fff;
479
  pointer-events: none;
480
  }
481
+ .mm-enable .button-primary:first-of-type {
482
  pointer-events: none;
483
  }
484
+ .mm-enable .button:first-of-type {
485
  border-top-right-radius: 0;
486
  border-bottom-right-radius: 0;
487
  }
488
+ .mm-enable .button-secondary:first-of-type {
489
  -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
490
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
491
  }
492
+ .mm-enable .button + .button {
493
  border-top-left-radius: 0;
494
  border-bottom-left-radius: 0;
495
  -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
496
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
497
  }
498
+ .mm-upload .mm-image-preview img {
499
  margin-top: 0px;
500
  margin-left: 0px;
501
  top: 50%;
505
  -moz-transform: translateX(-50%) translateY(-50%);
506
  -ms-transform: translateX(-50%) translateY(-50%);
507
  }
508
+ .mm-file-upload {
509
  min-height: 20px;
510
  padding: 10px 20px;
511
  width: 250px;
514
  cursor: pointer;
515
  position: relative;
516
  }
517
+ .mm-file-upload:hover {
518
  box-shadow: inset 0 0 0 4px #EEE;
519
  }
520
+ .mm-file-upload p{
521
  margin-top: 0 !important;
522
  }
523
+ .mm-file-upload i{
524
  position: absolute;
525
  right: 10px;
526
  }
527
+ .mobmenu-settings-panel-wrap .wp-picker-container .iris-picker {
528
  float: left;
529
  }
{options-framework → includes/plugin-settings}/css/admin-theme-customizer-styles.css RENAMED
@@ -5,53 +5,53 @@
5
  @import "class-option-font.css";
6
  @import "class-option-date.css";
7
 
8
- .tf-googlefont-area label {
9
  display: block;
10
  }
11
 
12
  /* radio-palette */
13
- .tf-radio-palette span {
14
  display: inline-block;
15
  height: 40px;
16
  }
17
- .tf-radio-palette span span {
18
  width: 15px;
19
  }
20
- .tf-radio-palette > label > span {
21
  padding: 2px;
22
  border: 1px solid #ddd;
23
  }
24
- .tf-radio-palette input[type=radio] {
25
  vertical-align: top;
26
  margin-top: 17px;
27
  }
28
- .tf-radio-palette label {
29
  margin-left: 30px;
30
  white-space: nowrap;
31
  }
32
- .tf-radio-palette label:first-child {
33
  margin-left: 0
34
  }
35
- .tf-radio-palette {
36
  margin-top: 10px;
37
  display: inline-block;
38
  margin-right: 5px;
39
  }
40
 
41
  /* radio image */
42
- .tf-radio-image img, .tf-radio-image-font-icon {
43
  vertical-align: middle;
44
  }
45
- .tf-radio-image {
46
  margin-top: 10px;
47
  display: inline-block;
48
  margin-right: 5px;
49
  }
50
- .tf-radio-image input[type=radio] {
51
  margin-top: 0;
52
  }
53
  /* code */
54
- .tf-code {
55
  border-radius: 3px;
56
  border: 1px solid #DDD;
57
  -webkit-box-sizing: border-box;
@@ -62,7 +62,7 @@
62
  font-size: 14px;
63
  }
64
  /* sortable */
65
- .tf-sortable li {
66
  cursor: move;
67
  background: #fafafa;
68
  padding: 0 0 0 15px;
@@ -70,17 +70,17 @@
70
  position: relative;
71
  line-height: 40px;
72
  }
73
- .tf-sortable ul {
74
  margin-top: 0;
75
  background: rgba(0, 0, 0, 0);
76
  border: 1px solid #EEE;
77
  padding: 5px;
78
  display: inline-block;
79
  }
80
- .tf-sortable ul li:last-of-type {
81
  margin-bottom: 0;
82
  }
83
- .tf-sortable ul li i {
84
  float: right;
85
  background: #fcfcfc;
86
  display: inline-block;
@@ -91,18 +91,18 @@
91
  text-align: center;
92
  color: #777;
93
  }
94
- .tf-sortable ul li i.visibility {
95
  cursor: pointer;
96
  }
97
- .tf-sortable ul li i:last-of-type {
98
  margin-left: 50px;
99
  }
100
- .tf-sortable li.tf-invisible {
101
  color: #ccc;
102
  background: transparent;
103
  }
104
  /* number slider */
105
- .tf-number .ui-slider-handle {
106
  position: absolute;
107
  z-index: 2;
108
  border-radius: 3px;
@@ -116,14 +116,14 @@
116
  height: 23px;
117
  width: 12px;
118
  }
119
- .tf-number .ui-slider a:focus {
120
  outline: none;
121
  }
122
- .tf-number .ui-slider-range {
123
  background: #eee;
124
  height: 100%;
125
  }
126
- .tf-number .number-slider {
127
  position: relative;
128
  background: #fcfcfc;
129
  border: 1px solid #ddd;
@@ -134,12 +134,12 @@
134
  vertical-align: middle;
135
  margin: 15px 15px 15px 0;
136
  }
137
- .tf-number input.small-text {
138
  width: 65px;
139
  vertical-align: middle;
140
  }
141
  /* google webfont new */
142
- .tf-font label {
143
  vertical-align: middle;
144
  padding: 4px 4px 4px 13px;
145
  background: transparent;
@@ -152,49 +152,49 @@
152
  line-height: 28px;
153
  border: 0;
154
  }
155
- .tf-font label.tf-picker-open {
156
  color: #fcfcfc;
157
  background: transparent;
158
  border-color: transparent;
159
  margin-left: -10px;
160
  position: relative;
161
  }
162
- .tf-font label.tf-picker-open .wp-picker-container {
163
  position: absolute;
164
  left: 10px;
165
  }
166
- .tf-font label.tf-picker-open .wp-picker-container .wp-color-result {
167
  margin-left: 0;
168
  }
169
- .tf-font select {
170
  margin-left: 10px;
171
  }
172
- .tf-font .wp-picker-container {
173
  line-height: 28px;
174
  height: 28px;
175
  margin: 1px;
176
  }
177
- .tf-font .wp-picker-container > a {
178
  margin: 2px 7px 2px 10px;
179
  }
180
- .tf-font .wp-picker-container .wp-picker-default {
181
  margin: 2px 2px 2px 7px;
182
  }
183
- .tf-font iframe {
184
  width: 100%;
185
  height: 200px;
186
  background: #FCFCFC;
187
  border: 1px solid #DDD;
188
  }
189
- .tf-font div {
190
  position: relative;
191
  }
192
- .tf-font > div {
193
  padding: 5px 0;
194
  background-color: rgba(255,255,255,.5);
195
  margin-bottom: 4px;
196
  }
197
- .tf-font i {
198
  position: absolute;
199
  top: 0;
200
  left: 0;
@@ -205,16 +205,16 @@
205
  border: 1px solid #DDD;
206
  cursor: pointer;
207
  }
208
- .tf-font i:hover {
209
  background: #333;
210
  color: #FFF;
211
  border-bottom: 1px solid #333;
212
  border-right: 1px solid #333;
213
  }
214
- .tf-font .wp-picker-container {
215
  z-index: 9;
216
  }
217
- .tf-font .tf-font-sel-family {
218
  width: 150px;
219
  }
220
 
@@ -224,7 +224,7 @@
224
  */
225
 
226
 
227
- .tf-enable input {
228
  width: 0;
229
  height: 0;
230
  overflow: hidden;
@@ -234,13 +234,13 @@
234
  border: 0;
235
  opacity: 0;
236
  }
237
- .tf-enable .button {
238
  -moz-user-select: none;
239
  -khtml-user-select: none;
240
  -webkit-user-select: none;
241
  user-select: none;
242
  }
243
- .tf-enable .button + .button-primary {
244
  background: #6C7A89;
245
  border-color: #56606B;
246
  -webkit-box-shadow: none;
@@ -248,33 +248,33 @@
248
  color: #fff;
249
  pointer-events: none;
250
  }
251
- .tf-enable .button-primary:nth-of-type(2) {
252
  pointer-events: none;
253
  }
254
- .tf-enable .button:nth-of-type(2) {
255
  border-top-right-radius: 0;
256
  border-bottom-right-radius: 0;
257
  }
258
- .tf-enable .button-secondary:nth-of-type(2) {
259
  -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
260
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
261
  }
262
- .tf-enable .button + .button {
263
  border-top-left-radius: 0;
264
  border-bottom-left-radius: 0;
265
  -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
266
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
267
  }
268
- .tf-date-datepicker.ui-widget-content {
269
  left: 270px !important;
270
  }
271
 
272
 
273
- .tf-ajax-button .button {
274
  display: block;
275
  width: 100%;
276
  }
277
- .tf-ajax-button .button + .button {
278
  margin-top: 5px;
279
  }
280
 
@@ -285,7 +285,7 @@ p.description:empty {
285
  margin-bottom: 5px;
286
  }
287
 
288
- .tf-upload .tf-image-preview img {
289
  margin-top: 0px;
290
  margin-left: 0px;
291
  top: 50%;
@@ -297,19 +297,19 @@ p.description:empty {
297
  }
298
 
299
 
300
- .tf-heading {
301
  border-top: 1px solid #dadada;
302
  background-color: #e1e1e1;
303
  padding: .5em 12px;
304
  margin: 0 -12px;
305
  border-bottom: 1px solid #ddd;
306
  }
307
- .tf-heading .description {
308
  margin: 0;
309
  color: #666;
310
  font-weight: normal;
311
  }
312
- .tf-file-upload {
313
  min-height: 20px;
314
  padding: 10px 20px;
315
  width: 215px;
@@ -318,10 +318,10 @@ p.description:empty {
318
  cursor: pointer;
319
  position: relative;
320
  }
321
- .tf-file-upload p{
322
  margin: 0 !important;
323
  }
324
- .tf-file-upload i{
325
  position: absolute;
326
  right: 10px;
327
  }
5
  @import "class-option-font.css";
6
  @import "class-option-date.css";
7
 
8
+ .mm-googlefont-area label {
9
  display: block;
10
  }
11
 
12
  /* radio-palette */
13
+ .mm-radio-palette span {
14
  display: inline-block;
15
  height: 40px;
16
  }
17
+ .mm-radio-palette span span {
18
  width: 15px;
19
  }
20
+ .mm-radio-palette > label > span {
21
  padding: 2px;
22
  border: 1px solid #ddd;
23
  }
24
+ .mm-radio-palette input[type=radio] {
25
  vertical-align: top;
26
  margin-top: 17px;
27
  }
28
+ .mm-radio-palette label {
29
  margin-left: 30px;
30
  white-space: nowrap;
31
  }
32
+ .mm-radio-palette label:first-child {
33
  margin-left: 0
34
  }
35
+ .mm-radio-palette {
36
  margin-top: 10px;
37
  display: inline-block;
38
  margin-right: 5px;
39
  }
40
 
41
  /* radio image */
42
+ .mm-radio-image img, .mm-radio-image-font-icon {
43
  vertical-align: middle;
44
  }
45
+ .mm-radio-image {
46
  margin-top: 10px;
47
  display: inline-block;
48
  margin-right: 5px;
49
  }
50
+ .mm-radio-image input[type=radio] {
51
  margin-top: 0;
52
  }
53
  /* code */
54
+ .mm-code {
55
  border-radius: 3px;
56
  border: 1px solid #DDD;
57
  -webkit-box-sizing: border-box;
62
  font-size: 14px;
63
  }
64
  /* sortable */
65
+ .mm-sortable li {
66
  cursor: move;
67
  background: #fafafa;
68
  padding: 0 0 0 15px;
70
  position: relative;
71
  line-height: 40px;
72
  }
73
+ .mm-sortable ul {
74
  margin-top: 0;
75
  background: rgba(0, 0, 0, 0);
76
  border: 1px solid #EEE;
77
  padding: 5px;
78
  display: inline-block;
79
  }
80
+ .mm-sortable ul li:last-of-type {
81
  margin-bottom: 0;
82
  }
83
+ .mm-sortable ul li i {
84
  float: right;
85
  background: #fcfcfc;
86
  display: inline-block;
91
  text-align: center;
92
  color: #777;
93
  }
94
+ .mm-sortable ul li i.visibility {
95
  cursor: pointer;
96
  }
97
+ .mm-sortable ul li i:last-of-type {
98
  margin-left: 50px;
99
  }
100
+ .mm-sortable li.mm-invisible {
101
  color: #ccc;
102
  background: transparent;
103
  }
104
  /* number slider */
105
+ .mm-number .ui-slider-handle {
106
  position: absolute;
107
  z-index: 2;
108
  border-radius: 3px;
116
  height: 23px;
117
  width: 12px;
118
  }
119
+ .mm-number .ui-slider a:focus {
120
  outline: none;
121
  }
122
+ .mm-number .ui-slider-range {
123
  background: #eee;
124
  height: 100%;
125
  }
126
+ .mm-number .number-slider {
127
  position: relative;
128
  background: #fcfcfc;
129
  border: 1px solid #ddd;
134
  vertical-align: middle;
135
  margin: 15px 15px 15px 0;
136
  }
137
+ .mm-number input.small-text {
138
  width: 65px;
139
  vertical-align: middle;
140
  }
141
  /* google webfont new */
142
+ .mm-font label {
143
  vertical-align: middle;
144
  padding: 4px 4px 4px 13px;
145
  background: transparent;
152
  line-height: 28px;
153
  border: 0;
154
  }
155
+ .mm-font label.mm-picker-open {
156
  color: #fcfcfc;
157
  background: transparent;
158
  border-color: transparent;
159
  margin-left: -10px;
160
  position: relative;
161
  }
162
+ .mm-font label.mm-picker-open .wp-picker-container {
163
  position: absolute;
164
  left: 10px;
165
  }
166
+ .mm-font label.mm-picker-open .wp-picker-container .wp-color-result {
167
  margin-left: 0;
168
  }
169
+ .mm-font select {
170
  margin-left: 10px;
171
  }
172
+ .mm-font .wp-picker-container {
173
  line-height: 28px;
174
  height: 28px;
175
  margin: 1px;
176
  }
177
+ .mm-font .wp-picker-container > a {
178
  margin: 2px 7px 2px 10px;
179
  }
180
+ .mm-font .wp-picker-container .wp-picker-default {
181
  margin: 2px 2px 2px 7px;
182
  }
183
+ .mm-font iframe {
184
  width: 100%;
185
  height: 200px;
186
  background: #FCFCFC;
187
  border: 1px solid #DDD;
188
  }
189
+ .mm-font div {
190
  position: relative;
191
  }
192
+ .mm-font > div {
193
  padding: 5px 0;
194
  background-color: rgba(255,255,255,.5);
195
  margin-bottom: 4px;
196
  }
197
+ .mm-font i {
198
  position: absolute;
199
  top: 0;
200
  left: 0;
205
  border: 1px solid #DDD;
206
  cursor: pointer;
207
  }
208
+ .mm-font i:hover {
209
  background: #333;
210
  color: #FFF;
211
  border-bottom: 1px solid #333;
212
  border-right: 1px solid #333;
213
  }
214
+ .mm-font .wp-picker-container {
215
  z-index: 9;
216
  }
217
+ .mm-font .mm-font-sel-family {
218
  width: 150px;
219
  }
220
 
224
  */
225
 
226
 
227
+ .mm-enable input {
228
  width: 0;
229
  height: 0;
230
  overflow: hidden;
234
  border: 0;
235
  opacity: 0;
236
  }
237
+ .mm-enable .button {
238
  -moz-user-select: none;
239
  -khtml-user-select: none;
240
  -webkit-user-select: none;
241
  user-select: none;
242
  }
243
+ .mm-enable .button + .button-primary {
244
  background: #6C7A89;
245
  border-color: #56606B;
246
  -webkit-box-shadow: none;
248
  color: #fff;
249
  pointer-events: none;
250
  }
251
+ .mm-enable .button-primary:nth-of-type(2) {
252
  pointer-events: none;
253
  }
254
+ .mm-enable .button:nth-of-type(2) {
255
  border-top-right-radius: 0;
256
  border-bottom-right-radius: 0;
257
  }
258
+ .mm-enable .button-secondary:nth-of-type(2) {
259
  -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
260
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
261
  }
262
+ .mm-enable .button + .button {
263
  border-top-left-radius: 0;
264
  border-bottom-left-radius: 0;
265
  -webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
266
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08);
267
  }
268
+ .mm-date-datepicker.ui-widget-content {
269
  left: 270px !important;
270
  }
271
 
272
 
273
+ .mm-ajax-button .button {
274
  display: block;
275
  width: 100%;
276
  }
277
+ .mm-ajax-button .button + .button {
278
  margin-top: 5px;
279
  }
280
 
285
  margin-bottom: 5px;
286
  }
287
 
288
+ .mm-upload .mm-image-preview img {
289
  margin-top: 0px;
290
  margin-left: 0px;
291
  top: 50%;
297
  }
298
 
299
 
300
+ .mm-heading {
301
  border-top: 1px solid #dadada;
302
  background-color: #e1e1e1;
303
  padding: .5em 12px;
304
  margin: 0 -12px;
305
  border-bottom: 1px solid #ddd;
306
  }
307
+ .mm-heading .description {
308
  margin: 0;
309
  color: #666;
310
  font-weight: normal;
311
  }
312
+ .mm-file-upload {
313
  min-height: 20px;
314
  padding: 10px 20px;
315
  width: 215px;
318
  cursor: pointer;
319
  position: relative;
320
  }
321
+ .mm-file-upload p{
322
  margin: 0 !important;
323
  }
324
+ .mm-file-upload i{
325
  position: absolute;
326
  right: 10px;
327
  }
{options-framework → includes/plugin-settings}/css/class-option-date.css RENAMED
@@ -1,19 +1,19 @@
1
  /*
2
  * Styles for Date option
3
  */
4
- .tf-date .input-date {
5
  width:12em;
6
  }
7
- .tf-date .input-date.date {
8
  width:8em;
9
  }
10
- .tf-date .input-date.time {
11
  width:5em;
12
  }
13
- .tf-date .input-date.date.time {
14
  width:12em;
15
  }
16
- .tf-date-datepicker.ui-widget-content {
17
  border: 1px solid #dfdfdf;
18
  background: #fff;
19
  color: #000;
@@ -21,7 +21,7 @@
21
  z-index: 500001 !important;
22
  padding: 10px;
23
  }
24
- .tf-date-datepicker .ui-datepicker-header {
25
  position: relative;
26
  padding: .2em 0;
27
  background-color: #F5F5F5;
@@ -31,8 +31,8 @@
31
  padding: 10px;
32
  border-bottom: 1px solid #dfdfdf;
33
  }
34
- .tf-date-datepicker .ui-datepicker-prev,
35
- .tf-date-datepicker .ui-datepicker-next {
36
  position: absolute;
37
  line-height: 1.8em;
38
  cursor: pointer;
@@ -40,15 +40,15 @@
40
  border: 0px solid transparent;
41
  top: 10px;
42
  }
43
- .tf-date-datepicker .ui-datepicker-prev span,
44
- .tf-date-datepicker .ui-datepicker-next span,
45
- .tf-date-datepicker .ui_tpicker_time_label,
46
- .tf-date-datepicker .ui_tpicker_time,
47
- .tf-date-datepicker .ui_tpicker_unit_hide {
48
  display: none;
49
  }
50
- .tf-date-datepicker .ui-datepicker-prev:before,
51
- .tf-date-datepicker .ui-datepicker-next:before {
52
  content: "\f341";
53
  position: absolute;
54
  top: 0;
@@ -71,42 +71,42 @@
71
  -webkit-font-smoothing: antialiased;
72
  -moz-osx-font-smoothing: grayscale;
73
  }
74
- .tf-date-datepicker .ui-datepicker-prev:hover:before,
75
- .tf-date-datepicker .ui-datepicker-next:hover:before {
76
  color: #000;
77
  }
78
- .tf-date-datepicker .ui-datepicker-next:before {
79
  content: "\f345";
80
  }
81
- .tf-date-datepicker .ui-datepicker-prev {
82
  left: 10px;
83
  }
84
- .tf-date-datepicker .ui-datepicker-next {
85
  right: 30px;
86
  }
87
- .tf-date-datepicker .ui-datepicker-title {
88
  margin: 0 3.3em;
89
  line-height: 1.4em;
90
  text-align: center;
91
  font-weight: 600;
92
  }
93
- .tf-date-datepicker table {
94
  width: 100%;
95
  font-size: .9em;
96
  border-collapse: collapse;
97
  margin: 0 0 .4em;
98
  }
99
- .tf-date-datepicker th {
100
  padding: .7em .3em;
101
  text-align: center;
102
  font-weight: bold;
103
  border: 0;
104
  }
105
- .tf-date-datepicker td {
106
  border: 0;
107
  padding: .2em;
108
  }
109
- .tf-date-datepicker td a {
110
  display: block;
111
  padding: .2em;
112
  text-align: right;
@@ -117,8 +117,8 @@
117
  background: #fff;
118
  border-radius: 3px;
119
  }
120
- .tf-date-datepicker .ui-datepicker-calendar .ui-state-active,
121
- .tf-date-datepicker .ui-datepicker-calendar .ui-state-hover {
122
  border-color: #999;
123
  background: #fafafa;
124
  font-weight: normal;
@@ -128,26 +128,26 @@
128
  /*
129
  * Styles for Timepicker addon
130
  */
131
- .tf-date-datepicker .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
132
- .tf-date-datepicker .ui-timepicker-div dl { text-align: left; }
133
- .tf-date-datepicker .ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
134
- .tf-date-datepicker .ui-timepicker-div dl dd { margin: 0 10px 10px 40%; }
135
- .tf-date-datepicker .ui-timepicker-div td { font-size: 90%; }
136
- .tf-date-datepicker .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
137
- /*.tf-date-datepicker .ui-timepicker-div .ui_tpicker_unit_hide{ display: none; }
138
 
139
- .tf-date-datepicker .ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input { background: none; color: inherit; border: none; outline: none; border-bottom: solid 1px #555; width: 95%; }
140
- .tf-date-datepicker .ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus { border-bottom-color: #aaa; }*/
141
 
142
- .tf-date-datepicker .ui-timepicker-rtl{ direction: rtl; }
143
- .tf-date-datepicker .ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
144
- .tf-date-datepicker .ui-timepicker-rtl dl dt{ float: right; clear: right; }
145
- .tf-date-datepicker .ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; }
146
 
147
  /*
148
  * Styles for Timepicker addon number slider
149
  */
150
- .tf-date-datepicker .ui-slider-handle {
151
  position: absolute;
152
  z-index: 2;
153
  border-radius: 3px;
@@ -162,16 +162,16 @@
162
  width: 12px;
163
  }
164
 
165
- .tf-date-datepicker .ui-slider a:focus {
166
  outline: none;
167
  }
168
 
169
- .tf-date-datepicker .ui-slider-range {
170
  background: #eee;
171
  height: 100%;
172
  }
173
 
174
- .tf-date-datepicker .ui-slider-horizontal {
175
  position: relative;
176
  background: #fcfcfc;
177
  border: 1px solid #ddd;
@@ -183,12 +183,12 @@
183
  vertical-align: bottom;
184
  margin-bottom: 6px;
185
  }
186
- .tf-date-datepicker .ui-datepicker-buttonpane {
187
  border-top:1px solid rgb(204, 204, 204);
188
  margin-left: -10px;
189
  margin-right: -10px;
190
  padding: 10px 10px 0;
191
  }
192
- .tf-date-datepicker .ui-datepicker-buttonpane .ui-priority-primary {
193
  float:right;
194
  }
1
  /*
2
  * Styles for Date option
3
  */
4
+ .mm-date .input-date {
5
  width:12em;
6
  }
7
+ .mm-date .input-date.date {
8
  width:8em;
9
  }
10
+ .mm-date .input-date.time {
11
  width:5em;
12
  }
13
+ .mm-date .input-date.date.time {
14
  width:12em;
15
  }
16
+ .mm-date-datepicker.ui-widget-content {
17
  border: 1px solid #dfdfdf;
18
  background: #fff;
19
  color: #000;
21
  z-index: 500001 !important;
22
  padding: 10px;
23
  }
24
+ .mm-date-datepicker .ui-datepicker-header {
25
  position: relative;
26
  padding: .2em 0;
27
  background-color: #F5F5F5;
31
  padding: 10px;
32
  border-bottom: 1px solid #dfdfdf;
33
  }
34
+ .mm-date-datepicker .ui-datepicker-prev,
35
+ .mm-date-datepicker .ui-datepicker-next {
36
  position: absolute;
37
  line-height: 1.8em;
38
  cursor: pointer;
40
  border: 0px solid transparent;
41
  top: 10px;
42
  }
43
+ .mm-date-datepicker .ui-datepicker-prev span,
44
+ .mm-date-datepicker .ui-datepicker-next span,
45
+ .mm-date-datepicker .ui_tpicker_time_label,
46
+ .mm-date-datepicker .ui_tpicker_time,
47
+ .mm-date-datepicker .ui_tpicker_unit_hide {
48
  display: none;
49
  }
50
+ .mm-date-datepicker .ui-datepicker-prev:before,
51
+ .mm-date-datepicker .ui-datepicker-next:before {
52
  content: "\f341";
53
  position: absolute;
54
  top: 0;
71
  -webkit-font-smoothing: antialiased;
72
  -moz-osx-font-smoothing: grayscale;
73
  }
74
+ .mm-date-datepicker .ui-datepicker-prev:hover:before,
75
+ .mm-date-datepicker .ui-datepicker-next:hover:before {
76
  color: #000;
77
  }
78
+ .mm-date-datepicker .ui-datepicker-next:before {
79
  content: "\f345";
80
  }
81
+ .mm-date-datepicker .ui-datepicker-prev {
82
  left: 10px;
83
  }
84
+ .mm-date-datepicker .ui-datepicker-next {
85
  right: 30px;
86
  }
87
+ .mm-date-datepicker .ui-datepicker-title {
88
  margin: 0 3.3em;
89
  line-height: 1.4em;
90
  text-align: center;
91
  font-weight: 600;
92
  }
93
+ .mm-date-datepicker table {
94
  width: 100%;
95
  font-size: .9em;
96
  border-collapse: collapse;
97
  margin: 0 0 .4em;
98
  }
99
+ .mm-date-datepicker th {
100
  padding: .7em .3em;
101
  text-align: center;
102
  font-weight: bold;
103
  border: 0;
104
  }
105
+ .mm-date-datepicker td {
106
  border: 0;
107
  padding: .2em;
108
  }
109
+ .mm-date-datepicker td a {
110
  display: block;
111
  padding: .2em;
112
  text-align: right;
117
  background: #fff;
118
  border-radius: 3px;
119
  }
120
+ .mm-date-datepicker .ui-datepicker-calendar .ui-state-active,
121
+ .mm-date-datepicker .ui-datepicker-calendar .ui-state-hover {
122
  border-color: #999;
123
  background: #fafafa;
124
  font-weight: normal;
128
  /*
129
  * Styles for Timepicker addon
130
  */
131
+ .mm-date-datepicker .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
132
+ .mm-date-datepicker .ui-timepicker-div dl { text-align: left; }
133
+ .mm-date-datepicker .ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
134
+ .mm-date-datepicker .ui-timepicker-div dl dd { margin: 0 10px 10px 40%; }
135
+ .mm-date-datepicker .ui-timepicker-div td { font-size: 90%; }
136
+ .mm-date-datepicker .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
137
+ /*.mm-date-datepicker .ui-timepicker-div .ui_tpicker_unit_hide{ display: none; }
138
 
139
+ .mm-date-datepicker .ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input { background: none; color: inherit; border: none; outline: none; border-bottom: solid 1px #555; width: 95%; }
140
+ .mm-date-datepicker .ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus { border-bottom-color: #aaa; }*/
141
 
142
+ .mm-date-datepicker .ui-timepicker-rtl{ direction: rtl; }
143
+ .mm-date-datepicker .ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
144
+ .mm-date-datepicker .ui-timepicker-rtl dl dt{ float: right; clear: right; }
145
+ .mm-date-datepicker .ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; }
146
 
147
  /*
148
  * Styles for Timepicker addon number slider
149
  */
150
+ .mm-date-datepicker .ui-slider-handle {
151
  position: absolute;
152
  z-index: 2;
153
  border-radius: 3px;
162
  width: 12px;
163
  }
164
 
165
+ .mm-date-datepicker .ui-slider a:focus {
166
  outline: none;
167
  }
168
 
169
+ .mm-date-datepicker .ui-slider-range {
170
  background: #eee;
171
  height: 100%;
172
  }
173
 
174
+ .mm-date-datepicker .ui-slider-horizontal {
175
  position: relative;
176
  background: #fcfcfc;
177
  border: 1px solid #ddd;
183
  vertical-align: bottom;
184
  margin-bottom: 6px;
185
  }
186
+ .mm-date-datepicker .ui-datepicker-buttonpane {
187
  border-top:1px solid rgb(204, 204, 204);
188
  margin-left: -10px;
189
  margin-right: -10px;
190
  padding: 10px 10px 0;
191
  }
192
+ .mm-date-datepicker .ui-datepicker-buttonpane .ui-priority-primary {
193
  float:right;
194
  }
{options-framework → includes/plugin-settings}/css/class-option-font.css RENAMED
@@ -1,14 +1,14 @@
1
- .tf-upload .tf-image-preview, .tf-upload .tf-image-preview:before,
2
- .tf-gallery .tf-image-preview, .tf-gallery .tf-image-preview:before,
3
- .tf-file .tf-file-upload {
4
  -webkit-transition: all .3s;
5
  -moz-transition: all .3s;
6
  -ms-transition: all .3s;
7
  -o-transition: all .3s;
8
  transition: all .3s;
9
  }
10
- .tf-upload .tf-image-preview,
11
- .tf-gallery .tf-image-preview {
12
  line-height: 0;
13
  position: relative;
14
  display: inline-block;
@@ -19,21 +19,21 @@
19
  cursor: pointer;
20
  opacity:1;
21
  }
22
- .tf-upload .tf-image-preview:hover,
23
- .tf-gallery .tf-image-preview:hover {
24
  box-shadow: inset 0 0 0 4px #EEE;
25
  }
26
- .tf-upload .tf-image-preview.has-value:before, .tf-gallery .tf-image-preview.has-value:before {
27
  opacity: 0;
28
  }
29
 
30
- .tf-gallery .tf-image-preview {
31
  display: inline-flex;
32
  margin-right: 5px;
33
  }
34
 
35
- .tf-upload .tf-image-preview:before,
36
- .tf-gallery .tf-image-preview:before {
37
  content: '\f132';
38
  font-family: 'dashicons';
39
  position: absolute;
@@ -45,16 +45,16 @@
45
  font-size: 30px;
46
  color: #ddd;
47
  }
48
- .tf-upload .tf-image-preview:hover:before,
49
- .tf-gallery .tf-image-preview:hover:before {
50
  color: #bbb;
51
  }
52
- .tf-upload .tf-image-preview i.remove:hover,
53
- .tf-gallery .tf-image-preview i.remove:hover {
54
  border-color: #999;
55
  }
56
- .tf-upload .tf-image-preview i.remove,
57
- .tf-gallery .tf-image-preview i.remove {
58
  opacity: 1;
59
  position: absolute;
60
  top: 10px;
@@ -72,8 +72,8 @@
72
  right: 0;
73
  height: auto;
74
  }
75
- .tf-upload .tf-image-preview img,
76
- .tf-gallery .tf-image-preview img {
77
  max-width: 100%;
78
  max-height: 200px;
79
  position: relative;
1
+ .mm-upload .mm-image-preview, .mm-upload .mm-image-preview:before,
2
+ .mm-gallery .mm-image-preview, .mm-gallery .mm-image-preview:before,
3
+ .mm-file .mm-file-upload {
4
  -webkit-transition: all .3s;
5
  -moz-transition: all .3s;
6
  -ms-transition: all .3s;
7
  -o-transition: all .3s;
8
  transition: all .3s;
9
  }
10
+ .mm-upload .mm-image-preview,
11
+ .mm-gallery .mm-image-preview {
12
  line-height: 0;
13
  position: relative;
14
  display: inline-block;
19
  cursor: pointer;
20
  opacity:1;
21
  }
22
+ .mm-upload .mm-image-preview:hover,
23
+ .mm-gallery .mm-image-preview:hover {
24
  box-shadow: inset 0 0 0 4px #EEE;
25
  }
26
+ .mm-upload .mm-image-preview.has-value:before, .mm-gallery .mm-image-preview.has-value:before {
27
  opacity: 0;
28
  }
29
 
30
+ .mm-gallery .mm-image-preview {
31
  display: inline-flex;
32
  margin-right: 5px;
33
  }
34
 
35
+ .mm-upload .mm-image-preview:before,
36
+ .mm-gallery .mm-image-preview:before {
37
  content: '\f132';
38
  font-family: 'dashicons';
39
  position: absolute;
45
  font-size: 30px;
46
  color: #ddd;
47
  }
48
+ .mm-upload .mm-image-preview:hover:before,
49
+ .mm-gallery .mm-image-preview:hover:before {
50
  color: #bbb;
51
  }
52
+ .mm-upload .mm-image-preview i.remove:hover,
53
+ .mm-gallery .mm-image-preview i.remove:hover {
54
  border-color: #999;
55
  }
56
+ .mm-upload .mm-image-preview i.remove,
57
+ .mm-gallery .mm-image-preview i.remove {
58
  opacity: 1;
59
  position: absolute;
60
  top: 10px;
72
  right: 0;
73
  height: auto;
74
  }
75
+ .mm-upload .mm-image-preview img,
76
+ .mm-gallery .mm-image-preview img {
77
  max-width: 100%;
78
  max-height: 200px;
79
  position: relative;
{options-framework → includes/plugin-settings}/css/class-option-select.css RENAMED
@@ -4,10 +4,10 @@ WordPress Style for Select2 4.0.0
4
  http://select2.github.io/select2/
5
  ==========================================================================
6
  */
7
- .tf-select2 {
8
  width: 25em;
9
  }
10
- .customize-control .tf-select select {
11
  width: 100%;
12
  }
13
  .select2-container {
4
  http://select2.github.io/select2/
5
  ==========================================================================
6
  */
7
+ .mm-select2 {
8
  width: 25em;
9
  }
10
+ .customize-control .mm-select select {
11
  width: 100%;
12
  }
13
  .select2-container {
{options-framework → includes/plugin-settings}/css/select2/select2.min.css RENAMED
File without changes
{options-framework → includes/plugin-settings}/inc/scssphp/LICENSE.md RENAMED
File without changes
{options-framework → includes/plugin-settings}/inc/scssphp/README.md RENAMED
File without changes
{options-framework → includes/plugin-settings}/inc/scssphp/composer.json RENAMED
File without changes
{options-framework → includes/plugin-settings}/inc/scssphp/scss.inc.php RENAMED
@@ -40,7 +40,7 @@
40
  *
41
  * @author Leaf Corcoran <leafot@gmail.com>
42
  */
43
- class titanscssc {
44
  static public $VERSION = "v0.0.9";
45
  static protected $operatorNames = array(
46
  '+' => "add",
@@ -79,7 +79,7 @@ class titanscssc {
79
  protected $importCache = array();
80
  protected $userFunctions = array();
81
  protected $numberPrecision = 5;
82
- protected $formatter = "titanscss_formatter_nested";
83
  public function compile($code, $name=null) {
84
  $this->indentLevel = -1;
85
  $this->commentsSeen = array();
@@ -88,7 +88,7 @@ class titanscssc {
88
  $locale = setlocale(LC_NUMERIC, 0);
89
  setlocale(LC_NUMERIC, "C");
90
  $this->parsedFiles = array();
91
- $this->parser = new titanscss_parser($name);
92
  $tree = $this->parser->parse($code);
93
  $this->formatter = new $this->formatter();
94
  $this->env = null;
@@ -1299,7 +1299,7 @@ class titanscssc {
1299
  $tree = $this->importCache[$realPath];
1300
  } else {
1301
  $code = file_get_contents($path);
1302
- $parser = new titanscss_parser($path, false);
1303
  $tree = $parser->parse($code);
1304
  $this->parsedFiles[] = $path;
1305
  $this->importCache[$realPath] = $tree;
@@ -2170,7 +2170,7 @@ class titanscssc {
2170
  *
2171
  * @author Leaf Corcoran <leafot@gmail.com>
2172
  */
2173
- class titanscss_parser {
2174
  static protected $precedence = array(
2175
  "or" => 0,
2176
  "and" => 1,
@@ -2208,7 +2208,7 @@ class titanscss_parser {
2208
  }
2209
  }
2210
  static protected function makeOperatorStr($operators) {
2211
- return '('.implode('|', array_map(array('titanscss_parser','preg_quote'),
2212
  $operators)).')';
2213
  }
2214
  public function parse($buffer) {
@@ -3150,7 +3150,7 @@ class titanscss_parser {
3150
  $s = $this->seek();
3151
  // self
3152
  if ($this->literal("&", false)) {
3153
- $parts[] = titanscssc::$selfSelector;
3154
  continue;
3155
  }
3156
  if ($this->literal(".", false)) {
@@ -3415,7 +3415,7 @@ class titanscss_parser {
3415
  *
3416
  * @author Leaf Corcoran <leafot@gmail.com>
3417
  */
3418
- class titanscss_formatter {
3419
  public $indentChar = " ";
3420
  public $break = "\n";
3421
  public $open = " {";
@@ -3469,7 +3469,7 @@ class titanscss_formatter {
3469
  *
3470
  * @author Leaf Corcoran <leafot@gmail.com>
3471
  */
3472
- class titanscss_formatter_nested extends titanscss_formatter {
3473
  public $close = " }";
3474
  // adjust the depths of all children, depth first
3475
  public function adjustAllChildren($block) {
@@ -3548,7 +3548,7 @@ class titanscss_formatter_nested extends titanscss_formatter {
3548
  *
3549
  * @author Leaf Corcoran <leafot@gmail.com>
3550
  */
3551
- class titanscss_formatter_compressed extends titanscss_formatter {
3552
  public $open = "{";
3553
  public $tagSeparator = ",";
3554
  public $assignSeparator = ":";
@@ -3557,167 +3557,3 @@ class titanscss_formatter_compressed extends titanscss_formatter {
3557
  return "";
3558
  }
3559
  }
3560
- /**
3561
- * SCSS server
3562
- *
3563
- * @author Leaf Corcoran <leafot@gmail.com>
3564
- */
3565
- class titanscss_server {
3566
- /**
3567
- * Join path components
3568
- *
3569
- * @param string $left Path component, left of the directory separator
3570
- * @param string $right Path component, right of the directory separator
3571
- *
3572
- * @return string
3573
- */
3574
- protected function join($left, $right) {
3575
- return rtrim($left, '/\\') . DIRECTORY_SEPARATOR . ltrim($right, '/\\');
3576
- }
3577
- /**
3578
- * Get name of requested .scss file
3579
- *
3580
- * @return string|null
3581
- */
3582
- protected function inputName() {
3583
- switch (true) {
3584
- case isset($_GET['p']):
3585
- return $_GET['p'];
3586
- case isset($_SERVER['PATH_INFO']):
3587
- return $_SERVER['PATH_INFO'];
3588
- case isset($_SERVER['DOCUMENT_URI']):
3589
- return substr($_SERVER['DOCUMENT_URI'], strlen($_SERVER['SCRIPT_NAME']));
3590
- }
3591
- }
3592
- /**
3593
- * Get path to requested .scss file
3594
- *
3595
- * @return string
3596
- */
3597
- protected function findInput() {
3598
- if (($input = $this->inputName())
3599
- && strpos($input, '..') === false
3600
- && substr($input, -5) === '.scss'
3601
- ) {
3602
- $name = $this->join($this->dir, $input);
3603
- if (is_file($name) && is_readable($name)) {
3604
- return $name;
3605
- }
3606
- }
3607
- return false;
3608
- }
3609
- /**
3610
- * Get path to cached .css file
3611
- *
3612
- * @return string
3613
- */
3614
- protected function cacheName($fname) {
3615
- return $this->join($this->cacheDir, md5($fname) . '.css');
3616
- }
3617
- /**
3618
- * Get path to cached imports
3619
- *
3620
- * @return string
3621
- */
3622
- protected function importsCacheName($out) {
3623
- return $out . '.imports';
3624
- }
3625
- /**
3626
- * Determine whether .scss file needs to be re-compiled.
3627
- *
3628
- * @param string $in Input path
3629
- * @param string $out Output path
3630
- *
3631
- * @return boolean True if compile required.
3632
- */
3633
- protected function needsCompile($in, $out) {
3634
- if (!is_file($out)) return true;
3635
- $mtime = filemtime($out);
3636
- if (filemtime($in) > $mtime) return true;
3637
- // look for modified imports
3638
- $icache = $this->importsCacheName($out);
3639
- if (is_readable($icache)) {
3640
- $imports = unserialize(file_get_contents($icache));
3641
- foreach ($imports as $import) {
3642
- if (filemtime($import) > $mtime) return true;
3643
- }
3644
- }
3645
- return false;
3646
- }
3647
- /**
3648
- * Compile .scss file
3649
- *
3650
- * @param string $in Input path (.scss)
3651
- * @param string $out Output path (.css)
3652
- *
3653
- * @return string
3654
- */
3655
- protected function compile($in, $out) {
3656
- $start = microtime(true);
3657
- $css = $this->scss->compile(file_get_contents($in), $in);
3658
- $elapsed = round((microtime(true) - $start), 4);
3659
- $v = titanscssc::$VERSION;
3660
- $t = date('r');
3661
- $css = "/* compiled by scssphp $v on $t (${elapsed}s) */\n\n" . $css;
3662
- file_put_contents($out, $css);
3663
- file_put_contents($this->importsCacheName($out),
3664
- serialize($this->scss->getParsedFiles()));
3665
- return $css;
3666
- }
3667
- /**
3668
- * Compile requested scss and serve css. Outputs HTTP response.
3669
- *
3670
- * @param string $salt Prefix a string to the filename for creating the cache name hash
3671
- */
3672
- public function serve($salt = '') {
3673
- if ($input = $this->findInput()) {
3674
- $output = $this->cacheName($salt . $input);
3675
- header('Content-type: text/css');
3676
- if ($this->needsCompile($input, $output)) {
3677
- try {
3678
- echo $this->compile($input, $output);
3679
- } catch (Exception $e) {
3680
- header('HTTP/1.1 500 Internal Server Error');
3681
- echo 'Parse error: ' . $e->getMessage() . "\n";
3682
- }
3683
- } else {
3684
- header('X-SCSS-Cache: true');
3685
- echo file_get_contents($output);
3686
- }
3687
- return;
3688
- }
3689
- header('HTTP/1.0 404 Not Found');
3690
- header('Content-type: text');
3691
- $v = titanscssc::$VERSION;
3692
- echo "/* INPUT NOT FOUND scss $v */\n";
3693
- }
3694
- /**
3695
- * Constructor
3696
- *
3697
- * @param string $dir Root directory to .scss files
3698
- * @param string $cacheDir Cache directory
3699
- * @param \scssc|null $scss SCSS compiler instance
3700
- */
3701
- public function __construct($dir, $cacheDir=null, $scss=null) {
3702
- $this->dir = $dir;
3703
- if (is_null($cacheDir)) {
3704
- $cacheDir = $this->join($dir, 'scss_cache');
3705
- }
3706
- $this->cacheDir = $cacheDir;
3707
- if (!is_dir($this->cacheDir)) mkdir($this->cacheDir, 0755, true);
3708
- if (is_null($scss)) {
3709
- $scss = new titanscssc();
3710
- $scss->setImportPaths($this->dir);
3711
- }
3712
- $this->scss = $scss;
3713
- }
3714
- /**
3715
- * Helper method to serve compiled scss
3716
- *
3717
- * @param string $path Root path
3718
- */
3719
- static public function serveFrom($path) {
3720
- $server = new self($path);
3721
- $server->serve();
3722
- }
3723
- }
40
  *
41
  * @author Leaf Corcoran <leafot@gmail.com>
42
  */
43
+ class mobmenuscssc {
44
  static public $VERSION = "v0.0.9";
45
  static protected $operatorNames = array(
46
  '+' => "add",
79
  protected $importCache = array();
80
  protected $userFunctions = array();
81
  protected $numberPrecision = 5;
82
+ protected $formatter = "mobmenuscss_formatter_nested";
83
  public function compile($code, $name=null) {
84
  $this->indentLevel = -1;
85
  $this->commentsSeen = array();
88
  $locale = setlocale(LC_NUMERIC, 0);
89
  setlocale(LC_NUMERIC, "C");
90
  $this->parsedFiles = array();
91
+ $this->parser = new mobmenuscss_parser($name);
92
  $tree = $this->parser->parse($code);
93
  $this->formatter = new $this->formatter();
94
  $this->env = null;
1299
  $tree = $this->importCache[$realPath];
1300
  } else {
1301
  $code = file_get_contents($path);
1302
+ $parser = new mobmenuscss_parser($path, false);
1303
  $tree = $parser->parse($code);
1304
  $this->parsedFiles[] = $path;
1305
  $this->importCache[$realPath] = $tree;
2170
  *
2171
  * @author Leaf Corcoran <leafot@gmail.com>
2172
  */
2173
+ class mobmenuscss_parser {
2174
  static protected $precedence = array(
2175
  "or" => 0,
2176
  "and" => 1,
2208
  }
2209
  }
2210
  static protected function makeOperatorStr($operators) {
2211
+ return '('.implode('|', array_map(array('mobmenuscss_parser','preg_quote'),
2212
  $operators)).')';
2213
  }
2214
  public function parse($buffer) {
3150
  $s = $this->seek();
3151
  // self
3152
  if ($this->literal("&", false)) {
3153
+ $parts[] = mobmenuscssc::$selfSelector;
3154
  continue;
3155
  }
3156
  if ($this->literal(".", false)) {
3415
  *
3416
  * @author Leaf Corcoran <leafot@gmail.com>
3417
  */
3418
+ class mobmenuscss_formatter {
3419
  public $indentChar = " ";
3420
  public $break = "\n";
3421
  public $open = " {";
3469
  *
3470
  * @author Leaf Corcoran <leafot@gmail.com>
3471
  */
3472
+ class mobmenuscss_formatter_nested extends mobmenuscss_formatter {
3473
  public $close = " }";
3474
  // adjust the depths of all children, depth first
3475
  public function adjustAllChildren($block) {
3548
  *
3549
  * @author Leaf Corcoran <leafot@gmail.com>
3550
  */
3551
+ class mobmenuscss_formatter_compressed extends mobmenuscss_formatter {
3552
  public $open = "{";
3553
  public $tagSeparator = ",";
3554
  public $assignSeparator = ":";
3557
  return "";
3558
  }
3559
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
{options-framework → includes/plugin-settings}/js/admin-styling.js RENAMED
@@ -3,7 +3,7 @@ jQuery(document).ready(function($) {
3
 
4
  // Removes the last blank table in admin pages. This is because a blank table is left if the last
5
  // option is a save option
6
- $('.titan-framework-panel-wrap table.form-table').filter(function() {
7
  return $(this).find('tbody tr').length === 0;
8
  }).remove();
9
  });
3
 
4
  // Removes the last blank table in admin pages. This is because a blank table is left if the last
5
  // option is a save option
6
+ $('.mobmenu-settings-panel-wrap table.form-table').filter(function() {
7
  return $(this).find('tbody tr').length === 0;
8
  }).remove();
9
  });
{options-framework → includes/plugin-settings}/js/dev/admin-styling.js RENAMED
@@ -3,7 +3,7 @@ jQuery(document).ready(function($) {
3
 
4
  // Removes the last blank table in admin pages. This is because a blank table is left if the last
5
  // option is a save option
6
- $('.titan-framework-panel-wrap table.form-table').filter(function() {
7
  return $(this).find('tbody tr').length === 0;
8
  }).remove();
9
  });
3
 
4
  // Removes the last blank table in admin pages. This is because a blank table is left if the last
5
  // option is a save option
6
+ $('.mobmenu-settings-panel-wrap table.form-table').filter(function() {
7
  return $(this).find('tbody tr').length === 0;
8
  }).remove();
9
  });
{options-framework → includes/plugin-settings}/js/dev/jquery-ui-timepicker-addon.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/dev/serialize.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/dev/wp-color-picker-alpha.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/jquery-ui-timepicker-addon.js RENAMED
File without changes
includes/plugin-settings/js/min/admin-styling-min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(document).ready(function(t){"use strict";t(".mobmenu-settings-panel-wrap table.form-table").filter(function(){return 0===t(this).find("tbody tr").length}).remove()});
{options-framework → includes/plugin-settings}/js/min/jquery-ui-timepicker-addon-min.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/min/serialize-min.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/min/wp-color-picker-alpha-min.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/multicheck-select-all.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/select2/select2.min.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/serialize.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/js/wp-color-picker-alpha.js RENAMED
File without changes
{options-framework → includes/plugin-settings}/lib/class-admin-notification.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkAdminNotification {
6
 
7
  function __construct() {
8
  add_filter( 'admin_notices', array( $this, 'displayNotifications' ) );
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuAdminNotification {
6
 
7
  function __construct() {
8
  add_filter( 'admin_notices', array( $this, 'displayNotifications' ) );
{options-framework → includes/plugin-settings}/lib/class-admin-page.php RENAMED
@@ -5,7 +5,7 @@ if ( !defined( 'ABSPATH' ) ) {
5
  // Exit if accessed directly
6
  }
7
 
8
- class TitanFrameworkAdminPage
9
  {
10
  private $defaultSettings = array(
11
  'name' => '',
@@ -135,9 +135,6 @@ class TitanFrameworkAdminPage
135
  }
136
  $message = '';
137
  $activeTab = $this->getActiveTab();
138
- /*
139
- * Save
140
- */
141
 
142
  if ( 'save' === $_POST['action'] ) {
143
  // we are in a tab.
@@ -159,37 +156,12 @@ class TitanFrameworkAdminPage
159
  }
160
  }
161
  }
162
- // Hook 'tf_pre_save_options_{namespace}' - action pre-saving.
163
- /**
164
- * Fired right before options are saved.
165
- *
166
- * @since 1.0
167
- *
168
- * @param TitanFrameworkAdminPage|TitanFrameworkMetaBox $this The container currently being saved.
169
- */
170
  $namespace = $this->getOptionNamespace();
171
- do_action( "tf_pre_save_options_{$namespace}", $this );
172
- do_action(
173
- "tf_pre_save_admin_{$namespace}",
174
- $this,
175
- $activeTab,
176
- $this->options
177
- );
178
  $this->owner->saveInternalAdminPageOptions();
179
- do_action(
180
- 'tf_save_admin_' . $this->getOptionNamespace(),
181
- $this,
182
- $activeTab,
183
- $this->options
184
- );
185
  $message = 'saved';
186
- /*
187
- * Reset
188
- */
189
  } else {
190
 
191
  if ( 'reset' === $_POST['action'] ) {
192
- // We are in a tab.
193
  if ( !empty($activeTab) ) {
194
  foreach ( $activeTab->options as $option ) {
195
  if ( !empty($option->options) ) {
@@ -218,28 +190,14 @@ class TitanFrameworkAdminPage
218
  }
219
  $option->setValue( $option->settings['default'] );
220
  }
221
- // Hook 'tf_pre_reset_options_{namespace}' - action pre-saving.
222
- do_action( 'tf_pre_reset_options_' . $this->getOptionNamespace(), $this );
223
- do_action(
224
- 'tf_pre_reset_admin_' . $this->getOptionNamespace(),
225
- $this,
226
- $activeTab,
227
- $this->options
228
- );
229
  $this->owner->saveInternalAdminPageOptions();
230
- do_action(
231
- 'tf_reset_admin_' . $this->getOptionNamespace(),
232
- $this,
233
- $activeTab,
234
- $this->options
235
- );
236
  $message = 'reset';
237
  }
238
 
239
  }
240
 
241
  if ( 'import_mobmenu_settings' !== sanitize_text_field( $_POST['action'] ) ) {
242
- do_action( 'tf_admin_options_saved_' . $this->getOptionNamespace() );
243
  }
244
  }
245
 
@@ -255,7 +213,7 @@ class TitanFrameworkAdminPage
255
  if ( !current_user_can( $this->settings['capability'] ) ) {
256
  return false;
257
  }
258
- if ( !check_admin_referer( $this->settings['id'], TF . '_nonce' ) ) {
259
  return false;
260
  }
261
  return true;
@@ -335,9 +293,14 @@ class TitanFrameworkAdminPage
335
  echo $this->settings['title'] ;
336
  ?></h2>
337
  <div class="mobmenu-header-wrap-inner">
338
- <h2><?php
339
  echo $this->settings['title'] ;
340
- ?></h2>
 
 
 
 
 
341
  <div class='mm-panel-search-bar'>
342
  <input type="text" name="mm_search_settings" id="mm_search_settings" placeholder="Search Settings">
343
  <div class="mm-search-settings-results"></div>
@@ -355,6 +318,14 @@ class TitanFrameworkAdminPage
355
  </a>
356
  </div>
357
  <div class="mm-doc-icon"><a href="https://www.wpmobilemenu.com/knowledgebase/?utm_source=plugin-settings&utm_medium=user%20website&utm_campaign=documentation-link" target="_blank"><i class="dashicons-before dashicons-admin-page"></i><span>Documentation</span></a></div>
 
 
 
 
 
 
 
 
358
  <div class="mm-version-holder">
359
  <a href="https://www.wpmobilemenu.com/features-changelog/?utm_source=wprepo-dash&utm_medium=user%20website&utm_campaign=changelog_details" target="_blank"><?php
360
  _e( "Version " . WP_MOBILE_MENU_VERSION . " </br>", 'mobile-menu' );
@@ -375,37 +346,37 @@ class TitanFrameworkAdminPage
375
  ?>
376
 
377
  <style>
378
- .tf-sortable .mm-lang-selector {
379
  background: url(<?php
380
  echo WP_MOBILE_MENU_PLUGIN_URL ;
381
  ?>/includes/assets/language-icon.png) no-repeat center top;
382
  }
383
- .tf-sortable .mm-cart-selector {
384
  background: url(<?php
385
  echo WP_MOBILE_MENU_PLUGIN_URL ;
386
  ?>/includes/assets/cart-icon.png) no-repeat center top;
387
  }
388
- .tf-sortable .mm-search-selector {
389
  background: url(<?php
390
  echo WP_MOBILE_MENU_PLUGIN_URL ;
391
  ?>/includes/assets/search-icon.png) no-repeat center top;
392
  }
393
- .tf-sortable .mm-left-menu-selector {
394
  background: url(<?php
395
  echo WP_MOBILE_MENU_PLUGIN_URL ;
396
  ?>/includes/assets/left-menu-icon.png) no-repeat center top;
397
  }
398
- .tf-sortable .mm-right-menu-selector {
399
  background: url(<?php
400
  echo WP_MOBILE_MENU_PLUGIN_URL ;
401
  ?>/includes/assets/right-menu-icon.png) no-repeat center top;
402
  }
403
- .tf-sortable .mm-logo-selector {
404
  background: url(<?php
405
  echo WP_MOBILE_MENU_PLUGIN_URL ;
406
  ?>/includes/assets/logo-icon.png) no-repeat center top;
407
  }
408
- .tf-sortable .mm-shop-filter-selector {
409
  background: url(<?php
410
  echo WP_MOBILE_MENU_PLUGIN_URL ;
411
  ?>/includes/assets/product-filter-icon.png) no-repeat center top;
@@ -420,7 +391,7 @@ class TitanFrameworkAdminPage
420
  }
421
 
422
  ?>
423
- <div class='titan-framework-panel-wrap <?php
424
  echo $plan ;
425
  ?>' >
426
  <?php
@@ -450,10 +421,10 @@ class TitanFrameworkAdminPage
450
  if ( !empty($_GET['message']) ) {
451
 
452
  if ( 'saved' === $_GET['message'] ) {
453
- echo TitanFrameworkAdminNotification::formNotification( __( 'Settings saved.', 'mobile-menu' ), esc_html( $_GET['message'] ) ) ;
454
  } else {
455
  if ( 'reset' === $_GET['message'] ) {
456
- echo TitanFrameworkAdminNotification::formNotification( __( 'Settings reset to default.', 'mobile-menu' ), esc_html( $_GET['message'] ) ) ;
457
  }
458
  }
459
 
@@ -465,13 +436,12 @@ class TitanFrameworkAdminPage
465
  }
466
  if ( $this->settings['use_form'] ) {
467
  // Security nonce verification.
468
- wp_nonce_field( $this->settings['id'], TF . '_nonce' );
469
  }
470
  ?>
471
- <table class='form-table'>
472
  <tbody>
473
  <?php
474
- do_action( 'tf_admin_page_table_start_' . $this->getOptionNamespace() );
475
  $activeTab = $this->getActiveTab();
476
 
477
  if ( !empty($activeTab) ) {
@@ -490,7 +460,6 @@ class TitanFrameworkAdminPage
490
  foreach ( $this->options as $option ) {
491
  $option->display();
492
  }
493
- do_action( 'tf_admin_page_table_end_' . $this->getOptionNamespace() );
494
  ?>
495
  </tbody>
496
  </table>
@@ -500,7 +469,6 @@ class TitanFrameworkAdminPage
500
  </form>
501
  <?php
502
  }
503
- do_action( 'tf_admin_page_end_' . $this->getOptionNamespace() );
504
  ?>
505
  <div class='options-container active-tab-<?php
506
  echo $activeTab->settings['id'] ;
@@ -511,7 +479,6 @@ class TitanFrameworkAdminPage
511
  </div>
512
 
513
  <?php
514
- do_action( 'tf_admin_page_after_' . $this->getOptionNamespace() );
515
  } else {
516
  do_action( 'mobile_menu_importer_page', $this->settings['id'] );
517
  }
@@ -520,17 +487,16 @@ class TitanFrameworkAdminPage
520
 
521
  public function createTab( $settings )
522
  {
523
- $obj = new TitanFrameworkAdminTab( $settings, $this );
524
  $this->tabs[] = $obj;
525
- do_action( 'tf_admin_tab_created_' . $this->getOptionNamespace(), $obj );
526
  return $obj;
527
  }
528
 
529
  public function createOption( $settings )
530
  {
531
- $obj = TitanFrameworkOption::factory( $settings, $this );
532
  $this->options[] = $obj;
533
- do_action( 'tf_create_option_' . $this->getOptionNamespace(), $obj );
534
  return $obj;
535
  }
536
 
5
  // Exit if accessed directly
6
  }
7
 
8
+ class MobileMenuAdminPage
9
  {
10
  private $defaultSettings = array(
11
  'name' => '',
135
  }
136
  $message = '';
137
  $activeTab = $this->getActiveTab();
 
 
 
138
 
139
  if ( 'save' === $_POST['action'] ) {
140
  // we are in a tab.
156
  }
157
  }
158
  }
 
 
 
 
 
 
 
 
159
  $namespace = $this->getOptionNamespace();
 
 
 
 
 
 
 
160
  $this->owner->saveInternalAdminPageOptions();
 
 
 
 
 
 
161
  $message = 'saved';
 
 
 
162
  } else {
163
 
164
  if ( 'reset' === $_POST['action'] ) {
 
165
  if ( !empty($activeTab) ) {
166
  foreach ( $activeTab->options as $option ) {
167
  if ( !empty($option->options) ) {
190
  }
191
  $option->setValue( $option->settings['default'] );
192
  }
 
 
 
 
 
 
 
 
193
  $this->owner->saveInternalAdminPageOptions();
 
 
 
 
 
 
194
  $message = 'reset';
195
  }
196
 
197
  }
198
 
199
  if ( 'import_mobmenu_settings' !== sanitize_text_field( $_POST['action'] ) ) {
200
+ do_action( 'mm_admin_options_saved_mobmenu' );
201
  }
202
  }
203
 
213
  if ( !current_user_can( $this->settings['capability'] ) ) {
214
  return false;
215
  }
216
+ if ( !check_admin_referer( $this->settings['id'], 'mobmenu_settings_nonce' ) ) {
217
  return false;
218
  }
219
  return true;
293
  echo $this->settings['title'] ;
294
  ?></h2>
295
  <div class="mobmenu-header-wrap-inner">
296
+ <!--<h2><?php
297
  echo $this->settings['title'] ;
298
+ ?></h2>-->
299
+ <div class="mobile-menu-logo">
300
+ <img src="<?php
301
+ echo WP_MOBILE_MENU_PLUGIN_URL . 'includes/assets/logo_mobile_menu.png' ;
302
+ ?>">
303
+ </div>
304
  <div class='mm-panel-search-bar'>
305
  <input type="text" name="mm_search_settings" id="mm_search_settings" placeholder="Search Settings">
306
  <div class="mm-search-settings-results"></div>
318
  </a>
319
  </div>
320
  <div class="mm-doc-icon"><a href="https://www.wpmobilemenu.com/knowledgebase/?utm_source=plugin-settings&utm_medium=user%20website&utm_campaign=documentation-link" target="_blank"><i class="dashicons-before dashicons-admin-page"></i><span>Documentation</span></a></div>
321
+ <div class="mm-support-icon">
322
+ <a href="#">
323
+ <i class="dashicons dashicons-admin-users "></i>
324
+ <span><?php
325
+ _e( "Support", 'mobile-menu' );
326
+ ?></span>
327
+ </a>
328
+ </div>
329
  <div class="mm-version-holder">
330
  <a href="https://www.wpmobilemenu.com/features-changelog/?utm_source=wprepo-dash&utm_medium=user%20website&utm_campaign=changelog_details" target="_blank"><?php
331
  _e( "Version " . WP_MOBILE_MENU_VERSION . " </br>", 'mobile-menu' );
346
  ?>
347
 
348
  <style>
349
+ .mm-sortable .mm-lang-selector {
350
  background: url(<?php
351
  echo WP_MOBILE_MENU_PLUGIN_URL ;
352
  ?>/includes/assets/language-icon.png) no-repeat center top;
353
  }
354
+ .mm-sortable .mm-cart-selector {
355
  background: url(<?php
356
  echo WP_MOBILE_MENU_PLUGIN_URL ;
357
  ?>/includes/assets/cart-icon.png) no-repeat center top;
358
  }
359
+ .mm-sortable .mm-search-selector {
360
  background: url(<?php
361
  echo WP_MOBILE_MENU_PLUGIN_URL ;
362
  ?>/includes/assets/search-icon.png) no-repeat center top;
363
  }
364
+ .mm-sortable .mm-left-menu-selector {
365
  background: url(<?php
366
  echo WP_MOBILE_MENU_PLUGIN_URL ;
367
  ?>/includes/assets/left-menu-icon.png) no-repeat center top;
368
  }
369
+ .mm-sortable .mm-right-menu-selector {
370
  background: url(<?php
371
  echo WP_MOBILE_MENU_PLUGIN_URL ;
372
  ?>/includes/assets/right-menu-icon.png) no-repeat center top;
373
  }
374
+ .mm-sortable .mm-logo-selector {
375
  background: url(<?php
376
  echo WP_MOBILE_MENU_PLUGIN_URL ;
377
  ?>/includes/assets/logo-icon.png) no-repeat center top;
378
  }
379
+ .mm-sortable .mm-shop-filter-selector {
380
  background: url(<?php
381
  echo WP_MOBILE_MENU_PLUGIN_URL ;
382
  ?>/includes/assets/product-filter-icon.png) no-repeat center top;
391
  }
392
 
393
  ?>
394
+ <div class='mobmenu-settings-panel-wrap <?php
395
  echo $plan ;
396
  ?>' >
397
  <?php
421
  if ( !empty($_GET['message']) ) {
422
 
423
  if ( 'saved' === $_GET['message'] ) {
424
+ echo MobileMenuAdminNotification::formNotification( __( 'Settings saved.', 'mobile-menu' ), esc_html( $_GET['message'] ) ) ;
425
  } else {
426
  if ( 'reset' === $_GET['message'] ) {
427
+ echo MobileMenuAdminNotification::formNotification( __( 'Settings reset to default.', 'mobile-menu' ), esc_html( $_GET['message'] ) ) ;
428
  }
429
  }
430
 
436
  }
437
  if ( $this->settings['use_form'] ) {
438
  // Security nonce verification.
439
+ wp_nonce_field( $this->settings['id'], 'mobmenu_settings_nonce' );
440
  }
441
  ?>
442
+ <table class='mm-form-table'>
443
  <tbody>
444
  <?php
 
445
  $activeTab = $this->getActiveTab();
446
 
447
  if ( !empty($activeTab) ) {
460
  foreach ( $this->options as $option ) {
461
  $option->display();
462
  }
 
463
  ?>
464
  </tbody>
465
  </table>
469
  </form>
470
  <?php
471
  }
 
472
  ?>
473
  <div class='options-container active-tab-<?php
474
  echo $activeTab->settings['id'] ;
479
  </div>
480
 
481
  <?php
 
482
  } else {
483
  do_action( 'mobile_menu_importer_page', $this->settings['id'] );
484
  }
487
 
488
  public function createTab( $settings )
489
  {
490
+ $obj = new MobileMenuAdminTab( $settings, $this );
491
  $this->tabs[] = $obj;
 
492
  return $obj;
493
  }
494
 
495
  public function createOption( $settings )
496
  {
497
+ $obj = MobileMenuOption::factory( $settings, $this );
498
  $this->options[] = $obj;
499
+ do_action( 'mm_create_option_mobmenu', $obj );
500
  return $obj;
501
  }
502
 
{options-framework → includes/plugin-settings}/lib/class-admin-tab.php RENAMED
@@ -5,7 +5,7 @@ if ( !defined( 'ABSPATH' ) ) {
5
  // Exit if accessed directly
6
  }
7
 
8
- class TitanFrameworkAdminTab
9
  {
10
  /**
11
  * Default settings specific for this container
@@ -36,12 +36,12 @@ class TitanFrameworkAdminTab
36
 
37
  public function createOption( $settings )
38
  {
39
- if ( !apply_filters( 'tf_create_option_continue_' . $this->owner->owner->optionNamespace, true, $settings ) ) {
40
  return null;
41
  }
42
- $obj = TitanFrameworkOption::factory( $settings, $this );
43
  $this->options[] = $obj;
44
- do_action( 'tf_create_option_' . $this->owner->owner->optionNamespace, $obj );
45
  return $obj;
46
  }
47
 
@@ -59,10 +59,37 @@ class TitanFrameworkAdminTab
59
  $options_id = '-options';
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  ?>
63
  <a href="#" data-tab-id="<?php
64
  echo $this->settings['id'] . $options_id ;
65
- ?>" class="nav-tab"><?php
 
 
66
  echo $this->settings['name'] ;
67
  echo $tab_submenus ;
68
  ?></a>
@@ -84,32 +111,24 @@ class TitanFrameworkAdminTab
84
  'url' => 'general-visibility-options',
85
  ),
86
  array(
87
- 'name' => __( 'Hide Theme Menu', 'mobile-menu' ),
88
- 'url' => 'general-hide-elements',
89
- ),
90
- array(
91
- 'name' => __( 'Miscellaneous Options', 'mobile-menu' ),
92
- 'url' => 'general-misc-options',
93
  ),
94
  array(
95
- 'name' => __( 'Advanced Options', 'mobile-menu' ),
96
- 'url' => 'general-advanced-options',
97
  ),
98
  array(
99
- 'name' => __( 'Font Options', 'mobile-menu' ),
100
- 'url' => 'font-options',
101
  ),
102
  array(
103
  'name' => __( 'Import and Export', 'mobile-menu' ),
104
- 'url' => 'general-import-export',
105
- ),
106
- array(
107
- 'name' => __( 'Alerts', 'mobile-menu' ),
108
- 'url' => 'general-alerts',
109
  )
110
  );
111
  $header_arr = array( array(
112
- 'name' => __( 'Header Options', 'mobile-menu' ),
113
  'url' => 'header-options',
114
  ), array(
115
  'name' => __( 'Logo', 'mobile-menu' ),
@@ -126,16 +145,6 @@ class TitanFrameworkAdminTab
126
  'name' => __( 'Right Panel', 'mobile-menu' ),
127
  'url' => 'right-panel-options',
128
  ) );
129
- $left_menu_arr = array( array(
130
- 'name' => __( 'Main Options', 'mobile-menu' ),
131
- 'url' => 'left-menu-options',
132
- ), array(
133
- 'name' => __( 'Menu Icon', 'mobile-menu' ),
134
- 'url' => 'left-menu-icon',
135
- ), array(
136
- 'name' => __( 'Left Panel', 'mobile-menu' ),
137
- 'url' => 'left-panel-options',
138
- ) );
139
  $colors_arr = array(
140
  array(
141
  'name' => __( 'General', 'mobile-menu' ),
@@ -152,12 +161,18 @@ class TitanFrameworkAdminTab
152
  array(
153
  'name' => __( 'Right Menu', 'mobile-menu' ),
154
  'url' => 'right-menu-colors',
155
- ),
156
- array(
157
- 'name' => __( '3rd Level Menu', 'mobile-menu' ),
158
- 'url' => '3rd-level-menu-colors',
159
  )
160
  );
 
 
 
 
 
 
 
 
 
 
161
  // Define the settings submenu.
162
  $submenu_options = array(
163
  'general-options' => $general_options_arr,
5
  // Exit if accessed directly
6
  }
7
 
8
+ class MobileMenuAdminTab
9
  {
10
  /**
11
  * Default settings specific for this container
36
 
37
  public function createOption( $settings )
38
  {
39
+ if ( !apply_filters( 'mm_create_option_continue_mobmenu', true, $settings ) ) {
40
  return null;
41
  }
42
+ $obj = MobileMenuOption::factory( $settings, $this );
43
  $this->options[] = $obj;
44
+ do_action( 'mm_create_option_mobmenu', $obj );
45
  return $obj;
46
  }
47
 
59
  $options_id = '-options';
60
  }
61
 
62
+ switch ( $this->settings['name'] ) {
63
+ case 'General Options':
64
+ $mm_nav_icon = 'dashicons-admin-generic';
65
+ break;
66
+ case 'WooCommerce':
67
+ $mm_nav_icon = 'dashicons-cart';
68
+ break;
69
+ case 'Left Menu':
70
+ $mm_nav_icon = 'dashicons-align-pull-left';
71
+ break;
72
+ case 'Right Menu':
73
+ $mm_nav_icon = 'dashicons-align-pull-right';
74
+ break;
75
+ case 'Header':
76
+ $mm_nav_icon = 'dashicons-align-pull-left rotate-90-cw';
77
+ break;
78
+ case 'Footer':
79
+ $mm_nav_icon = 'dashicons-align-pull-left rotate-90-ccw';
80
+ break;
81
+ case 'Colors':
82
+ $mm_nav_icon = 'dashicons-admin-customizer';
83
+ break;
84
+ default:
85
+ $mm_nav_icon = '';
86
+ }
87
  ?>
88
  <a href="#" data-tab-id="<?php
89
  echo $this->settings['id'] . $options_id ;
90
+ ?>" class="nav-tab"><span class="dashicons <?php
91
+ echo $mm_nav_icon ;
92
+ ?>"></span><?php
93
  echo $this->settings['name'] ;
94
  echo $tab_submenus ;
95
  ?></a>
111
  'url' => 'general-visibility-options',
112
  ),
113
  array(
114
+ 'name' => __( 'Font Options', 'mobile-menu' ),
115
+ 'url' => 'font-options',
 
 
 
 
116
  ),
117
  array(
118
+ 'name' => __( 'Alerts', 'mobile-menu' ),
119
+ 'url' => 'general-alerts',
120
  ),
121
  array(
122
+ 'name' => __( 'Advanced options', 'mobile-menu' ),
123
+ 'url' => 'advanced-options',
124
  ),
125
  array(
126
  'name' => __( 'Import and Export', 'mobile-menu' ),
127
+ 'url' => 'advanced-import-export',
 
 
 
 
128
  )
129
  );
130
  $header_arr = array( array(
131
+ 'name' => __( 'Main Options', 'mobile-menu' ),
132
  'url' => 'header-options',
133
  ), array(
134
  'name' => __( 'Logo', 'mobile-menu' ),
145
  'name' => __( 'Right Panel', 'mobile-menu' ),
146
  'url' => 'right-panel-options',
147
  ) );
 
 
 
 
 
 
 
 
 
 
148
  $colors_arr = array(
149
  array(
150
  'name' => __( 'General', 'mobile-menu' ),
161
  array(
162
  'name' => __( 'Right Menu', 'mobile-menu' ),
163
  'url' => 'right-menu-colors',
 
 
 
 
164
  )
165
  );
166
+ $left_menu_arr = array( array(
167
+ 'name' => __( 'Main Options', 'mobile-menu' ),
168
+ 'url' => 'left-menu-options',
169
+ ), array(
170
+ 'name' => __( 'Menu Icon', 'mobile-menu' ),
171
+ 'url' => 'left-menu-icon',
172
+ ), array(
173
+ 'name' => __( 'Left Panel', 'mobile-menu' ),
174
+ 'url' => 'left-panel-options',
175
+ ) );
176
  // Define the settings submenu.
177
  $submenu_options = array(
178
  'general-options' => $general_options_arr,
{options-framework → includes/plugin-settings}/lib/class-meta-box.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkMetaBox {
6
 
7
  private $defaultSettings = array(
8
  'name' => '', // Name of the menu item
@@ -83,14 +83,14 @@ class TitanFrameworkMetaBox {
83
  }
84
  $this->postID = $post->ID;
85
 
86
- wp_nonce_field( $this->settings['id'], TF . '_' . $this->settings['id'] . '_nonce' );
87
 
88
  if ( ! empty( $this->settings['desc'] ) ) {
89
  ?><p class='description'><?php echo $this->settings['desc'] ?></p><?php
90
  }
91
 
92
  ?>
93
- <table class="form-table tf-form-table">
94
  <tbody>
95
  <?php
96
  foreach ( $this->options as $option ) {
@@ -111,7 +111,6 @@ class TitanFrameworkMetaBox {
111
 
112
  /** This action is documented in class-admin-page.php */
113
  $namespace = $this->owner->optionNamespace;
114
- do_action( "tf_pre_save_options_{$namespace}", $this );
115
 
116
  // Save the options one by one
117
  foreach ( $this->options as $option ) {
@@ -171,7 +170,7 @@ class TitanFrameworkMetaBox {
171
  }
172
 
173
  // Verify our nonce
174
- if ( ! check_admin_referer( $this->settings['id'], TF . '_' . $this->settings['id'] . '_nonce' ) ) {
175
  return false;
176
  }
177
 
@@ -198,14 +197,14 @@ class TitanFrameworkMetaBox {
198
  }
199
 
200
  public function createOption( $settings ) {
201
- if ( ! apply_filters( 'tf_create_option_continue_' . $this->owner->optionNamespace, true, $settings ) ) {
202
  return null;
203
  }
204
 
205
- $obj = TitanFrameworkOption::factory( $settings, $this );
206
  $this->options[] = $obj;
207
 
208
- do_action( 'tf_create_option_' . $this->owner->optionNamespace, $obj );
209
 
210
  return $obj;
211
  }
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuMetaBox {
6
 
7
  private $defaultSettings = array(
8
  'name' => '', // Name of the menu item
83
  }
84
  $this->postID = $post->ID;
85
 
86
+ wp_nonce_field( $this->settings['id'], 'mobmenu_settings' . '_' . $this->settings['id'] . '_nonce' );
87
 
88
  if ( ! empty( $this->settings['desc'] ) ) {
89
  ?><p class='description'><?php echo $this->settings['desc'] ?></p><?php
90
  }
91
 
92
  ?>
93
+ <table class="form-table mm-form-table">
94
  <tbody>
95
  <?php
96
  foreach ( $this->options as $option ) {
111
 
112
  /** This action is documented in class-admin-page.php */
113
  $namespace = $this->owner->optionNamespace;
 
114
 
115
  // Save the options one by one
116
  foreach ( $this->options as $option ) {
170
  }
171
 
172
  // Verify our nonce
173
+ if ( ! check_admin_referer( $this->settings['id'], 'mobmenu_settings' . '_' . $this->settings['id'] . '_nonce' ) ) {
174
  return false;
175
  }
176
 
197
  }
198
 
199
  public function createOption( $settings ) {
200
+ if ( ! apply_filters( 'mm_create_option_continue_mobmenu', true, $settings ) ) {
201
  return null;
202
  }
203
 
204
+ $obj = MobileMenuOption::factory( $settings, $this );
205
  $this->options[] = $obj;
206
 
207
+ do_action( 'mm_create_option_mobmenu', $obj );
208
 
209
  return $obj;
210
  }
options-framework/lib/class-titan-framework.php → includes/plugin-settings/lib/class-mobile-menu-options.php RENAMED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
- * Titan Framework class
4
  *
5
- * @package Titan Framework
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
@@ -10,14 +9,13 @@ if ( ! defined( 'ABSPATH' ) ) {
10
  }
11
 
12
  /**
13
- * TitanFramework class
14
  *
15
- * @since 1.0
16
  */
17
- class TitanFramework {
18
 
19
  /**
20
- * All TitanFramework instances
21
  *
22
  * @var array
23
  */
@@ -41,15 +39,15 @@ class TitanFramework {
41
  /**
42
  * All main containers (admin pages, meta boxes, customizer section)
43
  *
44
- * @var array of TitanFrameworkAdminPage, TitanFrameworkMetaBox
45
  */
46
  private $mainContainers = array();
47
 
48
  /**
49
  * All Google Font options used. This is for enqueuing Google Fonts for the frontend
50
- * TODO Move this to the TitanFrameworkOptionSelectGooglefont class and let it enqueue from there
51
  *
52
- * @var array TitanFrameworkOptionSelectGooglefont
53
  */
54
  private $googleFontsOptions = array();
55
 
@@ -61,18 +59,12 @@ class TitanFramework {
61
  * @see removeOption()
62
  */
63
  private $optionsToRemove = array();
64
-
65
- /**
66
- * Holds the values of all admin (page & tab) options. We need this since
67
- *
68
- * @var array of TitanFrameworkOption
69
- */
70
  private $adminOptions;
71
 
72
  /**
73
  * The CSS class instance used
74
  *
75
- * @var TitanFrameworkCSS
76
  */
77
  public $cssInstance;
78
 
@@ -97,18 +89,14 @@ class TitanFramework {
97
  * @var array
98
  */
99
  private $defaultSettings = array(
100
- 'css' => 'generate', // If 'generate', Titan will try and generate a cacheable.
101
  );
102
 
103
-
104
  /**
105
- * Gets an instance of the framework for the namespace
106
- *
107
- * @since 1.0
108
  *
109
  * @param string $optionNamespace The namespace to get options from.
110
  *
111
- * @return TitanFramework
112
  */
113
  public static function getInstance( $optionNamespace ) {
114
 
@@ -121,18 +109,17 @@ class TitanFramework {
121
  }
122
  }
123
 
124
- $newInstance = new TitanFramework( $optionNamespace );
125
  self::$instances[] = $newInstance;
126
  return $newInstance;
127
  }
128
 
129
 
130
  /**
131
- * Gets all active instances of Titan Framework
132
  *
133
- * @since 1.9.2
134
  *
135
- * @return array An array of TitanFramework objects
136
  */
137
  public static function getAllInstances() {
138
  return self::$instances;
@@ -140,9 +127,7 @@ class TitanFramework {
140
 
141
 
142
  /**
143
- * Creates a new TitanFramework object
144
- *
145
- * @since 1.0
146
  *
147
  * @param string $optionNamespace The namespace to get options from.
148
  */
@@ -155,28 +140,19 @@ class TitanFramework {
155
  $optionNamespace = str_replace( ' ', '-', trim( strtolower( $optionNamespace ) ) );
156
 
157
  $this->optionNamespace = $optionNamespace;
158
- $this->settings = $this->defaultSettings;
159
-
160
- do_action( 'tf_init_' . $this->optionNamespace, $this );
161
-
162
- $this->cssInstance = new TitanFrameworkCSS( $this );
163
 
164
  add_action( 'admin_enqueue_scripts', array( $this, 'loadAdminScripts' ) );
165
- add_action( 'tf_create_option_' . $this->optionNamespace, array( $this, 'rememberAllOptions' ) );
166
- //add_filter( 'tf_create_option_continue_' . $this->optionNamespace, array( $this, 'removeChildThemeOptions' ), 10, 2 );
167
-
168
- // Create a save option filter for customizer options.
169
- add_filter( 'pre_update_option', array( $this, 'addCustomizerSaveFilter' ), 10, 3 );
170
  }
171
 
172
-
173
  /**
174
  * Action hook on tf_create_option to remember all the options, used to ensure that our
175
  * serialized option does not get cluttered with unused options
176
  *
177
- * @since 1.2.1
178
- *
179
- * @param TitanFrameworkOption $option The option that was just created.
180
  *
181
  * @return void
182
  */
@@ -184,7 +160,7 @@ class TitanFramework {
184
  if ( ! empty( $option->settings['id'] ) ) {
185
 
186
  if ( is_admin() && isset( $this->optionsUsed[ $option->settings['id'] ] ) ) {
187
- self::displayFrameworkError(
188
  sprintf( __( 'All option IDs per namespace must be unique. The id %s has been used multiple times.', 'mobile-menu' ),
189
  '<code>' . $option->settings['id'] . '</code>'
190
  )
@@ -197,9 +173,7 @@ class TitanFramework {
197
 
198
 
199
  /**
200
- * Loads all the admin scripts used by Titan Framework
201
- *
202
- * @since 1.0
203
  *
204
  * @param string $hook The slug of admin page that called the enqueue.
205
  *
@@ -215,22 +189,19 @@ class TitanFramework {
215
  }
216
  }
217
 
218
- // Only enqueue scripts if we're on a Titan options page.
219
  if ( in_array( $hook, $panel_ids ) || ! empty( $this->mainContainers['meta-box'] ) ) {
220
  wp_enqueue_media();
221
- wp_enqueue_script( 'tf-serialize', TitanFramework::getURL( '../js/min/serialize-min.js', __FILE__ ) );
222
- wp_enqueue_script( 'tf-styling', TitanFramework::getURL( '../js/min/admin-styling-min.js', __FILE__ ) );
223
- wp_enqueue_style( 'tf-admin-styles', TitanFramework::getURL( '../css/admin-styles.css', __FILE__ ) );
224
  }
225
  }
226
 
227
-
228
  /**
229
  * Gets all the admin page options (not meta & customizer) and loads them from the database into
230
  * a class variable. This is needed because all our admin page options are contained in a single entry.
231
  *
232
- * @since 1.9
233
- *
234
  * @return array All admin options currently in the instance
235
  */
236
  protected function getInternalAdminOptions() {
@@ -245,11 +216,11 @@ class TitanFramework {
245
  }
246
 
247
  // Check if we have options saved already.
248
- $currentOptions = get_option( $this->optionNamespace . '_options' );
249
 
250
  // First time run, this action hook can be used to trigger something.
251
  if ( false === $currentOptions ) {
252
- do_action( 'tf_init_no_options_' . $this->optionNamespace );
253
  }
254
 
255
  // Put all the available options in our global variable for future checking.
@@ -268,14 +239,12 @@ class TitanFramework {
268
  /**
269
  * Gets the admin page option that's loaded into the instance, used by the option class
270
  *
271
- * @since 1.9
272
- *
273
  * @param string $optionName The ID of the option (not namespaced).
274
  * @param mixed $defaultValue The default value to return if the option isn't available yet.
275
  *
276
  * @return mixed The option value
277
  *
278
- * @see TitanFrameworkOption->getValue()
279
  */
280
  public function getInternalAdminPageOption( $optionName, $defaultValue = false ) {
281
 
@@ -294,14 +263,12 @@ class TitanFramework {
294
  * Sets the admin page option that's loaded into the instance, used by the option class.
295
  * Doesn't perform a save, only sets the value in the class variable.
296
  *
297
- * @since 1.9
298
- *
299
  * @param string $optionName The ID of the option (not namespaced).
300
  * @param mixed $value The value to set.
301
  *
302
  * @return bool Always returns true
303
  *
304
- * @see TitanFrameworkOption->setValue()
305
  */
306
  public function setInternalAdminPageOption( $optionName, $value ) {
307
 
@@ -316,17 +283,13 @@ class TitanFramework {
316
  /**
317
  * Saves all the admin (not meta & customizer) options which are currently loaded into this instance
318
  *
319
- * @since 1.0
320
- *
321
  * @return array All admin options currently in the instance
322
  */
323
  public function saveInternalAdminPageOptions() {
324
 
325
  // Run this first to ensure that adminOptions carries all our admin page options.
326
  $this->getInternalAdminOptions();
327
-
328
- update_option( $this->optionNamespace . '_options', serialize( $this->adminOptions ) );
329
- do_action( 'tf_save_options_' . $this->optionNamespace );
330
 
331
  return $this->adminOptions;
332
  }
@@ -335,31 +298,25 @@ class TitanFramework {
335
  /**
336
  * Create a admin page
337
  *
338
- * @deprecated 1.9 Use createContainer() with 'type' => 'admin-page' or createAdminPanel() instead.
339
- * @since 1.0
340
- *
341
  * @param array $settings The arguments for creating the admin page.
342
  *
343
- * @return TitanFrameworkAdminPage The created admin page
344
  */
345
  public function createAdminPanel( $settings ) {
346
- // _deprecated_function( __FUNCTION__, '1.9', 'createAdminPage' );
347
  return $this->createAdminPage( $settings );
348
  }
349
 
350
  /**
351
  * Create a admin page
352
  *
353
- * @since 1.0
354
- *
355
  * @param array $settings The arguments for creating the admin page.
356
  *
357
- * @return TitanFrameworkAdminPage The created admin page
358
  */
359
  public function createAdminPage( $settings ) {
360
  $settings['type'] = 'admin-page';
361
  $container = $this->createContainer( $settings );
362
- do_action( 'tf_admin_panel_created_' . $this->optionNamespace, $container );
363
  return $container;
364
  }
365
 
@@ -367,11 +324,9 @@ class TitanFramework {
367
  /**
368
  * Create a meta box
369
  *
370
- * @since 1.0
371
- *
372
  * @param array $settings The arguments for creating the meta box.
373
  *
374
- * @return TitanFrameworkMetaBox The created meta box
375
  */
376
  public function createMetaBox( $settings ) {
377
  $settings['type'] = 'meta-box';
@@ -382,25 +337,23 @@ class TitanFramework {
382
  * Creates a container (e.g. admin page, meta box, customizer section) depending
383
  * on the `type` parameter given in $settings
384
  *
385
- * @since 1.9
386
- *
387
  * @param array $settings The arguments for creating the container.
388
  *
389
- * @return TitanFrameworkAdminPage|TitanFrameworkMetaBox The created container
390
  */
391
  public function createContainer( $settings ) {
392
  if ( empty( $settings['type'] ) ) {
393
- self::displayFrameworkError( sprintf( __( '%s needs a %s parameter.', 'mobile-menu' ), '<code>' . __FUNCTION__ . '</code>', '<code>type</code>' ) );
394
  return;
395
  }
396
 
397
- $type = strtolower( $settings['type'] );
398
- $class = 'TitanFramework' . str_replace( ' ', '', ucfirst( str_replace( '-', ' ', $settings['type'] ) ) );
399
- $action = str_replace( '-', '_', $type );
400
  $container = false;
401
 
402
  if ( ! class_exists( $class ) ) {
403
- self::displayFrameworkError( sprintf( __( 'Container of type %s, does not exist.', 'mobile-menu' ), '<code>' . $settings['type'] . '</code>' ) );
404
  return;
405
  }
406
 
@@ -417,54 +370,9 @@ class TitanFramework {
417
  return $container;
418
  }
419
 
420
-
421
- /**
422
- * A function available ONLY to CHILD themes to stop the creation of options
423
- * created by the PARENT theme.
424
- *
425
- * @since 1.2.1
426
- * @access public
427
- *
428
- * @param string $optionName The id of the option to remove / stop from being created.
429
- *
430
- * @return void
431
- */
432
- public function removeOption( $optionName ) {
433
- $this->optionsToRemove[] = $optionName;
434
- }
435
-
436
-
437
- /**
438
- * Hook to the tf_create_option_continue filter, to check whether or not to continue
439
- * adding an option (if the option id was used in $titan->removeOption).
440
- *
441
- * @since 1.2.1
442
- * @access public
443
- *
444
- * @param boolean $continueCreating If true, the option will be created.
445
- * @param array $optionSettings The settings for the option to be created.
446
- *
447
- * @return boolean If true, continue with creating the option. False to stop it..
448
- */
449
- public function removeChildThemeOptions( $continueCreating, $optionSettings ) {
450
- if ( ! count( $this->optionsToRemove ) ) {
451
- return $continueCreating;
452
- }
453
- if ( empty( $optionSettings['id'] ) ) {
454
- return $continueCreating;
455
- }
456
- if ( in_array( $optionSettings['id'], $this->optionsToRemove ) ) {
457
- return false;
458
- }
459
- return $continueCreating;
460
- }
461
-
462
-
463
  /**
464
  * Get an option
465
  *
466
- * @since 1.0
467
- *
468
  * @param string $optionName The name of the option.
469
  * @param int $postID The post ID if this is a meta option.
470
  *
@@ -493,13 +401,10 @@ class TitanFramework {
493
  }
494
  }
495
 
496
-
497
  /**
498
  * Gets a set of options. Pass an associative array containing the option names as keys and
499
  * the values you want to be retained if the option names are not implemented.
500
  *
501
- * @since 1.9
502
- *
503
  * @param array $optionArray An associative array containing option names as keys.
504
  * @param int $postID The post ID if this is a meta option.
505
  *
@@ -516,12 +421,9 @@ class TitanFramework {
516
  return apply_filters( 'tf_get_options_' . $this->optionNamespace, $optionArray, $postID );
517
  }
518
 
519
-
520
  /**
521
  * Sets an option
522
  *
523
- * @since 1.0
524
- *
525
  * @param string $optionName The name of the option to save.
526
  * @param mixed $value The value of the option.
527
  * @param int $postID The ID of the parent post if this is a meta box option.
@@ -541,56 +443,9 @@ class TitanFramework {
541
  return true;
542
  }
543
 
544
-
545
- /**
546
- * Deletes ALL the options for the namespace. Even deletes all meta found in all posts.
547
- * Mainly used for unit tests
548
- *
549
- * @since 1.9
550
- *
551
- * @return void
552
- */
553
- public function deleteAllOptions() {
554
-
555
- // Delete all admin options.
556
- delete_option( $this->optionNamespace . '_options' );
557
- $this->adminOptions = array();
558
-
559
- // Delete all meta options.
560
- global $wpdb;
561
- $allPosts = $wpdb->get_results( 'SELECT ID FROM ' . $wpdb->posts, ARRAY_A );
562
- if ( ! empty( $allPosts ) ) {
563
- foreach ( $allPosts as $row ) {
564
- $allMeta = get_post_meta( $row['ID'] );
565
-
566
- // Only remove meta data that the framework created.
567
- foreach ( $allMeta as $metaName => $dummy ) {
568
- if ( stripos( $metaName, $this->optionNamespace . '_' ) === 0 ) {
569
- delete_post_meta( $row['ID'], $metaName );
570
- }
571
- }
572
- }
573
- }
574
-
575
- // Delete all theme mods.
576
- $allThemeMods = get_theme_mods();
577
- if ( ! empty( $allThemeMods ) && is_array( $allThemeMods ) ) {
578
- foreach ( $allThemeMods as $optionName => $dummy ) {
579
-
580
- // Only remove theme mods that the framework created.
581
- if ( stripos( $optionName, $this->optionNamespace . '_' ) === 0 ) {
582
- remove_theme_mod( $optionName );
583
- }
584
- }
585
- }
586
- }
587
-
588
-
589
  /**
590
  * Generates style rules which can use options as their values
591
  *
592
- * @since 1.0
593
- *
594
  * @param string $CSSString The styles to render.
595
  *
596
  * @return void
@@ -599,18 +454,15 @@ class TitanFramework {
599
  $this->cssInstance->addCSS( $CSSString );
600
  }
601
 
602
-
603
  /**
604
  * Displays an error notice
605
  *
606
- * @since 1.0
607
- *
608
  * @param string $message The error message to display.
609
  * @param array|object $errorObject The object to dump inside the error message.
610
  *
611
  * @return void
612
  */
613
- public static function displayFrameworkError( $message, $errorObject = null ) {
614
  // Clean up the debug object for display. e.g. If this is a setting, we can have lots of blank values.
615
  if ( is_array( $errorObject ) ) {
616
  foreach ( $errorObject as $key => $val ) {
@@ -635,12 +487,7 @@ class TitanFramework {
635
  <?php
636
  }
637
 
638
-
639
  /**
640
- * Acts the same way as plugins_url( 'script', __FILE__ ) but returns then correct url
641
- * when called from inside a theme.
642
- *
643
- * @since 1.1.2
644
  *
645
  * @param string $script the script to get the url to, relative to $file.
646
  * @param string $file the current file, should be __FILE__.
@@ -648,37 +495,10 @@ class TitanFramework {
648
  * @return string the url to $script
649
  */
650
  public static function getURL( $script, $file ) {
651
- $parentTheme = trailingslashit( get_template_directory() );
652
- $childTheme = trailingslashit( get_stylesheet_directory() );
653
- $plugin = trailingslashit( dirname( $file ) );
654
 
655
- // Windows sometimes mixes up forward and back slashes, ensure forward slash for correct URL output.
656
- $parentTheme = str_replace( '\\', '/', $parentTheme );
657
- $childTheme = str_replace( '\\', '/', $childTheme );
658
  $file = str_replace( '\\', '/', $file );
659
-
660
  $url = '';
661
-
662
- // Framework is in a parent theme.
663
- if ( stripos( $file, $parentTheme ) !== false ) {
664
- $dir = trailingslashit( dirname( str_replace( $parentTheme, '', $file ) ) );
665
- if ( './' == $dir ) {
666
- $dir = '';
667
- }
668
- $url = trailingslashit( get_template_directory_uri() ) . $dir . $script;
669
-
670
- } else if ( stripos( $file, $childTheme ) !== false ) {
671
- // Framework is in a child theme.
672
- $dir = trailingslashit( dirname( str_replace( $childTheme, '', $file ) ) );
673
- if ( './' == $dir ) {
674
- $dir = '';
675
- }
676
- $url = trailingslashit( get_stylesheet_directory_uri() ) . $dir . $script;
677
-
678
- } else {
679
- // Framework is a or in a plugin.
680
- $url = plugins_url( $script, $file );
681
- }
682
 
683
  // Replace /foo/../ with '/'.
684
  $url = preg_replace( '/\/(?!\.\.)[^\/]+\/\.\.\//', '/', $url );
@@ -686,12 +506,9 @@ class TitanFramework {
686
  return $url;
687
  }
688
 
689
-
690
  /**
691
  * Sets a value in the $setting class variable
692
  *
693
- * @since 1.6
694
- *
695
  * @param string $setting The name of the setting.
696
  * @param string $value The value to set.
697
  *
@@ -704,101 +521,8 @@ class TitanFramework {
704
  do_action( 'tf_setting_' . $setting . '_changed_' . $this->optionNamespace, $value, $oldValue );
705
  }
706
 
707
-
708
- /**
709
- * Gets the CSS generated
710
- *
711
- * @since 1.6
712
- *
713
- * @return string The generated CSS
714
- */
715
  public function generateCSS() {
716
  return $this->cssInstance->generateCSS();
717
  }
718
 
719
-
720
-
721
- /**
722
- * Adds a 'tf_save_option_{namespace}_{optionID}' filter to all Customizer options
723
- * which are just about to be saved
724
- *
725
- * This uses the `pre_update_option` filter to check all the options being saved if it's
726
- * a theme_mod option. It further checks whether these are Titan customizer options,
727
- * then attaches the new hook into those.
728
- *
729
- * @since 1.8
730
- *
731
- * @param mixed $value The value to be saved in the options.
732
- * @param string $optionName The option name.
733
- * @param mixed $oldValue The previously stored value.
734
- *
735
- * @return mixed The modified value to save
736
- *
737
- * @see pre_update_option filter
738
- */
739
- public function addCustomizerSaveFilter( $value, $optionName, $oldValue ) {
740
-
741
- $theme = get_option( 'stylesheet' );
742
-
743
- // Intercept theme mods only.
744
- if ( strpos( $optionName, 'theme_mods_' . $theme ) !== 0 ) {
745
- return $value;
746
- }
747
-
748
- // We expect theme mods to be an array.
749
- if ( ! is_array( $value ) ) {
750
- return $value;
751
- }
752
-
753
- // Checks whether a Titan customizer is in place.
754
- $customizerUsed = false;
755
-
756
- // Go through all our customizer options and filter them for saving.
757
- $optionIDs = array();
758
- if ( ! empty( $this->mainContainers['customizer'] ) ) {
759
- foreach ( $this->mainContainers['customizer'] as $customizer ) {
760
- foreach ( $customizer->options as $option ) {
761
- if ( ! empty( $option->settings['id'] ) ) {
762
- $optionID = $option->settings['id'];
763
- $themeModName = $this->optionNamespace . '_' . $option->settings['id'];
764
-
765
- if ( ! array_key_exists( $themeModName, $value ) ) {
766
- continue;
767
- }
768
-
769
- $customizerUsed = true;
770
-
771
- // Try and unserialize if possible.
772
- $tempValue = $value[ $themeModName ];
773
- if ( is_serialized( $tempValue ) ) {
774
- $tempValue = unserialize( $tempValue );
775
- }
776
-
777
- // Hook 'tf_save_option_{namespace}'.
778
- $newValue = apply_filters( 'tf_save_option_' . $this->optionNamespace, $tempValue, $option->settings['id'] );
779
-
780
- // Hook 'tf_save_option_{namespace}_{optionID}'.
781
- $newValue = apply_filters( 'tf_save_option_' . $themeModName, $tempValue );
782
-
783
- // We mainly check for equality here so that we won't have to serialize IF the value wasn't touched anyway.
784
- if ( $newValue != $tempValue ) {
785
- if ( is_array( $newValue ) ) {
786
- $newValue = serialize( $newValue );
787
- }
788
-
789
- $value[ $themeModName ] = $newValue;
790
- }
791
- }
792
- }
793
- }
794
- }
795
-
796
- if ( $customizerUsed ) {
797
- /** This action is documented in class-admin-page.php */
798
- $namespace = $this->optionNamespace;
799
- do_action( "tf_pre_save_options_{$namespace}", $this->mainContainers['customizer'] );
800
- }
801
-
802
- return $value;
803
- }
804
  }
1
  <?php
2
  /**
3
+ * Mobile Menu Options class
4
  *
 
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) {
9
  }
10
 
11
  /**
12
+ * Mobile Menu Options class
13
  *
 
14
  */
15
+ class MobileMenuOptions {
16
 
17
  /**
18
+ * All Mobile Menu instances
19
  *
20
  * @var array
21
  */
39
  /**
40
  * All main containers (admin pages, meta boxes, customizer section)
41
  *
42
+ * @var array of MobileMenuAdminPage, MobileMenuMetaBox
43
  */
44
  private $mainContainers = array();
45
 
46
  /**
47
  * All Google Font options used. This is for enqueuing Google Fonts for the frontend
48
+ * TODO Move this to the MobileMenuOptionSelectGooglefont class and let it enqueue from there
49
  *
50
+ * @var array MobileMenuOptionSelectGooglefont
51
  */
52
  private $googleFontsOptions = array();
53
 
59
  * @see removeOption()
60
  */
61
  private $optionsToRemove = array();
 
 
 
 
 
 
62
  private $adminOptions;
63
 
64
  /**
65
  * The CSS class instance used
66
  *
67
+ * @var MobileMenuCSS
68
  */
69
  public $cssInstance;
70
 
89
  * @var array
90
  */
91
  private $defaultSettings = array(
92
+ 'css' => 'generate',
93
  );
94
 
 
95
  /**
 
 
 
96
  *
97
  * @param string $optionNamespace The namespace to get options from.
98
  *
99
+ * @return MobileMenuOptions
100
  */
101
  public static function getInstance( $optionNamespace ) {
102
 
109
  }
110
  }
111
 
112
+ $newInstance = new MobileMenuOptions( $optionNamespace );
113
  self::$instances[] = $newInstance;
114
  return $newInstance;
115
  }
116
 
117
 
118
  /**
119
+ * Gets all active instances of Mobile Menu Options
120
  *
 
121
  *
122
+ * @return array An array of MobileMenuOptions objects
123
  */
124
  public static function getAllInstances() {
125
  return self::$instances;
127
 
128
 
129
  /**
130
+ * Creates a new MobileMenuOptions object
 
 
131
  *
132
  * @param string $optionNamespace The namespace to get options from.
133
  */
140
  $optionNamespace = str_replace( ' ', '-', trim( strtolower( $optionNamespace ) ) );
141
 
142
  $this->optionNamespace = $optionNamespace;
143
+ $this->settings = $this->defaultSettings;
144
+ $this->cssInstance = new MobileMenuCSS( $this );
 
 
 
145
 
146
  add_action( 'admin_enqueue_scripts', array( $this, 'loadAdminScripts' ) );
147
+ add_action( 'mm_create_option_mobmenu', array( $this, 'rememberAllOptions' ) );
148
+
 
 
 
149
  }
150
 
 
151
  /**
152
  * Action hook on tf_create_option to remember all the options, used to ensure that our
153
  * serialized option does not get cluttered with unused options
154
  *
155
+ * @param MobileMenuOption $option The option that was just created.
 
 
156
  *
157
  * @return void
158
  */
160
  if ( ! empty( $option->settings['id'] ) ) {
161
 
162
  if ( is_admin() && isset( $this->optionsUsed[ $option->settings['id'] ] ) ) {
163
+ self::displayError(
164
  sprintf( __( 'All option IDs per namespace must be unique. The id %s has been used multiple times.', 'mobile-menu' ),
165
  '<code>' . $option->settings['id'] . '</code>'
166
  )
173
 
174
 
175
  /**
176
+ * Loads all the admin scripts used by Mobile Menu Options
 
 
177
  *
178
  * @param string $hook The slug of admin page that called the enqueue.
179
  *
189
  }
190
  }
191
 
192
+ // Only enqueue scripts if we're on a Mobile Menu Options page.
193
  if ( in_array( $hook, $panel_ids ) || ! empty( $this->mainContainers['meta-box'] ) ) {
194
  wp_enqueue_media();
195
+ wp_enqueue_script( 'mm-serialize', MobileMenuOptions::getURL( '../js/min/serialize-min.js', __FILE__ ) );
196
+ wp_enqueue_script( 'mm-styling', MobileMenuOptions::getURL( '../js/min/admin-styling-min.js', __FILE__ ) );
197
+ wp_enqueue_style( 'mm-admin-styles', MobileMenuOptions::getURL( '../css/admin-styles.css', __FILE__ ) );
198
  }
199
  }
200
 
 
201
  /**
202
  * Gets all the admin page options (not meta & customizer) and loads them from the database into
203
  * a class variable. This is needed because all our admin page options are contained in a single entry.
204
  *
 
 
205
  * @return array All admin options currently in the instance
206
  */
207
  protected function getInternalAdminOptions() {
216
  }
217
 
218
  // Check if we have options saved already.
219
+ $currentOptions = get_option( 'mobmenu_options' );
220
 
221
  // First time run, this action hook can be used to trigger something.
222
  if ( false === $currentOptions ) {
223
+ do_action( 'mm_init_no_options_mobmenu' );
224
  }
225
 
226
  // Put all the available options in our global variable for future checking.
239
  /**
240
  * Gets the admin page option that's loaded into the instance, used by the option class
241
  *
 
 
242
  * @param string $optionName The ID of the option (not namespaced).
243
  * @param mixed $defaultValue The default value to return if the option isn't available yet.
244
  *
245
  * @return mixed The option value
246
  *
247
+ * @see MobileMenuOption->getValue()
248
  */
249
  public function getInternalAdminPageOption( $optionName, $defaultValue = false ) {
250
 
263
  * Sets the admin page option that's loaded into the instance, used by the option class.
264
  * Doesn't perform a save, only sets the value in the class variable.
265
  *
 
 
266
  * @param string $optionName The ID of the option (not namespaced).
267
  * @param mixed $value The value to set.
268
  *
269
  * @return bool Always returns true
270
  *
271
+ * @see MobileMenuOption->setValue()
272
  */
273
  public function setInternalAdminPageOption( $optionName, $value ) {
274
 
283
  /**
284
  * Saves all the admin (not meta & customizer) options which are currently loaded into this instance
285
  *
 
 
286
  * @return array All admin options currently in the instance
287
  */
288
  public function saveInternalAdminPageOptions() {
289
 
290
  // Run this first to ensure that adminOptions carries all our admin page options.
291
  $this->getInternalAdminOptions();
292
+ update_option( 'mobmenu_options', serialize( $this->adminOptions ) );
 
 
293
 
294
  return $this->adminOptions;
295
  }
298
  /**
299
  * Create a admin page
300
  *
 
 
 
301
  * @param array $settings The arguments for creating the admin page.
302
  *
303
+ * @return MobileMenuAdminPage The created admin page
304
  */
305
  public function createAdminPanel( $settings ) {
 
306
  return $this->createAdminPage( $settings );
307
  }
308
 
309
  /**
310
  * Create a admin page
311
  *
 
 
312
  * @param array $settings The arguments for creating the admin page.
313
  *
314
+ * @return MobileMenuAdminPage The created admin page
315
  */
316
  public function createAdminPage( $settings ) {
317
  $settings['type'] = 'admin-page';
318
  $container = $this->createContainer( $settings );
319
+
320
  return $container;
321
  }
322
 
324
  /**
325
  * Create a meta box
326
  *
 
 
327
  * @param array $settings The arguments for creating the meta box.
328
  *
329
+ * @return MobileMenuMetaBox The created meta box
330
  */
331
  public function createMetaBox( $settings ) {
332
  $settings['type'] = 'meta-box';
337
  * Creates a container (e.g. admin page, meta box, customizer section) depending
338
  * on the `type` parameter given in $settings
339
  *
 
 
340
  * @param array $settings The arguments for creating the container.
341
  *
342
+ * @return MobileMenuAdminPage|MobileMenuMetaBox The created container
343
  */
344
  public function createContainer( $settings ) {
345
  if ( empty( $settings['type'] ) ) {
346
+ self::displayError( sprintf( __( '%s needs a %s parameter.', 'mobile-menu' ), '<code>' . __FUNCTION__ . '</code>', '<code>type</code>' ) );
347
  return;
348
  }
349
 
350
+ $type = strtolower( $settings['type'] );
351
+ $class = 'MobileMenu' . str_replace( ' ', '', ucfirst( str_replace( '-', ' ', $settings['type'] ) ) );
352
+ $action = str_replace( '-', '_', $type );
353
  $container = false;
354
 
355
  if ( ! class_exists( $class ) ) {
356
+ self::displayError( sprintf( __( 'Container of type %s, does not exist.', 'mobile-menu' ), '<code>' . $settings['type'] . '</code>' ) );
357
  return;
358
  }
359
 
370
  return $container;
371
  }
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  /**
374
  * Get an option
375
  *
 
 
376
  * @param string $optionName The name of the option.
377
  * @param int $postID The post ID if this is a meta option.
378
  *
401
  }
402
  }
403
 
 
404
  /**
405
  * Gets a set of options. Pass an associative array containing the option names as keys and
406
  * the values you want to be retained if the option names are not implemented.
407
  *
 
 
408
  * @param array $optionArray An associative array containing option names as keys.
409
  * @param int $postID The post ID if this is a meta option.
410
  *
421
  return apply_filters( 'tf_get_options_' . $this->optionNamespace, $optionArray, $postID );
422
  }
423
 
 
424
  /**
425
  * Sets an option
426
  *
 
 
427
  * @param string $optionName The name of the option to save.
428
  * @param mixed $value The value of the option.
429
  * @param int $postID The ID of the parent post if this is a meta box option.
443
  return true;
444
  }
445
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
446
  /**
447
  * Generates style rules which can use options as their values
448
  *
 
 
449
  * @param string $CSSString The styles to render.
450
  *
451
  * @return void
454
  $this->cssInstance->addCSS( $CSSString );
455
  }
456
 
 
457
  /**
458
  * Displays an error notice
459
  *
 
 
460
  * @param string $message The error message to display.
461
  * @param array|object $errorObject The object to dump inside the error message.
462
  *
463
  * @return void
464
  */
465
+ public static function displayError( $message, $errorObject = null ) {
466
  // Clean up the debug object for display. e.g. If this is a setting, we can have lots of blank values.
467
  if ( is_array( $errorObject ) ) {
468
  foreach ( $errorObject as $key => $val ) {
487
  <?php
488
  }
489
 
 
490
  /**
 
 
 
 
491
  *
492
  * @param string $script the script to get the url to, relative to $file.
493
  * @param string $file the current file, should be __FILE__.
495
  * @return string the url to $script
496
  */
497
  public static function getURL( $script, $file ) {
 
 
 
498
 
 
 
 
499
  $file = str_replace( '\\', '/', $file );
 
500
  $url = '';
501
+ $url = plugins_url( $script, $file );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
 
503
  // Replace /foo/../ with '/'.
504
  $url = preg_replace( '/\/(?!\.\.)[^\/]+\/\.\.\//', '/', $url );
506
  return $url;
507
  }
508
 
 
509
  /**
510
  * Sets a value in the $setting class variable
511
  *
 
 
512
  * @param string $setting The name of the setting.
513
  * @param string $value The value to set.
514
  *
521
  do_action( 'tf_setting_' . $setting . '_changed_' . $this->optionNamespace, $value, $oldValue );
522
  }
523
 
 
 
 
 
 
 
 
 
524
  public function generateCSS() {
525
  return $this->cssInstance->generateCSS();
526
  }
527
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
528
  }
options-framework/lib/class-titan-css.php → includes/plugin-settings/lib/class-mobmenu-css.php RENAMED
@@ -5,42 +5,29 @@ if ( !defined( 'ABSPATH' ) ) {
5
  // Exit if accessed directly.
6
  }
7
 
8
- /**
9
- * Titan Framework CSS Class
10
- * In charge of creating and parsing CSS rules created from framework options.
11
- *
12
- * @author Benjamin Intal
13
- **/
14
- class TitanFrameworkCSS
15
  {
16
  // Compression type to use
17
- const SCSS_COMPRESSION = 'titanscss_formatter_compressed' ;
18
  // Internal variables
19
- private $frameworkInstance ;
20
  private $allOptionsWithIDs = array() ;
21
  // Keep all added CSS here
22
  private $additionalCSS = array() ;
23
- /**
24
- * Class constructor
25
- *
26
- * @param TitanFramework $frameworkInstance an instance of the framework object
27
- * @return void
28
- * @since 1.2
29
- */
30
- function __construct( $frameworkInstance )
31
  {
32
- $this->frameworkInstance = $frameworkInstance;
33
  $css = get_option( $this->getCSSSlug() );
34
  $generated_css = $this->getCSSFilePath();
35
  // Gather all the options
36
- add_action( 'tf_create_option_' . $frameworkInstance->optionNamespace, array( $this, 'getOptionsWithCSS' ) );
37
  // display our CSS
38
  add_action( 'wp_head', array( $this, 'printCSS' ), 99 );
39
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueueCSS' ) );
40
  // Trigger new compile when admin option settings were saved
41
- add_action( 'tf_admin_options_saved_' . $frameworkInstance->optionNamespace, array( $this, 'generateSaveCSS' ) );
42
  // Trigger compile when there are no default options saved yet
43
- add_action( 'tf_init_no_options_' . $frameworkInstance->optionNamespace, array( $this, 'generateMissingCSS' ) );
44
  }
45
 
46
  /**
@@ -48,7 +35,6 @@ class TitanFrameworkCSS
48
  *
49
  * @param string $cssString string CSS, can contain SaSS variables of optionIDs
50
  * @return void
51
- * @since 1.2
52
  */
53
  public function addCSS( $cssString )
54
  {
@@ -59,24 +45,23 @@ class TitanFrameworkCSS
59
  * Prints the styles in the head tag. Used IF the CSS file could not be generated
60
  *
61
  * @return void
62
- * @since 1.2
63
  */
64
  public function printCSS()
65
  {
66
  // If the setting is 'generate css' and we can't just echo it out
67
 
68
- if ( $this->frameworkInstance->settings['css'] == 'generate' ) {
69
  $css = get_option( $this->getCSSSlug() );
70
  if ( !empty($css) ) {
71
- echo "<style id='tf-" . esc_attr( $this->frameworkInstance->optionNamespace ) . "'>{$css}</style>" ;
72
  }
73
  // If the setting is 'print inline css', print it out if we have any
74
  } else {
75
 
76
- if ( $this->frameworkInstance->settings['css'] == 'inline' ) {
77
  $css = $this->generateCSS();
78
  if ( !empty($css) ) {
79
- echo "<style id='tf-" . esc_attr( $this->frameworkInstance->optionNamespace ) . "'>{$css}</style>" ;
80
  }
81
  }
82
 
@@ -92,7 +77,7 @@ class TitanFrameworkCSS
92
  */
93
  public function enqueueCSS()
94
  {
95
- $mobmenu_options = TitanFramework::getInstance( 'mobmenu' );
96
  $is_mobile_only = $mobmenu_options->getOption( 'only_mobile_devices' );
97
  $is_testing_mode = $mobmenu_options->getOption( 'only_testing_mode' );
98
  $mobmenu_action = '';
@@ -102,7 +87,7 @@ class TitanFrameworkCSS
102
  if ( $mobmenu_action == 'find-element' || $is_testing_mode && current_user_can( 'administrator' ) || !$is_testing_mode && (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
103
  // Only enqueue the generated css if we have the settings for it.
104
 
105
- if ( $this->frameworkInstance->settings['css'] == 'generate' ) {
106
  $css = get_option( $this->getCSSSlug() );
107
  $generated_css = $this->getCSSFilePath();
108
 
@@ -110,14 +95,14 @@ class TitanFrameworkCSS
110
 
111
  if ( !$mobmenu_options->getOption( 'cache_dynamic_css', false ) ) {
112
  wp_enqueue_style(
113
- 'tf-compiled-options-' . $this->frameworkInstance->optionNamespace,
114
  $this->getCSSFileURL(),
115
  '',
116
  WP_MOBILE_MENU_VERSION . '-' . rand( 100, 999 )
117
  );
118
  } else {
119
  wp_enqueue_style(
120
- 'tf-compiled-options-' . $this->frameworkInstance->optionNamespace,
121
  $this->getCSSFileURL(),
122
  '',
123
  WP_MOBILE_MENU_VERSION
@@ -125,7 +110,7 @@ class TitanFrameworkCSS
125
  }
126
 
127
  } else {
128
- $titan = TitanFramework::getInstance( 'mobmenu' );
129
  echo '<style id="dynamic-mobmenu-inline-css" type="text/css">' ;
130
  $css = $this->generateCSS();
131
  echo $css . '</style>' ;
@@ -139,7 +124,7 @@ class TitanFrameworkCSS
139
  /**
140
  * Gathers all options with IDs for generation of CSS rules
141
  *
142
- * @param TitanFrameworkOption $option The option which was just added
143
  * @return void
144
  * @since 1.2
145
  */
@@ -158,7 +143,7 @@ class TitanFrameworkCSS
158
  */
159
  public function getCSSSlug()
160
  {
161
- return 'dynamic-' . str_replace( ' ', '-', trim( strtolower( $this->frameworkInstance->optionNamespace ) ) );
162
  }
163
 
164
  /**
@@ -171,7 +156,7 @@ class TitanFrameworkCSS
171
  {
172
  $upload_dir = wp_upload_dir();
173
  $uploadsFolder = $upload_dir['basedir'] . '/';
174
- $namespace = $this->frameworkInstance->optionNamespace;
175
  return apply_filters( "tf_css_get_css_file_path_{$namespace}", $uploadsFolder . $this->getCSSSlug() . '.css' );
176
  }
177
 
@@ -230,7 +215,7 @@ class TitanFrameworkCSS
230
  $value = esc_attr( $value );
231
  // Compile as SCSS & minify
232
  require_once trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'inc/scssphp/scss.inc.php';
233
- $scss = new titanscssc();
234
  // If the value is a file address, wrap it in quotes
235
  if ( $type == 'upload' ) {
236
  $value = "'" . $value . "'";
@@ -289,14 +274,14 @@ class TitanFrameworkCSS
289
  public function generateCSS()
290
  {
291
  $cssString = '';
292
- $titan = TitanFramework::getInstance( 'mobmenu' );
293
  // These are the option types which are not allowed.
294
  $noCSSOptionTypes = array( 'text', 'textarea', 'editor' );
295
  // Compile as SCSS & minify.
296
  require_once trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'inc/scssphp/scss.inc.php';
297
- $scss = new titanscssc();
298
- $my_custom_css = $titan->getOption( 'custom_css' );
299
- // Add additional CSS added via TitanFramework::createCSS()
300
  foreach ( $this->additionalCSS as $css ) {
301
  $cssString .= $css . "\n";
302
  }
@@ -320,10 +305,8 @@ class TitanFrameworkCSS
320
 
321
  /**
322
  * Generates a the CSS file containing all the rules assigned to options, or created using
323
- * the TitanFramework->createCSS( '...' ) function.
324
  *
325
  * @return void
326
- * @since 1.3
327
  */
328
  public function generateSaveCSS()
329
  {
@@ -356,16 +339,16 @@ class TitanFrameworkCSS
356
  */
357
  private function updateSvgColors()
358
  {
359
- $titan = TitanFramework::getInstance( 'mobmenu' );
360
  // Change the SVG search icon color.
361
  $svg_file_path = WP_MOBILE_MENU_PLUGIN_PATH . 'includes/assets/svgs/search.svg';
362
- $svg_color = $titan->getInternalAdminPageOption( 'search_icon_color', '#000000' );
363
  $this->writeSVG( $svg_color, $svg_file_path );
364
 
365
  if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
366
  // Change the SVG cart icon color.
367
  $svg_file_path = WP_MOBILE_MENU_PLUGIN_PATH . 'includes/assets/svgs/cart.svg';
368
- $svg_color = $titan->getInternalAdminPageOption( 'mm_woo_menu_icon_color', '#000000' );
369
  $this->writeSVG( $svg_color, $svg_file_path );
370
  }
371
 
5
  // Exit if accessed directly.
6
  }
7
 
8
+ class MobileMenuCSS
 
 
 
 
 
 
9
  {
10
  // Compression type to use
11
+ const SCSS_COMPRESSION = 'mobmenuscss_formatter_compressed' ;
12
  // Internal variables
13
+ private $mobmenuInstance ;
14
  private $allOptionsWithIDs = array() ;
15
  // Keep all added CSS here
16
  private $additionalCSS = array() ;
17
+ function __construct( $mobmenuInstance )
 
 
 
 
 
 
 
18
  {
19
+ $this->mobmenuInstance = $mobmenuInstance;
20
  $css = get_option( $this->getCSSSlug() );
21
  $generated_css = $this->getCSSFilePath();
22
  // Gather all the options
23
+ add_action( 'mm_create_option_mobmenu', array( $this, 'getOptionsWithCSS' ) );
24
  // display our CSS
25
  add_action( 'wp_head', array( $this, 'printCSS' ), 99 );
26
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueueCSS' ) );
27
  // Trigger new compile when admin option settings were saved
28
+ add_action( 'mm_admin_options_saved_mobmenu', array( $this, 'generateSaveCSS' ) );
29
  // Trigger compile when there are no default options saved yet
30
+ add_action( 'mm_init_no_options_mobmenu', array( $this, 'generateMissingCSS' ) );
31
  }
32
 
33
  /**
35
  *
36
  * @param string $cssString string CSS, can contain SaSS variables of optionIDs
37
  * @return void
 
38
  */
39
  public function addCSS( $cssString )
40
  {
45
  * Prints the styles in the head tag. Used IF the CSS file could not be generated
46
  *
47
  * @return void
 
48
  */
49
  public function printCSS()
50
  {
51
  // If the setting is 'generate css' and we can't just echo it out
52
 
53
+ if ( $this->mobmenuInstance->settings['css'] == 'generate' ) {
54
  $css = get_option( $this->getCSSSlug() );
55
  if ( !empty($css) ) {
56
+ echo "<style id='mm-" . esc_attr( $this->mobmenuInstance->optionNamespace ) . "'>{$css}</style>" ;
57
  }
58
  // If the setting is 'print inline css', print it out if we have any
59
  } else {
60
 
61
+ if ( $this->mobmenuInstance->settings['css'] == 'inline' ) {
62
  $css = $this->generateCSS();
63
  if ( !empty($css) ) {
64
+ echo "<style id='mm-" . esc_attr( $this->mobmenuInstance->optionNamespace ) . "'>{$css}</style>" ;
65
  }
66
  }
67
 
77
  */
78
  public function enqueueCSS()
79
  {
80
+ $mobmenu_options = MobileMenuOptions::getInstance( 'mobmenu' );
81
  $is_mobile_only = $mobmenu_options->getOption( 'only_mobile_devices' );
82
  $is_testing_mode = $mobmenu_options->getOption( 'only_testing_mode' );
83
  $mobmenu_action = '';
87
  if ( $mobmenu_action == 'find-element' || $is_testing_mode && current_user_can( 'administrator' ) || !$is_testing_mode && (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
88
  // Only enqueue the generated css if we have the settings for it.
89
 
90
+ if ( $this->mobmenuInstance->settings['css'] == 'generate' ) {
91
  $css = get_option( $this->getCSSSlug() );
92
  $generated_css = $this->getCSSFilePath();
93
 
95
 
96
  if ( !$mobmenu_options->getOption( 'cache_dynamic_css', false ) ) {
97
  wp_enqueue_style(
98
+ 'mm-compiled-options-' . $this->mobmenuInstance->optionNamespace,
99
  $this->getCSSFileURL(),
100
  '',
101
  WP_MOBILE_MENU_VERSION . '-' . rand( 100, 999 )
102
  );
103
  } else {
104
  wp_enqueue_style(
105
+ 'mm-compiled-options-' . $this->mobmenuInstance->optionNamespace,
106
  $this->getCSSFileURL(),
107
  '',
108
  WP_MOBILE_MENU_VERSION
110
  }
111
 
112
  } else {
113
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
114
  echo '<style id="dynamic-mobmenu-inline-css" type="text/css">' ;
115
  $css = $this->generateCSS();
116
  echo $css . '</style>' ;
124
  /**
125
  * Gathers all options with IDs for generation of CSS rules
126
  *
127
+ * @param MobileMenuOption $option The option which was just added
128
  * @return void
129
  * @since 1.2
130
  */
143
  */
144
  public function getCSSSlug()
145
  {
146
+ return 'dynamic-' . str_replace( ' ', '-', trim( strtolower( $this->mobmenuInstance->optionNamespace ) ) );
147
  }
148
 
149
  /**
156
  {
157
  $upload_dir = wp_upload_dir();
158
  $uploadsFolder = $upload_dir['basedir'] . '/';
159
+ $namespace = $this->mobmenuInstance->optionNamespace;
160
  return apply_filters( "tf_css_get_css_file_path_{$namespace}", $uploadsFolder . $this->getCSSSlug() . '.css' );
161
  }
162
 
215
  $value = esc_attr( $value );
216
  // Compile as SCSS & minify
217
  require_once trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'inc/scssphp/scss.inc.php';
218
+ $scss = new mobmenuscssc();
219
  // If the value is a file address, wrap it in quotes
220
  if ( $type == 'upload' ) {
221
  $value = "'" . $value . "'";
274
  public function generateCSS()
275
  {
276
  $cssString = '';
277
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
278
  // These are the option types which are not allowed.
279
  $noCSSOptionTypes = array( 'text', 'textarea', 'editor' );
280
  // Compile as SCSS & minify.
281
  require_once trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'inc/scssphp/scss.inc.php';
282
+ $scss = new mobmenuscssc();
283
+ $my_custom_css = $plugin_settings->getOption( 'custom_css' );
284
+ // Add additional CSS added via MobileMenuOptions::createCSS()
285
  foreach ( $this->additionalCSS as $css ) {
286
  $cssString .= $css . "\n";
287
  }
305
 
306
  /**
307
  * Generates a the CSS file containing all the rules assigned to options, or created using
 
308
  *
309
  * @return void
 
310
  */
311
  public function generateSaveCSS()
312
  {
339
  */
340
  private function updateSvgColors()
341
  {
342
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
343
  // Change the SVG search icon color.
344
  $svg_file_path = WP_MOBILE_MENU_PLUGIN_PATH . 'includes/assets/svgs/search.svg';
345
+ $svg_color = $plugin_settings->getInternalAdminPageOption( 'search_icon_color', '#000000' );
346
  $this->writeSVG( $svg_color, $svg_file_path );
347
 
348
  if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
349
  // Change the SVG cart icon color.
350
  $svg_file_path = WP_MOBILE_MENU_PLUGIN_PATH . 'includes/assets/svgs/cart.svg';
351
+ $svg_color = $plugin_settings->getInternalAdminPageOption( 'mm_woo_menu_icon_color', '#000000' );
352
  $this->writeSVG( $svg_color, $svg_file_path );
353
  }
354
 
{options-framework → includes/plugin-settings}/lib/class-option-ajax-button.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionAjaxButton extends TitanFrameworkOption {
6
 
7
  private static $firstLoad = true;
8
 
@@ -29,7 +29,7 @@ class TitanFrameworkOptionAjaxButton extends TitanFrameworkOption {
29
  if ( empty( $_POST['nonce'] ) ) {
30
  wp_send_json_error( __( 'Security check failed, please refresh the page and try again.', 'mobile-menu' ) );
31
  }
32
- if ( ! wp_verify_nonce( $_POST['nonce'], 'tf-ajax-button' ) ) {
33
  wp_send_json_error( __( 'Security check failed, please refresh the page and try again.', 'mobile-menu' ) );
34
  }
35
  }
@@ -139,7 +139,7 @@ class TitanFrameworkOptionAjaxButton extends TitanFrameworkOption {
139
  esc_attr( $this->settings['wait_label'][ $i ] ),
140
  esc_attr( $this->settings['error_label'][ $i ] ),
141
  esc_attr( $this->settings['success_label'][ $i ] ),
142
- esc_attr( wp_create_nonce( 'tf-ajax-button' ) ),
143
  esc_attr( $this->settings['success_callback'][ $i ] ),
144
  esc_attr( $this->settings['error_callback'][ $i ] ),
145
  esc_attr( $this->settings['data_filter_callback'][ $i ] ),
@@ -167,7 +167,7 @@ class TitanFrameworkOptionAjaxButton extends TitanFrameworkOption {
167
  jQuery(document).ready(function($) {
168
  "use strict";
169
 
170
- $('.form-table, .customize-control').on( 'click', '.tf-ajax-button .button', function( e ) {
171
 
172
  // Only perform one ajax at a time
173
  if ( typeof this.doingAjax == 'undefined' ) {
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionAjaxButton extends MobileMenuOption {
6
 
7
  private static $firstLoad = true;
8
 
29
  if ( empty( $_POST['nonce'] ) ) {
30
  wp_send_json_error( __( 'Security check failed, please refresh the page and try again.', 'mobile-menu' ) );
31
  }
32
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'mm-ajax-button' ) ) {
33
  wp_send_json_error( __( 'Security check failed, please refresh the page and try again.', 'mobile-menu' ) );
34
  }
35
  }
139
  esc_attr( $this->settings['wait_label'][ $i ] ),
140
  esc_attr( $this->settings['error_label'][ $i ] ),
141
  esc_attr( $this->settings['success_label'][ $i ] ),
142
+ esc_attr( wp_create_nonce( 'mm-ajax-button' ) ),
143
  esc_attr( $this->settings['success_callback'][ $i ] ),
144
  esc_attr( $this->settings['error_callback'][ $i ] ),
145
  esc_attr( $this->settings['data_filter_callback'][ $i ] ),
167
  jQuery(document).ready(function($) {
168
  "use strict";
169
 
170
+ $('.form-table, .customize-control').on( 'click', '.mm-ajax-button .button', function( e ) {
171
 
172
  // Only perform one ajax at a time
173
  if ( typeof this.doingAjax == 'undefined' ) {
{options-framework → includes/plugin-settings}/lib/class-option-checkbox.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionCheckbox extends TitanFrameworkOption {
6
 
7
  /*
8
  * Display for options and meta
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionCheckbox extends MobileMenuOption {
6
 
7
  /*
8
  * Display for options and meta
{options-framework → includes/plugin-settings}/lib/class-option-code.php RENAMED
@@ -3,8 +3,6 @@
3
  /**
4
  * Code Option Class
5
  *
6
- * @author Benjamin Intal
7
- * @package Titan Framework Core
8
  **/
9
 
10
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
@@ -12,10 +10,8 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
12
  /**
13
  * Code Option Class
14
  *
15
- * @since 1.3
16
  **/
17
- class TitanFrameworkOptionCode extends TitanFrameworkOption {
18
-
19
 
20
  /**
21
  * Default settings specific for this container
@@ -25,28 +21,24 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
25
 
26
  /**
27
  * (Optional) The language used for syntax highlighting for this option. The list of all supported languages are available in the Ace GitHub repo.
28
- * @since 1.0
29
  * @var string
30
  */
31
  'lang' => 'css',
32
 
33
  /**
34
  * (Optional) The color theme used in the option. The list of all supported themes are available in the Ace GitHub repo.
35
- * @since 1.0
36
  * @var string
37
  */
38
  'theme' => 'chrome',
39
 
40
  /**
41
  * (Optional) The height of the editor in pixels.
42
- * @since 1.0
43
  * @var string
44
  */
45
  'height' => 200,
46
 
47
  /**
48
  * (Optional) The inputted code is automatically included in the frontend if the <code>lang</code> parameter is <code>css</code> or <code>javascript</code>. Setting this to false forces the option to stop including the code in the front end. This is useful if you want to use the option value in the back end or somewhere else.
49
- * @since 1.9.3
50
  * @var bool
51
  */
52
  'enqueue' => true,
@@ -56,7 +48,6 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
56
  /**
57
  * Constructor
58
  *
59
- * @since 1.3
60
  */
61
  function __construct( $settings, $owner ) {
62
  parent::__construct( $settings, $owner );
@@ -64,7 +55,7 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
64
  add_action( 'admin_enqueue_scripts', array( $this, 'loadAdminScripts' ) );
65
 
66
  // CSS generation for CSS code langs
67
- add_filter( 'tf_generate_css_code_' . $this->getOptionNamespace(), array( $this, 'generateCSSCode' ), 10, 2 );
68
  add_filter( 'wp_head', array( $this, 'printCSSForPagesAndPosts' ), 100 );
69
 
70
  // JS inclusion for Javascript code langs
@@ -72,12 +63,10 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
72
  add_filter( 'wp_footer', array( $this, 'printJSForPagesAndPosts' ), 101 );
73
  }
74
 
75
-
76
  /**
77
  * Prints javascript code in the header using wp_print_scripts
78
  *
79
  * @return void
80
- * @since 1.3
81
  */
82
  public function printJS() {
83
 
@@ -92,7 +81,7 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
92
  }
93
 
94
  // For non-meta box options only
95
- if ( TitanFrameworkOption::TYPE_META == $this->type ) {
96
  return;
97
  }
98
 
@@ -108,7 +97,6 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
108
  * Prints javascript code in the header for meta options using wp_print_scripts
109
  *
110
  * @return void
111
- * @since 1.3
112
  */
113
  public function printJSForPagesAndPosts() {
114
 
@@ -118,7 +106,7 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
118
  }
119
 
120
  // This is for meta box options only, other types get generated normally
121
- if ( TitanFrameworkOption::TYPE_META != $this->type ) {
122
  return;
123
  }
124
 
@@ -145,7 +133,6 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
145
  * Prints CSS styles in the header for meta options using wp_print_scripts
146
  *
147
  * @return void
148
- * @since 1.3
149
  */
150
  public function printCSSForPagesAndPosts() {
151
 
@@ -155,7 +142,7 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
155
  }
156
 
157
  // This is for meta box options only, other types get generated normally
158
- if ( TitanFrameworkOption::TYPE_META != $this->type ) {
159
  return;
160
  }
161
 
@@ -178,7 +165,7 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
178
 
179
  // Print out valid CSS only
180
  require_once( trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'inc/scssphp/scss.inc.php' );
181
- $scss = new titanscssc();
182
  try {
183
  $css = $scss->compile( $css );
184
  echo "<style type='text/css' media='screen'>{$css}</style>";
@@ -189,12 +176,11 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
189
 
190
  /**
191
  * Generates CSS to be included in our dynamically generated CSS file in
192
- * TitanFrameworkCSS, using tf_generate_css_code
193
  *
194
  * @param string $css The CSS to output
195
- * @param TitanFrameworkOption $option The option object being generated
196
  * @return void
197
- * @since 1.3
198
  */
199
  public function generateCSSCode( $css, $option ) {
200
  if ( $this->settings['id'] != $option->settings['id'] ) {
@@ -206,7 +192,7 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
206
  return $css;
207
  }
208
 
209
- if ( TitanFrameworkOption::TYPE_META != $option->type ) {
210
  $css = $this->getValue();
211
  }
212
  return $css;
@@ -217,12 +203,11 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
217
  * Loads the ACE library for displaying our syntax highlighted code editor
218
  *
219
  * @return void
220
- * @since 1.3
221
  */
222
  public function loadAdminScripts() {
223
  wp_enqueue_code_editor(array('type' => 'text/css'));
224
  wp_localize_script('jquery', 'cm_settings', false);
225
-
226
  wp_enqueue_script('wp-theme-plugin-editor');
227
  wp_enqueue_style('wp-codemirror');
228
 
@@ -233,7 +218,6 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
233
  * Displays the option for admin pages and meta boxes
234
  *
235
  * @return void
236
- * @since 1.3
237
  */
238
  public function display() {
239
  $this->echoOptionHeader();
@@ -248,13 +232,11 @@ class TitanFrameworkOptionCode extends TitanFrameworkOption {
248
  $this->echoOptionFooter();
249
  }
250
 
251
-
252
  /**
253
  * Cleans the value for getOption
254
  *
255
  * @param string $value The raw value of the option
256
  * @return mixes The cleaned value
257
- * @since 1.3
258
  */
259
  public function cleanValueForGetting( $value ) {
260
  return stripslashes( $value );
3
  /**
4
  * Code Option Class
5
  *
 
 
6
  **/
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
10
  /**
11
  * Code Option Class
12
  *
 
13
  **/
14
+ class MobileMenuOptionCode extends MobileMenuOption {
 
15
 
16
  /**
17
  * Default settings specific for this container
21
 
22
  /**
23
  * (Optional) The language used for syntax highlighting for this option. The list of all supported languages are available in the Ace GitHub repo.
 
24
  * @var string
25
  */
26
  'lang' => 'css',
27
 
28
  /**
29
  * (Optional) The color theme used in the option. The list of all supported themes are available in the Ace GitHub repo.
 
30
  * @var string
31
  */
32
  'theme' => 'chrome',
33
 
34
  /**
35
  * (Optional) The height of the editor in pixels.
 
36
  * @var string
37
  */
38
  'height' => 200,
39
 
40
  /**
41
  * (Optional) The inputted code is automatically included in the frontend if the <code>lang</code> parameter is <code>css</code> or <code>javascript</code>. Setting this to false forces the option to stop including the code in the front end. This is useful if you want to use the option value in the back end or somewhere else.
 
42
  * @var bool
43
  */
44
  'enqueue' => true,
48
  /**
49
  * Constructor
50
  *
 
51
  */
52
  function __construct( $settings, $owner ) {
53
  parent::__construct( $settings, $owner );
55
  add_action( 'admin_enqueue_scripts', array( $this, 'loadAdminScripts' ) );
56
 
57
  // CSS generation for CSS code langs
58
+ add_filter( 'mm_generate_css_code_mobmenu', array( $this, 'generateCSSCode' ), 10, 2 );
59
  add_filter( 'wp_head', array( $this, 'printCSSForPagesAndPosts' ), 100 );
60
 
61
  // JS inclusion for Javascript code langs
63
  add_filter( 'wp_footer', array( $this, 'printJSForPagesAndPosts' ), 101 );
64
  }
65
 
 
66
  /**
67
  * Prints javascript code in the header using wp_print_scripts
68
  *
69
  * @return void
 
70
  */
71
  public function printJS() {
72
 
81
  }
82
 
83
  // For non-meta box options only
84
+ if ( MobileMenuOption::TYPE_META == $this->type ) {
85
  return;
86
  }
87
 
97
  * Prints javascript code in the header for meta options using wp_print_scripts
98
  *
99
  * @return void
 
100
  */
101
  public function printJSForPagesAndPosts() {
102
 
106
  }
107
 
108
  // This is for meta box options only, other types get generated normally
109
+ if ( MobileMenuOption::TYPE_META != $this->type ) {
110
  return;
111
  }
112
 
133
  * Prints CSS styles in the header for meta options using wp_print_scripts
134
  *
135
  * @return void
 
136
  */
137
  public function printCSSForPagesAndPosts() {
138
 
142
  }
143
 
144
  // This is for meta box options only, other types get generated normally
145
+ if ( MobileMenuOption::TYPE_META != $this->type ) {
146
  return;
147
  }
148
 
165
 
166
  // Print out valid CSS only
167
  require_once( trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'inc/scssphp/scss.inc.php' );
168
+ $scss = new mobmenuscssc();
169
  try {
170
  $css = $scss->compile( $css );
171
  echo "<style type='text/css' media='screen'>{$css}</style>";
176
 
177
  /**
178
  * Generates CSS to be included in our dynamically generated CSS file in
179
+ * MobileMenuCSS, using mm_generate_css_code
180
  *
181
  * @param string $css The CSS to output
182
+ * @param MobileMenuOption $option The option object being generated
183
  * @return void
 
184
  */
185
  public function generateCSSCode( $css, $option ) {
186
  if ( $this->settings['id'] != $option->settings['id'] ) {
192
  return $css;
193
  }
194
 
195
+ if ( MobileMenuOption::TYPE_META != $option->type ) {
196
  $css = $this->getValue();
197
  }
198
  return $css;
203
  * Loads the ACE library for displaying our syntax highlighted code editor
204
  *
205
  * @return void
 
206
  */
207
  public function loadAdminScripts() {
208
  wp_enqueue_code_editor(array('type' => 'text/css'));
209
  wp_localize_script('jquery', 'cm_settings', false);
210
+
211
  wp_enqueue_script('wp-theme-plugin-editor');
212
  wp_enqueue_style('wp-codemirror');
213
 
218
  * Displays the option for admin pages and meta boxes
219
  *
220
  * @return void
 
221
  */
222
  public function display() {
223
  $this->echoOptionHeader();
232
  $this->echoOptionFooter();
233
  }
234
 
 
235
  /**
236
  * Cleans the value for getOption
237
  *
238
  * @param string $value The raw value of the option
239
  * @return mixes The cleaned value
 
240
  */
241
  public function cleanValueForGetting( $value ) {
242
  return stripslashes( $value );
{options-framework → includes/plugin-settings}/lib/class-option-color.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionColor extends TitanFrameworkOption {
6
 
7
  /**
8
  * Default settings
@@ -21,8 +21,8 @@ class TitanFrameworkOptionColor extends TitanFrameworkOption {
21
 
22
  function __construct( $settings, $owner ) {
23
  parent::__construct( $settings, $owner );
24
- tf_add_action_once( 'admin_enqueue_scripts', array( $this, 'enqueueColorPickerScript' ) );
25
- tf_add_action_once( 'admin_footer', array( $this, 'startColorPicker' ) );
26
  }
27
 
28
 
@@ -37,7 +37,7 @@ class TitanFrameworkOptionColor extends TitanFrameworkOption {
37
 
38
  $this->echoOptionHeader();
39
 
40
- printf( '<input class="tf-colorpicker" type="text" name="%s" id="%s" value="%s" data-default-color="%s" data-custom-width="0" %s/>',
41
  esc_attr( $this->getID() ),
42
  esc_attr( $this->getID() ),
43
  esc_attr( $this->getValue() ),
@@ -61,7 +61,7 @@ class TitanFrameworkOptionColor extends TitanFrameworkOption {
61
  if ( $hook == 'toplevel_page_mobile-menu-options' ) {
62
  wp_enqueue_script( 'wp-color-picker' );
63
  wp_enqueue_style( 'wp-color-picker' );
64
- wp_enqueue_script( 'wp-color-picker-alpha', TitanFramework::getURL( '../js/min/wp-color-picker-alpha-min.js', __FILE__ ), array( 'wp-color-picker' ), WP_MOBILE_MENU_VERSION );
65
  }
66
  }
67
 
@@ -85,7 +85,7 @@ class TitanFrameworkOptionColor extends TitanFrameworkOption {
85
  jQuery(document).ready(function() {
86
  'use strict';
87
  if ( typeof jQuery.fn.wpColorPicker !== 'undefined' ) {
88
- jQuery('.tf-colorpicker').wpColorPicker();
89
  }
90
  });
91
  </script>
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionColor extends MobileMenuOption {
6
 
7
  /**
8
  * Default settings
21
 
22
  function __construct( $settings, $owner ) {
23
  parent::__construct( $settings, $owner );
24
+ mm_add_action_once( 'admin_enqueue_scripts', array( $this, 'enqueueColorPickerScript' ) );
25
+ mm_add_action_once( 'admin_footer', array( $this, 'startColorPicker' ) );
26
  }
27
 
28
 
37
 
38
  $this->echoOptionHeader();
39
 
40
+ printf( '<input class="mm-colorpicker" type="text" name="%s" id="%s" value="%s" data-default-color="%s" data-custom-width="0" %s/>',
41
  esc_attr( $this->getID() ),
42
  esc_attr( $this->getID() ),
43
  esc_attr( $this->getValue() ),
61
  if ( $hook == 'toplevel_page_mobile-menu-options' ) {
62
  wp_enqueue_script( 'wp-color-picker' );
63
  wp_enqueue_style( 'wp-color-picker' );
64
+ wp_enqueue_script( 'wp-color-picker-alpha', MobileMenuOptions::getURL( '../js/min/wp-color-picker-alpha-min.js', __FILE__ ), array( 'wp-color-picker' ), WP_MOBILE_MENU_VERSION );
65
  }
66
  }
67
 
85
  jQuery(document).ready(function() {
86
  'use strict';
87
  if ( typeof jQuery.fn.wpColorPicker !== 'undefined' ) {
88
+ jQuery('.mm-colorpicker').wpColorPicker();
89
  }
90
  });
91
  </script>
{options-framework → includes/plugin-settings}/lib/class-option-custom.php RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Custom option
4
  *
5
- * @package Titan Framework
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
13
  *
14
  * @since 1.0
15
  */
16
- class TitanFrameworkOptionCustom extends TitanFrameworkOption {
17
 
18
  /**
19
  * Default settings specific to this option
2
  /**
3
  * Custom option
4
  *
5
+ * @package Mobile Menu Settings
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
13
  *
14
  * @since 1.0
15
  */
16
+ class MobileMenuOptionCustom extends MobileMenuOption {
17
 
18
  /**
19
  * Default settings specific to this option
{options-framework → includes/plugin-settings}/lib/class-option-date.php RENAMED
@@ -4,7 +4,7 @@
4
  * Date Option Class
5
  *
6
  * @author Ardalan Naghshineh (www.ardalan.me)
7
- * @package Titan Framework Core
8
  **/
9
 
10
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
14
  *
15
  * @since 1.0
16
  **/
17
- class TitanFrameworkOptionDate extends TitanFrameworkOption {
18
 
19
  // Default settings specific to this option
20
  public $defaultSecondarySettings = array(
@@ -32,8 +32,8 @@ class TitanFrameworkOptionDate extends TitanFrameworkOption {
32
  function __construct( $settings, $owner ) {
33
  parent::__construct( $settings, $owner );
34
 
35
- tf_add_action_once( 'admin_enqueue_scripts', array( $this, 'enqueueDatepicker' ) );
36
- tf_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'enqueueDatepicker' ) );
37
  add_action( 'admin_head', array( __CLASS__, 'createCalendarScript' ) );
38
 
39
  if ( empty( self::$date_epoch ) ) {
@@ -82,7 +82,7 @@ class TitanFrameworkOptionDate extends TitanFrameworkOption {
82
  wp_enqueue_script( 'jquery-ui-core' );
83
  wp_enqueue_script( 'jquery-ui-slider' );
84
  wp_enqueue_script( 'jquery-ui-datepicker' );
85
- wp_enqueue_script( 'tf-jquery-ui-timepicker-addon', TitanFramework::getURL( '../js/min/jquery-ui-timepicker-addon-min.js', __FILE__ ), array( 'jquery-ui-datepicker', 'jquery-ui-slider' ) );
86
  }
87
 
88
 
@@ -102,7 +102,7 @@ class TitanFrameworkOptionDate extends TitanFrameworkOption {
102
  dateFormat: 'yy-mm-dd',
103
 
104
  beforeShow: function(input, inst) {
105
- $('#ui-datepicker-div').addClass('tf-date-datepicker');
106
 
107
  // Fix the button styles
108
  setTimeout( function() {
@@ -121,7 +121,7 @@ class TitanFrameworkOptionDate extends TitanFrameworkOption {
121
  }, 0);
122
  }
123
  };
124
- $('.tf-date input[type=text]').each(function() {
125
  var $this = $(this);
126
  if ( $this.hasClass('date') && ! $this.hasClass('time') ) {
127
  $this.datepicker( datepickerSettings );
4
  * Date Option Class
5
  *
6
  * @author Ardalan Naghshineh (www.ardalan.me)
7
+ * @package Mobile Menu Settings Core
8
  **/
9
 
10
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
14
  *
15
  * @since 1.0
16
  **/
17
+ class MobileMenuOptionDate extends MobileMenuOption {
18
 
19
  // Default settings specific to this option
20
  public $defaultSecondarySettings = array(
32
  function __construct( $settings, $owner ) {
33
  parent::__construct( $settings, $owner );
34
 
35
+ mm_add_action_once( 'admin_enqueue_scripts', array( $this, 'enqueueDatepicker' ) );
36
+ mm_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'enqueueDatepicker' ) );
37
  add_action( 'admin_head', array( __CLASS__, 'createCalendarScript' ) );
38
 
39
  if ( empty( self::$date_epoch ) ) {
82
  wp_enqueue_script( 'jquery-ui-core' );
83
  wp_enqueue_script( 'jquery-ui-slider' );
84
  wp_enqueue_script( 'jquery-ui-datepicker' );
85
+ wp_enqueue_script( 'mm-jquery-ui-timepicker-addon', MobileMenuOptions::getURL( '../js/min/jquery-ui-timepicker-addon-min.js', __FILE__ ), array( 'jquery-ui-datepicker', 'jquery-ui-slider' ) );
86
  }
87
 
88
 
102
  dateFormat: 'yy-mm-dd',
103
 
104
  beforeShow: function(input, inst) {
105
+ $('#ui-datepicker-div').addClass('mm-date-datepicker');
106
 
107
  // Fix the button styles
108
  setTimeout( function() {
121
  }, 0);
122
  }
123
  };
124
+ $('.mm-date input[type=text]').each(function() {
125
  var $this = $(this);
126
  if ( $this.hasClass('date') && ! $this.hasClass('time') ) {
127
  $this.datepicker( datepickerSettings );
{options-framework → includes/plugin-settings}/lib/class-option-editor.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionEditor extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'wpautop' => true,
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionEditor extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'wpautop' => true,
{options-framework → includes/plugin-settings}/lib/class-option-enable.php RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Enable option
4
  *
5
- * @package Titan Framework
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
@@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
25
  * @type enable
26
  * @availability Admin Pages|Meta Boxes|Customizer
27
  */
28
- class TitanFrameworkOptionEnable extends TitanFrameworkOption {
29
 
30
  private static $firstLoad = true;
31
 
@@ -76,9 +76,9 @@ class TitanFrameworkOptionEnable extends TitanFrameworkOption {
76
  <script>
77
  jQuery(document).ready(function($) {
78
  "use strict";
79
- $('body').on('click', '.tf-enable .button-secondary', function() {
80
  $(this).parent().find('.button').toggleClass('button-primary button-secondary');
81
- var checkBox = $(this).parents('.tf-enable').find('input');
82
  if ( checkBox.is(':checked') ) {
83
  checkBox.removeAttr('checked');
84
  } else {
2
  /**
3
  * Enable option
4
  *
5
+ * @package Mobile Menu Settings
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
25
  * @type enable
26
  * @availability Admin Pages|Meta Boxes|Customizer
27
  */
28
+ class MobileMenuOptionEnable extends MobileMenuOption {
29
 
30
  private static $firstLoad = true;
31
 
76
  <script>
77
  jQuery(document).ready(function($) {
78
  "use strict";
79
+ $('body').on('click', '.mm-enable .button-secondary', function() {
80
  $(this).parent().find('.button').toggleClass('button-primary button-secondary');
81
+ var checkBox = $(this).parents('.mm-enable').find('input');
82
  if ( checkBox.is(':checked') ) {
83
  checkBox.removeAttr('checked');
84
  } else {
includes/plugin-settings/lib/class-option-file.php ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
4
+ }
5
+ class MobileMenuOptionFile extends MobileMenuOption {
6
+
7
+ private static $firstLoad = true;
8
+
9
+ public $defaultSecondarySettings = array(
10
+ 'placeholder' => '', // Show this when blank.
11
+ 'label' => '', // Add label.
12
+ );
13
+
14
+ /**
15
+ * Constructor.
16
+ *
17
+ * @return void
18
+ *
19
+ */
20
+ function __construct( $settings, $owner ) {
21
+ parent::__construct( $settings, $owner );
22
+
23
+ add_filter( 'mm_generate_css_upload_mobmenu' , array( $this, 'generateCSS' ), 10, 2 );
24
+ add_action( 'mm_livepreview_pre_mobmenu' , array( $this, 'preLivePreview' ), 10, 3 );
25
+ add_action( 'mm_livepreview_post_mobmenu', array( $this, 'postLivePreview' ), 10, 3 );
26
+ }
27
+
28
+ /**
29
+ * Generates CSS for the font, this is used in MobileMenuCSS.
30
+ *
31
+ * @param String $css The CSS generated.
32
+ * @param MobileMenuOption $option The current option being processed.
33
+ * @return String The CSS generated.
34
+ *
35
+ */
36
+ public function generateCSS( $css, $option ) {
37
+ if ( $this->settings['id'] != $option->settings['id'] ) {
38
+ return $css;
39
+ }
40
+
41
+ $value = $this->getValue();
42
+
43
+ if ( empty( $value ) ) {
44
+ return $css;
45
+ }
46
+
47
+ $css .= '$' . $option->settings['id'] . ': url(' . $value . ');';
48
+
49
+ if ( ! empty( $option->settings['css'] ) ) {
50
+ // In the css parameter, we accept the term `value` as our current value,
51
+ // translate it into the SaSS variable for the current option.
52
+ $css .= str_replace( 'value', '#{$' . $option->settings['id'] . '}', $option->settings['css'] );
53
+ }
54
+
55
+ return $css;
56
+ }
57
+
58
+
59
+ /**
60
+ * The upload option gives out an attachment ID. Live previews will not work since we cannot get.
61
+ * the upload URL from an ID easily. Use a specially created Ajax Handler for just getting the URL.
62
+ *
63
+ * @see tf_file_upload_option_customizer_get_value()
64
+ */
65
+ public function preLivePreview( $optionID, $optionType, $option ) {
66
+ if ( $optionID != $this->settings['id'] ) {
67
+ return;
68
+ }
69
+
70
+ $nonce = wp_create_nonce( 'tf_file_upload_option_nonce' );
71
+
72
+ ?>
73
+ wp.ajax.send( 'tf_file_upload_option_customizer_get_value', {
74
+ data: {
75
+ nonce: '<?php echo esc_attr( $nonce ); ?>',
76
+ id: value
77
+ },
78
+ success: function( data ) {
79
+ var $ = jQuery;
80
+ var value = data;
81
+ <?php
82
+ }
83
+
84
+
85
+ /**
86
+ * Closes the Javascript code created in preLivePreview().
87
+ *
88
+ * @see preLivePreview()
89
+ */
90
+ public function postLivePreview( $optionID, $optionType, $option ) {
91
+ if ( $optionID != $this->settings['id'] ) {
92
+ return;
93
+ }
94
+
95
+ // Close the ajax call.
96
+ ?>
97
+ }
98
+ });
99
+ <?php
100
+ }
101
+
102
+ /*
103
+ * Display for options and meta.
104
+ */
105
+ public function display() {
106
+ self::createUploaderScript();
107
+
108
+ $this->echoOptionHeader();
109
+
110
+ // Display the preview file name.
111
+ $value = $this->getValue();
112
+ if ( ! is_array( $value ) ) {
113
+ $value = $this->getValue();
114
+ }
115
+
116
+ $previewFile = '';
117
+ if ( ! empty( $value ) ) {
118
+ $previewFile = "<i class='dashicons dashicons-no-alt remove'></i><p>". basename( get_attached_file( $value ) ) . "</p>";
119
+ } else {
120
+ $previewFile = $this->settings['label'];
121
+ }
122
+ echo "<div class='mm-file-upload'>" . $previewFile . '</div>';
123
+
124
+ printf('<input name="%s" placeholder="%s" id="%s" type="hidden" value="%s" />',
125
+ $this->getID(),
126
+ $this->settings['placeholder'],
127
+ $this->getID(),
128
+ esc_attr( $this->getValue() )
129
+ );
130
+ $this->echoOptionFooter();
131
+ }
132
+
133
+ public static function createUploaderScript() {
134
+ if ( ! self::$firstLoad ) {
135
+ return;
136
+ }
137
+ self::$firstLoad = false;
138
+
139
+ ?>
140
+ <script>
141
+ jQuery(document).ready(function($){
142
+ "use strict";
143
+
144
+ // In the theme customizer, the load event above doesn't work because of the accordion,
145
+ // the image's height & width are detected as 0. We bind to the opening of an accordion
146
+ // and adjust the image placement from there.
147
+ var tfUploadAccordionSections = [];
148
+ $('.mm-file-upload').each(function() {
149
+ var $accordion = $(this).parents('.control-section.accordion-section');
150
+ if ( $accordion.length > 0 ) {
151
+ if ( $.inArray( $accordion, tfUploadAccordionSections ) == -1 ) {
152
+ tfUploadAccordionSections.push($accordion);
153
+ }
154
+ }
155
+ });
156
+ $.each( tfUploadAccordionSections, function() {
157
+ var $title = $(this).find('.accordion-section-title:eq(0)'); // just opening the section
158
+ $title.click(function() {
159
+ var $accordion = $(this).parents('.control-section.accordion-section');
160
+ if ( ! $accordion.is('.open') ) {
161
+ $accordion.find('.mm-file-upload .thumbnail img').each(function() {
162
+ var $this = $(this);
163
+ });
164
+ }
165
+ });
166
+ });
167
+
168
+
169
+ // Remove the image when the remove link is clicked.
170
+ $('body').on('click', '.mm-file-upload i.remove', function(event) {
171
+ event.preventDefault();
172
+ var _input = $(this).parents('.mm-file').find('input');
173
+ _input.siblings('.mm-file-upload').html('');
174
+ _input.val('').trigger('change');
175
+
176
+ return false;
177
+ });
178
+
179
+
180
+ // Open the upload media lightbox when the upload button is clicked.
181
+ $('body').on('click', '.mm-file-upload', function(event) {
182
+ event.preventDefault();
183
+ // If we have a smaller image, users can click on the thumbnail.
184
+ var _this = $(this);
185
+ var _input = $(this).parents('.mm-file').find('input');
186
+ var _remove = $(this).siblings('.mm-file-upload-remove');
187
+
188
+ // Uploader frame properties.
189
+ var frame = wp.media({
190
+ title: '<?php esc_html_e( 'Select File', 'mobile-menu' ) ?>',
191
+ multiple: false,
192
+ button : { text : '<?php esc_html_e( 'Use file', 'mobile-menu' ) ?>' }
193
+ });
194
+
195
+ // Get the url when done.
196
+ frame.on('select', function() {
197
+ var selection = frame.state().get('selection');
198
+ selection.each(function(attachment) {
199
+ _input.val(attachment.id).trigger('change');
200
+ // document.getElementById(_input.id).value = attachment.id;
201
+ console.info(_input.val());
202
+ // Change filename.
203
+ _this.html("<i class='dashicons dashicons-no-alt remove'></i><p>"+attachment.attributes.filename+"</p>");
204
+
205
+ _remove.show();
206
+ });
207
+ frame.off('select');
208
+ });
209
+
210
+ // Open the uploader.
211
+ frame.open();
212
+
213
+ return false;
214
+ });
215
+ });
216
+ </script>
217
+ <?php
218
+ }
219
+ }
{options-framework → includes/plugin-settings}/lib/class-option-font.php RENAMED
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
12
  *
13
  * @since 1.4
14
  */
15
- class TitanFrameworkOptionFont extends TitanFrameworkOption {
16
 
17
  // Default settings specific to this option
18
  public $defaultSecondarySettings = array(
@@ -76,51 +76,46 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
76
  // We need to do this since we want to gather all the fonts first then enqueue only the unique fonts
77
  private static $optionsToEnqueue = array();
78
 
79
-
80
  /**
81
  * Constructor
82
  *
83
  * @return void
84
- * @since 1.4
85
  */
86
  function __construct( $settings, $owner ) {
87
  parent::__construct( $settings, $owner );
88
 
89
- tf_add_action_once( 'admin_enqueue_scripts', array( $this, 'loadAdminScripts' ) );
90
- tf_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'loadAdminScripts' ) );
91
- tf_add_action_once( 'admin_head', array( __CLASS__, 'createFontScript' ) );
92
- tf_add_action_once( 'wp_enqueue_scripts', array( $this, 'enqueueGooglefonts' ) );
93
- add_filter( 'tf_generate_css_font_' . $this->getOptionNamespace(), array( $this, 'generateCSS' ), 10, 2 );
94
 
95
  // Customizer preview handling
96
- tf_add_action_once( 'tf_generate_customizer_preview_js', array( $this, 'generateCustomizerPreviewJS' ) );
97
- tf_add_filter_once( 'tf_generate_customizer_preview_css_' . $this->getOptionNamespace(), array( $this, 'generateCustomizerPreviewCSS' ) );
98
 
99
  if ( $this->settings['enqueue'] ) {
100
  self::$optionsToEnqueue[] = $this;
101
  }
102
  }
103
 
104
-
105
  /**
106
  * Adds the Javascript code that adds Google fonts straight into the customizer preview.
107
  *
108
- * @since 1.9.2
109
- *
110
  * @return void
111
  *
112
  */
113
  public function generateCustomizerPreviewJS() {
114
  ?>
115
  for ( var fontName in data.google_fonts ) {
116
- if ( document.querySelector( '#tf-preview-' + fontName ) ) {
117
  continue;
118
  }
119
  var link = document.createElement('LINK');
120
  link.setAttribute( 'rel', 'stylesheet' );
121
  link.setAttribute( 'type', 'text/css' );
122
  link.setAttribute( 'media', 'all' );
123
- link.setAttribute( 'id', 'tf-preview' + fontName );
124
  link.setAttribute( 'href', data.google_fonts[ fontName ] );
125
  document.head.appendChild( link );
126
  }
@@ -131,8 +126,6 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
131
  /**
132
  * Adds the list of all Google fonts into the customizer live preview
133
  *
134
- * @since 1.9.2
135
- *
136
  * @param array $generated The parameters to pass to the ajax handler during customizer live previews.
137
  *
138
  * @return array An array containing modified ajax values to pass
@@ -150,8 +143,6 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
150
  * Gets all the Google font URLs for enqueuing. This was previously inside $this->enqueueGooglefonts()
151
  * but was split off so it can be used by other functions.
152
  *
153
- * @since 1.9.2
154
- *
155
  * @return array An array containing the font names as keys and the font URLs as values.
156
  */
157
  public function getGoogleFontURLs() {
@@ -229,30 +220,27 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
229
  return $urls;
230
  }
231
 
232
-
233
  /**
234
  * Enqueues all the Google fonts, used in wp_enqueue_scripts
235
  *
236
- * @since 1.4
237
- *
238
  * @return void
239
  */
240
  public function enqueueGooglefonts() {
241
  $urls = $this->getGoogleFontURLs();
242
 
243
  foreach ( $urls as $fontName => $url ) {
244
- wp_enqueue_style( 'tf-google-webfont-' . strtolower( str_replace( ' ', '-', $fontName ) ), $url );
245
  }
246
  }
247
 
248
 
249
  /**
250
- * Generates CSS for the font, this is used in TitanFrameworkCSS
251
  *
252
  * @param string $css The CSS generated
253
- * @param TitanFrameworkOption $option The current option being processed
254
  * @return string The CSS generated
255
- * @since 1.4
256
  */
257
  public function generateCSS( $css, $option ) {
258
  if ( $this->settings['id'] != $option->settings['id'] ) {
@@ -315,7 +303,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
315
  $textShadow .= $value['text-shadow-blur'];
316
  $textShadow .= ' ';
317
 
318
- $rgb = tf_hex2rgb( $value['text-shadow-color'] );
319
  $rgb[] = $value['text-shadow-opacity'];
320
 
321
  $textShadow .= 'rgba(' . implode( ',', $rgb ) . ')';
@@ -330,11 +318,6 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
330
  $css .= '$' . $option->settings['id'] . '-' . $key . ': ' . $value[ $key ] . ';';
331
  }
332
 
333
- /*
334
- * There are 2 ways to include the values for the CSS. The normal `value-arraykey`, or just `value`
335
- * Using `value` will print out the entire font CSS.
336
- */
337
-
338
  // Create the entire CSS for the font, this should just be used to replace the `value` variable.
339
  $cssVariables = '';
340
  $cssChecking = array( 'font_family', 'color', 'font_size', 'font_weight', 'font_style', 'line_height', 'letter_spacing', 'text_transform', 'font_variant', 'text_shadow' );
@@ -373,7 +356,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
373
  * Enqueues the needed scripts for the admin
374
  *
375
  * @return void
376
- * @since 1.4
377
  */
378
  public function loadAdminScripts() {
379
  wp_enqueue_script( 'wp-color-picker' );
@@ -385,7 +368,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
385
  * Creates the Javascript for running the font option
386
  *
387
  * @return void
388
- * @since 1.4
389
  */
390
  public static function createFontScript() {
391
 
@@ -397,7 +380,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
397
  var _tf_select_font_throttle = null;
398
 
399
  // Initialize color pickers
400
- $('.tf-font .tf-font-sel-color, .tf-font .tf-font-sel-shadow-color').wpColorPicker({
401
  change: function ( event, ui ) {
402
  // update the preview, but throttle it to prevent fast loading
403
  if ( _tf_select_font_throttle != null ) {
@@ -406,23 +389,23 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
406
  }
407
  var $this = $(this);
408
  _tf_select_font_throttle = setTimeout( function() {
409
- tf_select_font_update_preview( $this.parents('.tf-font:eq(0)'), true );
410
  }, 300 );
411
  }
412
  });
413
 
414
 
415
  // Initialize the option
416
- $('.tf-font').each(function() {
417
 
418
  // Update save field on change
419
- $(this).find('select,.tf-font-sel-dark').change(function() {
420
- tf_select_font_update_preview( $(this).parents('.tf-font:eq(0)'), true );
421
  });
422
 
423
  // Trigger for toggling light/dark preview backgrounds
424
  $(this).find('.btn-dark').click(function() {
425
- var darkInput = $(this).parent().find('.tf-font-sel-dark');
426
  if ( darkInput.val() == '' ) {
427
  darkInput.val('dark').trigger('change');
428
  } else {
@@ -431,13 +414,13 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
431
  })
432
 
433
  // initialize preview
434
- tf_select_font_update_preview( $(this), true );
435
 
436
  // We have to do this after 1ms for the theme customizer, or else the field's value
437
  // gets changed to a weird value
438
  var $this = $(this);
439
  setTimeout( function() {
440
- tf_select_font_update_preview( $this, false )
441
  }, 1 );
442
  });
443
 
@@ -447,12 +430,12 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
447
  */
448
 
449
  // Check for font selector clicks, we need to adjust styles to make it look nice
450
- $('body.wp-customizer .tf-font').on('mouseup', function(e) {
451
  if ( $(e.target).is('.wp-color-result') ) {
452
  if ( ! $(e.target).is('.wp-picker-open') ) {
453
- $(e.target).parents('label:eq(0)').addClass('tf-picker-open');
454
  } else {
455
- $(e.target).parents('label:eq(0)').removeClass('tf-picker-open');
456
  }
457
  }
458
  });
@@ -466,64 +449,64 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
466
  if ( $target.parents('.wp-picker-holder').length > 0 ) {
467
  return;
468
  }
469
- if ( $('.tf-picker-open').length > 0 ) {
470
- $('.tf-picker-open').removeClass('tf-picker-open');
471
  }
472
  });
473
  });
474
 
475
 
476
  // Updates the option elements
477
- function tf_select_font_update_preview( $container, doTrigger ) {
478
  "use strict";
479
  var $ = jQuery;
480
 
481
  // Show / hide shadow fields
482
- if ( $container.find(".tf-font-sel-location").val() == 'none'
483
- || $container.find('.tf-font-sel-location').parents('label:eq(0)').attr('data-visible') == 'false' ) {
484
- $container.find(".tf-font-sel-distance").parents('label:eq(0)').fadeOut();
485
- $container.find(".tf-font-sel-blur").parents('label:eq(0)').fadeOut();
486
- $container.find(".tf-font-sel-shadow-color").parents('label:eq(0)').fadeOut();
487
- $container.find(".tf-font-sel-opacity").parents('label:eq(0)').fadeOut();
488
  } else {
489
- $container.find(".tf-font-sel-distance").parents('label:eq(0)').fadeIn();
490
- $container.find(".tf-font-sel-blur").parents('label:eq(0)').fadeIn();
491
- $container.find(".tf-font-sel-shadow-color").parents('label:eq(0)').fadeIn();
492
- $container.find(".tf-font-sel-opacity").parents('label:eq(0)').fadeIn();
493
  }
494
 
495
- var family = $container.find('.tf-font-sel-family').val();
496
 
497
  // These are all our parameters
498
  var params = {
499
  'font-family': family,
500
- 'font-type': $container.find(".tf-font-sel-family option[value='" + family + "']").parent().attr('class'),
501
- 'color': $container.find(".tf-font-sel-color").val(),
502
- 'font-size': $container.find(".tf-font-sel-size").val(),
503
- 'font-weight': $container.find(".tf-font-sel-weight").val(),
504
- 'font-style': $container.find(".tf-font-sel-style").val(),
505
- 'line-height': $container.find(".tf-font-sel-height").val(),
506
- 'letter-spacing': $container.find(".tf-font-sel-spacing").val(),
507
- 'text-transform': $container.find(".tf-font-sel-transform").val(),
508
- 'font-variant': $container.find(".tf-font-sel-variant").val(),
509
- 'text-shadow-location': $container.find(".tf-font-sel-location").val(),
510
- 'text-shadow-distance': $container.find(".tf-font-sel-distance").val(),
511
- 'text-shadow-blur': $container.find(".tf-font-sel-blur").val(),
512
- 'text-shadow-color': $container.find(".tf-font-sel-shadow-color").val(),
513
- 'text-shadow-opacity': $container.find(".tf-font-sel-opacity").val(),
514
- 'dark': $container.find(".tf-font-sel-dark").val(),
515
  'text': $container.find("iframe").attr('data-preview-text')
516
  }
517
 
518
  // Update preview
519
  if ( $container.find('iframe').is(':not([data-visible=false])') ) {
520
- $container.find('iframe').attr('src', '<?php echo TitanFramework::getURL( 'iframe-font-preview.php?', __FILE__ ) ?>' + $.param(params) );
521
  }
522
 
523
  // Update hidden save field
524
- $container.find('.tf-for-saving').val(serialize(params));
525
  if ( doTrigger ) {
526
- $container.find('.tf-for-saving').trigger('change');
527
  }
528
  }
529
  </script>
@@ -559,7 +542,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
559
  <div>
560
  <label <?php echo $visibilityAttrs ?>>
561
  Font Family
562
- <select class='tf-font-sel-family'>
563
  <option value='inherit'>inherit</option>
564
  <?php
565
 
@@ -601,7 +584,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
601
  ?>
602
  <optgroup label="Google WebFonts" class='google'>
603
  <?php
604
- $allFonts = titan_get_googlefonts();
605
  foreach ( $allFonts as $key => $fontStuff ) {
606
 
607
  // Show only the include_fonts (font names) if provided, uses regex.
@@ -653,7 +636,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
653
  ?>
654
  <label <?php echo $visibilityAttrs ?>>
655
  Color
656
- <input class='tf-font-sel-color' type="text" value="<?php echo esc_attr( $value['color'] ) ?>" data-default-color="<?php echo esc_attr( $value['color'] ) ?>"/>
657
  </label>
658
  <?php
659
 
@@ -664,7 +647,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
664
  ?>
665
  <label <?php echo $visibilityAttrs ?>>
666
  Font Size
667
- <select class='tf-font-sel-size'>
668
  <option value='inherit'>inherit</option>
669
  <?php
670
  for ( $i = 1; $i <= 150; $i++ ) {
@@ -693,7 +676,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
693
  ?>
694
  <label <?php echo $visibilityAttrs ?>>
695
  Font Weight
696
- <select class='tf-font-sel-weight'>
697
  <option value='inherit'>inherit</option>
698
  <?php
699
  $options = array( 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' );
@@ -716,7 +699,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
716
  ?>
717
  <label <?php echo $visibilityAttrs ?>>
718
  Font Style
719
- <select class='tf-font-sel-style'>
720
  <?php
721
  $options = array( 'normal', 'italic' );
722
  foreach ( $options as $option ) {
@@ -738,7 +721,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
738
  ?>
739
  <label <?php echo $visibilityAttrs ?>>
740
  Line Height
741
- <select class='tf-font-sel-height'>
742
  <?php
743
  for ( $i = .5; $i <= 3; $i += 0.1 ) {
744
  printf( "<option value='%s'%s>%s</option>",
@@ -759,7 +742,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
759
  ?>
760
  <label <?php echo $visibilityAttrs ?>>
761
  Letter Spacing
762
- <select class='tf-font-sel-spacing'>
763
  <option value='normal'>normal</option>
764
  <?php
765
  for ( $i = -20; $i <= 20; $i++ ) {
@@ -781,7 +764,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
781
  ?>
782
  <label <?php echo $visibilityAttrs ?>>
783
  Text Transform
784
- <select class='tf-font-sel-transform'>
785
  <?php
786
  $options = array( 'none', 'capitalize', 'uppercase', 'lowercase' );
787
  foreach ( $options as $option ) {
@@ -803,7 +786,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
803
  ?>
804
  <label <?php echo $visibilityAttrs ?>>
805
  Font Variant
806
- <select class='tf-font-sel-variant'>
807
  <?php
808
  $options = array( 'normal', 'small-caps' );
809
  foreach ( $options as $option ) {
@@ -825,7 +808,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
825
  ?>
826
  <label <?php echo $visibilityAttrs ?>>
827
  Shadow Location
828
- <select class='tf-font-sel-location'>
829
  <?php
830
  $options = array( 'none', 'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right' );
831
  foreach ( $options as $option ) {
@@ -840,7 +823,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
840
  </label>
841
  <label style='display: none'>
842
  Shadow Distance
843
- <select class='tf-font-sel-distance'>
844
  <?php
845
  for ( $i = 0; $i <= 10; $i++ ) {
846
  printf( "<option value='%s'%s>%s</option>",
@@ -854,7 +837,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
854
  </label>
855
  <label style='display: none'>
856
  Shadow Blur
857
- <select class='tf-font-sel-blur'>
858
  <?php
859
  $options = array( '0px', '1px', '2px', '3px', '4px', '5px', '10px', '20px' );
860
  foreach ( $options as $option ) {
@@ -869,11 +852,11 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
869
  </label>
870
  <label style='display: none'>
871
  Shadow Color
872
- <input class="tf-font-sel-shadow-color" type="text" value="<?php echo esc_attr( $value['text-shadow-color'] ) ?>" data-default-color="<?php echo esc_attr( $value['text-shadow-color'] ) ?>"/>
873
  </label>
874
  <label style='display: none'>
875
  Shadow Opacity
876
- <select class='tf-font-sel-opacity'>
877
  <?php
878
  $options = array( '1', '0.9', '0.8', '0.7', '0.6', '0.5', '0.4', '0.3', '0.2', '0.1', '0' );
879
  foreach ( $options as $option ) {
@@ -897,7 +880,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
897
  <div <?php echo $visibilityAttrs ?>>
898
  <iframe data-preview-text='<?php echo esc_attr( $this->settings['preview_text'] ) ?>'></iframe>
899
  <i class='dashicons dashicons-admin-appearance btn-dark'></i>
900
- <input type='hidden' class='tf-font-sel-dark' value='<?php echo esc_attr( $value['dark'] ? 'dark' : '' ) ?>'/>
901
  </div>
902
  <?php
903
 
@@ -905,7 +888,7 @@ class TitanFrameworkOptionFont extends TitanFrameworkOption {
905
  $value = serialize( $value );
906
  }
907
 
908
- printf("<input type='hidden' class='tf-for-saving' name='%s' id='%s' value='%s' />",
909
  $this->getID(),
910
  $this->getID(),
911
  esc_attr( $value )
12
  *
13
  * @since 1.4
14
  */
15
+ class MobileMenuOptionFont extends MobileMenuOption {
16
 
17
  // Default settings specific to this option
18
  public $defaultSecondarySettings = array(
76
  // We need to do this since we want to gather all the fonts first then enqueue only the unique fonts
77
  private static $optionsToEnqueue = array();
78
 
 
79
  /**
80
  * Constructor
81
  *
82
  * @return void
 
83
  */
84
  function __construct( $settings, $owner ) {
85
  parent::__construct( $settings, $owner );
86
 
87
+ mm_add_action_once( 'admin_enqueue_scripts', array( $this, 'loadAdminScripts' ) );
88
+ mm_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'loadAdminScripts' ) );
89
+ mm_add_action_once( 'admin_head', array( __CLASS__, 'createFontScript' ) );
90
+ mm_add_action_once( 'wp_enqueue_scripts', array( $this, 'enqueueGooglefonts' ) );
91
+ add_filter( 'mm_generate_css_font_mobmenu', array( $this, 'generateCSS' ), 10, 2 );
92
 
93
  // Customizer preview handling
94
+ mm_add_action_once( 'mm_generate_customizer_preview_js', array( $this, 'generateCustomizerPreviewJS' ) );
95
+ mm_add_filter_once( 'mm_generate_customizer_preview_css_mobmenu' , array( $this, 'generateCustomizerPreviewCSS' ) );
96
 
97
  if ( $this->settings['enqueue'] ) {
98
  self::$optionsToEnqueue[] = $this;
99
  }
100
  }
101
 
 
102
  /**
103
  * Adds the Javascript code that adds Google fonts straight into the customizer preview.
104
  *
 
 
105
  * @return void
106
  *
107
  */
108
  public function generateCustomizerPreviewJS() {
109
  ?>
110
  for ( var fontName in data.google_fonts ) {
111
+ if ( document.querySelector( '#mm-preview-' + fontName ) ) {
112
  continue;
113
  }
114
  var link = document.createElement('LINK');
115
  link.setAttribute( 'rel', 'stylesheet' );
116
  link.setAttribute( 'type', 'text/css' );
117
  link.setAttribute( 'media', 'all' );
118
+ link.setAttribute( 'id', 'mm-preview' + fontName );
119
  link.setAttribute( 'href', data.google_fonts[ fontName ] );
120
  document.head.appendChild( link );
121
  }
126
  /**
127
  * Adds the list of all Google fonts into the customizer live preview
128
  *
 
 
129
  * @param array $generated The parameters to pass to the ajax handler during customizer live previews.
130
  *
131
  * @return array An array containing modified ajax values to pass
143
  * Gets all the Google font URLs for enqueuing. This was previously inside $this->enqueueGooglefonts()
144
  * but was split off so it can be used by other functions.
145
  *
 
 
146
  * @return array An array containing the font names as keys and the font URLs as values.
147
  */
148
  public function getGoogleFontURLs() {
220
  return $urls;
221
  }
222
 
 
223
  /**
224
  * Enqueues all the Google fonts, used in wp_enqueue_scripts
225
  *
 
 
226
  * @return void
227
  */
228
  public function enqueueGooglefonts() {
229
  $urls = $this->getGoogleFontURLs();
230
 
231
  foreach ( $urls as $fontName => $url ) {
232
+ wp_enqueue_style( 'mm-google-webfont-' . strtolower( str_replace( ' ', '-', $fontName ) ), $url );
233
  }
234
  }
235
 
236
 
237
  /**
238
+ * Generates CSS for the font, this is used in MobileMenuCSS
239
  *
240
  * @param string $css The CSS generated
241
+ * @param MobileMenuOption $option The current option being processed
242
  * @return string The CSS generated
243
+ *
244
  */
245
  public function generateCSS( $css, $option ) {
246
  if ( $this->settings['id'] != $option->settings['id'] ) {
303
  $textShadow .= $value['text-shadow-blur'];
304
  $textShadow .= ' ';
305
 
306
+ $rgb = mm_hex2rgb( $value['text-shadow-color'] );
307
  $rgb[] = $value['text-shadow-opacity'];
308
 
309
  $textShadow .= 'rgba(' . implode( ',', $rgb ) . ')';
318
  $css .= '$' . $option->settings['id'] . '-' . $key . ': ' . $value[ $key ] . ';';
319
  }
320
 
 
 
 
 
 
321
  // Create the entire CSS for the font, this should just be used to replace the `value` variable.
322
  $cssVariables = '';
323
  $cssChecking = array( 'font_family', 'color', 'font_size', 'font_weight', 'font_style', 'line_height', 'letter_spacing', 'text_transform', 'font_variant', 'text_shadow' );
356
  * Enqueues the needed scripts for the admin
357
  *
358
  * @return void
359
+ *
360
  */
361
  public function loadAdminScripts() {
362
  wp_enqueue_script( 'wp-color-picker' );
368
  * Creates the Javascript for running the font option
369
  *
370
  * @return void
371
+ *
372
  */
373
  public static function createFontScript() {
374
 
380
  var _tf_select_font_throttle = null;
381
 
382
  // Initialize color pickers
383
+ $('.mm-font .mm-font-sel-color, .mm-font .mm-font-sel-shadow-color').wpColorPicker({
384
  change: function ( event, ui ) {
385
  // update the preview, but throttle it to prevent fast loading
386
  if ( _tf_select_font_throttle != null ) {
389
  }
390
  var $this = $(this);
391
  _tf_select_font_throttle = setTimeout( function() {
392
+ mm_select_font_update_preview( $this.parents('.mm-font:eq(0)'), true );
393
  }, 300 );
394
  }
395
  });
396
 
397
 
398
  // Initialize the option
399
+ $('.mm-font').each(function() {
400
 
401
  // Update save field on change
402
+ $(this).find('select,.mm-font-sel-dark').change(function() {
403
+ mm_select_font_update_preview( $(this).parents('.mm-font:eq(0)'), true );
404
  });
405
 
406
  // Trigger for toggling light/dark preview backgrounds
407
  $(this).find('.btn-dark').click(function() {
408
+ var darkInput = $(this).parent().find('.mm-font-sel-dark');
409
  if ( darkInput.val() == '' ) {
410
  darkInput.val('dark').trigger('change');
411
  } else {
414
  })
415
 
416
  // initialize preview
417
+ mm_select_font_update_preview( $(this), true );
418
 
419
  // We have to do this after 1ms for the theme customizer, or else the field's value
420
  // gets changed to a weird value
421
  var $this = $(this);
422
  setTimeout( function() {
423
+ mm_select_font_update_preview( $this, false )
424
  }, 1 );
425
  });
426
 
430
  */
431
 
432
  // Check for font selector clicks, we need to adjust styles to make it look nice
433
+ $('body.wp-customizer .mm-font').on('mouseup', function(e) {
434
  if ( $(e.target).is('.wp-color-result') ) {
435
  if ( ! $(e.target).is('.wp-picker-open') ) {
436
+ $(e.target).parents('label:eq(0)').addClass('mm-picker-open');
437
  } else {
438
+ $(e.target).parents('label:eq(0)').removeClass('mm-picker-open');
439
  }
440
  }
441
  });
449
  if ( $target.parents('.wp-picker-holder').length > 0 ) {
450
  return;
451
  }
452
+ if ( $('.mm-picker-open').length > 0 ) {
453
+ $('.mm-picker-open').removeClass('mm-picker-open');
454
  }
455
  });
456
  });
457
 
458
 
459
  // Updates the option elements
460
+ function mm_select_font_update_preview( $container, doTrigger ) {
461
  "use strict";
462
  var $ = jQuery;
463
 
464
  // Show / hide shadow fields
465
+ if ( $container.find(".mm-font-sel-location").val() == 'none'
466
+ || $container.find('.mm-font-sel-location').parents('label:eq(0)').attr('data-visible') == 'false' ) {
467
+ $container.find(".mm-font-sel-distance").parents('label:eq(0)').fadeOut();
468
+ $container.find(".mm-font-sel-blur").parents('label:eq(0)').fadeOut();
469
+ $container.find(".mm-font-sel-shadow-color").parents('label:eq(0)').fadeOut();
470
+ $container.find(".mm-font-sel-opacity").parents('label:eq(0)').fadeOut();
471
  } else {
472
+ $container.find(".mm-font-sel-distance").parents('label:eq(0)').fadeIn();
473
+ $container.find(".mm-font-sel-blur").parents('label:eq(0)').fadeIn();
474
+ $container.find(".mm-font-sel-shadow-color").parents('label:eq(0)').fadeIn();
475
+ $container.find(".mm-font-sel-opacity").parents('label:eq(0)').fadeIn();
476
  }
477
 
478
+ var family = $container.find('.mm-font-sel-family').val();
479
 
480
  // These are all our parameters
481
  var params = {
482
  'font-family': family,
483
+ 'font-type': $container.find(".mm-font-sel-family option[value='" + family + "']").parent().attr('class'),
484
+ 'color': $container.find(".mm-font-sel-color").val(),
485
+ 'font-size': $container.find(".mm-font-sel-size").val(),
486
+ 'font-weight': $container.find(".mm-font-sel-weight").val(),
487
+ 'font-style': $container.find(".mm-font-sel-style").val(),
488
+ 'line-height': $container.find(".mm-font-sel-height").val(),
489
+ 'letter-spacing': $container.find(".mm-font-sel-spacing").val(),
490
+ 'text-transform': $container.find(".mm-font-sel-transform").val(),
491
+ 'font-variant': $container.find(".mm-font-sel-variant").val(),
492
+ 'text-shadow-location': $container.find(".mm-font-sel-location").val(),
493
+ 'text-shadow-distance': $container.find(".mm-font-sel-distance").val(),
494
+ 'text-shadow-blur': $container.find(".mm-font-sel-blur").val(),
495
+ 'text-shadow-color': $container.find(".mm-font-sel-shadow-color").val(),
496
+ 'text-shadow-opacity': $container.find(".mm-font-sel-opacity").val(),
497
+ 'dark': $container.find(".mm-font-sel-dark").val(),
498
  'text': $container.find("iframe").attr('data-preview-text')
499
  }
500
 
501
  // Update preview
502
  if ( $container.find('iframe').is(':not([data-visible=false])') ) {
503
+ $container.find('iframe').attr('src', '<?php echo MobileMenuOptions::getURL( 'iframe-font-preview.php?', __FILE__ ) ?>' + $.param(params) );
504
  }
505
 
506
  // Update hidden save field
507
+ $container.find('.mm-for-saving').val(serialize(params));
508
  if ( doTrigger ) {
509
+ $container.find('.mm-for-saving').trigger('change');
510
  }
511
  }
512
  </script>
542
  <div>
543
  <label <?php echo $visibilityAttrs ?>>
544
  Font Family
545
+ <select class='mm-font-sel-family'>
546
  <option value='inherit'>inherit</option>
547
  <?php
548
 
584
  ?>
585
  <optgroup label="Google WebFonts" class='google'>
586
  <?php
587
+ $allFonts = mobmenu_get_googlefonts();
588
  foreach ( $allFonts as $key => $fontStuff ) {
589
 
590
  // Show only the include_fonts (font names) if provided, uses regex.
636
  ?>
637
  <label <?php echo $visibilityAttrs ?>>
638
  Color
639
+ <input class='mm-font-sel-color' type="text" value="<?php echo esc_attr( $value['color'] ) ?>" data-default-color="<?php echo esc_attr( $value['color'] ) ?>"/>
640
  </label>
641
  <?php
642
 
647
  ?>
648
  <label <?php echo $visibilityAttrs ?>>
649
  Font Size
650
+ <select class='mm-font-sel-size'>
651
  <option value='inherit'>inherit</option>
652
  <?php
653
  for ( $i = 1; $i <= 150; $i++ ) {
676
  ?>
677
  <label <?php echo $visibilityAttrs ?>>
678
  Font Weight
679
+ <select class='mm-font-sel-weight'>
680
  <option value='inherit'>inherit</option>
681
  <?php
682
  $options = array( 'normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900' );
699
  ?>
700
  <label <?php echo $visibilityAttrs ?>>
701
  Font Style
702
+ <select class='mm-font-sel-style'>
703
  <?php
704
  $options = array( 'normal', 'italic' );
705
  foreach ( $options as $option ) {
721
  ?>
722
  <label <?php echo $visibilityAttrs ?>>
723
  Line Height
724
+ <select class='mm-font-sel-height'>
725
  <?php
726
  for ( $i = .5; $i <= 3; $i += 0.1 ) {
727
  printf( "<option value='%s'%s>%s</option>",
742
  ?>
743
  <label <?php echo $visibilityAttrs ?>>
744
  Letter Spacing
745
+ <select class='mm-font-sel-spacing'>
746
  <option value='normal'>normal</option>
747
  <?php
748
  for ( $i = -20; $i <= 20; $i++ ) {
764
  ?>
765
  <label <?php echo $visibilityAttrs ?>>
766
  Text Transform
767
+ <select class='mm-font-sel-transform'>
768
  <?php
769
  $options = array( 'none', 'capitalize', 'uppercase', 'lowercase' );
770
  foreach ( $options as $option ) {
786
  ?>
787
  <label <?php echo $visibilityAttrs ?>>
788
  Font Variant
789
+ <select class='mm-font-sel-variant'>
790
  <?php
791
  $options = array( 'normal', 'small-caps' );
792
  foreach ( $options as $option ) {
808
  ?>
809
  <label <?php echo $visibilityAttrs ?>>
810
  Shadow Location
811
+ <select class='mm-font-sel-location'>
812
  <?php
813
  $options = array( 'none', 'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right' );
814
  foreach ( $options as $option ) {
823
  </label>
824
  <label style='display: none'>
825
  Shadow Distance
826
+ <select class='mm-font-sel-distance'>
827
  <?php
828
  for ( $i = 0; $i <= 10; $i++ ) {
829
  printf( "<option value='%s'%s>%s</option>",
837
  </label>
838
  <label style='display: none'>
839
  Shadow Blur
840
+ <select class='mm-font-sel-blur'>
841
  <?php
842
  $options = array( '0px', '1px', '2px', '3px', '4px', '5px', '10px', '20px' );
843
  foreach ( $options as $option ) {
852
  </label>
853
  <label style='display: none'>
854
  Shadow Color
855
+ <input class="mm-font-sel-shadow-color" type="text" value="<?php echo esc_attr( $value['text-shadow-color'] ) ?>" data-default-color="<?php echo esc_attr( $value['text-shadow-color'] ) ?>"/>
856
  </label>
857
  <label style='display: none'>
858
  Shadow Opacity
859
+ <select class='mm-font-sel-opacity'>
860
  <?php
861
  $options = array( '1', '0.9', '0.8', '0.7', '0.6', '0.5', '0.4', '0.3', '0.2', '0.1', '0' );
862
  foreach ( $options as $option ) {
880
  <div <?php echo $visibilityAttrs ?>>
881
  <iframe data-preview-text='<?php echo esc_attr( $this->settings['preview_text'] ) ?>'></iframe>
882
  <i class='dashicons dashicons-admin-appearance btn-dark'></i>
883
+ <input type='hidden' class='mm-font-sel-dark' value='<?php echo esc_attr( $value['dark'] ? 'dark' : '' ) ?>'/>
884
  </div>
885
  <?php
886
 
888
  $value = serialize( $value );
889
  }
890
 
891
+ printf("<input type='hidden' class='mm-for-saving' name='%s' id='%s' value='%s' />",
892
  $this->getID(),
893
  $this->getID(),
894
  esc_attr( $value )
{options-framework → includes/plugin-settings}/lib/class-option-group.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionGroup extends TitanFrameworkOption {
6
 
7
 
8
  /**
@@ -28,7 +28,7 @@ class TitanFrameworkOptionGroup extends TitanFrameworkOption {
28
  * the group.
29
  *
30
  * @param array $settings The settings of the option.
31
- * @param TitanFrameworkAdminPage $owner The owner of the option.
32
  */
33
  function __construct( $settings, $owner ) {
34
  parent::__construct( $settings, $owner );
@@ -49,14 +49,14 @@ class TitanFrameworkOptionGroup extends TitanFrameworkOption {
49
 
50
  foreach ( $this->settings['options'] as $settings ) {
51
 
52
- if ( ! apply_filters( 'tf_create_option_continue_' . $this->getOptionNamespace(), true, $settings ) ) {
53
  continue;
54
  }
55
 
56
- $obj = TitanFrameworkOption::factory( $settings, $this->owner );
57
  $this->options[] = $obj;
58
 
59
- do_action( 'tf_create_option_' . $this->getOptionNamespace(), $obj );
60
  }
61
  }
62
  }
@@ -76,14 +76,14 @@ class TitanFrameworkOptionGroup extends TitanFrameworkOption {
76
  // Display the name of the option.
77
  $name = $option->getName();
78
  if ( ! empty( $name ) && ! $option->getHidden() ) {
79
- echo '<span class="tf-group-name">' . esc_html( $name ) . '</span> ';
80
  }
81
 
82
  // Disable wrapper printing.
83
  $option->echo_wrapper = false;
84
 
85
  // Display the option field.
86
- echo '<span class="tf-group-option">';
87
  $option->display();
88
  echo '</span>';
89
  }
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionGroup extends MobileMenuOption {
6
 
7
 
8
  /**
28
  * the group.
29
  *
30
  * @param array $settings The settings of the option.
31
+ * @param MobileMenuAdminPage $owner The owner of the option.
32
  */
33
  function __construct( $settings, $owner ) {
34
  parent::__construct( $settings, $owner );
49
 
50
  foreach ( $this->settings['options'] as $settings ) {
51
 
52
+ if ( ! apply_filters( 'mm_create_option_continue_mobmenu' , true, $settings ) ) {
53
  continue;
54
  }
55
 
56
+ $obj = MobileMenuOption::factory( $settings, $this->owner );
57
  $this->options[] = $obj;
58
 
59
+ do_action( 'mm_create_option_mobmenu', $obj );
60
  }
61
  }
62
  }
76
  // Display the name of the option.
77
  $name = $option->getName();
78
  if ( ! empty( $name ) && ! $option->getHidden() ) {
79
+ echo '<span class="mm-group-name">' . esc_html( $name ) . '</span> ';
80
  }
81
 
82
  // Disable wrapper printing.
83
  $option->echo_wrapper = false;
84
 
85
  // Display the option field.
86
+ echo '<span class="mm-group-option">';
87
  $option->display();
88
  echo '</span>';
89
  }
{options-framework → includes/plugin-settings}/lib/class-option-heading.php RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Heading option
4
  *
5
- * @package Titan Framework
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
@@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
25
  * @availability Admin Pages|Meta Boxes|Customizer
26
  * @no id,default,livepreview,css,hidden
27
  */
28
- class TitanFrameworkOptionHeading extends TitanFrameworkOption {
29
 
30
  /**
31
  * Display for options and meta
@@ -33,7 +33,7 @@ class TitanFrameworkOptionHeading extends TitanFrameworkOption {
33
  public function display() {
34
  $headingID = str_replace( ' ', '-', strtolower( $this->settings['name'] ) );
35
  ?>
36
- <tr valign="top" class="even first tf-heading">
37
  <th scope="row" class="first last" colspan="2">
38
  <h3 id="<?php echo esc_attr( $headingID ) ?>"><?php echo $this->settings['name'] ?></h3>
39
  <?php
2
  /**
3
  * Heading option
4
  *
5
+ * @package Mobile Menu Settings
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
25
  * @availability Admin Pages|Meta Boxes|Customizer
26
  * @no id,default,livepreview,css,hidden
27
  */
28
+ class MobileMenuOptionHeading extends MobileMenuOption {
29
 
30
  /**
31
  * Display for options and meta
33
  public function display() {
34
  $headingID = str_replace( ' ', '-', strtolower( $this->settings['name'] ) );
35
  ?>
36
+ <tr valign="top" class="even first mm-heading">
37
  <th scope="row" class="first last" colspan="2">
38
  <h3 id="<?php echo esc_attr( $headingID ) ?>"><?php echo $this->settings['name'] ?></h3>
39
  <?php
{options-framework → includes/plugin-settings}/lib/class-option-iframe.php RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Iframe option
4
  *
5
- * @package Titan Framework
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
13
  *
14
  * @since 1.0
15
  */
16
- class TitanFrameworkOptionIframe extends TitanFrameworkOption {
17
 
18
  /**
19
  * Default settings specific to this option
2
  /**
3
  * Iframe option
4
  *
5
+ * @package Mobile Menu Settings
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
13
  *
14
  * @since 1.0
15
  */
16
+ class MobileMenuOptionIframe extends MobileMenuOption {
17
 
18
  /**
19
  * Default settings specific to this option
{options-framework → includes/plugin-settings}/lib/class-option-multicheck-categories.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionMulticheckCategories extends TitanFrameworkOptionMulticheck {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionMulticheckCategories extends MobileMenuOptionMulticheck {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
{options-framework → includes/plugin-settings}/lib/class-option-multicheck-pages.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionMulticheckPages extends TitanFrameworkOptionMulticheck {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionMulticheckPages extends MobileMenuOptionMulticheck {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
{options-framework → includes/plugin-settings}/lib/class-option-multicheck-post-types.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionMulticheckPostTypes extends TitanFrameworkOptionMulticheck {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
@@ -18,7 +18,7 @@ class TitanFrameworkOptionMulticheckPostTypes extends TitanFrameworkOptionMultic
18
  public function display() {
19
 
20
  // Fetch post types.
21
- $post_types = tf_get_post_types( $this->settings['public'], $this->settings['value'] );
22
 
23
  $this->settings['options'] = array();
24
  foreach ( $post_types as $post_type ) {
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionMulticheckPostTypes extends MobileMenuOptionMulticheck {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
18
  public function display() {
19
 
20
  // Fetch post types.
21
+ $post_types = mm_get_post_types( $this->settings['public'], $this->settings['value'] );
22
 
23
  $this->settings['options'] = array();
24
  foreach ( $post_types as $post_type ) {
{options-framework → includes/plugin-settings}/lib/class-option-multicheck-posts.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionMulticheckPosts extends TitanFrameworkOptionMulticheck {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionMulticheckPosts extends MobileMenuOptionMulticheck {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
{options-framework → includes/plugin-settings}/lib/class-option-multicheck.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionMulticheck extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
@@ -20,8 +20,8 @@ class TitanFrameworkOptionMulticheck extends TitanFrameworkOption {
20
  function __construct( $settings, $owner ) {
21
  parent::__construct( $settings, $owner );
22
 
23
- tf_add_action_once( 'admin_enqueue_scripts', array( $this, 'load_select_scripts' ) );
24
- tf_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'load_select_scripts' ) );
25
 
26
  }
27
 
@@ -72,7 +72,7 @@ class TitanFrameworkOptionMulticheck extends TitanFrameworkOption {
72
  */
73
  public function load_select_scripts() {
74
 
75
- wp_enqueue_script( 'tf-multicheck-select-all', TitanFramework::getURL( '../js/multicheck-select-all.js', __FILE__ ), array( 'jquery' ), WP_MOBILE_MENU_VERSION, true );
76
 
77
  }
78
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionMulticheck extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
20
  function __construct( $settings, $owner ) {
21
  parent::__construct( $settings, $owner );
22
 
23
+ mm_add_action_once( 'admin_enqueue_scripts', array( $this, 'load_select_scripts' ) );
24
+ mm_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'load_select_scripts' ) );
25
 
26
  }
27
 
72
  */
73
  public function load_select_scripts() {
74
 
75
+ wp_enqueue_script( 'mm-multicheck-select-all', MobileMenuOptions::getURL( '../js/multicheck-select-all.js', __FILE__ ), array( 'jquery' ), WP_MOBILE_MENU_VERSION, true );
76
 
77
  }
78
 
{options-framework → includes/plugin-settings}/lib/class-option-note.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionNote extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'color' => 'green', // The color of the note's border
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionNote extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'color' => 'green', // The color of the note's border
{options-framework → includes/plugin-settings}/lib/class-option-number.php RENAMED
@@ -3,8 +3,6 @@
3
  /**
4
  * Number Option Class
5
  *
6
- * @author Benjamin Intal
7
- * @package Titan Framework Core
8
  **/
9
 
10
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
@@ -14,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
14
  *
15
  * @since 1.0
16
  **/
17
- class TitanFrameworkOptionNumber extends TitanFrameworkOption {
18
 
19
  // Default settings specific to this option
20
  public $defaultSecondarySettings = array(
@@ -36,8 +34,8 @@ class TitanFrameworkOptionNumber extends TitanFrameworkOption {
36
  function __construct( $settings, $owner ) {
37
  parent::__construct( $settings, $owner );
38
 
39
- tf_add_action_once( 'admin_enqueue_scripts', array( $this, 'enqueueSlider' ) );
40
- tf_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'enqueueSlider' ) );
41
  add_action( 'admin_head', array( __CLASS__, 'createSliderScript' ) );
42
  }
43
 
@@ -97,7 +95,7 @@ class TitanFrameworkOptionNumber extends TitanFrameworkOption {
97
  jQuery(document).ready(function($) {
98
  'use strict';
99
 
100
- $( '.tf-number input[type=number]' ).each(function() {
101
  if ( ! $( this ).prev().is( '.number-slider' ) ) {
102
  return;
103
  }
@@ -121,7 +119,7 @@ class TitanFrameworkOptionNumber extends TitanFrameworkOption {
121
  }
122
  } ).disableSelection();
123
  } );
124
- $( '.tf-number input[type=number]' ).on( 'keyup', _.debounce( function() {
125
  if ( $( this ).prev().slider( 'value' ).toString() !== $( this ).val().toString() ) {
126
  $( this ).prev().slider( 'value', $( this ).val() );
127
  }
3
  /**
4
  * Number Option Class
5
  *
 
 
6
  **/
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
12
  *
13
  * @since 1.0
14
  **/
15
+ class MobileMenuOptionNumber extends MobileMenuOption {
16
 
17
  // Default settings specific to this option
18
  public $defaultSecondarySettings = array(
34
  function __construct( $settings, $owner ) {
35
  parent::__construct( $settings, $owner );
36
 
37
+ mm_add_action_once( 'admin_enqueue_scripts', array( $this, 'enqueueSlider' ) );
38
+ mm_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'enqueueSlider' ) );
39
  add_action( 'admin_head', array( __CLASS__, 'createSliderScript' ) );
40
  }
41
 
95
  jQuery(document).ready(function($) {
96
  'use strict';
97
 
98
+ $( '.mm-number input[type=number]' ).each(function() {
99
  if ( ! $( this ).prev().is( '.number-slider' ) ) {
100
  return;
101
  }
119
  }
120
  } ).disableSelection();
121
  } );
122
+ $( '.mm-number input[type=number]' ).on( 'keyup', _.debounce( function() {
123
  if ( $( this ).prev().slider( 'value' ).toString() !== $( this ).val().toString() ) {
124
  $( this ).prev().slider( 'value', $( this ).val() );
125
  }
{options-framework → includes/plugin-settings}/lib/class-option-radio-image.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionRadioImage extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
@@ -29,7 +29,7 @@ class TitanFrameworkOptionRadioImage extends TitanFrameworkOption {
29
  // Get the correct value, since we are accepting indices in the default setting
30
  $value = $this->getValue();
31
  if ($this->settings['is_font_icon']){
32
- $template = '<label id="%s"><input id="%s" type="radio" name="%s" value="%s" %s/> <span class="tf-radio-image-font-icon %s"></span></label>';
33
  } else {
34
  $template = '<label id="%s"><input id="%s" type="radio" name="%s" value="%s" %s/> <img src="%s" /></label>';
35
  }
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionRadioImage extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
29
  // Get the correct value, since we are accepting indices in the default setting
30
  $value = $this->getValue();
31
  if ($this->settings['is_font_icon']){
32
+ $template = '<label id="%s"><input id="%s" type="radio" name="%s" value="%s" %s/> <span class="mm-radio-image-font-icon %s"></span></label>';
33
  } else {
34
  $template = '<label id="%s"><input id="%s" type="radio" name="%s" value="%s" %s/> <img src="%s" /></label>';
35
  }
{options-framework → includes/plugin-settings}/lib/class-option-radio-palette.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionRadioPalette extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
@@ -11,7 +11,7 @@ class TitanFrameworkOptionRadioPalette extends TitanFrameworkOption {
11
  function __construct( $settings, $owner ) {
12
  parent::__construct( $settings, $owner );
13
 
14
- add_action( 'tf_livepreview_pre_' . $this->getOptionNamespace(), array( $this, 'preLivePreview' ), 10, 3 );
15
  }
16
 
17
  /*
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionRadioPalette extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
11
  function __construct( $settings, $owner ) {
12
  parent::__construct( $settings, $owner );
13
 
14
+ add_action( 'mm_livepreview_pre_mobmenu' , array( $this, 'preLivePreview' ), 10, 3 );
15
  }
16
 
17
  /*
{options-framework → includes/plugin-settings}/lib/class-option-radio.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionRadio extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionRadio extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
{options-framework → includes/plugin-settings}/lib/class-option-save.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionSave extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'save' => '',
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionSave extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'save' => '',
{options-framework → includes/plugin-settings}/lib/class-option-select-categories.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionSelectCategories extends TitanFrameworkOptionSelect {
6
 
7
  public $defaultSecondarySettings = array(
8
  'default' => '0', // show this when blank
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionSelectCategories extends MobileMenuOptionSelect {
6
 
7
  public $defaultSecondarySettings = array(
8
  'default' => '0', // show this when blank
{options-framework → includes/plugin-settings}/lib/class-option-select-pages.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionSelectPages extends TitanFrameworkOptionSelect {
6
 
7
  public $defaultSecondarySettings = array(
8
  'default' => '0', // show this when blank
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionSelectPages extends MobileMenuOptionSelect {
6
 
7
  public $defaultSecondarySettings = array(
8
  'default' => '0', // show this when blank
{options-framework → includes/plugin-settings}/lib/class-option-select-post-types.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionSelectPostTypes extends TitanFrameworkOptionSelect {
6
 
7
  public $defaultSecondarySettings = array(
8
  'default' => '0', // show this when blank
@@ -21,7 +21,7 @@ class TitanFrameworkOptionSelectPostTypes extends TitanFrameworkOptionSelect {
21
  */
22
  public function create_select_options() {
23
  // Fetch post types.
24
- $post_types = tf_get_post_types( $this->settings['public'], $this->settings['value'] );
25
 
26
  $this->settings['options'] = array(
27
  '' => '— ' . __( 'Select', 'mobile-menu' ) . ' —'
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionSelectPostTypes extends MobileMenuOptionSelect {
6
 
7
  public $defaultSecondarySettings = array(
8
  'default' => '0', // show this when blank
21
  */
22
  public function create_select_options() {
23
  // Fetch post types.
24
+ $post_types = mm_get_post_types( $this->settings['public'], $this->settings['value'] );
25
 
26
  $this->settings['options'] = array(
27
  '' => '— ' . __( 'Select', 'mobile-menu' ) . ' —'
{options-framework → includes/plugin-settings}/lib/class-option-select-posts.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionSelectPosts extends TitanFrameworkOptionSelect {
6
 
7
  public $defaultSecondarySettings = array(
8
  'default' => '0', // show this when blank
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionSelectPosts extends MobileMenuOptionSelect {
6
 
7
  public $defaultSecondarySettings = array(
8
  'default' => '0', // show this when blank
{options-framework → includes/plugin-settings}/lib/class-option-select.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionSelect extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
@@ -27,11 +27,11 @@ class TitanFrameworkOptionSelect extends TitanFrameworkOption {
27
  function __construct( $settings, $owner ) {
28
  parent::__construct( $settings, $owner );
29
 
30
- tf_add_action_once( 'admin_enqueue_scripts', array( $this, 'load_select_scripts' ) );
31
- //tf_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'load_select_scripts' ) );
32
 
33
- tf_add_action_once( 'admin_head', array( $this, 'init_select_script' ) );
34
- //tf_add_action_once( 'customize_controls_print_footer_scripts', array( $this, 'init_select_script' ) );
35
  }
36
 
37
 
@@ -50,7 +50,7 @@ class TitanFrameworkOptionSelect extends TitanFrameworkOption {
50
  }
51
 
52
  ?><select name="<?php echo $name; ?>" <?php echo $multiple; ?>><?php
53
- tf_parse_select_options( $this->settings['options'], $val );
54
  ?></select><?php
55
 
56
  $this->echoOptionFooter();
@@ -64,9 +64,9 @@ class TitanFrameworkOptionSelect extends TitanFrameworkOption {
64
  */
65
  public function load_select_scripts() {
66
 
67
- wp_enqueue_script( 'tf-select2', TitanFramework::getURL( '../js/select2/select2.min.js', __FILE__ ), array( 'jquery' ), WP_MOBILE_MENU_VERSION, true );
68
- wp_enqueue_style( 'tf-select2-style', TitanFramework::getURL( '../css/select2/select2.min.css', __FILE__ ), null, WP_MOBILE_MENU_VERSION, 'all' );
69
- wp_enqueue_style( 'tf-select-option-style', TitanFramework::getURL( '../css/class-option-select.css', __FILE__ ), null, WP_MOBILE_MENU_VERSION, 'all' );
70
 
71
  }
72
 
@@ -95,7 +95,7 @@ class TitanFrameworkOptionSelect extends TitanFrameworkOption {
95
  * @see https://select2.github.io/
96
  */
97
  if ( jQuery().select2 ) {
98
- jQuery( 'select.tf-select, [class*="tf-select"] select' ).select2();
99
  }
100
  });
101
  </script>
@@ -118,7 +118,7 @@ class TitanFrameworkOptionSelect extends TitanFrameworkOption {
118
  *
119
  * @return void
120
  */
121
- function tf_parse_select_options( $options, $val = array() ) {
122
 
123
  // No options? Duh...
124
  if ( empty( $options ) ) {
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionSelect extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'options' => array(),
27
  function __construct( $settings, $owner ) {
28
  parent::__construct( $settings, $owner );
29
 
30
+ mm_add_action_once( 'admin_enqueue_scripts', array( $this, 'load_select_scripts' ) );
31
+ //mm_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'load_select_scripts' ) );
32
 
33
+ mm_add_action_once( 'admin_head', array( $this, 'init_select_script' ) );
34
+ //mm_add_action_once( 'customize_controls_print_footer_scripts', array( $this, 'init_select_script' ) );
35
  }
36
 
37
 
50
  }
51
 
52
  ?><select name="<?php echo $name; ?>" <?php echo $multiple; ?>><?php
53
+ mm_parse_select_options( $this->settings['options'], $val );
54
  ?></select><?php
55
 
56
  $this->echoOptionFooter();
64
  */
65
  public function load_select_scripts() {
66
 
67
+ wp_enqueue_script( 'mm-select2', MobileMenuOptions::getURL( '../js/select2/select2.min.js', __FILE__ ), array( 'jquery' ), WP_MOBILE_MENU_VERSION, true );
68
+ wp_enqueue_style( 'mm-select2-style', MobileMenuOptions::getURL( '../css/select2/select2.min.css', __FILE__ ), null, WP_MOBILE_MENU_VERSION, 'all' );
69
+ wp_enqueue_style( 'mm-select-option-style', MobileMenuOptions::getURL( '../css/class-option-select.css', __FILE__ ), null, WP_MOBILE_MENU_VERSION, 'all' );
70
 
71
  }
72
 
95
  * @see https://select2.github.io/
96
  */
97
  if ( jQuery().select2 ) {
98
+ jQuery( 'select.mm-select, [class*="mm-select"] select' ).select2();
99
  }
100
  });
101
  </script>
118
  *
119
  * @return void
120
  */
121
+ function mm_parse_select_options( $options, $val = array() ) {
122
 
123
  // No options? Duh...
124
  if ( empty( $options ) ) {
{options-framework → includes/plugin-settings}/lib/class-option-separator.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionSeparator extends TitanFrameworkOption {
6
 
7
  /*
8
  * Display for options and meta
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionSeparator extends MobileMenuOption {
6
 
7
  /*
8
  * Display for options and meta
{options-framework → includes/plugin-settings}/lib/class-option-sortable.php RENAMED
@@ -1,13 +1,5 @@
1
  <?php
2
 
3
- /**
4
- * Sortable Option Class
5
- *
6
- * @author Benjamin Intal
7
- * @package Titan Framework Core
8
- * @since 1.4
9
- **/
10
-
11
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
12
  }
13
  /**
@@ -15,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
15
  *
16
  * @since 1.4
17
  **/
18
- class TitanFrameworkOptionSortable extends TitanFrameworkOption {
19
 
20
  // Default settings specific to this option
21
  public $defaultSecondarySettings = array(
@@ -35,8 +27,8 @@ class TitanFrameworkOptionSortable extends TitanFrameworkOption {
35
  parent::__construct( $settings, $owner );
36
 
37
  add_action( 'admin_head', array( __CLASS__, 'createSortableScript' ) );
38
- tf_add_action_once( 'admin_enqueue_scripts', array( $this, 'enqueueSortable' ) );
39
- tf_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'enqueueSortable' ) );
40
  }
41
 
42
 
@@ -70,7 +62,7 @@ class TitanFrameworkOptionSortable extends TitanFrameworkOption {
70
  "use strict";
71
 
72
  // initialize
73
- $('.tf-sortable > ul ~ input').each(function() {
74
  var value = $(this).val();
75
  try {
76
  value = unserialize( value );
@@ -79,13 +71,13 @@ class TitanFrameworkOptionSortable extends TitanFrameworkOption {
79
  }
80
 
81
  var ul = $(this).siblings('ul:eq(0)');
82
- ul.find('li').addClass('tf-invisible').find('i.visibility').toggleClass('dashicons-visibility-faint');
83
  $.each(value, function(i, val) {
84
- ul.find('li[data-value=' + val + ']').removeClass('tf-invisible').find('i.visibility').toggleClass('dashicons-visibility-faint');
85
  });
86
  });
87
 
88
- $('.tf-sortable > ul').each(function() {
89
  $(this).sortable()
90
  .disableSelection()
91
  .on( "sortstop", function( event, ui ) {
@@ -93,7 +85,7 @@ class TitanFrameworkOptionSortable extends TitanFrameworkOption {
93
  })
94
  .find('li').each(function() {
95
  $(this).find('i.visibility').click(function() {
96
- $(this).toggleClass('dashicons-visibility-faint').parents('li:eq(0)').toggleClass('tf-invisible');
97
  });
98
  })
99
  .click(function() {
@@ -109,7 +101,7 @@ class TitanFrameworkOptionSortable extends TitanFrameworkOption {
109
  var values = [];
110
 
111
  ul.find('li').each(function() {
112
- if ( ! $(this).is('.tf-invisible') ) {
113
  values.push( $(this).attr('data-value') );
114
  }
115
  });
1
  <?php
2
 
 
 
 
 
 
 
 
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
  /**
7
  *
8
  * @since 1.4
9
  **/
10
+ class MobileMenuOptionSortable extends MobileMenuOption {
11
 
12
  // Default settings specific to this option
13
  public $defaultSecondarySettings = array(
27
  parent::__construct( $settings, $owner );
28
 
29
  add_action( 'admin_head', array( __CLASS__, 'createSortableScript' ) );
30
+ mm_add_action_once( 'admin_enqueue_scripts', array( $this, 'enqueueSortable' ) );
31
+ mm_add_action_once( 'customize_controls_enqueue_scripts', array( $this, 'enqueueSortable' ) );
32
  }
33
 
34
 
62
  "use strict";
63
 
64
  // initialize
65
+ $('.mm-sortable > ul ~ input').each(function() {
66
  var value = $(this).val();
67
  try {
68
  value = unserialize( value );
71
  }
72
 
73
  var ul = $(this).siblings('ul:eq(0)');
74
+ ul.find('li').addClass('mm-invisible').find('i.visibility').toggleClass('dashicons-visibility-faint');
75
  $.each(value, function(i, val) {
76
+ ul.find('li[data-value=' + val + ']').removeClass('mm-invisible').find('i.visibility').toggleClass('dashicons-visibility-faint');
77
  });
78
  });
79
 
80
+ $('.mm-sortable > ul').each(function() {
81
  $(this).sortable()
82
  .disableSelection()
83
  .on( "sortstop", function( event, ui ) {
85
  })
86
  .find('li').each(function() {
87
  $(this).find('i.visibility').click(function() {
88
+ $(this).toggleClass('dashicons-visibility-faint').parents('li:eq(0)').toggleClass('mm-invisible');
89
  });
90
  })
91
  .click(function() {
101
  var values = [];
102
 
103
  ul.find('li').each(function() {
104
+ if ( ! $(this).is('.mm-invisible') ) {
105
  values.push( $(this).attr('data-value') );
106
  }
107
  });
{options-framework → includes/plugin-settings}/lib/class-option-text.php RENAMED
@@ -2,7 +2,7 @@
2
  /**
3
  * Text Option
4
  *
5
- * @package Titan Framework
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
@@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
25
  * @type text
26
  * @availability Admin Pages|Meta Boxes|Customizer
27
  */
28
- class TitanFrameworkOptionText extends TitanFrameworkOption {
29
 
30
  /**
31
  * Default settings specific for this option
2
  /**
3
  * Text Option
4
  *
5
+ * @package Mobile Menu Settings
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
25
  * @type text
26
  * @availability Admin Pages|Meta Boxes|Customizer
27
  */
28
+ class MobileMenuOptionText extends MobileMenuOption {
29
 
30
  /**
31
  * Default settings specific for this option
{options-framework → includes/plugin-settings}/lib/class-option-textarea.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- class TitanFrameworkOptionTextarea extends TitanFrameworkOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'placeholder' => '', // show this when blank
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
+ class MobileMenuOptionTextarea extends MobileMenuOption {
6
 
7
  public $defaultSecondarySettings = array(
8
  'placeholder' => '', // show this when blank
{options-framework → includes/plugin-settings}/lib/class-option-upload.php RENAMED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
4
  }
5
- class TitanFrameworkOptionUpload extends TitanFrameworkOption {
6
 
7
  private static $firstLoad = true;
8
 
@@ -21,11 +21,11 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
21
  function __construct( $settings, $owner ) {
22
  parent::__construct( $settings, $owner );
23
 
24
- add_filter( 'tf_generate_css_upload_' . $this->getOptionNamespace(), array( $this, 'generateCSS' ), 10, 2 );
25
  add_filter( 'upload_mimes', array( $this, 'allow_svg_uploads' ) );
26
 
27
- add_action( 'tf_livepreview_pre_' . $this->getOptionNamespace(), array( $this, 'preLivePreview' ), 10, 3 );
28
- add_action( 'tf_livepreview_post_' . $this->getOptionNamespace(), array( $this, 'postLivePreview' ), 10, 3 );
29
  }
30
 
31
 
@@ -45,10 +45,10 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
45
 
46
 
47
  /**
48
- * Generates CSS for the font, this is used in TitanFrameworkCSS
49
  *
50
  * @param string $css The CSS generated
51
- * @param TitanFrameworkOption $option The current option being processed.
52
  * @return string The CSS generated
53
  * @since 1.5
54
  */
@@ -160,7 +160,7 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
160
  if ( ! empty( $value ) ) {
161
  $previewImage = "<i class='dashicons dashicons-no-alt remove'></i><img src='" . esc_url( $value ) . "' style='display: none'/>";
162
  }
163
- echo "<div class='thumbnail tf-image-preview'>" . $previewImage . '</div>';
164
 
165
  printf('<input name="%s" placeholder="%s" id="%s" type="hidden" value="%s" />',
166
  $this->getID(),
@@ -181,9 +181,9 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
181
  <script>
182
  jQuery(document).ready(function($){
183
  "use strict";
184
- $('.tf-upload .thumbnail').find('img').parent().addClass('has-value').find(':before').css({'opacity':'0'});
185
  function tfUploadOptionCenterImage($this) {
186
- var _preview = $this.parents('.tf-upload').find('.thumbnail');
187
  $this.css({
188
  'marginTop': ( _preview.height() - $this.height() ) / 2,
189
  'marginLeft': ( _preview.width() - $this.width() ) / 2
@@ -192,7 +192,7 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
192
 
193
 
194
  // Calculate display offset of preview image on load.
195
- $('.tf-upload .thumbnail img').load(function() {
196
  tfUploadOptionCenterImage($(this));
197
  }).each(function(){
198
  // Sometimes the load event might not trigger due to cache.
@@ -206,7 +206,7 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
206
  // the image's height & width are detected as 0. We bind to the opening of an accordion
207
  // and adjust the image placement from there.
208
  var tfUploadAccordionSections = [];
209
- $('.tf-upload').each(function() {
210
  var $accordion = $(this).parents('.control-section.accordion-section');
211
  if ( $accordion.length > 0 ) {
212
  if ( $.inArray( $accordion, tfUploadAccordionSections ) == -1 ) {
@@ -219,7 +219,7 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
219
  $title.click(function() {
220
  var $accordion = $(this).parents('.control-section.accordion-section');
221
  if ( ! $accordion.is('.open') ) {
222
- $accordion.find('.tf-upload .thumbnail img').each(function() {
223
  var $this = $(this);
224
  setTimeout(function() {
225
  tfUploadOptionCenterImage($this);
@@ -231,10 +231,10 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
231
 
232
 
233
  // Remove the image when the remove link is clicked.
234
- $('body').on('click', '.tf-upload i.remove', function(event) {
235
  event.preventDefault();
236
- var _input = $(this).parents('.tf-upload').find('input');
237
- var _preview = $(this).parents('.tf-upload').find('div.thumbnail');
238
 
239
  _preview.removeClass('has-value').find('img').remove().end().find('i').remove();
240
  _input.val('').trigger('change');
@@ -244,19 +244,19 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
244
 
245
 
246
  // Open the upload media lightbox when the upload button is clicked.
247
- $('body').on('click', '.tf-upload .thumbnail, .tf-upload img', function(event) {
248
  event.preventDefault();
249
  // If we have a smaller image, users can click on the thumbnail.
250
  if ( $(this).is('.thumbnail') ) {
251
- if ( $(this).parents('.tf-upload').find('img').length != 0 ) {
252
- $(this).parents('.tf-upload').find('img').trigger('click');
253
  return true;
254
  }
255
  }
256
 
257
- var _input = $(this).parents('.tf-upload').find('input');
258
- var _preview = $(this).parents('.tf-upload').find('div.thumbnail');
259
- var _remove = $(this).siblings('.tf-upload-image-remove');
260
 
261
  // Uploader frame properties.
262
  var frame = wp.media({
@@ -313,7 +313,7 @@ class TitanFrameworkOptionUpload extends TitanFrameworkOption {
313
  _input.trigger('change');
314
 
315
  _remove.show();
316
- $('.tf-upload .thumbnail').find('img').parent().addClass('has-value').find(':before').css({'opacity':'0'});
317
  });
318
  frame.off('select');
319
  });
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
4
  }
5
+ class MobileMenuOptionUpload extends MobileMenuOption {
6
 
7
  private static $firstLoad = true;
8
 
21
  function __construct( $settings, $owner ) {
22
  parent::__construct( $settings, $owner );
23
 
24
+ add_filter( 'mm_generate_css_upload_mobmenu' , array( $this, 'generateCSS' ), 10, 2 );
25
  add_filter( 'upload_mimes', array( $this, 'allow_svg_uploads' ) );
26
 
27
+ add_action( 'mm_livepreview_pre_mobmenu' , array( $this, 'preLivePreview' ), 10, 3 );
28
+ add_action( 'mm_livepreview_post_mobmenu', array( $this, 'postLivePreview' ), 10, 3 );
29
  }
30
 
31
 
45
 
46
 
47
  /**
48
+ * Generates CSS for the font, this is used in MobileMenuCSS
49
  *
50
  * @param string $css The CSS generated
51
+ * @param MobileMenuOption $option The current option being processed.
52
  * @return string The CSS generated
53
  * @since 1.5
54
  */
160
  if ( ! empty( $value ) ) {
161
  $previewImage = "<i class='dashicons dashicons-no-alt remove'></i><img src='" . esc_url( $value ) . "' style='display: none'/>";
162
  }
163
+ echo "<div class='thumbnail mm-image-preview'>" . $previewImage . '</div>';
164
 
165
  printf('<input name="%s" placeholder="%s" id="%s" type="hidden" value="%s" />',
166
  $this->getID(),
181
  <script>
182
  jQuery(document).ready(function($){
183
  "use strict";
184
+ $('.mm-upload .thumbnail').find('img').parent().addClass('has-value').find(':before').css({'opacity':'0'});
185
  function tfUploadOptionCenterImage($this) {
186
+ var _preview = $this.parents('.mm-upload').find('.thumbnail');
187
  $this.css({
188
  'marginTop': ( _preview.height() - $this.height() ) / 2,
189
  'marginLeft': ( _preview.width() - $this.width() ) / 2
192
 
193
 
194
  // Calculate display offset of preview image on load.
195
+ $('.mm-upload .thumbnail img').load(function() {
196
  tfUploadOptionCenterImage($(this));
197
  }).each(function(){
198
  // Sometimes the load event might not trigger due to cache.
206
  // the image's height & width are detected as 0. We bind to the opening of an accordion
207
  // and adjust the image placement from there.
208
  var tfUploadAccordionSections = [];
209
+ $('.mm-upload').each(function() {
210
  var $accordion = $(this).parents('.control-section.accordion-section');
211
  if ( $accordion.length > 0 ) {
212
  if ( $.inArray( $accordion, tfUploadAccordionSections ) == -1 ) {
219
  $title.click(function() {
220
  var $accordion = $(this).parents('.control-section.accordion-section');
221
  if ( ! $accordion.is('.open') ) {
222
+ $accordion.find('.mm-upload .thumbnail img').each(function() {
223
  var $this = $(this);
224
  setTimeout(function() {
225
  tfUploadOptionCenterImage($this);
231
 
232
 
233
  // Remove the image when the remove link is clicked.
234
+ $('body').on('click', '.mm-upload i.remove', function(event) {
235
  event.preventDefault();
236
+ var _input = $(this).parents('.mm-upload').find('input');
237
+ var _preview = $(this).parents('.mm-upload').find('div.thumbnail');
238
 
239
  _preview.removeClass('has-value').find('img').remove().end().find('i').remove();
240
  _input.val('').trigger('change');
244
 
245
 
246
  // Open the upload media lightbox when the upload button is clicked.
247
+ $('body').on('click', '.mm-upload .thumbnail, .mm-upload img', function(event) {
248
  event.preventDefault();
249
  // If we have a smaller image, users can click on the thumbnail.
250
  if ( $(this).is('.thumbnail') ) {
251
+ if ( $(this).parents('.mm-upload').find('img').length != 0 ) {
252
+ $(this).parents('.mm-upload').find('img').trigger('click');
253
  return true;
254
  }
255
  }
256
 
257
+ var _input = $(this).parents('.mm-upload').find('input');
258
+ var _preview = $(this).parents('.mm-upload').find('div.thumbnail');
259
+ var _remove = $(this).siblings('.mm-upload-image-remove');
260
 
261
  // Uploader frame properties.
262
  var frame = wp.media({
313
  _input.trigger('change');
314
 
315
  _remove.show();
316
+ $('.mm-upload .thumbnail').find('img').parent().addClass('has-value').find(':before').css({'opacity':'0'});
317
  });
318
  frame.off('select');
319
  });
{options-framework → includes/plugin-settings}/lib/class-option.php RENAMED
@@ -2,12 +2,8 @@
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
5
- /*
6
- * People can extend this class to create their own options
7
- */
8
 
9
-
10
- class TitanFrameworkOption {
11
 
12
  const TYPE_META = 'meta';
13
  const TYPE_ADMIN = 'option';
@@ -27,91 +23,25 @@ class TitanFrameworkOption {
27
  */
28
  private static $defaultSettings = array(
29
 
30
- 'type' => 'text',
31
-
32
- /**
33
- * The name of the option, for display purposes only.
34
- *
35
- * @since 1.0
36
- * @var string
37
- */
38
- 'name' => '',
39
-
40
- /**
41
- * The description to display together with this option.
42
- *
43
- * @since 1.0
44
- * @var string
45
- */
46
- 'desc' => '',
47
-
48
- /**
49
- * A unique ID for this option. This ID will be used to get the value for this option.
50
- *
51
- * @since 1.0
52
- * @var string
53
- */
54
- 'id' => '',
55
-
56
- /**
57
- * (Optional) The default value for this option.
58
- *
59
- * @since 1.0
60
- * @var mixed
61
- */
62
- 'default' => '',
63
-
64
- /**
65
- * (Optional) jQuery code that updates something in your site in the live preview. Only used when the option is placed in a theme customizer section.
66
- *
67
- * @since 1.0
68
- * @var string
69
- * @see http://www.titanframework.net/livepreview-parameter
70
- */
71
- 'livepreview' => '', // jQuery script to update something in the site. For theme customizer only
72
-
73
- /**
74
- * (Optional) CSS rules to be used with this option. Only used when the option is placed in an admin page / panel or a theme customizer section.
75
- * @since 1.0
76
- * @var string
77
- * @see http://www.titanframework.net/generate-css-automatically-for-your-options/
78
- */
79
- 'css' => '',
80
-
81
- /**
82
- * (Optional) If true, the option will not be displayed, but will still be accessible using `getOption`. This is helpful for deprecating old settings, while still making your project backward compatible.
83
- * @since 1.8
84
- * @var bool
85
- */
86
- 'hidden' => false,
87
-
88
- /**
89
- * (Optional) The transport parameter in the Customizer is automatically set. Use this to override the transport value. Value can be blank, 'refresh' or 'postMessage'
90
- * @since 1.9.3
91
- * @var string
92
- */
93
- 'transport' => '',
94
-
95
- 'example' => '', // An example value for this field, will be displayed in a <code>
96
-
97
- /**
98
- * (Optional) Sanitization callback function
99
- * @since 1.9.4
100
- * @var string
101
- */
102
  'sanitize_callback' => '',
103
  );
104
 
105
- /**
106
- * Default settings specific for this option. This is overridden by each option class
107
- * @var array
108
- */
109
  public $defaultSecondarySettings = array();
110
 
111
  public static function factory( $settings, $owner ) {
112
  $settings = array_merge( self::$defaultSettings, $settings );
113
 
114
- $className = 'TitanFrameworkOption' . str_replace( ' ', '', ucwords( str_replace( '-', ' ', $settings['type'] ) ) );
115
 
116
  if ( class_exists( $className ) ) {
117
  $obj = new $className( $settings, $owner );
@@ -129,7 +59,7 @@ class TitanFrameworkOption {
129
  $this->settings = array_merge( self::$defaultSettings, $this->defaultSecondarySettings );
130
  $this->settings = array_merge( $this->settings, $settings );
131
 
132
- $this->type = is_a( $owner, 'TitanFrameworkMetaBox' ) ? self::TYPE_META : self::TYPE_ADMIN;
133
 
134
  // Generate a unique ID depending on the settings for those without IDs
135
  if ( empty( $this->settings['id'] ) && $this->settings['type'] != 'save' ) {
@@ -156,7 +86,7 @@ class TitanFrameworkOption {
156
 
157
  if ( $this->type == self::TYPE_ADMIN ) {
158
 
159
- $value = $this->getFramework()->getInternalAdminPageOption( $this->settings['id'], $this->settings['default'] );
160
 
161
  } else if ( $this->type == self::TYPE_META ) {
162
 
@@ -195,7 +125,7 @@ class TitanFrameworkOption {
195
 
196
  if ( $this->type == self::TYPE_ADMIN ) {
197
 
198
- $this->getFramework()->setInternalAdminPageOption( $this->settings['id'], $value );
199
 
200
  } else if ( $this->type == self::TYPE_META ) {
201
 
@@ -219,33 +149,18 @@ class TitanFrameworkOption {
219
  }
220
 
221
 
222
- /**
223
- * Gets the framework instance currently used
224
- *
225
- * @return TitanFramework
226
- * @since 1.3
227
- */
228
- protected function getFramework() {
229
- if ( is_a( $this->owner, 'TitanFrameworkAdminTab' ) ) {
230
  // a tab's parent is an admin panel
231
  return $this->owner->owner->owner;
232
  } else {
233
- // an admin panel's parent is the framework
234
- // a meta panel's parent is the framework
235
- // a theme customizer's parent is the framework
236
  return $this->owner->owner;
237
  }
238
  }
239
 
240
-
241
- /**
242
- * Gets the option namespace used in the framework instance currently used
243
- *
244
- * @return string The option namespace
245
- * @since 1.0
246
- */
247
  public function getOptionNamespace() {
248
- return $this->getFramework()->optionNamespace;
249
  }
250
 
251
  public function getID() {
@@ -270,29 +185,18 @@ class TitanFrameworkOption {
270
  return;
271
  }
272
 
273
- // Allow overriding for custom styling
274
- $useCustom = false;
275
- $useCustom = apply_filters( 'tf_use_custom_option_header', $useCustom );
276
- $useCustom = apply_filters( 'tf_use_custom_option_header_' . $this->getOptionNamespace(), $useCustom );
277
- if ( $useCustom ) {
278
- do_action( 'tf_custom_option_header', $this );
279
- do_action( 'tf_custom_option_header_' . $this->getOptionNamespace(), $this );
280
- return;
281
- }
282
-
283
- $id = $this->getID();
284
- $name = $this->getName();
285
  $optionClass = $this->getClass();
286
- $evenOdd = self::$rowIndex++ % 2 == 0 ? 'odd' : 'even';
287
-
288
- $style = $this->getHidden() == true ? 'style="display: none"' : '';
289
 
290
  ?>
291
- <tr valign="top" class="row-<?php echo self::$rowIndex ?> <?php echo $evenOdd ?> <?php echo $optionClass; ?>" <?php echo $style ?>>
292
  <th scope="row" class="first">
293
  <label for="<?php echo ! empty( $id ) ? $id : '' ?>"><?php echo ! empty( $name ) ? $name : '' ?></label>
294
  </th>
295
- <td class="second tf-<?php echo $this->settings['type'] ?>">
296
  <?php
297
 
298
  $desc = $this->getDesc();
@@ -312,25 +216,14 @@ class TitanFrameworkOption {
312
  return;
313
  }
314
 
315
- // Allow overriding for custom styling
316
- $useCustom = false;
317
- $useCustom = apply_filters( 'tf_use_custom_option_header', $useCustom );
318
- $useCustom = apply_filters( 'tf_use_custom_option_header_' . $this->getOptionNamespace(), $useCustom );
319
- if ( $useCustom ) {
320
- do_action( 'tf_custom_option_header', $this );
321
- do_action( 'tf_custom_option_header_' . $this->getOptionNamespace(), $this );
322
- return;
323
- }
324
-
325
- $id = $this->getID();
326
- $name = $this->getName();
327
  $evenOdd = self::$rowIndex++ % 2 == 0 ? 'odd' : 'even';
328
-
329
- $style = $this->getHidden() == true ? 'style="display: none"' : '';
330
 
331
  ?>
332
- <tr valign="top" class="row-<?php echo self::$rowIndex ?> <?php echo $evenOdd ?>" <?php echo $style ?>>
333
- <td class="second tf-<?php echo $this->settings['type'] ?>">
334
  <?php
335
  }
336
 
@@ -343,16 +236,6 @@ class TitanFrameworkOption {
343
  return;
344
  }
345
 
346
- // Allow overriding for custom styling
347
- $useCustom = false;
348
- $useCustom = apply_filters( 'tf_use_custom_option_footer', $useCustom );
349
- $useCustom = apply_filters( 'tf_use_custom_option_footer_' . $this->getOptionNamespace(), $useCustom );
350
- if ( $useCustom ) {
351
- do_action( 'tf_custom_option_footer', $this );
352
- do_action( 'tf_custom_option_footer_' . $this->getOptionNamespace(), $this );
353
- return;
354
- }
355
-
356
  $desc = $this->getDesc();
357
  if ( ! empty( $desc ) && $showDesc ) :
358
  ?>
@@ -382,16 +265,6 @@ class TitanFrameworkOption {
382
  return;
383
  }
384
 
385
- // Allow overriding for custom styling
386
- $useCustom = false;
387
- $useCustom = apply_filters( 'tf_use_custom_option_footer', $useCustom );
388
- $useCustom = apply_filters( 'tf_use_custom_option_footer_' . $this->getOptionNamespace(), $useCustom );
389
- if ( $useCustom ) {
390
- do_action( 'tf_custom_option_footer', $this );
391
- do_action( 'tf_custom_option_footer_' . $this->getOptionNamespace(), $this );
392
- return;
393
- }
394
-
395
  ?>
396
  </td>
397
  </tr>
2
 
3
  if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
4
  }
 
 
 
5
 
6
+ class MobileMenuOption {
 
7
 
8
  const TYPE_META = 'meta';
9
  const TYPE_ADMIN = 'option';
23
  */
24
  private static $defaultSettings = array(
25
 
26
+ 'type' => 'text',
27
+ 'name' => '',
28
+ 'desc' => '',
29
+ 'id' => '',
30
+ 'default' => '',
31
+ 'livepreview' => '',
32
+ 'css' => '',
33
+ 'hidden' => false,
34
+ 'transport' => '',
35
+ 'example' => '', // An example value for this field, will be displayed in a <code>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  'sanitize_callback' => '',
37
  );
38
 
 
 
 
 
39
  public $defaultSecondarySettings = array();
40
 
41
  public static function factory( $settings, $owner ) {
42
  $settings = array_merge( self::$defaultSettings, $settings );
43
 
44
+ $className = 'MobileMenuOption' . str_replace( ' ', '', ucwords( str_replace( '-', ' ', $settings['type'] ) ) );
45
 
46
  if ( class_exists( $className ) ) {
47
  $obj = new $className( $settings, $owner );
59
  $this->settings = array_merge( self::$defaultSettings, $this->defaultSecondarySettings );
60
  $this->settings = array_merge( $this->settings, $settings );
61
 
62
+ $this->type = is_a( $owner, 'MobileMenuMetaBox' ) ? self::TYPE_META : self::TYPE_ADMIN;
63
 
64
  // Generate a unique ID depending on the settings for those without IDs
65
  if ( empty( $this->settings['id'] ) && $this->settings['type'] != 'save' ) {
86
 
87
  if ( $this->type == self::TYPE_ADMIN ) {
88
 
89
+ $value = $this->getMobmenu()->getInternalAdminPageOption( $this->settings['id'], $this->settings['default'] );
90
 
91
  } else if ( $this->type == self::TYPE_META ) {
92
 
125
 
126
  if ( $this->type == self::TYPE_ADMIN ) {
127
 
128
+ $this->getMobmenu()->setInternalAdminPageOption( $this->settings['id'], $value );
129
 
130
  } else if ( $this->type == self::TYPE_META ) {
131
 
149
  }
150
 
151
 
152
+ protected function getMobmenu() {
153
+ if ( is_a( $this->owner, 'MobileMenuAdminTab' ) ) {
 
 
 
 
 
 
154
  // a tab's parent is an admin panel
155
  return $this->owner->owner->owner;
156
  } else {
157
+ // a theme customizer's parent
 
 
158
  return $this->owner->owner;
159
  }
160
  }
161
 
 
 
 
 
 
 
 
162
  public function getOptionNamespace() {
163
+ return $this->getMobmenu()->optionNamespace;
164
  }
165
 
166
  public function getID() {
185
  return;
186
  }
187
 
188
+ $id = $this->getID();
189
+ $name = $this->getName();
 
 
 
 
 
 
 
 
 
 
190
  $optionClass = $this->getClass();
191
+ $evenOdd = self::$rowIndex++ % 2 == 0 ? 'odd' : 'even';
192
+ $style = $this->getHidden() == true ? 'style="display: none"' : '';
 
193
 
194
  ?>
195
+ <tr valign="top" class="row-<?php echo self::$rowIndex ?> <?php echo $id ?> <?php echo $evenOdd ?> <?php echo $optionClass; ?>" <?php echo $style ?>>
196
  <th scope="row" class="first">
197
  <label for="<?php echo ! empty( $id ) ? $id : '' ?>"><?php echo ! empty( $name ) ? $name : '' ?></label>
198
  </th>
199
+ <td class="second mm-<?php echo $this->settings['type'] ?>">
200
  <?php
201
 
202
  $desc = $this->getDesc();
216
  return;
217
  }
218
 
219
+ $id = $this->getID();
220
+ $name = $this->getName();
 
 
 
 
 
 
 
 
 
 
221
  $evenOdd = self::$rowIndex++ % 2 == 0 ? 'odd' : 'even';
222
+ $style = $this->getHidden() == true ? 'style="display: none"' : '';
 
223
 
224
  ?>
225
+ <tr valign="top" class="row-<?php echo self::$rowIndex ?> <?php echo $id ?> <?php echo $evenOdd ?>" <?php echo $style ?>>
226
+ <td class="second mm-<?php echo $this->settings['type'] ?>">
227
  <?php
228
  }
229
 
236
  return;
237
  }
238
 
 
 
 
 
 
 
 
 
 
 
239
  $desc = $this->getDesc();
240
  if ( ! empty( $desc ) && $showDesc ) :
241
  ?>
265
  return;
266
  }
267
 
 
 
 
 
 
 
 
 
 
 
268
  ?>
269
  </td>
270
  </tr>
{options-framework → includes/plugin-settings}/lib/functions-googlefonts.php RENAMED
@@ -46,8 +46,8 @@ function bfi_get_googlefonts_from_json($json) {
46
 
47
  // All possible google fonts
48
  // List created on Sept 19, 2015
49
- if ( ! function_exists( 'titan_get_googlefonts' ) ) {
50
- function titan_get_googlefonts() {
51
  $fonts = array(
52
 
53
  array( 'name' => 'ABeeZee', 'subsets' => array( 'latin' ), 'variants' => array( '400', 'italic' ) ),
46
 
47
  // All possible google fonts
48
  // List created on Sept 19, 2015
49
+ if ( ! function_exists( 'mobmenu_get_googlefonts' ) ) {
50
+ function mobmenu_get_googlefonts() {
51
  $fonts = array(
52
 
53
  array( 'name' => 'ABeeZee', 'subsets' => array( 'latin' ), 'variants' => array( '400', 'italic' ) ),
{options-framework → includes/plugin-settings}/lib/functions-utils.php RENAMED
@@ -1,8 +1,8 @@
1
  <?php
2
 
3
  // @see http://bavotasan.com/2011/convert-hex-color-to-rgb-using-php/
4
- if ( ! function_exists( 'tf_hex2rgb' ) ) {
5
- function tf_hex2rgb( $hex ) {
6
  $hex = str_replace( '#', '', $hex );
7
 
8
  if ( strlen( $hex ) == 3 ) {
@@ -26,8 +26,6 @@ if ( ! function_exists( 'tf_hex2rgb' ) ) {
26
  * needs to be added once. Because of this, there will be no need to do a static variable that
27
  * will be set to true after the first run, ala $firstLoad
28
  *
29
- * @since 1.9
30
- *
31
  * @param string $tag The name of the action to which the $function_to_add is hooked.
32
  * @param callback $function_to_add The name of the function you wish to be called.
33
  * @param int $priority Optional. Used to specify the order in which the functions
@@ -39,7 +37,7 @@ if ( ! function_exists( 'tf_hex2rgb' ) ) {
39
  *
40
  * @return true Will always return true.
41
  */
42
- function tf_add_action_once( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
43
  global $_gambitFiltersRan;
44
 
45
  if ( ! isset( $_gambitFiltersRan ) ) {
@@ -70,8 +68,6 @@ function tf_add_action_once( $tag, $function_to_add, $priority = 10, $accepted_a
70
  * needs to be added once. Because of this, there will be no need to do a static variable that
71
  * will be set to true after the first run, ala $firstLoad
72
  *
73
- * @since 1.9
74
- *
75
  * @param string $tag The name of the filter to hook the $function_to_add callback to.
76
  * @param callback $function_to_add The callback to be run when the filter is applied.
77
  * @param int $priority Optional. Used to specify the order in which the functions
@@ -83,7 +79,7 @@ function tf_add_action_once( $tag, $function_to_add, $priority = 10, $accepted_a
83
  *
84
  * @return true
85
  */
86
- function tf_add_filter_once( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
87
  global $_gambitFiltersRan;
88
 
89
  if ( ! isset( $_gambitFiltersRan ) ) {
@@ -110,14 +106,12 @@ function tf_add_filter_once( $tag, $function_to_add, $priority = 10, $accepted_a
110
 
111
 
112
  /**
113
- * Fetches post types. Based on helper functions developed inhouse.
114
- *
115
- * @since 1.11
116
  *
117
  * @param boolean $public - Queries the get_post_types to fetch publicly-available post types.
118
  * @param string $value - Fetches post types that are builtin, custom, or both. Values can be 'builtin', 'custom', or the default value, 'all'.
119
  */
120
- function tf_get_post_types( $public = true, $value = 'all' ) {
121
 
122
  // Fetch builtin post types.
123
  $args_builtin = array(
1
  <?php
2
 
3
  // @see http://bavotasan.com/2011/convert-hex-color-to-rgb-using-php/
4
+ if ( ! function_exists( 'mm_hex2rgb' ) ) {
5
+ function mm_hex2rgb( $hex ) {
6
  $hex = str_replace( '#', '', $hex );
7
 
8
  if ( strlen( $hex ) == 3 ) {
26
  * needs to be added once. Because of this, there will be no need to do a static variable that
27
  * will be set to true after the first run, ala $firstLoad
28
  *
 
 
29
  * @param string $tag The name of the action to which the $function_to_add is hooked.
30
  * @param callback $function_to_add The name of the function you wish to be called.
31
  * @param int $priority Optional. Used to specify the order in which the functions
37
  *
38
  * @return true Will always return true.
39
  */
40
+ function mm_add_action_once( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
41
  global $_gambitFiltersRan;
42
 
43
  if ( ! isset( $_gambitFiltersRan ) ) {
68
  * needs to be added once. Because of this, there will be no need to do a static variable that
69
  * will be set to true after the first run, ala $firstLoad
70
  *
 
 
71
  * @param string $tag The name of the filter to hook the $function_to_add callback to.
72
  * @param callback $function_to_add The callback to be run when the filter is applied.
73
  * @param int $priority Optional. Used to specify the order in which the functions
79
  *
80
  * @return true
81
  */
82
+ function mm_add_filter_once( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
83
  global $_gambitFiltersRan;
84
 
85
  if ( ! isset( $_gambitFiltersRan ) ) {
106
 
107
 
108
  /**
109
+ * Fetches post types.
 
 
110
  *
111
  * @param boolean $public - Queries the get_post_types to fetch publicly-available post types.
112
  * @param string $value - Fetches post types that are builtin, custom, or both. Values can be 'builtin', 'custom', or the default value, 'all'.
113
  */
114
+ function mm_get_post_types( $public = true, $value = 'all' ) {
115
 
116
  // Fetch builtin post types.
117
  $args_builtin = array(
{options-framework → includes/plugin-settings}/lib/iframe-font-preview.php RENAMED
File without changes
includes/plugin-settings/mobile-menu-options.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
4
+ }
5
+
6
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-admin-notification.php' );
7
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-admin-page.php' );
8
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-admin-tab.php' );
9
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-meta-box.php' );
10
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option.php' );
11
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-ajax-button.php' );
12
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-checkbox.php' );
13
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-code.php' );
14
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-color.php' );
15
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-custom.php' );
16
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-date.php' );
17
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-enable.php' );
18
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-editor.php' );
19
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-font.php' );
20
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-group.php' );
21
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-heading.php' );
22
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-iframe.php' );
23
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-multicheck.php' );
24
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-multicheck-categories.php' );
25
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-multicheck-pages.php' );
26
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-multicheck-posts.php' );
27
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-multicheck-post-types.php' );
28
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-note.php' );
29
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-number.php' );
30
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-radio.php' );
31
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-radio-image.php' );
32
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-radio-palette.php' );
33
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-save.php' );
34
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-select.php' );
35
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-select-categories.php' );
36
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-select-pages.php' );
37
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-select-posts.php' );
38
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-select-post-types.php' );
39
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-separator.php' );
40
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-sortable.php' );
41
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-text.php' );
42
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-textarea.php' );
43
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-upload.php' );
44
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-option-file.php' );
45
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-mobmenu-css.php' );
46
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/class-mobile-menu-options.php' );
47
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/functions-googlefonts.php' );
48
+ require_once( trailingslashit( dirname( __FILE__ ) ) . 'lib/functions-utils.php' );
includes/widgets/mobile-menu.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor Widget.
4
+ *
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ class Mobile_Menu_El_Menu_Widget extends \Elementor\Widget_Base {
9
+
10
+ /**
11
+ * Get widget name.
12
+ *
13
+ * Retrieve the widget name.
14
+ *
15
+ * @since 1.0.0
16
+ * @access public
17
+ *
18
+ * @return string Widget name.
19
+ */
20
+ public function get_name() {
21
+ return 'mobile_menu_left_button';
22
+ }
23
+
24
+ /**
25
+ * Get widget title.
26
+ *
27
+ * Retrieve the widget title.
28
+ *
29
+ * @since 1.0.0
30
+ * @access public
31
+ *
32
+ * @return string Widget title.
33
+ */
34
+ public function get_title() {
35
+ return __( 'Mobile Left Button', 'mobile-menu' );
36
+ }
37
+
38
+ /**
39
+ * Get widget icon.
40
+ *
41
+ * Retrieve the widget icon.
42
+ *
43
+ * @since 1.0.0
44
+ * @access public
45
+ *
46
+ * @return string Widget icon.
47
+ */
48
+ public function get_icon() {
49
+ return 'eicon-button';
50
+ }
51
+
52
+ /**
53
+ * Get widget categories.
54
+ *
55
+ * Retrieve the list of categories the oEmbed widget belongs to.
56
+ *
57
+ * @since 1.0.0
58
+ * @access public
59
+ *
60
+ * @return array Widget categories.
61
+ */
62
+ public function get_categories() {
63
+ return [ 'general, mobile' ];
64
+ }
65
+
66
+ /**
67
+ * Register the widget controls.
68
+ *
69
+ * Input fields to allow the user to change and customize the widget settings.
70
+ *
71
+ * @since 1.0.0
72
+ * @access protected
73
+ */
74
+ protected function _register_controls() {
75
+
76
+ $this->start_controls_section(
77
+ 'mobile_menu_section',
78
+ [
79
+ 'label' => __( 'Settings', 'mobile-menu' ),
80
+ 'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
81
+ ]
82
+ );
83
+
84
+
85
+ $this->add_control(
86
+ 'btn_color',
87
+ [
88
+ 'label' => __( 'Icon Color', 'mobile-menu' ),
89
+ 'type' => \Elementor\Controls_Manager::COLOR,
90
+ 'default' => __( '#0070c9', 'mobile-menu' ),
91
+ ]
92
+ );
93
+
94
+ $this->add_control(
95
+
96
+ 'btn_size',
97
+ [
98
+ 'label' => __( 'Font Size', 'mobile-menu' ),
99
+ 'type' => \Elementor\Controls_Manager::NUMBER,
100
+ 'placeholder' => __( '0', 'mobile-menu' ),
101
+ 'default' => '25',
102
+ ]
103
+ );
104
+
105
+ $this->add_control(
106
+
107
+ 'btn_padding',
108
+ [
109
+ 'label' => __( 'Padding', 'mobile-menu' ),
110
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
111
+ 'size_units' => [ 'px', 'em', '%' ],
112
+ 'default' => array('top' =>'10', 'right' => '25', 'bottom' => '10', 'left' => '25', 'isLinked' => false),
113
+ 'selectors' => [
114
+ '{{WRAPPER}} .pws-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
115
+ ],
116
+ ]
117
+ );
118
+
119
+ $this->end_controls_section();
120
+
121
+ }
122
+
123
+ /**
124
+ * Render oEmbed widget output on the frontend.
125
+ *
126
+ * Written in PHP and used to generate the final HTML.
127
+ *
128
+ * @since 1.0.0
129
+ * @access protected
130
+ */
131
+ protected function render() {
132
+
133
+ global $mobile_menu_instance;
134
+ $plugin_settings = MobileMenuOptions::getInstance( 'mobmenu' );
135
+ $menu_type = 'left';
136
+ $menu_text = $plugin_settings->getOption( $menu_type . '_menu_text' );
137
+ $icon_action = $plugin_settings->getOption( $menu_type . '_menu_icon_action' );
138
+ $icon_target = $plugin_settings->getOption( $menu_type . '_icon_url_target' );
139
+ $icon_url = $plugin_settings->getOption( $menu_type . '_icon_url' );
140
+ $icon_font = $plugin_settings->getOption( $menu_type . '_menu_icon_font' );
141
+ $icon = $plugin_settings->getOption( $menu_type . '_menu_icon' );
142
+ $icon_new = $plugin_settings->getOption( $menu_type . '_menu_icon_new' );
143
+ $animation = $plugin_settings->getOption( $menu_type . '_menu_icon_animation' );
144
+ $close_icon = $plugin_settings->getOption( 'close_icon_font' );
145
+ $mobile_menu_instance->mobmenu_core->frontend_enqueue_scripts();
146
+ echo $mobile_menu_instance->mobmenu_core->load_mobile_menu_html( $menu_type, $menu_text, $icon_action, $icon_target, $icon_url, $icon_font, $icon, $icon_new, $animation, $close_icon);
147
+
148
+ }
149
+
150
+ }
mobmenu.php CHANGED
@@ -3,11 +3,11 @@
3
  /**
4
  * Plugin Name: Mobile Menu
5
  * Description: An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.
6
- * Version: 2.8.2.4
7
  * Plugin URI: https://www.wpmobilemenu.com/
8
- * Author: Rui Guerreiro
9
  * Author URI: https://www.freshlightlab.com/
10
- * Tested up to: 5.8
11
  * Text Domain: mobile-menu
12
  * Domain Path: /languages/
13
  * License: GPLv2
@@ -16,7 +16,7 @@
16
  if ( !defined( 'ABSPATH' ) ) {
17
  die;
18
  }
19
- define( 'WP_MOBILE_MENU_VERSION', '2.8.2.4' );
20
  define( 'WP_MOBILE_MENU_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
21
  define( 'WP_MOBILE_MENU_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
22
  if ( !class_exists( 'WP_Mobile_Menu' ) ) {
@@ -36,23 +36,6 @@ if ( !class_exists( 'WP_Mobile_Menu' ) ) {
36
  {
37
  }
38
 
39
- public function wp_mobile_menu_custom_admin_notice()
40
- {
41
- ?>
42
-
43
- <div class="wp-mobile-menu-notice notice notice-success is-dismissible" data-ajax-nonce="<?php
44
- echo wp_create_nonce( 'wp-mobile-menu-security-nonce' ) ;
45
- ?>">
46
- <span class="dashicons dashicons-warning"></span>
47
-
48
- <?php
49
- _e( '<strong>Getting Started with WP Mobile Menu - </strong> You can start with an already existing demo just go to General Options-> Import and Export. Check our knowledgebase <a href="https://www.wpmobilemenu.com/knowledgebase/?utm_source=wprepo-dash&utm_medium=user%20website&utm_campaign=getting-started-notice" target="_blank" >site</a> as a starting point.', 'mobile-menu' );
50
- ?>
51
- </div>
52
-
53
- <?php
54
- }
55
-
56
  /**
57
  * Init WP Mobile Menu
58
  *
@@ -84,6 +67,15 @@ if ( !class_exists( 'WP_Mobile_Menu' ) ) {
84
  add_action( 'init', array( $this->mobmenu_core, 'register_menus' ) );
85
  // Find Elements to hide.
86
  add_action( 'init', array( $this->mobmenu_core, 'find_elements_mobmenu' ) );
 
 
 
 
 
 
 
 
 
87
  // Load frontend assets.
88
  if ( !is_admin() ) {
89
  add_action( 'init', array( $this, 'load_frontend_assets' ) );
@@ -156,7 +148,7 @@ if ( !class_exists( 'WP_Mobile_Menu' ) ) {
156
  */
157
  private function include_required_files()
158
  {
159
- require_once dirname( __FILE__ ) . '/options-framework/option-framework.php';
160
  require_once dirname( __FILE__ ) . '/includes/class-wp-mobile-menu-core.php';
161
  require_once dirname( __FILE__ ) . '/includes/class-wp-mobile-menu-options.php';
162
  require_once dirname( __FILE__ ) . '/includes/class-wp-mobile-menu-walker-nav-menu.php';
@@ -169,7 +161,7 @@ if ( !class_exists( 'WP_Mobile_Menu' ) ) {
169
  */
170
  public function load_frontend_assets()
171
  {
172
- $mobmenu_options = TitanFramework::getInstance( 'mobmenu' );
173
  $is_mobile_only = $mobmenu_options->getOption( 'only_mobile_devices' );
174
  $is_testing_mode = $mobmenu_options->getOption( 'only_testing_mode' );
175
  $mobmenu_action = '';
@@ -179,7 +171,7 @@ if ( !class_exists( 'WP_Mobile_Menu' ) ) {
179
 
180
  if ( $mobmenu_action == 'find-element' || $is_testing_mode && current_user_can( 'administrator' ) || !$is_testing_mode && (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
181
  // Enqueue Html to the Footer.
182
- add_action( 'wp_footer', array( $this->mobmenu_core, 'load_menu_html_markup' ) );
183
  // Frontend Scripts.
184
  add_action( 'wp_enqueue_scripts', array( $this->mobmenu_core, 'frontend_enqueue_scripts' ), 100 );
185
  // Add menu display type class to the body.
@@ -207,8 +199,6 @@ if ( !class_exists( 'WP_Mobile_Menu' ) ) {
207
  {
208
  add_action( 'wp_ajax_get_icons_html', array( $this->mobmenu_core, 'get_icons_html' ) );
209
  add_action( 'wp_ajax_nopriv_get_icons_html', array( $this->mobmenu_core, 'get_icons_html' ) );
210
- add_action( 'wp_ajax_dismiss_wp_mobile_notice', array( $this->mobmenu_core, 'dismiss_wp_mobile_notice' ) );
211
- add_action( 'wp_ajax_nopriv_dismiss_wp_mobile_notice', array( $this->mobmenu_core, 'dismiss_wp_mobile_notice' ) );
212
  add_action( 'wp_ajax_save_menu_item_icon', array( $this->mobmenu_core, 'save_menu_item_icon' ) );
213
  add_action( 'wp_ajax_dismiss_wp_mobile_upgrade_notice', array( $this->mobmenu_core, 'dismiss_wp_mobile_upgrade_notice' ) );
214
  add_action( 'wp_ajax_nopriv_save_menu_item_icon', array( $this->mobmenu_core, 'save_menu_item_icon' ) );
@@ -221,17 +211,25 @@ if ( !class_exists( 'WP_Mobile_Menu' ) ) {
221
  {
222
  global $mm_fs ;
223
  global $post_type ;
224
-
225
  if ( 'toplevel_page_mobile-menu-options' === $hook && !$mm_fs->is__premium_only() ) {
226
- if ( !get_option( 'wp_mobile_menu_banner_dismissed' ) ) {
227
- add_action( 'admin_notices', array( $this, 'wp_mobile_menu_custom_admin_notice' ) );
228
- }
229
  wp_enqueue_style( 'cssmobmenu-admin', plugins_url( 'includes/css/mobmenu-admin.css', __FILE__ ) );
230
  }
231
 
232
-
233
  if ( 'nav-menus.php' === $hook || 'toplevel_page_mobile-menu-options' === $hook ) {
234
  wp_enqueue_style( 'cssmobmenu-icons', plugins_url( 'includes/css/mobmenu-icons.css', __FILE__ ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  wp_enqueue_style( 'cssmobmenu-admin', plugins_url( 'includes/css/mobmenu-admin.css', __FILE__ ) );
236
  wp_register_script(
237
  'mobmenu-admin-js',
@@ -274,7 +272,8 @@ if ( isset( $_GET['mobmenu-action'] ) ) {
274
  }
275
 
276
  if ( $mobmenu_action == 'find-element' || is_admin() || (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
277
- // Instanciate the WP_Mobile_Menu.
 
278
  $mobile_menu_instance = new WP_Mobile_Menu();
279
  $mobile_menu_instance->init_mobile_menu();
280
  }
3
  /**
4
  * Plugin Name: Mobile Menu
5
  * Description: An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.
6
+ * Version: 2.8.2.5
7
  * Plugin URI: https://www.wpmobilemenu.com/
8
+ * Author: Freshlight Lab
9
  * Author URI: https://www.freshlightlab.com/
10
+ * Tested up to: 5.9
11
  * Text Domain: mobile-menu
12
  * Domain Path: /languages/
13
  * License: GPLv2
16
  if ( !defined( 'ABSPATH' ) ) {
17
  die;
18
  }
19
+ define( 'WP_MOBILE_MENU_VERSION', '2.8.2.5' );
20
  define( 'WP_MOBILE_MENU_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
21
  define( 'WP_MOBILE_MENU_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
22
  if ( !class_exists( 'WP_Mobile_Menu' ) ) {
36
  {
37
  }
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  /**
40
  * Init WP Mobile Menu
41
  *
67
  add_action( 'init', array( $this->mobmenu_core, 'register_menus' ) );
68
  // Find Elements to hide.
69
  add_action( 'init', array( $this->mobmenu_core, 'find_elements_mobmenu' ) );
70
+ // Add links to plugin page.
71
+ add_filter(
72
+ 'plugin_row_meta',
73
+ array( $this->mobmenu_core, 'add_plugin_row_meta' ),
74
+ 10,
75
+ 2
76
+ );
77
+ // Load Elementor widgets.
78
+ add_action( 'elementor/widgets/widgets_registered', array( $this->mobmenu_core, 'mobmenu_el_init_widgets' ) );
79
  // Load frontend assets.
80
  if ( !is_admin() ) {
81
  add_action( 'init', array( $this, 'load_frontend_assets' ) );
148
  */
149
  private function include_required_files()
150
  {
151
+ require_once dirname( __FILE__ ) . '/includes/plugin-settings/mobile-menu-options.php';
152
  require_once dirname( __FILE__ ) . '/includes/class-wp-mobile-menu-core.php';
153
  require_once dirname( __FILE__ ) . '/includes/class-wp-mobile-menu-options.php';
154
  require_once dirname( __FILE__ ) . '/includes/class-wp-mobile-menu-walker-nav-menu.php';
161
  */
162
  public function load_frontend_assets()
163
  {
164
+ $mobmenu_options = MobileMenuOptions::getInstance( 'mobmenu' );
165
  $is_mobile_only = $mobmenu_options->getOption( 'only_mobile_devices' );
166
  $is_testing_mode = $mobmenu_options->getOption( 'only_testing_mode' );
167
  $mobmenu_action = '';
171
 
172
  if ( $mobmenu_action == 'find-element' || $is_testing_mode && current_user_can( 'administrator' ) || !$is_testing_mode && (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
173
  // Enqueue Html to the Footer.
174
+ add_action( 'wp_body_open', array( $this->mobmenu_core, 'load_menu_html_markup' ) );
175
  // Frontend Scripts.
176
  add_action( 'wp_enqueue_scripts', array( $this->mobmenu_core, 'frontend_enqueue_scripts' ), 100 );
177
  // Add menu display type class to the body.
199
  {
200
  add_action( 'wp_ajax_get_icons_html', array( $this->mobmenu_core, 'get_icons_html' ) );
201
  add_action( 'wp_ajax_nopriv_get_icons_html', array( $this->mobmenu_core, 'get_icons_html' ) );
 
 
202
  add_action( 'wp_ajax_save_menu_item_icon', array( $this->mobmenu_core, 'save_menu_item_icon' ) );
203
  add_action( 'wp_ajax_dismiss_wp_mobile_upgrade_notice', array( $this->mobmenu_core, 'dismiss_wp_mobile_upgrade_notice' ) );
204
  add_action( 'wp_ajax_nopriv_save_menu_item_icon', array( $this->mobmenu_core, 'save_menu_item_icon' ) );
211
  {
212
  global $mm_fs ;
213
  global $post_type ;
 
214
  if ( 'toplevel_page_mobile-menu-options' === $hook && !$mm_fs->is__premium_only() ) {
 
 
 
215
  wp_enqueue_style( 'cssmobmenu-admin', plugins_url( 'includes/css/mobmenu-admin.css', __FILE__ ) );
216
  }
217
 
 
218
  if ( 'nav-menus.php' === $hook || 'toplevel_page_mobile-menu-options' === $hook ) {
219
  wp_enqueue_style( 'cssmobmenu-icons', plugins_url( 'includes/css/mobmenu-icons.css', __FILE__ ) );
220
+ wp_enqueue_style(
221
+ 'shepherd-style',
222
+ 'https://cdnjs.cloudflare.com/ajax/libs/shepherd.js/8.1.0/css/shepherd.min.css',
223
+ array(),
224
+ '8.1'
225
+ );
226
+ wp_enqueue_script(
227
+ 'shepherd-script',
228
+ 'https://cdnjs.cloudflare.com/ajax/libs/shepherd.js/8.1.0/js/shepherd.min.js',
229
+ array(),
230
+ '8.1',
231
+ true
232
+ );
233
  wp_enqueue_style( 'cssmobmenu-admin', plugins_url( 'includes/css/mobmenu-admin.css', __FILE__ ) );
234
  wp_register_script(
235
  'mobmenu-admin-js',
272
  }
273
 
274
  if ( $mobmenu_action == 'find-element' || is_admin() || (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
275
+ // Instantiate the WP_Mobile_Menu.
276
+ global $mobile_menu_instance ;
277
  $mobile_menu_instance = new WP_Mobile_Menu();
278
  $mobile_menu_instance->init_mobile_menu();
279
  }
options-framework/js/min/admin-styling-min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(t){"use strict";t(".titan-framework-panel-wrap table.form-table").filter(function(){return 0===t(this).find("tbody tr").length}).remove()});
 
options-framework/lib/class-option-file.php DELETED
@@ -1,226 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
4
- }
5
- class TitanFrameworkOptionFile extends TitanFrameworkOption {
6
-
7
- private static $firstLoad = true;
8
-
9
- public $defaultSecondarySettings = array(
10
- 'placeholder' => '', // Show this when blank.
11
- 'label' => '', // Add label.
12
- );
13
-
14
-
15
- /**
16
- * Constructor.
17
- *
18
- * @return void
19
- * @since 1.5
20
- */
21
- function __construct( $settings, $owner ) {
22
- parent::__construct( $settings, $owner );
23
-
24
- add_filter( 'tf_generate_css_upload_' . $this->getOptionNamespace(), array( $this, 'generateCSS' ), 10, 2 );
25
-
26
- add_action( 'tf_livepreview_pre_' . $this->getOptionNamespace(), array( $this, 'preLivePreview' ), 10, 3 );
27
- add_action( 'tf_livepreview_post_' . $this->getOptionNamespace(), array( $this, 'postLivePreview' ), 10, 3 );
28
- }
29
-
30
-
31
- /**
32
- * Generates CSS for the font, this is used in TitanFrameworkCSS.
33
- *
34
- * @param String $css The CSS generated.
35
- * @param TitanFrameworkOption $option The current option being processed.
36
- * @return String The CSS generated.
37
- * @since 1.5
38
- */
39
- public function generateCSS( $css, $option ) {
40
- if ( $this->settings['id'] != $option->settings['id'] ) {
41
- return $css;
42
- }
43
-
44
- $value = $this->getValue();
45
-
46
- if ( empty( $value ) ) {
47
- return $css;
48
- }
49
-
50
- $css .= '$' . $option->settings['id'] . ': url(' . $value . ');';
51
-
52
- if ( ! empty( $option->settings['css'] ) ) {
53
- // In the css parameter, we accept the term `value` as our current value,
54
- // translate it into the SaSS variable for the current option.
55
- $css .= str_replace( 'value', '#{$' . $option->settings['id'] . '}', $option->settings['css'] );
56
- }
57
-
58
- return $css;
59
- }
60
-
61
-
62
- /**
63
- * The upload option gives out an attachment ID. Live previews will not work since we cannot get.
64
- * the upload URL from an ID easily. Use a specially created Ajax Handler for just getting the URL.
65
- *
66
- * @since 1.9
67
- *
68
- * @see tf_file_upload_option_customizer_get_value()
69
- */
70
- public function preLivePreview( $optionID, $optionType, $option ) {
71
- if ( $optionID != $this->settings['id'] ) {
72
- return;
73
- }
74
-
75
- $nonce = wp_create_nonce( 'tf_file_upload_option_nonce' );
76
-
77
- ?>
78
- wp.ajax.send( 'tf_file_upload_option_customizer_get_value', {
79
- data: {
80
- nonce: '<?php echo esc_attr( $nonce ); ?>',
81
- id: value
82
- },
83
- success: function( data ) {
84
- var $ = jQuery;
85
- var value = data;
86
- <?php
87
- }
88
-
89
-
90
- /**
91
- * Closes the Javascript code created in preLivePreview().
92
- *
93
- * @since 1.9
94
- *
95
- * @see preLivePreview()
96
- */
97
- public function postLivePreview( $optionID, $optionType, $option ) {
98
- if ( $optionID != $this->settings['id'] ) {
99
- return;
100
- }
101
-
102
- // Close the ajax call.
103
- ?>
104
- }
105
- });
106
- <?php
107
- }
108
-
109
- /*
110
- * Display for options and meta.
111
- */
112
- public function display() {
113
- self::createUploaderScript();
114
-
115
- $this->echoOptionHeader();
116
-
117
- // Display the preview file name.
118
- $value = $this->getValue();
119
- if ( ! is_array( $value ) ) {
120
- $value = $this->getValue();
121
- }
122
-
123
- $previewFile = '';
124
- if ( ! empty( $value ) ) {
125
- $previewFile = "<i class='dashicons dashicons-no-alt remove'></i><p>". basename( get_attached_file( $value ) ) . "</p>";
126
- } else {
127
- $previewFile = $this->settings['label'];
128
- }
129
- echo "<div class='tf-file-upload'>" . $previewFile . '</div>';
130
-
131
- printf('<input name="%s" placeholder="%s" id="%s" type="hidden" value="%s" />',
132
- $this->getID(),
133
- $this->settings['placeholder'],
134
- $this->getID(),
135
- esc_attr( $this->getValue() )
136
- );
137
- $this->echoOptionFooter();
138
- }
139
-
140
- public static function createUploaderScript() {
141
- if ( ! self::$firstLoad ) {
142
- return;
143
- }
144
- self::$firstLoad = false;
145
-
146
- ?>
147
- <script>
148
- jQuery(document).ready(function($){
149
- "use strict";
150
-
151
- // In the theme customizer, the load event above doesn't work because of the accordion,
152
- // the image's height & width are detected as 0. We bind to the opening of an accordion
153
- // and adjust the image placement from there.
154
- var tfUploadAccordionSections = [];
155
- $('.tf-file-upload').each(function() {
156
- var $accordion = $(this).parents('.control-section.accordion-section');
157
- if ( $accordion.length > 0 ) {
158
- if ( $.inArray( $accordion, tfUploadAccordionSections ) == -1 ) {
159
- tfUploadAccordionSections.push($accordion);
160
- }
161
- }
162
- });
163
- $.each( tfUploadAccordionSections, function() {
164
- var $title = $(this).find('.accordion-section-title:eq(0)'); // just opening the section
165
- $title.click(function() {
166
- var $accordion = $(this).parents('.control-section.accordion-section');
167
- if ( ! $accordion.is('.open') ) {
168
- $accordion.find('.tf-file-upload .thumbnail img').each(function() {
169
- var $this = $(this);
170
- });
171
- }
172
- });
173
- });
174
-
175
-
176
- // Remove the image when the remove link is clicked.
177
- $('body').on('click', '.tf-file-upload i.remove', function(event) {
178
- event.preventDefault();
179
- var _input = $(this).parents('.tf-file').find('input');
180
- _input.siblings('.tf-file-upload').html('');
181
- _input.val('').trigger('change');
182
-
183
- return false;
184
- });
185
-
186
-
187
- // Open the upload media lightbox when the upload button is clicked.
188
- $('body').on('click', '.tf-file-upload', function(event) {
189
- event.preventDefault();
190
- // If we have a smaller image, users can click on the thumbnail.
191
- var _this = $(this);
192
- var _input = $(this).parents('.tf-file').find('input');
193
- var _remove = $(this).siblings('.tf-file-upload-remove');
194
-
195
- // Uploader frame properties.
196
- var frame = wp.media({
197
- title: '<?php esc_html_e( 'Select File', 'mobile-menu' ) ?>',
198
- multiple: false,
199
- button : { text : '<?php esc_html_e( 'Use file', 'mobile-menu' ) ?>' }
200
- });
201
-
202
- // Get the url when done.
203
- frame.on('select', function() {
204
- var selection = frame.state().get('selection');
205
- selection.each(function(attachment) {
206
- _input.val(attachment.id).trigger('change');
207
- // document.getElementById(_input.id).value = attachment.id;
208
- console.info(_input.val());
209
- // Change filename.
210
- _this.html("<i class='dashicons dashicons-no-alt remove'></i><p>"+attachment.attributes.filename+"</p>");
211
-
212
- _remove.show();
213
- });
214
- frame.off('select');
215
- });
216
-
217
- // Open the uploader.
218
- frame.open();
219
-
220
- return false;
221
- });
222
- });
223
- </script>
224
- <?php
225
- }
226
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options-framework/lib/class-option-gallery.php DELETED
@@ -1,203 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
4
- }
5
- class TitanFrameworkOptionGallery extends TitanFrameworkOption {
6
-
7
- private static $firstLoad = true;
8
-
9
- public $defaultSecondarySettings = array(
10
- 'size' => 'full', // The size of the image to use in the generated CSS.
11
- 'placeholder' => '', // Show this when blank.
12
- );
13
-
14
-
15
- /**
16
- * Constructor.
17
- *
18
- * @return void
19
- * @since 1.5
20
- */
21
- function __construct( $settings, $owner ) {
22
- parent::__construct( $settings, $owner );
23
- }
24
-
25
-
26
- /*
27
- * Display for options and meta.
28
- */
29
- public function display() {
30
- self::createUploaderScript();
31
-
32
- $this->echoOptionHeader();
33
-
34
- // Display the preview image.
35
- $value = $this->getValue();
36
-
37
- if ( is_numeric( $value ) ) {
38
- // Gives us an array with the first element as the src or false on fail.
39
- $value = wp_get_attachment_image_src( $value, array( 150, 150 ) );
40
- }
41
- if ( ! is_array( $value ) ) {
42
- $value = $this->getValue();
43
- } else {
44
- $value = $value[0];
45
- }
46
-
47
- // $value = '101,96';.
48
- $value_arr = explode( ',', $value );
49
-
50
- foreach ( $value_arr as $k => $v ) {
51
- $previewImage = '';
52
- $value = $v;
53
- if ( ! empty( $v ) ) {
54
- $size = ! empty( $option->settings['size'] ) ? $option->settings['size'] : 'thumbnail';
55
-
56
- if ( is_numeric( $v ) ) {
57
- $attachment = wp_get_attachment_image_src( $v, $size );
58
- $v = $attachment[0];
59
- }
60
-
61
- $previewImage = "<i class='dashicons dashicons-no-alt remove'></i><img style='max-width: 150px; max-height: 150px; margin-top: 0px; margin-left: 0px;' src='" . esc_url( $v ) . "' style='display: none'/>";
62
- echo "<div data-attachment-id=" . $value . " class='thumbnail used-thumbnail tf-image-preview'>" . $previewImage . '</div>';
63
- }
64
- }
65
- echo "<div class='thumbnail tf-image-preview'></div>";
66
-
67
- printf('<input name="%s" placeholder="%s" id="%s" type="hidden" value="%s" />',
68
- $this->getID(),
69
- $this->settings['placeholder'],
70
- $this->getID(),
71
- esc_attr( $this->getValue() )
72
- );
73
-
74
- $this->echoOptionFooter();
75
- }
76
-
77
- public static function createUploaderScript() {
78
- if ( ! self::$firstLoad ) {
79
- return;
80
- }
81
- self::$firstLoad = false;
82
-
83
- ?>
84
- <script>
85
- jQuery(document).ready(function($){
86
- "use strict";
87
-
88
- function tfUploadOptionCenterImage($this) {
89
-
90
- var _preview = $this.parents('.tf-gallery').find('.thumbnail');
91
- $this.css({
92
- 'marginTop': ( _preview.height() - $this.height() ) / 2,
93
- 'marginLeft': ( _preview.width() - $this.width() ) / 2
94
- }).show();
95
- }
96
-
97
-
98
- // Calculate display offset of preview image on load.
99
- $('.tf-gallery .thumbnail img').load(function() {
100
- tfUploadOptionCenterImage($(this));
101
- }).each(function(){
102
- // Sometimes the load event might not trigger due to cache.
103
- if(this.complete) {
104
- $(this).trigger('load');
105
- };
106
- });
107
-
108
-
109
- // Creating attachments arr.
110
- var get_attachments_of_gallery = function(preview, input) {
111
- var $attachments_str = [];
112
- preview.find('.used-thumbnail').each(function(i, object){
113
- $attachments_str.push($(object).attr('data-attachment-id'));
114
- });
115
- input.val($attachments_str.join(','));
116
- input.trigger('change');
117
- }
118
-
119
-
120
- // Remove the image when the remove link is clicked.
121
- $('body').on('click', '.tf-gallery i.remove', function(event) {
122
- event.preventDefault();
123
- var _input = $(this).parents('.tf-gallery').find('input');
124
- var _preview = $(this).parents('.tf-gallery');
125
-
126
- $(this).parents('.thumbnail').remove();
127
- get_attachments_of_gallery(_preview, _input);
128
-
129
- return false;
130
- });
131
-
132
-
133
- // Open the upload media lightbox when the upload button is clicked.
134
- $('body').on('click', '.tf-gallery .thumbnail, .tf-gallery img', function(event) {
135
- event.preventDefault();
136
-
137
- var _input = $(this).parents('.tf-gallery').find('input');
138
- var _preview = $(this).parents('.tf-gallery');
139
- var _remove = $(this).siblings('.tf-gallery-image-remove');
140
-
141
- // Uploader frame properties.
142
- var frame = wp.media({
143
- title: '<?php esc_html_e( 'Select Image', 'mobile-menu' ) ?>',
144
- multiple: true,
145
- library: { type: 'image' },
146
- button : { text : '<?php esc_html_e( 'Use image', 'mobile-menu' ) ?>' }
147
- });
148
-
149
- // Get the url when done.
150
- frame.on('select', function() {
151
- var selection = frame.state().get('selection');
152
-
153
- if ( _preview.find('div.thumbnail').length > 0 ) {
154
- // Remove current preview.
155
- _preview.find('.used-thumbnail').remove();
156
- }
157
-
158
- var $attachments_str = [];
159
- selection.each(function(attachment) {
160
-
161
- if ( typeof attachment.attributes.sizes === 'undefined' ) {
162
- return;
163
- }
164
-
165
- $attachments_str.push(attachment.id);
166
-
167
- // Get the preview image.
168
- var image = attachment.attributes.sizes.full;
169
- if ( typeof attachment.attributes.sizes.thumbnail != 'undefined' ) {
170
- image = attachment.attributes.sizes.thumbnail;
171
- }
172
- var url = image.url;
173
- // var marginTop = ( _preview.height() - image.height ) / 2;
174
- // var marginLeft = ( _preview.width() - image.width ) / 2;
175
-
176
- $("<div data-attachment-id='"+attachment.id+"' class='thumbnail used-thumbnail tf-image-preview'><i class='dashicons dashicons-no-alt remove'></i><img style='max-width: 150px; max-height: 150px; margin-top: 0px; margin-left: 0px;' src='" + url + "'/></div>").prependTo(_preview);
177
-
178
- _remove.show();
179
- });
180
-
181
- frame.off('select');
182
-
183
-
184
- // Updating the attachments input field.
185
- if ( _input.length > 0 ) {
186
- _input.val($attachments_str.join(','));
187
- }
188
-
189
- // We need to trigger a change so that WP would detect that we changed the value.
190
- // Or else the save button won't be enabled.
191
- _input.trigger('change');
192
- });
193
-
194
- // Open the uploader.
195
- frame.open();
196
-
197
- return false;
198
- });
199
- });
200
- </script>
201
- <?php
202
- }
203
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options-framework/option-framework.php DELETED
@@ -1,134 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
4
- }
5
-
6
- // Used for general naming, e.g. nonces.
7
- defined( 'TF' ) or define( 'TF', 'titan-framework' );
8
- // Used for file includes.
9
- defined( 'TF_PATH' ) or define( 'TF_PATH', trailingslashit( dirname( __FILE__ ) ) );
10
- // Used for testing and checking plugin slug name.
11
- defined( 'TF_PLUGIN_BASENAME' ) or define( 'TF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
12
-
13
- require_once( TF_PATH . 'lib/class-admin-notification.php' );
14
- require_once( TF_PATH . 'lib/class-admin-page.php' );
15
- require_once( TF_PATH . 'lib/class-admin-tab.php' );
16
- require_once( TF_PATH . 'lib/class-meta-box.php' );
17
- require_once( TF_PATH . 'lib/class-option.php' );
18
- require_once( TF_PATH . 'lib/class-option-ajax-button.php' );
19
- require_once( TF_PATH . 'lib/class-option-checkbox.php' );
20
- require_once( TF_PATH . 'lib/class-option-code.php' );
21
- require_once( TF_PATH . 'lib/class-option-color.php' );
22
- require_once( TF_PATH . 'lib/class-option-custom.php' );
23
- require_once( TF_PATH . 'lib/class-option-date.php' );
24
- require_once( TF_PATH . 'lib/class-option-enable.php' );
25
- require_once( TF_PATH . 'lib/class-option-editor.php' );
26
- require_once( TF_PATH . 'lib/class-option-font.php' );
27
- require_once( TF_PATH . 'lib/class-option-gallery.php' );
28
- require_once( TF_PATH . 'lib/class-option-group.php' );
29
- require_once( TF_PATH . 'lib/class-option-heading.php' );
30
- require_once( TF_PATH . 'lib/class-option-iframe.php' );
31
- require_once( TF_PATH . 'lib/class-option-multicheck.php' );
32
- require_once( TF_PATH . 'lib/class-option-multicheck-categories.php' );
33
- require_once( TF_PATH . 'lib/class-option-multicheck-pages.php' );
34
- require_once( TF_PATH . 'lib/class-option-multicheck-posts.php' );
35
- require_once( TF_PATH . 'lib/class-option-multicheck-post-types.php' );
36
- require_once( TF_PATH . 'lib/class-option-note.php' );
37
- require_once( TF_PATH . 'lib/class-option-number.php' );
38
- require_once( TF_PATH . 'lib/class-option-radio.php' );
39
- require_once( TF_PATH . 'lib/class-option-radio-image.php' );
40
- require_once( TF_PATH . 'lib/class-option-radio-palette.php' );
41
- require_once( TF_PATH . 'lib/class-option-save.php' );
42
- require_once( TF_PATH . 'lib/class-option-select.php' );
43
- require_once( TF_PATH . 'lib/class-option-select-categories.php' );
44
- require_once( TF_PATH . 'lib/class-option-select-pages.php' );
45
- require_once( TF_PATH . 'lib/class-option-select-posts.php' );
46
- require_once( TF_PATH . 'lib/class-option-select-post-types.php' );
47
- require_once( TF_PATH . 'lib/class-option-separator.php' );
48
- require_once( TF_PATH . 'lib/class-option-sortable.php' );
49
- require_once( TF_PATH . 'lib/class-option-text.php' );
50
- require_once( TF_PATH . 'lib/class-option-textarea.php' );
51
- require_once( TF_PATH . 'lib/class-option-upload.php' );
52
- require_once( TF_PATH . 'lib/class-option-file.php' );
53
- require_once( TF_PATH . 'lib/class-titan-css.php' );
54
- require_once( TF_PATH . 'lib/class-titan-framework.php' );
55
- require_once( TF_PATH . 'lib/functions-googlefonts.php' );
56
- require_once( TF_PATH . 'lib/functions-utils.php' );
57
-
58
- /**
59
- * Option Framework Plugin Class
60
- *
61
- * @since 1.0
62
- */
63
- class OptionFrameworkPlugin {
64
-
65
-
66
- /**
67
- * Constructor, add hooks
68
- *
69
- * @since 1.0
70
- */
71
- function __construct() {
72
- add_action( 'plugins_loaded', array( $this, 'force_load_first' ), 10, 1 );
73
-
74
- // Create the options.
75
- add_action( 'init', array( $this, 'trigger_option_creation' ), 1 );
76
- }
77
-
78
-
79
- /**
80
- * Trigger the creation of the options
81
- *
82
- * @since 1.9
83
- * @access public
84
- *
85
- * @return void
86
- */
87
- public function trigger_option_creation() {
88
-
89
- /**
90
- * Triggers the creation of options. Hook into this action and use the various create methods.
91
- *
92
- * @since 1.0
93
- */
94
- do_action( 'tf_create_options' );
95
-
96
- /**
97
- * Fires immediately after options are created.
98
- *
99
- * @since 1.8
100
- */
101
- do_action( 'tf_done' );
102
- }
103
-
104
-
105
- /**
106
- * Forces our plugin to be loaded first. This is to ensure that plugins that use the framework have access to
107
- * this class from almost anywhere
108
- *
109
- * @since 1.0
110
- * @access public
111
- *
112
- * @param array $plugins List of plugins loaded.
113
- *
114
- * @return array Modified list of plugins.
115
- *
116
- * @see initially based on http://snippets.khromov.se/modify-wordpress-plugin-load-order/
117
- */
118
- public function force_load_first( $plugins = null ) {
119
- $plugins = null === $plugins ? (array) get_option( 'active_plugins' ) : $plugins;
120
-
121
- if ( ! empty( $plugins ) ) {
122
- $index = array_search( TF_PLUGIN_BASENAME, $plugins );
123
- if ( false !== $index && 0 !== $index ) {
124
- array_splice( $plugins, $index, 1 );
125
- array_unshift( $plugins, TF_PLUGIN_BASENAME );
126
- update_option( 'active_plugins', $plugins );
127
- }
128
- }
129
-
130
- return $plugins;
131
- }
132
- }
133
-
134
- new OptionFrameworkPlugin();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WP Mobile Menu - The Mobile-Friendly Responsive Menu ===
2
- Contributors: takanakui, freemius
3
  link: http://profiles.wordpress.org/takanakui
4
  Tags: mobile, navigation, responsive, menu, responsive menu, mobile menu, tablet menu, hamburger menu, hamburger, wordpress responsive menu, wordpress mobile menu, canvas menu
5
  Requires at least: 4.4
6
- Tested up to: 5.8
7
- Stable tag: 2.8.2.4
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -136,6 +136,16 @@ Not available at the moment
136
 
137
 
138
 
 
 
 
 
 
 
 
 
 
 
139
  = 2.8.2.4 =
140
  * Fix! - Fix issue that was opening all the submenus
141
 
1
  === WP Mobile Menu - The Mobile-Friendly Responsive Menu ===
2
+ Contributors: takanakui, freemius, freslightlab
3
  link: http://profiles.wordpress.org/takanakui
4
  Tags: mobile, navigation, responsive, menu, responsive menu, mobile menu, tablet menu, hamburger menu, hamburger, wordpress responsive menu, wordpress mobile menu, canvas menu
5
  Requires at least: 4.4
6
+ Tested up to: 5.9
7
+ Stable tag: 2.8.2.5
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
136
 
137
 
138
 
139
+ = 2.8.2.5 =
140
+ * New! - Proof of concept new Elementor widget for the Let Menu button
141
+ * New! - Logo is now translated with WPML to use different mobile header logos per language
142
+ * New! - Closing menu with enter is now possible when focusing on the close button
143
+ * Fix! - Improve Onboarding
144
+ * Fix! - Improve UX Settings in admin area making it easier
145
+ * Fix! - Complete removal of TitanFramework
146
+ * Fix! - Adding more acessibility practices in the menus
147
+ * Fix! - Code refactoring for better organization
148
+
149
  = 2.8.2.4 =
150
  * Fix! - Fix issue that was opening all the submenus
151