Sticky Menu (or Anything!) on Scroll - Version 2.30

Version Description

  • 2021-02-13
  • better clean-up on delete and deactivate
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Sticky Menu (or Anything!) on Scroll
Version 2.30
Comparing to
See all releases

Code changes from version 2.29 to 2.30

readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: sticky header, sticky menu, sticky, header, sticky widget, floating menu,
4
  Plugin URI: https://wpsticky.com/
5
  Requires at least: 3.6
6
  Tested up to: 5.6
7
- Stable tag: 2.29
8
  Requires PHP: 5.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -132,6 +132,10 @@ Please go to the plugin's [support forum on WordPress.org](https://wordpress.org
132
 
133
  == Changelog ==
134
 
 
 
 
 
135
  = 2.29 =
136
  * 2021-01-30
137
  * added flyout menu
4
  Plugin URI: https://wpsticky.com/
5
  Requires at least: 3.6
6
  Tested up to: 5.6
7
+ Stable tag: 2.30
8
  Requires PHP: 5.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
132
 
133
  == Changelog ==
134
 
135
+ = 2.30 =
136
+ * 2021-02-13
137
+ * better clean-up on delete and deactivate
138
+
139
  = 2.29 =
140
  * 2021-01-30
141
  * added flyout menu
sticky-menu-or-anything.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://wpsticky.com/
5
  Description: Pick any element on the page, and it will stick when it reaches the top of the page when you scroll down. Handy for navigation menus, but can be used for any element on the page.
6
  Author: WebFactory Ltd
7
  Author URI: https://www.webfactoryltd.com/
8
- Version: 2.29
9
  Requires at least: 3.6
10
  Tested up to: 5.6
11
  Requires PHP: 5.2
@@ -24,8 +24,8 @@ new wf_flyout(__FILE__);
24
  * --- TRIGGERED ON ACTIVATION --------------------------------------------------------------------------
25
  * --- IF DATABASE VALUES ARE NOT SET AT ALL, ADD DEFAULT OPTIONS TO DATABASE ---------------------------
26
  */
27
- if (!function_exists('sticky_anthing_default_options')) {
28
- function sticky_anthing_default_options() {
29
  $versionNum = '2.25';
30
  if (get_option('sticky_anything_options') === false) {
31
  $new_options['sa_version'] = $versionNum;
@@ -725,6 +725,12 @@ function sticky_anything_admin_footer() {
725
  $out .= '<td><span class="dashicons dashicons-yes"></span>Lifetime Updates &amp; Support</td>';
726
  $out .= '</tr>';
727
 
 
 
 
 
 
 
728
  $out .= '<tr>';
729
  $out .= '<td><span class="dashicons dashicons-yes"></span>All Plugin Features</td>';
730
  $out .= '<td><span class="dashicons dashicons-yes"></span>All Plugin Features</td>';
@@ -751,13 +757,13 @@ function sticky_anything_admin_footer() {
751
 
752
  $out .= '<tr>';
753
  $out .= '<td><span>20% discount</span><a class="button button-buy" data-href-org="https://wpsticky.com/buy/?product=single-launch&ref=pricing-table" href="https://wpsticky.com/buy/?product=single-launch&ref=pricing-table" target="_blank">BUY NOW <del>$49</del> $39</a><br>-or-<br><a class="button button-buy" data-href-org="https://wpsticky.com/buy/?product=single-monthly&ref=pricing-table" href="https://wpsticky.com/buy/?product=single-monthly&ref=pricing-table" target="_blank">ONLY $5.99 <small>/month</small></a></td>';
754
- $out .= '<td><span>25% discount</span><a class="button button-buy" data-href-org="https://wpsticky.com/buy/?product=team-launch&ref=pricing-table" href="https://wpsticky.com/buy/?product=team-launch&ref=pricing-table" target="_blank">BUY NOW <del>$79</del> $59</a></td>';
755
  $out .= '<td><span>$100 discount</span><a class="button button-buy" data-href-org="https://wpsticky.com/buy/?product=agency-launch&ref=pricing-table" href="https://wpsticky.com/buy/?product=agency-launch&ref=pricing-table" target="_blank">BUY NOW <del>$199</del> $99</a></td>';
756
  $out .= '</tr>';
757
 
758
  $out .= '</table>';
759
 
760
- $out .= '<div class="center footer"><b>100% No-Risk Money Back Guarantee!</b> If you don\'t like the plugin over the next 7 days, we will happily refund 100% of your money. No questions asked!</div></div>';
761
 
762
  echo $out;
763
  } // sticky_anything_admin_footer
@@ -842,13 +848,23 @@ function sticky_anything_admin_footer() {
842
  wp_send_json_success();
843
  } // sticky_ajax_dismiss_notice
844
 
 
 
 
 
 
 
 
 
 
845
  /**
846
  * === HOOKS AND ACTIONS AND FILTERS AND SUCH ==========================================================
847
  */
848
 
849
  $plugin = plugin_basename(__FILE__);
850
 
851
- register_activation_hook( __FILE__, 'sticky_anthing_default_options' );
 
852
  add_action('init','sticky_anything_update',1);
853
  add_action('wp_enqueue_scripts', 'load_sticky_anything');
854
  add_action('admin_menu', 'sticky_anything_menu');
5
  Description: Pick any element on the page, and it will stick when it reaches the top of the page when you scroll down. Handy for navigation menus, but can be used for any element on the page.
6
  Author: WebFactory Ltd
7
  Author URI: https://www.webfactoryltd.com/
8
+ Version: 2.30
9
  Requires at least: 3.6
10
  Tested up to: 5.6
11
  Requires PHP: 5.2
24
  * --- TRIGGERED ON ACTIVATION --------------------------------------------------------------------------
25
  * --- IF DATABASE VALUES ARE NOT SET AT ALL, ADD DEFAULT OPTIONS TO DATABASE ---------------------------
26
  */
27
+ if (!function_exists('sticky_anything_activate')) {
28
+ function sticky_anything_activate() {
29
  $versionNum = '2.25';
30
  if (get_option('sticky_anything_options') === false) {
31
  $new_options['sa_version'] = $versionNum;
725
  $out .= '<td><span class="dashicons dashicons-yes"></span>Lifetime Updates &amp; Support</td>';
726
  $out .= '</tr>';
727
 
728
+ $out .= '<tr>';
729
+ $out .= '<td><span class="dashicons dashicons-yes"></span>Priority email support</td>';
730
+ $out .= '<td><span class="dashicons dashicons-yes"></span>Priority email support</td>';
731
+ $out .= '<td><span class="dashicons dashicons-yes"></span>Priority email support</td>';
732
+ $out .= '</tr>';
733
+
734
  $out .= '<tr>';
735
  $out .= '<td><span class="dashicons dashicons-yes"></span>All Plugin Features</td>';
736
  $out .= '<td><span class="dashicons dashicons-yes"></span>All Plugin Features</td>';
757
 
758
  $out .= '<tr>';
759
  $out .= '<td><span>20% discount</span><a class="button button-buy" data-href-org="https://wpsticky.com/buy/?product=single-launch&ref=pricing-table" href="https://wpsticky.com/buy/?product=single-launch&ref=pricing-table" target="_blank">BUY NOW <del>$49</del> $39</a><br>-or-<br><a class="button button-buy" data-href-org="https://wpsticky.com/buy/?product=single-monthly&ref=pricing-table" href="https://wpsticky.com/buy/?product=single-monthly&ref=pricing-table" target="_blank">ONLY $5.99 <small>/month</small></a></td>';
760
+ $out .= '<td><span>40% discount</span><a class="button button-buy" data-href-org="https://wpsticky.com/buy/?product=team-launch&ref=pricing-table" href="https://wpsticky.com/buy/?product=team-launch&ref=pricing-table" target="_blank">BUY NOW <del>$79</del> $49</a></td>';
761
  $out .= '<td><span>$100 discount</span><a class="button button-buy" data-href-org="https://wpsticky.com/buy/?product=agency-launch&ref=pricing-table" href="https://wpsticky.com/buy/?product=agency-launch&ref=pricing-table" target="_blank">BUY NOW <del>$199</del> $99</a></td>';
762
  $out .= '</tr>';
763
 
764
  $out .= '</table>';
765
 
766
+ $out .= '<div class="center footer"><b>100% No-Risk Money Back Guarantee!</b> If you don\'t like the plugin over the next 7 days, we\'ll refund 100% of your money. No questions asked! Payments are processed by our merchant of records - <a href="https://paddle.com" target="_blank">Paddle</a>.</div></div>';
767
 
768
  echo $out;
769
  } // sticky_anything_admin_footer
848
  wp_send_json_success();
849
  } // sticky_ajax_dismiss_notice
850
 
851
+
852
+ function sticky_anything_deactivate() {
853
+ delete_option('sticky_dismissed_notices');
854
+
855
+ $sticky_anything_options = get_option('sticky_anything_options');
856
+ unset($sticky_anything_options['sa_dismiss_upsell_auto_open']);
857
+ update_option('sticky_anything_options', $sticky_anything_options);
858
+ }
859
+
860
  /**
861
  * === HOOKS AND ACTIONS AND FILTERS AND SUCH ==========================================================
862
  */
863
 
864
  $plugin = plugin_basename(__FILE__);
865
 
866
+ register_activation_hook( __FILE__, 'sticky_anything_activate' );
867
+ register_deactivation_hook( __FILE__, 'sticky_anything_deactivate' );
868
  add_action('init','sticky_anything_update',1);
869
  add_action('wp_enqueue_scripts', 'load_sticky_anything');
870
  add_action('admin_menu', 'sticky_anything_menu');
uninstall.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
- if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
3
- exit;
4
- }
5
 
6
- if ( get_option( 'sticky_anything_options' ) != false ) {
7
- delete_option( 'sticky_anything_options' );
8
- }
1
  <?php
2
+ if (!defined('WP_UNINSTALL_PLUGIN')) {
3
+ exit;
4
+ }
5
 
6
+ delete_option('sticky_anything_options');
7
+ delete_option('sticky_dismissed_notices');
 
wf-flyout/config.php CHANGED
@@ -6,12 +6,13 @@ $config['icon_border'] = '1px solid #00000099';
6
  $config['icon_right'] = '35px';
7
  $config['icon_bottom'] = '35px';
8
  $config['icon_image'] = 'sticky.png';
9
- $config['icon_padding'] = '6px';
10
  $config['icon_size'] = '55px';
11
- $config['menu_accent_color'] = '#dd3036';
12
- $config['custom_css'] = '#wf-flyout .wff-menu-item .dashicons.dashicons-universal-access { font-size: 30px; padding: 0px 10px 0px 0; } #wf-flyout .ucp-icon .wff-icon img { max-width: 70%; } #wf-flyout .ucp-icon .wff-icon { line-height: 57px; }';
13
 
14
  $config['menu_items'] = array(
 
15
  array('href' => 'https://wpreset.com/?ref=wff-sticky', 'target' => '_blank', 'label' => 'Get WP Reset PRO with 50% off', 'icon' => 'wp-reset.png'),
16
  array('href' => 'https://underconstructionpage.com/?ref=wff-sticky&coupon=welcome', 'target' => '_blank', 'label' => 'Create the perfect Under Construction Page', 'icon' => 'ucp.png', 'class' => 'ucp-icon'),
17
  array('href' => 'https://wordpress.org/support/plugin/sticky-menu-or-anything-on-scroll/reviews/?filter=5#new-post', 'target' => '_blank', 'label' => 'Rate the Plugin', 'icon' => 'dashicons-thumbs-up'),
6
  $config['icon_right'] = '35px';
7
  $config['icon_bottom'] = '35px';
8
  $config['icon_image'] = 'sticky.png';
9
+ $config['icon_padding'] = '9px';
10
  $config['icon_size'] = '55px';
11
+ $config['menu_accent_color'] = '#ffde66';
12
+ $config['custom_css'] = '#wf-flyout .wff-menu-item .dashicons.dashicons-universal-access { font-size: 30px; padding: 0px 10px 0px 0; } #wf-flyout .ucp-icon .wff-icon img { max-width: 70%; } #wf-flyout .ucp-icon .wff-icon { line-height: 57px; } #wf-flyout .wff-menu-item .dashicons.dashicons-admin-post { color: #3f3e40; }';
13
 
14
  $config['menu_items'] = array(
15
+ array('href' => '#', 'label' => 'Get WP Sticky PRO with 50% off', 'icon' => 'dashicons-admin-post', 'class' => 'accent open-sticky-pro-dialog', 'data' => 'data-pro-feature="flyout"'),
16
  array('href' => 'https://wpreset.com/?ref=wff-sticky', 'target' => '_blank', 'label' => 'Get WP Reset PRO with 50% off', 'icon' => 'wp-reset.png'),
17
  array('href' => 'https://underconstructionpage.com/?ref=wff-sticky&coupon=welcome', 'target' => '_blank', 'label' => 'Create the perfect Under Construction Page', 'icon' => 'ucp.png', 'class' => 'ucp-icon'),
18
  array('href' => 'https://wordpress.org/support/plugin/sticky-menu-or-anything-on-scroll/reviews/?filter=5#new-post', 'target' => '_blank', 'label' => 'Rate the Plugin', 'icon' => 'dashicons-thumbs-up'),
wf-flyout/wf-flyout.php CHANGED
@@ -124,7 +124,7 @@ if (false == class_exists('wf_flyout')) {
124
 
125
  $out = '';
126
  $icons_url = plugin_dir_url($this->plugin_file) . 'wf-flyout/icons/';
127
- $default_link_item = array('class' => '', 'href' => '#', 'target' => '_blank', 'label' => '', 'icon' => '');
128
 
129
  $out .= '<div id="wff-overlay"></div>';
130
 
@@ -148,7 +148,7 @@ if (false == class_exists('wf_flyout')) {
148
  $item['class'] = trim($item['class']);
149
  }
150
 
151
- $out .= '<a href="' . $item['href'] . '" class="wff-menu-item wff-menu-item-' . $i . ' ' . $item['class'] . '" target="_blank">';
152
  $out .= '<span class="wff-label visible">' . $item['label'] . '</span>';
153
  if (substr($item['icon'], 0, 9) == 'dashicons') {
154
  $out .= '<span class="dashicons ' . $item['icon'] . '"></span>';
124
 
125
  $out = '';
126
  $icons_url = plugin_dir_url($this->plugin_file) . 'wf-flyout/icons/';
127
+ $default_link_item = array('class' => '', 'href' => '#', 'target' => '_blank', 'label' => '', 'icon' => '', 'data' => '');
128
 
129
  $out .= '<div id="wff-overlay"></div>';
130
 
148
  $item['class'] = trim($item['class']);
149
  }
150
 
151
+ $out .= '<a ' . $item['data'] . ' href="' . $item['href'] . '" class="wff-menu-item wff-menu-item-' . $i . ' ' . $item['class'] . '" target="_blank">';
152
  $out .= '<span class="wff-label visible">' . $item['label'] . '</span>';
153
  if (substr($item['icon'], 0, 9) == 'dashicons') {
154
  $out .= '<span class="dashicons ' . $item['icon'] . '"></span>';