Under Construction - Version 3.86

Version Description

  • 2021/01/20
  • security fixes
  • added quick links button
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Under Construction
Version 3.86
Comparing to
See all releases

Code changes from version 3.85 to 3.86

readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: coming soon page, under construction mode, under construction, under const
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.6
7
- Stable tag: 3.85
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -25,7 +25,7 @@ Thanks to our partnership with <a href="https://wordpress.org/plugins/weglot/">W
25
 
26
  Let <a href="https://wordpress.org/plugins/security-ninja/">Security Ninja</a> take care of your site's security from day one! Run over 50 security tests with one click. Get a detailed report and automatically fix security issues. Download it from the official wp.org repo for free.
27
 
28
- Web accessibility is not an option in 2021! Making your site accessible to visitors with disabilities will save you from hefty fines and instantly grow your audience. That's why we've partnered with <a href="https://wordpress.org/plugins/accessibe/">accessiBe</a> - the fully automated AI service for web accessibility. Download their plugin from the official WP repository and make your site fully accessible in a few clicks.
29
 
30
  **Options**
31
 
@@ -138,6 +138,11 @@ Or if needed, upload manually;
138
 
139
  == Changelog ==
140
 
 
 
 
 
 
141
  = 3.85 =
142
  * 2021/01/13
143
  * removed Google+
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.6
7
+ Stable tag: 3.86
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
25
 
26
  Let <a href="https://wordpress.org/plugins/security-ninja/">Security Ninja</a> take care of your site's security from day one! Run over 50 security tests with one click. Get a detailed report and automatically fix security issues. Download it from the official wp.org repo for free.
27
 
28
+ Web accessibility is not an option in 2021! Making your site accessible to visitors with disabilities will save you from hefty fines and instantly grow your audience. That's why we've partnered with <a href="https://wordpress.org/plugins/accessibe/">accessiBe</a> - the fully automated AI service for web accessibility. Download their free plugin, connect to the service, and make your site fully accessible in a few clicks.
29
 
30
  **Options**
31
 
138
 
139
  == Changelog ==
140
 
141
+ = 3.86 =
142
+ * 2021/01/20
143
+ * security fixes
144
+ * added quick links button
145
+
146
  = 3.85 =
147
  * 2021/01/13
148
  * removed Google+
under-construction.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.
6
  Author: WebFactory Ltd
7
- Version: 3.85
8
  Requires at least: 4.0
9
  Requires PHP: 5.2
10
  Tested up to: 5.6
@@ -41,6 +41,8 @@ define('UCP_POINTERS_KEY', 'ucp_pointers');
41
  define('UCP_NOTICES_KEY', 'ucp_notices');
42
  define('UCP_SURVEYS_KEY', 'ucp_surveys');
43
 
 
 
44
 
45
  require_once UCP_PLUGIN_DIR . 'ucp-license.php';
46
 
@@ -527,52 +529,52 @@ class UCP {
527
  $out = '';
528
 
529
  if (!empty($options['social_facebook'])) {
530
- $out .= '<a title="Facebook" href="' . $options['social_facebook'] . '" target="_blank"><i class="fa fa-facebook-square fa-3x"></i></a>';
531
  }
532
  if (!empty($options['social_twitter'])) {
533
- $out .= '<a title="Twitter" href="' . $options['social_twitter'] . '" target="_blank"><i class="fa fa-twitter-square fa-3x"></i></a>';
534
  }
535
  if (!empty($options['social_linkedin'])) {
536
- $out .= '<a title="LinkedIn" href="' . $options['social_linkedin'] . '" target="_blank"><i class="fa fa-linkedin-square fa-3x"></i></a>';
537
  }
538
  if (!empty($options['social_youtube'])) {
539
- $out .= '<a title="YouTube" href="' . $options['social_youtube'] . '" target="_blank"><i class="fa fa-youtube-square fa-3x"></i></a>';
540
  }
541
  if (!empty($options['social_vimeo'])) {
542
- $out .= '<a title="Vimeo" href="' . $options['social_vimeo'] . '" target="_blank"><i class="fa fa-vimeo-square fa-3x"></i></a>';
543
  }
544
  if (!empty($options['social_pinterest'])) {
545
- $out .= '<a title="Pinterest" href="' . $options['social_pinterest'] . '" target="_blank"><i class="fa fa-pinterest-square fa-3x"></i></a>';
546
  }
547
  if (!empty($options['social_dribbble'])) {
548
- $out .= '<a title="Dribbble" href="' . $options['social_dribbble'] . '" target="_blank"><i class="fa fa-dribbble fa-3x"></i></a>';
549
  }
550
  if (!empty($options['social_behance'])) {
551
- $out .= '<a title="Behance" href="' . $options['social_behance'] . '" target="_blank"><i class="fa fa-behance-square fa-3x"></i></a>';
552
  }
553
  if (!empty($options['social_instagram'])) {
554
- $out .= '<a title="Instagram" href="' . $options['social_instagram'] . '" target="_blank"><i class="fa fa-instagram fa-3x"></i></a>';
555
  }
556
  if (!empty($options['social_tumblr'])) {
557
- $out .= '<a title="Tumblr" href="' . $options['social_tumblr'] . '" target="_blank"><i class="fa fa-tumblr-square fa-3x"></i></a>';
558
  }
559
  if (!empty($options['social_vk'])) {
560
- $out .= '<a title="VK" href="' . $options['social_vk'] . '" target="_blank"><i class="fa fa-vk fa-3x"></i></a>';
561
  }
562
  if (!empty($options['social_skype'])) {
563
- $out .= '<a title="Skype" href="skype:' . $options['social_skype'] . '?chat"><i class="fa fa-skype fa-3x"></i></a>';
564
  }
565
  if (!empty($options['social_whatsapp'])) {
566
- $out .= '<a title="WhatsApp" href="https://api.whatsapp.com/send?phone=' . str_replace('+', '', $options['social_whatsapp']) . '"><i class="fa fa-whatsapp fa-3x"></i></a>';
567
  }
568
  if (!empty($options['social_telegram'])) {
569
- $out .= '<a title="Telegram" href="' . $options['social_telegram'] . '"><i class="fa fa-telegram fa-3x"></i></a>';
570
  }
571
  if (!empty($options['social_email'])) {
572
- $out .= '<a title="Email" href="mailto:' . self::encode_email($options['social_email']) . '"><i class="fa fa-envelope fa-3x"></i></a>';
573
  }
574
  if (!empty($options['social_phone'])) {
575
- $out .= '<a title="Phone" href="tel:' . $options['social_phone'] . '"><i class="fa fa-phone-square fa-3x"></i></a>';
576
  }
577
 
578
  return $out;
@@ -1182,9 +1184,11 @@ class UCP {
1182
  switch ($key) {
1183
  case 'title':
1184
  case 'description':
 
 
1185
  case 'heading1':
1186
  case 'content':
1187
- $options[$key] = trim($value);
1188
  break;
1189
  case 'custom_css':
1190
  case 'social_facebook':
@@ -1466,7 +1470,7 @@ class UCP {
1466
  echo '<div class="toggle-wrapper">
1467
  <input type="checkbox" id="accessibe" type="checkbox" value="1" class="skip-save open-accessibe-upsell">
1468
  <label for="accessibe" class="toggle"><span class="toggle_handler"></span></label></div>';
1469
- echo '<p>Your under construction page is currently not fully accessible for over 20% of visitors with dissabilities.<br> Make your site accessible from day one by installing the <a href="#" class="open-accessibe-upsell">accessiBe plugin.</a></p>';
1470
  echo '</td>';
1471
  echo '</tr>';
1472
  } // accessibe not active
@@ -1812,7 +1816,7 @@ class UCP {
1812
  $themes = self::get_themes();
1813
 
1814
  if (!is_plugin_active('accessibe/accessiebe.php')) {
1815
- echo '<div class="ucp-notice-small"><p><b>Make your website accessible to everyone</b> - Having an accessible website is a must in 2021. It will not only save you from hefty fines but grow your audience too. Make your site accessible from day one! <a href="#" class="open-accessibe-upsell">Install the accessiBe plugin</a> and make your site accessible in a few clicks.';
1816
  echo '</p></div>';
1817
  }
1818
 
@@ -2156,9 +2160,10 @@ class UCP {
2156
  echo '<div id="accessibe-upsell-dialog" style="display: none;" title="accessiBe"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
2157
  echo '<div style="padding: 20px; font-size: 15px;">';
2158
  echo '<ul class="ucp-list">';
2159
- echo '<li>Fully automated WordPress accessibility plugin</li>';
 
2160
  echo '<li>Protect your site from lawsuits and increase the audience</li>';
2161
- echo '<li>Simple 5-minute set-up. No coding required</li>';
2162
  echo '<li>Compatible with all WordPress themes and plugins</li>';
2163
  echo '<li>AI-powered</li>';
2164
  echo '<li>7-day free trial available</li>';
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.
6
  Author: WebFactory Ltd
7
+ Version: 3.86
8
  Requires at least: 4.0
9
  Requires PHP: 5.2
10
  Tested up to: 5.6
41
  define('UCP_NOTICES_KEY', 'ucp_notices');
42
  define('UCP_SURVEYS_KEY', 'ucp_surveys');
43
 
44
+ require_once 'wf-flyout/wf-flyout.php';
45
+ new wf_flyout(__FILE__);
46
 
47
  require_once UCP_PLUGIN_DIR . 'ucp-license.php';
48
 
529
  $out = '';
530
 
531
  if (!empty($options['social_facebook'])) {
532
+ $out .= '<a title="Facebook" href="' . esc_attr($options['social_facebook']) . '" target="_blank"><i class="fa fa-facebook-square fa-3x"></i></a>';
533
  }
534
  if (!empty($options['social_twitter'])) {
535
+ $out .= '<a title="Twitter" href="' . esc_attr($options['social_twitter']) . '" target="_blank"><i class="fa fa-twitter-square fa-3x"></i></a>';
536
  }
537
  if (!empty($options['social_linkedin'])) {
538
+ $out .= '<a title="LinkedIn" href="' . esc_attr($options['social_linkedin']) . '" target="_blank"><i class="fa fa-linkedin-square fa-3x"></i></a>';
539
  }
540
  if (!empty($options['social_youtube'])) {
541
+ $out .= '<a title="YouTube" href="' . esc_attr($options['social_youtube']) . '" target="_blank"><i class="fa fa-youtube-square fa-3x"></i></a>';
542
  }
543
  if (!empty($options['social_vimeo'])) {
544
+ $out .= '<a title="Vimeo" href="' . esc_attr($options['social_vimeo']) . '" target="_blank"><i class="fa fa-vimeo-square fa-3x"></i></a>';
545
  }
546
  if (!empty($options['social_pinterest'])) {
547
+ $out .= '<a title="Pinterest" href="' . esc_attr($options['social_pinterest']) . '" target="_blank"><i class="fa fa-pinterest-square fa-3x"></i></a>';
548
  }
549
  if (!empty($options['social_dribbble'])) {
550
+ $out .= '<a title="Dribbble" href="' . esc_attr($options['social_dribbble']) . '" target="_blank"><i class="fa fa-dribbble fa-3x"></i></a>';
551
  }
552
  if (!empty($options['social_behance'])) {
553
+ $out .= '<a title="Behance" href="' . esc_attr($options['social_behance']) . '" target="_blank"><i class="fa fa-behance-square fa-3x"></i></a>';
554
  }
555
  if (!empty($options['social_instagram'])) {
556
+ $out .= '<a title="Instagram" href="' . esc_attr($options['social_instagram']) . '" target="_blank"><i class="fa fa-instagram fa-3x"></i></a>';
557
  }
558
  if (!empty($options['social_tumblr'])) {
559
+ $out .= '<a title="Tumblr" href="' . esc_attr($options['social_tumblr']) . '" target="_blank"><i class="fa fa-tumblr-square fa-3x"></i></a>';
560
  }
561
  if (!empty($options['social_vk'])) {
562
+ $out .= '<a title="VK" href="' . esc_attr($options['social_vk']) . '" target="_blank"><i class="fa fa-vk fa-3x"></i></a>';
563
  }
564
  if (!empty($options['social_skype'])) {
565
+ $out .= '<a title="Skype" href="skype:' . esc_attr($options['social_skype']) . '?chat"><i class="fa fa-skype fa-3x"></i></a>';
566
  }
567
  if (!empty($options['social_whatsapp'])) {
568
+ $out .= '<a title="WhatsApp" href="https://api.whatsapp.com/send?phone=' . str_replace('+', '', esc_attr($options['social_whatsapp'])) . '"><i class="fa fa-whatsapp fa-3x"></i></a>';
569
  }
570
  if (!empty($options['social_telegram'])) {
571
+ $out .= '<a title="Telegram" href="' . esc_attr($options['social_telegram']) . '"><i class="fa fa-telegram fa-3x"></i></a>';
572
  }
573
  if (!empty($options['social_email'])) {
574
+ $out .= '<a title="Email" href="mailto:' . esc_attr(self::encode_email($options['social_email'])) . '"><i class="fa fa-envelope fa-3x"></i></a>';
575
  }
576
  if (!empty($options['social_phone'])) {
577
+ $out .= '<a title="Phone" href="tel:' . esc_attr($options['social_phone']) . '"><i class="fa fa-phone-square fa-3x"></i></a>';
578
  }
579
 
580
  return $out;
1184
  switch ($key) {
1185
  case 'title':
1186
  case 'description':
1187
+ $options[$key] = trim(strip_tags($value));
1188
+ break;
1189
  case 'heading1':
1190
  case 'content':
1191
+ $options[$key] = wp_kses(trim($value), wp_kses_allowed_html('post'));
1192
  break;
1193
  case 'custom_css':
1194
  case 'social_facebook':
1470
  echo '<div class="toggle-wrapper">
1471
  <input type="checkbox" id="accessibe" type="checkbox" value="1" class="skip-save open-accessibe-upsell">
1472
  <label for="accessibe" class="toggle"><span class="toggle_handler"></span></label></div>';
1473
+ echo '<p>Over 20% of people that use the Internet have a disability. They need help accessing sites that the rest of us take for granted. Your under construction page is currently not fully accessible to them. Make your site accessible from day one to everybody by installing the <a href="#" class="open-accessibe-upsell">accessiBe plugin</a> powered by AI-enhanced accessiBe service. It enhances accessibility &amp; usability of any site.</p>';
1474
  echo '</td>';
1475
  echo '</tr>';
1476
  } // accessibe not active
1816
  $themes = self::get_themes();
1817
 
1818
  if (!is_plugin_active('accessibe/accessiebe.php')) {
1819
+ echo '<div class="ucp-notice-small"><p><b>Make your website accessible to users with disabilities</b> - Having an accessible website is a must in 2021. It will not only save you from hefty fines but grow your audience too because over 20% of users have a disability. Make your site accessible and user-friendly from day one by using the <a href="#" class="open-accessibe-upsell">accessiBe service &amp; plugin</a>.';
1820
  echo '</p></div>';
1821
  }
1822
 
2160
  echo '<div id="accessibe-upsell-dialog" style="display: none;" title="accessiBe"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
2161
  echo '<div style="padding: 20px; font-size: 15px;">';
2162
  echo '<ul class="ucp-list">';
2163
+ echo '<li>Make your site user-friendly for people with disabilities</li>';
2164
+ echo '<li>Fully automated WordPress accessibility service</li>';
2165
  echo '<li>Protect your site from lawsuits and increase the audience</li>';
2166
+ echo '<li>The free accessiBe plugin sets up in 5 minutes. No coding required</li>';
2167
  echo '<li>Compatible with all WordPress themes and plugins</li>';
2168
  echo '<li>AI-powered</li>';
2169
  echo '<li>7-day free trial available</li>';
wf-flyout/config.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $config['plugin_screen'] = 'settings_page_ucp';
3
+ $config['icon_border'] = '2px solid #ff7900';
4
+ $config['icon_right'] = '35px';
5
+ $config['icon_bottom'] = '35px';
6
+ $config['icon_image'] = 'ucp.png';
7
+ $config['icon_padding'] = '6px';
8
+ $config['icon_size'] = '55px';
9
+ $config['menu_accent_color'] = '#ff7920';
10
+ $config['custom_css'] = '';
11
+
12
+ $config['menu_items'] = array(
13
+ array('href' => 'https://underconstructionpage.com/?ref=wff-ucp&coupon=welcome', 'target' => '_blank', 'label' => 'Get UnderConstrucionPage PRO with 20% OFF', 'icon' => 'dashicons-star-filled', 'class' => 'accent'),
14
+ array('href' => 'https://wpsticky.com/?ref=wff-ucp', 'target' => '_blank', 'label' => 'Make a menu sticky with WP Sticky', 'icon' => 'dashicons-admin-post'),
15
+ array('href' => 'https://wpreset.com/?ref=wff-ucp', 'target' => '_blank', 'label' => 'Need to start over? Get WP Reset', 'icon' => 'wp-reset.png'),
16
+ array('href' => 'https://wordpress.org/support/plugin/under-construction-page/reviews/?filter=5#new-post', 'target' => '_blank', 'label' => 'Rate the Plugin', 'icon' => 'dashicons-thumbs-up'),
17
+ array('href' => 'https://wordpress.org/support/plugin/under-construction-page/', 'target' => '_blank', 'label' => 'Get Support', 'icon' => 'dashicons-sos'),
18
+ );
wf-flyout/icons/ucp.png ADDED
Binary file
wf-flyout/icons/wp-reset.png ADDED
Binary file
wf-flyout/wf-flyout.css ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Universal fly-out menu for WebFactory plugins
3
+ * (c) WebFactory Ltd, 2021
4
+ */
5
+
6
+ #wf-flyout {
7
+ position: fixed;
8
+ z-index: 100049;
9
+ transition: all 0.3s ease-in-out;
10
+ right: 40px;
11
+ bottom: 40px;
12
+ opacity: 1;
13
+ }
14
+
15
+ #wff-overlay {
16
+ background: #000;
17
+ opacity: 0.4;
18
+ filter: alpha(opacity=40);
19
+ position: fixed;
20
+ top: 0;
21
+ right: 0;
22
+ bottom: 0;
23
+ left: 0;
24
+ display: none;
25
+ z-index: 100049;
26
+ }
27
+
28
+ #wf-flyout a:focus {
29
+ outline: none;
30
+ box-shadow: none;
31
+ }
32
+
33
+ #wf-flyout #wff-button {
34
+ display: block;
35
+ }
36
+
37
+ #wf-flyout #wff-image-wrapper {
38
+ border: 3px solid #000000;
39
+ border-radius: 50%;
40
+ padding: 0;
41
+ display: block;
42
+ overflow: hidden;
43
+ background: #ffffff;
44
+ box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
45
+ }
46
+
47
+ #wf-flyout #wff-button img {
48
+ width: 55px;
49
+ height: 55px;
50
+ display: block;
51
+ overflow: hidden;
52
+ padding: 2px;
53
+ background: #ffffff;
54
+ box-sizing: border-box;
55
+ }
56
+
57
+ #wf-flyout #wff-button:hover #wff-image-wrapper {
58
+ box-shadow: 0 3px 30px rgba(0, 0, 0, 0.25);
59
+ }
60
+
61
+ #wf-flyout:not(.opened) #wff-button:hover .wff-label {
62
+ opacity: 1;
63
+ margin-right: 0;
64
+ }
65
+
66
+ #wf-flyout .wff-label {
67
+ position: absolute;
68
+ display: block;
69
+ top: 50%;
70
+ right: calc(100% + 25px);
71
+ transform: translateY(-50%) scale(1);
72
+ -moz-transform: translateY(-50%);
73
+ -webkit-transform: translateY(-50%);
74
+ color: #fff;
75
+ background: #444 0 0 no-repeat padding-box;
76
+ font-size: 14px;
77
+ white-space: nowrap;
78
+ padding: 5px 10px;
79
+ height: auto !important;
80
+ line-height: initial;
81
+ transition: all 0.2s ease-out;
82
+ border-radius: 3px;
83
+ -moz-border-radius: 3px;
84
+ -webkit-border-radius: 3px;
85
+ opacity: 0;
86
+ margin-right: -50px;
87
+ }
88
+
89
+ #wf-flyout .wff-icon {
90
+ width: 40px;
91
+ height: 40px;
92
+ vertical-align: middle;
93
+ line-height: 60px;
94
+ text-align: center;
95
+ }
96
+
97
+ #wf-flyout .wff-icon img {
98
+ max-width: 80%;
99
+ filter: brightness(100);
100
+ }
101
+
102
+ #wf-flyout .wff-label.visible {
103
+ opacity: 1;
104
+ }
105
+
106
+ #wf-flyout .wff-menu-item {
107
+ position: absolute;
108
+ left: 10px;
109
+ width: 40px;
110
+ height: 40px;
111
+ opacity: 0;
112
+ visibility: hidden;
113
+ transform: scale(0);
114
+ border-radius: 50%;
115
+ box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
116
+ background: #0071a1;
117
+ text-align: center;
118
+ vertical-align: middle;
119
+ text-decoration: none;
120
+ transition-timing-function: ease-in-out;
121
+ }
122
+
123
+ #wf-flyout .wff-menu-item.accent {
124
+ background: #ca4a1f;
125
+ }
126
+
127
+ #wf-flyout.opened .wff-menu-item {
128
+ opacity: 1;
129
+ visibility: visible;
130
+ transform: scale(1);
131
+ }
132
+
133
+ #wf-flyout .wff-menu-item:hover {
134
+ box-shadow: 0 3px 30px rgba(0, 0, 0, 0.25);
135
+ }
136
+
137
+ #wf-flyout .wff-menu-item:hover .wff-label {
138
+ right: calc(100% + 55px);
139
+ }
140
+
141
+ #wf-flyout .wff-menu-item .wff-label {
142
+ right: calc(100% + 70px);
143
+ }
144
+
145
+ #wf-flyout .wff-menu-item .dashicons {
146
+ line-height: 41px;
147
+ font-size: 23px;
148
+ color: #fff;
149
+ padding: 0px 3px 0px 0;
150
+ }
151
+
152
+ .wff-menu-item-1 {
153
+ bottom: 75px;
154
+ transition: transform 0.2s 30ms, background-color 0.2s;
155
+ }
156
+
157
+ .wff-menu-item-2 {
158
+ bottom: 130px;
159
+ transition: transform 0.2s 70ms, background-color 0.2s;
160
+ }
161
+
162
+ .wff-menu-item-3 {
163
+ bottom: 185px;
164
+ transition: transform 0.2s 110ms, background-color 0.2s;
165
+ }
166
+
167
+ .wff-menu-item-4 {
168
+ bottom: 240px;
169
+ transition: transform 0.2s 150ms, background-color 0.2s;
170
+ }
171
+
172
+ .wff-menu-item-5 {
173
+ bottom: 295px;
174
+ transition: transform 0.2s 190ms, background-color 0.2s;
175
+ }
176
+
177
+ .wff-menu-item-6 {
178
+ bottom: 350px;
179
+ transition: transform 0.2s 230ms, background-color 0.2s;
180
+ }
181
+
182
+ .wff-menu-item-7 {
183
+ bottom: 405px;
184
+ transition: transform 0.2s 270ms, background-color 0.2s;
185
+ }
186
+
187
+ .wff-menu-item-8 {
188
+ bottom: 460px;
189
+ transition: transform 0.2s 310ms, background-color 0.2s;
190
+ }
191
+
192
+ .wff-menu-item-9 {
193
+ bottom: 515px;
194
+ transition: transform 0.2s 350ms, background-color 0.2s;
195
+ }
196
+
197
+ .wff-menu-item-10 {
198
+ bottom: 570px;
199
+ transition: transform 0.2s 390ms, background-color 0.2s;
200
+ }
wf-flyout/wf-flyout.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Universal fly-out menu for WebFactory plugins
3
+ * (c) WebFactory Ltd, 2021
4
+ */
5
+
6
+ jQuery(document).ready(function ($) {
7
+ $('#wff-button').on('click', function (e) {
8
+ e.preventDefault();
9
+
10
+ $('#wf-flyout').toggleClass('opened');
11
+ $('#wff-overlay').toggle();
12
+
13
+ return false;
14
+ }); // open/close menu
15
+
16
+ $('#wff-overlay').on('click', function (e) {
17
+ e.preventDefault();
18
+
19
+ $(this).hide();
20
+ $('#wf-flyout').removeClass('opened');
21
+
22
+ return false;
23
+ }); // click on overlay - hide menu
24
+ }); // jQuery ready
wf-flyout/wf-flyout.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Universal fly-out menu for WebFactory plugins
5
+ * (c) WebFactory Ltd, 2021
6
+ */
7
+
8
+
9
+ if (false == class_exists('wf_flyout')) {
10
+ class wf_flyout
11
+ {
12
+ var $ver = 1.0;
13
+ var $plugin_file = '';
14
+ var $plugin_slug = '';
15
+ var $config = array();
16
+
17
+
18
+ function __construct($plugin_file)
19
+ {
20
+ $this->plugin_file = $plugin_file;
21
+ $this->plugin_slug = basename(dirname($plugin_file));
22
+ $this->load_config();
23
+
24
+ if (!is_admin()) {
25
+ return;
26
+ } else {
27
+ add_action('admin_init', array($this, 'init'));
28
+ }
29
+ } // __construct
30
+
31
+
32
+ function load_config()
33
+ {
34
+ $config = array();
35
+ require_once plugin_dir_path($this->plugin_file) . 'wf-flyout/config.php';
36
+
37
+ $defaults = array(
38
+ 'plugin_screen' => '',
39
+ 'icon_border' => '#0000ff',
40
+ 'icon_right' => '40px',
41
+ 'icon_bottom' => '40px',
42
+ 'icon_image' => '',
43
+ 'icon_padding' => '2px',
44
+ 'icon_size' => '55px',
45
+ 'menu_accent_color' => '#ca4a1f',
46
+ 'custom_css' => '',
47
+ 'menu_items' => array(),
48
+ );
49
+
50
+ $config = array_merge($defaults, $config);
51
+ if (!is_array($config['plugin_screen'])) {
52
+ $config['plugin_screen'] = array($config['plugin_screen']);
53
+ }
54
+
55
+ $this->config = $config;
56
+ } // load_config
57
+
58
+
59
+ function is_plugin_screen()
60
+ {
61
+ $screen = get_current_screen();
62
+
63
+ if (in_array($screen->id, $this->config['plugin_screen'])) {
64
+ return true;
65
+ } else {
66
+ return false;
67
+ }
68
+ } // is_plugin_screen
69
+
70
+
71
+ function init()
72
+ {
73
+ add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
74
+ add_action('admin_head', array($this, 'admin_head'));
75
+ add_action('admin_footer', array($this, 'admin_footer'));
76
+ } // init
77
+
78
+
79
+ function admin_enqueue_scripts()
80
+ {
81
+ if (false === $this->is_plugin_screen()) {
82
+ return;
83
+ }
84
+
85
+ wp_enqueue_style('wf_flyout', plugin_dir_url($this->plugin_file) . 'wf-flyout/wf-flyout.css', array(), $this->ver);
86
+ wp_enqueue_script('wf_flyout', plugin_dir_url($this->plugin_file) . 'wf-flyout/wf-flyout.js', array(), $this->ver, true);;
87
+ } // admin_enqueue_scripts
88
+
89
+
90
+ function admin_head()
91
+ {
92
+ if (false === $this->is_plugin_screen()) {
93
+ return;
94
+ }
95
+
96
+ $out = '<style type="text/css">';
97
+ $out .= '#wf-flyout {
98
+ right: ' . $this->config['icon_right'] . ';
99
+ bottom: ' . $this->config['icon_bottom'] . ';
100
+ }';
101
+ $out .= '#wf-flyout #wff-image-wrapper {
102
+ border: ' . $this->config['icon_border'] . ';
103
+ }';
104
+ $out .= '#wf-flyout #wff-button img {
105
+ padding: ' . $this->config['icon_padding'] . ';
106
+ width: ' . $this->config['icon_size'] . ';
107
+ height: ' . $this->config['icon_size'] . ';
108
+ }';
109
+ $out .= '#wf-flyout .wff-menu-item.accent {
110
+ background: ' . $this->config['menu_accent_color'] . ';
111
+ }';
112
+ $out .= $this->config['custom_css'];
113
+ $out .= '</style>';
114
+
115
+ echo $out;
116
+ } // admin_head
117
+
118
+
119
+ function admin_footer()
120
+ {
121
+ if (false === $this->is_plugin_screen()) {
122
+ return;
123
+ }
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
+
131
+ $out .= '<div id="wf-flyout">';
132
+
133
+ $out .= '<a href="#" id="wff-button">';
134
+ $out .= '<span class="wff-label">Open Quick Links</span>';
135
+ $out .= '<span id="wff-image-wrapper">';
136
+ $out .= '<img src="' . $icons_url . $this->config['icon_image'] . '" alt="Open Quick Links" title="Open Quick Links">';
137
+ $out .= '</span>';
138
+ $out .= '</a>';
139
+
140
+ $out .= '<div id="wff-menu">';
141
+ $i = 0;
142
+ foreach (array_reverse($this->config['menu_items']) as $item) {
143
+ $i++;
144
+ $item = array_merge($default_link_item, $item);
145
+
146
+ if (!empty($item['icon']) && substr($item['icon'], 0, 9) != 'dashicons') {
147
+ $item['class'] .= ' wff-custom-icon';
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>';
155
+ } elseif (!empty($item['icon'])) {
156
+ $out .= '<span class="wff-icon"><img src="' . $icons_url . $item['icon'] . '"></span>';
157
+ }
158
+ $out .= '</a>';
159
+ } // foreach
160
+ $out .= '</div>'; // #wff-menu
161
+
162
+ $out .= '</div>'; // #wf-flyout
163
+
164
+ echo $out;
165
+ } // admin_footer
166
+ } // wf_flyout
167
+ } // if class exists