Version Description
Background color fix
Download this release
Release Info
Developer | galdub |
Plugin | myStickymenu |
Version | 2.4.5 |
Comparing to | |
See all releases |
Code changes from version 2.4.4 to 2.4.5
- css/mystickymenu-admin.css +57 -0
- js/mystickymenu-admin.js +2 -0
- js/mystickymenu.js +1 -0
- js/mystickymenu.min.js +1 -1
- mystickymenu.php +20 -4
- readme.txt +4 -1
- recommended-plugins.php +492 -0
- welcome-bar.php +35 -10
css/mystickymenu-admin.css
CHANGED
@@ -2219,3 +2219,60 @@ div#wp-mysticky_bar_text-wrap {
|
|
2219 |
}
|
2220 |
}
|
2221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2219 |
}
|
2220 |
}
|
2221 |
|
2222 |
+
|
2223 |
+
|
2224 |
+
.mysticky-custom-fields-tooltip{
|
2225 |
+
position: relative;
|
2226 |
+
margin-left: 20px;
|
2227 |
+
}
|
2228 |
+
.mysticky-custom-fields-tooltip:hover p {
|
2229 |
+
bottom: 100%;
|
2230 |
+
opacity: 1;
|
2231 |
+
visibility: visible;
|
2232 |
+
}
|
2233 |
+
|
2234 |
+
.mysticky-custom-fields-tooltip a.mysticky-tooltip {
|
2235 |
+
width: 20px;
|
2236 |
+
height: 20px;
|
2237 |
+
line-height: 20px;
|
2238 |
+
border-radius: 35px;
|
2239 |
+
padding: 0;
|
2240 |
+
text-align: center;
|
2241 |
+
font-size: 12px;
|
2242 |
+
display: inline-block;
|
2243 |
+
color: #ffffff;
|
2244 |
+
text-decoration: none;
|
2245 |
+
}
|
2246 |
+
.mysticky-custom-fields-tooltip a.mysticky-tooltip .dashicons{
|
2247 |
+
text-transform: uppercase;
|
2248 |
+
color: #1E1E1E;
|
2249 |
+
}
|
2250 |
+
.mysticky-custom-fields-tooltip p {
|
2251 |
+
margin: 0;
|
2252 |
+
margin-bottom: 0px;
|
2253 |
+
background-color: #000;
|
2254 |
+
width: 380px;
|
2255 |
+
padding: 10px 10px;
|
2256 |
+
border-radius: 8px;
|
2257 |
+
color: #fff;
|
2258 |
+
position: absolute;
|
2259 |
+
bottom: 200%;
|
2260 |
+
left: -20px;
|
2261 |
+
margin-bottom: 10px;
|
2262 |
+
-webkit-transition: all 0.5s ease 0s;
|
2263 |
+
-moz-transition: all 0.5s ease 0s;
|
2264 |
+
transition: all 0.5s ease 0s;
|
2265 |
+
opacity: 0;
|
2266 |
+
visibility: hidden;
|
2267 |
+
}
|
2268 |
+
.mysticky-custom-fields-tooltip p::before {
|
2269 |
+
content: "";
|
2270 |
+
border-top: 10px solid #000;
|
2271 |
+
border-left: 10px solid transparent;
|
2272 |
+
border-right: 10px solid transparent;
|
2273 |
+
width: 0;
|
2274 |
+
height: 0;
|
2275 |
+
position: absolute;
|
2276 |
+
bottom: -8px;
|
2277 |
+
left: 25px;
|
2278 |
+
}
|
js/mystickymenu-admin.js
CHANGED
@@ -107,8 +107,10 @@
|
|
107 |
var mysticky_welcomebar_action = $( this ).val();
|
108 |
if ( mysticky_welcomebar_action == 'redirect_to_url' ) {
|
109 |
$( '.mysticky-welcomebar-redirect' ).show();
|
|
|
110 |
} else {
|
111 |
$( '.mysticky-welcomebar-redirect' ).hide();
|
|
|
112 |
}
|
113 |
if ( $('.mysticky-welcomebar-action option:selected').attr('data-href') !== '' && mysticky_welcomebar_action == 'thankyou_screen' ) {
|
114 |
window.open( $( '.mysticky-welcomebar-action option:selected' ).attr('data-href') , '_blank');
|
107 |
var mysticky_welcomebar_action = $( this ).val();
|
108 |
if ( mysticky_welcomebar_action == 'redirect_to_url' ) {
|
109 |
$( '.mysticky-welcomebar-redirect' ).show();
|
110 |
+
$( '.mysticky-welcomebar-redirect-container' ).show();
|
111 |
} else {
|
112 |
$( '.mysticky-welcomebar-redirect' ).hide();
|
113 |
+
$( '.mysticky-welcomebar-redirect-container' ).hide();
|
114 |
}
|
115 |
if ( $('.mysticky-welcomebar-action option:selected').attr('data-href') !== '' && mysticky_welcomebar_action == 'thankyou_screen' ) {
|
116 |
window.open( $( '.mysticky-welcomebar-action option:selected' ).attr('data-href') , '_blank');
|
js/mystickymenu.js
CHANGED
@@ -316,6 +316,7 @@
|
|
316 |
y >= activationHeight ? wrappernav.classList.add('wrapfixed') : "";
|
317 |
|
318 |
y >= activationHeight ? wrappermysticky.style.height = mydivHeight + 'px' : "";
|
|
|
319 |
y >= activationHeight ? mystickyClass.style.width = mydivWidth + "px" : "";
|
320 |
|
321 |
|
316 |
y >= activationHeight ? wrappernav.classList.add('wrapfixed') : "";
|
317 |
|
318 |
y >= activationHeight ? wrappermysticky.style.height = mydivHeight + 'px' : "";
|
319 |
+
y >= activationHeight ? wrappernav.style.height = mydivHeight + 'px' : "";
|
320 |
y >= activationHeight ? mystickyClass.style.width = mydivWidth + "px" : "";
|
321 |
|
322 |
|
js/mystickymenu.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){"use strict";jQuery(document).ready(function(e){if(jQuery.browser.mobile&&!option.device_mobile)return!1;if(!jQuery.browser.mobile&&!option.device_desktop)return!1;if(e(option.mystickyClass)[0]){var t,i=document.querySelector(option.mystickyClass),s=parseInt(option.disableWidth),o=parseInt(option.disableLargeWidth),n=option.mystickyTransition,d=parseInt(option.activationHeight),a=option.adminBar,r=option.mysticky_disable_down;C();for(var l=i.parentNode,c=document.createElement("div"),m=0,p=0;p<l.childNodes.length;p++)if(l.childNodes[p]==i){m=p;break}c.id="mysticky-wrap",c.appendChild(i),l.insertBefore(c,l.childNodes[m]);var y,f,u=i.parentNode,
|
1 |
+
!function(e){"use strict";jQuery(document).ready(function(e){if(jQuery.browser.mobile&&!option.device_mobile)return!1;if(!jQuery.browser.mobile&&!option.device_desktop)return!1;if(e(option.mystickyClass)[0]){var t,i=document.querySelector(option.mystickyClass),s=parseInt(option.disableWidth),o=parseInt(option.disableLargeWidth),n=option.mystickyTransition,d=parseInt(option.activationHeight),a=option.adminBar,r=option.mysticky_disable_down;C();for(var l=i.parentNode,c=document.createElement("div"),m=0,p=0;p<l.childNodes.length;p++)if(l.childNodes[p]==i){m=p;break}c.id="mysticky-wrap",c.appendChild(i),l.insertBefore(c,l.childNodes[m]);var y,f,u=i.parentNode,h=document.createElement("div");if(h.id="mysticky-nav",u.replaceChild(h,i),h.appendChild(i),"0"==d)var w=!0;E(),j();var v,x=0;B(),H();var k=d;Q(),S();var g="scrollY"in window,b=0;document.addEventListener("scroll",function(a){var l=e(".mysticky-welcomebar-fixed").css("top"),m=e(".mysticky-welcomebar-fixed").data("position"),p=e(".mysticky-welcomebar-fixed").outerHeight(),u=e(".mysticky-welcomebar-fixed").length,w=e("body").hasClass("mysticky-welcomebar-apper");if(u&&parseInt(l)>=0&&"top"==m&&w){var L=p;x=0}else L="";if(t>=s&&(0==o||t<=o)){var C=g?window.scrollY:document.documentElement.scrollTop;if(0==document.documentElement.scrollTop&&h.classList.remove("wrapfixed"),0<=C){if(C>=b)C>=d&&i.classList.add("myfixed"),C>=d&&h.classList.add("wrapfixed"),C>=d&&(c.style.height=y+"px"),C>=d&&(h.style.height=y+"px"),C>=d&&(i.style.width=v+"px"),"slide"==n&&("false"==r&&(h.style.top=C>=d+f-x?x+L+"px":"-"+f+"px"),y>f&&"false"==r&&(C<d+f&&(h.style.top="-"+y+"px"),C>=d+f&&(h.style.top=x+L+"px"))),h.classList.add("down"),h.classList.remove("up"),"on"==r&&(h.style.top="-"+(y+x)+"px",jQuery("#mysticky-nav "+option.mystickyClass+".elementor-sticky").hide());else{var E=g?window.scrollY:document.documentElement.scrollTop;!(E>k)&&(c.style.height=""),!(E>k)&&(i.style.width=""),"slide"==n?(!(E>k)&&i.classList.remove("myfixed"),!(E>k)&&h.classList.remove("wrapfixed"),"false"==r&&E<k+f+200-x&&(h.style.top="-"+f+"px")):(!(E>k)&&i.classList.remove("myfixed"),!(E>k)&&h.classList.remove("wrapfixed")),h.classList.remove("down"),h.classList.add("up"),"on"==r&&(h.style.top=x+L+"px",jQuery("#mysticky-nav "+option.mystickyClass).css("width",v+"px"),jQuery("#mysticky-nav "+option.mystickyClass+".elementor-sticky").show())}b=C}else h.classList.remove("up")}});var L=e(window).width();window.addEventListener("resize",I),window.addEventListener("orientationchange",I)}else console.log("myStickymenu: Entered Sticky Class does not exist, change it in Dashboard / Settings / myStickymenu / Sticky Class. ");function C(e){e=window;var i="inner";"innerWidth"in window||(i="client",e=document.documentElement||document.body),t=e[i+"Width"]}function E(){y=i.offsetHeight,parseInt(e(i).css("marginBottom"))>0&&(c.style.marginBottom=e(i).css("marginBottom")),"0"==y&&e(i).children().filter(":visible").each(function(){y=e(this).outerHeight(!0)})}function j(){i.classList.add("myfixed"),"0"==(f=e(".myfixed").outerHeight())&&e(".myfixed").children().filter(":visible").each(function(){f=e(this).outerHeight(!0)}),i.classList.remove("myfixed")}function B(){x="true"==a&&t>600&&e("#wpadminbar")[0]?e("#wpadminbar").height():0,h.style.top="slide"==n?"-"+f+"px":x+"px"}function H(){var t=e(i)[0].getBoundingClientRect();v=t.width}function Q(){1==w&&("slide"==n&&(d=e(i).offset().top+y-x,k=e(i).offset().top+y-x,"on"==r&&(k=e(i).offset().top-x)),"fade"==n&&("false"==r&&(d=e(i).offset().top-x,k=e(i).offset().top-x),"on"==r&&(d=e(i).offset().top-x+y,k=e(i).offset().top-x)))}function S(){1==w&&y>f&&("slide"==n?(k=d,"on"==r&&(k=d-f)):(d=y,k=y))}function I(){e(window).width()!=L&&(h.classList.remove("up"),h.classList.remove("down"),e(".wrapfixed")[0]||(E(),i.style.removeProperty("width"),H()),C(),B(),j(),Q(),S())}})}();
|
mystickymenu.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.4.
|
7 |
Author: Premio
|
8 |
Author URI: https://premio.io/downloads/mystickymenu/
|
9 |
Text Domain: mystickymenu
|
@@ -12,7 +12,7 @@ License: GPLv2 or later
|
|
12 |
*/
|
13 |
|
14 |
defined('ABSPATH') or die("Cannot access pages directly.");
|
15 |
-
define( 'MYSTICKY_VERSION', '2.4.
|
16 |
define('MYSTICKYMENU_URL', plugins_url('/', __FILE__)); // Define Plugin URL
|
17 |
define('MYSTICKYMENU_PATH', plugin_dir_path(__FILE__)); // Define Plugin Directory Path
|
18 |
|
@@ -97,7 +97,7 @@ class MyStickyMenuBackend
|
|
97 |
|
98 |
public function mysticky_admin_script($hook) {
|
99 |
|
100 |
-
if ( !isset($_GET['page']) || ( isset($_GET['page']) && $_GET['page'] != 'my-stickymenu-settings' && $_GET['page'] != 'my-stickymenu-welcomebar' && $_GET['page'] != 'my-stickymenu-new-welcomebar' && $_GET['page'] != 'my-stickymenu-upgrade' )) {
|
101 |
return;
|
102 |
}
|
103 |
|
@@ -133,6 +133,10 @@ class MyStickyMenuBackend
|
|
133 |
}
|
134 |
|
135 |
public function add_plugin_page(){
|
|
|
|
|
|
|
|
|
136 |
// This page will be under "Settings"
|
137 |
add_menu_page(
|
138 |
'Settings Admin',
|
@@ -165,7 +169,16 @@ class MyStickyMenuBackend
|
|
165 |
'my-stickymenu-new-welcomebar',
|
166 |
array( $this, 'mystickystickymenu_admin_new_welcomebar_page' )
|
167 |
);
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
add_submenu_page(
|
170 |
'my-stickymenu-settings',
|
171 |
'Upgrade to Pro',
|
@@ -744,6 +757,9 @@ class MyStickyMenuBackend
|
|
744 |
</div>
|
745 |
<?php
|
746 |
}
|
|
|
|
|
|
|
747 |
public function mystickymenu_admin_upgrade_to_pro() {
|
748 |
$pro_url = "https://go.premio.io/checkount/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=";
|
749 |
?>
|
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.4.5
|
7 |
Author: Premio
|
8 |
Author URI: https://premio.io/downloads/mystickymenu/
|
9 |
Text Domain: mystickymenu
|
12 |
*/
|
13 |
|
14 |
defined('ABSPATH') or die("Cannot access pages directly.");
|
15 |
+
define( 'MYSTICKY_VERSION', '2.4.5' );
|
16 |
define('MYSTICKYMENU_URL', plugins_url('/', __FILE__)); // Define Plugin URL
|
17 |
define('MYSTICKYMENU_PATH', plugin_dir_path(__FILE__)); // Define Plugin Directory Path
|
18 |
|
97 |
|
98 |
public function mysticky_admin_script($hook) {
|
99 |
|
100 |
+
if ( !isset($_GET['page']) || ( isset($_GET['page']) && $_GET['page'] != 'my-stickymenu-settings' && $_GET['page'] != 'my-stickymenu-welcomebar' && $_GET['page'] != 'my-stickymenu-new-welcomebar' && $_GET['page'] != 'my-stickymenu-upgrade' && $_GET['page'] != 'msm-recommended-plugins' )) {
|
101 |
return;
|
102 |
}
|
103 |
|
133 |
}
|
134 |
|
135 |
public function add_plugin_page(){
|
136 |
+
if ( isset($_GET['hide_msmrecommended_plugin']) && $_GET['hide_msmrecommended_plugin'] == 1) {
|
137 |
+
update_option('hide_msmrecommended_plugin',true);
|
138 |
+
}
|
139 |
+
$hide_msmrecommended_plugin = get_option('hide_msmrecommended_plugin');
|
140 |
// This page will be under "Settings"
|
141 |
add_menu_page(
|
142 |
'Settings Admin',
|
169 |
'my-stickymenu-new-welcomebar',
|
170 |
array( $this, 'mystickystickymenu_admin_new_welcomebar_page' )
|
171 |
);
|
172 |
+
if ( !$hide_msmrecommended_plugin){
|
173 |
+
add_submenu_page(
|
174 |
+
'my-stickymenu-settings',
|
175 |
+
'msm-recommended-plugins',
|
176 |
+
'Recommended Plugins',
|
177 |
+
'manage_options',
|
178 |
+
'msm-recommended-plugins',
|
179 |
+
array( $this, 'mystickymenu_recommended_plugins' )
|
180 |
+
);
|
181 |
+
}
|
182 |
add_submenu_page(
|
183 |
'my-stickymenu-settings',
|
184 |
'Upgrade to Pro',
|
757 |
</div>
|
758 |
<?php
|
759 |
}
|
760 |
+
public function mystickymenu_recommended_plugins() {
|
761 |
+
include_once 'recommended-plugins.php';
|
762 |
+
}
|
763 |
public function mystickymenu_admin_upgrade_to_pro() {
|
764 |
$pro_url = "https://go.premio.io/checkount/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]=";
|
765 |
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: tomeraharon, galdub, premio
|
|
3 |
Tags:menu, header, sticky menu, sticky header, floating menu, floating navigation menu, navigation menu, navigation, sticky navigation menu, welcome bar, hello bar, top bar, sticky bar, floating bar, notification bar
|
4 |
Requires at least: 3.5.1
|
5 |
Tested up to: 5.5
|
6 |
-
Stable tag: 2.4.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
This sticky menu plugin will make your menu or header stick to the top of page, when scrolled down and up. Also create a beautiful welcome notification bar with it.
|
@@ -75,6 +75,7 @@ But wait, there's more 😉
|
|
75 |
* Set an expiry date for your welcome bar, including settings a timezone
|
76 |
* Display your floating notification bar on specific pages
|
77 |
* New: You can set a thank you screen which appears after the button is clicked (can be used for coupons or any other message you want to show your visitors after they click on the button)
|
|
|
78 |
|
79 |
<a href="https://premio.io/downloads/mystickymenu/" target="_blank" title="mystickymenu pro plans"><strong>>>> See Pro plans here</strong></a>
|
80 |
|
@@ -267,6 +268,8 @@ After installing the plugin, you’ll have the option to turn on the welcome bar
|
|
267 |
|
268 |
|
269 |
== Changelog ==
|
|
|
|
|
270 |
= 2.4.4 =
|
271 |
New entrance effects and bug fixes
|
272 |
= 2.4.3 =
|
3 |
Tags:menu, header, sticky menu, sticky header, floating menu, floating navigation menu, navigation menu, navigation, sticky navigation menu, welcome bar, hello bar, top bar, sticky bar, floating bar, notification bar
|
4 |
Requires at least: 3.5.1
|
5 |
Tested up to: 5.5
|
6 |
+
Stable tag: 2.4.5
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
This sticky menu plugin will make your menu or header stick to the top of page, when scrolled down and up. Also create a beautiful welcome notification bar with it.
|
75 |
* Set an expiry date for your welcome bar, including settings a timezone
|
76 |
* Display your floating notification bar on specific pages
|
77 |
* New: You can set a thank you screen which appears after the button is clicked (can be used for coupons or any other message you want to show your visitors after they click on the button)
|
78 |
+
* New: Add a rel Attribute to your notification bar button
|
79 |
|
80 |
<a href="https://premio.io/downloads/mystickymenu/" target="_blank" title="mystickymenu pro plans"><strong>>>> See Pro plans here</strong></a>
|
81 |
|
268 |
|
269 |
|
270 |
== Changelog ==
|
271 |
+
= 2.4.5 =
|
272 |
+
Background color fix
|
273 |
= 2.4.4 =
|
274 |
New entrance effects and bug fixes
|
275 |
= 2.4.3 =
|
recommended-plugins.php
ADDED
@@ -0,0 +1,492 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// You may comment this out IF you're sure the function exists.
|
3 |
+
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
4 |
+
remove_all_filters('plugins_api');
|
5 |
+
$plugins_allowedtags = array(
|
6 |
+
'a' => array(
|
7 |
+
'href' => array(),
|
8 |
+
'title' => array(),
|
9 |
+
'target' => array(),
|
10 |
+
),
|
11 |
+
'abbr' => array( 'title' => array() ),
|
12 |
+
'acronym' => array( 'title' => array() ),
|
13 |
+
'code' => array(),
|
14 |
+
'pre' => array(),
|
15 |
+
'em' => array(),
|
16 |
+
'strong' => array(),
|
17 |
+
'ul' => array(),
|
18 |
+
'ol' => array(),
|
19 |
+
'li' => array(),
|
20 |
+
'p' => array(),
|
21 |
+
'br' => array(),
|
22 |
+
);
|
23 |
+
|
24 |
+
$recommended_plugins = array();
|
25 |
+
/* Poptin Plugins */
|
26 |
+
$args = [
|
27 |
+
'slug' => 'poptin',
|
28 |
+
'fields' => [
|
29 |
+
'short_description' => true,
|
30 |
+
'icons' => true,
|
31 |
+
'reviews' => false, // excludes all reviews
|
32 |
+
],
|
33 |
+
];
|
34 |
+
$data = plugins_api( 'plugin_information', $args );
|
35 |
+
if ( $data && ! is_wp_error( $data ) ) {
|
36 |
+
$recommended_plugins['poptin'] = $data;
|
37 |
+
$recommended_plugins['poptin']->name = 'Poptin: Beautiful Pop Ups and Embedded Inline Contact Forms for Your Website';
|
38 |
+
$recommended_plugins['poptin']->short_description = 'Pop ups and contact forms builder for your website. Get more sales, leads, and subscribers with beautiful popups & inline forms templates, no coding skills required';
|
39 |
+
}
|
40 |
+
|
41 |
+
/* Chaty Plugins */
|
42 |
+
$args = [
|
43 |
+
'slug' => 'chaty',
|
44 |
+
'fields' => [
|
45 |
+
'short_description' => true,
|
46 |
+
'icons' => true,
|
47 |
+
'reviews' => false, // excludes all reviews
|
48 |
+
],
|
49 |
+
];
|
50 |
+
$data = plugins_api( 'plugin_information', $args );
|
51 |
+
if ( $data && ! is_wp_error( $data ) ) {
|
52 |
+
$recommended_plugins['chaty'] = $data;
|
53 |
+
$recommended_plugins['chaty']->name = 'Chaty: WhatsApp, Facebook Messenger, and Many Other Chat Buttons For Your Website';
|
54 |
+
$recommended_plugins['chaty']->short_description = 'Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call bututons';
|
55 |
+
}
|
56 |
+
|
57 |
+
/* Folders Plugins */
|
58 |
+
$args = [
|
59 |
+
'slug' => 'folders',
|
60 |
+
'fields' => [
|
61 |
+
'short_description' => true,
|
62 |
+
'icons' => true,
|
63 |
+
'reviews' => false, // excludes all reviews
|
64 |
+
],
|
65 |
+
];
|
66 |
+
$data = plugins_api( 'plugin_information', $args );
|
67 |
+
if ( $data && ! is_wp_error( $data ) ) {
|
68 |
+
$recommended_plugins['folders'] = $data;
|
69 |
+
$recommended_plugins['folders']->name = 'Folders: Organize Your Media Library, Posts, Pages, & Custom posts Using Drag & Drop';
|
70 |
+
$recommended_plugins['folders']->short_description = 'Folders is a powerful plugin that will help you quickly and easily organize and manage your WordPress Media library files, Pages, Posts, and Custom Posts in folders. Organize your website in minutes';
|
71 |
+
}
|
72 |
+
|
73 |
+
/* Stars Ttestimonials Plugins */
|
74 |
+
$args = [
|
75 |
+
'slug' => 'mystickyelements',
|
76 |
+
'fields' => [
|
77 |
+
'short_description' => true,
|
78 |
+
'icons' => true,
|
79 |
+
'reviews' => false, // excludes all reviews
|
80 |
+
],
|
81 |
+
];
|
82 |
+
$data = plugins_api( 'plugin_information', $args );
|
83 |
+
if ( $data && ! is_wp_error( $data ) ) {
|
84 |
+
$recommended_plugins['stars-testimonials'] = $data;
|
85 |
+
$recommended_plugins['stars-testimonials']->name = 'My Sticky Elements: All-in-one Floating Contact Form, Call, Chat, and 40+ Social Icon Tabs';
|
86 |
+
$recommended_plugins['stars-testimonials']->short_description = 'Capture leads with beautiful floating contact form tab & get followers and chat messages via Facebook Messenger, WhatsApp, Viber, Telegram, Instagram, Amazon, Facebook, and many other channels';
|
87 |
+
}
|
88 |
+
|
89 |
+
|
90 |
+
?>
|
91 |
+
<div class="wrap mystickyelement-wrap recommended-plugins">
|
92 |
+
<h2>
|
93 |
+
<?php _e('Try out our recommended plugins', 'mystickyelements'); ?>
|
94 |
+
<div class="mystickyelement-contact-form-leads-btn">
|
95 |
+
<a href="#" class="create-rule recommeded-plugins-hide"><?php _e('Hide From Menu', 'mystickyelements');?></a>
|
96 |
+
</div>
|
97 |
+
</h2>
|
98 |
+
</div>
|
99 |
+
<div class="wrap recommended-plugins">
|
100 |
+
<div class="wp-list-table widefat plugin-install">
|
101 |
+
<div class="the-list">
|
102 |
+
<?php
|
103 |
+
foreach ( (array) $recommended_plugins as $plugin ) {
|
104 |
+
if ( is_object( $plugin ) ) {
|
105 |
+
$plugin = (array) $plugin;
|
106 |
+
}
|
107 |
+
|
108 |
+
// Display the group heading if there is one.
|
109 |
+
if ( isset( $plugin['group'] ) && $plugin['group'] != $group ) {
|
110 |
+
if ( isset( $this->groups[ $plugin['group'] ] ) ) {
|
111 |
+
$group_name = $this->groups[ $plugin['group'] ];
|
112 |
+
if ( isset( $plugins_group_titles[ $group_name ] ) ) {
|
113 |
+
$group_name = $plugins_group_titles[ $group_name ];
|
114 |
+
}
|
115 |
+
} else {
|
116 |
+
$group_name = $plugin['group'];
|
117 |
+
}
|
118 |
+
|
119 |
+
// Starting a new group, close off the divs of the last one.
|
120 |
+
if ( ! empty( $group ) ) {
|
121 |
+
echo '</div></div>';
|
122 |
+
}
|
123 |
+
|
124 |
+
echo '<div class="plugin-group"><h3>' . esc_html( $group_name ) . '</h3>';
|
125 |
+
// Needs an extra wrapping div for nth-child selectors to work.
|
126 |
+
echo '<div class="plugin-items">';
|
127 |
+
|
128 |
+
$group = $plugin['group'];
|
129 |
+
}
|
130 |
+
$title = wp_kses( $plugin['name'], $plugins_allowedtags );
|
131 |
+
|
132 |
+
// Remove any HTML from the description.
|
133 |
+
$description = strip_tags( $plugin['short_description'] );
|
134 |
+
$version = wp_kses( $plugin['version'], $plugins_allowedtags );
|
135 |
+
|
136 |
+
$name = strip_tags( $title . ' ' . $version );
|
137 |
+
|
138 |
+
$author = wp_kses( $plugin['author'], $plugins_allowedtags );
|
139 |
+
if ( ! empty( $author ) ) {
|
140 |
+
/* translators: %s: Plugin author. */
|
141 |
+
$author = ' <cite>' . sprintf( __( 'By %s' ), $author ) . '</cite>';
|
142 |
+
}
|
143 |
+
|
144 |
+
$requires_php = isset( $plugin['requires_php'] ) ? $plugin['requires_php'] : null;
|
145 |
+
$requires_wp = isset( $plugin['requires'] ) ? $plugin['requires'] : null;
|
146 |
+
|
147 |
+
$compatible_php = is_php_version_compatible( $requires_php );
|
148 |
+
$compatible_wp = is_wp_version_compatible( $requires_wp );
|
149 |
+
$tested_wp = ( empty( $plugin['tested'] ) || version_compare( get_bloginfo( 'version' ), $plugin['tested'], '<=' ) );
|
150 |
+
|
151 |
+
$action_links = array();
|
152 |
+
|
153 |
+
if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) {
|
154 |
+
$status = install_plugin_install_status( $plugin );
|
155 |
+
|
156 |
+
switch ( $status['status'] ) {
|
157 |
+
case 'install':
|
158 |
+
if ( $status['url'] ) {
|
159 |
+
if ( $compatible_php && $compatible_wp ) {
|
160 |
+
$action_links[] = sprintf(
|
161 |
+
'<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
|
162 |
+
esc_attr( $plugin['slug'] ),
|
163 |
+
esc_url( $status['url'] ),
|
164 |
+
/* translators: %s: Plugin name and version. */
|
165 |
+
esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ),
|
166 |
+
esc_attr( $name ),
|
167 |
+
__( 'Install Now' )
|
168 |
+
);
|
169 |
+
} else {
|
170 |
+
$action_links[] = sprintf(
|
171 |
+
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
|
172 |
+
_x( 'Cannot Install', 'plugin' )
|
173 |
+
);
|
174 |
+
}
|
175 |
+
}
|
176 |
+
break;
|
177 |
+
|
178 |
+
case 'update_available':
|
179 |
+
if ( $status['url'] ) {
|
180 |
+
if ( $compatible_php && $compatible_wp ) {
|
181 |
+
$action_links[] = sprintf(
|
182 |
+
'<a class="update-now button aria-button-if-js" data-plugin="%s" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
|
183 |
+
esc_attr( $status['file'] ),
|
184 |
+
esc_attr( $plugin['slug'] ),
|
185 |
+
esc_url( $status['url'] ),
|
186 |
+
/* translators: %s: Plugin name and version. */
|
187 |
+
esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $name ) ),
|
188 |
+
esc_attr( $name ),
|
189 |
+
__( 'Update Now' )
|
190 |
+
);
|
191 |
+
} else {
|
192 |
+
$action_links[] = sprintf(
|
193 |
+
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
|
194 |
+
_x( 'Cannot Update', 'plugin' )
|
195 |
+
);
|
196 |
+
}
|
197 |
+
}
|
198 |
+
break;
|
199 |
+
|
200 |
+
case 'latest_installed':
|
201 |
+
case 'newer_installed':
|
202 |
+
if ( is_plugin_active( $status['file'] ) ) {
|
203 |
+
$action_links[] = sprintf(
|
204 |
+
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
|
205 |
+
_x( 'Active', 'plugin' )
|
206 |
+
);
|
207 |
+
} elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) {
|
208 |
+
$button_text = __( 'Activate' );
|
209 |
+
/* translators: %s: Plugin name. */
|
210 |
+
$button_label = _x( 'Activate %s', 'plugin' );
|
211 |
+
$activate_url = add_query_arg(
|
212 |
+
array(
|
213 |
+
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $status['file'] ),
|
214 |
+
'action' => 'activate',
|
215 |
+
'plugin' => $status['file'],
|
216 |
+
),
|
217 |
+
network_admin_url( 'plugins.php' )
|
218 |
+
);
|
219 |
+
|
220 |
+
if ( is_network_admin() ) {
|
221 |
+
$button_text = __( 'Network Activate' );
|
222 |
+
/* translators: %s: Plugin name. */
|
223 |
+
$button_label = _x( 'Network Activate %s', 'plugin' );
|
224 |
+
$activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url );
|
225 |
+
}
|
226 |
+
|
227 |
+
$action_links[] = sprintf(
|
228 |
+
'<a href="%1$s" class="button activate-now" aria-label="%2$s">%3$s</a>',
|
229 |
+
esc_url( $activate_url ),
|
230 |
+
esc_attr( sprintf( $button_label, $plugin['name'] ) ),
|
231 |
+
$button_text
|
232 |
+
);
|
233 |
+
} else {
|
234 |
+
$action_links[] = sprintf(
|
235 |
+
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
|
236 |
+
_x( 'Installed', 'plugin' )
|
237 |
+
);
|
238 |
+
}
|
239 |
+
break;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
$details_link = self_admin_url(
|
244 |
+
'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .
|
245 |
+
'&TB_iframe=true&width=600&height=550'
|
246 |
+
);
|
247 |
+
|
248 |
+
$action_links[] = sprintf(
|
249 |
+
'<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
|
250 |
+
esc_url( $details_link ),
|
251 |
+
/* translators: %s: Plugin name and version. */
|
252 |
+
esc_attr( sprintf( __( 'More information about %s' ), $name ) ),
|
253 |
+
esc_attr( $name ),
|
254 |
+
__( 'More Details' )
|
255 |
+
);
|
256 |
+
|
257 |
+
if ( ! empty( $plugin['icons']['svg'] ) ) {
|
258 |
+
$plugin_icon_url = $plugin['icons']['svg'];
|
259 |
+
} elseif ( ! empty( $plugin['icons']['2x'] ) ) {
|
260 |
+
$plugin_icon_url = $plugin['icons']['2x'];
|
261 |
+
} elseif ( ! empty( $plugin['icons']['1x'] ) ) {
|
262 |
+
$plugin_icon_url = $plugin['icons']['1x'];
|
263 |
+
} else {
|
264 |
+
$plugin_icon_url = $plugin['icons']['default'];
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Filters the install action links for a plugin.
|
269 |
+
*
|
270 |
+
* @since 2.7.0
|
271 |
+
*
|
272 |
+
* @param string[] $action_links An array of plugin action links. Defaults are links to Details and Install Now.
|
273 |
+
* @param array $plugin The plugin currently being listed.
|
274 |
+
*/
|
275 |
+
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
|
276 |
+
|
277 |
+
$last_updated_timestamp = strtotime( $plugin['last_updated'] );
|
278 |
+
?>
|
279 |
+
<div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
|
280 |
+
<?php
|
281 |
+
if ( ! $compatible_php || ! $compatible_wp ) {
|
282 |
+
echo '<div class="notice inline notice-error notice-alt"><p>';
|
283 |
+
if ( ! $compatible_php && ! $compatible_wp ) {
|
284 |
+
_e( 'This plugin doesn’t work with your versions of WordPress and PHP.' );
|
285 |
+
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
|
286 |
+
printf(
|
287 |
+
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
|
288 |
+
' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
|
289 |
+
self_admin_url( 'update-core.php' ),
|
290 |
+
esc_url( wp_get_update_php_url() )
|
291 |
+
);
|
292 |
+
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
293 |
+
} elseif ( current_user_can( 'update_core' ) ) {
|
294 |
+
printf(
|
295 |
+
/* translators: %s: URL to WordPress Updates screen. */
|
296 |
+
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
297 |
+
self_admin_url( 'update-core.php' )
|
298 |
+
);
|
299 |
+
} elseif ( current_user_can( 'update_php' ) ) {
|
300 |
+
printf(
|
301 |
+
/* translators: %s: URL to Update PHP page. */
|
302 |
+
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
303 |
+
esc_url( wp_get_update_php_url() )
|
304 |
+
);
|
305 |
+
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
306 |
+
}
|
307 |
+
} elseif ( ! $compatible_wp ) {
|
308 |
+
_e( 'This plugin doesn’t work with your version of WordPress.' );
|
309 |
+
if ( current_user_can( 'update_core' ) ) {
|
310 |
+
printf(
|
311 |
+
/* translators: %s: URL to WordPress Updates screen. */
|
312 |
+
' ' . __( '<a href="%s">Please update WordPress</a>.' ),
|
313 |
+
self_admin_url( 'update-core.php' )
|
314 |
+
);
|
315 |
+
}
|
316 |
+
} elseif ( ! $compatible_php ) {
|
317 |
+
_e( 'This plugin doesn’t work with your version of PHP.' );
|
318 |
+
if ( current_user_can( 'update_php' ) ) {
|
319 |
+
printf(
|
320 |
+
/* translators: %s: URL to Update PHP page. */
|
321 |
+
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
|
322 |
+
esc_url( wp_get_update_php_url() )
|
323 |
+
);
|
324 |
+
wp_update_php_annotation( '</p><p><em>', '</em>' );
|
325 |
+
}
|
326 |
+
}
|
327 |
+
echo '</p></div>';
|
328 |
+
}
|
329 |
+
?>
|
330 |
+
<div class="plugin-card-top">
|
331 |
+
<div class="name column-name">
|
332 |
+
<h3>
|
333 |
+
<a href="<?php echo esc_url( $details_link ); ?>" class="thickbox open-plugin-details-modal">
|
334 |
+
<?php echo $title; ?>
|
335 |
+
<img src="<?php echo esc_attr( $plugin_icon_url ); ?>" class="plugin-icon" alt="" />
|
336 |
+
</a>
|
337 |
+
</h3>
|
338 |
+
</div>
|
339 |
+
<div class="action-links">
|
340 |
+
<?php
|
341 |
+
if ( $action_links ) {
|
342 |
+
echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';
|
343 |
+
}
|
344 |
+
?>
|
345 |
+
</div>
|
346 |
+
<div class="desc column-description">
|
347 |
+
<p><?php echo $description; ?></p>
|
348 |
+
<p class="authors"><?php echo $author; ?></p>
|
349 |
+
</div>
|
350 |
+
</div>
|
351 |
+
<div class="plugin-card-bottom">
|
352 |
+
<div class="vers column-rating">
|
353 |
+
<?php
|
354 |
+
wp_star_rating(
|
355 |
+
array(
|
356 |
+
'rating' => $plugin['rating'],
|
357 |
+
'type' => 'percent',
|
358 |
+
'number' => $plugin['num_ratings'],
|
359 |
+
)
|
360 |
+
);
|
361 |
+
?>
|
362 |
+
<span class="num-ratings" aria-hidden="true">(<?php echo number_format_i18n( $plugin['num_ratings'] ); ?>)</span>
|
363 |
+
</div>
|
364 |
+
<div class="column-updated">
|
365 |
+
<strong><?php _e( 'Last Updated:' ); ?></strong>
|
366 |
+
<?php
|
367 |
+
/* translators: %s: Human-readable time difference. */
|
368 |
+
printf( __( '%s ago' ), human_time_diff( $last_updated_timestamp ) );
|
369 |
+
?>
|
370 |
+
</div>
|
371 |
+
<div class="column-downloaded">
|
372 |
+
<?php
|
373 |
+
if ( $plugin['active_installs'] >= 1000000 ) {
|
374 |
+
$active_installs_millions = floor( $plugin['active_installs'] / 1000000 );
|
375 |
+
$active_installs_text = sprintf(
|
376 |
+
/* translators: %s: Number of millions. */
|
377 |
+
_nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ),
|
378 |
+
number_format_i18n( $active_installs_millions )
|
379 |
+
);
|
380 |
+
} elseif ( 0 == $plugin['active_installs'] ) {
|
381 |
+
$active_installs_text = _x( 'Less Than 10', 'Active plugin installations' );
|
382 |
+
} else {
|
383 |
+
$active_installs_text = number_format_i18n( $plugin['active_installs'] ) . '+';
|
384 |
+
}
|
385 |
+
/* translators: %s: Number of installations. */
|
386 |
+
printf( __( '%s Active Installations' ), $active_installs_text );
|
387 |
+
?>
|
388 |
+
</div>
|
389 |
+
<div class="column-compatibility">
|
390 |
+
<?php
|
391 |
+
if ( ! $tested_wp ) {
|
392 |
+
echo '<span class="compatibility-untested">' . __( 'Untested with your version of WordPress' ) . '</span>';
|
393 |
+
} elseif ( ! $compatible_wp ) {
|
394 |
+
echo '<span class="compatibility-incompatible">' . __( '<strong>Incompatible</strong> with your version of WordPress' ) . '</span>';
|
395 |
+
} else {
|
396 |
+
echo '<span class="compatibility-compatible">' . __( '<strong>Compatible</strong> with your version of WordPress' ) . '</span>';
|
397 |
+
}
|
398 |
+
?>
|
399 |
+
</div>
|
400 |
+
</div>
|
401 |
+
</div>
|
402 |
+
<?php
|
403 |
+
} ?>
|
404 |
+
</div>
|
405 |
+
</div>
|
406 |
+
<div id="hide-recommeded-plugins" style="display:none;" title="<?php _e('Are you sure?','mystickyelements');?>">
|
407 |
+
<p><?php _e( "If you hide the recommended plugins page from your menu, it won't appear there again. Are you sure you'd like to do it?", 'mystickyelements');?></p>
|
408 |
+
</div>
|
409 |
+
|
410 |
+
</div>
|
411 |
+
<style>
|
412 |
+
.mystickyelement-contact-form-leads-btn {
|
413 |
+
float: right;
|
414 |
+
}
|
415 |
+
.wrap.mystickyelement-wrap > h2:first-child {
|
416 |
+
font-size: 26px;
|
417 |
+
}
|
418 |
+
.mystickyelement-contact-form-leads-btn a.create-rule {
|
419 |
+
font-size: 18px;
|
420 |
+
padding: 7px 30px;
|
421 |
+
margin: 0px;
|
422 |
+
}
|
423 |
+
a.create-rule {
|
424 |
+
background-color: #7761DF;
|
425 |
+
color: #fff;
|
426 |
+
display: inline-block;
|
427 |
+
vertical-align: top;
|
428 |
+
text-decoration: none;
|
429 |
+
padding: 5px 12px;
|
430 |
+
border-radius: 20px;
|
431 |
+
box-shadow: none;
|
432 |
+
outline: none;
|
433 |
+
}
|
434 |
+
.ui-dialog-buttonpane .ui-dialog-buttonset .red-btn, .ui-dialog-buttonpane .ui-dialog-buttonset .purple-btn, .ui-dialog-buttonpane .ui-dialog-buttonset .gray-btn {
|
435 |
+
background-color: #969696;
|
436 |
+
color: #fff;
|
437 |
+
border-color: #969696;
|
438 |
+
border-radius: 25px;
|
439 |
+
line-height: 1.4;
|
440 |
+
padding: 8px 15px 10px;
|
441 |
+
height: auto;
|
442 |
+
display: inline-block;
|
443 |
+
vertical-align: top;
|
444 |
+
font-size: 16px;
|
445 |
+
min-width: 150px;
|
446 |
+
}
|
447 |
+
.ui-dialog .ui-dialog-buttonpane .ui-button {
|
448 |
+
margin: 0 10px;
|
449 |
+
}
|
450 |
+
.ui-dialog-buttonpane .ui-dialog-buttonset .red-btn {
|
451 |
+
background-color: #FF0000;
|
452 |
+
border-color: #FF0000;
|
453 |
+
}
|
454 |
+
</style>
|
455 |
+
<script>
|
456 |
+
( function( $ ) {
|
457 |
+
"use strict";
|
458 |
+
$(document).ready(function(){
|
459 |
+
$( '.recommeded-plugins-hide' ).on( 'click', function(event){
|
460 |
+
event.preventDefault();
|
461 |
+
$( "#hide-recommeded-plugins" ).dialog({
|
462 |
+
resizable: false,
|
463 |
+
modal: true,
|
464 |
+
draggable: false,
|
465 |
+
height: 'auto',
|
466 |
+
width: 400,
|
467 |
+
open: function (event, ui) {
|
468 |
+
$(".ui-widget-overlay").click(function () {
|
469 |
+
$('#hide-recommeded-plugins').dialog('close');
|
470 |
+
});
|
471 |
+
},
|
472 |
+
buttons: {
|
473 |
+
"Hide it": {
|
474 |
+
click: function () {
|
475 |
+
window.location = "<?php echo admin_url('admin.php?page=my-stickymenu-settings&hide_msmrecommended_plugin=1');?>";
|
476 |
+
},
|
477 |
+
text: 'Hide it',
|
478 |
+
class: 'btn red-btn'
|
479 |
+
},
|
480 |
+
"Keep it": {
|
481 |
+
click: function () {
|
482 |
+
$(this).dialog('close');
|
483 |
+
},
|
484 |
+
text: 'Keep it',
|
485 |
+
class: 'btn alt gray-btn'
|
486 |
+
},
|
487 |
+
}
|
488 |
+
});
|
489 |
+
});
|
490 |
+
});
|
491 |
+
})( jQuery );
|
492 |
+
</script>
|
welcome-bar.php
CHANGED
@@ -24,6 +24,10 @@ function mysticky_welcome_bar_backend() {
|
|
24 |
if( isset($welcomebar['mysticky_welcomebar_btn_mobile']) ) {
|
25 |
$mysticky_welcomebar_btn_mobile = ' mysticky-welcomebar-btn-mobile';
|
26 |
}
|
|
|
|
|
|
|
|
|
27 |
$display = ' mysticky-welcomebar-attention-'.$welcomebar['mysticky_welcomebar_attentionselect'];
|
28 |
$display_entry_effect = (isset($welcomebar['mysticky_welcomebar_entry_effect'])) ? ' mysticky-welcomebar-entry-effect-'.$welcomebar['mysticky_welcomebar_entry_effect'] : ' mysticky-welcomebar-entry-effect-slide-in';
|
29 |
$display_main_class = "mysticky-welcomebar-position-" . $welcomebar['mysticky_welcomebar_position'] . $mysticky_welcomebar_showx_desktop . $mysticky_welcomebar_showx_mobile . $mysticky_welcomebar_btn_desktop . $mysticky_welcomebar_btn_mobile . $display . $display_entry_effect;
|
@@ -207,16 +211,36 @@ function mysticky_welcome_bar_backend() {
|
|
207 |
<option value="thankyou_screen" data-href="<?php echo esc_url($upgarde_url); ?>"><?php _e( 'Thank you screen (Upgrade Now)', 'myStickymenu' );?></option>
|
208 |
</select>
|
209 |
</div>
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
</div>
|
221 |
</div>
|
222 |
<!-- -->
|
@@ -922,6 +946,7 @@ function mysticky_welcomebar_pro_widget_default_fields() {
|
|
922 |
'mysticky_welcomebar_aftersubmission' => 'dont_show_welcomebar',
|
923 |
'mysticky_welcomebar_redirect' => 'https://www.yourdomain.com',
|
924 |
'mysticky_welcomebar_redirect_newtab' => '',
|
|
|
925 |
'mysticky_welcomebar_device_desktop' => 'desktop',
|
926 |
'mysticky_welcomebar_device_mobile' => 'mobile',
|
927 |
'mysticky_welcomebar_entry_effect' => 'slide-in',
|
24 |
if( isset($welcomebar['mysticky_welcomebar_btn_mobile']) ) {
|
25 |
$mysticky_welcomebar_btn_mobile = ' mysticky-welcomebar-btn-mobile';
|
26 |
}
|
27 |
+
|
28 |
+
if( !isset($welcomebar['mysticky_welcomebar_redirect_rel']) ) {
|
29 |
+
$welcomebar['mysticky_welcomebar_redirect_rel'] = '';
|
30 |
+
}
|
31 |
$display = ' mysticky-welcomebar-attention-'.$welcomebar['mysticky_welcomebar_attentionselect'];
|
32 |
$display_entry_effect = (isset($welcomebar['mysticky_welcomebar_entry_effect'])) ? ' mysticky-welcomebar-entry-effect-'.$welcomebar['mysticky_welcomebar_entry_effect'] : ' mysticky-welcomebar-entry-effect-slide-in';
|
33 |
$display_main_class = "mysticky-welcomebar-position-" . $welcomebar['mysticky_welcomebar_position'] . $mysticky_welcomebar_showx_desktop . $mysticky_welcomebar_showx_mobile . $mysticky_welcomebar_btn_desktop . $mysticky_welcomebar_btn_mobile . $display . $display_entry_effect;
|
211 |
<option value="thankyou_screen" data-href="<?php echo esc_url($upgarde_url); ?>"><?php _e( 'Thank you screen (Upgrade Now)', 'myStickymenu' );?></option>
|
212 |
</select>
|
213 |
</div>
|
214 |
+
|
215 |
+
</div>
|
216 |
+
</div>
|
217 |
+
|
218 |
+
<div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
|
219 |
+
<label><?php _e('Redirection link', 'myStickymenu'); ?></label>
|
220 |
+
<div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-action mysticky-welcomebar-redirect" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?> >
|
221 |
+
<input type="text" id="mysticky_welcomebar_redirect" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_redirect]" value="<?php echo esc_url($welcomebar['mysticky_welcomebar_redirect']);?>" placeholder="<?php echo esc_url("https://www.yourdomain.com"); ?>" />
|
222 |
+
</div>
|
223 |
+
</div>
|
224 |
+
<div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
|
225 |
+
<label><?php _e( 'Open in a new tab', 'mystickymenu' );?></label>
|
226 |
+
<div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-newtab mysticky-welcomebar-redirect" >
|
227 |
+
<label class="mysticky-welcomebar-switch">
|
228 |
+
<input name="mysticky_option_welcomebar[mysticky_welcomebar_redirect_newtab]" value= "1" type="checkbox" disabled />
|
229 |
+
<span class="slider"></span>
|
230 |
+
</label>
|
231 |
+
<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>
|
232 |
+
</div>
|
233 |
+
</div>
|
234 |
+
<div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
|
235 |
+
<label><?php _e('rel Attribute', 'myStickymenu'); ?>
|
236 |
+
<span class="mysticky-custom-fields-tooltip">
|
237 |
+
<a href="javascript:void(0);" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a>
|
238 |
+
<p>Add a "rel" attribute to the button link. You can use it to add a rel="nofollow", "sponsored", or any other "rel" attribute option</p>
|
239 |
+
</span>
|
240 |
+
</label>
|
241 |
+
<div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-newtab mysticky-welcomebar-redirect" >
|
242 |
+
<input type="text" id="mysticky_welcomebar_redirect_rel" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_redirect_rel]" value="" placeholder="" disabled />
|
243 |
+
<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>
|
244 |
</div>
|
245 |
</div>
|
246 |
<!-- -->
|
946 |
'mysticky_welcomebar_aftersubmission' => 'dont_show_welcomebar',
|
947 |
'mysticky_welcomebar_redirect' => 'https://www.yourdomain.com',
|
948 |
'mysticky_welcomebar_redirect_newtab' => '',
|
949 |
+
'mysticky_welcomebar_redirect_rel' => '',
|
950 |
'mysticky_welcomebar_device_desktop' => 'desktop',
|
951 |
'mysticky_welcomebar_device_mobile' => 'mobile',
|
952 |
'mysticky_welcomebar_entry_effect' => 'slide-in',
|