initial commit

This commit is contained in:
2024-04-29 13:12:44 +05:45
commit 34887303c5
19300 changed files with 5268802 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
$config['plugin_screen'] = 'settings_page_ucp';
$config['icon_border'] = '2px solid #ff7900';
$config['icon_right'] = '40px';
$config['icon_bottom'] = '30px';
$config['icon_image'] = 'ucp.png';
$config['icon_padding'] = '6px';
$config['icon_size'] = '55px';
$config['menu_accent_color'] = '#ff7920';
$config['custom_css'] = '#wf-flyout .wpfssl-icon .wff-icon img { max-width: 66%; } #wf-flyout .wpfssl-icon .wff-icon { line-height: 57px; }';
$config['menu_items'] = array(
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'),
array('href' => 'https://wpforcessl.com/?ref=wff-ucp', 'label' => 'Fix all SSL problems &amp; monitor site in real-time', 'icon' => 'wp-ssl.png', 'class' => 'wpfssl-icon'),
array('href' => 'https://wp301redirects.com/?ref=wff-ucp&coupon=50off', 'label' => 'Fix 2 most common SEO issues on WordPress', 'icon' => '301-logo.png', 'class' => 'wp301-icon'),
array('href' => 'https://wpsticky.com/?ref=wff-ucp', 'target' => '_blank', 'label' => 'Make a menu sticky with WP Sticky', 'icon' => 'dashicons-admin-post'),
array('href' => 'https://wpreset.com/?ref=wff-ucp', 'target' => '_blank', 'label' => 'Need to start over? Get WP Reset', 'icon' => 'wp-reset.png'),
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'),
array('href' => 'https://wordpress.org/support/plugin/under-construction-page/', 'target' => '_blank', 'label' => 'Get Support', 'icon' => 'dashicons-sos'),
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,200 @@
/**
* Universal fly-out menu for WebFactory plugins
* (c) WebFactory Ltd, 2022
*/
#wf-flyout {
position: fixed;
z-index: 100049;
transition: all 0.3s ease-in-out;
right: 40px;
bottom: 40px;
opacity: 1;
}
#wff-overlay {
background: #000;
opacity: 0.4;
filter: alpha(opacity=40);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: none;
z-index: 100049;
}
#wf-flyout a:focus {
outline: none;
box-shadow: none;
}
#wf-flyout #wff-button {
display: block;
}
#wf-flyout #wff-image-wrapper {
border: 3px solid #000000;
border-radius: 50%;
padding: 0;
display: block;
overflow: hidden;
background: #ffffff;
box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
}
#wf-flyout #wff-button img {
width: 55px;
height: 55px;
display: block;
overflow: hidden;
padding: 2px;
background: #ffffff;
box-sizing: border-box;
}
#wf-flyout #wff-button:hover #wff-image-wrapper {
box-shadow: 0 3px 30px rgba(0, 0, 0, 0.25);
}
#wf-flyout:not(.opened) #wff-button:hover .wff-label {
opacity: 1;
margin-right: 0;
}
#wf-flyout .wff-label {
position: absolute;
display: block;
top: 50%;
right: calc(100% + 25px);
transform: translateY(-50%) scale(1);
-moz-transform: translateY(-50%);
-webkit-transform: translateY(-50%);
color: #fff;
background: #444 0 0 no-repeat padding-box;
font-size: 14px;
white-space: nowrap;
padding: 5px 10px;
height: auto !important;
line-height: initial;
transition: all 0.2s ease-out;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
opacity: 0;
margin-right: -50px;
}
#wf-flyout .wff-icon {
width: 40px;
height: 40px;
vertical-align: middle;
line-height: 60px;
text-align: center;
}
#wf-flyout .wff-icon img {
max-width: 80%;
filter: brightness(100);
}
#wf-flyout .wff-label.visible {
opacity: 1;
}
#wf-flyout .wff-menu-item {
position: absolute;
left: 10px;
width: 40px;
height: 40px;
opacity: 0;
visibility: hidden;
transform: scale(0);
border-radius: 50%;
box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
background: #0071a1;
text-align: center;
vertical-align: middle;
text-decoration: none;
transition-timing-function: ease-in-out;
}
#wf-flyout .wff-menu-item.accent {
background: #ca4a1f;
}
#wf-flyout.opened .wff-menu-item {
opacity: 1;
visibility: visible;
transform: scale(1);
}
#wf-flyout .wff-menu-item:hover {
box-shadow: 0 3px 30px rgba(0, 0, 0, 0.25);
}
#wf-flyout .wff-menu-item:hover .wff-label {
right: calc(100% + 55px);
}
#wf-flyout .wff-menu-item .wff-label {
right: calc(100% + 70px);
}
#wf-flyout .wff-menu-item .dashicons {
line-height: 41px;
font-size: 23px;
color: #fff;
padding: 0px 3px 0px 0;
}
.wff-menu-item-1 {
bottom: 75px;
transition: transform 0.2s 30ms, background-color 0.2s;
}
.wff-menu-item-2 {
bottom: 130px;
transition: transform 0.2s 70ms, background-color 0.2s;
}
.wff-menu-item-3 {
bottom: 185px;
transition: transform 0.2s 110ms, background-color 0.2s;
}
.wff-menu-item-4 {
bottom: 240px;
transition: transform 0.2s 150ms, background-color 0.2s;
}
.wff-menu-item-5 {
bottom: 295px;
transition: transform 0.2s 190ms, background-color 0.2s;
}
.wff-menu-item-6 {
bottom: 350px;
transition: transform 0.2s 230ms, background-color 0.2s;
}
.wff-menu-item-7 {
bottom: 405px;
transition: transform 0.2s 270ms, background-color 0.2s;
}
.wff-menu-item-8 {
bottom: 460px;
transition: transform 0.2s 310ms, background-color 0.2s;
}
.wff-menu-item-9 {
bottom: 515px;
transition: transform 0.2s 350ms, background-color 0.2s;
}
.wff-menu-item-10 {
bottom: 570px;
transition: transform 0.2s 390ms, background-color 0.2s;
}

View File

@ -0,0 +1,24 @@
/**
* Universal fly-out menu for WebFactory plugins
* (c) WebFactory Ltd, 2022
*/
jQuery(document).ready(function ($) {
$('#wff-button').on('click', function (e) {
e.preventDefault();
$('#wf-flyout').toggleClass('opened');
$('#wff-overlay').toggle();
return false;
}); // open/close menu
$('#wff-overlay').on('click', function (e) {
e.preventDefault();
$(this).hide();
$('#wf-flyout').removeClass('opened');
return false;
}); // click on overlay - hide menu
}); // jQuery ready

View File

@ -0,0 +1,166 @@
<?php
/**
* Universal fly-out menu for WebFactory plugins
* (c) WebFactory Ltd, 2022
*/
if (false == class_exists('wf_flyout')) {
class wf_flyout
{
var $ver = 1.0;
var $plugin_file = '';
var $plugin_slug = '';
var $config = array();
function __construct($plugin_file)
{
$this->plugin_file = $plugin_file;
$this->plugin_slug = basename(dirname($plugin_file));
$this->load_config();
if (!is_admin()) {
return;
} else {
add_action('admin_init', array($this, 'init'));
}
} // __construct
function load_config()
{
$config = array();
require_once plugin_dir_path($this->plugin_file) . 'wf-flyout/config.php';
$defaults = array(
'plugin_screen' => '',
'icon_border' => '#0000ff',
'icon_right' => '40px',
'icon_bottom' => '40px',
'icon_image' => '',
'icon_padding' => '2px',
'icon_size' => '55px',
'menu_accent_color' => '#ca4a1f',
'custom_css' => '',
'menu_items' => array(),
);
$config = array_merge($defaults, $config);
if (!is_array($config['plugin_screen'])) {
$config['plugin_screen'] = array($config['plugin_screen']);
}
$this->config = $config;
} // load_config
function is_plugin_screen()
{
$screen = get_current_screen();
if (in_array($screen->id, $this->config['plugin_screen'])) {
return true;
} else {
return false;
}
} // is_plugin_screen
function init()
{
add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
add_action('admin_head', array($this, 'admin_head'));
add_action('admin_footer', array($this, 'admin_footer'));
} // init
function admin_enqueue_scripts()
{
if (false === $this->is_plugin_screen()) {
return;
}
wp_enqueue_style('wf_flyout', plugin_dir_url($this->plugin_file) . 'wf-flyout/wf-flyout.css', array(), $this->ver);
wp_enqueue_script('wf_flyout', plugin_dir_url($this->plugin_file) . 'wf-flyout/wf-flyout.js', array(), $this->ver, true);;
} // admin_enqueue_scripts
function admin_head()
{
if (false === $this->is_plugin_screen()) {
return;
}
$out = '<style type="text/css">';
$out .= '#wf-flyout {
right: ' . sanitize_text_field($this->config['icon_right']) . ';
bottom: ' . sanitize_text_field($this->config['icon_bottom']) . ';
}';
$out .= '#wf-flyout #wff-image-wrapper {
border: ' . sanitize_text_field($this->config['icon_border']) . ';
}';
$out .= '#wf-flyout #wff-button img {
padding: ' . sanitize_text_field($this->config['icon_padding']) . ';
width: ' . sanitize_text_field($this->config['icon_size']) . ';
height: ' . sanitize_text_field($this->config['icon_size']) . ';
}';
$out .= '#wf-flyout .wff-menu-item.accent {
background: ' . sanitize_text_field($this->config['menu_accent_color']) . ';
}';
$out .= sanitize_text_field($this->config['custom_css']);
$out .= '</style>';
UCP::wp_kses_wf($out);
} // admin_head
function admin_footer()
{
if (false === $this->is_plugin_screen()) {
return;
}
$out = '';
$icons_url = plugin_dir_url($this->plugin_file) . 'wf-flyout/icons/';
$default_link_item = array('class' => '', 'href' => '#', 'target' => '_blank', 'label' => '', 'icon' => '', 'data' => '');
$out .= '<div id="wff-overlay"></div>';
$out .= '<div id="wf-flyout">';
$out .= '<a href="#" id="wff-button">';
$out .= '<span class="wff-label">Open Quick Links</span>';
$out .= '<span id="wff-image-wrapper">';
$out .= '<img src="' . esc_url($icons_url . $this->config['icon_image']) . '" alt="Open Quick Links" title="Open Quick Links">';
$out .= '</span>';
$out .= '</a>';
$out .= '<div id="wff-menu">';
$i = 0;
foreach (array_reverse($this->config['menu_items']) as $item) {
$i++;
$item = array_merge($default_link_item, $item);
if (!empty($item['icon']) && substr($item['icon'], 0, 9) != 'dashicons') {
$item['class'] .= ' wff-custom-icon';
$item['class'] = trim($item['class']);
}
$out .= '<a href="' . esc_url($item['href']) . '" class="wff-menu-item wff-menu-item-' . $i . ' ' . esc_attr($item['class']) . '" target="_blank">';
$out .= '<span class="wff-label visible">' . esc_html($item['label']) . '</span>';
if (substr($item['icon'], 0, 9) == 'dashicons') {
$out .= '<span class="dashicons ' . sanitize_text_field($item['icon']) . '"></span>';
} elseif (!empty($item['icon'])) {
$out .= '<span class="wff-icon"><img src="' . esc_url($icons_url . $item['icon']) . '"></span>';
}
$out .= '</a>';
} // foreach
$out .= '</div>'; // #wff-menu
$out .= '</div>'; // #wf-flyout
UCP::wp_kses_wf($out);
} // admin_footer
} // wf_flyout
} // if class exists