PluginProbe ʕ •ᴥ•ʔ
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) / 2.3.8
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) v2.3.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 6 years ago fonts 7 years ago images 6 years ago js 6 years ago languages 7 years ago class-review-box.php 6 years ago index.php 8 years ago mystickymenu-affiliate.php 6 years ago mystickymenu-fonts.php 6 years ago mystickymenu.php 6 years ago readme.txt 6 years ago uninstall.php 7 years ago welcome-bar.php 6 years ago
mystickymenu.php
1299 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 and Welcome bar for announcements and promotion. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6 Version: 2.3.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.3.8' );
16 require_once("mystickymenu-fonts.php");
17 require_once("welcome-bar.php");
18
19 if(is_admin()) {
20 include_once 'class-review-box.php';
21 }
22
23 class MyStickyMenuBackend
24 {
25 private $options;
26
27 public function __construct()
28 {
29 add_action( 'admin_menu', array( $this, 'add_plugin_page' ) );
30 add_action( 'admin_init', array( $this, 'mysticky_load_transl') );
31
32 add_action( 'admin_init', array( $this, 'mysticky_default_options' ) );
33 add_action( 'admin_enqueue_scripts', array( $this, 'mysticky_admin_script' ) );
34
35 add_filter( 'plugin_action_links_mystickymenu/mystickymenu.php', array( $this, 'mystickymenu_settings_link' ) );
36
37 add_action( 'activated_plugin', array( $this, 'mystickymenu_activation_redirect' ) );
38
39 add_action("wp_ajax_sticky_menu_update_status", array($this, 'sticky_menu_update_status'));
40 }
41
42 public function sticky_menu_update_status() {
43 if(!empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'myStickymenu_update_nonce')) {
44 $status = self::sanitize_options($_REQUEST['status']);
45 $email = self::sanitize_options($_REQUEST['email']);
46 update_option("mystickymenu_update_message", 2);
47 if($status == 1) {
48 $url = 'https://go.premio.io/api/update.php?email='.$email.'&plugin=myStickymenu';
49 $handle = curl_init();
50 curl_setopt($handle, CURLOPT_URL, $url);
51 curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
52 $response = curl_exec($handle);
53 curl_close($handle);
54 }
55 }
56 echo "1";
57 die;
58 }
59
60 public function mystickymenu_settings_link($links){
61 $settings_link = '<a href="admin.php?page=my-stickymenu-settings">Settings</a>';
62 $links['go_pro'] = '<a href="'.admin_url("admin.php?page=my-stickymenu-settings&type=upgrade").'" style="color: #FF5983;font-weight: bold;">'.__( 'Upgrade', 'stars-testimonials' ).'</a>';
63 array_unshift($links, $settings_link);
64 return $links;
65 }
66
67 public function mystickymenu_activation_redirect( $plugin) {
68 if( $plugin == plugin_basename( __FILE__ ) ) {
69 $is_shown = get_option("mystickymenu_update_message");
70 if($is_shown === false) {
71 add_option("mystickymenu_update_message", 1);
72 }
73 wp_redirect( admin_url( 'admin.php?page=my-stickymenu-settings' ) ) ;
74 exit;
75 }
76 }
77
78 public function mysticky_admin_script($hook) {
79
80 if ( $hook != 'toplevel_page_my-stickymenu-settings' && $hook != 'mystickymenu_page_my-stickymenu-welcomebar' && $hook != 'mystickymenu_page_my-stickymenu-upgrade' ) {
81 return;
82 }
83
84 wp_enqueue_style('mystickymenuAdminStyle', plugins_url('/css/mystickymenu-admin.css', __FILE__), array(), MYSTICKY_VERSION );
85 wp_enqueue_style( 'wp-color-picker' );
86 //wp_enqueue_script( 'wp-color-picker-alpha', plugins_url('/js/wp-color-picker-alpha.min.js', __FILE__), array( 'wp-color-picker' ), MYSTICKY_VERSION );
87 wp_enqueue_style( 'wp-jquery-ui-dialog' );
88 wp_enqueue_style('jquery-ui');
89
90 wp_enqueue_script('jquery-ui');
91 wp_enqueue_script('jquery-ui-slider');
92 //wp_enqueue_script('jquery-ui-datepicker');
93 wp_enqueue_script( 'jquery-ui-dialog' );
94
95 if($hook == "mystickymenu_page_my-stickymenu-upgrade") {
96 wp_enqueue_script( 'my-select2', plugins_url('js/select2.min.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
97 wp_enqueue_script( 'my-script-handle', plugins_url('js/iris-script.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
98
99 wp_enqueue_style('my-css-select2', plugins_url('css/select2.min.css', __FILE__), array(), MYSTICKY_VERSION );
100 }
101
102 wp_enqueue_script('mystickymenuAdminScript', plugins_url('/js/mystickymenu-admin.js', __FILE__), array( 'jquery', 'jquery-ui-slider' ), MYSTICKY_VERSION);
103 }
104
105 public function mysticky_load_transl(){
106 load_plugin_textdomain('mystickymenu', FALSE, dirname(plugin_basename(__FILE__)).'/languages/');
107 }
108
109 function sanitize_options($value) {
110 $value = stripslashes($value);
111 $value = filter_var($value, FILTER_SANITIZE_STRING);
112 return $value;
113 }
114
115 public function add_plugin_page(){
116 // This page will be under "Settings"
117 add_menu_page(
118 'Settings Admin',
119 'myStickymenu',
120 'manage_options',
121 'my-stickymenu-settings',
122 array( $this, 'create_admin_page' )
123 );
124 add_submenu_page(
125 'my-stickymenu-settings',
126 'Settings Admin',
127 'Settings',
128 'manage_options',
129 'my-stickymenu-settings',
130 array( $this, 'create_admin_page' )
131 );
132 add_submenu_page(
133 'my-stickymenu-settings',
134 'Settings Admin',
135 'Welcome Bar',
136 'manage_options',
137 'my-stickymenu-welcomebar',
138 array( $this, 'mystickystickymenu_admin_welcomebar_page' )
139 );
140 add_submenu_page(
141 'my-stickymenu-settings',
142 'Upgrade to Pro',
143 'Upgrade to Pro',
144 'manage_options',
145 'my-stickymenu-upgrade',
146 array( $this, 'mystickymenu_admin_upgrade_to_pro' )
147 );
148 }
149
150 public function create_admin_page(){
151 $upgarde_url = admin_url("admin.php?page=my-stickymenu-upgrade");
152 // Set class property
153 if (isset($_POST['mysticky_option_name']) && !empty($_POST['mysticky_option_name']) && isset($_POST['nonce'])) {
154 if(!empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'mysticky_option_backend_update')) {
155 $post = $_POST['mysticky_option_name'];
156 foreach($post as $key=>$value) {
157 $post[$key] = self::sanitize_options($value);
158 }
159
160 $post['device_desktop'] = 'on';
161 $post['device_mobile'] = 'on';
162 update_option( 'mysticky_option_name', $post);
163 echo '<div class="updated settings-error notice is-dismissible "><p><strong>' . esc_html__('Settings saved.','mystickymenu'). '</p></strong></div>';
164 } else {
165 wp_verify_nonce($_GET['nonce'], 'wporg_frontend_delete');
166 echo '<div class="error settings-error notice is-dismissible "><p><strong>' . esc_html__('Unable to complete your request','mystickymenu'). '</p></strong></div>';
167 }
168 }
169
170 $mysticky_options = get_option( 'mysticky_option_name');
171 $is_old = get_option("has_sticky_header_old_version");
172 $is_old = ($is_old == "yes")?true:false;
173 $nonce = wp_create_nonce('mysticky_option_backend_update');
174 $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=";
175
176 $is_shown = get_option("mystickymenu_update_message");
177 if($is_shown == 1) {?>
178 <div class="updates-form-form" >
179 <div class="popup-form-content">
180 <div id="add-update-folder-title" class="add-update-folder-title">
181 Would you like to get feature updates for myStickymenu in real-time?
182 </div>
183 <div class="folder-form-input">
184 <input id="myStickymenu_update_email" autocomplete="off" value="<?php echo get_option( 'admin_email' ) ?>" placeholder="Email address">
185 </div>
186 <div class="updates-content-buttons">
187 <button href="javascript:;" class="button button-primary form-submit-btn yes">Yes, I want</button>
188 <button href="javascript:;" class="button button-secondary form-cancel-btn no">Skip</button>
189 <div style="clear: both"></div>
190 </div>
191 <input type="hidden" id="myStickymenu_update_nonce" value="<?php echo wp_create_nonce("myStickymenu_update_nonce") ?>">
192 </div>
193 </div>
194 <?php } else { ?>
195 <style>
196 div#wpcontent {
197 background: rgba(101,114,219,1);
198 background: -moz-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
199 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)));
200 background: -webkit-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
201 background: -o-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
202 background: -ms-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
203 background: linear-gradient(135deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
204 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6572db', endColorstr='#ee86c6', GradientType=1 );
205 }
206 </style>
207 <div id="mystickymenu" class="wrap mystickymenu">
208 <div class="sticky-header-menu">
209 <ul>
210 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-settings' ) ?>" class="active" ><?php _e('Sticky Menu', 'mystickymenu'); ?></a></li>
211 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-welcomebar' ) ?>" ><?php _e('Welcome Bar', 'mystickymenu'); ?></a></li>
212 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-upgrade' ) ?>"><?php _e('Upgrade to Pro', 'mystickymenu'); ?></a></li>
213 </ul>
214 </div>
215 <div id="sticky-header-settings" class="sticky-header-content">
216 <div class="mystickymenu-heading">
217 <div class="myStickymenu-header-title">
218 <h3><?php esc_attr_e('How To Make a Sticky Header', 'mystickymenu'); ?></h3>
219 </div>
220 <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>
221 </div>
222
223 <form class="mysticky-form" method="post" action="#">
224 <div class="mystickymenu-content-section sticky-class-sec">
225 <table>
226 <tr>
227 <td>
228 <label class="mysticky_title"><?php _e("Sticky Class", 'mystickymenu')?></label>
229 <br /><br />
230 <?php $nav_menus = wp_get_nav_menus();
231 $menu_locations = get_nav_menu_locations();
232 $locations = get_registered_nav_menus();
233 ?>
234 <select name="mysticky_option_name[mysticky_class_id_selector]" id="mystickymenu-select">
235 <option value=""><?php _e( 'Select Sticky Menu', 'mystickymenu' ); ?></option>
236
237 <?php foreach ( (array) $nav_menus as $_nav_menu ) : ?>
238 <option value="<?php echo esc_attr( $_nav_menu->slug ); ?>" <?php selected( $_nav_menu->slug, $mysticky_options['mysticky_class_id_selector'] ); ?>>
239 <?php
240 echo esc_html( $_nav_menu->name );
241
242 if ( ! empty( $menu_locations ) && in_array( $_nav_menu->term_id, $menu_locations ) ) {
243 $locations_assigned_to_this_menu = array();
244 foreach ( array_keys( $menu_locations, $_nav_menu->term_id ) as $menu_location_key ) {
245 if ( isset( $locations[ $menu_location_key ] ) ) {
246 $locations_assigned_to_this_menu[] = $locations[ $menu_location_key ];
247 }
248 }
249
250 /**
251 * Filters the number of locations listed per menu in the drop-down select.
252 *
253 * @since 3.6.0
254 *
255 * @param int $locations Number of menu locations to list. Default 3.
256 */
257 $assigned_locations = array_slice( $locations_assigned_to_this_menu, 0, absint( apply_filters( 'wp_nav_locations_listed_per_menu', 3 ) ) );
258
259 // Adds ellipses following the number of locations defined in $assigned_locations.
260 if ( ! empty( $assigned_locations ) ) {
261 printf(
262 ' (%1$s%2$s)',
263 implode( ', ', $assigned_locations ),
264 count( $locations_assigned_to_this_menu ) > count( $assigned_locations ) ? ' &hellip;' : ''
265 );
266 }
267 }
268 ?>
269 </option>
270 <?php endforeach; ?>
271 <option value="custom" <?php selected( 'custom', $mysticky_options['mysticky_class_id_selector'] ); ?>><?php esc_html_e( 'Other Class Or ID', 'mystickymenu' );?></option>
272 </select>
273
274 <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'];?>" />
275
276 <p class="description"><?php _e("menu or header element class or id.", 'mystickymenu')?></p>
277 </td>
278 <td>
279 <div class="mysticky_device_upgrade">
280 <label class="mysticky_title"><?php _e("Devices", 'mystickymenu')?></label>
281 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
282
283 <ul class="mystickymenu-input-multicheckbox">
284 <li>
285 <label>
286 <input id="disable_css" name="mysticky_option_name[device_desktop]" type="checkbox" checked disabled />
287 <?php _e( 'Desktop', 'mystickymenu' );?>
288 </label>
289 </li>
290 <li>
291 <label>
292 <input id="disable_css" name="mysticky_option_name[device_mobile]" type="checkbox" checked disabled />
293 <?php _e( 'Mobile', 'mystickymenu' );?>
294 </label>
295 </li>
296 </ul>
297 </div>
298 </td>
299 </tr>
300 </table>
301 </div>
302
303
304 <div class="mystickymenu-content-section">
305 <h3><?php esc_html_e( 'Settings', 'mystickymenu' );?></h3>
306 <table class="form-table">
307 <tr>
308 <td>
309 <label for="myfixed_zindex" class="mysticky_title"><?php _e("Sticky z-index", 'mystickymenu')?></label>
310 </td>
311 <td>
312 <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'];?>" />
313 </td>
314 <td>
315 <label class="mysticky_title myssticky-remove-hand"><?php _e("Fade or slide effect", 'mystickymenu')?></label>
316 </td>
317 <td>
318 <label>
319 <input name="mysticky_option_name[myfixed_fade]" value= "slide" type="radio" <?php checked( @$mysticky_options['myfixed_fade'], 'slide' );?> />
320 <?php _e("Slide", 'mystickymenu'); ?>
321 </label>
322 <label>
323 <input name="mysticky_option_name[myfixed_fade]" value="fade" type="radio" <?php checked( @$mysticky_options['myfixed_fade'], 'fade' );?> />
324 <?php _e("Fade", 'mystickymenu'); ?>
325 </label>
326 </td>
327 </tr>
328 <tr>
329 <td>
330 <label for="myfixed_disable_small_screen" class="mysticky_title"><?php _e("Disable at Small Screen Sizes", 'mystickymenu')?></label>
331 <p class="description"><?php esc_attr_e('Less than chosen screen width, set 0 to disable','mystickymenu');?></p>
332 </td>
333 <td>
334 <div class="px-wrap">
335 <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'];?>" />
336 <span class="input-px">PX</span>
337 </div>
338 </td>
339 <td>
340 <label for="mysticky_active_on_height" class="mysticky_title"><?php _e("Make visible on Scroll", 'mystickymenu')?></label>
341 <p class="description"><?php esc_attr_e('If set to 0 auto calculate will be used.','mystickymenu');?></p>
342 </td>
343 <td>
344 <div class="px-wrap">
345 <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'];?>" />
346 <span class="input-px">PX</span>
347 </div>
348 </td>
349 </tr>
350 <tr>
351 <td>
352 <label for="mysticky_active_on_height_home" class="mysticky_title"><?php _e("Make visible on Scroll at homepage", 'mystickymenu')?></label>
353 <p class="description"><?php _e( 'If set to 0 it will use initial Make visible on Scroll value.', 'mystickymenu' );?></p>
354 </td>
355 <td>
356 <div class="px-wrap">
357 <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'];?>" />
358 <span class="input-px">PX</span>
359 </div>
360 </td>
361 <td>
362 <label for="myfixed_bgcolor" class="mysticky_title myssticky-remove-hand"><?php _e("Sticky Background Color", 'mystickymenu')?></label>
363 </td>
364 <td>
365 <input type="text" id="myfixed_bgcolor" name="mysticky_option_name[myfixed_bgcolor]" class="my-color-field" data-alpha="true" value="<?php echo $mysticky_options['myfixed_bgcolor'];?>" />
366
367 </td>
368 </tr>
369 <tr>
370 <td>
371 <label for="myfixed_transition_time" class="mysticky_title"><?php _e("Sticky Transition Time", 'mystickymenu')?></label>
372 </td>
373 <td>
374 <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'];?>" />
375 </td>
376 <td>
377 <label for="myfixed_opacity" class="mysticky_title myssticky-remove-hand"><?php _e("Sticky Opacity", 'mystickymenu')?></label>
378 <p class="description"><?php _e( 'numbers 1-100.', 'mystickymenu');?></p>
379 </td>
380 <td>
381 <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'];?>" />
382 <div id="slider">
383 <div id="custom-handle" class="ui-slider-handle"><?php //echo $mysticky_options['myfixed_opacity'];?></div>
384 </div>
385
386 </td>
387 </tr>
388 </table>
389 </div>
390
391 <div class="mystickymenu-content-section <?php echo !$is_old?"mystickymenu-content-upgrade":""?>" >
392
393 <div class="mystickymenu-content-option">
394 <label class="mysticky_title css-style-title"><?php _e("Hide on Scroll Down", 'mystickymenu'); ?></label>
395 <?php if(!$is_old) { ?><span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span><?php } ?>
396 <p>
397 <label class="mysticky_text">
398 <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":"" ?> />
399 <?php _e("Disable sticky menu at scroll down", 'mystickymenu'); ?>
400 </label>
401 </p>
402 </div>
403 <div class="mysticky-page-target-setting mystickymenu-content-option">
404 <label class="mysticky_title"><?php esc_attr_e('Page targeting', 'myStickymenu'); ?></label>
405 <div class="mystickymenu-input-section mystickymenu-page-target-wrap">
406 <div class="mysticky-welcomebar-setting-content-right">
407 <div class="mysticky-page-options" id="mysticky-welcomebar-page-options">
408 <?php $page_option = (isset($mysticky_options['mysticky_page_settings'])) ? $mysticky_options['mysticky_page_settings'] : array();
409 $url_options = array(
410 'page_contains' => 'pages that contain',
411 'page_has_url' => 'a specific page',
412 'page_start_with' => 'pages starting with',
413 'page_end_with' => 'pages ending with',
414 );
415
416 if(!empty($page_option) && is_array($page_option)) {
417 $count = 0;
418 foreach($page_option as $k=>$option) {
419 $count++;
420 ?>
421 <div class="mysticky-page-option <?php echo $k==count($page_option)?"last":""; ?>">
422 <div class="url-content">
423 <div class="mysticky-welcomebar-url-select">
424 <select name="mysticky_option_name[mysticky_page_settings][<?php echo $count; ?>][shown_on]" id="url_shown_on_<?php echo $count ?>_option">
425 <option value="show_on" <?php echo $option['shown_on']=="show_on"?"selected":"" ?> ><?php esc_html_e( 'Show on', 'mysticky' )?></option>
426 <option value="not_show_on" <?php echo $option['shown_on']=="not_show_on"?"selected":"" ?>><?php esc_html_e( "Don't show on", "mysticky" );?></option>
427 </select>
428 </div>
429 <div class="mysticky-welcomebar-url-option">
430 <select class="mysticky-url-options" name="mysticky_option_name[mysticky_page_settings][<?php echo $count; ?>][option]" id="url_rules_<?php echo $count ?>_option">
431 <option disabled value=""><?php esc_html_e( "Select Rule", "mysticky" );?></option>
432 <?php foreach($url_options as $key=>$value) {
433 $selected = ( isset($option['option']) && $option['option']==$key )?" selected='selected' ":"";
434 echo '<option '.$selected.' value="'.$key.'">'.$value.'</option>';
435 } ?>
436 </select>
437 </div>
438 <div class="mysticky-welcomebar-url-box">
439 <span class='mysticky-welcomebar-url'><?php echo site_url("/"); ?></span>
440 </div>
441 <div class="mysticky-welcomebar-url-values">
442 <input type="text" value="<?php echo $option['value'] ?>" name="mysticky_option_name[mysticky_page_settings][<?php echo $count; ?>][value]" id="url_rules_<?php echo $count; ?>_value" />
443 </div>
444 <div class="mysticky-welcomebar-url-buttons">
445 <a class="mysticky-remove-rule" href="javascript:;">x</a>
446 </div>
447 <div class="clear"></div>
448 </div>
449 </div>
450 <?php
451 }
452 }
453 ?>
454 </div>
455 <a href="javascript:void(0);" class="create-rule" id="mysticky_create-rule"><?php esc_html_e( "Add Rule", "mystickyelements" );?></a>
456 </div>
457 <input type="hidden" id="mysticky_welcomebar_site_url" value="<?php echo site_url("/") ?>" />
458 <div class="mysticky-page-options-html" style="display: none;">
459 <div class="mysticky-page-option">
460 <div class="url-content">
461 <div class="mysticky-welcomebar-url-select">
462 <select name="mysticky_option_name[mysticky_page_settings][__count__][shown_on]" id="url_shown_on___count___option" <?php echo !$is_pro_active?"disabled":"" ?>>
463 <option value="show_on"><?php esc_html_e("Show on", "mysticky" );?></option>
464 <option value="not_show_on"><?php esc_html_e("Don't show on", "mysticky" );?></option>
465 </select>
466 </div>
467 <div class="mysticky-welcomebar-url-option">
468 <select class="mysticky-url-options" name="mysticky_option_name[mysticky_page_settings][__count__][option]" id="url_rules___count___option" <?php echo !$is_pro_active?"disabled":"" ?>>
469 <option selected="selected" disabled value=""><?php esc_html_e("Select Rule", "mysticky" );?></option>
470 <?php foreach($url_options as $key=>$value) {
471 echo '<option value="'.$key.'">'.$value.'</option>';
472 } ?>
473 </select>
474 </div>
475 <div class="mysticky-welcomebar-url-box">
476 <span class='mysticky-welcomebar-url'><?php echo site_url("/"); ?></span>
477 </div>
478 <div class="mysticky-welcomebar-url-values">
479 <input type="text" value="" name="mysticky_option_name[mysticky_page_settings][__count__][value]" id="url_rules___count___value" <?php echo !$is_pro_active?"disabled":"" ?> />
480 </div>
481 <div class="mysticky-welcomebar-url-buttons">
482 <a class="mysticky-remove-rule" href="javascript:void(0);">x</a>
483 </div>
484 <div class="clear"></div>
485 </div>
486 <?php if(!$is_old) { ?><span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span><?php } ?>
487 </div>
488 </div>
489 </div>
490 </div>
491 <div class="mystickymenu-content-option">
492 <label class="mysticky_title css-style-title"><?php _e("CSS style", 'mystickymenu'); ?></label>
493 <span class="mysticky_text"><?php _e( 'Add/edit CSS style. Leave it blank for default style.', 'mystickymenu');?></span>
494 <div class="mystickymenu-input-section">
495 <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>
496 </div>
497 <p><?php esc_html_e( "CSS ID's and Classes to use:", "mystickymenu" );?></p>
498 <p>
499 #mysticky-wrap { }<br/>
500 #mysticky-nav.wrapfixed { }<br/>
501 #mysticky-nav.wrapfixed.up { }<br/>
502 #mysticky-nav.wrapfixed.down { }<br/>
503 #mysticky-nav .navbar { }<br/>
504 #mysticky-nav .navbar.myfixed { }<br/>
505 </p>
506 </div>
507
508 <div class="mystickymenu-content-option">
509 <label class="mysticky_title" for="disable_css"><?php _e("Disable CSS style", 'mystickymenu'); ?></label>
510 <div class="mystickymenu-input-section">
511 <label>
512 <input id="disable_css" name="mysticky_option_name[disable_css]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['disable_css'], 'on' );?> />
513 <?php _e( 'Use this option if you plan to include CSS Style manually', 'mystickymenu' );?>
514 </label>
515 </div>
516 <p></p>
517 </div>
518
519 <div class="mystickymenu-content-option">
520 <label class="mysticky_title"><?php _e("Disable at", 'mystickymenu'); ?></label>
521 <?php if(!$is_old) { ?><span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span><?php } ?>
522 <div class="mystickymenu-input-section">
523 <ul class="mystickymenu-input-multicheckbox">
524 <li>
525 <label>
526 <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' );?>/>
527 <span><?php esc_attr_e('front page', 'mystickymenu' );?></span>
528 </label>
529 </li>
530 <li>
531 <label>
532 <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' );?>/>
533 <span><?php esc_attr_e('blog page', 'mystickymenu' );?></span>
534 </label>
535 </li>
536 <li>
537 <label>
538 <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' );?> />
539 <span><?php esc_attr_e('pages', 'mystickymenu' );?> </span>
540 </label>
541 </li>
542 <li>
543 <label>
544 <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' );?> />
545 <span><?php esc_attr_e('tags', 'mystickymenu' );?> </span>
546 </label>
547 </li>
548 <li>
549 <label>
550 <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' );?>/>
551 <span><?php esc_attr_e('categories', 'mystickymenu' );?></span>
552 </label>
553 </li>
554 <li>
555 <label>
556 <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' );?> />
557 <span><?php esc_attr_e('posts', 'mystickymenu' );?> </span>
558 </label>
559 </li>
560 <li>
561 <label>
562 <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' );?> />
563 <span><?php esc_attr_e('archives', 'mystickymenu' );?> </span>
564 </label>
565 </li>
566 <li>
567 <label>
568 <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' );?> />
569 <span><?php esc_attr_e('search', 'mystickymenu' );?> </span>
570 </label>
571 </li>
572 <li>
573 <label>
574 <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' );?>/>
575 <span><?php esc_attr_e('404', 'mystickymenu' );?> </span>
576 </label>
577 </li>
578 </ul>
579
580 <?php
581 if (isset ( $mysticky_options['mysticky_disable_at_page'] ) == true ) {
582 echo '<div class="mystickymenu-input-section">';
583 _e('<span class="description"><strong>Except for this pages:</strong> </span>', 'mystickymenu');
584
585 printf(
586 '<input type="text" size="26" class="mystickymenu_normal_text" id="mysticky_enable_at_pages" name="mysticky_option_name[mysticky_enable_at_pages]" value="%s" /> ',
587 isset( $mysticky_options['mysticky_enable_at_pages'] ) ? esc_attr( $mysticky_options['mysticky_enable_at_pages']) : ''
588 );
589
590 _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');
591 echo '</div>';
592 }
593
594 if (isset ( $mysticky_options['mysticky_disable_at_single'] ) == true ) {
595
596 echo '<div class="mystickymenu-input-section">';
597 _e('<span class="description"><strong>Except for this posts:</strong> </span>', 'mystickymenu');
598
599 printf(
600 '<input type="text" size="26" class="mystickymenu_normal_text" id="mysticky_enable_at_posts" name="mysticky_option_name[mysticky_enable_at_posts]" value="%s" /> ',
601 isset( $mysticky_options['mysticky_enable_at_posts'] ) ? esc_attr( $mysticky_options['mysticky_enable_at_posts']) : ''
602 );
603
604 _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');
605 echo '</div>';
606
607 }
608 ?>
609 <p></p>
610 </div>
611 </div>
612
613 </div>
614 <p class="submit">
615 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e('Save', 'mystickymenu');?>">
616 </p>
617 <input type="hidden" name="nonce" value="<?php echo $nonce ?>">
618 </form>
619 <form class="mysticky-hideformreset" method="post" action="">
620 <input name="reset_mysticky_options" class="button button-secondary confirm" type="submit" value="<?php esc_attr_e('Reset', 'mystickymenu');?>" >
621 <input type="hidden" name="action" value="reset" />
622 <?php $nonce = wp_create_nonce('mysticky_option_backend_reset_nonce'); ?>
623 <input type="hidden" name="nonce" value="<?php echo $nonce ?>">
624 </form>
625 <p class="myStickymenu-review"><a href="https://wordpress.org/support/plugin/mystickymenu/reviews/" target="_blank"><?php esc_attr_e('Leave a review','mystickymenu'); ?></a></p>
626 </div>
627 </div>
628 <?php }
629 }
630 public function mystickystickymenu_admin_welcomebar_page() {
631 /* welcome bar save data */
632 if (isset($_POST['mysticky_option_welcomebar']) && !empty($_POST['mysticky_option_welcomebar']) && isset($_POST['nonce'])) {
633 if(!empty($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'mysticky_option_welcomebar_update')) {
634 $mysticky_option_welcomebar = filter_var_array( $_POST['mysticky_option_welcomebar'], FILTER_SANITIZE_STRING );
635 $mysticky_option_welcomebar['mysticky_welcomebar_bar_text'] = $_POST['mysticky_option_welcomebar']['mysticky_welcomebar_bar_text'];
636 $mysticky_option_welcomebar['mysticky_welcomebar_height'] = 60;
637 $mysticky_option_welcomebar['mysticky_welcomebar_device_desktop'] = 'desktop';
638 $mysticky_option_welcomebar['mysticky_welcomebar_device_mobile'] = 'mobile';
639 $mysticky_option_welcomebar['mysticky_welcomebar_trigger'] = 'after_a_few_seconds';
640 $mysticky_option_welcomebar['mysticky_welcomebar_triggersec'] = '0';
641 $mysticky_option_welcomebar['mysticky_welcomebar_expirydate'] = '';
642 $mysticky_option_welcomebar['mysticky_welcomebar_page_settings'] = '';
643 update_option( 'mysticky_option_welcomebar', $mysticky_option_welcomebar);
644 echo '<div class="updated settings-error notice is-dismissible "><p><strong>' . esc_html__('Settings saved.','mystickymenu'). '</p></strong></div>';
645 } else {
646 wp_verify_nonce($_GET['nonce'], 'wporg_frontend_delete');
647 echo '<div class="error settings-error notice is-dismissible "><p><strong>' . esc_html__('Unable to complete your request','mystickymenu'). '</p></strong></div>';
648 }
649 }
650 if (isset($_POST['mysticky_welcomebar_reset']) && !empty($_POST['mysticky_welcomebar_reset']) && isset($_POST['nonce_reset'])) {
651 if(!empty($_POST['nonce_reset']) && wp_verify_nonce($_POST['nonce_reset'], 'mysticky_option_welcomebar_reset')) {
652 $mysticky_option_welcomebar_reset = mysticky_welcomebar_pro_widget_default_fields();
653 update_option( 'mysticky_option_welcomebar', $mysticky_option_welcomebar_reset);
654 echo '<div class="updated settings-error notice is-dismissible "><p><strong>' . esc_html__('Reset Settings saved.','mystickymenu'). '</p></strong></div>';
655 } else {
656 wp_verify_nonce($_GET['nonce'], 'wporg_frontend_delete');
657 echo '<div class="error settings-error notice is-dismissible "><p><strong>' . esc_html__('Unable to complete your request','mystickymenu'). '</p></strong></div>';
658 }
659 }
660
661 $mysticky_options = get_option( 'mysticky_option_name');
662 $is_old = get_option("has_sticky_header_old_version");
663 $is_old = ($is_old == "yes")?true:false;
664 $nonce = wp_create_nonce('mysticky_option_backend_update');
665 $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=";
666
667 ?>
668 <style>
669 div#wpcontent {
670 background: rgba(101,114,219,1);
671 background: -moz-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
672 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)));
673 background: -webkit-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
674 background: -o-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
675 background: -ms-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
676 background: linear-gradient(135deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
677 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6572db', endColorstr='#ee86c6', GradientType=1 );
678 }
679 </style>
680 <div id="mystickymenu" class="wrap mystickymenu">
681 <div class="sticky-header-menu">
682 <ul>
683 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-settings' ) ?>"><?php _e('Sticky Menu', 'mystickymenu'); ?></a></li>
684 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-welcomebar' ) ?>" class="active" ><?php _e('Welcome Bar', 'mystickymenu'); ?></a></li>
685 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-upgrade' ) ?>"><?php _e('Upgrade to Pro', 'mystickymenu'); ?></a></li>
686 </ul>
687 </div>
688 <div id="sticky-header-welcome-bar" class="sticky-header-content">
689 <?php mysticky_welcome_bar_backend(); ?>
690 </div>
691 </div>
692 <?php
693 }
694 public function mystickymenu_admin_upgrade_to_pro() {
695 $pro_url = "https://go.premio.io/checkount/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=";
696 ?>
697 <style>
698 div#wpcontent {
699 background: rgba(101,114,219,1);
700 background: -moz-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
701 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)));
702 background: -webkit-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
703 background: -o-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
704 background: -ms-linear-gradient(-45deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
705 background: linear-gradient(135deg, rgba(101,114,219,1) 0%, rgba(238,134,198,1) 67%, rgba(238,134,198,1) 100%);
706 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6572db', endColorstr='#ee86c6', GradientType=1 );
707 }
708 </style>
709 <div id="mystickymenu" class="wrap mystickymenu">
710 <div class="sticky-header-menu">
711 <ul>
712 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-settings' ) ?>"><?php _e('Sticky Menu', 'mystickymenu'); ?></a></li>
713 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-welcomebar' ) ?>" ><?php _e('Welcome Bar', 'mystickymenu'); ?></a></li>
714 <li><a href="<?php echo admin_url( 'admin.php?page=my-stickymenu-upgrade' ) ?>" class="active" ><?php _e('Upgrade to Pro', 'mystickymenu'); ?></a></li>
715 </ul>
716 </div>
717 <div id="sticky-header-upgrade" class="sticky-header-content">
718 <div id="rpt_pricr" class="rpt_plans rpt_3_plans rpt_style_basic">
719 <p class="udner-title">
720 <strong class="text-primary">Unlock All Features</strong>
721 </p>
722 <div class="">
723 <div class="rpt_plan rpt_plan_0 ">
724 <div style="text-align:left;" class="rpt_title rpt_title_0">Basic</div>
725 <div class="rpt_head rpt_head_0">
726 <div class="rpt_recurrence rpt_recurrence_0">For small website owners</div>
727 <div class="rpt_price rpt_price_0">$19</div>
728 <div class="rpt_description rpt_description_0 rpt_desc">Per year. Renewals for 25% off</div>
729 <div style="clear:both;"></div>
730 </div>
731 <div class="rpt_features rpt_features_0">
732 <div style="padding: 12px 16px 6px 16px" 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>
733 <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>
734 <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>
735 <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>
736 <div class="rpt_feature rpt_feature_0-4"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Show/hide the sticky menu on specific pages</span>Page targeting<span class="rpt_tooltip_plus" > +</span></a></div>
737 <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>
738 <div class="rpt_feature rpt_feature_0-6"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Including page targeting, delay and scroll triggers, devices, position, height, expiry date, open link in a new tab and remove credit</span>Welcome bar<span class="rpt_tooltip_plus"> +</span></a></div>
739 <div class="rpt_feature rpt_feature_0-9">
740 <select data-key="0" class="multiple-options">
741 <option data-header="Renewals for 25% off" data-price="19" value="<?php echo esc_url($pro_url."1") ?>">
742 <?php esc_html_e("Updates & support for 1 year") ?>
743 </option>
744 <option data-header="For 2 years" data-price="29" value="<?php echo esc_url($pro_url."13") ?>">
745 <?php esc_html_e("Updates & support for 2 years") ?>
746 </option>
747 <option data-header="For lifetime" data-price="59" value="<?php echo esc_url($pro_url."5") ?>">
748 <?php esc_html_e("Updates & support for lifetime") ?>
749 </option>
750 </select>
751 </div>
752 </div>
753 <div style="clear:both;"></div>
754 <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>
755 </div>
756 <div class="rpt_plan rpt_plan_1 rpt_recommended_plan ">
757 <div style="text-align:left;" class="rpt_title rpt_title_1">Plus<img class="rpt_recommended" src="<?php echo plugins_url("") ?>/mystickymenu/images/rpt_recommended.png" style="top: 27px;"></div>
758 <div class="rpt_head rpt_head_1">
759 <div class="rpt_recurrence rpt_recurrence_1">For businesses with multiple websites</div>
760 <div class="rpt_price rpt_price_1">$39</div>
761 <div class="rpt_description rpt_description_1 rpt_desc">Per year. Renewals for 25% off</div>
762 <div style="clear:both;"></div>
763 </div>
764 <div class="rpt_features rpt_features_1">
765 <div style="padding: 12px 16px 6px 16px" 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>
766 <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>
767 <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>
768 <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>
769 <div class="rpt_feature rpt_feature_1-4"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Show/hide the sticky menu on specific pages</span>Page targeting<span class="rpt_tooltip_plus" > +</span></a></div>
770 <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>
771 <div class="rpt_feature rpt_feature_1-6"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Including page targeting, delay and scroll triggers, devices, position, height, expiry date, open link in a new tab and remove credit</span>Welcome bar<span class="rpt_tooltip_plus"> +</span></a></div>
772 <div class="rpt_feature rpt_feature_0-9">
773 <select data-key="0" class="multiple-options">
774 <option data-header="Renewals for 25% off" data-price="39" value="<?php echo esc_url($pro_url."2") ?>">
775 <?php esc_html_e("Updates & support for 1 year") ?>
776 </option>
777 <option data-header="For 2 years" data-price="59" value="<?php echo esc_url($pro_url."14") ?>">
778 <?php esc_html_e("Updates & support for 2 years") ?>
779 </option>
780 <option data-header="For lifetime" data-price="99" value="<?php echo esc_url($pro_url."7") ?>">
781 <?php esc_html_e("Updates & support for lifetime") ?>
782 </option>
783 </select>
784 </div>
785 </div>
786 <div style="clear:both;"></div>
787 <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>
788 </div>
789 <div class="rpt_plan rpt_plan_2 ">
790 <div style="text-align:left;" class="rpt_title rpt_title_2">Agency</div>
791 <div class="rpt_head rpt_head_2">
792 <div class="rpt_recurrence rpt_recurrence_2">For agencies who manage clients</div>
793 <div class="rpt_price rpt_price_2">$79</div>
794 <div class="rpt_description rpt_description_2 rpt_desc">Per year. Renewals for 25% off</div>
795 <div style="clear:both;"></div>
796 </div>
797 <div class="rpt_features rpt_features_2">
798 <div class="rpt_feature rpt_feature_2-0"><a href="javascript:;" class="rpt_tooltip">
799 <select class="multiple-web-options">
800 <option value="50_websites">50 websites</option>
801 <option value="500_websites">500 websites</option>
802 <option value="1000_websites">1000 websites</option>
803 </select>
804 </div>
805 <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>
806 <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>
807 <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>
808 <div class="rpt_feature rpt_feature_2-4"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Show/hide the sticky menu on specific pages</span>Page targeting<span class="rpt_tooltip_plus" > +</span></a></div>
809 <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>
810 <div class="rpt_feature rpt_feature_2-6"><a href="javascript:;" class="rpt_tooltip"><span class="intool"><b></b>Including page targeting, delay and scroll triggers, devices, position, height, expiry date, open link in a new tab and remove credit</span>Welcome bar<span class="rpt_tooltip_plus"> +</span></a></div>
811 <div class="rpt_feature rpt_feature_0-9">
812 <select data-key="0" class="multiple-options has-multiple-websites">
813 <option data-option="1_year" data-header="Renewals for 25% off" data-price="79" value="<?php echo esc_url($pro_url."3") ?>">
814 <?php esc_html_e("Updates & support for 1 year") ?>
815 </option>
816 <option data-option="2_year" data-header="For 2 years" data-price="125" value="<?php echo esc_url($pro_url."15") ?>">
817 <?php esc_html_e("Updates & support for 2 years") ?>
818 </option>
819 <option data-option="lifetime" data-header="For lifetime" data-price="199" value="<?php echo esc_url($pro_url."9") ?>">
820 <?php esc_html_e("Updates & support for lifetime") ?>
821 </option>
822 </select>
823 </div>
824 </div>
825 <div style="clear:both;"></div>
826 <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>
827 </div>
828 </div>
829 <div style="clear:both;"></div>
830 <div class="client-testimonial">
831 <p class="text-center"><span class="dashicons dashicons-yes"></span> 30 days money back guaranteed</p>
832 <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>
833 <div class="payment">
834 <img src="<?php echo plugins_url("") ?>/mystickymenu/images/payment.png" alt="Payment" class="payment-img" />
835 </div>
836 <div class="testimonial-box">
837 <div class="testimonial-image">
838 <img src="<?php echo plugins_url("") ?>/mystickymenu/images/testimonial.png" style="top: 27px;">
839 </div>
840 <div class="testimonial-content">
841 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!
842 <div class="author">Clayton Chase</div>
843 </div>
844 <div style="clear:both;"></div>
845 </div>
846 </div>
847 </div>
848 </div>
849 </div>
850 <?php
851 }
852
853 public function mysticky_default_options() {
854
855 global $options;
856 $menu_locations = get_nav_menu_locations();
857 $menu_object = isset($menu_locations['menu-1']) ? wp_get_nav_menu_object( $menu_locations['menu-1'] ) : array();
858
859 if ( is_object($menu_object) && $menu_object->slug != '' ) {
860 $mysticky_class_id_selector = $menu_object->slug;
861 } else {
862 $mysticky_class_id_selector = 'custom';
863 }
864
865 $mystickyClass = '.navbar';
866 $template_name = get_template();
867 switch( $template_name ){
868 case 'ashe':
869 $mysticky_class_id_selector = 'custom';
870 $mystickyClass = '#main-nav';
871 break;
872 case 'astra':
873 case 'hello-elementor':
874 case 'sydney':
875 case 'twentysixteen':
876 $mysticky_class_id_selector = 'custom';
877 $mystickyClass = 'header.site-header';
878 break;
879 case 'generatepress':
880 $mysticky_class_id_selector = 'custom';
881 $mystickyClass = 'nav.main-navigation';
882 break;
883 case 'transportex':
884 $mysticky_class_id_selector = 'custom';
885 $mystickyClass = '.transportex-menu-full';
886 break;
887 case 'hestia':
888 case 'neve':
889 $mysticky_class_id_selector = 'custom';
890 $mystickyClass = 'header.header';
891 break;
892 case 'mesmerize':
893 $mysticky_class_id_selector = 'custom';
894 $mystickyClass = '.navigation-bar';
895 break;
896 case 'oceanwp':
897 $mysticky_class_id_selector = 'custom';
898 $mystickyClass = 'header#site-header';
899 break;
900 case 'shapely':
901 $mysticky_class_id_selector = 'custom';
902 $mystickyClass = '#site-navigation';
903 break;
904 case 'storefront':
905 $mysticky_class_id_selector = 'custom';
906 $mystickyClass = '.storefront-primary-navigation';
907 break;
908 case 'twentynineteen':
909 $mysticky_class_id_selector = 'custom';
910 $mystickyClass = '#site-navigation';
911 break;
912 case 'twentyseventeen':
913 $mysticky_class_id_selector = 'custom';
914 $mystickyClass = '.navigation-top';
915 break;
916 default:
917 break;
918 }
919
920
921 $default = array(
922 'mysticky_class_id_selector' => $mysticky_class_id_selector,
923 'mysticky_class_selector' => $mystickyClass,
924 'device_desktop' => 'on',
925 'device_mobile' => 'on',
926 'myfixed_zindex' => '99990',
927 'myfixed_bgcolor' => '#f7f5e7',
928 'myfixed_opacity' => '90',
929 'myfixed_transition_time' => '0.3',
930 'myfixed_disable_small_screen' => '0',
931 'myfixed_disable_large_screen' => '0',
932 'mysticky_active_on_height' => '0',
933 'mysticky_active_on_height_home'=> '0',
934 'myfixed_fade' => 'slide',
935 'myfixed_cssstyle' => '#mysticky-nav .myfixed { margin:0 auto; float:none; border:0px; background:none; max-width:100%; }'
936 );
937
938 if ( get_option('mysticky_option_name') == false ) {
939 $status = get_option("sticky_header_status");
940 if($status == false) {
941 update_option("sticky_header_status", "done");
942 update_option("has_sticky_header_old_version", "no");
943 }
944 update_option( 'mysticky_option_name', $default );
945 } else {
946 $status = get_option("sticky_header_status");
947 if($status == false) {
948 update_option("sticky_header_status", "done");
949 update_option("has_sticky_header_old_version", "yes");
950 }
951 }
952
953 if(isset($_POST['reset_mysticky_options'])) {
954 if(isset($_REQUEST['nonce']) && !empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'mysticky_option_backend_reset_nonce')) {
955 update_option('mysticky_option_name', $default);
956 } else {
957
958 }
959 }
960
961 if ( !get_option( 'update_mysticky_version_2_6') ) {
962 $mysticky_option_name = get_option( 'mysticky_option_name' );
963 $mysticky_option_name['mysticky_class_id_selector'] = 'custom';
964 if ($mysticky_option_name['myfixed_fade'] == 'on'){
965 $mysticky_option_name['myfixed_fade'] = 'slide';
966 }else{
967 $mysticky_option_name['myfixed_fade'] = 'fade';
968 }
969 update_option( 'mysticky_option_name', $mysticky_option_name );
970 update_option( 'update_mysticky_version_2_6', true );
971 }
972 }
973 }
974
975
976
977 class MyStickyMenuFrontend
978 {
979
980 public function __construct()
981 {
982 add_action( 'wp_head', array( $this, 'mysticky_build_stylesheet_content' ) );
983 add_action( 'wp_enqueue_scripts', array( $this, 'mysticky_disable_at' ) );
984 }
985
986 public function mysticky_build_stylesheet_content() {
987
988 $mysticky_options = get_option( 'mysticky_option_name' );
989
990 if (isset($mysticky_options['disable_css'])) {
991 //do nothing
992 } else {
993 $mysticky_options['disable_css'] = false;
994 }
995
996 if ($mysticky_options ['disable_css'] == false ) {
997
998 echo '<style id="mystickymenu" type="text/css">';
999 echo '#mysticky-nav { width:100%; position: static; }';
1000 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'] . ';}';
1001
1002
1003 if ($mysticky_options ['myfixed_disable_small_screen'] > 0 ){
1004 //echo '@media (max-width: '.$mysticky_options['myfixed_disable_small_screen'].'px) {#mysticky-nav.wrapfixed {position: static;} }';
1005 };
1006 if ( !isset( $mysticky_options['myfixed_cssstyle'] ) ) {
1007 echo '#mysticky-nav .myfixed { margin:0 auto; float:none; border:0px; background:none; max-width:100%; }';
1008 }
1009 if ( isset( $mysticky_options['myfixed_cssstyle'] ) && $mysticky_options['myfixed_cssstyle'] != '' ) {
1010 echo $mysticky_options ['myfixed_cssstyle'];
1011 }
1012 echo '</style>';
1013 $template_name = get_template();
1014 ?>
1015 <style type="text/css">
1016 <?php if( $template_name == 'hestia' ) { ?>
1017 #mysticky-nav.wrapfixed {box-shadow: 0 1px 10px -6px #0000006b,0 1px 10px 0 #0000001f,0 4px 5px -2px #0000001a;}
1018 #mysticky-nav.wrapfixed .navbar {position: relative;background-color: transparent;box-shadow: none;}
1019 <?php } ?>
1020 <?php if( $template_name == 'shapely' ) { ?>
1021 #mysticky-nav.wrapfixed #site-navigation {position: relative;}
1022 <?php } ?>
1023 <?php if( $template_name == 'storefront' ) { ?>
1024 #mysticky-nav.wrapfixed > .site-header {margin-bottom: 0;}
1025 #mysticky-nav.wrapfixed > .storefront-primary-navigation {padding: 10px 0;}
1026 <?php } ?>
1027 <?php if( $template_name == 'transportex' ) { ?>
1028 #mysticky-nav.wrapfixed > .transportex-menu-full {margin: 0 auto;}
1029 .transportex-headwidget #mysticky-nav.wrapfixed .navbar-wp {top: 0;}
1030 <?php } ?>
1031 <?php if( $template_name == 'twentynineteen' ) { ?>
1032 #mysticky-nav.wrapfixed {padding: 10px;}
1033 <?php } ?>
1034 <?php if( $template_name == 'twentysixteen' ) { ?>
1035 #mysticky-nav.wrapfixed > .site-header {padding-top: 0;padding-bottom: 0;}
1036 <?php } ?>
1037 <?php if( $template_name == 'twentytwenty' ) { ?>
1038 #site-header {background: transparent;}
1039 <?php } ?>
1040 </style>
1041 <?php
1042 }
1043 }
1044
1045 public function mystickymenu_google_fonts_url() {
1046 $welcomebar = get_option( 'mysticky_option_welcomebar' );
1047
1048 $default_fonts = array('Arial', 'Tahoma', 'Verdana', 'Helvetica', 'Times New Roman', 'Trebuchet MS', 'Georgia' );
1049 $fonts_url = '';
1050 $fonts = array();
1051 $font_args = array();
1052 $base_url = "https://fonts.googleapis.com/css";
1053 $fonts['family']['Lato'] = 'Lato:400,500,600,700';
1054 if ( isset($welcomebar['mysticky_welcomebar_font']) && $welcomebar['mysticky_welcomebar_font'] !='' && !in_array( $welcomebar['mysticky_welcomebar_font'], $default_fonts) ) {
1055 $fonts['family'][$welcomebar['mysticky_welcomebar_font']] = $welcomebar['mysticky_welcomebar_font'] . ':400,500,600,700';
1056 }
1057 if ( isset($welcomebar['mysticky_welcomebar_btnfont']) && $welcomebar['mysticky_welcomebar_btnfont'] !='' && !in_array( $welcomebar['mysticky_welcomebar_btnfont'], $default_fonts) ) {
1058 $fonts['family'][$welcomebar['mysticky_welcomebar_btnfont']] = $welcomebar['mysticky_welcomebar_btnfont'] . ':400,500,600,700';
1059 }
1060
1061 /* Prepapre URL if font family defined. */
1062 if( !empty( $fonts['family'] ) ) {
1063
1064 /* format family to string */
1065 if( is_array($fonts['family']) ){
1066 $fonts['family'] = implode( '|', $fonts['family'] );
1067 }
1068
1069 $font_args['family'] = urlencode( trim( $fonts['family'] ) );
1070
1071 if( !empty( $fonts['subsets'] ) ){
1072
1073 /* format subsets to string */
1074 if( is_array( $fonts['subsets'] ) ){
1075 $fonts['subsets'] = implode( ',', $fonts['subsets'] );
1076 }
1077
1078 $font_args['subsets'] = urlencode( trim( $fonts['subsets'] ) );
1079 }
1080
1081 $fonts_url = add_query_arg( $font_args, $base_url );
1082 }
1083
1084 return esc_url_raw( $fonts_url );
1085 }
1086
1087 public function mystickymenu_script() {
1088
1089 $mysticky_options = get_option( 'mysticky_option_name' );
1090
1091 if ( is_admin_bar_showing() ) {
1092 $top = "true";
1093 } else {
1094 $top = "false";
1095 }
1096
1097 $welcomebar = get_option( 'mysticky_option_welcomebar' );
1098 if ( isset($welcomebar['mysticky_welcomebar_enable']) && $welcomebar['mysticky_welcomebar_enable'] == 1 ) {
1099 wp_enqueue_style('google-fonts', $this->mystickymenu_google_fonts_url(),array(), MYSTICKY_VERSION );
1100 }
1101
1102 // needed for update 1.7 => 1.8 ... will be removed in the future ()
1103 if (isset($mysticky_options['mysticky_active_on_height_home'])) {
1104 //do nothing
1105 } else {
1106 $mysticky_options['mysticky_active_on_height_home'] = $mysticky_options['mysticky_active_on_height'];
1107 }
1108
1109
1110 if ($mysticky_options['mysticky_active_on_height_home'] == 0 ) {
1111 $mysticky_options['mysticky_active_on_height_home'] = $mysticky_options['mysticky_active_on_height'];
1112 }
1113
1114
1115 if ( is_front_page() && is_home() ) {
1116
1117 $mysticky_options['mysticky_active_on_height'] = $mysticky_options['mysticky_active_on_height_home'];
1118
1119 } elseif ( is_front_page()){
1120
1121 $mysticky_options['mysticky_active_on_height'] = $mysticky_options['mysticky_active_on_height_home'];
1122
1123 }
1124 wp_register_script('detectmobilebrowser', plugins_url( 'js/detectmobilebrowser.js', __FILE__ ), array('jquery'), MYSTICKY_VERSION, true);
1125 wp_enqueue_script( 'detectmobilebrowser' );
1126
1127 wp_register_script('mystickymenu', plugins_url( 'js/mystickymenu.min.js', __FILE__ ), array('jquery'), MYSTICKY_VERSION, true);
1128 wp_enqueue_script( 'mystickymenu' );
1129
1130 $myfixed_disable_scroll_down = isset($mysticky_options['myfixed_disable_scroll_down']) ? $mysticky_options['myfixed_disable_scroll_down'] : 'false';
1131 $mystickyTransition = isset($mysticky_options['myfixed_fade']) ? $mysticky_options['myfixed_fade'] : 'fade';
1132 $mystickyDisableLarge = isset($mysticky_options['myfixed_disable_large_screen']) ? $mysticky_options['myfixed_disable_large_screen'] : '0';
1133
1134 $mystickyClass = ( $mysticky_options['mysticky_class_id_selector'] != 'custom') ? '.menu-' . $mysticky_options['mysticky_class_id_selector'] .'-container' : $mysticky_options['mysticky_class_selector'];
1135
1136 if ( $mysticky_options['mysticky_class_id_selector'] != 'custom' ) {
1137 $template_name = get_template();
1138 switch( $template_name ){
1139 case 'ashe':
1140 $mystickyClass = '#main-nav';
1141 break;
1142 case 'astra':
1143 case 'hello-elementor':
1144 case 'sydney':
1145 case 'twentysixteen':
1146 $mystickyClass = 'header.site-header';
1147 break;
1148 case 'generatepress':
1149 $mystickyClass = 'nav.main-navigation';
1150 break;
1151 case 'transportex':
1152 $mystickyClass = '.transportex-menu-full';
1153 break;
1154 case 'hestia':
1155 case 'neve':
1156 $mystickyClass = 'header.header';
1157 break;
1158 case 'mesmerize':
1159 $mystickyClass = '.navigation-bar';
1160 break;
1161 case 'oceanwp':
1162 $mystickyClass = 'header#site-header';
1163 break;
1164 case 'shapely':
1165 $mystickyClass = '#site-navigation';
1166 break;
1167 case 'storefront':
1168 $mystickyClass = '.storefront-primary-navigation';
1169 break;
1170 case 'twentynineteen':
1171 $mystickyClass = '#site-navigation';
1172 break;
1173 case 'twentyseventeen':
1174 $mystickyClass = '.navigation-top';
1175 break;
1176 default:
1177 break;
1178 }
1179 }
1180
1181
1182 $mysticky_translation_array = array(
1183 'mystickyClass' => $mystickyClass,
1184 'activationHeight' => $mysticky_options['mysticky_active_on_height'],
1185 'disableWidth' => $mysticky_options['myfixed_disable_small_screen'],
1186 'disableLargeWidth' => $mystickyDisableLarge,
1187 'adminBar' => $top,
1188 'device_desktop' => true,
1189 'device_mobile' => true,
1190 'mystickyTransition' => $mystickyTransition,
1191 'mysticky_disable_down' => $myfixed_disable_scroll_down,
1192
1193
1194 );
1195 wp_localize_script( 'mystickymenu', 'option', $mysticky_translation_array );
1196 }
1197
1198 public function mysticky_disable_at() {
1199
1200
1201 $mysticky_options = get_option( 'mysticky_option_name' );
1202
1203 $mysticky_disable_at_front_home = isset($mysticky_options['mysticky_disable_at_front_home']);
1204 $mysticky_disable_at_blog = isset($mysticky_options['mysticky_disable_at_blog']);
1205 $mysticky_disable_at_page = isset($mysticky_options['mysticky_disable_at_page']);
1206 $mysticky_disable_at_tag = isset($mysticky_options['mysticky_disable_at_tag']);
1207 $mysticky_disable_at_category = isset($mysticky_options['mysticky_disable_at_category']);
1208 $mysticky_disable_at_single = isset($mysticky_options['mysticky_disable_at_single']);
1209 $mysticky_disable_at_archive = isset($mysticky_options['mysticky_disable_at_archive']);
1210 $mysticky_disable_at_search = isset($mysticky_options['mysticky_disable_at_search']);
1211 $mysticky_disable_at_404 = isset($mysticky_options['mysticky_disable_at_404']);
1212 $mysticky_enable_at_pages = isset($mysticky_options['mysticky_enable_at_pages']) ? $mysticky_options['mysticky_enable_at_pages'] : '';
1213 $mysticky_enable_at_posts = isset($mysticky_options['mysticky_enable_at_posts']) ? $mysticky_options['mysticky_enable_at_posts'] : '';
1214
1215 // Trim input to ignore empty spaces
1216 $mysticky_enable_at_pages_exp = array_map('trim', explode(',', $mysticky_enable_at_pages));
1217 $mysticky_enable_at_posts_exp = array_map('trim', explode(',', $mysticky_enable_at_posts));
1218
1219
1220
1221
1222 if ( is_front_page() && is_home() ) { /* Default homepage */
1223
1224 if ( $mysticky_disable_at_front_home == false ) {
1225 $this->mystickymenu_script();
1226 }
1227 } elseif ( is_front_page()){ /* Static homepage */
1228
1229 if ( $mysticky_disable_at_front_home == false ) {
1230 $this->mystickymenu_script();
1231 }
1232
1233 } elseif ( is_home()){ /* Blog page */
1234
1235 if ( $mysticky_disable_at_blog == false ) {
1236 $this->mystickymenu_script();
1237 }
1238
1239 } elseif ( is_page() ){ /* Single page*/
1240
1241 if ( $mysticky_disable_at_page == false ) {
1242 $this->mystickymenu_script();
1243 }
1244 if ( is_page( $mysticky_enable_at_pages_exp ) ){
1245 $this->mystickymenu_script();
1246 }
1247
1248 } elseif ( is_tag()){ /* Tag page */
1249
1250 if ( $mysticky_disable_at_tag == false ) {
1251 $this->mystickymenu_script();
1252 }
1253
1254 } elseif ( is_category()){ /* Category page */
1255
1256 if ( $mysticky_disable_at_category == false ) {
1257 $this->mystickymenu_script();
1258 }
1259
1260 } elseif ( is_single()){ /* Single post */
1261
1262 if ( $mysticky_disable_at_single == false ) {
1263 $this->mystickymenu_script();
1264 }
1265
1266 if ( is_single( $mysticky_enable_at_posts_exp ) ){
1267 $this->mystickymenu_script();
1268 }
1269
1270 } elseif ( is_archive()){ /* Archive */
1271
1272 if ( $mysticky_disable_at_archive == false ) {
1273 $this->mystickymenu_script();
1274 }
1275
1276 } elseif ( is_search()){ /* Search */
1277
1278 if ( $mysticky_disable_at_search == false ) {
1279 $this->mystickymenu_script();
1280 }
1281
1282 } elseif ( is_404()){ /* 404 */
1283
1284 if ( $mysticky_disable_at_404 == false ) {
1285 $this->mystickymenu_script();
1286 }
1287 }
1288
1289 }
1290
1291 }
1292
1293 if( is_admin() ) {
1294 new MyStickyMenuBackend();
1295 require_once 'mystickymenu-affiliate.php';
1296
1297 } else {
1298 new MyStickyMenuFrontend();
1299 }