PluginProbe ʕ •ᴥ•ʔ
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) / 2.1.8
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) v2.1.8
2.9.1 2.9.0 2.8.9 2.8.8 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 2.0 2.0.1 2.0.3 2.0.4 2.0.5 2.0.6 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7
mystickymenu / mystickymenu.php
mystickymenu Last commit date
css 7 years ago fonts 7 years ago images 7 years ago js 6 years ago languages 7 years ago index.php 8 years ago mystickymenu.php 6 years ago readme.txt 6 years ago uninstall.php 7 years ago
mystickymenu.php
841 lines
1 <?php
2 /*
3 Plugin Name: myStickymenu
4 Plugin URI: https://premio.io/
5 Description: Simple sticky (fixed on top) menu implementation for navigation menu. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6 Version: 2.1.8
7 Author: Premio
8 Author URI: https://premio.io/downloads/mystickymenu/
9 Text Domain: mystickymenu
10 Domain Path: /languages
11 License: GPLv2 or later
12 */
13
14 defined('ABSPATH') or die("Cannot access pages directly.");
15 define( 'MYSTICKY_VERSION', '2.1.8' );
16
17 class MyStickyMenuBackend
18 {
19 private $options;
20
21 public function __construct()
22 {
23 add_action( 'admin_menu', array( $this, 'add_plugin_page' ) );
24 add_action( 'admin_init', array( $this, 'mysticky_load_transl') );
25
26 add_action( 'admin_init', array( $this, 'mysticky_default_options' ) );
27 add_action( 'admin_enqueue_scripts', array( $this, 'mysticky_admin_script' ) );
28
29 add_filter( 'plugin_action_links_mystickymenu/mystickymenu.php', array( $this, 'mystickymenu_settings_link' ) );
30
31 add_action( 'activated_plugin', array( $this, 'mystickymenu_activation_redirect' ) );
32 }
33
34 public function mystickymenu_settings_link($links){
35 $settings_link = '<a href="options-general.php?page=my-stickymenu-settings">Settings</a>';
36 $links['go_pro'] = '<a href="'.admin_url("options-general.php?page=my-stickymenu-settings&type=upgrade").'" style="color: #FF5983;font-weight: bold;">'.__( 'Upgrade', 'stars-testimonials' ).'</a>';
37 array_unshift($links, $settings_link);
38 return $links;
39 }
40
41 public function mystickymenu_activation_redirect( $plugin) {
42 if( $plugin == plugin_basename( __FILE__ ) ) {
43 wp_redirect( admin_url( 'options-general.php?page=my-stickymenu-settings' ) ) ;
44 exit;
45 }
46 }
47
48 public function mysticky_admin_script($hook) {
49 if ($hook != 'settings_page_my-stickymenu-settings') {
50 return;
51 }
52
53 wp_enqueue_script('jquery-ui');
54 wp_enqueue_script('jquery-ui-slider');
55 wp_register_script('mystickymenuAdminScript', plugins_url('/js/mystickymenu-admin.js', __FILE__), array( 'jquery' ), MYSTICKY_VERSION);
56 wp_enqueue_script('mystickymenuAdminScript');
57
58 wp_register_style('mystickymenuAdminStyle', plugins_url('/css/mystickymenu-admin.css', __FILE__), array(), MYSTICKY_VERSION );
59 wp_enqueue_style('mystickymenuAdminStyle');
60
61 wp_enqueue_style( 'wp-color-picker' );
62 wp_enqueue_script( 'my-script-handle', plugins_url('js/iris-script.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
63 }
64
65 public function mysticky_load_transl(){
66 load_plugin_textdomain('mystickymenu', FALSE, dirname(plugin_basename(__FILE__)).'/languages/');
67 }
68
69 function sanitize_options($value) {
70 $value = stripslashes($value);
71 $value = filter_var($value, FILTER_SANITIZE_STRING);
72 return $value;
73 }
74
75 public function add_plugin_page(){
76 // This page will be under "Settings"
77 add_options_page(
78 'Settings Admin',
79 'myStickymenu',
80 'manage_options',
81 'my-stickymenu-settings',
82 array( $this, 'create_admin_page' )
83 );
84 }
85
86 public function create_admin_page(){
87 // Set class property
88 if (isset($_POST['mysticky_option_name']) && !empty($_POST['mysticky_option_name']) && isset($_POST['nonce'])) {
89 if(!empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'mysticky_option_backend_update')) {
90 $post = $_POST['mysticky_option_name'];
91 foreach($post as $key=>$value) {
92 $post[$key] = self::sanitize_options($value);
93 }
94 update_option( 'mysticky_option_name', $post);
95 echo '<div class="updated settings-error notice is-dismissible "><p><strong>' . esc_html__('Settings saved.','mystickymenu'). '</p></strong></div>';
96 } else {
97 wp_verify_nonce($_GET['nonce'], 'wporg_frontend_delete');
98 echo '<div class="error settings-error notice is-dismissible "><p><strong>' . esc_html__('Unable to complete your request','mystickymenu'). '</p></strong></div>';
99 }
100 }
101
102 $mysticky_options = get_option( 'mysticky_option_name');
103 $is_old = get_option("has_sticky_header_old_version");
104 $is_old = ($is_old == "no")?false:true;
105 $nonce = wp_create_nonce('mysticky_option_backend_update');
106 $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=";
107 ?>
108 <style>
109 div#wpcontent {
110 background: rgba(101,114,219,1);
111 background: -moz-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
112 background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(101,114,219,1)), color-stop(67%, rgba(238,134,198,1)), color-stop(100%, rgba(238,134,198,1)));
113 background: -webkit-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
114 background: -o-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
115 background: -ms-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
116 background: linear-gradient(135deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
117 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6572db', endColorstr='#ee86c6', GradientType=1 );
118 }
119 </style>
120 <div id="mystickymenu" class="wrap mystickymenu">
121 <div class="sticky-header-menu">
122 <ul>
123 <li><a href="#sticky-header-settings" class="<?php echo (isset($_GET['type'])&&$_GET['type']=="upgrade")?"":"active" ?>"><?php _e('Settings', 'mystickymenu'); ?></a></li>
124 <li><a href="#sticky-header-upgrade" class="<?php echo (isset($_GET['type'])&&$_GET['type']=="upgrade")?"active":"" ?>"><?php _e('Upgrade to Pro', 'mystickymenu'); ?></a></li>
125 </ul>
126 </div>
127 <div style="display: <?php echo (isset($_GET['type'])&&$_GET['type']=="upgrade")?"none":"block" ?>" id="sticky-header-settings" class="sticky-header-content">
128 <div class="mystickymenu-heading">
129 <div class="myStickymenu-header-title">
130 <h3><?php _e('How To Make a Sticky Header', 'mystickymenu'); ?></h3>
131 </div>
132 <p><?php _e("Add sticky menu / header to any theme. <br />Simply change 'Sticky Class' to HTML element class desired to be sticky (div id can be used as well).", 'mystickymenu'); ?></p>
133 </div>
134
135 <form class="mysticky-form" method="post" action="#">
136 <div class="mystickymenu-content-section sticky-class-sec">
137 <table>
138 <tr>
139 <td>
140 <label class="mysticky_title"><?php _e("Sticky Class", 'mystickymenu')?></label>
141 <br /><br />
142 <?php $nav_menus = wp_get_nav_menus();
143 $menu_locations = get_nav_menu_locations();
144 $locations = get_registered_nav_menus();
145 ?>
146 <select name="mysticky_option_name[mysticky_class_id_selector]" id="mystickymenu-select">
147 <option value=""><?php _e( 'Select Sticky Menu', 'mystickymenu' ); ?></option>
148
149 <?php foreach ( (array) $nav_menus as $_nav_menu ) : ?>
150 <option value="<?php echo esc_attr( $_nav_menu->slug ); ?>" <?php selected( $_nav_menu->slug, $mysticky_options['mysticky_class_id_selector'] ); ?>>
151 <?php
152 echo esc_html( $_nav_menu->name );
153
154 if ( ! empty( $menu_locations ) && in_array( $_nav_menu->term_id, $menu_locations ) ) {
155 $locations_assigned_to_this_menu = array();
156 foreach ( array_keys( $menu_locations, $_nav_menu->term_id ) as $menu_location_key ) {
157 if ( isset( $locations[ $menu_location_key ] ) ) {
158 $locations_assigned_to_this_menu[] = $locations[ $menu_location_key ];
159 }
160 }
161
162 /**
163 * Filters the number of locations listed per menu in the drop-down select.
164 *
165 * @since 3.6.0
166 *
167 * @param int $locations Number of menu locations to list. Default 3.
168 */
169 $assigned_locations = array_slice( $locations_assigned_to_this_menu, 0, absint( apply_filters( 'wp_nav_locations_listed_per_menu', 3 ) ) );
170
171 // Adds ellipses following the number of locations defined in $assigned_locations.
172 if ( ! empty( $assigned_locations ) ) {
173 printf(
174 ' (%1$s%2$s)',
175 implode( ', ', $assigned_locations ),
176 count( $locations_assigned_to_this_menu ) > count( $assigned_locations ) ? ' &hellip;' : ''
177 );
178 }
179 }
180 ?>
181 </option>
182 <?php endforeach; ?>
183 <option value="custom" <?php selected( 'custom', $mysticky_options['mysticky_class_id_selector'] ); ?>><?php esc_html_e( 'Other Class Or ID', 'mystickymenu' );?></option>
184 </select>
185
186 <input type="text" size="18" id="mysticky_class_selector" class="mystickyinput" name="mysticky_option_name[mysticky_class_selector]" value="<?php echo $mysticky_options['mysticky_class_selector'];?>" />
187
188 <p class="description"><?php _e("menu or header element class or id.", 'mystickymenu')?></p>
189 </td>
190 <td>
191 <div class="mysticky_device_upgrade">
192 <label class="mysticky_title"><?php _e("Devices", 'mystickymenu')?></label>
193 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
194 <ul class="mystickymenu-input-multicheckbox">
195 <li>
196 <label>
197 <input id="disable_css" name="mysticky_option_name[device_desktop]" type="checkbox" checked disabled />
198 <?php _e( 'Desktop', 'mystickymenu' );?>
199 <label>
200 </li>
201 <li>
202 <label>
203 <input id="disable_css" name="mysticky_option_name[device_mobile]" type="checkbox" checked disabled />
204 <?php _e( 'Mobile', 'mystickymenu' );?>
205 <label>
206 </li>
207 </ul>
208 </div>
209 </td>
210 </tr>
211 </table>
212 </div>
213
214
215 <div class="mystickymenu-content-section">
216 <h3><?php esc_html_e( 'Settings', 'mystickymenu' );?></h3>
217 <table class="form-table">
218 <tr>
219 <td>
220 <label for="myfixed_zindex" class="mysticky_title"><?php _e("Sticky z-index", 'mystickymenu')?></label>
221 </td>
222 <td>
223 <input type="number" min="0" max="2147483647" step="1" class="mysticky-number" id="myfixed_zindex" name="mysticky_option_name[myfixed_zindex]" value="<?php echo $mysticky_options['myfixed_zindex'];?>" />
224 </td>
225 <td>
226 <label class="mysticky_title myssticky-remove-hand"><?php _e("Fade or slide effect", 'mystickymenu')?></label>
227 </td>
228 <td>
229 <label>
230 <input name="mysticky_option_name[myfixed_fade]" value= "slide" type="radio" <?php checked( @$mysticky_options['myfixed_fade'], 'slide' );?> />
231 <?php _e("Slide", 'mystickymenu'); ?>
232 </label>
233 <label>
234 <input name="mysticky_option_name[myfixed_fade]" value="fade" type="radio" <?php checked( @$mysticky_options['myfixed_fade'], 'fade' );?> />
235 <?php _e("Fade", 'mystickymenu'); ?>
236 </label>
237 </td>
238 </tr>
239 <tr>
240 <td>
241 <label for="myfixed_disable_small_screen" class="mysticky_title"><?php _e("Disable at Small Screen Sizes", 'mystickymenu')?></label>
242 <p class="description"><?php _e('Less than chosen screen width, set 0 to disable','mystickymenu');?></p>
243 </td>
244 <td>
245 <div class="px-wrap">
246 <input type="number" class="" min="0" step="1" id="myfixed_disable_small_screen" name="mysticky_option_name[myfixed_disable_small_screen]" value="<?php echo $mysticky_options['myfixed_disable_small_screen'];?>" />
247 <span class="input-px">PX</span>
248 </div>
249 </td>
250 <td>
251 <label for="mysticky_active_on_height" class="mysticky_title"><?php _e("Make visible on Scroll", 'mystickymenu')?></label>
252 <p class="description"><?php _e('If set to 0 auto calculate will be used.','mystickymenu');?></p>
253 </td>
254 <td>
255 <div class="px-wrap">
256 <input type="number" class="small-text" min="0" step="1" id="mysticky_active_on_height" name="mysticky_option_name[mysticky_active_on_height]" value="<?php echo $mysticky_options['mysticky_active_on_height'];?>" />
257 <span class="input-px">PX</span>
258 </div>
259 </td>
260 </tr>
261 <tr>
262 <td>
263 <label for="mysticky_active_on_height_home" class="mysticky_title"><?php _e("Make visible on Scroll at homepage", 'mystickymenu')?></label>
264 <p class="description"><?php _e( 'If set to 0 it will use initial Make visible on Scroll value.', 'mystickymenu' );?></p>
265 </td>
266 <td>
267 <div class="px-wrap">
268 <input type="number" class="small-text" min="0" step="1" id="mysticky_active_on_height_home" name="mysticky_option_name[mysticky_active_on_height_home]" value="<?php echo $mysticky_options['mysticky_active_on_height_home'];?>" />
269 <span class="input-px">PX</span>
270 </div>
271 </td>
272 <td>
273 <label for="myfixed_bgcolor" class="mysticky_title myssticky-remove-hand"><?php _e("Sticky Background Color", 'mystickymenu')?></label>
274 </td>
275 <td>
276 <input type="text" id="myfixed_bgcolor" name="mysticky_option_name[myfixed_bgcolor]" class="my-color-field" value="<?php echo $mysticky_options['myfixed_bgcolor'];?>" />
277
278 </td>
279 </tr>
280 <tr>
281 <td>
282 <label for="myfixed_transition_time" class="mysticky_title"><?php _e("Sticky Transition Time", 'mystickymenu')?></label>
283 </td>
284 <td>
285 <input type="number" class="small-text" min="0" step="0.1" id="myfixed_transition_time" name="mysticky_option_name[myfixed_transition_time]" value="<?php echo $mysticky_options['myfixed_transition_time'];?>" />
286 </td>
287 <td>
288 <label for="myfixed_opacity" class="mysticky_title myssticky-remove-hand"><?php _e("Sticky Opacity", 'mystickymenu')?></label>
289 <p class="description"><?php _e( 'numbers 1-100.', 'mystickymenu');?></p>
290 </td>
291 <td>
292 <input type="hidden" class="small-text mysticky-slider" min="0" step="1" max="100" id="myfixed_opacity" name="mysticky_option_name[myfixed_opacity]" value="<?php echo $mysticky_options['myfixed_opacity'];?>" />
293 <div id="slider">
294 <div id="custom-handle" class="ui-slider-handle"><?php //echo $mysticky_options['myfixed_opacity'];?></div>
295 </div>
296
297 </td>
298 </tr>
299 </table>
300 </div>
301
302 <div class="mystickymenu-content-section <?php echo !$is_old?"mystickymenu-content-upgrade":""?>" >
303
304 <div class="mystickymenu-content-option">
305 <label class="mysticky_title css-style-title"><?php _e("Hide on Scroll Down", 'mystickymenu'); ?></label>
306 <?php if(!$is_old) { ?><span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span><?php } ?>
307 <p>
308 <label class="mysticky_text">
309 <input id="myfixed_disable_scroll_down" name="mysticky_option_name[myfixed_disable_scroll_down]" type="checkbox" <?php checked( @$mysticky_options['myfixed_disable_scroll_down'], 'on' );?> <?php echo !$is_old?"disabled":"" ?> />
310 <?php _e("Disable sticky menu at scroll down", 'mystickymenu'); ?>
311 </label>
312 </p>
313 </div>
314 <div class="mystickymenu-content-option">
315 <label class="mysticky_title css-style-title"><?php _e("CSS style", 'mystickymenu'); ?></label>
316 <span class="mysticky_text"><?php _e( 'Add/edit CSS style. Leave it blank for default style.', 'mystickymenu');?></span>
317 <div class="mystickymenu-input-section">
318 <textarea type="text" rows="4" cols="60" id="myfixed_cssstyle" name="mysticky_option_name[myfixed_cssstyle]" <?php echo !$is_old?"disabled":"" ?> ><?php echo @$mysticky_options['myfixed_cssstyle'];?></textarea>
319 </div>
320 <p><?php esc_html_e( "CSS ID's and Classes to use:", "mystickymenu" );?></p>
321 <p>
322 #mysticky-wrap { }<br/>
323 #mysticky-nav.wrapfixed { }<br/>
324 #mysticky-nav.wrapfixed.up { }<br/>
325 #mysticky-nav.wrapfixed.down { }<br/>
326 #mysticky-nav .navbar { }<br/>
327 #mysticky-nav .navbar.myfixed { }<br/>
328 </p>
329 </div>
330
331 <div class="mystickymenu-content-option">
332 <label class="mysticky_title" for="disable_css"><?php _e("Disable CSS style", 'mystickymenu'); ?></label>
333 <div class="mystickymenu-input-section">
334 <label>
335 <input id="disable_css" name="mysticky_option_name[disable_css]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['disable_css'], 'on' );?> />
336 <?php _e( 'Use this option if you plan to include CSS Style manually', 'mystickymenu' );?>
337 <label>
338 </div>
339 <p></p>
340 </div>
341
342 <div class="mystickymenu-content-option">
343 <label class="mysticky_title"><?php _e("Disable at", 'mystickymenu'); ?></label>
344 <?php if(!$is_old) { ?><span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span><?php } ?>
345 <div class="mystickymenu-input-section">
346 <ul class="mystickymenu-input-multicheckbox">
347 <li>
348 <label>
349 <input id="mysticky_disable_at_front_home" name="mysticky_option_name[mysticky_disable_at_front_home]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_front_home'], 'on' );?>/>
350 <span><?php _e('front page', 'mystickymenu' );?></span>
351 </label>
352 </li>
353 <li>
354 <label>
355 <input id="mysticky_disable_at_blog" name="mysticky_option_name[mysticky_disable_at_blog]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_blog'], 'on' );?>/>
356 <span><?php _e('blog page', 'mystickymenu' );?></span>
357 </label>
358 </li>
359 <li>
360 <label>
361 <input id="mysticky_disable_at_page" name="mysticky_option_name[mysticky_disable_at_page]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_page'], 'on' );?> />
362 <span><?php _e('pages', 'mystickymenu' );?> </span>
363 </label>
364 </li>
365 <li>
366 <label>
367 <input id="mysticky_disable_at_tag" name="mysticky_option_name[mysticky_disable_at_tag]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_tag'], 'on' );?> />
368 <span><?php _e('tags', 'mystickymenu' );?> </span>
369 </label>
370 </li>
371 <li>
372 <label>
373 <input id="mysticky_disable_at_category" name="mysticky_option_name[mysticky_disable_at_category]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_category'], 'on' );?>/>
374 <span><?php _e('categories', 'mystickymenu' );?></span>
375 </label>
376 </li>
377 <li>
378 <label>
379 <input id="mysticky_disable_at_single" name="mysticky_option_name[mysticky_disable_at_single]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_single'], 'on' );?> />
380 <span><?php _e('posts', 'mystickymenu' );?> </span>
381 </label>
382 </li>
383 <li>
384 <label>
385 <input id="mysticky_disable_at_archive" name="mysticky_option_name[mysticky_disable_at_archive]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_archive'], 'on' );?> />
386 <span><?php _e('archives', 'mystickymenu' );?> </span>
387 </label>
388 </li>
389 <li>
390 <label>
391 <input id="mysticky_disable_at_search" name="mysticky_option_name[mysticky_disable_at_search]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_search'], 'on' );?> />
392 <span><?php _e('search', 'mystickymenu' );?> </span>
393 </label>
394 </li>
395 <li>
396 <label>
397 <input id="mysticky_disable_at_404" name="mysticky_option_name[mysticky_disable_at_404]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_404'], 'on' );?>/>
398 <span><?php _e('404', 'mystickymenu' );?> </span>
399 </label>
400 </li>
401 </ul>
402
403 <?php
404 if (isset ( $mysticky_options['mysticky_disable_at_page'] ) == true ) {
405 echo '<div class="mystickymenu-input-section">';
406 _e('<span class="description"><strong>Except for this pages:</strong> </span>', 'mystickymenu');
407
408 printf(
409 '<input type="text" size="26" class="mystickymenu_normal_text" id="mysticky_enable_at_pages" name="mysticky_option_name[mysticky_enable_at_pages]" value="%s" /> ',
410 isset( $mysticky_options['mysticky_enable_at_pages'] ) ? esc_attr( $mysticky_options['mysticky_enable_at_pages']) : ''
411 );
412
413 _e('<span class="description">Comma separated list of pages to enable. It should be page name, id or slug. Example: about-us, 1134, Contact Us. Leave blank if you realy want to disable sticky menu for all pages.</span>', 'mystickymenu');
414 echo '</div>';
415 }
416
417 if (isset ( $mysticky_options['mysticky_disable_at_single'] ) == true ) {
418
419 echo '<div class="mystickymenu-input-section">';
420 _e('<span class="description"><strong>Except for this posts:</strong> </span>', 'mystickymenu');
421
422 printf(
423 '<input type="text" size="26" class="mystickymenu_normal_text" id="mysticky_enable_at_posts" name="mysticky_option_name[mysticky_enable_at_posts]" value="%s" /> ',
424 isset( $mysticky_options['mysticky_enable_at_posts'] ) ? esc_attr( $mysticky_options['mysticky_enable_at_posts']) : ''
425 );
426
427 _e('<span class="description">Comma separated list of posts to enable. It should be post name, id or slug. Example: about-us, 1134, Contact Us. Leave blank if you realy want to disable sticky menu for all posts.</span>', 'mystickymenu');
428 echo '</div>';
429
430 }
431 ?>
432 <p></p>
433 </div>
434 </div>
435 </div>
436 <p class="submit">
437 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save', 'mystickymenu');?>">
438 </p>
439 <input type="hidden" name="nonce" value="<?php echo $nonce ?>">
440 </form>
441 <form class="mysticky-hideformreset" method="post" action="">
442 <input name="reset_mysticky_options" class="button button-secondary confirm" type="submit" value="<?php _e('Reset', 'mystickymenu');?>" >
443 <input type="hidden" name="action" value="reset" />
444 <?php $nonce = wp_create_nonce('mysticky_option_backend_reset_nonce'); ?>
445 <input type="hidden" name="nonce" value="<?php echo $nonce ?>">
446 </form>
447 <p class="myStickymenu-review"><a href="https://wordpress.org/support/plugin/mystickymenu/reviews/" target="_blank"><?php _e('Leave a review','mystickymenu'); ?></a></p>
448 </div>
449 <div style="display: <?php echo (isset($_GET['type'])&&$_GET['type']=="upgrade")?"block":"none" ?>" id="sticky-header-upgrade" class="sticky-header-content">
450 <div id="rpt_pricr" class="rpt_plans rpt_3_plans rpt_style_basic">
451 <p class="udner-title">
452 <strong class="text-primary">Unlock All Features</strong>
453 </p>
454 <div class="">
455 <div class="rpt_plan rpt_plan_0 ">
456 <div style="text-align:left;" class="rpt_title rpt_title_0">Basic</div>
457 <div class="rpt_head rpt_head_0">
458 <div class="rpt_recurrence rpt_recurrence_0">For small website owners</div>
459 <div class="rpt_price rpt_price_0">$9</div>
460 <div class="rpt_description rpt_description_0 rpt_desc">Per year. Renewals for 25% off</div>
461 <div style="clear:both;"></div>
462 </div>
463 <div class="rpt_features rpt_features_0">
464 <div class="rpt_feature rpt_feature_0-0"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Use myStickymenu on 1 domain</span>1 website<span class="rpt_tooltip_plus" > +</span></a></div>
465 <div class="rpt_feature rpt_feature_0-1"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>You can show the menu when scrolling up, down or both</span>Show on scroll up/down<span class="rpt_tooltip_plus" > +</span></a></div>
466 <div class="rpt_feature rpt_feature_0-2"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>You can disable the sticky effect on desktop or mobile</span>Devices<span class="rpt_tooltip_plus" > +</span></a></div>
467 <div class="rpt_feature rpt_feature_0-3"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Add CSS of your own to the sticky menu</span>CSS style<span class="rpt_tooltip_plus" > +</span></a></div>
468 <div class="rpt_feature rpt_feature_0-4"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Exclude pages you don't want to have sticky menu</span>Page targeting<span class="rpt_tooltip_plus" > +</span></a></div>
469 <div class="rpt_feature rpt_feature_0-5"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Fade/Slide, opacity, background color, transition time and more</span>Effects and more<span class="rpt_tooltip_plus" > +</span></a></div>
470 <div class="rpt_feature rpt_feature_0-9">
471 <select data-key="0" class="multiple-options">
472 <option data-header="Renewals for 25% off" data-price="9" value="<?php echo esc_url($pro_url."1") ?>">
473 <?php esc_html_e("Updates & support for 1 year") ?>
474 </option>
475 <option data-header="For 3 years" data-price="19" value="<?php echo esc_url($pro_url."4") ?>">
476 <?php esc_html_e("Updates & support for 3 years") ?>
477 </option>
478 <option data-header="For lifetime" data-price="39" value="<?php echo esc_url($pro_url."5") ?>">
479 <?php esc_html_e("Updates & support for lifetime") ?>
480 </option>
481 </select>
482 </div>
483 </div>
484 <div style="clear:both;"></div>
485 <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=2199&amp;edd_options[price_id]=1" class="rpt_foot rpt_foot_0">Buy now</a>
486 </div>
487 <div class="rpt_plan rpt_plan_1 rpt_recommended_plan ">
488 <div style="text-align:left;" class="rpt_title rpt_title_1">Pro<img class="rpt_recommended" src="<?php echo plugins_url("") ?>/mystickymenu/images/rpt_recommended.png" style="top: 27px;"></div>
489 <div class="rpt_head rpt_head_1">
490 <div class="rpt_recurrence rpt_recurrence_1">For businesses with multiple websites</div>
491 <div class="rpt_price rpt_price_1">$25</div>
492 <div class="rpt_description rpt_description_1 rpt_desc">Per year. Renewals for 25% off</div>
493 <div style="clear:both;"></div>
494 </div>
495 <div class="rpt_features rpt_features_1">
496 <div class="rpt_feature rpt_feature_1-0"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Use myStickymenu on 5 domains</span>5 websites<span class="rpt_tooltip_plus" > +</span></a></div>
497 <div class="rpt_feature rpt_feature_1-1"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>You can show the menu when scrolling up, down or both</span>Show on scroll up/down<span class="rpt_tooltip_plus" > +</span></a></div>
498 <div class="rpt_feature rpt_feature_1-2"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>You can disable the sticky effect on desktop or mobile</span>Devices<span class="rpt_tooltip_plus" > +</span></a></div>
499 <div class="rpt_feature rpt_feature_1-3"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Add CSS of your own to the sticky menu</span>CSS style<span class="rpt_tooltip_plus" > +</span></a></div>
500 <div class="rpt_feature rpt_feature_1-4"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Exclude pages you don't want to have sticky menu</span>Page targeting<span class="rpt_tooltip_plus" > +</span></a></div>
501 <div class="rpt_feature rpt_feature_1-5"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Fade/Slide, opacity, background color, transition time and more</span>Effects and more<span class="rpt_tooltip_plus" > +</span></a></div>
502 <div class="rpt_feature rpt_feature_0-9">
503 <select data-key="0" class="multiple-options">
504 <option data-header="Renewals for 25% off" data-price="25" value="<?php echo esc_url($pro_url."2") ?>">
505 <?php esc_html_e("Updates & support for 1 year") ?>
506 </option>
507 <option data-header="For 3 years" data-price="39" value="<?php echo esc_url($pro_url."6") ?>">
508 <?php esc_html_e("Updates & support for 3 years") ?>
509 </option>
510 <option data-header="For lifetime" data-price="59" value="<?php echo esc_url($pro_url."7") ?>">
511 <?php esc_html_e("Updates & support for lifetime") ?>
512 </option>
513 </select>
514 </div>
515 </div>
516 <div style="clear:both;"></div>
517 <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=2199&amp;edd_options[price_id]=2" class="rpt_foot rpt_foot_1">Buy now</a>
518 </div>
519 <div class="rpt_plan rpt_plan_2 ">
520 <div style="text-align:left;" class="rpt_title rpt_title_2">Agency</div>
521 <div class="rpt_head rpt_head_2">
522 <div class="rpt_recurrence rpt_recurrence_2">For agencies who manage clients</div>
523 <div class="rpt_price rpt_price_2">$49</div>
524 <div class="rpt_description rpt_description_2 rpt_desc">Per year. Renewals for 25% off</div>
525 <div style="clear:both;"></div>
526 </div>
527 <div class="rpt_features rpt_features_2">
528 <div class="rpt_feature rpt_feature_2-0"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Use myStickymenu on 20 domains</span>20 websites<span class="rpt_tooltip_plus" > +</span></a></div>
529 <div class="rpt_feature rpt_feature_2-1"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>You can show the menu when scrolling up, down or both</span>Show on scroll up/down<span class="rpt_tooltip_plus" > +</span></a></div>
530 <div class="rpt_feature rpt_feature_2-2"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>You can disable the sticky effect on desktop or mobile</span>Devices<span class="rpt_tooltip_plus" > +</span></a></div>
531 <div class="rpt_feature rpt_feature_2-3"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Add CSS of your own to the sticky menu</span>CSS style<span class="rpt_tooltip_plus" > +</span></a></div>
532 <div class="rpt_feature rpt_feature_2-4"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Exclude pages you don't want to have sticky menu</span>Page targeting<span class="rpt_tooltip_plus" > +</span></a></div>
533 <div class="rpt_feature rpt_feature_2-5"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Fade/Slide, opacity, background color, transition time and more</span>Effects and more<span class="rpt_tooltip_plus" > +</span></a></div>
534 <div class="rpt_feature rpt_feature_0-9">
535 <select data-key="0" class="multiple-options">
536 <option data-header="Renewals for 25% off" data-price="49" value="<?php echo esc_url($pro_url."3") ?>">
537 <?php esc_html_e("Updates & support for 1 year") ?>
538 </option>
539 <option data-header="For 3 years" data-price="89" value="<?php echo esc_url($pro_url."8") ?>">
540 <?php esc_html_e("Updates & support for 3 years") ?>
541 </option>
542 <option data-header="For lifetime" data-price="119" value="<?php echo esc_url($pro_url."9") ?>">
543 <?php esc_html_e("Updates & support for lifetime") ?>
544 </option>
545 </select>
546 </div>
547 </div>
548 <div style="clear:both;"></div>
549 <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=2199&amp;edd_options[price_id]=3" class="rpt_foot rpt_foot_2">Buy now</a>
550 </div>
551 </div>
552 <div style="clear:both;"></div>
553 <div class="client-testimonial">
554 <p class="text-center"><span class="dashicons dashicons-yes"></span> 30 days money back guaranteed</p>
555 <p class="text-center"><span class="dashicons dashicons-yes"></span> The plugin will always keep working even if you don't renew your license</p>
556 <div class="payment">
557 <img src="<?php echo plugins_url("") ?>/mystickymenu/images/payment.png" alt="Payment" class="payment-img" />
558 </div>
559 <div class="testimonial-box">
560 <div class="testimonial-image">
561 <img src="<?php echo plugins_url("") ?>/mystickymenu/images/testimonial.png" style="top: 27px;">
562 </div>
563 <div class="testimonial-content">
564 This plugin does exactly what it should. It is simple but powerful. I would suggest to anyone who wants to make their menu sticky! I especially love the hide header on scroll down, show on scroll up feature that is built it. Great work!
565 <div class="author">Clayton Chase</div>
566 </div>
567 <div style="clear:both;"></div>
568 </div>
569 </div>
570 </div>
571 </div>
572 </div>
573 <?php
574 }
575 public function mysticky_default_options() {
576
577 global $options;
578 $menu_locations = get_nav_menu_locations();
579 $menu_object = isset($menu_locations['menu-1']) ? wp_get_nav_menu_object( $menu_locations['menu-1'] ) : array();
580
581 if ( is_object($menu_object) && $menu_object->slug != '' ) {
582 $mysticky_class_id_selector = $menu_object->slug;
583 } else {
584 $mysticky_class_id_selector = 'custom';
585 }
586 $default = array(
587 'mysticky_class_id_selector' => $mysticky_class_id_selector,
588 'mysticky_class_selector' => '.navbar',
589 'device_desktop' => 'on',
590 'device_mobile' => 'on',
591 'myfixed_zindex' => '99990',
592 'myfixed_bgcolor' => '#f7f5e7',
593 'myfixed_opacity' => '90',
594 'myfixed_transition_time' => '0.3',
595 'myfixed_disable_small_screen' => '0',
596 'myfixed_disable_large_screen' => '0',
597 'mysticky_active_on_height' => '0',
598 'mysticky_active_on_height_home'=> '0',
599 'myfixed_fade' => 'slide',
600 'myfixed_cssstyle' => '#mysticky-nav .myfixed { margin:0 auto; float:none; border:0px; background:none; max-width:100%; }'
601 );
602
603 if ( get_option('mysticky_option_name') == false ) {
604 $status = get_option("sticky_header_status");
605 if($status == false) {
606 update_option("sticky_header_status", "done");
607 update_option("has_sticky_header_old_version", "no");
608 }
609 update_option( 'mysticky_option_name', $default );
610 } else {
611 $status = get_option("sticky_header_status");
612 if($status == false) {
613 update_option("sticky_header_status", "done");
614 update_option("has_sticky_header_old_version", "yes");
615 }
616 }
617
618 if(isset($_POST['reset_mysticky_options'])) {
619 if(isset($_REQUEST['nonce']) && !empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'mysticky_option_backend_reset_nonce')) {
620 update_option('mysticky_option_name', $default);
621 } else {
622
623 }
624 }
625
626 if ( !get_option( 'update_mysticky_version_2_6') ) {
627 $mysticky_option_name = get_option( 'mysticky_option_name' );
628 $mysticky_option_name['mysticky_class_id_selector'] = 'custom';
629 if ($mysticky_option_name['myfixed_fade'] == 'on'){
630 $mysticky_option_name['myfixed_fade'] = 'slide';
631 }else{
632 $mysticky_option_name['myfixed_fade'] = 'fade';
633 }
634 update_option( 'mysticky_option_name', $mysticky_option_name );
635 update_option( 'update_mysticky_version_2_6', true );
636 }
637 }
638 }
639
640
641
642 class MyStickyMenuFrontend
643 {
644
645 public function __construct()
646 {
647 add_action( 'wp_head', array( $this, 'mysticky_build_stylesheet_content' ) );
648 add_action( 'wp_enqueue_scripts', array( $this, 'mysticky_disable_at' ) );
649 }
650
651 public function mysticky_build_stylesheet_content() {
652
653 $mysticky_options = get_option( 'mysticky_option_name' );
654
655 if (isset($mysticky_options['disable_css'])) {
656 //do nothing
657 } else {
658 $mysticky_options['disable_css'] = false;
659 }
660
661 if ($mysticky_options ['disable_css'] == false ) {
662
663 echo '<style id="mystickymenu" type="text/css">';
664 echo '#mysticky-nav { width:100%; position: static; }';
665 echo '#mysticky-nav.wrapfixed { position:fixed; left: 0px; margin-top:0px; z-index: '. $mysticky_options ['myfixed_zindex'] .'; -webkit-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -moz-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -o-transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; transition: ' . $mysticky_options ['myfixed_transition_time'] . 's; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=' . $mysticky_options ['myfixed_opacity'] . ')"; filter: alpha(opacity=' . $mysticky_options ['myfixed_opacity'] . '); opacity:' . $mysticky_options ['myfixed_opacity'] / 100 . '; background-color: ' . $mysticky_options ['myfixed_bgcolor'] . ';}';
666
667
668 if ($mysticky_options ['myfixed_disable_small_screen'] > 0 ){
669 //echo '@media (max-width: '.$mysticky_options['myfixed_disable_small_screen'].'px) {#mysticky-nav.wrapfixed {position: static;} }';
670 };
671 if ( !isset( $mysticky_options['myfixed_cssstyle'] ) ) {
672 echo '#mysticky-nav .myfixed { margin:0 auto; float:none; border:0px; background:none; max-width:100%; }';
673 }
674 if ( isset( $mysticky_options['myfixed_cssstyle'] ) && $mysticky_options['myfixed_cssstyle'] != '' ) {
675 echo $mysticky_options ['myfixed_cssstyle'];
676 }
677 echo '</style>';
678 }
679 }
680
681 public function mystickymenu_script() {
682
683 $mysticky_options = get_option( 'mysticky_option_name' );
684
685 if ( is_admin_bar_showing() ) {
686 $top = "true";
687 } else {
688 $top = "false";
689 }
690
691
692 // needed for update 1.7 => 1.8 ... will be removed in the future ()
693 if (isset($mysticky_options['mysticky_active_on_height_home'])) {
694 //do nothing
695 } else {
696 $mysticky_options['mysticky_active_on_height_home'] = $mysticky_options['mysticky_active_on_height'];
697 }
698
699
700 if ($mysticky_options['mysticky_active_on_height_home'] == 0 ) {
701 $mysticky_options['mysticky_active_on_height_home'] = $mysticky_options['mysticky_active_on_height'];
702 }
703
704
705 if ( is_front_page() && is_home() ) {
706
707 $mysticky_options['mysticky_active_on_height'] = $mysticky_options['mysticky_active_on_height_home'];
708
709 } elseif ( is_front_page()){
710
711 $mysticky_options['mysticky_active_on_height'] = $mysticky_options['mysticky_active_on_height_home'];
712
713 }
714 wp_register_script('detectmobilebrowser', plugins_url( 'js/detectmobilebrowser.js', __FILE__ ), array('jquery'), MYSTICKY_VERSION, true);
715 wp_enqueue_script( 'detectmobilebrowser' );
716
717 wp_register_script('mystickymenu', plugins_url( 'js/mystickymenu.min.js', __FILE__ ), array('jquery'), MYSTICKY_VERSION, true);
718 wp_enqueue_script( 'mystickymenu' );
719
720 $myfixed_disable_scroll_down = isset($mysticky_options['myfixed_disable_scroll_down']) ? $mysticky_options['myfixed_disable_scroll_down'] : 'false';
721 $mystickyTransition = isset($mysticky_options['myfixed_fade']) ? $mysticky_options['myfixed_fade'] : 'fade';
722 $mystickyDisableLarge = isset($mysticky_options['myfixed_disable_large_screen']) ? $mysticky_options['myfixed_disable_large_screen'] : '0';
723
724 $mystickyClass = ( $mysticky_options['mysticky_class_id_selector'] != 'custom') ? '.menu-' . $mysticky_options['mysticky_class_id_selector'] .'-container' : $mysticky_options['mysticky_class_selector'];
725
726 $mysticky_translation_array = array(
727 'mystickyClass' => $mystickyClass,
728 'activationHeight' => $mysticky_options['mysticky_active_on_height'],
729 'disableWidth' => $mysticky_options['myfixed_disable_small_screen'],
730 'disableLargeWidth' => $mystickyDisableLarge,
731 'adminBar' => $top,
732 'device_desktop' => true,
733 'device_mobile' => true,
734 'mystickyTransition' => $mystickyTransition,
735 'mysticky_disable_down' => $myfixed_disable_scroll_down,
736
737
738 );
739 wp_localize_script( 'mystickymenu', 'option', $mysticky_translation_array );
740 }
741
742 public function mysticky_disable_at() {
743
744
745 $mysticky_options = get_option( 'mysticky_option_name' );
746
747 $mysticky_disable_at_front_home = isset($mysticky_options['mysticky_disable_at_front_home']);
748 $mysticky_disable_at_blog = isset($mysticky_options['mysticky_disable_at_blog']);
749 $mysticky_disable_at_page = isset($mysticky_options['mysticky_disable_at_page']);
750 $mysticky_disable_at_tag = isset($mysticky_options['mysticky_disable_at_tag']);
751 $mysticky_disable_at_category = isset($mysticky_options['mysticky_disable_at_category']);
752 $mysticky_disable_at_single = isset($mysticky_options['mysticky_disable_at_single']);
753 $mysticky_disable_at_archive = isset($mysticky_options['mysticky_disable_at_archive']);
754 $mysticky_disable_at_search = isset($mysticky_options['mysticky_disable_at_search']);
755 $mysticky_disable_at_404 = isset($mysticky_options['mysticky_disable_at_404']);
756 $mysticky_enable_at_pages = isset($mysticky_options['mysticky_enable_at_pages']) ? $mysticky_options['mysticky_enable_at_pages'] : '';
757 $mysticky_enable_at_posts = isset($mysticky_options['mysticky_enable_at_posts']) ? $mysticky_options['mysticky_enable_at_posts'] : '';
758
759 // Trim input to ignore empty spaces
760 $mysticky_enable_at_pages_exp = array_map('trim', explode(',', $mysticky_enable_at_pages));
761 $mysticky_enable_at_posts_exp = array_map('trim', explode(',', $mysticky_enable_at_posts));
762
763
764
765
766 if ( is_front_page() && is_home() ) { /* Default homepage */
767
768 if ( $mysticky_disable_at_front_home == false ) {
769 $this->mystickymenu_script();
770 }
771 } elseif ( is_front_page()){ /* Static homepage */
772
773 if ( $mysticky_disable_at_front_home == false ) {
774 $this->mystickymenu_script();
775 }
776
777 } elseif ( is_home()){ /* Blog page */
778
779 if ( $mysticky_disable_at_blog == false ) {
780 $this->mystickymenu_script();
781 }
782
783 } elseif ( is_page() ){ /* Single page*/
784
785 if ( $mysticky_disable_at_page == false ) {
786 $this->mystickymenu_script();
787 }
788 if ( is_page( $mysticky_enable_at_pages_exp ) ){
789 $this->mystickymenu_script();
790 }
791
792 } elseif ( is_tag()){ /* Tag page */
793
794 if ( $mysticky_disable_at_tag == false ) {
795 $this->mystickymenu_script();
796 }
797
798 } elseif ( is_category()){ /* Category page */
799
800 if ( $mysticky_disable_at_category == false ) {
801 $this->mystickymenu_script();
802 }
803
804 } elseif ( is_single()){ /* Single post */
805
806 if ( $mysticky_disable_at_single == false ) {
807 $this->mystickymenu_script();
808 }
809
810 if ( is_single( $mysticky_enable_at_posts_exp ) ){
811 $this->mystickymenu_script();
812 }
813
814 } elseif ( is_archive()){ /* Archive */
815
816 if ( $mysticky_disable_at_archive == false ) {
817 $this->mystickymenu_script();
818 }
819
820 } elseif ( is_search()){ /* Search */
821
822 if ( $mysticky_disable_at_search == false ) {
823 $this->mystickymenu_script();
824 }
825
826 } elseif ( is_404()){ /* 404 */
827
828 if ( $mysticky_disable_at_404 == false ) {
829 $this->mystickymenu_script();
830 }
831 }
832
833 }
834
835 }
836
837 if( is_admin() ) {
838 new MyStickyMenuBackend();
839 } else {
840 new MyStickyMenuFrontend();
841 }