fix
@@ -52,6 +52,9 @@ Header set Expires "Mon, 29 Oct 1923 20:30:00 GMT"
|
||||
# END WClearfyCache
|
||||
|
||||
# BEGIN WordPress
|
||||
# Директивы (строки) между `BEGIN WordPress` и `END WordPress`
|
||||
# созданы автоматически и подлежат изменению только через фильтры WordPress.
|
||||
# Сделанные вручную изменения между этими маркерами будут перезаписаны.
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
@@ -61,4 +64,5 @@ RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.php [L]
|
||||
</IfModule>
|
||||
|
||||
# END WordPress
|
||||
@@ -119,3 +119,51 @@
|
||||
-------------------------------
|
||||
01-03-2026 01:10:55 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:01:44 [dostavka-vodi-krim.ru][info] Parent plugin start installation!
|
||||
19-04-2026 15:01:44 [dostavka-vodi-krim.ru][info] Plugin installation: try create plugin tables.
|
||||
-DB Version: 2
|
||||
-Plugin Version in DB: 1.6.9
|
||||
-Current Plugin Version: 2.0.3
|
||||
19-04-2026 15:01:44 [dostavka-vodi-krim.ru][info] Parent plugin installation complete!
|
||||
-------------------------------
|
||||
19-04-2026 15:01:45 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:01:51 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:01:55 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:02:02 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:03:03 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:03:05 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:03:06 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:06:00 [dostavka-vodi-krim.ru][info] Parent plugin start installation!
|
||||
19-04-2026 15:06:00 [dostavka-vodi-krim.ru][info] Plugin installation: try create plugin tables.
|
||||
-DB Version: 2
|
||||
-Plugin Version in DB: 1.6.9
|
||||
-Current Plugin Version: 2.0.4
|
||||
19-04-2026 15:06:00 [dostavka-vodi-krim.ru][info] Parent plugin installation complete!
|
||||
-------------------------------
|
||||
19-04-2026 15:06:01 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:06:19 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:06:21 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:06:25 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:35:59 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:36:01 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:36:02 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:36:03 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:37:21 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
19-04-2026 15:37:23 [dostavka-vodi-krim.ru][info] Plugin migration to 1.8.2 was successful!
|
||||
-------------------------------
|
||||
@@ -1,8 +0,0 @@
|
||||
##### Version 2.4.1 (2025-12-16)
|
||||
|
||||
- Enhanced security
|
||||
|
||||
#### Version 2.4.0 (2025-10-20)
|
||||
|
||||
- Clearfy was acquired by [Super Page Cache](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
|
||||
- We’re retiring Clearfy in favor in favor of the more powerful Super Page Cache plugin, so ensure users have access to the best performance optimization features, improved compatibility, and a superior user experience.
|
||||
@@ -1,130 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Activator for the clearfy
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 09.09.2017, Webcraftic
|
||||
* @see Factory480_Activator
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_Activation extends Wbcr_Factory480_Activator {
|
||||
|
||||
/**
|
||||
* Runs activation actions.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function activate()
|
||||
{
|
||||
if( !function_exists('is_plugin_active') ) {
|
||||
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
||||
}
|
||||
// Deactivate components for code minification, if alternative plugins are installed
|
||||
// -------------
|
||||
$minify_js_plugins = [
|
||||
'autoptimize/autoptimize.php',
|
||||
'fast-velocity-minify/fvm.php',
|
||||
'js-css-script-optimizer/js-css-script-optimizer.php',
|
||||
'merge-minify-refresh/merge-minify-refresh.php',
|
||||
'wp-super-minify/wp-super-minify.php'
|
||||
];
|
||||
|
||||
$is_activate_minify_js = true;
|
||||
foreach($minify_js_plugins as $m_plugin) {
|
||||
|
||||
if( is_plugin_active($m_plugin) ) {
|
||||
$is_activate_minify_js = false;
|
||||
}
|
||||
}
|
||||
|
||||
if( !$is_activate_minify_js ) {
|
||||
WCL_Plugin::app()->deactivateComponent('minify_and_combine');
|
||||
WCL_Plugin::app()->deactivateComponent('html_minify');
|
||||
}
|
||||
|
||||
// -------------
|
||||
// Deactivate yoast component features if it is not activated
|
||||
// -------------
|
||||
|
||||
if( !defined('WPSEO_VERSION') ) {
|
||||
WCL_Plugin::app()->deactivateComponent('yoast_seo');
|
||||
}
|
||||
|
||||
// Deactivate cyrlitera component for all languages except selected
|
||||
if( !in_array(get_locale(), ['ru_RU', 'bel', 'kk', 'uk', 'bg', 'bg_BG', 'ka_GE']) ) {
|
||||
WCL_Plugin::app()->deactivateComponent('cyrlitera');
|
||||
}
|
||||
|
||||
if( !WCL_Plugin::app()->getPopulateOption('deactivated_unused_modules') ) {
|
||||
if( !WCL_Plugin::app()->getPopulateOption('disable_comments') || "enable_comments" == WCL_Plugin::app()->getPopulateOption('disable_comments') ) {
|
||||
WCL_Plugin::app()->deactivateComponent('comments_tools');
|
||||
}
|
||||
|
||||
$plugin_updates = !WCL_Plugin::app()->getPopulateOption('plugin_updates') || "enable_plugin_monual_updates" == WCL_Plugin::app()->getPopulateOption('plugin_updates');
|
||||
$theme_updates = !WCL_Plugin::app()->getPopulateOption('theme_updates') || "enable_theme_monual_updates" == WCL_Plugin::app()->getPopulateOption('theme_updates');
|
||||
|
||||
if( $plugin_updates || $theme_updates ) {
|
||||
WCL_Plugin::app()->deactivateComponent('updates_manager');
|
||||
}
|
||||
WCL_Plugin::app()->updatePopulateOption('deactivated_unused_modules', 1);
|
||||
}
|
||||
|
||||
if( !get_option($this->plugin->getOptionName('plugin_activated'), false) ) {
|
||||
//WCL_Plugin::app()->updatePopulateOption('start_first_google_page_speed_audit', 1);
|
||||
//update_option($this->plugin->getOptionName('setup_wizard'), 1);
|
||||
}
|
||||
|
||||
/*if( !wp_next_scheduled('wclearfy/google_page_speed_audit') ) {
|
||||
wp_schedule_event(time(), 'daily', 'wclearfy/google_page_speed_audit');
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @since 1.4.1
|
||||
*/
|
||||
do_action('wbcr/clearfy/activated');
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs activation actions.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function deactivate()
|
||||
{
|
||||
|
||||
if( wp_next_scheduled('wclearfy/google_page_speed_audit') ) {
|
||||
wp_clear_scheduled_hook('wclearfy/google_page_speed_audit');
|
||||
}
|
||||
|
||||
if( wp_next_scheduled('wclearfy/google_page_speed_audit') ) {
|
||||
wp_clear_scheduled_hook('wclearfy/google_page_speed_audit');
|
||||
}
|
||||
|
||||
/*$dependent = 'clearfy_package/clearfy-package.php';
|
||||
|
||||
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
||||
if ( is_plugin_active( $dependent ) ) {
|
||||
add_action( 'update_option_active_plugins', [ $this, 'deactivateDependent' ] );
|
||||
}
|
||||
add_action( 'update_site_option_active_sitewide_plugins', [ $this, 'deactivateDependent' ] );*/
|
||||
|
||||
/**
|
||||
* @since 1.4.1
|
||||
*/
|
||||
do_action('wbcr/clearfy/deactivated');
|
||||
}
|
||||
|
||||
/**
|
||||
* Deactivate clearfy package
|
||||
*/
|
||||
/*public function deactivateDependent() {
|
||||
$package_plugin = WCL_Package::instance();
|
||||
$package_plugin->deactive();
|
||||
}*/
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax plugin configuration
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 2017 Webraftic Ltd
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function wbcr_clearfy_configurate_plugin()
|
||||
{
|
||||
check_ajax_referer('wbcr_clearfy_ajax_quick_start_nonce', 'security');
|
||||
|
||||
if( !WCL_Plugin::app()->currentUserCan() ) {
|
||||
wp_send_json(array('error' => __('You don\'t have enough capability to edit this information.', 'clearfy')));
|
||||
}
|
||||
|
||||
$mode_name = WCL_Plugin::app()->request->post('mode', false, true);
|
||||
$flush_redirect = WCL_Plugin::app()->request->post('flush_redirect', false, true);
|
||||
|
||||
if( empty($mode_name) ) {
|
||||
wp_send_json(array('error' => __('Undefinded mode.', 'clearfy')));
|
||||
}
|
||||
|
||||
if( $mode_name != 'reset' ) {
|
||||
$group = WCL_Group::getInstance($mode_name);
|
||||
$mode_options = $group->getOptions();
|
||||
|
||||
if( empty($mode_options) ) {
|
||||
wp_send_json(array('error' => __('Undefinded mode.', 'clearfy')));
|
||||
}
|
||||
|
||||
foreach($mode_options as $option) {
|
||||
$set_value = 1;
|
||||
|
||||
$option_name = $option->getName();
|
||||
$option_value = $option->getValue($mode_name);
|
||||
|
||||
if( !empty($option_value) ) {
|
||||
$set_value = $option_value;
|
||||
}
|
||||
|
||||
WCL_Plugin::app()->updatePopulateOption($option_name, $set_value);
|
||||
}
|
||||
} else {
|
||||
$all_options = WCL_Option::getAllOptions();
|
||||
|
||||
if( !empty($all_options) ) {
|
||||
foreach($all_options as $option) {
|
||||
WCL_Plugin::app()->deletePopulateOption($option->getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !$flush_redirect ) {
|
||||
WBCR\Factory_Templates_134\Helpers::flushPageCache();
|
||||
}
|
||||
|
||||
do_action('wbcr_clearfy_configurated_quick_mode', $mode_name);
|
||||
|
||||
// wbcr_clearfy/configurate_quick_mode_success_args
|
||||
// @since 1.3.188
|
||||
wp_send_json(apply_filters('wbcr_clearfy/configurate_quick_mode_success_args', array(
|
||||
'status' => 'success',
|
||||
'export_options' => WCL_Helper::getExportOptions()
|
||||
), $mode_name));
|
||||
}
|
||||
|
||||
add_action('wp_ajax_wbcr_clearfy_configurate', 'wbcr_clearfy_configurate_plugin');
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax plugin configuration
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 2017 Webraftic Ltd
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
//AIzaSyD85-8Tmp_Ixc43AgqyeLpNZNlGP150LbA
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
add_action('wp_ajax_wclearfy-fetch-google-pagespeed-audit', function () {
|
||||
check_ajax_referer('fetch_google_page_speed_audit');
|
||||
|
||||
if( !WCL_Plugin::app()->currentUserCan() ) {
|
||||
wp_die(-1);
|
||||
}
|
||||
|
||||
$flush_cache = (bool)WCL_Plugin::app()->request->post('flush_cache', false);
|
||||
|
||||
$results = get_transient(WCL_Plugin::app()->getPrefix() . 'fetch_google_page_speed_audits');
|
||||
|
||||
if( !empty($results) ) {
|
||||
if( $flush_cache ) {
|
||||
delete_transient(WCL_Plugin::app()->getPrefix() . 'fetch_google_page_speed_audits');
|
||||
} else {
|
||||
wp_send_json_success($results);
|
||||
}
|
||||
}
|
||||
|
||||
$site_url = get_home_url();
|
||||
|
||||
// Check if plugin is installed in localhost
|
||||
if( substr($_SERVER['REMOTE_ADDR'], 0, 4) == '127.' || $_SERVER['REMOTE_ADDR'] == '::1' ) {
|
||||
$site_url = 'https://cm-wp.com/';
|
||||
}
|
||||
|
||||
$results = [];
|
||||
$strategy_arr = array(1 => 'desktop', 2 => 'mobile');
|
||||
|
||||
foreach($strategy_arr as $strategy_id => $strategy_text) {
|
||||
$google_page_speed_call = "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=" . $site_url . "&key=AIzaSyD85-8Tmp_Ixc43AgqyeLpNZNlGP150LbA&strategy=" . $strategy_text;
|
||||
|
||||
//Fetch data from Google PageSpeed API
|
||||
$response = wp_remote_get($google_page_speed_call, array('timeout' => 30));
|
||||
$response_code = wp_remote_retrieve_response_code($response);
|
||||
|
||||
$response_error = null;
|
||||
if( is_wp_error($response) ) {
|
||||
$response_error = $response;
|
||||
} elseif( 200 !== $response_code ) {
|
||||
$response_error = new WP_Error('api-error', /* translators: %d: Numeric HTTP status code, e.g. 400, 403, 500, 504, etc. */ sprintf(__('Invalid API response code (%d).'), $response_code));
|
||||
}
|
||||
|
||||
if( is_wp_error($response_error) ) {
|
||||
wp_send_json_error([
|
||||
'error' => $response_error->get_error_message(),
|
||||
'code' => $response_error->get_error_code()
|
||||
]);
|
||||
}
|
||||
|
||||
$google_ps = json_decode($response['body'], true);
|
||||
|
||||
if( isset($google_ps['error']) ) {
|
||||
wp_send_json_error([
|
||||
'error' => $google_ps['error']['message'],
|
||||
'code' => $google_ps['error']['code']
|
||||
]);
|
||||
}
|
||||
|
||||
$results[$strategy_text] = [
|
||||
'performance_score' => ($google_ps['lighthouseResult']['categories']['performance']['score'] * 100),
|
||||
'first_contentful_paint' => $google_ps['lighthouseResult']['audits']['first-contentful-paint']['displayValue'],
|
||||
'speed_index' => $google_ps['lighthouseResult']['audits']['speed-index']['displayValue'],
|
||||
'interactive' => $google_ps['lighthouseResult']['audits']['interactive']['displayValue']
|
||||
];
|
||||
|
||||
set_transient(WCL_Plugin::app()->getPrefix() . 'fetch_google_page_speed_audits', $results, 201);
|
||||
}
|
||||
wp_send_json_success($results);
|
||||
});
|
||||
|
||||
add_action('wp_ajax_wclearfy-google-pagespeed-audit-results', function () {
|
||||
$get_before_audit_results = WCL_Plugin::app()->getPopulateOption('google_page_speed_audit_before');
|
||||
$get_after_audit_results = WCL_Plugin::app()->getPopulateOption('google_page_speed_audit_after');
|
||||
|
||||
$results = [
|
||||
'before' => !empty($get_before_audit_results) ? $get_before_audit_results : [
|
||||
'fake' => 1,
|
||||
'desktop' => [
|
||||
'performance_score' => 0,
|
||||
'first_contentful_paint' => '??',
|
||||
'speed_index' => '??',
|
||||
'interactive' => '??'
|
||||
],
|
||||
'mobile' => [
|
||||
'performance_score' => 0,
|
||||
'first_contentful_paint' => '??',
|
||||
'speed_index' => '??',
|
||||
'interactive' => '??'
|
||||
],
|
||||
],
|
||||
'after' => !empty($get_after_audit_results) ? $get_after_audit_results : [
|
||||
'fake' => 1,
|
||||
'desktop' => [
|
||||
'performance_score' => 0,
|
||||
'first_contentful_paint' => '??',
|
||||
'speed_index' => '??',
|
||||
'interactive' => '??'
|
||||
],
|
||||
'mobile' => [
|
||||
'performance_score' => 0,
|
||||
'first_contentful_paint' => '??',
|
||||
'speed_index' => '??',
|
||||
'interactive' => '??'
|
||||
]
|
||||
]
|
||||
];
|
||||
wp_send_json_success($results);
|
||||
});
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax plugin configuration
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 2017 Webraftic Ltd
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax действите, выполняется для получения всех доступных опций для экспорта.
|
||||
*/
|
||||
function wbcr_clearfy_import_settings()
|
||||
{
|
||||
global $wpdb;
|
||||
|
||||
check_ajax_referer('wbcr_clearfy_import_options');
|
||||
|
||||
if( !WCL_Plugin::app()->currentUserCan() ) {
|
||||
wp_send_json_error(array('error_message' => __('You don\'t have enough capability to edit this information.', 'clearfy')));
|
||||
die();
|
||||
}
|
||||
|
||||
$settings = WCL_Helper::maybeGetPostJson('settings');
|
||||
|
||||
/**
|
||||
* Используется для фильтрации импортируемых настроек,
|
||||
* обычно это может пригодиться для компонентов, которым нужно выполнить дополнительные дествия к опциям,
|
||||
* прежде чем продолжить импорт
|
||||
*
|
||||
* wbcr/clearfy/filter_import_options
|
||||
* @since 1.4.0
|
||||
*/
|
||||
$settings = apply_filters('wbcr/clearfy/filter_import_options', $settings);
|
||||
|
||||
$network_id = get_current_network_id();
|
||||
|
||||
if( empty($settings) || !is_array($settings) ) {
|
||||
wp_send_json_error(array('error_message' => __('Settings are not defined or do not exist.', 'clearfy')));
|
||||
die();
|
||||
}
|
||||
|
||||
$values = array();
|
||||
$place_holders = array();
|
||||
|
||||
if( WCL_Plugin::app()->isNetworkActive() ) {
|
||||
$query = "INSERT INTO {$wpdb->sitemeta} (site_id, meta_key, meta_value) VALUES ";
|
||||
} else {
|
||||
$query = "INSERT INTO {$wpdb->options} (option_name, option_value) VALUES ";
|
||||
}
|
||||
|
||||
foreach($settings as $option_name => $option_value) {
|
||||
$option_name = sanitize_text_field($option_name);
|
||||
$raw_option_value = $option_value;
|
||||
|
||||
if( is_serialized($option_value) ) {
|
||||
$option_value = unserialize($option_value);
|
||||
}
|
||||
|
||||
if( is_array($option_value) || is_object($option_value) ) {
|
||||
$option_value = WBCR\Factory_Templates_134\Helpers::recursiveSanitizeArray($option_value, 'wp_kses_post');
|
||||
$option_value = maybe_serialize($option_value);
|
||||
} else {
|
||||
$option_value = wp_kses_post($option_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Используется для фильтрации импортируемых значений,
|
||||
* обычно это может пригодиться для компонентов, которым нужно подменять домены, пути или какие-то правила
|
||||
* при переносе с одного сайта на другой
|
||||
*
|
||||
* wbcr/clearfy/filter_import_values
|
||||
* @since 1.4.0
|
||||
*/
|
||||
$option_value = apply_filters('wbcr/clearfy/filter_import_values', $option_value, $option_name, $raw_option_value);
|
||||
|
||||
// todo: Вынести в отдельный файл и привязать к хуку
|
||||
if( WCL_Plugin::app()->getOptionName('robots_txt_text') == $option_name ) {
|
||||
$site_url = get_home_url();
|
||||
$dir_host_without_scheme = preg_replace("(^https?://)", "", $site_url);
|
||||
$dir_host = $dir_host_without_scheme;
|
||||
|
||||
if( is_ssl() ) {
|
||||
$dir_host = 'https://' . $dir_host_without_scheme;
|
||||
}
|
||||
|
||||
$replace_host_value = preg_replace('/(Host:\s?)(.*)/', '$1' . $dir_host, $option_value);
|
||||
|
||||
if( !empty($replace_host_value) ) {
|
||||
$option_value = $replace_host_value;
|
||||
}
|
||||
|
||||
if( preg_match('/Sitemap:\s?(.*)/', $option_value, $matches) ) {
|
||||
$site_map_url = $matches[1];
|
||||
|
||||
if( filter_var($site_map_url, FILTER_VALIDATE_URL) ) {
|
||||
$url_parts = parse_url($site_map_url);
|
||||
$replace_sitemap_value = preg_replace('/(Sitemap:\s?)(.*)/', '$1' . $url_parts['scheme'] . '://' . $dir_host_without_scheme . $url_parts['path'] . PHP_EOL, $option_value);
|
||||
|
||||
if( !empty($replace_sitemap_value) ) {
|
||||
$option_value = $replace_sitemap_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( WCL_Plugin::app()->isNetworkActive() ) {
|
||||
array_push($values, $network_id, $option_name, $option_value);
|
||||
$place_holders[] = "('%d', '%s', '%s')";/* In my case, i know they will always be integers */
|
||||
} else {
|
||||
array_push($values, $option_name, $option_value);
|
||||
$place_holders[] = "('%s', '%s')";/* In my case, i know they will always be integers */
|
||||
}
|
||||
}
|
||||
|
||||
$query .= implode(', ', $place_holders);
|
||||
|
||||
// Удаляем все опции
|
||||
$all_options = WCL_Option::getAllOptions();
|
||||
|
||||
if( !empty($all_options) ) {
|
||||
foreach($all_options as $option) {
|
||||
WCL_Plugin::app()->deletePopulateOption($option->getName());
|
||||
}
|
||||
}
|
||||
|
||||
// Сбрасываем кеш опций
|
||||
WCL_Plugin::app()->flushOptionsCache();
|
||||
|
||||
// Импортируем опции
|
||||
$wpdb->query($wpdb->prepare("$query ", $values));
|
||||
|
||||
$send_data = array('status' => 'success');
|
||||
|
||||
//$package_plugin = WCL_Package::instance();
|
||||
//$send_data['update_notice'] = $package_plugin->getUpdateNotice();
|
||||
|
||||
// Сбрасываем кеш для кеширующих плагинов
|
||||
WBCR\Factory_Templates_134\Helpers::flushPageCache();
|
||||
|
||||
do_action('wbcr_clearfy_imported_settings');
|
||||
|
||||
wp_send_json_success($send_data);
|
||||
die();
|
||||
}
|
||||
|
||||
add_action('wp_ajax_wbcr-clearfy-import-settings', 'wbcr_clearfy_import_settings');
|
||||
|
||||
@@ -1,406 +0,0 @@
|
||||
/**
|
||||
* Styles for the Widget to be displayed in the Clearfy plugin
|
||||
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com>
|
||||
* @copyright Webcraftic 13.06.2018
|
||||
*/
|
||||
#WBCR {
|
||||
/* Number display */
|
||||
/* Number and bars */
|
||||
/* Doughnut */
|
||||
/* Widget */
|
||||
}
|
||||
#WBCR .wio-clear {
|
||||
clear: both;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers {
|
||||
margin-top: 30px;
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers h4 {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers button {
|
||||
padding: 5px 10px;
|
||||
border: 0;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase !important;
|
||||
font-weight: bold;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
background: #f3f3f3;
|
||||
color: #656565;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers button:active {
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers button.wbcr-rio-loading {
|
||||
width: 56px;
|
||||
font-size: 0;
|
||||
background: #f3f3f3 url("../img/quick-start-loader.gif") center no-repeat;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers button.wbcr-rio-selected {
|
||||
background: #f3efe2;
|
||||
color: #d8d8d8;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers button.wbcr-rio-selected:active {
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border-spacing: 3px;
|
||||
background: #fff;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table th,
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table td {
|
||||
padding: 16px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table th {
|
||||
background: #efefef;
|
||||
color: #777777;
|
||||
box-shadow: 0 1px 0 #d8d8d8;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table .wbcr-rio-server-check-proccess {
|
||||
display: inline-block;
|
||||
height: 10px;
|
||||
width: 30px;
|
||||
background: url("../img/quick-start-loader.gif") center no-repeat;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table .wbcr-rio-servers-list-item-selected {
|
||||
background: #fffbed;
|
||||
color: #cec5a8;
|
||||
font-weight: 600;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table .wbcr-rio-server-success {
|
||||
color: #8CC152;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table .wbcr-rio-server-error {
|
||||
color: #fb5d49;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers table .wbcr-rio-server-warning {
|
||||
color: #ffb635;
|
||||
}
|
||||
#WBCR .wbcr-factory-sidebar-widget.wbcr-rio-servers .wbcr-rio-warning-message {
|
||||
margin-top: 30px;
|
||||
padding: 20px;
|
||||
border: 1px dashed #bfbfbf;
|
||||
background: #ffffff;
|
||||
margin-bottom: 40px;
|
||||
font-size: 15px;
|
||||
color: #828282;
|
||||
}
|
||||
#WBCR .wio-columns {
|
||||
overflow: hidden;
|
||||
padding: 15px 0;
|
||||
counter-reset: cols;
|
||||
}
|
||||
#WBCR .wio-columns [class^="col-"] {
|
||||
float: left;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#WBCR .wio-columns .col-1-3 {
|
||||
width: 33.333%;
|
||||
padding-left: 28px;
|
||||
}
|
||||
#WBCR .wio-columns .col-2-3 {
|
||||
width: 66.666%;
|
||||
padding-left: 28px;
|
||||
}
|
||||
#WBCR .wio-columns .col-1-2 {
|
||||
width: 50%;
|
||||
padding: 0 20px;
|
||||
}
|
||||
#WBCR .wio-columns .col-statistics.col-statistics {
|
||||
width: 60%;
|
||||
}
|
||||
#WBCR .wio-columns .col-chart.col-chart {
|
||||
width: 40%;
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
background: #f1f1f1b3;
|
||||
color: #abacaf;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
text-align: left;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
#WBCR .wio-col {
|
||||
float: left;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
-webkit-flex-basis: 50%;
|
||||
-ms-flex-preferred-size: 50%;
|
||||
flex-basis: 50%;
|
||||
}
|
||||
#WBCR .wio-col {
|
||||
padding-right: 20px;
|
||||
}
|
||||
#WBCR .wio-col + .wio-col {
|
||||
padding-right: 0;
|
||||
padding-left: 50px;
|
||||
}
|
||||
#WBCR .wio-col:target {
|
||||
animation: wiohello 1s 3 linear backwards;
|
||||
}
|
||||
#WBCR .wio-number-you-optimized {
|
||||
margin-bottom: 1.35em;
|
||||
overflow: hidden;
|
||||
}
|
||||
#WBCR .wio-number-you-optimized #wio-total-optimized-attachments-pct {
|
||||
color: #828282;
|
||||
}
|
||||
#WBCR .wio-number-you-optimized .wio-number {
|
||||
display: table-cell;
|
||||
padding-right: 15px;
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
color: #828282;
|
||||
}
|
||||
#WBCR .wio-number-you-optimized .wio-text {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
color: #828282;
|
||||
}
|
||||
#WBCR .wio-number-you-optimized > p {
|
||||
display: table;
|
||||
}
|
||||
#WBCR .wio-bars {
|
||||
padding-right: 15px;
|
||||
}
|
||||
#WBCR .wio-bars p {
|
||||
font-size: 12px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#WBCR .wio-bars + .wio-number-you-optimized {
|
||||
border-bottom: 0;
|
||||
padding-top: 0.85em;
|
||||
}
|
||||
#WBCR .wio-bars + .wio-number-you-optimized p {
|
||||
color: #72a53b;
|
||||
}
|
||||
#WBCR .wio-bar-negative .wio-progress {
|
||||
background: #D2D3D6;
|
||||
}
|
||||
#WBCR .wio-bar-negative .wio-barnb {
|
||||
color: #9d9fa5;
|
||||
}
|
||||
#WBCR .wio-progress {
|
||||
height: 8px;
|
||||
transition: width 0.3s;
|
||||
/*.wio-bar-negative {
|
||||
width: 92% !important;
|
||||
}*/
|
||||
}
|
||||
#WBCR .wio-bar-positive .wio-progress {
|
||||
background: #8CC152;
|
||||
}
|
||||
#WBCR .wio-bar-positive .wio-barnb {
|
||||
color: #72a53b;
|
||||
}
|
||||
#WBCR .wio-bar-primary .wio-progress {
|
||||
background: #8CC152;
|
||||
}
|
||||
#WBCR .wio-bar-primary .wio-barnb {
|
||||
color: #72a53b;
|
||||
}
|
||||
#WBCR .wio-right-outside-number .wio-barnb {
|
||||
display: block;
|
||||
margin-right: -5.25em;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
line-height: 0.8;
|
||||
}
|
||||
#WBCR .wio-chart {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#WBCR .wio-chart-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
border: 10px solid #d2d3d6;
|
||||
border-radius: 100%;
|
||||
}
|
||||
#WBCR .wio-chart-container canvas {
|
||||
display: block;
|
||||
}
|
||||
#WBCR .wio-overview-chart-container {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
#WBCR .wio-chart-percent {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
margin-top: -0.5em;
|
||||
line-height: 0.8;
|
||||
text-align: center;
|
||||
font-size: 54px;
|
||||
font-weight: bold;
|
||||
color: #afafaf;
|
||||
}
|
||||
#WBCR .wio-chart-percent span {
|
||||
font-size: 20px;
|
||||
vertical-align: super;
|
||||
}
|
||||
#WBCR #wio-overview-chart-legend {
|
||||
overflow: hidden;
|
||||
}
|
||||
#WBCR .wio-doughnut-legend li {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-bottom: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 8px 2px 31px;
|
||||
font-size: 12px;
|
||||
cursor: default;
|
||||
-webkit-transition: background-color 200ms ease-in-out;
|
||||
-moz-transition: background-color 200ms ease-in-out;
|
||||
-o-transition: background-color 200ms ease-in-out;
|
||||
transition: background-color 200ms ease-in-out;
|
||||
}
|
||||
#WBCR .wio-doughnut-legend li span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
#WBCR .wio-optimize-button {
|
||||
width: 180px;
|
||||
padding: 12px 30px;
|
||||
background: #c9deb2;
|
||||
color: #586549;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
font-size: 14px;
|
||||
text-transform: uppercase !important;
|
||||
font-weight: bold;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
#WBCR .wio-optimize-button:active {
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
#WBCR .wio-global-optim-phrase {
|
||||
width: 180px;
|
||||
padding-top: 20px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
#WBCR .wio-total-percent {
|
||||
color: #587f2e;
|
||||
}
|
||||
#WBCR .wio-text-left {
|
||||
text-align: left;
|
||||
}
|
||||
#WBCR span.wio-num {
|
||||
display: inline !important;
|
||||
position: inherit !important;
|
||||
}
|
||||
#WBCR .wio-image-optimize-board {
|
||||
padding: 20px;
|
||||
}
|
||||
#WBCR .wio-page-statistic {
|
||||
padding-left: 40px;
|
||||
}
|
||||
#WBCR .wio-page-statistic .wio-chart-percent {
|
||||
margin-top: -1.1em;
|
||||
}
|
||||
#WBCR .wio-widget {
|
||||
padding: 0 !important;
|
||||
}
|
||||
#WBCR .wio-widget .wio-chart-percent {
|
||||
font-size: 44px;
|
||||
line-height: 1;
|
||||
}
|
||||
#WBCR .wio-widget .wio-bars {
|
||||
width: 80%;
|
||||
margin-left: 155px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#WBCR .wio-widget .col-chart.col-chart {
|
||||
width: 100%;
|
||||
}
|
||||
#WBCR .wio-widget .col-controls {
|
||||
width: 45%;
|
||||
padding-left: 5px;
|
||||
padding-top: 110px;
|
||||
}
|
||||
#WBCR .wio-widget .wio-doughnut-legend {
|
||||
margin-left: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
#WBCR .wio-widget .wio-widget-bottom {
|
||||
display: table;
|
||||
padding-top: 20px !important;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
#WBCR .wio-widget .wio-widget-bottom li {
|
||||
display: table-cell;
|
||||
}
|
||||
#WBCR .wio-widget .wio-widget-bottom li:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
@media (max-width: 830px) {
|
||||
#WBCR .wio [class^="col-"] {
|
||||
float: none;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
#WBCR .wio .col-1-3,
|
||||
#WBCR .wio .col-1-2 {
|
||||
width: auto;
|
||||
padding: 0 28px;
|
||||
clear: both;
|
||||
padding-top: 1em;
|
||||
}
|
||||
}
|
||||
@keyframes wiohello {
|
||||
0%,
|
||||
100% {
|
||||
background: #FFF;
|
||||
}
|
||||
50% {
|
||||
background: #F4F7F9;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1520px) and (min-width: 1381px), (max-width: 1086px) {
|
||||
#WBCR .wio-columns .col-statistics.col-statistics,
|
||||
#WBCR .wio-columns .col-chart.col-chart {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 808px) {
|
||||
#WBCR .wio-columns .col-statistics.col-statistics,
|
||||
#WBCR .wio-columns .col-chart.col-chart {
|
||||
width: auto;
|
||||
float: none;
|
||||
padding: 0;
|
||||
}
|
||||
#WBCR .wio-columns .col-chart.col-chart {
|
||||
margin-top: 3em;
|
||||
}
|
||||
}
|
||||
/*# sourceMappingURL=base-statistic.css.map */
|
||||
@@ -1,140 +0,0 @@
|
||||
/**
|
||||
* Page components
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com>
|
||||
* @copyright Alex Kovalev 30.09.2017
|
||||
*/
|
||||
#WBCR .wbcr-clearfy-components {
|
||||
padding: 0 20px 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 32.7%;
|
||||
height: 250px;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
text-align: left;
|
||||
float: none;
|
||||
vertical-align: top;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .plugin-card-bottom {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .plugin-card-top {
|
||||
min-height: 163px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .desc,
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .name {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .name h3 {
|
||||
font-size: 17px;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .install-now {
|
||||
float: right;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .delete-now {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .delete-now .dashicons,
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .delete-now .dashicons-before:before {
|
||||
font-size: 16px !important;
|
||||
line-height: 1.5 !important;
|
||||
color: #62696f;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card a.open-plugin-details-modal {
|
||||
color: #5c5d5f;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .plugin-card-premium-ribbon {
|
||||
position: absolute;
|
||||
bottom: 60px;
|
||||
right: 0;
|
||||
height: 30px;
|
||||
width: 120px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
background-color: #f7dea9;
|
||||
color: #67532f;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 2.4;
|
||||
text-transform: uppercase;
|
||||
z-index: 1;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .plugin-card-free-ribbon {
|
||||
position: absolute;
|
||||
bottom: 60px;
|
||||
right: 0;
|
||||
height: 30px;
|
||||
width: 120px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
background-color: #cccccc;
|
||||
color: #6b6b6b;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 2.4;
|
||||
text-transform: uppercase;
|
||||
z-index: 1;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card .plugin-card-freemium-ribbon {
|
||||
position: absolute;
|
||||
bottom: 60px;
|
||||
right: 0;
|
||||
height: 30px;
|
||||
width: 120px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
background-color: #cae2b3;
|
||||
color: #546742;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 2.4;
|
||||
text-transform: uppercase;
|
||||
z-index: 1;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card.premium {
|
||||
border-color: #e8d7b2;
|
||||
background-color: #fff9eb;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive a.open-plugin-details-modal {
|
||||
color: #ababab;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive .plugin-icon {
|
||||
opacity: 0.3;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive .desc {
|
||||
color: #afafaf;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive.premium {
|
||||
background-color: #f9f2f1;
|
||||
}
|
||||
@media screen and (max-width: 1750px) {
|
||||
#WBCR .wbcr-clearfy-components .plugin-card {
|
||||
width: 49%;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1350px) {
|
||||
#WBCR .wbcr-clearfy-components .plugin-card {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
/*# sourceMappingURL=components.css.map */
|
||||
@@ -1,156 +0,0 @@
|
||||
/* Clearfy Farewell Notice Styles */
|
||||
|
||||
#try-super-page-cache-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
margin: 16px 0;
|
||||
padding: 23px 10px 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
||||
background: #fff;
|
||||
font-size: 13px;
|
||||
line-height: 2.1em;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel h2 {
|
||||
margin: 0;
|
||||
font-size: 21px;
|
||||
font-weight: 400;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel h3 {
|
||||
margin: 17px 0 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel li {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel p {
|
||||
color: #72777c;
|
||||
}
|
||||
|
||||
.try-super-page-cache-action a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel .about-description {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel-content hr {
|
||||
margin: 20px -23px 0 -23px;
|
||||
border-top: 1px solid #f3f4f5;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-close {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
padding: 10px 15px 10px 21px;
|
||||
font-size: 13px;
|
||||
line-height: 1.23076923;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-close:before {
|
||||
background: none;
|
||||
color: #72777c;
|
||||
content: "\f153";
|
||||
display: block;
|
||||
font: normal 16px/20px dashicons;
|
||||
speak: none;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 0;
|
||||
transition: all .1s ease-in-out;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel-content {
|
||||
margin: 0 13px;
|
||||
max-width: 1500px;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel img {
|
||||
margin-top: 23px;
|
||||
width: calc( 100% - 40px );
|
||||
border: 1px solid #f3f4f5;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-column > * {
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-column-container {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-columns: 36% 32% 32%;
|
||||
grid-template-columns: 36% 32% 32%;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-column:not(.try-super-page-cache-panel-image-column) {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-rows: auto 100px;
|
||||
grid-template-rows: auto 100px;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel-column p {
|
||||
margin-top: 7px;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-column-container {
|
||||
-ms-grid-columns: 50% 50%;
|
||||
grid-template-columns: 50% 50%;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-image-column {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 870px) {
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-column-container {
|
||||
-ms-grid-columns: 100%;
|
||||
grid-template-columns: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-close {
|
||||
overflow: hidden;
|
||||
text-indent: 40px;
|
||||
white-space: nowrap;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 5px;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.try-super-page-cache-panel .try-super-page-cache-panel-close:before {
|
||||
font-size: 20px;
|
||||
top: 5px;
|
||||
left: -35px;
|
||||
}
|
||||
}
|
||||
@@ -1,717 +0,0 @@
|
||||
/**
|
||||
* General styles
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com>
|
||||
* @copyright Alex Kovalev 23.08.2017
|
||||
*/
|
||||
.wbcr-clearfy-layer {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -20px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 235, 59, 0.18);
|
||||
z-index: 9;
|
||||
}
|
||||
#WBCR {
|
||||
/*.wbcr-right-sidebar-section {
|
||||
width: 49%;
|
||||
padding-top: 20px;
|
||||
}*/
|
||||
/**
|
||||
* Widgets
|
||||
*/
|
||||
/**
|
||||
* Navigation bar
|
||||
*/
|
||||
/*.wbcr-clearfy-board {
|
||||
background: #f9f8f8;
|
||||
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
min-width: 350px;
|
||||
//float: right;
|
||||
}*/
|
||||
}
|
||||
#WBCR .wbcr-factory-pages-480-impressive-page-template .wbcr-factory-page-header {
|
||||
height: 80px !important;
|
||||
}
|
||||
#WBCR .wbcr-factory-pages-480-impressive-page-template .wbcr-factory-page-header .wbcr-factory-header-logo span {
|
||||
display: inline-block !important;
|
||||
}
|
||||
#WBCR .row {
|
||||
display: block !important;
|
||||
width: auto !important;
|
||||
table-layout: auto !important;
|
||||
}
|
||||
#WBCR .row > div {
|
||||
display: block !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
#WBCR .wbcr-clr-logo-label {
|
||||
position: relative;
|
||||
padding: 0 10px 3px;
|
||||
border-radius: 5px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
#WBCR .wbcr-clr-logo-label:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 25px;
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
background: url(../../../assets/img/webcraftic-plugin-icon.png) 0 0 no-repeat;
|
||||
}
|
||||
#WBCR .wbcr-clr-logo-label.wbcr-clr-free-label-logo {
|
||||
color: #f1f1f1;
|
||||
background-color: #636363;
|
||||
}
|
||||
#WBCR .wbcr-clr-logo-label.wbcr-clr-premium-label-logo {
|
||||
color: #000000;
|
||||
background-color: #ffbe00;
|
||||
}
|
||||
#WBCR .wbcr-content-section,
|
||||
#WBCR .wbcr-right-sidebar-section {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
#WBCR .wbcr-content-section {
|
||||
width: 100%;
|
||||
}
|
||||
#WBCR #wbcr-clr-go-to-premium-widget .wbcr-clr-purchase-premium {
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background: #fffaea;
|
||||
padding: 0;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
margin-top: 15px;
|
||||
box-shadow: 0 0 8px #fddf67;
|
||||
}
|
||||
#WBCR #wbcr-clr-go-to-premium-widget .wbcr-clr-purchase-premium .fa {
|
||||
position: relative;
|
||||
margin-right: 3px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
#WBCR .wbcr-factory-left-navigation-bar #components-wbcr_clearfy-tab {
|
||||
border-left: 5px solid #7edbff;
|
||||
}
|
||||
#WBCR .wbcr-factory-left-navigation-bar #license-wbcr_clearfy-tab {
|
||||
border-left: 5px solid #ffd762;
|
||||
}
|
||||
#WBCR .wbcr-factory-left-navigation-bar .wbcr-factory-active-tab #license-wbcr_clearfy-tab {
|
||||
font-weight: lighter;
|
||||
color: #222;
|
||||
}
|
||||
#WBCR .wbcr-factory-left-navigation-bar .wbcr-factory-active-tab #license-wbcr_clearfy-tab .dashicons-admin-network {
|
||||
color: #222;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-danger-message {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
background: #ffe0de;
|
||||
color: #9c6e6e;
|
||||
border-radius: 3px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-danger-message:after,
|
||||
#WBCR .wbcr-clearfy-danger-message:before {
|
||||
bottom: 100%;
|
||||
left: 20px;
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-danger-message:after {
|
||||
border-color: rgba(136, 183, 213, 0);
|
||||
border-bottom-color: #ffe0de;
|
||||
border-width: 10px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-danger-message:before {
|
||||
border-color: rgba(194, 225, 245, 0);
|
||||
border-bottom-color: #ffe0de;
|
||||
border-width: 10px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-group-header {
|
||||
background: #efefef;
|
||||
padding: 20px 0 10px 20px;
|
||||
margin: 30px 0;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
#WBCR .wbcr-clearfy-group-header:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-group-header strong {
|
||||
font-size: 15px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-group-header p {
|
||||
color: #8c8888;
|
||||
font-size: 12px;
|
||||
}
|
||||
#WBCR .factory-more-link-content {
|
||||
padding-top: 10px;
|
||||
background: #fbfafa;
|
||||
}
|
||||
#WBCR .factory-more-link-hide {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin-left: 25px;
|
||||
margin-bottom: 30px;
|
||||
color: rgb(255 69 0);
|
||||
}
|
||||
#WBCR .factory-more-link-hide:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 0;
|
||||
left: -15px;
|
||||
top: 6px;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
border-width: 0 5px 8px 5px;
|
||||
border-color: transparent transparent #ff4500 transparent;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board h4 {
|
||||
margin-top: 30px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-switch-success-message,
|
||||
#WBCR .wbcr-clearfy-switch-error-message {
|
||||
display: none;
|
||||
padding: 15px 20px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
margin: 0 0 15px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-switch-success-message {
|
||||
background: #e5f9ce;
|
||||
border-bottom: 3px solid #d3eab9;
|
||||
color: #56614a;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-switch-error-message {
|
||||
background: #fdc6c2;
|
||||
border-bottom: 3px solid #e2a19c;
|
||||
color: #bd6963;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-troubleshooting {
|
||||
padding: 0 50px 20px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-export-import {
|
||||
padding: 0 50px;
|
||||
text-align: right;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-export-import label {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 7px 0;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-export-import #wbcr-clearfy-import-export {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
height: 200px;
|
||||
line-height: inherit;
|
||||
margin: 0;
|
||||
padding: 7px 14px;
|
||||
box-shadow: none;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #eee;
|
||||
border-top-color: #dedede;
|
||||
background-color: #f1f1f1;
|
||||
color: #444;
|
||||
transition: border-color 0.3s;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-export-import .wbcr-clearfy-import-options-button {
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 500px;
|
||||
height: 400px;
|
||||
margin: -200px 0 0 -250px;
|
||||
padding: 20px;
|
||||
background: rgba(255, 255, 255, 0.82);
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
||||
border: 4px solid rgba(216, 210, 171, 0.44);
|
||||
z-index: 99;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup h3 {
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-reset-warning-message {
|
||||
display: none;
|
||||
text-align: center;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-list-options {
|
||||
display: none;
|
||||
height: 230px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding-left: 40px;
|
||||
list-style: decimal;
|
||||
margin: 20px 0;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup.wbcr-clearfy-default-warning-options .wbcr-clearfy-list-options {
|
||||
display: block;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup.wbcr-clearfy-reset-warning-options {
|
||||
height: 200px;
|
||||
margin: -100px 0 0 -250px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup.wbcr-clearfy-reset-warning-options .wbcr-clearfy-reset-warning-message {
|
||||
display: block;
|
||||
margin: 10px 0;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button {
|
||||
display: inline-block;
|
||||
padding: 7px 25px;
|
||||
box-shadow: none;
|
||||
border: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button,
|
||||
#WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button:focus {
|
||||
outline: 0 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button.wbcr-clearfy-popup-button-ok {
|
||||
background: #FFEB3B;
|
||||
color: #564f0d;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button.wbcr-clearfy-cancel-mode {
|
||||
background: #d6d6d6;
|
||||
color: #5f5d5d;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board {
|
||||
padding: 20px;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch {
|
||||
position: relative;
|
||||
padding: 15px 20px;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
background: #f1f1f1;
|
||||
color: #6d6d6d;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
text-align: left;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
-webkit-transition: all 0.2s ease-out;
|
||||
-moz-transition: all 0.2s ease-out;
|
||||
-o-transition: all 0.2s ease-out;
|
||||
transition: all 0.2s ease-out;
|
||||
/*&.wbcr-clearfy-mode-reset:hover {
|
||||
& .wbcr-clearfy-button-activate-mode {
|
||||
background-color: #fb7976;
|
||||
color: darken(#fb7976, 50%);
|
||||
&:hover {
|
||||
background-color: lighten(#fb7976, 3%);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch:after {
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .fa,
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .dashicons {
|
||||
font-size: 25px;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .fa,
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .dashicons,
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch span {
|
||||
display: inline-block !important;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch span {
|
||||
margin-left: 15px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-active {
|
||||
/*.fa, .dashicons:before {
|
||||
color: #8bc34a;
|
||||
}
|
||||
& .wbcr-clearfy-button-activate-mode {
|
||||
display: none !important;
|
||||
}
|
||||
& .wbcr-clearfy-button-deativate-mode {
|
||||
display: inline-block !important;
|
||||
}*/
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-active .wbcr-clearfy-button-activate-mode {
|
||||
background-color: #f7f7f7 !important;
|
||||
color: #e0e0e0 !important;
|
||||
cursor: default;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-switch-mode-reset .wbcr-clearfy-switch-confirmation {
|
||||
width: 130px;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-switch-mode-reset .wbcr-clearfy-switch-confirmation .wbcr-clearfy-button-activate-mode {
|
||||
width: 130px;
|
||||
background-color: #fdd599;
|
||||
color: #a57b3c;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-switch-mode-reset .wbcr-clearfy-switch-confirmation .wbcr-clearfy-button-activate-mode:hover {
|
||||
background-color: #fddba8;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-switch-mode-recommended .fa,
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-switch-mode-recommended .dashicons:before {
|
||||
color: #8bc34a;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-switch-mode-recommended .wbcr-clearfy-button-activate-mode {
|
||||
background-color: #c9deb2;
|
||||
color: #586549;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-switch-mode-recommended .wbcr-clearfy-button-activate-mode:hover {
|
||||
background-color: #d1e3bd;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-loading .wbcr-clearfy-switch-confirmation button {
|
||||
background: url("../img/quick-start-loader.gif") center center no-repeat;
|
||||
background-color: #f7f7f7 !important;
|
||||
font-size: 0;
|
||||
cursor: default !important;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 20px;
|
||||
bottom: 0;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
-moz-transition: all 0.3s ease-out;
|
||||
-o-transition: all 0.3s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation button {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
margin: 12px 0 0;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
padding: 5px 10px;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
border-radius: 3px;
|
||||
outline: none;
|
||||
background-color: #dedede;
|
||||
color: #808080;
|
||||
/*&.wbcr-clearfy-button-activate-mode {
|
||||
background-color: #c9deb2;
|
||||
color: #586549;
|
||||
&:hover {
|
||||
background-color: lighten(#c9deb2, 3%);
|
||||
}
|
||||
}
|
||||
&.wbcr-clearfy-button-deativate-mode {
|
||||
display: none;
|
||||
background-color: #fdd599;
|
||||
color: #a57b3c;
|
||||
margin-right: 0;
|
||||
&:hover {
|
||||
background-color: lighten(#fdd599, 3%);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation button:hover {
|
||||
background-color: #d6d6d6;
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation button:active {
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation .wbcr-clearfy-button-activate-wizard {
|
||||
width: 100px;
|
||||
background-color: #8bc34a;
|
||||
color: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start {
|
||||
display: flex;
|
||||
/*.wclearfy-gogle-page-speed-audit__errors {
|
||||
display: none;
|
||||
padding: 15px;
|
||||
background: #fddfdf;
|
||||
}*/
|
||||
/*&__g-audit-start-button {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
//padding: 15px 40px;
|
||||
line-height: 4.3;
|
||||
height: 50px;
|
||||
width: 200px;
|
||||
margin: -25px 0 0 -100px;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
color: #a57b3c;
|
||||
background-color: #fdd599;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
box-shadow: 0 1px 1px rgb(0 0 0%);
|
||||
}*/
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__left-column,
|
||||
#WBCR .wclearfy-quick-start__right-column {
|
||||
text-align: center;
|
||||
padding: 15px;
|
||||
box-sizing: border-box;
|
||||
width: 25%;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__left-column ul {
|
||||
margin: 0 auto;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__left-column ul .wclearfy-quick-start__license-details {
|
||||
text-align: left;
|
||||
padding: 15px 15px 15px 0;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__left-column ul .wclearfy-quick-start__license-details-inner-wrap {
|
||||
border-radius: 5px;
|
||||
background: #efefef;
|
||||
padding: 15px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__right-column {
|
||||
width: 75%;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__button {
|
||||
display: block;
|
||||
padding: 15px 40px;
|
||||
margin-right: 20px;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
background: #eeeeee;
|
||||
text-align: center;
|
||||
color: #6d6d6d;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
box-shadow: 0 1px 1px rgb(0 0 0%);
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__button:hover {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__button--green {
|
||||
color: #586549;
|
||||
background-color: #c9deb2;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__button--green:hover {
|
||||
background-color: #d1e3bd;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__button--orange {
|
||||
color: #a57b3c;
|
||||
background-color: #fdd599;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__button--orange:hover {
|
||||
background-color: #fddba8;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__google-page-speed-preloader {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background: url("../img/setup-preloader-124x124.gif") center no-repeat;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
margin: 10px 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit a {
|
||||
outline: 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-after-h2 {
|
||||
font-size: 18px;
|
||||
color: #87a76e;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-before-h2 {
|
||||
font-size: 18px;
|
||||
color: #e49d7f;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-score {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-desktop-score,
|
||||
#WBCR .wclearfy-quick-start__g-audit-mobile-score {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-desktop-score h3,
|
||||
#WBCR .wclearfy-quick-start__g-audit-mobile-score h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-score-circle {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-warging-text {
|
||||
z-index: 2;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-warging-text span {
|
||||
display: block;
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-preloader,
|
||||
#WBCR .wclearfy-quick-start__g-audit-overlay,
|
||||
#WBCR .wclearfy-quick-start__g-audit-warging-text {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-preloader {
|
||||
background: url("../img/g-audit-preloader2.gif") center no-repeat;
|
||||
z-index: 3;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-overlay {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
z-index: 1;
|
||||
text-align: center;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start .wclearfy-status-circle-text {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #aaa;
|
||||
font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 1.3125rem;
|
||||
font-weight: 300;
|
||||
line-height: 1.5;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start .wclearfy-score-circle .wclearfy-status-overlay-text {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 200%;
|
||||
text-align: center;
|
||||
transform: translate(-50%, -50%);
|
||||
font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 0.875rem;
|
||||
font-weight: normal;
|
||||
line-height: 1.3125;
|
||||
opacity: 0;
|
||||
color: #777;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-statistic {
|
||||
padding: 10px;
|
||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-statistic-line {
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 8px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start__g-audit-statistic-results {
|
||||
padding-right: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start-docs {
|
||||
display: flex;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start-docs__column {
|
||||
text-align: center;
|
||||
padding: 0 15px 15px 15px;
|
||||
box-sizing: border-box;
|
||||
width: 33.3333%;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start-docs__column-inner-wrap {
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
box-sizing: border-box;
|
||||
background: #eeeeee;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start-docs__column-inner-wrap ul {
|
||||
margin: 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start-docs__column-inner-wrap ul li {
|
||||
text-align: left;
|
||||
list-style: square;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start-docs__column-inner-wrap ul li a {
|
||||
color: #a8a8a8;
|
||||
}
|
||||
#WBCR .wclearfy-quick-start-docs__column-inner-wrap ul li a:hover {
|
||||
color: #979696;
|
||||
}
|
||||
#WBCR .wbcr-factory-page-quick_start #wbcr-factory-templates-134__autocomplete {
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
border-radius: 4px;
|
||||
font-size: 20px;
|
||||
box-sizing: border-box;
|
||||
border-color: #d6d4d4;
|
||||
}
|
||||
@media screen and (max-width: 1380px) {
|
||||
#WBCR #wbcr-clearfy-quick-mode-board {
|
||||
min-width: 450px;
|
||||
padding-right: 0;
|
||||
}
|
||||
#WBCR .wbcr-content-section,
|
||||
#WBCR .wbcr-right-sidebar-section {
|
||||
width: 100%;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-export-import-board {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 950px) {
|
||||
#WBCR #wbcr-clearfy-quick-mode-board {
|
||||
min-width: 100%;
|
||||
}
|
||||
#WBCR .wbcr-content-section,
|
||||
#WBCR .wbcr-right-sidebar-section {
|
||||
width: 100%;
|
||||
}
|
||||
#WBCR .wbcr-clearfy-board {
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 550px) {
|
||||
#WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch span {
|
||||
font-size: 0 !important;
|
||||
}
|
||||
}
|
||||
/*# sourceMappingURL=general.css.map */
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Gutenber autosave control styles
|
||||
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 10.12.2018, Webcraftic
|
||||
* @version 1.0
|
||||
*
|
||||
* Credits:
|
||||
* This code was used from the plugin: https://wordpress.org/plugins/disable-gutenberg-autosave/
|
||||
* Author websevendev
|
||||
*/
|
||||
h2.disable-gutenberg-autosave-header {
|
||||
margin: 0;
|
||||
}
|
||||
p.disable-gutenberg-autosave-error {
|
||||
color: red;
|
||||
font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro", monospace;
|
||||
}
|
||||
/*# sourceMappingURL=gutenberg-autosave-control.css.map */
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* Install addons global styles
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright Webcraftic 11.07.2018
|
||||
*/
|
||||
.wbcr-clr-new-component {
|
||||
background: #f7f7f7;
|
||||
border: 1px solid #eaeaea;
|
||||
padding: 5px 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.wbcr-clr-new-component h4 {
|
||||
margin: 5px 0;
|
||||
display: inline-block;
|
||||
}
|
||||
.wbcr-clr-new-component .wbcr-clr-proccess-button {
|
||||
display: inline-block;
|
||||
margin: 5px 0;
|
||||
}
|
||||
.wbcr-clr-new-component.wbcr-clr-premium {
|
||||
background: #fff6db;
|
||||
border: 1px solid #e4dea9;
|
||||
}
|
||||
.wbcr-clr-new-component.wbcr-clr-premium h4 {
|
||||
color: #88690c;
|
||||
}
|
||||
.wbcr-clr-proccess-button.button-link,
|
||||
.wbcr-clr-proccess-button.button-link:focus {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=install-addons.css.map */
|
||||
@@ -1,659 +0,0 @@
|
||||
|
||||
.not-visible-in-manager {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Global License Message
|
||||
*/
|
||||
.global-license-message {
|
||||
width: 600px;
|
||||
margin: auto;
|
||||
/*margin-top: 100px;*/
|
||||
font-size: 14px;
|
||||
line-height: 170%;
|
||||
}
|
||||
|
||||
.global-license-message h2, .global-license-message h3 {
|
||||
padding: 0px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.onp-page-wrap {
|
||||
max-width: 720px;
|
||||
margin: auto;
|
||||
margin-top: 40px;
|
||||
font-size: 14px;
|
||||
line-height: 170%;
|
||||
}
|
||||
|
||||
.onp-container {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
border-radius: 5px;
|
||||
background: rgb(255, 255, 255) !important;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#license-manager .onp-container {
|
||||
background: -moz-linear-gradient(top, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(63%, rgba(255, 255, 255, 1)), color-stop(100%, rgba(246, 246, 246, 1))); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6', GradientType=0); /* IE6-9 */
|
||||
}
|
||||
|
||||
.onp-container h2 {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.onp-container p {
|
||||
margin: 0 0 2px 0;
|
||||
padding: 0px;
|
||||
line-height: 170%;
|
||||
}
|
||||
|
||||
.btn-uppercase {
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-uppercase *[class^=icon] {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
left: -1px;
|
||||
}
|
||||
|
||||
.onp-page-wrap .license-message {
|
||||
margin-bottom: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.onp-page-wrap .license-message .alert {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.onp-page-wrap .license-message strong {
|
||||
display: block;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.onp-page-wrap .license-message p {
|
||||
margin: 1px 0 1px 0;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.onp-page-wrap .license-message a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.license-message .alert-warning-icon {
|
||||
padding-left: 60px;
|
||||
background-image: url("../img/warning.png");
|
||||
background-position: 15px 11px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#onp-hide-license-manager {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 15px;
|
||||
font-size: 12px;
|
||||
color: #777;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#onp-hide-license-manager:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#onp-hide-license-manager,
|
||||
#onp-hide-license-manager:focus,
|
||||
#onp-hide-license-manager:hover {
|
||||
outline: none;
|
||||
border: 0px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#onp-hide-license-manager .fa {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#license-manager .license-details-wrap {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 0px;
|
||||
border-radius: 5px;
|
||||
|
||||
background: rgb(255, 255, 255); /* Old browsers */
|
||||
background: -moz-linear-gradient(top, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(63%, rgba(255, 255, 255, 1)), color-stop(100%, rgba(246, 246, 246, 1))); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 63%, rgba(246, 246, 246, 1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6', GradientType=0); /* IE6-9 */
|
||||
|
||||
box-shadow: 0px 2px 1px #c9c9c9;
|
||||
}
|
||||
|
||||
#license-manager .activate-trial-hint {
|
||||
background-color: #f8f8f8;
|
||||
padding: 10px 20px;
|
||||
position: relative;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
#license-manager .activate-error-hint {
|
||||
background-color: #fb7976;
|
||||
color: #f5f5f5;
|
||||
text-shadow: none;
|
||||
padding: 2px 9px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-left: -9px;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
#license-manager .license-details {
|
||||
padding: 20px;
|
||||
padding-bottom: 0px;
|
||||
-webkit-border-top-left-radius: 5px;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
-moz-border-radius-topleft: 5px;
|
||||
-moz-border-radius-topright: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#license-manager .license-key-identity {
|
||||
font-style: italic;
|
||||
position: relative;
|
||||
top: -6px;
|
||||
}
|
||||
|
||||
#license-manager .license-key-identity code {
|
||||
display: inline-block;
|
||||
padding:2px 5px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#license-manager .license-key-description {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#license-manager .license-delete-button {
|
||||
float: right;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
top: -7px;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
#license-manager .license-synchronization-button {
|
||||
float: right;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
top: -7px;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block {
|
||||
padding: 28px 35px 15px 35px;
|
||||
margin-left: -35px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-top: 20px;
|
||||
|
||||
background: #fff;
|
||||
border: 0px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||
color: #333;
|
||||
|
||||
border-radius: 5px;
|
||||
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block p + p {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block.trial-details-block {
|
||||
background: #ffdede;
|
||||
|
||||
border: 0;
|
||||
box-shadow: 0 0 7px #cf4944;
|
||||
color: #a04342;
|
||||
text-shadow: 1px 1px 2px #fff2f2;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block.trial-details-block a {
|
||||
color: #a04342;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block.paid-details-block {
|
||||
border: 0;
|
||||
box-shadow: 0 0 7px #b8823b;
|
||||
color: #8a6d3b;
|
||||
background: #fcf8e3;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block.paid-details-block a {
|
||||
color: #7a4c00;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block.gift-details-block {
|
||||
background: #DFF0D8;
|
||||
border: 1px solid #D6E9C6;
|
||||
box-shadow: 0px 0px 5px #D6E9C6;
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block.gift-details-block a {
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
#license-manager .license-params {
|
||||
margin-top: 15px;
|
||||
position: relative;
|
||||
left: -2px;
|
||||
}
|
||||
|
||||
#license-manager .license-value {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#license-manager .license-value small {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#license-manager .license-value-name {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#license-manager .license-param {
|
||||
white-space: nowrap;
|
||||
line-height: 130%;
|
||||
padding: 10px 0 10px 35px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#license-manager .license-param-domain {
|
||||
padding-left: 65px;
|
||||
background: url('../img/free-license-chip.png') -3px 0px no-repeat;
|
||||
}
|
||||
|
||||
#license-manager .trial-details-block .license-param-domain {
|
||||
background: url('../img/trial-license-chip.png') -3px 0px no-repeat;
|
||||
}
|
||||
|
||||
#license-manager .paid-details-block .license-param-domain {
|
||||
background: url('../img/paid-license-chip.png') -3px 0px no-repeat;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block h3 {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 22px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#license-manager .license-details-block a {
|
||||
color: #a04342;
|
||||
}
|
||||
|
||||
#license-manager .license-input {
|
||||
|
||||
padding: 20px;
|
||||
-webkit-border-bottom-right-radius: 5px;
|
||||
-webkit-border-bottom-left-radius: 5px;
|
||||
-moz-border-radius-bottomright: 5px;
|
||||
-moz-border-radius-bottomleft: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
|
||||
#license-manager .license-input .btn {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#license-manager .license-key-wrap {
|
||||
padding-right: 110px;
|
||||
}
|
||||
|
||||
#license-key {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
height: 36px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#license-submit {
|
||||
float: right;
|
||||
padding: 7px 14px 6px 14px;
|
||||
}
|
||||
|
||||
#plugin-update-block {
|
||||
padding-top: 10px;
|
||||
font-size: 10px;
|
||||
color: #666;
|
||||
max-width: 700px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#plugin-update-block a {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.purchase-premium {
|
||||
float: right;
|
||||
position: relative;
|
||||
top: -11px;
|
||||
left: 8px;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background: #fffaea;
|
||||
padding: 0px;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
margin-top: 4px;
|
||||
box-shadow: 0 0 8px #fddf67;
|
||||
}
|
||||
|
||||
.purchase-premium .fa {
|
||||
position: relative;
|
||||
margin-right: 3px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Manual Trial Activation
|
||||
*/
|
||||
#trial-manual .onp-container {
|
||||
padding: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#trial-manual ul {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#trial-manual ul li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#trial-manual .license-reponse-code {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Manual Key Activation
|
||||
*/
|
||||
#activate-key-manual .onp-container {
|
||||
padding: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#activate-key-manual ul {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#activate-key-manual ul li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#activate-key-manual .license-reponse-code {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/**
|
||||
* FAQ
|
||||
*/
|
||||
|
||||
#faq-block {
|
||||
border-top: 1px solid #d7d7d7;
|
||||
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
|
||||
padding: 10px 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#faq-block .faq-header {
|
||||
border-bottom: 1px dotted #333;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
line-height: 16px;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#faq-block .faq-header:hover {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
#faq-block .faq-header:focus, #faq-block .faq-header:active {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
#faq-block li > div {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#faq-block p {
|
||||
margin: 6px 0 10px 0;
|
||||
font-size: 13px;
|
||||
line-height: 170%;
|
||||
}
|
||||
|
||||
#open-faq {
|
||||
color: #000 !important;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted #000;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
#open-faq:hover {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
.gray-link, .gray-link a {
|
||||
color: #666666 !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* A form to create a customer account
|
||||
*/
|
||||
|
||||
.onp-single-block .onp-header {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-header h4 {
|
||||
font-size: 26px;
|
||||
line-height: 130%;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container {
|
||||
padding: 50px 60px;
|
||||
border: 1px solid #bbb;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container .onp-container-header {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container .onp-container-header h4 {
|
||||
color: #000;
|
||||
margin: 0px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container .onp-container-header .onp-key-info {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container .onp-container-header .onp-key-info .fa {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container .onp-container-header .onp-icon {
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 30px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container p,
|
||||
.onp-single-block .onp-container li {
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container p + p {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-container .onp-form {
|
||||
text-align: left;
|
||||
padding: 10px 0 0 0;
|
||||
}
|
||||
|
||||
.onp-single-block #email {
|
||||
font-size: 26px;
|
||||
line-height: 26px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.onp-single-block .checkbox {
|
||||
padding-left: 25px;
|
||||
color: #999;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.onp-single-block .checkbox input {
|
||||
margin-left: -25px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-actions {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-actions .btn-primary {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-actions a.onp-cancel {
|
||||
text-decoration: none;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-actions a.onp-cancel:hover {
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #111;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-benefits {
|
||||
padding-left: 25px;
|
||||
margin-top: 15px;
|
||||
list-style: initial;
|
||||
}
|
||||
|
||||
.onp-single-block .onp-login-details {
|
||||
|
||||
}
|
||||
|
||||
.onp-single-block .onp-text-seporator {
|
||||
border-top: 1px solid #eee;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
#create-account .onp-container {
|
||||
background: #fff url("../img/create-account-bg.png") no-repeat 370px 230px !important;
|
||||
}
|
||||
|
||||
#account-created .onp-step {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#account-created .onp-steps {
|
||||
padding: 25px 0 20px 10px;
|
||||
}
|
||||
|
||||
#account-created .onp-step + .onp-step {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#account-created .onp-step .onp-num {
|
||||
font-size: 25px;
|
||||
line-height: 40px;
|
||||
background-color: #f5f5f5;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: inline-block;
|
||||
border-radius: 7px;
|
||||
text-align: center;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin-right: 10px;
|
||||
vertical-align: middle;
|
||||
font-weight: bolder;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
#account-created .onp-step .onp-desc {
|
||||
width: 490px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#finish .onp-container {
|
||||
background: #fff url("../img/finish.png") no-repeat 0 -90px !important;
|
||||
padding-left: 260px;
|
||||
min-height: 250px;
|
||||
|
||||
border-bottom: 3px solid #ccc;
|
||||
}
|
||||
|
||||
.wcl-loader {
|
||||
float: right;
|
||||
width: 32px;
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
.wclearfy-setup__color--red > .dashicons {
|
||||
color: #ff1c40;
|
||||
}
|
||||
.wclearfy-setup__color--green > .dashicons {
|
||||
color: #1fa21f;
|
||||
}
|
||||
.wclearfy-setup__install-component-button {
|
||||
background-color: #ff1c40 !important;
|
||||
border-color: #ff1c40 !important;
|
||||
color: white !important;
|
||||
text-transform: uppercase !important;
|
||||
border-radius: 5px !important;
|
||||
padding: 10px 30px !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.wclearfy-setup__install-component-button:link,
|
||||
.wclearfy-setup__install-component-button:active {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.wclearfy-setup__install-component-button:hover {
|
||||
color: #f3f4ef;
|
||||
}
|
||||
.wbcr-clearfy-danger-message {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
background: #ffe0de;
|
||||
color: #9c6e6e;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.wclearfy-gogle-page-speed-audit__preloader {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background: url("../../img/setup-preloader-124x124.gif") center no-repeat;
|
||||
}
|
||||
.wclearfy-gogle-page-speed-audit__errors {
|
||||
display: none;
|
||||
padding: 15px;
|
||||
background: #fddfdf;
|
||||
}
|
||||
.wclearfy-score {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.wclearfy-desktop-score,
|
||||
.wclearfy-mobile-score {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.wclearfy-score-circle {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.wclearfy-status-circle-text {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #aaa;
|
||||
font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 1.3125rem;
|
||||
font-weight: 300;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.wclearfy-score-circle .wclearfy-status-overlay-text {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 200%;
|
||||
text-align: center;
|
||||
transform: translate(-50%, -50%);
|
||||
font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 0.875rem;
|
||||
font-weight: normal;
|
||||
line-height: 1.3125;
|
||||
opacity: 0;
|
||||
color: #777;
|
||||
}
|
||||
.wclearfy-statistic {
|
||||
padding: 10px;
|
||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
.wclearfy-statistic .wclearfy-statistic__line {
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 8px;
|
||||
}
|
||||
.wclearfy-statistic .wclearfy-statistic__results {
|
||||
padding-right: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
/*# sourceMappingURL=page-setup.css.map */
|
||||
@@ -1,674 +0,0 @@
|
||||
/**
|
||||
* Styles for the Widget to be displayed in the Clearfy plugin
|
||||
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com>
|
||||
* @copyright Webcraftic 14.06.2019
|
||||
*/
|
||||
.wio-clear {
|
||||
clear: both;
|
||||
}
|
||||
#io_folders_statistic-wbcr_clearfy-tab,
|
||||
#io_nextgen_gallery_statistic-wbcr_clearfy-tab {
|
||||
display: none !important;
|
||||
}
|
||||
.wrio-statistic-nav {
|
||||
margin: 0;
|
||||
background: #efefef;
|
||||
}
|
||||
.wrio-statistic-nav ul {
|
||||
margin: 0;
|
||||
}
|
||||
.wrio-statistic-nav ul li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin: 0 0 0 0;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 -2px 0 #eaeaea;
|
||||
}
|
||||
.wrio-statistic-nav ul li:hover {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
.wrio-statistic-nav ul li.active {
|
||||
background: #f7f7f7;
|
||||
border-top: 1px solid #d4d4d4;
|
||||
border-left: 1px solid #d4d4d4;
|
||||
border-right: 1px solid #d4d4d4;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
.wrio-statistic-nav ul li.active a {
|
||||
color: #222;
|
||||
}
|
||||
.wrio-statistic-nav ul li.active a .wrio-statistic-tab-percent {
|
||||
border: 2px dashed #8bc34a;
|
||||
color: #5e8237;
|
||||
}
|
||||
.wrio-statistic-nav ul li.active .dashicons,
|
||||
.wrio-statistic-nav ul li.active .dashicons-before:before {
|
||||
color: #ff8b66;
|
||||
}
|
||||
.wrio-statistic-nav ul li .wrio-statistic-tab {
|
||||
display: block;
|
||||
padding: 10px 20px 10px 20px;
|
||||
text-decoration: none;
|
||||
color: #d4d4d4;
|
||||
font-size: 22px;
|
||||
line-height: 2;
|
||||
}
|
||||
.wrio-statistic-nav ul li .wrio-statistic-tab:active,
|
||||
.wrio-statistic-nav ul li .wrio-statistic-tab:focus {
|
||||
background: 0;
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
}
|
||||
.wrio-statistic-nav ul li .wrio-statistic-tab .dashicons,
|
||||
.wrio-statistic-nav ul li .wrio-statistic-tab .dashicons-before:before {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
font-size: 30px;
|
||||
line-height: 1.5;
|
||||
margin-right: 15px;
|
||||
color: #d4d4d4;
|
||||
}
|
||||
.wrio-statistic-nav ul li .wrio-statistic-tab .wrio-statistic-tab-percent {
|
||||
display: inline-block;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 100px;
|
||||
border: 2px dashed #e4e4e4;
|
||||
padding: 5px;
|
||||
margin-left: 30px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
color: #bdbdbd;
|
||||
}
|
||||
.wrio-statistic-nav ul li .wrio-statistic-tab-premium-label:after {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
content: 'PRO';
|
||||
background: #ff5722;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
line-height: 1;
|
||||
font-style: normal;
|
||||
padding: 4px 6px;
|
||||
margin-left: 4px;
|
||||
vertical-align: top;
|
||||
top: 10px;
|
||||
left: auto;
|
||||
right: 10px;
|
||||
z-index: 11;
|
||||
}
|
||||
.wrio-table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
box-sizing: border-box;
|
||||
border-spacing: 3px;
|
||||
background: #fff;
|
||||
border-top: 2px dashed #cac9c9;
|
||||
}
|
||||
.wrio-table th,
|
||||
.wrio-table td {
|
||||
padding: 16px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.wrio-table th {
|
||||
background: #f3f3f3;
|
||||
color: #777777;
|
||||
box-shadow: 0 1px 0 #d8d8d8;
|
||||
}
|
||||
.wrio-table th:nth-child(2n+1) {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.wrio-table tr.wrio-error {
|
||||
background-color: #ffe9e9 !important;
|
||||
}
|
||||
.wrio-table .wrio-table-spinner {
|
||||
background: url("../img/quick-start-loader.gif") center center no-repeat;
|
||||
}
|
||||
.wrio-table .wrio-table-highlighter {
|
||||
display: inline-block;
|
||||
padding: 3px 7px;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
.wrio-table .wbcr-rio-server-success {
|
||||
color: #8CC152;
|
||||
}
|
||||
.wrio-table .wbcr-rio-server-error {
|
||||
color: #fb5d49;
|
||||
}
|
||||
.wrio-table .wbcr-rio-server-warning {
|
||||
color: #ffb635;
|
||||
}
|
||||
.wrio-table.wbcr-rio-folders-table td:nth-child(3) {
|
||||
text-align: left;
|
||||
}
|
||||
.wrio-servers {
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.wrio-servers label span {
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
color: #b7b2b2;
|
||||
}
|
||||
.wrio-servers #wrio-change-optimization-server {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
max-width: 400px;
|
||||
margin-right: 15px;
|
||||
margin-bottom: 0;
|
||||
border: 1px solid #d2d0d0;
|
||||
background: #efefef;
|
||||
}
|
||||
.wrio-servers .wrio-servers-info {
|
||||
margin: 0 0 0;
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
}
|
||||
.wrio-servers .wrio-server-status-wrap {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.wrio-servers .wrio-server-status-wrap .wrio-server-status {
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
padding: 3px 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.wrio-servers .wrio-server-status-wrap .wrio-server-status.wrio-down {
|
||||
background: #ff5722;
|
||||
}
|
||||
.wrio-servers .wrio-server-status-wrap .wrio-server-status.wrio-stable {
|
||||
background: #8bc34a;
|
||||
}
|
||||
.wrio-servers .wrio-server-status-wrap .wrio-server-status.wrio-server-check-proccess {
|
||||
display: inline-block;
|
||||
height: 10px;
|
||||
width: 30px;
|
||||
background: url("../img/quick-start-loader.gif") center no-repeat;
|
||||
}
|
||||
.wrio-servers .wrio-premium-user-balance-wrap {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.wrio-servers .wrio-premium-user-balance-wrap .wrio-premium-user-balance {
|
||||
color: #fff;
|
||||
padding: 3px 5px;
|
||||
border-radius: 4px;
|
||||
background: #ffc107;
|
||||
}
|
||||
.wrio-servers .wrio-premium-user-balance-wrap .wrio-premium-user-balance-check-proccess {
|
||||
display: inline-block;
|
||||
height: 10px;
|
||||
width: 30px;
|
||||
background: url("../img/quick-start-loader.gif") center no-repeat;
|
||||
}
|
||||
.wio-columns {
|
||||
overflow: hidden;
|
||||
padding: 15px 0;
|
||||
counter-reset: cols;
|
||||
}
|
||||
.wio-columns [class^="col-"] {
|
||||
float: left;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wio-columns .col-1-3 {
|
||||
width: 33.333%;
|
||||
padding-left: 28px;
|
||||
}
|
||||
.wio-columns .col-2-3 {
|
||||
width: 66.666%;
|
||||
padding-left: 28px;
|
||||
}
|
||||
.wio-columns .col-1-2 {
|
||||
width: 50%;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.wio-columns .col-statistics.col-statistics {
|
||||
width: 60%;
|
||||
}
|
||||
.wio-columns .col-chart.col-chart {
|
||||
width: 40%;
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
background: #f1f1f1b3;
|
||||
color: #abacaf;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
text-align: left;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.wio-col {
|
||||
float: left;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
-webkit-flex-basis: 50%;
|
||||
-ms-flex-preferred-size: 50%;
|
||||
flex-basis: 50%;
|
||||
}
|
||||
.wio-col {
|
||||
padding-right: 20px;
|
||||
}
|
||||
.wio-col + .wio-col {
|
||||
padding-right: 0;
|
||||
padding-left: 50px;
|
||||
}
|
||||
.wio-col:target {
|
||||
animation: wiohello 1s 3 linear backwards;
|
||||
}
|
||||
.wio-number-you-optimized {
|
||||
margin-bottom: 1.35em;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wio-number-you-optimized #wio-total-optimized-attachments-pct {
|
||||
color: #828282;
|
||||
}
|
||||
.wio-number-you-optimized .wio-number {
|
||||
display: table-cell;
|
||||
padding-right: 15px;
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
color: #828282;
|
||||
}
|
||||
.wio-number-you-optimized .wio-text {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
color: #828282;
|
||||
}
|
||||
.wio-number-you-optimized > p {
|
||||
display: table;
|
||||
}
|
||||
.wio-bars {
|
||||
padding-right: 15px;
|
||||
}
|
||||
.wio-bars p {
|
||||
font-size: 12px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.wio-bars + .wio-number-you-optimized {
|
||||
border-bottom: 0;
|
||||
padding-top: 0.85em;
|
||||
}
|
||||
.wio-bars + .wio-number-you-optimized p {
|
||||
color: #72a53b;
|
||||
}
|
||||
.wio-bar-negative .wio-progress {
|
||||
background: #D2D3D6;
|
||||
}
|
||||
.wio-bar-negative .wio-barnb {
|
||||
color: #9d9fa5;
|
||||
}
|
||||
.wio-progress {
|
||||
height: 8px;
|
||||
transition: width 0.3s;
|
||||
/*.wio-bar-negative {
|
||||
width: 92% !important;
|
||||
}*/
|
||||
}
|
||||
.wio-bar-positive .wio-progress {
|
||||
background: #8CC152;
|
||||
}
|
||||
.wio-bar-positive .wio-barnb {
|
||||
color: #72a53b;
|
||||
}
|
||||
.wio-bar-primary .wio-progress {
|
||||
background: #8CC152;
|
||||
}
|
||||
.wio-bar-primary .wio-barnb {
|
||||
color: #72a53b;
|
||||
}
|
||||
.wio-right-outside-number .wio-barnb {
|
||||
display: block;
|
||||
margin-right: -5.25em;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
line-height: 0.8;
|
||||
}
|
||||
/* Doughnut */
|
||||
.wio-chart {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.wio-chart-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.wio-chart-container canvas {
|
||||
display: block;
|
||||
}
|
||||
.wio-overview-chart-container {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.wio-chart-percent {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
margin-top: -0.5em;
|
||||
line-height: 0.8;
|
||||
text-align: center;
|
||||
font-size: 54px;
|
||||
font-weight: bold;
|
||||
color: #afafaf;
|
||||
}
|
||||
.wio-chart-percent span {
|
||||
font-size: 20px;
|
||||
vertical-align: super;
|
||||
}
|
||||
#wio-overview-chart-legend {
|
||||
overflow: hidden;
|
||||
}
|
||||
.wio-doughnut-legend li {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-bottom: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 8px 2px 31px;
|
||||
font-size: 9px;
|
||||
cursor: default;
|
||||
-webkit-transition: background-color 200ms ease-in-out;
|
||||
-moz-transition: background-color 200ms ease-in-out;
|
||||
-o-transition: background-color 200ms ease-in-out;
|
||||
transition: background-color 200ms ease-in-out;
|
||||
}
|
||||
.wio-doughnut-legend li span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.wio-optimize-button {
|
||||
min-width: 180px;
|
||||
padding: 12px 30px;
|
||||
background: #c9deb2;
|
||||
color: #586549;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
font-size: 14px;
|
||||
text-transform: uppercase !important;
|
||||
font-weight: bold;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
}
|
||||
.wio-optimize-button:active {
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.wio-optimize-button:disabled {
|
||||
background: #e2edd6;
|
||||
color: #a5b295;
|
||||
}
|
||||
.wio-optimize-button.wio-running {
|
||||
color: #a57b3c;
|
||||
background: #fdd599 url("../img/Spinner-1s-33px.gif") 10px center no-repeat;
|
||||
padding-left: 50px;
|
||||
}
|
||||
.wio-global-optim-phrase {
|
||||
width: 180px;
|
||||
padding-top: 20px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
.wio-total-percent {
|
||||
color: #587f2e;
|
||||
}
|
||||
#wio-start-msg-top,
|
||||
#wio-start-msg-right,
|
||||
#wio-start-msg-complete {
|
||||
display: none;
|
||||
}
|
||||
.wio-text-left {
|
||||
text-align: left;
|
||||
}
|
||||
span.wio-num {
|
||||
display: inline !important;
|
||||
position: inherit !important;
|
||||
}
|
||||
.wio-image-optimize-board {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
.wio-page-statistic {
|
||||
padding-left: 40px;
|
||||
}
|
||||
.wio-page-statistic .wio-chart-percent {
|
||||
margin-top: -1.1em;
|
||||
}
|
||||
.wrio-optimization-progress {
|
||||
background: none;
|
||||
padding: 0;
|
||||
/*button {
|
||||
padding: 5px 10px;
|
||||
border: 0;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase !important;
|
||||
font-weight: bold;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
background: @greyButtonBg;
|
||||
color: @greyButtonColor;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
||||
|
||||
&:active {
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
&.wbcr-rio-loading {
|
||||
width: 56px;
|
||||
font-size: 0;
|
||||
background: @greyButtonBg url("../img/quick-start-loader.gif") center no-repeat;
|
||||
}
|
||||
|
||||
&.wbcr-rio-selected {
|
||||
background: #f3efe2;
|
||||
color: #d8d8d8;
|
||||
|
||||
&:active {
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
.wrio-optimization-progress h4 {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.wrio-optimization-progress .wbcr-rio-warning-message {
|
||||
padding: 20px;
|
||||
background: #efefef;
|
||||
font-size: 15px;
|
||||
color: #b7b7b7;
|
||||
font-style: italic;
|
||||
}
|
||||
.wio-widget {
|
||||
padding: 0 !important;
|
||||
}
|
||||
.wio-widget .wio-chart-percent {
|
||||
font-size: 44px;
|
||||
line-height: 1;
|
||||
}
|
||||
.wio-widget .wio-bars {
|
||||
width: 60%;
|
||||
margin-left: 155px;
|
||||
}
|
||||
.wio-widget .col-chart.col-chart {
|
||||
width: 100%;
|
||||
}
|
||||
.wio-widget .col-controls {
|
||||
width: 45%;
|
||||
padding-left: 5px;
|
||||
padding-top: 110px;
|
||||
}
|
||||
.wio-widget .wio-doughnut-legend {
|
||||
/*padding-top:30px;*/
|
||||
text-align: left;
|
||||
}
|
||||
.wio-widget .wio-widget-bottom {
|
||||
display: table;
|
||||
padding-top: 20px !important;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
.wio-widget .wio-widget-bottom li {
|
||||
display: table-cell;
|
||||
}
|
||||
.wio-widget .wio-widget-bottom li:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
.factory-checkbox.wrio-checkbox-premium-label:after {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
content: 'PRO';
|
||||
background: #ff5722;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
line-height: 1;
|
||||
font-style: normal;
|
||||
padding: 4px 6px;
|
||||
margin-left: 4px;
|
||||
vertical-align: top;
|
||||
top: -8px;
|
||||
left: -10px;
|
||||
right: auto;
|
||||
z-index: 11;
|
||||
}
|
||||
.factory-checkbox-disabled input,
|
||||
.factory-checkbox-disabled button {
|
||||
pointer-events: none;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.65;
|
||||
filter: alpha(opacity=65);
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
#wrio-webp-options h3,
|
||||
#wrio-error-log-options h3 {
|
||||
font-size: 14px;
|
||||
margin: 0 0 10px 0;
|
||||
font-weight: 600;
|
||||
color: #565656;
|
||||
}
|
||||
#wrio-webp-options .wrio-webp-options-info,
|
||||
#wrio-error-log-options .wrio-webp-options-info {
|
||||
color: #8a8787;
|
||||
font-size: 12px;
|
||||
}
|
||||
#wrio-webp-options ul,
|
||||
#wrio-error-log-options ul {
|
||||
padding-left: 0;
|
||||
}
|
||||
#wrio-webp-options ul li:after,
|
||||
#wrio-error-log-options ul li:after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
#wrio-webp-options ul li label,
|
||||
#wrio-error-log-options ul li label {
|
||||
font-weight: 600;
|
||||
}
|
||||
#wrio-webp-options ul li .wrio-webp-options-radio,
|
||||
#wrio-error-log-options ul li .wrio-webp-options-radio,
|
||||
#wrio-webp-options ul li .wrio-error-log-options-checkbox,
|
||||
#wrio-error-log-options ul li .wrio-error-log-options-checkbox {
|
||||
display: block;
|
||||
float: left;
|
||||
margin-top: 2px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
#wrio-webp-options ul li .wrio-webp-options-radio:focus,
|
||||
#wrio-error-log-options ul li .wrio-webp-options-radio:focus,
|
||||
#wrio-webp-options ul li .wrio-error-log-options-checkbox:focus,
|
||||
#wrio-error-log-options ul li .wrio-error-log-options-checkbox:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
#wrio-webp-options ul li .wrio-webp-options-info,
|
||||
#wrio-error-log-options ul li .wrio-webp-options-info,
|
||||
#wrio-webp-options ul li .wrio-error-log-options-info,
|
||||
#wrio-error-log-options ul li .wrio-error-log-options-info {
|
||||
padding-left: 25px;
|
||||
}
|
||||
@media (max-width: 830px) {
|
||||
.wio [class^="col-"] {
|
||||
float: none;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
.wio .col-1-3,
|
||||
.wio .col-1-2 {
|
||||
width: auto;
|
||||
padding: 0 28px;
|
||||
clear: both;
|
||||
padding-top: 1em;
|
||||
}
|
||||
}
|
||||
@keyframes wiohello {
|
||||
0%,
|
||||
100% {
|
||||
background: #FFF;
|
||||
}
|
||||
50% {
|
||||
background: #F4F7F9;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1520px) and (min-width: 1381px), (max-width: 1086px) {
|
||||
.wio-columns .col-statistics.col-statistics,
|
||||
.wio-columns .col-chart.col-chart {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 808px) {
|
||||
.wio-columns .col-statistics.col-statistics,
|
||||
.wio-columns .col-chart.col-chart {
|
||||
width: auto;
|
||||
float: none;
|
||||
padding: 0;
|
||||
}
|
||||
.wio-columns .col-chart.col-chart {
|
||||
margin-top: 3em;
|
||||
}
|
||||
}
|
||||
/*@media (max-width: 1380px) and (min-width: 1246px), (max-width: 380px) {
|
||||
.wio-overview-chart-container {
|
||||
float: none;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1380px) and (min-width: 1246px), (max-width: 380px) {
|
||||
.wio-overview-chart-container {
|
||||
float: none;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.wio-doughnut-legend {
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.wio-global-optim-phrase {
|
||||
padding-top: 0;
|
||||
width: auto;
|
||||
}
|
||||
}*/
|
||||
/*# sourceMappingURL=step-optimize-images.css.map */
|
||||
@@ -1,179 +0,0 @@
|
||||
/**
|
||||
* Gutenber autosave control. A simple solution for managing autosaves in gutenberg editor.
|
||||
* Previously, we simply turned off autosave using hooks, but in the editor,
|
||||
* you can’t do this in the gutenber.
|
||||
*
|
||||
* This widget for Gutenberg editor adds an icon, when clicked, you can select the autosave interval or full disable it.
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 10.12.2018, Webcraftic
|
||||
* @version 1.0
|
||||
*
|
||||
* Credits:
|
||||
* This is not our development, we found excellent plugin and used these functions in our plugin. It is foolish to reinvent the wheel.
|
||||
* I hope in the future we will refine it better and add our ideas.
|
||||
* In the development of the code used by the author plugin: https://wordpress.org/plugins/disable-gutenberg-autosave/
|
||||
*/
|
||||
|
||||
const NOT_TODAY = 99999;
|
||||
|
||||
const INTERVAL_OPTIONS = [
|
||||
{
|
||||
label: '10 seconds (default)',
|
||||
value: 10,
|
||||
},
|
||||
{
|
||||
label: '30 seconds',
|
||||
value: 30,
|
||||
},
|
||||
{
|
||||
label: '1 minute',
|
||||
value: 60,
|
||||
},
|
||||
{
|
||||
label: '5 minutes',
|
||||
value: 60 * 5,
|
||||
},
|
||||
{
|
||||
label: '10 minutes',
|
||||
value: 60 * 10,
|
||||
},
|
||||
{
|
||||
label: '30 minutes',
|
||||
value: 60 * 30,
|
||||
},
|
||||
{
|
||||
label: 'Disabled',
|
||||
value: NOT_TODAY,
|
||||
},
|
||||
];
|
||||
|
||||
class ClearfyGutenbergAutosave extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
interval: 0,
|
||||
error: false,
|
||||
};
|
||||
|
||||
this.apiGetInterval = this.apiGetInterval.bind(this);
|
||||
this.apiSetInterval = this.apiSetInterval.bind(this);
|
||||
this.editorUpdateInterval = this.editorUpdateInterval.bind(this);
|
||||
}
|
||||
|
||||
apiGetInterval() {
|
||||
wp.apiFetch({path: '/clearfy-gutenberg-autosave/v1/interval'})
|
||||
.then(
|
||||
interval => {
|
||||
this.setState({
|
||||
interval,
|
||||
error: false,
|
||||
});
|
||||
},
|
||||
error => {
|
||||
this.setState({
|
||||
interval: NOT_TODAY,
|
||||
error: error.message,
|
||||
});
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
apiSetInterval() {
|
||||
if( this.state.error ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp.apiFetch({
|
||||
path: '/clearfy-gutenberg-autosave/v1/interval?interval=' + parseInt(this.state.interval),
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
editorUpdateInterval() {
|
||||
this.props.updateEditorSettings(
|
||||
Object.assign(
|
||||
{},
|
||||
this.props.editorSettings,
|
||||
{autosaveInterval: parseInt(this.state.interval)}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.apiGetInterval();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
if( !this.state.interval ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if( prevState.interval && prevState.inverval !== 0 && prevState.interval !== this.state.interval ) {
|
||||
this.apiSetInterval();
|
||||
}
|
||||
|
||||
if( this.props.editorSettings.autosaveInterval && this.props.editorSettings.autosaveInterval !== this.state.interval ) {
|
||||
this.editorUpdateInterval();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<wp.editPost.PluginSidebarMoreMenuItem target='disable-gutenberg-autosave-sidebar'>
|
||||
{'Clearfy Gutenberg Autosave'}
|
||||
</wp.editPost.PluginSidebarMoreMenuItem>
|
||||
<wp.editPost.PluginSidebar name='disable-gutenberg-autosave-sidebar' title={'Autosave settings'}>
|
||||
<wp.components.PanelBody className='disable-gutenberg-autosave-settings'>
|
||||
{!this.state.interval && <p>{'Loading...'}</p>}
|
||||
{(!!this.state.interval && this.state.error) && (
|
||||
<React.Fragment>
|
||||
<h2 className='disable-gutenberg-autosave-header'>{'API error:'}</h2>
|
||||
<p className='disable-gutenberg-autosave-error'>{this.state.error}</p>
|
||||
<p>{'Autosave is disabled anyway, but you cannot set custom intervals.'}</p>
|
||||
<wp.components.Button
|
||||
className='button button-primary'
|
||||
onClick={() => {
|
||||
this.setState({
|
||||
interval: 0,
|
||||
error: false,
|
||||
});
|
||||
this.apiGetInterval();
|
||||
}}
|
||||
>
|
||||
{'Try again'}
|
||||
</wp.components.Button>
|
||||
</React.Fragment>
|
||||
)}
|
||||
{(!!this.state.interval && !this.state.error) && (
|
||||
<wp.components.RadioControl
|
||||
label={'Autosave interval'}
|
||||
options={INTERVAL_OPTIONS}
|
||||
selected={parseInt(this.state.interval)}
|
||||
onChange={value => this.setState({interval: parseInt(value)})}
|
||||
/>
|
||||
)}
|
||||
</wp.components.PanelBody>
|
||||
</wp.editPost.PluginSidebar>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
wp.plugins.registerPlugin('clearfy-gutenberg-autosave', {
|
||||
icon: 'backup',
|
||||
render: wp.compose.compose([
|
||||
wp.data.withSelect(select => {
|
||||
return {
|
||||
editorSettings: select('core/editor').getEditorSettings(),
|
||||
};
|
||||
}),
|
||||
wp.data.withDispatch(dispatch => {
|
||||
return {
|
||||
updateEditorSettings: dispatch('core/editor').updateEditorSettings,
|
||||
};
|
||||
}),
|
||||
])(ClearfyGutenbergAutosave),
|
||||
});
|
||||
@@ -1,28 +0,0 @@
|
||||
// node module that let's us do file system stuffs...
|
||||
const path = require('path');
|
||||
|
||||
// Webpack expects an exported object with all the configurations, so we export an object here
|
||||
module.exports = {
|
||||
entry: './src/index.js', // Where to find our main js
|
||||
output: {
|
||||
// where we want our built file to go to and be named
|
||||
// I name it index.build.js so I keep index files separate
|
||||
filename: 'index.build.js',
|
||||
// we're going to put our built file in a './build/' folder
|
||||
path: path.resolve(__dirname, 'build')
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
// basically tells webpack to use babel with the correct presets
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
presets: ['@babel/preset-env', '@babel/preset-react']
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Webpack yells at you if you don't choose a mode...
|
||||
mode: 'development'
|
||||
}
|
||||
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 842 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -1,139 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 04.02.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
//wfCircularProgress
|
||||
jQuery.fn.wfCircularProgress = function (options) {
|
||||
jQuery(this).each(function () {
|
||||
var creationOptions;
|
||||
try {
|
||||
creationOptions = JSON.parse(jQuery(this).data('wfCircularProgressOptions'));
|
||||
} catch (e) { /* Ignore */
|
||||
}
|
||||
if (typeof creationOptions !== 'object') {
|
||||
creationOptions = {};
|
||||
}
|
||||
var opts = jQuery.extend({}, jQuery.fn.wfCircularProgress.defaults, creationOptions, options);
|
||||
|
||||
var center = Math.floor(opts.diameter / 2);
|
||||
var insetRadius = center - opts.strokeWidth * 2;
|
||||
|
||||
var circumference = 2 * insetRadius * Math.PI;
|
||||
var finalOffset = -(circumference * (1 - opts.endPercent));
|
||||
var initialOffset = -(circumference);
|
||||
|
||||
var terminatorRadius = Math.floor(opts.strokeWidth * 1.5);
|
||||
var terminatorDiameter = 2 * terminatorRadius;
|
||||
var finalTerminatorX = center - insetRadius * Math.cos(Math.PI * 2 * (opts.endPercent - 0.25));
|
||||
var finalTerminatorY = center + insetRadius * Math.sin(Math.PI * 2 * (opts.endPercent - 0.25));
|
||||
var initialTerminatorX = center - insetRadius * Math.cos(Math.PI * 2 * (opts.startPercent - 0.25));
|
||||
var initialTerminatorY = center + insetRadius * Math.sin(Math.PI * 2 * (opts.startPercent - 0.25));
|
||||
|
||||
var terminatorSVG = "m 0,-" + terminatorRadius + " a " + terminatorRadius + "," + terminatorRadius + " 0 1 1 0," + terminatorDiameter + " a " + terminatorRadius + "," + terminatorRadius + " 0 1 1 0,-" + terminatorDiameter;
|
||||
|
||||
jQuery(this).data('wfCircularProgressOptions', JSON.stringify(opts));
|
||||
|
||||
jQuery(this).css('width', opts.diameter + 'px');
|
||||
jQuery(this).css('height', opts.diameter + 'px');
|
||||
|
||||
var svg = jQuery(this).find('svg');
|
||||
if (svg.length === 0) {
|
||||
svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
||||
jQuery(this).append(svg);
|
||||
}
|
||||
var inactivePath = jQuery(this).find('.wclearfy-status-circle-inactive-path');
|
||||
if (inactivePath.length === 0) {
|
||||
inactivePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
||||
jQuery(inactivePath).addClass('wclearfy-status-circle-inactive-path');
|
||||
jQuery(svg).append(inactivePath);
|
||||
}
|
||||
var activePath = jQuery(this).find('.wclearfy-status-circle-active-path');
|
||||
if (activePath.length === 0) {
|
||||
activePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
||||
jQuery(activePath).addClass('wclearfy-status-circle-active-path');
|
||||
jQuery(svg).append(activePath);
|
||||
}
|
||||
var terminator = jQuery(this).find('.wclearfy-status-circle-terminator');
|
||||
if (terminator.length === 0) {
|
||||
terminator = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
||||
jQuery(terminator).addClass('wclearfy-status-circle-terminator');
|
||||
jQuery(svg).append(terminator);
|
||||
}
|
||||
var text = jQuery(this).find('.wclearfy-status-circle-text');
|
||||
if (text.length === 0) {
|
||||
text = jQuery('<div class="wclearfy-status-circle-text"></div>');
|
||||
jQuery(this).append(text);
|
||||
}
|
||||
var pendingOverlay = jQuery(this).find('.wf-status-overlay-text');
|
||||
if (pendingOverlay.length === 0 && opts.pendingMessage.length !== 0) {
|
||||
pendingOverlay = jQuery('<div class="wclearfy-status-overlay-text"></div>');
|
||||
jQuery(this).append(pendingOverlay);
|
||||
}
|
||||
|
||||
jQuery(svg).attr('viewBox', '0 0 ' + opts.diameter + ' ' + opts.diameter);
|
||||
jQuery(svg).css('display', opts.css_display);
|
||||
jQuery(svg).css('width', opts.diameter + 'px');
|
||||
jQuery(svg).css('height', opts.diameter + 'px');
|
||||
jQuery(inactivePath).attr('d', 'M ' + center + ',' + center + ' m 0,-' + insetRadius + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,' + (2 * insetRadius) + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,-' + (2 * insetRadius));
|
||||
jQuery(inactivePath).attr('stroke', opts.inactiveColor);
|
||||
jQuery(inactivePath).attr('stroke-width', opts.strokeWidth);
|
||||
jQuery(inactivePath).attr('fill-opacity', 0);
|
||||
jQuery(activePath).attr('d', 'M ' + center + ',' + center + ' m 0,-' + insetRadius + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,' + (2 * insetRadius) + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,-' + (2 * insetRadius));
|
||||
jQuery(activePath).attr('stroke', opts.color);
|
||||
jQuery(activePath).attr('stroke-width', opts.strokeWidth);
|
||||
jQuery(activePath).attr('stroke-dasharray', circumference + ',' + circumference);
|
||||
jQuery(activePath).attr('stroke-dashoffset', initialOffset);
|
||||
jQuery(activePath).attr('fill-opacity', 0);
|
||||
jQuery(terminator).attr('d', 'M ' + initialTerminatorX + ',' + initialTerminatorY + ' ' + terminatorSVG);
|
||||
jQuery(terminator).attr('stroke', opts.color);
|
||||
jQuery(terminator).attr('stroke-width', opts.strokeWidth);
|
||||
jQuery(terminator).attr('fill', '#ffffff');
|
||||
jQuery(pendingOverlay).html(opts.pendingMessage);
|
||||
|
||||
jQuery(pendingOverlay).animate({
|
||||
opacity: opts.pendingOverlay ? 1.0 : 0.0,
|
||||
}, {
|
||||
duration: 500,
|
||||
step: function (value) {
|
||||
var opacity = 1.0 - (value * 0.8);
|
||||
jQuery(svg).css('opacity', opacity);
|
||||
jQuery(text).css('opacity', opacity);
|
||||
},
|
||||
complete: function () {
|
||||
jQuery(svg).css('opacity', opts.pendingOverlay ? 0.2 : 1.0);
|
||||
jQuery(text).css('opacity', opts.pendingOverlay ? 0.2 : 1.0);
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(activePath).animate({
|
||||
"stroke-dashoffset": finalOffset + 'px'
|
||||
}, {
|
||||
duration: 500,
|
||||
step: function (value) {
|
||||
var percentage = 1 + value / circumference;
|
||||
var x = center - insetRadius * Math.cos(Math.PI * 2 * (percentage - 0.25));
|
||||
var y = center + insetRadius * Math.sin(Math.PI * 2 * (percentage - 0.25));
|
||||
jQuery(terminator).attr('d', 'M ' + x + ',' + y + ' ' + terminatorSVG);
|
||||
text.html(Math.round(percentage * 100));
|
||||
},
|
||||
complete: function () {
|
||||
text.html(Math.round(opts.endPercent * 100));
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
jQuery.fn.wfCircularProgress.defaults = {
|
||||
startPercent: 0,
|
||||
endPercent: 1,
|
||||
color: '#16bc9b',
|
||||
inactiveColor: '#ececec',
|
||||
strokeWidth: 3,
|
||||
diameter: 100,
|
||||
pendingOverlay: false,
|
||||
pendingMessage: 'Note: Status will update when changes are saved',
|
||||
css_display: 'block',
|
||||
};
|
||||
@@ -1,308 +0,0 @@
|
||||
/**
|
||||
* General
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 10.09.2017, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
var general = {
|
||||
init: function() {
|
||||
this.qickStartAssistent();
|
||||
this.importOptions();
|
||||
|
||||
/*$.wfactory_480.hooks.add('core/components/pre_activate', function(button) {
|
||||
// Выполняем код ниже, только на страницах плагина с интерфейсом Clearfy
|
||||
if( !$('#WBCR').length ) {
|
||||
return false;
|
||||
}
|
||||
if( button.closest('.wbcr-clr-new-component').length ) {
|
||||
button.closest('.wbcr-clr-new-component').remove();
|
||||
}
|
||||
if( button.closest('.wbcr-clearfy-fake-image-optimizer-board').length ) {
|
||||
button.remove();
|
||||
window.location.reload();
|
||||
}
|
||||
});*/
|
||||
|
||||
/*$.wfactory_480.hooks.add('core/components/updated', function(button, data, response) {
|
||||
// Выполняем код ниже, только на страницах плагина с интерфейсом Clearfy
|
||||
if( !($('#WBCR').length && $.wbcr_factory_templates_134) ) {
|
||||
return false;
|
||||
}
|
||||
if( response.data.need_rewrite_rules && !$('.wbcr-clr-need-rewrite-rules-message').length ) {
|
||||
$.wbcr_factory_templates_134.app.showNotice(response.data.need_rewrite_rules, 'warning');
|
||||
}
|
||||
});*/
|
||||
},
|
||||
qickStartAssistent: function() {
|
||||
var self = this;
|
||||
|
||||
$('.wbcr-clearfy-button-activate-mode').click(function() {
|
||||
|
||||
var switcher = $(this).closest('.wbcr-clearfy-switch'),
|
||||
modeName = switcher.data('mode'),
|
||||
modeOptions = switcher.data('mode-options');
|
||||
|
||||
if( switcher.hasClass('wbcr-clearfy-loading') || switcher.hasClass('wbcr-clearfy-active') ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
self.showConfirmationPopup(modeName, modeOptions);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.wbcr-clearfy-popup-button-cancel').click(function() {
|
||||
self.hideConfirmationPopup();
|
||||
});
|
||||
|
||||
/*$('.wbcr-clearfy-button-deativate-mode').click(function() {
|
||||
var $this = $(this),
|
||||
switcher = $(this).closest('.wbcr-clearfy-switch'),
|
||||
modeName = switcher.data('mode');
|
||||
if( switcher.hasClass('wbcr-clearfy-loading') ) {
|
||||
return false;
|
||||
}
|
||||
switcher.addClass('wbcr-clearfy-loading');
|
||||
self.sendRequest({
|
||||
action: 'wbcr_clearfy_configurate',
|
||||
mode: modeName,
|
||||
cancel_mode: true
|
||||
}, function(data) {
|
||||
switcher.removeClass('wbcr-clearfy-loading');
|
||||
if( data && data.export_options ) {
|
||||
$('#wbcr-clearfy-import-export').html(data.export_options);
|
||||
}
|
||||
},
|
||||
function() {
|
||||
if( modeName != 'reset' ) {
|
||||
switcher.removeClass('wbcr-clearfy-active');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});*/
|
||||
|
||||
$('.wbcr-clearfy-popup-button-ok').click(function() {
|
||||
var $this = $(this), modeName = $this.closest('.wbcr-clearfy-confirm-popup').data('mode'),
|
||||
switcher = $('div[data-mode="' + modeName + '"]', '#wbcr-clearfy-quick-mode-board'),
|
||||
modeArgs = switcher.data('mode-args'),
|
||||
flushRedirect = modeArgs && modeArgs.flush_redirect;
|
||||
|
||||
self.hideConfirmationPopup();
|
||||
switcher.addClass('wbcr-clearfy-loading');
|
||||
|
||||
self.sendRequest({
|
||||
action: 'wbcr_clearfy_configurate',
|
||||
mode: modeName,
|
||||
flush_redirect: flushRedirect
|
||||
}, function(data) {
|
||||
if( !flushRedirect ) {
|
||||
switcher.removeClass('wbcr-clearfy-loading');
|
||||
}
|
||||
|
||||
if( !data || data.error ) {
|
||||
/**
|
||||
* Хук выполняет проивольную функцию, после того как получен ajax ответ о том, что в
|
||||
* результате конфигурации произошла ошибка Реализация системы фильтров и хуков в файле
|
||||
* libs/clearfy/admin/assests/js/global.js Пример регистрации хука
|
||||
* $.wbcr_factory_templates_134.hooks.add('wbcr/factory_templates_134/updated',
|
||||
* function(noticeId) {});
|
||||
* @param {string} modeName - имя режима конфигурации
|
||||
* @param {object} data
|
||||
*/
|
||||
|
||||
$.wbcr_factory_templates_134.hooks.run('clearfy/quick_start/configurated_error', [
|
||||
modeName,
|
||||
data
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
if( data.export_options ) {
|
||||
$('#wbcr-clearfy-import-export').html(data.export_options);
|
||||
}
|
||||
},
|
||||
function(data) {
|
||||
|
||||
/**
|
||||
* Хук выполняет проивольную функцию, после того как получен ajax ответ об успешном выполнении
|
||||
* конфигурации Реализация системы фильтров и хуков в файле
|
||||
* libs/clearfy/admin/assests/js/global.js Пример регистрации хука
|
||||
* $.wbcr_factory_templates_134.hooks.add('wbcr/factory_templates_134/updated', function(noticeId)
|
||||
* {});
|
||||
* @param {string} modeName - имя режима конфигурации
|
||||
* @param {object} data
|
||||
*/
|
||||
$.wbcr_factory_templates_134.hooks.run('clearfy/quick_start/configurated', [modeName, data]);
|
||||
|
||||
if( modeName !== 'reset' ) {
|
||||
switcher.addClass('wbcr-clearfy-active');
|
||||
return;
|
||||
}
|
||||
|
||||
$('.wbcr-clearfy-switch').removeClass('wbcr-clearfy-active');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
showConfirmationPopup: function(modeName, options) {
|
||||
var self = this;
|
||||
|
||||
if( !$('.wbcr-clearfy-layer').length ) {
|
||||
var layer = $('<div></div>').addClass('wbcr-clearfy-layer');
|
||||
layer.prependTo('#wpbody');
|
||||
layer.fadeIn();
|
||||
} else {
|
||||
$('.wbcr-clearfy-layer').fadeIn();
|
||||
}
|
||||
|
||||
var popupElem = $('.wbcr-clearfy-confirm-popup');
|
||||
popupElem.data('mode', modeName);
|
||||
popupElem.fadeIn();
|
||||
|
||||
if( modeName !== 'reset' ) {
|
||||
var printOptTitles = '';
|
||||
|
||||
if( options ) {
|
||||
for( var opt in options ) {
|
||||
if( !options.hasOwnProperty(opt) ) {
|
||||
continue;
|
||||
}
|
||||
printOptTitles += '<li>' + options[opt] + '</li>';
|
||||
|
||||
}
|
||||
$('.wbcr-clearfy-list-options').html(printOptTitles);
|
||||
popupElem.addClass('wbcr-clearfy-default-warning-options');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
popupElem.addClass('wbcr-clearfy-reset-warning-options');
|
||||
},
|
||||
|
||||
hideConfirmationPopup: function() {
|
||||
$('.wbcr-clearfy-layer').fadeOut(100);
|
||||
var popupElem = $('.wbcr-clearfy-confirm-popup');
|
||||
|
||||
popupElem.fadeOut(100, function() {
|
||||
popupElem.removeClass('wbcr-clearfy-default-warning-options');
|
||||
popupElem.removeClass('wbcr-clearfy-reset-warning-options');
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
importOptions: function() {
|
||||
var self = this;
|
||||
|
||||
$('.wbcr-clearfy-import-options-button').click(function() {
|
||||
var settings = $('#wbcr-clearfy-import-export').val(),
|
||||
$this = $(this);
|
||||
|
||||
if( !settings ) {
|
||||
$.wbcr_factory_templates_134.app.showNotice('Import options is empty!', 'danger');
|
||||
return false;
|
||||
}
|
||||
|
||||
if( void 0 === wbcr_clearfy_ajax || !wbcr_clearfy_ajax.import_options_nonce ) {
|
||||
$.wbcr_factory_templates_134.app.showNotice('Unknown Javascript error, most likely the wbcr_clearfy_ajax variable does not exist!', 'danger');
|
||||
return false;
|
||||
}
|
||||
|
||||
$(this).prop('disabled', true);
|
||||
|
||||
self.sendRequest({
|
||||
action: 'wbcr-clearfy-import-settings',
|
||||
_wpnonce: wbcr_clearfy_ajax.import_options_nonce,
|
||||
settings: settings
|
||||
}, function(response) {
|
||||
$this.prop('disabled', false);
|
||||
|
||||
if( response.data.update_notice ) {
|
||||
if( !$('.wbcr-clr-update-package').length ) {
|
||||
$.wbcr_factory_templates_134.app.showNotice(response.data.update_notice);
|
||||
}
|
||||
} else {
|
||||
if( $('.wbcr-clr-update-package').length ) {
|
||||
$('.wbcr-clr-update-package').closest('.wbcr-factory-warning-notice').remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
},
|
||||
sendRequest: function(request_data, beforeValidateCallback, successCallback) {
|
||||
var self = this;
|
||||
|
||||
if( wbcr_clearfy_ajax === undefined ) {
|
||||
console.log('Undefinded wbcr_clearfy_ajax object.');
|
||||
return;
|
||||
}
|
||||
|
||||
if( typeof request_data === 'object' ) {
|
||||
request_data.security = wbcr_clearfy_ajax.ajax_nonce;
|
||||
}
|
||||
|
||||
$.ajax(ajaxurl, {
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: request_data,
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
var noticeId;
|
||||
|
||||
beforeValidateCallback && beforeValidateCallback(data);
|
||||
|
||||
if( !data || data.error ) {
|
||||
console.log(data);
|
||||
|
||||
if( data ) {
|
||||
noticeId = $.wbcr_factory_templates_134.app.showNotice(data.error_message, 'danger');
|
||||
} else {
|
||||
if( void 0 !== wbcr_clearfy_ajax ) {
|
||||
noticeId = $.wbcr_factory_templates_134.app.showNotice(wbcr_clearfy_ajax.i18n.unknown_error, 'danger');
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
$.wbcr_factory_templates_134.app.hideNotice(noticeId);
|
||||
}, 5000);
|
||||
return;
|
||||
}
|
||||
|
||||
successCallback && successCallback(data);
|
||||
|
||||
if( !request_data.flush_redirect ) {
|
||||
if( void 0 !== wbcr_clearfy_ajax ) {
|
||||
noticeId = $.wbcr_factory_templates_134.app.showNotice(wbcr_clearfy_ajax.i18n.success_update_settings, 'success');
|
||||
|
||||
setTimeout(function() {
|
||||
$.wbcr_factory_templates_134.app.hideNotice(noticeId);
|
||||
}, 5000);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
window.location.href = wbcr_clearfy_ajax.flush_cache_url;
|
||||
// открыть уведомление
|
||||
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
console.log(xhr.status);
|
||||
console.log(xhr.responseText);
|
||||
console.log(thrownError);
|
||||
|
||||
var noticeId = $.wbcr_factory_templates_134.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
general.init();
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
@@ -1,286 +0,0 @@
|
||||
/**
|
||||
* General
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 10.09.2017, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
var general = {
|
||||
init: function() {
|
||||
this.qickStartAssistent();
|
||||
this.importOptions();
|
||||
|
||||
/*$.wfactory_000.hooks.add('core/components/pre_activate', function(button) {
|
||||
// Выполняем код ниже, только на страницах плагина с интерфейсом Clearfy
|
||||
if( !$('#WBCR').length ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( button.closest('.wbcr-clr-new-component').length ) {
|
||||
button.closest('.wbcr-clr-new-component').remove();
|
||||
}
|
||||
|
||||
if( button.closest('.wbcr-clearfy-fake-image-optimizer-board').length ) {
|
||||
button.remove();
|
||||
window.location.reload();
|
||||
}
|
||||
});*/
|
||||
|
||||
/*$.wfactory_000.hooks.add('core/components/updated', function(button, data, response) {
|
||||
// Выполняем код ниже, только на страницах плагина с интерфейсом Clearfy
|
||||
if( !($('#WBCR').length && $.wbcr_factory_templates_000) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( response.data.need_rewrite_rules && !$('.wbcr-clr-need-rewrite-rules-message').length ) {
|
||||
$.wbcr_factory_templates_000.app.showNotice(response.data.need_rewrite_rules, 'warning');
|
||||
}
|
||||
|
||||
});*/
|
||||
},
|
||||
qickStartAssistent: function() {
|
||||
var self = this;
|
||||
|
||||
$('.wbcr-clearfy-button-activate-mode').click(function() {
|
||||
|
||||
var modeName = $(this).data('mode'),
|
||||
modeOptions = $(this).data('mode-options');
|
||||
|
||||
if( $(this).hasClass('wbcr-clearfy-loading') || $(this).hasClass('wbcr-clearfy-active') ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
self.showConfirmationPopup(modeName, modeOptions);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.wbcr-clearfy-popup-button-cancel').click(function() {
|
||||
self.hideConfirmationPopup();
|
||||
});
|
||||
|
||||
$('.wbcr-clearfy-popup-button-ok').click(function() {
|
||||
var $this = $(this), modeName = $this.closest('.wbcr-clearfy-confirm-popup').data('mode'),
|
||||
switcher = $('div[data-mode="' + modeName + '"]', '#wbcr-clearfy-quick-mode-board'),
|
||||
modeArgs = switcher.data('mode-args'),
|
||||
flushRedirect = modeArgs && modeArgs.flush_redirect;
|
||||
|
||||
self.hideConfirmationPopup();
|
||||
switcher.addClass('wbcr-clearfy-loading');
|
||||
|
||||
self.sendRequest({
|
||||
action: 'wbcr_clearfy_configurate',
|
||||
mode: modeName,
|
||||
flush_redirect: flushRedirect
|
||||
}, function(data) {
|
||||
|
||||
if( !flushRedirect ) {
|
||||
switcher.removeClass('wbcr-clearfy-loading');
|
||||
}
|
||||
|
||||
if( !data || data.error ) {
|
||||
/**
|
||||
* Хук выполняет проивольную функцию, после того как получен ajax ответ о том, что в
|
||||
* результате конфигурации произошла ошибка Реализация системы фильтров и хуков в файле
|
||||
* libs/clearfy/admin/assests/js/global.js Пример регистрации хука
|
||||
* $.wbcr_factory_templates_000.hooks.add('wbcr/factory_templates_000/updated',
|
||||
* function(noticeId) {});
|
||||
* @param {string} modeName - имя режима конфигурации
|
||||
* @param {object} data
|
||||
*/
|
||||
|
||||
$.wbcr_factory_templates_000.hooks.run('clearfy/quick_start/configurated_error', [
|
||||
modeName,
|
||||
data
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
if( data.export_options ) {
|
||||
$('#wbcr-clearfy-import-export').html(data.export_options);
|
||||
}
|
||||
},
|
||||
function(data) {
|
||||
|
||||
/**
|
||||
* Хук выполняет проивольную функцию, после того как получен ajax ответ об успешном выполнении
|
||||
* конфигурации Реализация системы фильтров и хуков в файле
|
||||
* libs/clearfy/admin/assests/js/global.js Пример регистрации хука
|
||||
* $.wbcr_factory_templates_000.hooks.add('wbcr/factory_templates_000/updated', function(noticeId)
|
||||
* {});
|
||||
* @param {string} modeName - имя режима конфигурации
|
||||
* @param {object} data
|
||||
*/
|
||||
$.wbcr_factory_templates_000.hooks.run('clearfy/quick_start/configurated', [modeName, data]);
|
||||
|
||||
if( modeName !== 'reset' ) {
|
||||
switcher.addClass('wbcr-clearfy-active');
|
||||
return;
|
||||
}
|
||||
|
||||
$('.wbcr-clearfy-switch').removeClass('wbcr-clearfy-active');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
showConfirmationPopup: function(modeName, options) {
|
||||
var self = this;
|
||||
|
||||
if( !$('.wbcr-clearfy-layer').length ) {
|
||||
var layer = $('<div></div>').addClass('wbcr-clearfy-layer');
|
||||
layer.prependTo('#wpbody');
|
||||
layer.fadeIn();
|
||||
} else {
|
||||
$('.wbcr-clearfy-layer').fadeIn();
|
||||
}
|
||||
|
||||
var popupElem = $('.wbcr-clearfy-confirm-popup');
|
||||
popupElem.data('mode', modeName);
|
||||
popupElem.fadeIn();
|
||||
|
||||
if( modeName !== 'reset' ) {
|
||||
var printOptTitles = '';
|
||||
|
||||
if( options ) {
|
||||
for( var opt in options ) {
|
||||
if( !options.hasOwnProperty(opt) ) {
|
||||
continue;
|
||||
}
|
||||
printOptTitles += '<li>' + options[opt] + '</li>';
|
||||
|
||||
}
|
||||
$('.wbcr-clearfy-list-options').html(printOptTitles);
|
||||
popupElem.addClass('wbcr-clearfy-default-warning-options');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
popupElem.addClass('wbcr-clearfy-reset-warning-options');
|
||||
},
|
||||
|
||||
hideConfirmationPopup: function() {
|
||||
$('.wbcr-clearfy-layer').fadeOut(100);
|
||||
var popupElem = $('.wbcr-clearfy-confirm-popup');
|
||||
|
||||
popupElem.fadeOut(100, function() {
|
||||
popupElem.removeClass('wbcr-clearfy-default-warning-options');
|
||||
popupElem.removeClass('wbcr-clearfy-reset-warning-options');
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
importOptions: function() {
|
||||
var self = this;
|
||||
|
||||
$('.wbcr-clearfy-import-options-button').click(function() {
|
||||
var settings = $('#wbcr-clearfy-import-export').val(),
|
||||
$this = $(this);
|
||||
|
||||
if( !settings ) {
|
||||
$.wbcr_factory_templates_000.app.showNotice('Import options is empty!', 'danger');
|
||||
return false;
|
||||
}
|
||||
|
||||
if( void 0 === wbcr_clearfy_ajax || !wbcr_clearfy_ajax.import_options_nonce ) {
|
||||
$.wbcr_factory_templates_000.app.showNotice('Unknown Javascript error, most likely the wbcr_clearfy_ajax variable does not exist!', 'danger');
|
||||
return false;
|
||||
}
|
||||
|
||||
$(this).prop('disabled', true);
|
||||
|
||||
self.sendRequest({
|
||||
action: 'wbcr-clearfy-import-settings',
|
||||
_wpnonce: wbcr_clearfy_ajax.import_options_nonce,
|
||||
settings: settings
|
||||
}, function(response) {
|
||||
$this.prop('disabled', false);
|
||||
|
||||
if( response.data.update_notice ) {
|
||||
if( !$('.wbcr-clr-update-package').length ) {
|
||||
$.wbcr_factory_templates_000.app.showNotice(response.data.update_notice);
|
||||
}
|
||||
} else {
|
||||
if( $('.wbcr-clr-update-package').length ) {
|
||||
$('.wbcr-clr-update-package').closest('.wbcr-factory-warning-notice').remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
},
|
||||
sendRequest: function(request_data, beforeValidateCallback, successCallback) {
|
||||
var self = this;
|
||||
|
||||
if( wbcr_clearfy_ajax === undefined ) {
|
||||
console.log('Undefinded wbcr_clearfy_ajax object.');
|
||||
return;
|
||||
}
|
||||
|
||||
if( typeof request_data === 'object' ) {
|
||||
request_data.security = wbcr_clearfy_ajax.ajax_nonce;
|
||||
}
|
||||
|
||||
$.ajax(ajaxurl, {
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: request_data,
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
var noticeId;
|
||||
|
||||
beforeValidateCallback && beforeValidateCallback(data);
|
||||
|
||||
if( !data || data.error ) {
|
||||
console.log(data);
|
||||
|
||||
if( data ) {
|
||||
noticeId = $.wbcr_factory_templates_000.app.showNotice(data.error_message, 'danger');
|
||||
} else {
|
||||
if( void 0 !== wbcr_clearfy_ajax ) {
|
||||
noticeId = $.wbcr_factory_templates_000.app.showNotice(wbcr_clearfy_ajax.i18n.unknown_error, 'danger');
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
$.wbcr_factory_templates_000.app.hideNotice(noticeId);
|
||||
}, 5000);
|
||||
return;
|
||||
}
|
||||
|
||||
successCallback && successCallback(data);
|
||||
|
||||
if( !request_data.flush_redirect ) {
|
||||
if( void 0 !== wbcr_clearfy_ajax ) {
|
||||
noticeId = $.wbcr_factory_templates_000.app.showNotice(wbcr_clearfy_ajax.i18n.success_update_settings, 'success');
|
||||
|
||||
setTimeout(function() {
|
||||
$.wbcr_factory_templates_000.app.hideNotice(noticeId);
|
||||
}, 5000);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
window.location.href = wbcr_clearfy_ajax.flush_cache_url;
|
||||
// открыть уведомление
|
||||
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
console.log(xhr.status);
|
||||
console.log(xhr.responseText);
|
||||
console.log(thrownError);
|
||||
|
||||
var noticeId = $.wbcr_factory_templates_000.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
general.init();
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
@@ -1,148 +0,0 @@
|
||||
/**
|
||||
* Setup master
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 12.08.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
window.wclearfy_fetch_google_pagespeed_audit = function(nonce, flush_cache) {
|
||||
|
||||
let data = {
|
||||
action: 'wclearfy-google-pagespeed-audit-results',
|
||||
flush_cache: flush_cache,
|
||||
_wpnonce: nonce,
|
||||
};
|
||||
|
||||
$.ajax(ajaxurl, {
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
|
||||
if( !response || !response.success ) {
|
||||
if( response.data ) {
|
||||
console.log(response.data.error);
|
||||
$('.wclearfy-gogle-page-speed-audit__errors').text(response.data.error).show();
|
||||
} else {
|
||||
console.log(response);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//$('.wclearfy-quick-start__google-page-speed-audit').show();
|
||||
|
||||
if( response.data ) {
|
||||
if( response.data.before ) {
|
||||
if( !response.data.before.fake ) {
|
||||
$('.wclearfy-quick-start__g-audit-overlay', '#wclearfy-quick-start__g-audit-before').hide();
|
||||
$('.wclearfy-quick-start__g-audit-preloader', '#wclearfy-quick-start__g-audit-before').hide();
|
||||
} //else {
|
||||
//$('#wclearfy-quick-start__g-audit-warging-text-1').show();
|
||||
//$('.wclearfy-quick-start__g-audit-preloader', '#wclearfy-quick-start__g-audit-after').hide();
|
||||
//}
|
||||
|
||||
$('.wclearfy-quick-start__g-audit-desktop-score-circle', '#wclearfy-quick-start__g-audit-before').wfCircularProgress({
|
||||
endPercent: (response.data.before.desktop.performance_score / 100),
|
||||
color: get_color(response.data.before.desktop.performance_score),
|
||||
inactiveColor: '#ececec',
|
||||
strokeWidth: 3,
|
||||
diameter: 100,
|
||||
});
|
||||
|
||||
$('.wclearfy-quick-start__g-audit-mobile-score-circle', '#wclearfy-quick-start__g-audit-before').wfCircularProgress({
|
||||
endPercent: (response.data.before.mobile.performance_score / 100),
|
||||
color: get_color(response.data.before.mobile.performance_score),
|
||||
inactiveColor: '#ececec',
|
||||
strokeWidth: 3,
|
||||
diameter: 100,
|
||||
});
|
||||
|
||||
// DESKTOP
|
||||
$('.wclearfy-quick-start__g-audit-statistic--desktop-first-contentful-paint', '#wclearfy-quick-start__g-audit-before')
|
||||
.text(response.data.before.desktop.performance_score);
|
||||
$('.wclearfy-quick-start__g-audit-statistic--desktop-speed-index', '#wclearfy-quick-start__g-audit-before')
|
||||
.text(response.data.before.desktop.speed_index);
|
||||
$('.wclearfy-quick-start__g-audit-statistic--desktop-interactive', '#wclearfy-quick-start__g-audit-before')
|
||||
.text(response.data.before.desktop.interactive);
|
||||
|
||||
// MOBILE
|
||||
$('.wclearfy-quick-start__g-audit-statistic--mobile-first-contentful-paint', '#wclearfy-quick-start__g-audit-before')
|
||||
.text(response.data.before.mobile.performance_score);
|
||||
$('.wclearfy-quick-start__g-audit-statistic--mobile-speed-index', '#wclearfy-quick-start__g-audit-before')
|
||||
.text(response.data.before.mobile.speed_index);
|
||||
$('.wclearfy-quick-start__g-audit-statistic--mobile-interactive', '#wclearfy-quick-start__g-audit-before')
|
||||
.text(response.data.before.mobile.interactive);
|
||||
}
|
||||
if( response.data.after ) {
|
||||
if( !response.data.after.fake ) {
|
||||
$('.wclearfy-quick-start__g-audit-overlay', '#wclearfy-quick-start__g-audit-after').hide();
|
||||
$('.wclearfy-quick-start__g-audit-preloader', '#wclearfy-quick-start__g-audit-after').hide();
|
||||
} //else {
|
||||
//$('#wclearfy-quick-start__g-audit-warging-text-2').show();
|
||||
//$('.wclearfy-quick-start__g-audit-preloader', '#wclearfy-quick-start__g-audit-after').hide();
|
||||
//}
|
||||
|
||||
$('.wclearfy-quick-start__g-audit-desktop-score-circle', '#wclearfy-quick-start__g-audit-after').wfCircularProgress({
|
||||
endPercent: (response.data.after.desktop.performance_score / 100),
|
||||
color: get_color(response.data.after.desktop.performance_score),
|
||||
inactiveColor: '#ececec',
|
||||
strokeWidth: 3,
|
||||
diameter: 100,
|
||||
});
|
||||
|
||||
$('.wclearfy-quick-start__g-audit-mobile-score-circle', '#wclearfy-quick-start__g-audit-after').wfCircularProgress({
|
||||
endPercent: (response.data.after.mobile.performance_score / 100),
|
||||
color: get_color(response.data.after.mobile.performance_score),
|
||||
inactiveColor: '#ececec',
|
||||
strokeWidth: 3,
|
||||
diameter: 100,
|
||||
});
|
||||
|
||||
// DESKTOP
|
||||
$('.wclearfy-quick-start__g-audit-statistic--desktop-first-contentful-paint', '#wclearfy-quick-start__g-audit-after')
|
||||
.text(response.data.after.desktop.performance_score);
|
||||
$('.wclearfy-quick-start__g-audit-statistic--desktop-speed-index', '#wclearfy-quick-start__g-audit-after')
|
||||
.text(response.data.after.desktop.speed_index);
|
||||
$('.wclearfy-quick-start__g-audit-statistic--desktop-interactive', '#wclearfy-quick-start__g-audit-after')
|
||||
.text(response.data.after.desktop.interactive);
|
||||
// MOBILE
|
||||
$('.wclearfy-quick-start__g-audit-statistic--mobile-first-contentful-paint', '#wclearfy-quick-start__g-audit-after')
|
||||
.text(response.data.after.mobile.performance_score);
|
||||
$('.wclearfy-quick-start__g-audit-statistic--mobile-speed-index', '#wclearfy-quick-start__g-audit-after')
|
||||
.text(response.data.after.mobile.speed_index);
|
||||
$('.wclearfy-quick-start__g-audit-statistic--mobile-interactive', '#wclearfy-quick-start__g-audit-after')
|
||||
.text(response.data.after.mobile.interactive);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
|
||||
$('.wclearfy-gogle-page-speed-audit__preloader').hide();
|
||||
|
||||
console.log(xhr.status);
|
||||
console.log(xhr.responseText);
|
||||
console.log(thrownError);
|
||||
|
||||
$('.wclearfy-gogle-page-speed-audit__errors').text('Status: ' + xhr.status + 'Error:' + xhr.responseText).show();
|
||||
}
|
||||
});
|
||||
|
||||
function get_color(score) {
|
||||
let desktopColor;
|
||||
|
||||
if( score > 70 ) {
|
||||
desktopColor = '#a8d207';
|
||||
} else if( score > 40 ) {
|
||||
desktopColor = '#f18727';
|
||||
} else {
|
||||
desktopColor = '#cd2727';
|
||||
}
|
||||
|
||||
return desktopColor;
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
||||
@@ -1,94 +0,0 @@
|
||||
/**
|
||||
* Этот файл содержит скрипт исполняелся во время процедур с формой лицензирования.
|
||||
* Его основная роль отправка ajax запросов на проверку, активацию, деактивацию лицензии
|
||||
* и вывод уведомлений об ошибка или успешно выполнении проверок.
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 05.10.2018, Webcraftic
|
||||
* @version 1.1
|
||||
* @since 1.4.0
|
||||
*/
|
||||
|
||||
|
||||
jQuery(function($) {
|
||||
|
||||
var allNotices = [];
|
||||
|
||||
$(document).on('click', '.wcl-control-btn', function() {
|
||||
|
||||
// Скрываем все открытые этим событием уведомления
|
||||
// Глобальные уведомления не трогаем
|
||||
|
||||
for( i = 0; i < allNotices.length; i++ ) {
|
||||
$.wbcr_factory_templates_134.app.hideNotice(allNotices[i]);
|
||||
}
|
||||
|
||||
$('.wcl-control-btn').hide();
|
||||
|
||||
var wrapper = $('#wcl-license-wrapper'),
|
||||
loader = wrapper.data('loader');
|
||||
|
||||
$(this).after('<img class="wcl-loader" src="' + loader + '">');
|
||||
|
||||
var data = {
|
||||
action: 'wbcr-clearfy-check-license',
|
||||
_wpnonce: $('#_wpnonce').val(),
|
||||
license_action: $(this).data('action'),
|
||||
licensekey: ''
|
||||
};
|
||||
|
||||
if( $(this).data('action') == 'activate' ) {
|
||||
data.licensekey = $('#license-key').val();
|
||||
}
|
||||
|
||||
$.ajax(ajaxurl, {
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(response) {
|
||||
var noticeId;
|
||||
|
||||
if( !response || !response.success ) {
|
||||
|
||||
$('.wcl-control-btn').show();
|
||||
$('.wcl-loader').remove();
|
||||
|
||||
if( response.data ) {
|
||||
console.log(response.data.error_message);
|
||||
noticeId = $.wbcr_factory_templates_134.app.showNotice('Error: [' + response.data.error_message + ']', 'danger');
|
||||
allNotices.push(noticeId);
|
||||
} else {
|
||||
console.log(response);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if( response.data && response.data.message ) {
|
||||
noticeId = $.wbcr_factory_templates_134.app.showNotice(response.data.message, 'success');
|
||||
allNotices.push(noticeId);
|
||||
|
||||
// todo: доработать генерацию формы, вместо перезагрузки страницы
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
|
||||
$('.wcl-control-btn').show();
|
||||
$('.wcl-loader').remove();
|
||||
|
||||
console.log(xhr.status);
|
||||
console.log(xhr.responseText);
|
||||
console.log(thrownError);
|
||||
|
||||
var noticeId = $.wbcr_factory_templates_134.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
|
||||
|
||||
allNotices.push(noticeId);
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,95 +0,0 @@
|
||||
/**
|
||||
* Setup master
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 12.08.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
window.wclearfy_fetch_google_pagespeed_audit = function(nonce, flush_cache) {
|
||||
|
||||
let data = {
|
||||
action: 'wclearfy-fetch-google-pagespeed-audit',
|
||||
flush_cache: flush_cache,
|
||||
_wpnonce: nonce,
|
||||
};
|
||||
|
||||
$.ajax(ajaxurl, {
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
|
||||
$('.wclearfy-gogle-page-speed-audit__preloader').hide();
|
||||
|
||||
if( !response || !response.success ) {
|
||||
if( response.data ) {
|
||||
console.log(response.data.error);
|
||||
$('.wclearfy-gogle-page-speed-audit__errors').text(response.data.error).show();
|
||||
} else {
|
||||
console.log(response);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
$('.wclearfy-gogle-page-speed-audit').show();
|
||||
|
||||
if( response.data && response.data.desktop ) {
|
||||
$('#wclearfy-desktop-score__circle').wfCircularProgress({
|
||||
endPercent: (response.data.desktop.performance_score / 100),
|
||||
color: get_color(response.data.desktop.performance_score),
|
||||
inactiveColor: '#ececec',
|
||||
strokeWidth: 5,
|
||||
diameter: 150,
|
||||
});
|
||||
|
||||
$('#wclearfy-statistic__desktop-first-contentful-paint').text(response.data.desktop.performance_score);
|
||||
$('#wclearfy-statistic__desktop-speed-index').text(response.data.desktop.speed_index);
|
||||
$('#wclearfy-statistic__desktop-interactive').text(response.data.desktop.interactive);
|
||||
}
|
||||
|
||||
if( response.data && response.data.mobile ) {
|
||||
$('#wclearfy-mobile-score__circle').wfCircularProgress({
|
||||
endPercent: (response.data.mobile.performance_score / 100),
|
||||
color: get_color(response.data.mobile.performance_score),
|
||||
inactiveColor: '#ececec',
|
||||
strokeWidth: 5,
|
||||
diameter: 150,
|
||||
});
|
||||
|
||||
$('#wclearfy-statistic__mobile-first-contentful-paint').text(response.data.desktop.performance_score);
|
||||
$('#wclearfy-statistic__mobile-speed-index').text(response.data.desktop.speed_index);
|
||||
$('#wclearfy-statistic__mobile-interactive').text(response.data.desktop.interactive);
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
|
||||
$('.wclearfy-gogle-page-speed-audit__preloader').hide();
|
||||
|
||||
console.log(xhr.status);
|
||||
console.log(xhr.responseText);
|
||||
console.log(thrownError);
|
||||
|
||||
$('.wclearfy-gogle-page-speed-audit__errors').text('Status: ' + xhr.status + 'Error:' + xhr.responseText).show();
|
||||
}
|
||||
});
|
||||
|
||||
function get_color(score) {
|
||||
let desktopColor;
|
||||
|
||||
if( score > 70 ) {
|
||||
desktopColor = '#a8d207';
|
||||
} else if( score > 40 ) {
|
||||
desktopColor = '#f18727';
|
||||
} else {
|
||||
desktopColor = '#cd2727';
|
||||
}
|
||||
|
||||
return desktopColor;
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
||||
@@ -1,37 +0,0 @@
|
||||
jQuery(function($) {
|
||||
|
||||
function subscribeWidget() {
|
||||
var form = $('#wbcr-factory-subscribe-widget-form');
|
||||
form.submit(function(ev) {
|
||||
ev.preventDefault();
|
||||
var agree = form.find('[name=agree_terms]:checked');
|
||||
if( agree.length === 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "https://clearfy.pro/wp-json/mailerlite/v1/subscribe/",
|
||||
data: {email: $('.wbcr-factory-subscribe-widget-field').val()},
|
||||
success: function(data) {
|
||||
if( !data.message ) {
|
||||
if( data.subscribed ) {
|
||||
$(".wbcr-factory-subscribe-widget-msg.success").show();
|
||||
} else {
|
||||
$(".wbcr-factory-subscribe-widget-msg.success2").show();
|
||||
}
|
||||
} else {
|
||||
alert('Something went wrong :(');
|
||||
console.error(data.message);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
subscribeWidget();
|
||||
|
||||
});
|
||||
@@ -1,274 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The boot file is needed to connect backend files, as well as register hooks.
|
||||
* Some hooks are so small that it does not make sense to put them into a file
|
||||
* or put them into a specific group of code.
|
||||
*
|
||||
* I usually register administrator notifications, create handlers before saving
|
||||
* plugin settings or after, register options in the Clearfy plugin.
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>, Alex Kovalev <alex.kovalevv@gmail.com>
|
||||
* @copyright Webcraftic
|
||||
* @version 1.1
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Уведомление будет показано на всех страницах Clearfy и его компонентах.
|
||||
*
|
||||
* @param WCL_Plugin $plugin
|
||||
* @param \WBCR\Factory_Templates_134\Impressive $obj
|
||||
*/
|
||||
|
||||
add_action('wbcr/factory/pages/impressive/print_all_notices', function ($plugin, $obj) {
|
||||
# Выводит уведомление, что в отключены некоторые опции, чтобы не было конфликтов с wp rocket.
|
||||
if( is_plugin_active('wp-rocket/wp-rocket.php') ) {
|
||||
$obj->printWarningNotice(sprintf(__('You are using Clearfy and wp rocket together, to avoid conflicts, we have disabled similar features in Clearfy. For example, you cannot use caching in Clearfy and wp rocket at the same time. You can read more about this in <a href="%s" target="_blank" rel="noopener">this article</a>.', 'clearfy'), 'https://clearfy.pro/docs/wp-rocket-clearfy/'));
|
||||
}
|
||||
# Выводит уведомление, что нужно сбросить постоянные ссылки.
|
||||
if( WCL_Plugin::app()->getPopulateOption('need_rewrite_rules') ) {
|
||||
$obj->printWarningNotice(sprintf('<span class="wbcr-clr-need-rewrite-rules-message">' . __('When you deactivate some components, permanent links may work incorrectly. If this happens, please, <a href="%s">update the permalinks</a>, so you could complete the deactivation.', 'clearfy'), admin_url('options-permalink.php')) . '</span>');
|
||||
}
|
||||
}, 10, 2);
|
||||
|
||||
/**
|
||||
* Этот хук реализует условную логику перенаправления на страницу мастера настроек,
|
||||
* сразу после активации плагина.
|
||||
*/
|
||||
add_action('admin_init', function () {
|
||||
$plugin = WCL_Plugin::app();
|
||||
|
||||
// If the user has updated the plugin or activated it for the first time,
|
||||
// you need to show the page "What's new?"
|
||||
if( !WCL_Plugin::app()->isNetworkAdmin() ) {
|
||||
$setup_page_viewed = WCL_Plugin::app()->request->get('wclearfy_setup_page_viewed', null);
|
||||
if( is_null($setup_page_viewed) ) {
|
||||
if( WCL_Helper::is_need_show_setup_page() ) {
|
||||
try {
|
||||
$redirect_url = '';
|
||||
if( class_exists('Wbcr_FactoryPages480') ) {
|
||||
$redirect_url = WCL_Plugin::app()->getPluginPageUrl('setup', ['wclearfy_setup_page_viewed' => 1]);
|
||||
}
|
||||
if( $redirect_url ) {
|
||||
wp_safe_redirect($redirect_url);
|
||||
die();
|
||||
}
|
||||
} catch( Exception $e ) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if( WCL_Helper::is_need_show_setup_page() ) {
|
||||
delete_option($plugin->getOptionName('setup_wizard'));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Выводит кнопку настроек Clearfy в шапке интерфейса плагина
|
||||
*/
|
||||
add_action('wbcr/factory/pages/impressive/header', function ($plugin_name) {
|
||||
if( $plugin_name != WCL_Plugin::app()->getPluginName() ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo WCL_Plugin::app()->getPluginPageUrl('clearfy_settings') ?>" class="wbcr-factory-button wbcr-factory-type-settings">
|
||||
<?php echo apply_filters('wbcr/clearfy/settings_button_title', __('Clearfy settings', 'clearfy')); ?>
|
||||
</a>
|
||||
<?php
|
||||
});
|
||||
|
||||
/**
|
||||
* @param $form
|
||||
* @param Wbcr_Factory480_Plugin $plugin
|
||||
* @param \WBCR\Factory_Templates_134\Impressive $obj
|
||||
*/
|
||||
function wbcr_clearfy_multisite_before_save($form, $plugin, $obj)
|
||||
{
|
||||
if( $plugin->getPluginName() !== WCL_Plugin::app()->getPluginName() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if( $plugin->isNetworkAdmin() ) {
|
||||
if( !$plugin->premium->is_activate() && $plugin->isNetworkActive() ) {
|
||||
$obj->redirectToAction('multisite-pro');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_action('wbcr/factory/pages/impressive/before_form_save', 'wbcr_clearfy_multisite_before_save', 10, 3);
|
||||
|
||||
/**
|
||||
* Устанавливает логотип Webcraftic и сборку плагина для Clearfy и всех его компонентов
|
||||
*
|
||||
* @param string $title
|
||||
*
|
||||
* @since 1.4.0
|
||||
*
|
||||
*/
|
||||
function wbcr_clearfy_branding($title, $plugin_name)
|
||||
{
|
||||
if($plugin_name === WCL_Plugin::app()->getPluginName()) {
|
||||
$is_premium = WCL_Plugin::app()->premium->is_activate();
|
||||
|
||||
return 'Webcraftic Clearfy ' . ( $is_premium ? '<span class="wbcr-clr-logo-label wbcr-clr-premium-label-logo">' . __( 'Business', 'clearfy' ) . '</span>' : '<span class="wbcr-clr-logo-label wbcr-clr-free-label-logo">Free</span>' ) . ' ver';
|
||||
}
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
||||
add_action('wbcr/factory/pages/impressive/plugin_title', 'wbcr_clearfy_branding', 10, 2);
|
||||
|
||||
/**
|
||||
* Подключаем скрипты для установки компонентов Clearfy
|
||||
* на все страницы админпанели
|
||||
*/
|
||||
/*add_action('admin_enqueue_scripts', function () {
|
||||
wp_enqueue_style('wbcr-clearfy-install-components', WCL_PLUGIN_URL . '/admin/assets/css/install-addons.css', [], WCL_Plugin::app()->getPluginVersion());
|
||||
wp_enqueue_script('wbcr-clearfy-install-components', WCL_PLUGIN_URL . '/admin/assets/js/install-addons.js', [
|
||||
'jquery',
|
||||
'wbcr-factory-templates-134-global'
|
||||
], WCL_Plugin::app()->getPluginVersion());
|
||||
});*/
|
||||
|
||||
/**
|
||||
* Удаляем уведомление Clearfy о том, что нужно перезаписать постоянные ссылоки.
|
||||
*/
|
||||
function wbcr_clearfy_flush_rewrite_rules($hard)
|
||||
{
|
||||
WCL_Plugin::app()->deletePopulateOption('need_rewrite_rules', 1);
|
||||
|
||||
return $hard;
|
||||
}
|
||||
|
||||
add_filter('flush_rewrite_rules_hard', 'wbcr_clearfy_flush_rewrite_rules');
|
||||
|
||||
/**
|
||||
* Обновить постоынные ссылки, после выполнения быстрых настроек
|
||||
*
|
||||
* @param WHM_Plugin $plugin
|
||||
* @param \WBCR\Factory_Templates_134\Impressive $obj
|
||||
*/
|
||||
function wbcr_clearfy_after_form_save($plugin, $obj)
|
||||
{
|
||||
if( !WCL_Plugin::app()->currentUserCan() ) {
|
||||
return;
|
||||
}
|
||||
$is_clearfy = WCL_Plugin::app()->getPluginName() == $plugin->getPluginName();
|
||||
|
||||
if( $is_clearfy && $obj->id == 'quick_start' && isset($_GET['action']) && $_GET['action'] == 'flush-cache-and-rules' ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/file.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/misc.php';
|
||||
flush_rewrite_rules(true);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('wbcr/factory/pages/impressive/after_form_save', 'wbcr_clearfy_after_form_save', 10, 2);
|
||||
|
||||
/**
|
||||
* Widget with the offer to buy Clearfy Business
|
||||
*
|
||||
* @param array $widgets
|
||||
* @param string $position
|
||||
* @param Wbcr_Factory480_Plugin $plugin
|
||||
*/
|
||||
|
||||
add_filter('wbcr/factory/pages/impressive/widgets', function ($widgets, $position, $plugin) {
|
||||
$is_current_plugin = $plugin->getPluginName() == WCL_Plugin::app()->getPluginName();
|
||||
|
||||
if( class_exists('WRIO_Plugin') ) {
|
||||
$is_current_plugin = $plugin->getPluginName() === WRIO_Plugin::app()->getPluginName() || $plugin->getPluginName() === WCL_Plugin::app()->getPluginName();
|
||||
}
|
||||
|
||||
if( $is_current_plugin ) {
|
||||
|
||||
require_once WCL_PLUGIN_DIR . '/admin/includes/sidebar-widgets.php';
|
||||
|
||||
if( WCL_Plugin::app()->premium->is_activate() ) {
|
||||
unset($widgets['donate_widget']);
|
||||
|
||||
if( $position == 'right' ) {
|
||||
unset($widgets['adverts_widget']);
|
||||
unset($widgets['business_suggetion']);
|
||||
unset($widgets['rating_widget']);
|
||||
unset($widgets['info_widget']);
|
||||
}
|
||||
|
||||
return $widgets;
|
||||
} else {
|
||||
if( $position == 'right' ) {
|
||||
unset($widgets['business_suggetion']);
|
||||
unset($widgets['info_widget']);
|
||||
unset($widgets['rating_widget']);
|
||||
}
|
||||
}
|
||||
|
||||
if( $position == 'bottom' ) {
|
||||
unset($widgets['support_widget']);
|
||||
$widgets['donate_widget'] = wbcr_clearfy_get_sidebar_premium_widget();
|
||||
}
|
||||
}
|
||||
|
||||
return $widgets;
|
||||
}, 9999, 3);
|
||||
|
||||
/**
|
||||
* Remove adverts notices for premium users
|
||||
*/
|
||||
add_action('wbcr/factory/admin_notices', function ($notices, $plugin_name) {
|
||||
if( $plugin_name != WCL_Plugin::app()->getPluginName() ) {
|
||||
return $notices;
|
||||
}
|
||||
|
||||
if( WCL_Plugin::app()->premium->is_activate() ) {
|
||||
unset($notices['adverts_notice']);
|
||||
}
|
||||
|
||||
return $notices;
|
||||
}, 9999, 2);
|
||||
|
||||
/**
|
||||
* Remove adverts widgets for premium users
|
||||
*/
|
||||
add_action('wp_dashboard_setup', function () {
|
||||
global $wp_meta_boxes;
|
||||
|
||||
if( WCL_Plugin::app()->premium->is_activate() ) {
|
||||
if( isset($wp_meta_boxes['dashboard']) ) {
|
||||
if( isset($wp_meta_boxes['dashboard']['normal']) && isset($wp_meta_boxes['dashboard']['normal']['core']) && isset($wp_meta_boxes['dashboard']['normal']['core']['wbcr-factory-adverts-widget']) ) {
|
||||
unset($wp_meta_boxes['dashboard']['normal']['core']['wbcr-factory-adverts-widget']);
|
||||
}
|
||||
if( isset($wp_meta_boxes['dashboard']['side']) && isset($wp_meta_boxes['dashboard']['side']['core']) && isset($wp_meta_boxes['dashboard']['normal']['core']['wbcr-factory-adverts-widget']) ) {
|
||||
unset($wp_meta_boxes['dashboard']['normal']['core']['wbcr-factory-adverts-widget']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 9999);
|
||||
|
||||
// add widget scripts on all clearfy pages
|
||||
add_action('wbcr/clearfy/page_assets', function ($id, $scripts, $styles) {
|
||||
$scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/widgets.js', array('jquery'));
|
||||
}, 10, 3);
|
||||
|
||||
/**
|
||||
* Initialize Clearfy Farewell notice system
|
||||
*/
|
||||
add_action('admin_init', function() {
|
||||
if ( ! class_exists('WCL_Farewell') ) {
|
||||
require_once WCL_PLUGIN_DIR . '/admin/includes/classes/class.farewell.php';
|
||||
}
|
||||
new WCL_Farewell();
|
||||
});
|
||||
|
||||
/**
|
||||
* Load farewell notice styles on dashboard
|
||||
*/
|
||||
add_action('admin_enqueue_scripts', function($hook) {
|
||||
if ( 'index.php' === $hook || 'settings_page_quick_start-wbcr_clearfy' === $hook ) {
|
||||
wp_enqueue_style('clearfy-farewell-notice', WCL_PLUGIN_URL . '/admin/assets/css/farewell-notice.css', [], WCL_Plugin::app()->getPluginVersion());
|
||||
}
|
||||
});
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file groups the settings for quick setup
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 16.09.2017, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once WCL_PLUGIN_DIR . '/admin/includes/classes/class.install-plugins-button.php';
|
||||
|
||||
class WCL_DeletePluginsButton extends WCL_InstallPluginsButton {
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function build_wordpress() {
|
||||
parent::build_wordpress();
|
||||
|
||||
$this->action = 'delete';
|
||||
$this->addData( 'plugin-action', $this->action );
|
||||
$this->removeClass( 'button-primary' );
|
||||
}
|
||||
|
||||
protected function build_internal() {
|
||||
// nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $echo
|
||||
*
|
||||
* @return string|void
|
||||
*/
|
||||
public function getButton() {
|
||||
$button = '<a href="#" class="' . implode( ' ', $this->get_classes() ) . '" ' . implode( ' ', $this->get_data() ) . '><span class="dashicons dashicons-trash"></span></a>';
|
||||
|
||||
if ( $this->type == 'internal' || ! $this->isPluginInstall() || $this->isPluginActivate() ) {
|
||||
$button = '';
|
||||
}
|
||||
|
||||
return $button;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class WCL_Farewell handles notices that are displayed to user about Clearfy transition.
|
||||
*
|
||||
* @since 2.3.4
|
||||
* @author Webcraftic
|
||||
* @package Clearfy
|
||||
* @license GPL-2.0+
|
||||
* @copyright Copyright (c) 2025, Webcraftic
|
||||
*/
|
||||
class WCL_Farewell {
|
||||
|
||||
/**
|
||||
* Meta key where the option (of the time the Farewell notice was dismissed) is saved.
|
||||
*
|
||||
* @since 2.3.4
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const SLUG_DISMISS_TIME = 'clearfy_farewell_dismissed';
|
||||
|
||||
/**
|
||||
* Super Page Cache plugin page URL.
|
||||
*
|
||||
* @since 2.3.4
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const URL_SUPER_PAGE_CACHE = 'https://wordpress.org/plugins/wp-cloudflare-page-cache/';
|
||||
|
||||
/**
|
||||
* WCL_Farewell constructor.
|
||||
*
|
||||
* @since 2.3.4
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
add_action( 'admin_head', [ $this, 'process_notices' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Decide whether to display notices or not.
|
||||
*
|
||||
* @since 2.3.4
|
||||
*/
|
||||
public function process_notices() {
|
||||
|
||||
/**
|
||||
* Current screen object.
|
||||
*
|
||||
* @var WP_Screen $screen
|
||||
*/
|
||||
$screen = get_current_screen();
|
||||
|
||||
if ( ! empty( $screen->base ) && ($screen->base === 'dashboard' || $screen->base === 'settings_page_quick_start-wbcr_clearfy' ) ) {
|
||||
|
||||
// phpcs:disable WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['try_super_page_cache'] ) ) {
|
||||
$farewell = empty( $_GET['try_super_page_cache'] ) ? time() : 0;
|
||||
update_user_meta( get_current_user_id(), 'clearfy_farewell_dismissed', $farewell );
|
||||
}
|
||||
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
||||
|
||||
$farewell = get_user_meta( get_current_user_id(), 'clearfy_farewell_dismissed', true );
|
||||
|
||||
if ( empty( $farewell ) ) {
|
||||
$this->display_detailed_notice();
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->is_grace_period_ended() ) {
|
||||
$this->display_short_notice();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare dates since detailed notice dismissal date and now.
|
||||
*
|
||||
* @since 2.3.4
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function is_grace_period_ended() {
|
||||
|
||||
$dismissed = (int) get_user_meta( get_current_user_id(), 'clearfy_farewell_dismissed', true );
|
||||
if(empty($dismissed)) {
|
||||
return false;
|
||||
}
|
||||
return (time() - $dismissed) > MONTH_IN_SECONDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismissable big (Gutenberg-like) dashboard-only notice about Clearfy transition.
|
||||
*
|
||||
* @since 2.3.4
|
||||
*/
|
||||
public function display_detailed_notice() {
|
||||
|
||||
// Only people appropriate people should see it.
|
||||
if ( ! current_user_can( 'install_plugins' ) ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="try-super-page-cache-panel" class="try-super-page-cache-panel">
|
||||
<?php wp_nonce_field( 'try-super-page-cache-panel-nonce', 'trysuperpagecachepanelnonce', false ); ?>
|
||||
<a
|
||||
class="try-super-page-cache-panel-close" href="<?php echo esc_url( admin_url( '?try_super_page_cache=0' ) ); ?>"
|
||||
aria-label="<?php esc_attr_e( 'Dismiss the Try Super Page Cache panel', 'clearfy' ); ?>">
|
||||
<?php esc_html_e( 'Dismiss', 'clearfy' ); ?>
|
||||
</a>
|
||||
|
||||
<div class="try-super-page-cache-panel-content">
|
||||
<h2><?php esc_html_e( 'A More Powerful Caching Solution is Here!', 'clearfy' ); ?></h2>
|
||||
|
||||
<p class="about-description">
|
||||
<?php esc_html_e( 'Clearfy has been acquired and is now part of Super Page Cache. We recommend switching to Super Page Cache for superior caching performance and modern features.', 'clearfy' ); ?>
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="try-super-page-cache-panel-column-container">
|
||||
<div class="try-super-page-cache-panel-column try-super-page-cache-panel-image-column">
|
||||
<picture>
|
||||
<source srcset="about:blank" media="(max-width: 1024px)">
|
||||
<img
|
||||
src="<?php echo esc_url( WCL_PLUGIN_URL . '/admin/assets/img/super-page-cache-screenshot.png' ); ?>"
|
||||
alt="<?php esc_attr_e( 'Screenshot from the Super Page Cache interface', 'clearfy' ); ?>"/>
|
||||
</picture>
|
||||
</div>
|
||||
<div class="try-super-page-cache-panel-column plugin-card-super-page-cache">
|
||||
|
||||
<div>
|
||||
<h3><?php esc_html_e( 'Switch to Super Page Cache today.', 'clearfy' ); ?></h3>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'Super Page Cache delivers full-page disk caching with seamless Cloudflare CDN integration for dramatically faster load times. Featuring automatic cache purging, advanced lazy loading, and defer/delay JavaScript capabilities to eliminate render-blocking scripts and improve Core Web Vitals scores.', 'clearfy' ); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'Trusted by over 50,000 WordPress sites with 430+ five-star reviews. Works perfectly with WooCommerce, popular hosting providers, and major themes. Experience lightning-fast performance with setup that takes just minutes.', 'clearfy' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="try-super-page-cache-action">
|
||||
<p>
|
||||
<a
|
||||
class="button button-primary button-hero thickbox open-plugin-details-modal"
|
||||
href="<?php echo esc_url( admin_url( 'plugin-install.php?tab=plugin-information&plugin=wp-cloudflare-page-cache&TB_iframe=true&width=600&height=550' ) ); ?>">
|
||||
<?php esc_html_e( 'View Super Page Cache', 'clearfy' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="<?php echo esc_url( self::URL_SUPER_PAGE_CACHE ); ?>" target="_blank" rel="noopener noreferrer">
|
||||
<?php esc_html_e( 'Learn more about Super Page Cache', 'clearfy' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="try-super-page-cache-panel-column plugin-card-classic-editor">
|
||||
|
||||
<div>
|
||||
<h3><?php esc_html_e( 'We\'re retiring Clearfy.', 'clearfy' ); ?></h3>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'We\'re retiring the Clearfy plugin in favor of the more powerful Super Page Cache plugin. This means that there will be no new feature updates. We will continue to maintain the Clearfy plugin for any major security issues for the next 6 months.', 'clearfy' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php esc_html_e( 'We strongly recommend switching to Super Page Cache. It focuses exclusively on what it does best - making your WordPress site incredibly fast through advanced caching techniques with active development and regular updates.', 'clearfy' ); ?>
|
||||
</p>
|
||||
<?php
|
||||
$is_premium = WCL_Plugin::app()->is_premium();
|
||||
$show_premium_transfer = $is_premium && ( time() < strtotime( '2025-12-01 00:00:00' ) );
|
||||
?>
|
||||
<?php if ( $show_premium_transfer ) : ?>
|
||||
<p style="background: #e7f7e7; padding: 12px; border-left: 3px solid #00a32a; margin-top: 15px;">
|
||||
<strong><?php esc_html_e( '✓ Premium License Transfer:', 'clearfy' ); ?></strong>
|
||||
<?php esc_html_e( 'We will transfer your existing Clearfy premium license to Super Page Cache during the next few days and will reach out to you via email once this is complete. If you want to speed up this process, please', 'clearfy' ); ?>
|
||||
<a href="<?php echo esc_url( 'https://themeisle.com/contact/' ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'contact us', 'clearfy' ); ?></a>.
|
||||
</p>
|
||||
<?php elseif ( ! $is_premium ) : ?>
|
||||
<p style="background: #f0f6fc; padding: 12px; border-left: 3px solid #2271b1; margin-top: 15px;">
|
||||
<strong><?php esc_html_e( '🎁 Special Migration Offer:', 'clearfy' ); ?></strong>
|
||||
<?php esc_html_e( 'Get 90% off Super Page Cache Pro Personal plan for the first year! Use code', 'clearfy' ); ?>
|
||||
<code style="background: #fff; padding: 2px 6px; font-weight: bold;">MIGRATEFROMCLRF90</code>
|
||||
<?php esc_html_e( 'at checkout. Valid for 2 weeks only.', 'clearfy' ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="try-super-page-cache-action">
|
||||
<p>
|
||||
<a
|
||||
class="button button-secondary button-hero"
|
||||
href="<?php echo esc_url( 'https://rviv.ly/rd7CAW' ); ?>" target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
<?php esc_html_e( 'Get 90% Off Pro', 'clearfy' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
jQuery( document ).ready( function() {
|
||||
if( jQuery('#WBCR').length>0){
|
||||
|
||||
jQuery( '#try-super-page-cache-panel' ).insertBefore( '#WBCR' ).show();
|
||||
}else{
|
||||
jQuery( '#try-super-page-cache-panel' ).insertAfter( '#wpbody-content .wrap h1' ).show();
|
||||
}
|
||||
} );
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Non-dismissable notice displayed to a user after detailed notice dismiss.
|
||||
*
|
||||
* @since 2.3.4
|
||||
* @noinspection HtmlUnknownTarget
|
||||
*/
|
||||
public function display_short_notice() {
|
||||
|
||||
echo '<div class="notice notice-error"><p>';
|
||||
printf(
|
||||
wp_kses(
|
||||
'<strong>Important:</strong> Clearfy is being retired and will no longer receive updates or support. For a faster, more reliable website experience, we recommend <a href="%1$s" class="thickbox open-plugin-details-modal">switching to Super Page Cache</a> - the modern caching solution built to deliver top performance.',
|
||||
[
|
||||
'br' => [],
|
||||
'strong' => [],
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'target' => [],
|
||||
'class' => [],
|
||||
'rel' => [],
|
||||
],
|
||||
]
|
||||
),
|
||||
esc_url( admin_url( 'plugin-install.php?tab=plugin-information&plugin=wp-cloudflare-page-cache&TB_iframe=true&width=600&height=550' ) )
|
||||
);
|
||||
echo '</p></div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file groups the settings for quick setup
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 16.09.2017, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_Group {
|
||||
|
||||
private $group_name;
|
||||
|
||||
/**
|
||||
* @param string $group_name
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct($group_name)
|
||||
{
|
||||
if( empty($group_name) || !is_string($group_name) ) {
|
||||
throw new Exception('Empty group_name attribute.');
|
||||
}
|
||||
$this->group_name = $group_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $group_name
|
||||
* @return WCL_Group
|
||||
*/
|
||||
public static function getInstance($group_name)
|
||||
{
|
||||
return new WCL_Group($group_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->group_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return WCL_Option[]
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
$options = WCL_Option::getAllOptions();
|
||||
$filter = array();
|
||||
|
||||
foreach($options as $option) {
|
||||
if( $option->hasGroup($this->group_name) ) {
|
||||
$filter[] = $option;
|
||||
}
|
||||
}
|
||||
|
||||
return $filter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,370 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file groups the settings for quick setup
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 16.09.2017, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_InstallPluginsButton {
|
||||
|
||||
protected $type;
|
||||
protected $plugin_slug;
|
||||
|
||||
protected $classes = [
|
||||
'button',
|
||||
'wbcr-clr-proccess-button',
|
||||
'wbcr-clr-update-component-button'
|
||||
];
|
||||
protected $data = [];
|
||||
protected $base_path;
|
||||
|
||||
protected $action;
|
||||
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* @param string $group_name
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct($type, $plugin_slug)
|
||||
{
|
||||
if( empty($type) || !is_string($plugin_slug) ) {
|
||||
throw new Exception('Empty type or plugin_slug attribute.');
|
||||
}
|
||||
$this->type = $type;
|
||||
$this->plugin_slug = $plugin_slug;
|
||||
|
||||
if( $this->type == 'wordpress' || $this->type == 'creativemotion' ) {
|
||||
if( strpos(rtrim(trim($this->plugin_slug)), '/') !== false ) {
|
||||
$this->base_path = $this->plugin_slug;
|
||||
$base_path_parts = explode('/', $this->base_path);
|
||||
if( sizeof($base_path_parts) === 2 ) {
|
||||
$this->plugin_slug = $base_path_parts[0];
|
||||
}
|
||||
} else {
|
||||
$this->base_path = $this->get_plugin_base_path_by_slug($this->plugin_slug);
|
||||
}
|
||||
|
||||
$this->build_wordpress();
|
||||
} else if( $this->type == 'internal' ) {
|
||||
$this->build_internal();
|
||||
} else {
|
||||
throw new Exception('Invalid button type.');
|
||||
}
|
||||
|
||||
// Set default data
|
||||
$this->addData('storage', $this->type);
|
||||
$this->addData('i18n', WCL_Helper::getEscapeJson($this->get_i18n()));
|
||||
$this->addData('wpnonce', wp_create_nonce('updates'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isPluginActivate()
|
||||
{
|
||||
if( ($this->type == 'wordpress' || $this->type == 'creativemotion') && $this->isPluginInstall() ) {
|
||||
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
||||
|
||||
return is_plugin_active($this->base_path);
|
||||
} else if( $this->type == 'internal' ) {
|
||||
$preinsatall_components = WCL_Plugin::app()->getPopulateOption('deactive_preinstall_components', []);
|
||||
|
||||
return !in_array($this->plugin_slug, $preinsatall_components);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isPluginInstall()
|
||||
{
|
||||
if( $this->type == 'wordpress' || $this->type == 'creativemotion' ) {
|
||||
if( empty($this->base_path) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if the function get_plugins() is registered. It is necessary for the front-end
|
||||
// usually get_plugins() only works in the admin panel.
|
||||
if( !function_exists('get_plugins') ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$plugins = get_plugins();
|
||||
|
||||
if( isset($plugins[$this->base_path]) ) {
|
||||
return true;
|
||||
}
|
||||
} else if( $this->type == 'internal' ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $class
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function addClass($class)
|
||||
{
|
||||
if( !is_string($class) ) {
|
||||
throw new Exception('Attribute class must be a string.');
|
||||
}
|
||||
$this->classes[] = $class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $class
|
||||
*
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public function removeClass($class)
|
||||
{
|
||||
if( !is_string($class) ) {
|
||||
throw new Exception('Attribute class must be a string.');
|
||||
}
|
||||
$key = array_search($class, $this->classes);
|
||||
if( isset($this->classes[$key]) ) {
|
||||
unset($this->classes[$key]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param $value
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function addData($name, $value)
|
||||
{
|
||||
if( !is_string($name) || !is_string($value) ) {
|
||||
throw new Exception('Attributes name and value must be a string.');
|
||||
}
|
||||
|
||||
$this->data[$name] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
*
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public function removeData($name)
|
||||
{
|
||||
if( !is_string($name) ) {
|
||||
throw new Exception('Attribute name must be a string.');
|
||||
}
|
||||
|
||||
if( isset($this->data[$name]) ) {
|
||||
unset($this->data[$name]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print an install button
|
||||
*
|
||||
* @throws \Exception
|
||||
* @since 1.5.0
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*/
|
||||
public function renderButton()
|
||||
{
|
||||
echo $this->getButton();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getButton()
|
||||
{
|
||||
$i18n = $this->get_i18n();
|
||||
|
||||
$button = '<a href="#" class="' . implode(' ', $this->get_classes()) . '" ' . implode(' ', $this->get_data()) . '>' . $i18n[$this->action] . '</a>';
|
||||
|
||||
return $button;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getLink()
|
||||
{
|
||||
$this->removeClass('button');
|
||||
$this->removeClass('button-default');
|
||||
$this->removeClass('button-primary');
|
||||
|
||||
//$this->addClass('link');
|
||||
$this->addClass('button-link');
|
||||
|
||||
return $this->getButton();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print an install a link
|
||||
*
|
||||
* @throws \Exception
|
||||
* @since 1.5.0
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*/
|
||||
public function renderLink()
|
||||
{
|
||||
echo $this->getLink();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @since 1.5.0
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*/
|
||||
protected function get_data()
|
||||
{
|
||||
$data_to_print = [];
|
||||
|
||||
foreach((array)$this->data as $key => $value) {
|
||||
$data_to_print[$key] = 'data-' . esc_attr($key) . '="' . esc_attr($value) . '"';
|
||||
}
|
||||
|
||||
return $data_to_print;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @since 1.5.0
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*/
|
||||
protected function get_classes()
|
||||
{
|
||||
return array_map('esc_attr', $this->classes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
* @since 1.5.0
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*/
|
||||
protected function build_wordpress()
|
||||
{
|
||||
if( ('wordpress' === $this->type || 'creativemotion' === $this->type) && !empty($this->base_path) ) {
|
||||
|
||||
$this->action = 'install';
|
||||
|
||||
if( $this->isPluginInstall() ) {
|
||||
$this->action = 'deactivate';
|
||||
if( !$this->isPluginActivate() ) {
|
||||
$this->action = 'activate';
|
||||
}
|
||||
}
|
||||
|
||||
$this->addData('plugin-action', $this->action);
|
||||
$this->addData('slug', $this->plugin_slug);
|
||||
$this->addData('plugin', $this->base_path);
|
||||
|
||||
if( $this->action == 'activate' ) {
|
||||
$this->addClass('button-primary');
|
||||
} else {
|
||||
$this->addClass('button-default');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configurate button of internal components
|
||||
*
|
||||
* @throws \Exception
|
||||
* @since 1.5.0
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*/
|
||||
protected function build_internal()
|
||||
{
|
||||
if( $this->type != 'internal' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->action = 'activate';
|
||||
|
||||
if( $this->isPluginActivate() ) {
|
||||
$this->action = 'deactivate';
|
||||
}
|
||||
|
||||
$this->addData('plugin-action', $this->action);
|
||||
$this->addData('plugin', $this->plugin_slug);
|
||||
|
||||
if( $this->action == 'activate' ) {
|
||||
$this->addClass('button-primary');
|
||||
} else {
|
||||
$this->addClass('button-default');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internalization for action buttons
|
||||
*
|
||||
* @return array
|
||||
* @since 1.5.0
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*/
|
||||
protected function get_i18n()
|
||||
{
|
||||
return [
|
||||
'activate' => __('Activate', 'clearfy'),
|
||||
'install' => __('Install', 'clearfy'),
|
||||
'deactivate' => __('Deactivate', 'clearfy'),
|
||||
'delete' => __('Delete', 'clearfy'),
|
||||
'loading' => __('Please wait...', 'clearfy'),
|
||||
'preparation' => __('Preparation...', 'clearfy'),
|
||||
'read' => __('Read more', 'clearfy')
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Allows you to get the base path to the plugin in the directory wp-content/plugins/
|
||||
*
|
||||
* @param $slug - slug for example "clearfy", "hide-login-page"
|
||||
*
|
||||
* @return int|null|string - "clearfy/clearfy.php"
|
||||
*/
|
||||
protected function get_plugin_base_path_by_slug($slug)
|
||||
{
|
||||
// Check if the function get_plugins() is registered. It is necessary for the front-end
|
||||
// usually get_plugins() only works in the admin panel.
|
||||
if( !function_exists('get_plugins') ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$plugins = get_plugins();
|
||||
|
||||
foreach($plugins as $base_path => $plugin) {
|
||||
if( strpos($base_path, rtrim(trim($slug))) !== false ) {
|
||||
return $base_path;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file groups the settings for quick setup
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 16.09.2017, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_Option {
|
||||
|
||||
private $name;
|
||||
private $title;
|
||||
private $value;
|
||||
private $values;
|
||||
private $tags;
|
||||
|
||||
/**
|
||||
* @param array $option_data
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct( array $option_data ) {
|
||||
if ( empty( $option_data ) ) {
|
||||
throw new Exception( 'Empty group_name attribute.' );
|
||||
}
|
||||
|
||||
foreach ( $option_data as $key => $value ) {
|
||||
$this->$key = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getName() {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $group_name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getValue( $group_name = null ) {
|
||||
if (
|
||||
! empty( $group_name )
|
||||
&& is_array( $this->values )
|
||||
&& isset( $this->values[ $group_name ] )
|
||||
) {
|
||||
return $this->values[ $group_name ];
|
||||
}
|
||||
|
||||
return ! empty( $this->values )
|
||||
? $this->values
|
||||
: [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getTags() {
|
||||
return $this->tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $group_name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasGroup( $group_name ) {
|
||||
if ( ! empty( $this->tags ) && in_array( $group_name, $this->tags ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return WCL_Option[]
|
||||
*/
|
||||
public static function getAllOptions() {
|
||||
$all_options = require( WCL_PLUGIN_DIR . '/admin/includes/options.php' );
|
||||
$result = [];
|
||||
|
||||
if ( ! empty( $all_options ) ) {
|
||||
foreach ( $all_options as $option_data ) {
|
||||
$result[] = new WCL_Option( $option_data );
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Compatibility with Clearfy old components
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 22.10.2018, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
add_action( 'init', function () {
|
||||
if ( is_admin() ) {
|
||||
if ( defined( 'WIO_PLUGIN_ACTIVE' ) ) {
|
||||
if ( ! file_exists( WP_PLUGIN_DIR . '/robin-image-optimizer/robin-image-optimizer.php' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$plugin = get_plugin_data( WP_PLUGIN_DIR . '/robin-image-optimizer/robin-image-optimizer.php' );
|
||||
|
||||
if ( isset( $plugin['Version'] ) && version_compare( $plugin['Version'], '1.0.8', '<=' ) ) {
|
||||
$notice = __( 'Please update the plugin Robin image Optimizer to the latest version, as it may not work correctly with the new version of Clearfy!', 'clearfy' );
|
||||
/**
|
||||
* Выводит уведомление внутри интерфейса Clearfy, на всех страницах плагина.
|
||||
* Это необходимо, чтоб напомнить пользователю обновить конфигурацию компонентов плагина,
|
||||
* иначе вновь активированные компоненты не будет зайдествованы в работе плагина.
|
||||
*
|
||||
* @param Wbcr_Factory480_Plugin $plugin
|
||||
* @param \WBCR\Factory_Templates_134\Impressive $obj
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
add_action( 'wbcr/factory/pages/impressive/print_all_notices', function ( $plugin, $obj ) use ( $notice ) {
|
||||
$obj->printErrorNotice( $notice );
|
||||
}, 10, 2 );
|
||||
|
||||
// Специально для преидущей версии фреймворка (407)
|
||||
add_action( 'wbcr_factory_pages_407_imppage_print_all_notices', function ( $plugin, $obj ) use ( $notice ) {
|
||||
$obj->printErrorNotice( $notice );
|
||||
}, 10, 2 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( defined( 'WHLP_PLUGIN_ACTIVE' ) ) {
|
||||
if ( ! file_exists( WP_PLUGIN_DIR . '/hide-login-page/hide-login-page.php' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$plugin = get_plugin_data( WP_PLUGIN_DIR . '/hide-login-page/hide-login-page.php' );
|
||||
|
||||
if ( isset( $plugin['Version'] ) && version_compare( $plugin['Version'], '1.0.5', '<=' ) ) {
|
||||
$notice = __( 'Please update the plugin Hide login page to the latest version, as it may not work correctly with the new version of Clearfy!', 'clearfy' );
|
||||
/**
|
||||
* Выводит уведомление внутри интерфейса Clearfy, на всех страницах плагина.
|
||||
* Это необходимо, чтоб напомнить пользователю обновить конфигурацию компонентов плагина,
|
||||
* иначе вновь активированные компоненты не будет зайдествованы в работе плагина.
|
||||
*
|
||||
* @param Wbcr_Factory480_Plugin $plugin
|
||||
* @param \WBCR\Factory_Templates_134\Impressive $obj
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
add_action( 'wbcr/factory/pages/impressive/print_all_notices', function ( $plugin, $obj ) use ( $notice ) {
|
||||
$obj->printErrorNotice( $notice );
|
||||
}, 10, 2 );
|
||||
|
||||
// Специально для преидущей версии фреймворка (407)
|
||||
add_action( 'wbcr_factory_pages_407_imppage_print_all_notices', function ( $plugin, $obj ) use ( $notice ) {
|
||||
$obj->printErrorNotice( $notice );
|
||||
}, 10, 2 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( defined( 'WCLRP_PLUGIN_ACTIVE' ) ) {
|
||||
add_action( 'wbcr/factory/admin_notices', function ( $notices, $plugin_name ) {
|
||||
if ( $plugin_name != WGZ_Plugin::app()->getPluginName() ) {
|
||||
return $notices;
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'update_plugins' ) ) {
|
||||
return $notices;
|
||||
}
|
||||
|
||||
$nonce_action = 'upgrade-plugin_' . WCLP_PLUGIN_BASE;
|
||||
$upgrade_url = wp_nonce_url( self_admin_url( "update.php?action=upgrade-plugin&plugin=" . urlencode( WCLP_PLUGIN_BASE ) ), $nonce_action );
|
||||
$notice_text = sprintf( __( 'You must <a href="%s">upgrade the premium version</a> of the Clearfy plugin to version 1.1.2, since the new Clearfy release isn\'t compatible with the previous version of the premium plugin.', 'clearfy' ), $upgrade_url );
|
||||
|
||||
$notices[] = [
|
||||
'id' => 'clearfy-package_-compatibility-113',
|
||||
'type' => 'error',
|
||||
'dismissible' => false,
|
||||
'dismiss_expires' => 0,
|
||||
'text' => '<p><b>' . __( 'Clearfy', 'clearfy' ) . ': </b>' . $notice_text . '</p>'
|
||||
];
|
||||
|
||||
return $notices;
|
||||
}, 10, 2 );
|
||||
}
|
||||
|
||||
if ( defined( 'WCLP_PLUGIN_ACTIVE' ) ) {
|
||||
add_action( 'wbcr/factory/admin_notices', function ( $notices, $plugin_name ) {
|
||||
if ( $plugin_name != WCL_Plugin::app()->getPluginName() ) {
|
||||
return $notices;
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'update_plugins' ) ) {
|
||||
return $notices;
|
||||
}
|
||||
|
||||
if ( WCL_Plugin::app()->premium->is_install_package() ) {
|
||||
$package = $this->premium->get_package_data();
|
||||
if ( version_compare( $package['version'], "1.4.3", "<" ) ) {
|
||||
$nonce_action = 'upgrade-plugin_' . WCLP_PLUGIN_BASE;
|
||||
$upgrade_url = wp_nonce_url( self_admin_url( "update.php?action=upgrade-plugin&plugin=" . urlencode( WCLP_PLUGIN_BASE ) ), $nonce_action );
|
||||
$notice_text = sprintf( __( 'You must <a href="%s">upgrade the premium version</a> of the Clearfy plugin to version 1.4.2, since the new Clearfy release isn\'t compatible with the previous version of the premium plugin.', 'clearfy' ), $upgrade_url );
|
||||
|
||||
$notices[] = [
|
||||
'id' => 'clearfy-package_-compatibility-143',
|
||||
'type' => 'error',
|
||||
'dismissible' => false,
|
||||
'dismiss_expires' => 0,
|
||||
'text' => '<p><b>' . __( 'Clearfy', 'clearfy' ) . ': </b>' . $notice_text . '</p>'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $notices;
|
||||
}, 10, 2 );
|
||||
}
|
||||
}
|
||||
}, 30 );
|
||||
@@ -1,389 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* * This file groups the settings for quick setup
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 18.09.2017, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
return apply_filters( 'wbcr_clearfy_group_options', [
|
||||
/** ------------------------ Google services ----------------------------- */ [
|
||||
'name' => 'lazy_load_google_fonts',
|
||||
'title' => __( 'Google Fonts asynchronous', 'clearfy' ),
|
||||
'tags' => [ 'optimize_performance' ]
|
||||
],
|
||||
[
|
||||
'name' => 'disable_google_fonts',
|
||||
'title' => __( 'Disable Google Fonts', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'remove_iframe_google_maps',
|
||||
'title' => __( 'Remove iframe Google maps', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'exclude_from_disable_google_maps',
|
||||
'title' => __( 'Exclude pages from Disable Google Maps filter', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
/** ------------------------ End google services ----------------------------- */ [
|
||||
'name' => 'disable_google_maps',
|
||||
'title' => __( 'Disable Google maps', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
/** ------------------------ Performance page ----------------------------- */ /*array(
|
||||
'name' => 'remove_xfn_link',
|
||||
'title' => __('Removing XFN (XHTML Friends Network) Profile Link', 'clearfy'),
|
||||
'tags' => array()
|
||||
),*/ [
|
||||
'name' => 'lazy_load_font_awesome',
|
||||
'title' => __( 'Font Awesome asynchronous', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'disable_dashicons',
|
||||
'title' => __( 'Disable Dashicons', 'clearfy' ),
|
||||
'tags' => [ 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'disable_gravatars',
|
||||
'title' => __( 'Disable gravatars', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
/*array(
|
||||
'name' => 'disable_json_rest_api',
|
||||
'title' => __('Remove REST API Links', 'clearfy'),
|
||||
'tags' => array()
|
||||
),*/ [
|
||||
'name' => 'disable_emoji',
|
||||
'title' => __( 'Disable Emojis', 'clearfy' ),
|
||||
'tags' => [ 'optimize_performance', 'clear_code', 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_bloat',
|
||||
'title' => __( 'Remove bloat in head', 'clearfy' ),
|
||||
'tags' => [ 'optimize_performance', 'clear_code', 'hide_my_wp' ]
|
||||
],
|
||||
/*array(
|
||||
'name' => 'remove_rsd_link',
|
||||
'title' => __('Remove RSD Link', 'clearfy'),
|
||||
'tags' => array('optimize_performance', 'clear_code', 'hide_my_wp')
|
||||
),
|
||||
array(
|
||||
'name' => 'remove_wlw_link',
|
||||
'title' => __('Remove wlwmanifest Link', 'clearfy'),
|
||||
'tags' => array('optimize_performance', 'clear_code', 'hide_my_wp')
|
||||
),
|
||||
array(
|
||||
'name' => 'remove_shortlink_link',
|
||||
'title' => __('Remove Shortlink', 'clearfy'),
|
||||
'tags' => array('optimize_performance', 'clear_code', 'hide_my_wp')
|
||||
),
|
||||
array(
|
||||
'name' => 'remove_adjacent_posts_link',
|
||||
'title' => __('Remove links to previous, next post', 'clearfy'),
|
||||
'tags' => array('optimize_performance', 'clear_code', 'hide_my_wp')
|
||||
),
|
||||
array(
|
||||
'name' => 'remove_recent_comments_style',
|
||||
'title' => __('Remove .recentcomments styles', 'clearfy'),
|
||||
'tags' => array('optimize_performance', 'clear_code', 'hide_my_wp')
|
||||
),*/ /** ------------------------ End Performance page ----------------------------- */ [
|
||||
'name' => 'content_image_auto_alt',
|
||||
'title' => __( 'Automatically set the alt attribute', 'clearfy' ),
|
||||
'tags' => [ 'seo_optimize' ]
|
||||
],
|
||||
[
|
||||
'name' => 'set_last_modified_headers',
|
||||
'title' => __( 'Automatically insert the Last Modified header', 'clearfy' ),
|
||||
'tags' => [ 'seo_optimize' ]
|
||||
],
|
||||
[
|
||||
'name' => 'if_modified_since_headers',
|
||||
'title' => __( 'Return an If-Modified-Since responce', 'clearfy' ),
|
||||
'tags' => [ 'seo_optimize' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_last_item_breadcrumb_yoast',
|
||||
'title' => __( 'Remove duplicate names in breadcrumbs WP SEO by Yoast', 'clearfy' ),
|
||||
'tags' => [ 'seo_optimize' ]
|
||||
],
|
||||
[
|
||||
'name' => 'yoast_remove_image_from_xml_sitemap',
|
||||
'title' => sprintf( __( 'Remove the tag %s from XML site map', 'clearfy' ), 'image:image' ),
|
||||
'tags' => get_locale() == 'ru_RU' ? [ 'clear_code' ] : []
|
||||
],
|
||||
[
|
||||
'name' => 'yoast_remove_json_ld_search',
|
||||
'title' => __( 'Disable JSON-LD sitelinks searchbox', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'yoast_remove_json_ld_output',
|
||||
'title' => __( 'Disable Yoast Structured Data', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'yoast_remove_head_comment',
|
||||
'title' => sprintf( __( 'Remove comment from %s section', 'clearfy' ), 'head' ),
|
||||
'tags' => [ 'clear_code' ]
|
||||
],
|
||||
[
|
||||
'name' => 'redirect_archives_date',
|
||||
'title' => __( 'Remove archives date', 'clearfy' ),
|
||||
'tags' => [ 'seo_optimize' ]
|
||||
],
|
||||
[
|
||||
'name' => 'redirect_archives_author',
|
||||
'title' => __( 'Remove author archives ', 'clearfy' ),
|
||||
'tags' => [ 'seo_optimize' ]
|
||||
],
|
||||
[
|
||||
'name' => 'redirect_archives_tag',
|
||||
'title' => __( 'Remove archives tag', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'attachment_pages_redirect',
|
||||
'title' => __( 'Remove attachment pages', 'clearfy' ),
|
||||
'tags' => [ 'seo_optimize' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_single_pagination_duplicate',
|
||||
'title' => __( 'Remove post pagination', 'clearfy' ),
|
||||
'tags' => [ 'recommended' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_replytocom',
|
||||
'title' => __( 'Remove ?replytocom', 'clearfy' ),
|
||||
'tags' => [ 'seo_optimize' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_meta_generator',
|
||||
'title' => __( 'Remove meta generator', 'clearfy' ),
|
||||
'tags' => [ 'clear_code', 'defence', 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'protect_author_get',
|
||||
'title' => __( 'Hide author login', 'clearfy' ),
|
||||
'tags' => [ 'defence', 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'change_login_errors',
|
||||
'title' => __( 'Hide errors when logging into the site', 'clearfy', 'hide_my_wp' ),
|
||||
'tags' => [ 'defence', 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_style_version',
|
||||
'title' => __( 'Remove Version from Stylesheet', 'clearfy', 'hide_my_wp' ),
|
||||
'tags' => [ 'optimize_performance', 'clear_code', 'defence', 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_js_version',
|
||||
'title' => __( 'Remove Version from Script', 'clearfy' ),
|
||||
'tags' => [ 'optimize_performance', 'clear_code', 'defence', 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_page',
|
||||
'title' => __( 'Remove the "Pages" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_calendar',
|
||||
'title' => __( 'Remove calendar widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_tag_cloud',
|
||||
'title' => __( 'Remove the "Cloud of tags" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_archives',
|
||||
'title' => __( 'Remove the "Archives" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_links',
|
||||
'title' => __( 'Remove the "Links" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_meta',
|
||||
'title' => __( 'Remove the "Meta" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_search',
|
||||
'title' => __( 'Remove the "Search" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_text',
|
||||
'title' => __( 'Remove the "Text" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_categories',
|
||||
'title' => __( 'Remove the "Categories" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_recent_posts',
|
||||
'title' => __( 'Remove the "Recent Posts" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_recent_comments',
|
||||
'title' => __( 'Remove the "Recent Comments" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_text',
|
||||
'title' => __( 'Remove the "Text" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_rss',
|
||||
'title' => __( 'Remove the "RSS" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_menu',
|
||||
'title' => __( 'Remove the "Menu" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_unneeded_widget_twenty_eleven_ephemera',
|
||||
'title' => __( 'Remove the "Twenty Eleven Ephemera" widget', 'clearfy' ),
|
||||
'tags' => [ 'remove_default_widgets' ]
|
||||
],
|
||||
[ 'name' => 'revisions_disable', 'title' => __( 'Disable revision', 'clearfy' ), 'tags' => [] ],
|
||||
[ 'name' => 'revision_limit', 'title' => __( 'Limit Post Revisions', 'clearfy' ), 'tags' => [] ],
|
||||
[ 'name' => 'last_modified_exclude', 'title' => __( 'Exclude pages:', 'clearfy' ), 'tags' => [] ],
|
||||
[
|
||||
'name' => 'right_robots_txt',
|
||||
'title' => __( 'Create right robots.txt', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'robots_txt_text',
|
||||
'title' => __( 'You can edit the robots.txt file in the box below:', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[ 'name' => 'quick_modes', 'title' => __( 'Quick mode', 'clearfy' ), 'tags' => [] ],
|
||||
[
|
||||
'name' => 'remove_jquery_migrate',
|
||||
'title' => __( 'Remove jQuery Migrate', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[ 'name' => 'disable_embeds', 'title' => __( 'Disable Embeds', 'clearfy' ), 'tags' => [] ],
|
||||
[ 'name' => 'disable_feed', 'title' => __( 'Disable RSS feeds', 'clearfy' ), 'tags' => [] ],
|
||||
[
|
||||
'name' => 'remove_unnecessary_link_admin_bar',
|
||||
'title' => __( 'Removes links to wordpress.org site from the admin bar', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'remove_style_version',
|
||||
'title' => __( 'Remove Version from Stylesheet', 'clearfy' ),
|
||||
'tags' => [ 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_js_version',
|
||||
'title' => __( 'Remove Version from Script', 'clearfy' ),
|
||||
'tags' => [ 'hide_my_wp' ]
|
||||
],
|
||||
[
|
||||
'name' => 'remove_version_exclude',
|
||||
'title' => __( 'Eclude stylesheet/script file names', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'enable_wordpres_sanitize',
|
||||
'title' => __( 'Enable Sanitization of WordPress', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'disable_admin_bar',
|
||||
'title' => __( 'Disable admin top bar', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'disable_admin_bar_logo',
|
||||
'title' => __( 'Remove admin bar WP logo', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'replace_howdy_welcome',
|
||||
'title' => __( 'Replace "Howdy" text with "Welcome"', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'revisions_disable',
|
||||
'title' => __( 'Disable revision', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'revision_limit',
|
||||
'title' => __( 'Limit Post Revisions', 'update-services' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'disable_post_autosave',
|
||||
'title' => __( 'Disable autosave', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'disable_texturization',
|
||||
'title' => __( 'Disable Texturization - Smart Quotes', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'disable_auto_correct_dangit',
|
||||
'title' => __( 'Disable capitalization in Wordpress branding', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'disable_auto_paragraph',
|
||||
'title' => __( 'Disable auto inserted paragraphs (i.e. p tags)', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'disable_heartbeat',
|
||||
'title' => __( 'Disable Heartbeat', 'update-services' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'heartbeat_frequency',
|
||||
'title' => __( 'Heartbeat frequency', 'update-services' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'remove_html_comments',
|
||||
'title' => __( 'Remove html comments', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'deactive_preinstall_components',
|
||||
'title' => __( 'Deactivate preinstall components', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
[
|
||||
'name' => 'freemius_activated_addons',
|
||||
'title' => __( 'Freemius activated addons', 'clearfy' ),
|
||||
'tags' => []
|
||||
],
|
||||
/** ------------------------ Clearfy settings ----------------------------- */ [
|
||||
'name' => 'disable_clearfy_extra_menu',
|
||||
'title' => __( 'Disable menu in adminbar', 'clearfy' ),
|
||||
'tags' => []
|
||||
]
|
||||
|
||||
] );
|
||||
@@ -1,84 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Sidebar widgets
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright (c) 01.12.2018, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Return premium widget markup
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function wbcr_clearfy_get_sidebar_premium_widget() {
|
||||
return;
|
||||
|
||||
$buy_premium_url = WCL_Plugin::app()->get_support()->get_pricing_url( true, 'license_page' );
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div id="wbcr-clr-go-to-premium-widget" class="wbcr-factory-sidebar-widget">
|
||||
<p>
|
||||
<strong><?php _e( 'Activation Clearfy Business', 'clearfy' ); ?></strong>
|
||||
</p>
|
||||
<div class="wbcr-clr-go-to-premium-widget-body">
|
||||
<p><?php _e( '<b>Clearfy Business</b> is a paid package of components for the popular free WordPress plugin named Clearfy. You get access to all paid components at one price.', 'clearfy' ) ?></p>
|
||||
<p><?php _e( 'Paid license guarantees that you can download and update existing and future paid components of the plugin.', 'clearfy' ) ?></p>
|
||||
<a href="<?= $buy_premium_url ?>" class="wbcr-clr-purchase-premium" target="_blank" rel="noopener">
|
||||
<span class="btn btn-gold btn-inner-wrap">
|
||||
<i class="fa fa-star"></i> <?php _e( 'Upgrade to Clearfy Business', 'clearfy' ) ?>
|
||||
<i class="fa fa-star"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$output = ob_get_contents();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return support widget markup
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function wbcr_clearfy_get_sidebar_support_widget() {
|
||||
|
||||
$free_support_url = WCL_Plugin::app()->get_support()->get_contacts_url( true, 'support_widget' );
|
||||
$page_hot_support_url = WCL_Plugin::app()->get_support()->get_tracking_page_url( 'hot-support', 'support_widget' );
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div id="wbcr-clr-support-widget" class="wbcr-factory-sidebar-widget">
|
||||
<p><strong><?php _e( 'Having Issues?', 'clearfy' ); ?></strong></p>
|
||||
<div class="wbcr-clr-support-widget-body">
|
||||
<p>
|
||||
<?php _e( 'We provide free support for this plugin. If you are pushed with a problem, just create a new ticket. We will definitely help you!', 'clearfy' ); ?>
|
||||
</p>
|
||||
<ul>
|
||||
<li><span class="dashicons dashicons-sos"></span>
|
||||
<a href="<?= $free_support_url ?>" target="_blank"
|
||||
rel="noopener"><?php _e( 'Get starting free support', 'clearfy' ); ?></a>
|
||||
</li>
|
||||
<li style="margin-top: 15px;background: #fff4f1;padding: 10px;color: #a58074;">
|
||||
<span class="dashicons dashicons-warning"></span>
|
||||
<?php printf( __( 'If you find a php error or a vulnerability in plugin, you can <a href="%s" target="_blank" rel="noopener">create ticket</a> in hot support that we responded instantly.', 'clearfy' ), $page_hot_support_url ); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$output = ob_get_contents();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Default page
|
||||
*
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>, Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
* @copyright (c) 17.08.2019, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
class WCL_Page extends WBCR\Factory_Templates_134\Pages\PageBase {
|
||||
|
||||
/**
|
||||
* Requests assets (js and css) for the page.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.0.0
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
*/
|
||||
public function assets($scripts, $styles)
|
||||
{
|
||||
parent::assets($scripts, $styles);
|
||||
|
||||
$this->styles->add(WCL_PLUGIN_URL . '/admin/assets/css/components.css');
|
||||
|
||||
/**
|
||||
* Подгружаем стили для вижета оптимизации изображений, если не установли плагин оптимизации изображений
|
||||
*/
|
||||
if( !defined('WIO_PLUGIN_ACTIVE') ) {
|
||||
$this->styles->add(WCL_PLUGIN_URL . '/admin/assets/css/base-statistic.css');
|
||||
}
|
||||
|
||||
$this->styles->add(WCL_PLUGIN_URL . '/admin/assets/css/general.css');
|
||||
$this->scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/general.js', [], 'wclearfy-general');
|
||||
|
||||
|
||||
$params = array(
|
||||
//'ajaxurl' => admin_url('admin-ajax.php'),
|
||||
'flush_cache_url' => $this->getActionUrl('flush-cache-and-rules', array('_wpnonce' => wp_create_nonce('wbcr_factory_' . $this->getResultId() . '_flush_action'))),
|
||||
'ajax_nonce' => wp_create_nonce('wbcr_clearfy_ajax_quick_start_nonce'),
|
||||
'import_options_nonce' => wp_create_nonce('wbcr_clearfy_import_options'),
|
||||
'i18n' => array(
|
||||
'success_update_settings' => __('Settings successfully updated!', 'clearfy'),
|
||||
'unknown_error' => __('During the setup, an unknown error occurred, please try again or contact the plugin support.', 'clearfy')
|
||||
)
|
||||
);
|
||||
$this->scripts->localize('wbcr_clearfy_ajax', $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Действие выполняется для всех страниц Clearfy и его компонентах.
|
||||
* Это простое предложение перейти на PRO версию.
|
||||
*/
|
||||
public function multisiteProAction()
|
||||
{
|
||||
if( is_multisite() && $this->plugin->isNetworkActive() ) {
|
||||
|
||||
$license_page_url = $this->getBaseUrl('clearfy_license');
|
||||
$upgrade_url = $this->plugin->get_support()->get_pricing_url(true, 'multisite_save_settings');
|
||||
|
||||
$html = '<div class="wbcr-factory-templates-134-multisite-suggetion">';
|
||||
$html .= '<div class="wbcr-factory-inner-contanier">';
|
||||
$html .= '<h3>' . __('Upgrade to Clearfy Business', 'wbcr_factory_templates_134') . '</h3>';
|
||||
$html .= '<p>' . __('Oops... Sorry for the inconvenience caused!', 'wbcr_factory_templates_134') . '</p>';
|
||||
$html .= '<p>' . __('Complete multisite support is available in Clearfy Business and Clearfy Business Revolution packages only!', 'wbcr_factory_templates_134') . '</p>';
|
||||
$html .= '<p>' . __('You can activate the plugin on each website and use it with zero limitations. But you can’t save the plugin’s settings under the Super Administrator role!', 'wbcr_factory_templates_134') . '</p>';
|
||||
$html .= '<p style="margin-top:20px">';
|
||||
$html .= '<a href="' . $license_page_url . '" class="wbcr-factory-activate-premium" rel="noopener">' . __('Activate license ', 'wbcr_factory_templates_134') . '</a> ';
|
||||
$html .= '<a href="' . $upgrade_url . '" class="wbcr-factory-purchase-premium" target="_blank" rel="noopener">' . __('Upgrade to Clearfy Business', 'wbcr_factory_templates_134') . '</a>';
|
||||
$html .= '</p>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$this->showPage($html);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->redirectToAction('index');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_AdvancedPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = "advanced";
|
||||
|
||||
public $page_menu_dashicon = 'dashicons-list-view';
|
||||
|
||||
public $page_menu_position = 1;
|
||||
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Advanced', 'clearfy');
|
||||
$this->page_menu_short_description = __('Useful tweaks', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permalinks options.
|
||||
*
|
||||
* @return mixed[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getPageOptions()
|
||||
{
|
||||
|
||||
$options = array();
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Other', 'clearfy') . '</strong>' . '<p>' . __('In this group of settings, you can manage the adminbar.', 'clearfy') . '</p>' . '</div>'
|
||||
);
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_feed',
|
||||
'title' => __('Disable RSS feeds', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('By default, WordPress generates all types of different RSS feeds for your site. While RSS feeds can be useful if you are running a blog, businesses might not always utilize these. Not every site out there has a blog.', 'clearfy') . '<br><b>Clearfy: </b>' . sprintf(__('Removes a link to the RSS-feed from the %s section, closes and puts the redirect from all RSS-feeds.', 'clearfy'), '<head>'),
|
||||
'default' => false,
|
||||
'eventsOn' => [
|
||||
'show' => '.factory-control-disabled_feed_behaviour'
|
||||
],
|
||||
'eventsOff' => [
|
||||
'hide' => '.factory-control-disabled_feed_behaviour'
|
||||
]
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'dropdown',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disabled_feed_behaviour',
|
||||
'data' => [
|
||||
['redirect_301', __('Redirect 301', 'clearfy')],
|
||||
['redirect_404', __('Page 404', 'clearfy')],
|
||||
],
|
||||
'title' => __('Redirect feed requests', 'clearfy'),
|
||||
'hint' => __('Forward all requests to page 404 or to the main page through 301 redirects.', 'clearfy'),
|
||||
//'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => 'redirect_301'
|
||||
];
|
||||
|
||||
//============================================================
|
||||
// ADMINBAR MANAGER COMPONENT
|
||||
//============================================================
|
||||
|
||||
if( $this->plugin->isActivateComponent('adminbar_manager') ) {
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Admin bar', 'clearfy') . '</strong>' . '<p>' . __('In this group of settings, you can manage the adminbar.', 'clearfy') . '</p>' . '</div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'dropdown',
|
||||
'name' => 'disable_admin_bar',
|
||||
'way' => 'buttons',
|
||||
'title' => __('Disable admin top bar', 'clearfy'),
|
||||
'data' => array(
|
||||
array('enable', __('Default enable', 'clearfy')),
|
||||
array('for_all_users', __('For all users', 'clearfy')),
|
||||
array(
|
||||
'for_all_users_except_administrator',
|
||||
__('For all users except administrator', 'clearfy')
|
||||
)
|
||||
),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('In some cases, you need to disable the floating top admin panel. You can disable this panel.', 'clearfy') . '<br><b>Clearfy</b>: ' . __('Disable admin top bar.', 'clearfy'),
|
||||
'default' => 'enable',
|
||||
);
|
||||
}
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Classic editor and Gutenberg', 'clearfy') . '</strong>' . '<p>' . __('In this group of options, you can manage revisions and post autosave.', 'clearfy') . '</p>' . '</div>'
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'revisions_disable',
|
||||
'title' => __('Disable revision', 'clearfy'),
|
||||
'default' => false,
|
||||
'eventsOn' => [
|
||||
'hide' => '.factory-control-revision_limit'
|
||||
],
|
||||
'eventsOff' => [
|
||||
'show' => '.factory-control-revision_limit'
|
||||
],
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'dropdown',
|
||||
'name' => 'revision_limit',
|
||||
'title' => __('Limit Post Revisions', 'clearfy'),
|
||||
'data' => [
|
||||
['default', __('Wordpress default', 'clearfy')],
|
||||
['15', '15 ' . __('revisions', 'clearfy')],
|
||||
['20', '20 ' . __('revisions', 'clearfy')],
|
||||
['25', '25 ' . __('revisions', 'clearfy')],
|
||||
['30', '30 ' . __('revisions', 'clearfy')],
|
||||
['35', '35 ' . __('revisions', 'clearfy')],
|
||||
['40', '40 ' . __('revisions', 'clearfy')],
|
||||
['45', '45 ' . __('revisions', 'clearfy')],
|
||||
['50', '50 ' . __('revisions', 'clearfy')],
|
||||
['55', '55 ' . __('revisions', 'clearfy')],
|
||||
['60', '60 ' . __('revisions', 'clearfy')]
|
||||
],
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('WordPress automatically saves revisions when you are working on posts and pages. These can begin to add up pretty quick. By default, there is no limit in place. We have seen posts with over 1,000 revisions. Multiply this by 50 pages and suddenly you have over 50,000 revisions sitting in your database. The problem with this is that you will most likely never use them and they can start slowing down your database as well as using disk space.
|
||||
So we recommend either disabling or limiting your revisions. ', 'clearfy'),
|
||||
'default' => 'default'
|
||||
];
|
||||
|
||||
if( version_compare(get_bloginfo('version'), '5.0', '>=') ) {
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'gutenberg_autosave_control',
|
||||
'title' => __('Gutenberg autosave control', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('By activating this option autosave feature in the Gutenberg editor will be disabled. Alternatively it also provides options in the editor to select a longer autosave interval time than the default 10 seconds.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
} else {
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_post_autosave',
|
||||
'title' => __('Disable autosave', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('WordPress by default automatically saves a draft every 60 seconds (1 minute). There are reasons why you might want to change this.', 'clearfy') . '<br><b>Clearfy</b>: ' . __('Disables automatic saving of drafts.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
}
|
||||
|
||||
$formOptions = array();
|
||||
|
||||
$formOptions[] = array(
|
||||
'type' => 'form-group',
|
||||
'items' => $options,
|
||||
//'cssClass' => 'postbox'
|
||||
);
|
||||
|
||||
return apply_filters('wbcr_clr_additionally_form_options', $formOptions, $this);
|
||||
}
|
||||
}
|
||||
@@ -1,237 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_ClearfySettingsPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $id = "clearfy_settings";
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_parent_page = 'none';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_menu_dashicon = 'dashicons-list-view';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Clearfy Settings', 'clearfy');
|
||||
$this->page_menu_short_description = __('Useful tweaks', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permalinks options.
|
||||
*
|
||||
* @return mixed[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getPageOptions()
|
||||
{
|
||||
|
||||
$options = [];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Advanced settings', 'clearfy') . '</strong>' . '<p>' . __('This group of settings allows you to configure the work of the Clearfy plugin.', 'clearfy') . '</p>' . '</div>'
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_clearfy_extra_menu',
|
||||
'title' => __('Disable menu in adminbar', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'red'],
|
||||
'hint' => __('This setting allows you to disable the additional menu of the Clearfy plugin, in the admin bar. This menu is required to work with the Minify and Combine and Assets Manager components.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'complete_uninstall',
|
||||
'title' => __('Complete Uninstall', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __("When the plugin is deleted from the Plugins menu, also delete all plugin settings.", 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Import/Export', 'clearfy') . '</strong>' . '<p>' . __('This group of settings allows you to configure the work of the Clearfy plugin.', 'clearfy') . '</p>' . '</div>'
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => [$this, 'export']
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Support', 'clearfy') . '</strong>' . '<p>' . __('This group of settings allows you to configure the work of the Clearfy plugin.', 'clearfy') . '</p>' . '</div>'
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => [$this, 'supports']
|
||||
];
|
||||
|
||||
$formOptions = [];
|
||||
|
||||
$formOptions[] = [
|
||||
'type' => 'form-group',
|
||||
'items' => $options,
|
||||
//'cssClass' => 'postbox'
|
||||
];
|
||||
|
||||
return apply_filters('wbcr/clearfy/settings_form_options', $formOptions, $this);
|
||||
}
|
||||
|
||||
public function export()
|
||||
{
|
||||
?>
|
||||
<div class="wbcr-clearfy-export-import">
|
||||
<p>
|
||||
<label for="wbcr-clearfy-import-export">
|
||||
<strong><?php _e('Import/Export settings', 'clearfy') ?></strong>
|
||||
</label>
|
||||
<textarea id="wbcr-clearfy-import-export"><?= WCL_Helper::getExportOptions(); ?></textarea>
|
||||
<button class="button wbcr-clearfy-import-options-button"><?php _e('Import options', 'clearfy') ?></button>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function supports()
|
||||
{
|
||||
?>
|
||||
<div class="wbcr-clearfy-troubleshooting">
|
||||
<p><?php _e('If you faced with any issues, please follow the steps below to get quickly quality support:', 'clearfy') ?></p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><?php _e('Generate a debug report which will contains inforamtion about your configuratin and installed plugins', 'clearfy') ?></p>
|
||||
<p>
|
||||
<a href="<?php echo wp_nonce_url($this->getActionUrl('gererate_report'), 'gererate_report'); ?>" class="button"><?php _e('Generate Debug Report', 'clearfy') ?></a>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><?php printf(__('Create a new ticket in our <a href="%s" target="_blank">support forum</a>, include the debug report into the message body.', 'clearfy'), "https://forum.webcraftic.com"); ?></p>
|
||||
</li>
|
||||
</ol>
|
||||
<p style="margin-bottom: 0px;"><?php _e('We guarantee to respond you within 7 business day.', 'clearfy') ?></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Collects error and system error data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDebugReport()
|
||||
{
|
||||
$run_time = number_format(microtime(true), 3);
|
||||
$pps = number_format(1 / floatval($run_time), 0);
|
||||
$memory_avail = ini_get('memory_limit');
|
||||
$memory_used = number_format(memory_get_usage(true) / (1024 * 1024), 2);
|
||||
$memory_peak = number_format(memory_get_peak_usage(true) / (1024 * 1024), 2);
|
||||
|
||||
$debug = '';
|
||||
if( PHP_SAPI == 'cli' ) {
|
||||
// if run for command line, display some info
|
||||
$debug = PHP_EOL . "======================================================================================" . PHP_EOL . " Config: php " . phpversion() . " " . php_sapi_name() . " / zend engine " . zend_version() . PHP_EOL . " Load: {$memory_avail} (avail) / {$memory_used}M (used) / {$memory_peak}M (peak)" . " | Time: {$run_time}s | {$pps} req/sec" . PHP_EOL . " | Server Timezone: " . date_default_timezone_get() . " | Agent: CLI" . PHP_EOL . "======================================================================================" . PHP_EOL;
|
||||
} else {
|
||||
// if not run from command line, only display if debug is enabled
|
||||
$debug = "" //<hr />"
|
||||
. "<div style=\"text-align: left;\">" . "<hr />" . " Config: " . "<br />" . " | php " . phpversion() . " " . php_sapi_name() . " / zend engine " . zend_version() . "<br />" . " | Server Timezone: " . date_default_timezone_get() . "<br />" . " Load: " . "<br />" . " | Memory: {$memory_avail} (avail) / {$memory_used}M (used) / {$memory_peak}M (peak)" . "<br />" . " | Time: {$run_time}s | {$pps} req/sec" . "<br />" . "Url: " . "<br />" . " |" . "<br />" . " | Agent: " . (@$_SERVER["HTTP_USER_AGENT"]) . "<br />" . "Version Control: " . "<br />" . " </div>" . "<br />";
|
||||
}
|
||||
|
||||
$debug .= "Plugins<br>";
|
||||
$debug .= "=====================<br>";
|
||||
|
||||
$plugins = get_plugins();
|
||||
|
||||
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
||||
|
||||
foreach($plugins as $path => $plugin) {
|
||||
if( is_plugin_active($path) ) {
|
||||
$debug .= $plugin['Name'] . '<br>';
|
||||
}
|
||||
}
|
||||
|
||||
return $debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a report about the system and plug-in error
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function gererateReportAction()
|
||||
{
|
||||
if( !(isset( $_GET[ '_wpnonce' ] ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'gererate_report' ))
|
||||
|| !WCL_Plugin::app()->currentUserCan() ) {
|
||||
wp_die(__('You do not have sufficient permissions to perform this action!', 'clearfy'));
|
||||
}
|
||||
|
||||
require_once(WCL_PLUGIN_DIR . '/includes/classes/class.zip-archive.php');
|
||||
|
||||
$reposts_dir = WCL_PLUGIN_DIR . '/reports';
|
||||
$reports_temp = $reposts_dir . '/temp';
|
||||
|
||||
if( !file_exists($reposts_dir) ) {
|
||||
mkdir($reposts_dir, 0777, true);
|
||||
}
|
||||
|
||||
if( !file_exists($reports_temp) ) {
|
||||
mkdir($reports_temp, 0777, true);
|
||||
}
|
||||
|
||||
$file = fopen($reports_temp . '/site-info.html', 'w+');
|
||||
fputs($file, $this->getDebugReport());
|
||||
fclose($file);
|
||||
|
||||
$download_file_name = 'webcraftic-clearfy-report-' . date('Y.m.d-H.i.s') . '.zip';
|
||||
$download_file_path = WCL_PLUGIN_DIR . '/reports/' . $download_file_name;
|
||||
|
||||
Wbcr_ExtendedZip::zipTree(WCL_PLUGIN_DIR . '/reports/temp', $download_file_path, ZipArchive::CREATE);
|
||||
|
||||
array_map('unlink', glob(WCL_PLUGIN_DIR . "/reports/temp/*"));
|
||||
|
||||
wp_redirect(WCL_PLUGIN_URL . '/reports/' . $download_file_name);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -1,206 +0,0 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Страница лицензирования плагина.
|
||||
*
|
||||
* Поддерживает режим работы с мультисаймами. Вы можете увидеть эту страницу в панели настройки сети.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
|
||||
*
|
||||
* @copyright (c) 2018 Webraftic Ltd
|
||||
*/
|
||||
class WCL_ComponentsLicensePage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
* @since 1.6.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = 'clearfy_components_license';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'page';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $plan_name;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public $menu_title;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public $page_menu_short_description;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
* @since 1.6.0
|
||||
* @var string
|
||||
*/
|
||||
public $page_parent_page;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $page_menu_position = 0;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $show_right_sidebar_in_options = false;
|
||||
|
||||
/**
|
||||
* WCL_LicensePage constructor.
|
||||
*
|
||||
* @param \Wbcr_Factory480_Plugin $plugin
|
||||
*
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*
|
||||
*/
|
||||
public function __construct(Wbcr_Factory480_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('License', 'robin-image-optimizer');
|
||||
$this->page_menu_short_description = __('Product activation', 'robin-image-optimizer');
|
||||
$this->plan_name = __('Clearfy Business', 'robin-image-optimizer');
|
||||
|
||||
parent::__construct($plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests assets (js and css) for the page.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.0.0
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
*/
|
||||
/*public function assets($scripts, $styles)
|
||||
{
|
||||
parent::assets($scripts, $styles);
|
||||
|
||||
$this->styles->add(WCL_PLUGIN_URL . '/admin/assets/css/components.css');
|
||||
|
||||
/**
|
||||
* @param Wbcr_Factory480_StyleList $styles
|
||||
* @param Wbcr_Factory480_ScriptList $scripts
|
||||
*
|
||||
* @since 1.4.0
|
||||
*
|
||||
*/
|
||||
/*do_action('wbcr/clearfy/components/page_assets', $scripts, $styles);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* This method simply show contents of the component page.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function showPageContent()
|
||||
{
|
||||
|
||||
/**
|
||||
* @since 1.4.0
|
||||
*
|
||||
*/
|
||||
$components = apply_filters('wbcr/clearfy/license/list_components', []);
|
||||
|
||||
?>
|
||||
<div class="wbcr-factory-page-group-header"><?php _e('<strong>Products activation</strong>.', 'clearfy') ?>
|
||||
<p>
|
||||
<?php _e('These are components of the plugin bundle. When you activate the plugin, all the components turned on by default. If you don’t need some function, you can easily turn it off on this page.', 'clearfy') ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="wbcr-clearfy-components">
|
||||
<?php
|
||||
/**
|
||||
* @param array $components
|
||||
*
|
||||
* @since 1.6.2
|
||||
*/
|
||||
do_action('wbcr/clearfy/license/custom_plugins_card', $components);
|
||||
?>
|
||||
|
||||
<?php foreach((array)$components as $component): ?>
|
||||
<div class="plugin-card">
|
||||
<div class="plugin-card-top">
|
||||
<div class="name column-name">
|
||||
<h3>
|
||||
<a href="<?php echo esc_url($component['url']) ?>"
|
||||
class="thickbox open-plugin-details-modal">
|
||||
You use <?php echo esc_html($component['title']) ?>
|
||||
<img src="<?php echo esc_attr($component['icon']) ?>" class="plugin-icon"
|
||||
alt="<?php echo esc_attr($component['title']) ?>">
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="desc column-description">
|
||||
<?php if( 'premium' === $component['build'] ): ?>
|
||||
<ul>
|
||||
<?php if( !empty($component['key']) ): ?>
|
||||
<li>
|
||||
<strong><?php _e('License key', 'clearfy') ?>:
|
||||
</strong> <?php echo esc_html($component['key']) ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if( !empty($component['plan']) ): ?>
|
||||
<li>
|
||||
<strong><?php _e('Plan', 'clearfy') ?>:</strong>
|
||||
<?php echo esc_html($component['plan']) ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if( !empty($component['subscription']) ): ?>
|
||||
<li>
|
||||
<strong><?php _e('Type', 'clearfy') ?>:</strong>
|
||||
<?php echo esc_html($component['subscription']) ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if( !empty($component['plan']) ): ?>
|
||||
<li>
|
||||
<strong><?php _e('Expired', 'clearfy') ?>:
|
||||
</strong> <?php echo esc_html($component['expiration_days']) ?> <?php _e('days remained', 'clearfy') ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p><?php echo esc_html($component['description']); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plugin-card-bottom">
|
||||
<a href="<?php echo $this->getBaseUrl($component['license_page_id']); ?>"
|
||||
class="button">
|
||||
<?php if( 'premium' === $component['build'] ): ?>
|
||||
<?php _e('License details') ?>
|
||||
<?php else: ?>
|
||||
<?php _e('Activate Premium License') ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_TitanSecurityPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $id = "clearfy_titan";
|
||||
|
||||
public $page_parent_page = "defence";
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
//public $page_parent_page = 'defence';
|
||||
|
||||
/**
|
||||
* Тип страницы
|
||||
* options - предназначена для создании страниц с набором опций и настроек.
|
||||
* page - произвольный контент, любой html код
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'page';
|
||||
|
||||
/**
|
||||
* Позиция закладки в меню плагина.
|
||||
* 0 - в самом конце, 100 - в самом начале
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
//public $page_menu_position = 20;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_menu_dashicon = 'dashicons-shield-alt';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Malware Scanner, Firewall', 'clearfy');
|
||||
$this->page_menu_short_description = __('Firewall and Anti-virus', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Содержание страницы
|
||||
*/
|
||||
public function showPageContent()
|
||||
{
|
||||
require_once WCL_PLUGIN_DIR . '/admin/includes/classes/class.install-plugins-button.php';
|
||||
$install_button = $this->plugin->get_install_component_button('creativemotion', 'anti-spam/anti-spam.php');
|
||||
$install_button->add_class('wbcr-factory-purchase-premium');
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
$.wfactory_480.hooks.add('core/components/updated', function(button, component_name) {
|
||||
if( component_name.plugin_action === 'install' ) {
|
||||
button.removeClass('wbcr-factory-purchase-premium');
|
||||
button.addClass('wbcr-factory-activate-premium');
|
||||
}
|
||||
|
||||
if( component_name.plugin_action === 'activate' ) {
|
||||
button.remove();
|
||||
window.location.href = '<?= admin_url('admin.php?page=dashboard-titan_security'); ?>';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="wbcr-factory-templates-134-multisite-suggetion">
|
||||
<div class="wbcr-factory-inner-contanier">
|
||||
<h3>
|
||||
<a href="https://wordpress.org/plugins/anti-spam" target="_blank"><?php _e('Install Firewall and Malware scanner (Titan sucurity) component', 'clearfy') ?></a>
|
||||
</h3>
|
||||
|
||||
<p><?php _e('Titan includes anti-spam, firewall, malware scanner, site accessibility checking, security and threats audits for WordPress websites. Our security functions provide Titan with the latest firewall rules, malware signatures, and database of malicious IP addresses – all you need to ensure the security of your website.', 'clearfy') ?></p>
|
||||
<p>
|
||||
<?php _e('Titan is a comprehensive WordPress security solution, completed by a set of additional features as add-ons, which was placed into a simple and intuitive interface.', 'clearfy') ?>
|
||||
<a href="https://wordpress.org/plugins/anti-spam" target="_blank"><?php _e('Read more', 'clearfy'); ?></a>
|
||||
</p>
|
||||
|
||||
<p style="color:#ff4d00"><?php _e('Installing the component will not take you long, just click the install button, then activate.', 'clearfy') ?></p>
|
||||
<p style="margin-top:20px">
|
||||
<?php $install_button->render_link(); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_DefencePage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = "defence";
|
||||
|
||||
public $page_menu_dashicon = 'dashicons-shield-alt';
|
||||
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct( WCL_Plugin $plugin ) {
|
||||
$this->menu_title = __( 'Defence', 'clearfy' );
|
||||
$this->page_menu_short_description = __( 'Protective hacks, privacy', 'clearfy' );
|
||||
|
||||
parent::__construct( $plugin );
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permalinks options.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getPageOptions() {
|
||||
$options = array();
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Base settings</strong>.', 'clearfy' ) . '<p>' . __( 'Basic recommended security settings.', 'clearfy' ) . '</p></div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'protect_author_get',
|
||||
'title' => __( 'Hide author login', 'clearfy' ),
|
||||
'layout' => array( 'hint-type' => 'icon' ),
|
||||
'hint' => __( 'An attacker can find out the author\'s login, using a similar request to get your site. mysite.com/?author=1', 'clearfy' ) . '<br><b>Clearfy: </b>' . __( 'Sets the redirect to exclude the possibility of obtaining a login.', 'clearfy' ),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'change_login_errors',
|
||||
'title' => __( 'Hide errors when logging into the site', 'clearfy' ),
|
||||
'layout' => array( 'hint-type' => 'icon' ),
|
||||
'hint' => __( 'WP by default shows whether you entered a wrong login or incorrect password, which allows attackers to understand if there is a certain user on the site, and then start searching through the passwords.', 'clearfy' ) . '<br><b>Clearfy: </b>' . __( 'Changes in the text of the error so that attackers could not find the login.', 'clearfy' ),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_x_pingback',
|
||||
'title' => __( 'Disable XML-RPC', 'clearfy' ),
|
||||
'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
|
||||
'hint' => __( 'A pingback is basically an automated comment that gets created when another blog links to you. A self-pingback is created when you link to an article within your own blog. Pingbacks are essentially nothing more than spam and simply waste resources.', 'clearfy' ) . '<br><b>Clearfy: </b>' . __( 'Removes the server responses a reference to the xmlrpc file.', 'clearfy' ),
|
||||
'default' => false,
|
||||
'eventsOn' => array(
|
||||
'show' => '#wbcr-clearfy-xml-rpc-danger-message'
|
||||
),
|
||||
'eventsOff' => array(
|
||||
'hide' => '#wbcr-clearfy-xml-rpc-danger-message'
|
||||
)
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => array( $this, 'xmlRpcDangerMessage' )
|
||||
);
|
||||
|
||||
//block_xml_rpc
|
||||
//disable_xml_rpc_auth
|
||||
//remove_xml_rpc_tag
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Hide WordPress versions</strong>', 'clearfy' ) . '<p>' . __( 'WordPress itself and many plugins shows their version at the public areas of your site. An attacker received this information may be aware of the vulnerabilities found in the version of the WordPress core or plugins.', 'clearfy' ) . '</p></div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_html_comments',
|
||||
'title' => __( 'Remove html comments', 'clearfy' ),
|
||||
'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
|
||||
'hint' => __( 'This function will remove all html comments in the source code, except for special and hidden comments. This is necessary to hide the version of installed plugins.', 'clearfy' ) . '<br><br><b>Clearfy: </b>' . __( 'Remove html comments in source code.', 'clearfy' ),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_meta_generator',
|
||||
'title' => __( 'Remove meta generator', 'clearfy' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'clearfy' ) . ')</span>',
|
||||
'layout' => array( 'hint-type' => 'icon' ),
|
||||
'hint' => __( 'Allows attacker to learn the version of WP installed on the site. This meta tag has no useful function.', 'clearfy' ) . '<br><b>Clearfy: </b>' . sprintf( __( 'Removes the meta tag from the %s section', 'clearfy' ), '<head>' ),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$form_options = array();
|
||||
|
||||
$form_options[] = array(
|
||||
'type' => 'form-group',
|
||||
'items' => apply_filters( 'wbcr_clearfy_defence_form_options', $options, $this ),
|
||||
//'cssClass' => 'postbox'
|
||||
);
|
||||
|
||||
return wbcr_factory_480_apply_filters_deprecated( 'wbcr_clr_defence_form_options', array(
|
||||
$form_options,
|
||||
$this
|
||||
), '1.3.1', 'wbcr_clearfy_defence_form_options' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an html warning notification html markup.
|
||||
*/
|
||||
public function xmlRpcDangerMessage() {
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label"></label>
|
||||
<div class="control-group col-sm-8">
|
||||
<div id="wbcr-clearfy-xml-rpc-danger-message" class="wbcr-clearfy-danger-message">
|
||||
<?php _e( '<b>Use this option carefully!</b><br> Plugins like jetpack may have problems using this option.', 'clearfy' ) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_HideLoginPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = "clrf_hide_login";
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_parent_page = 'defence';
|
||||
|
||||
/**
|
||||
* Тип страницы
|
||||
* options - предназначена для создании страниц с набором опций и настроек.
|
||||
* page - произвольный контент, любой html код
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'page';
|
||||
|
||||
/**
|
||||
* Позиция закладки в меню плагина.
|
||||
* 0 - в самом конце, 100 - в самом начале
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $page_menu_position = 30;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_menu_dashicon = 'dashicons-images-alt2';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Hide login page', 'clearfy');
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Содержание страницы
|
||||
*/
|
||||
public function showPageContent()
|
||||
{
|
||||
require_once WCL_PLUGIN_DIR . '/admin/includes/classes/class.install-plugins-button.php';
|
||||
$install_button = $this->plugin->get_install_component_button('wordpress', 'hide-login-page/hide-login-page.php');
|
||||
$install_button->add_class('wbcr-factory-purchase-premium');
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
$.wfactory_480.hooks.add('core/components/updated', function(button, component_name) {
|
||||
if( component_name.plugin_action === 'install' ) {
|
||||
button.removeClass('wbcr-factory-purchase-premium');
|
||||
button.addClass('wbcr-factory-activate-premium');
|
||||
}
|
||||
|
||||
if( component_name.plugin_action === 'activate' ) {
|
||||
button.remove();
|
||||
window.location.href = '<?= $this->getBaseUrl('hlp_hide_login'); ?>';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="wbcr-factory-templates-134-multisite-suggetion">
|
||||
<div class="wbcr-factory-inner-contanier">
|
||||
<h3><?php _e('Install Hide login page component', 'clearfy') ?></h3>
|
||||
|
||||
<p><?php _e('To start protect login page, you need to install the additional component Hide login page!', 'clearfy') ?></p>
|
||||
|
||||
<p><?php _e('Installing the component will not take you long, just click the install button, then activate.', 'clearfy') ?></p>
|
||||
|
||||
<p style="margin-top:20px">
|
||||
<?php $install_button->render_link(); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_ImageOptimizationPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $id = "clearfy_rio";
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_parent_page = 'performance';
|
||||
|
||||
/**
|
||||
* Тип страницы
|
||||
* options - предназначена для создании страниц с набором опций и настроек.
|
||||
* page - произвольный контент, любой html код
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'page';
|
||||
|
||||
/**
|
||||
* Позиция закладки в меню плагина.
|
||||
* 0 - в самом конце, 100 - в самом начале
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $page_menu_position = 30;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_menu_dashicon = 'dashicons-images-alt2';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct( WCL_Plugin $plugin ) {
|
||||
$this->menu_title = __( 'Image optimization', 'clearfy' );
|
||||
$this->page_menu_short_description = __( 'Compress bulk of images', 'clearfy' );
|
||||
|
||||
parent::__construct( $plugin );
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Содержание страницы
|
||||
*/
|
||||
public function showPageContent() {
|
||||
require_once WCL_PLUGIN_DIR . '/admin/includes/classes/class.install-plugins-button.php';
|
||||
$install_button = $this->plugin->get_install_component_button( 'wordpress', 'robin-image-optimizer/robin-image-optimizer.php' );
|
||||
$install_button->add_class( 'wbcr-factory-purchase-premium' );
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
$.wfactory_480.hooks.add('core/components/updated', function(button, component_name) {
|
||||
if( component_name.plugin_action === 'install' ) {
|
||||
button.removeClass('wbcr-factory-purchase-premium');
|
||||
button.addClass('wbcr-factory-activate-premium');
|
||||
}
|
||||
|
||||
if( component_name.plugin_action === 'activate' ) {
|
||||
button.remove();
|
||||
window.location.href = '<?= $this->getBaseUrl( 'rio_general' ); ?>';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="wbcr-factory-templates-134-multisite-suggetion">
|
||||
<div class="wbcr-factory-inner-contanier">
|
||||
<h3><?php _e( 'Install Robin Image Optimizer component', 'clearfy' ) ?></h3>
|
||||
<p><?php _e( 'To start optimizing images, you need to install the additional component Robin image optimizer!', 'clearfy' ) ?></p>
|
||||
<p><?php _e( 'Installing the component will not take you long, just click the install button, then activate.', 'clearfy' ) ?></p>
|
||||
<p style="margin-top:20px">
|
||||
<?php $install_button->render_link(); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Страница лицензирования плагина.
|
||||
*
|
||||
* Поддерживает режим работы с мультисаймами. Вы можете увидеть эту страницу в панели настройки сети.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
|
||||
*
|
||||
* @copyright (c) 2018 Webraftic Ltd
|
||||
*/
|
||||
class WCL_LicensePage extends WBCR\Factory_Templates_134\Pages\License {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
* @since 1.6.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = 'clearfy_license';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
* @since 1.6.0
|
||||
* @var string
|
||||
*/
|
||||
public $page_parent_page;
|
||||
|
||||
/**
|
||||
* WCL_LicensePage constructor.
|
||||
*
|
||||
* @param \Wbcr_Factory480_Plugin $plugin
|
||||
*
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*
|
||||
*/
|
||||
public function __construct( Wbcr_Factory480_Plugin $plugin ) {
|
||||
$this->menu_title = __( 'License', 'robin-image-optimizer' );
|
||||
$this->page_menu_short_description = __( 'Product activation', 'robin-image-optimizer' );
|
||||
$this->plan_name = __( 'Clearfy Business', 'robin-image-optimizer' );
|
||||
|
||||
if ( defined( 'WIO_PLUGIN_ACTIVE' ) && ! wrio_is_clearfy_license_activate() ) {
|
||||
$this->page_parent_page = 'none';
|
||||
}
|
||||
|
||||
parent::__construct( $plugin );
|
||||
|
||||
/**
|
||||
* Adds a new plugin card to license components page
|
||||
*
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
* @since 1.6.2
|
||||
*/
|
||||
add_filter( 'wbcr/clearfy/license/list_components', function ( $components ) {
|
||||
$title = 'Free';
|
||||
$icon = 'clearfy-premium-icon-256x256--lock.png';
|
||||
|
||||
if ( $this->is_premium ) {
|
||||
$title = 'Premium';
|
||||
$icon = 'clearfy-premium-icon-256x256--default.png';
|
||||
}
|
||||
|
||||
$components[] = [
|
||||
'name' => 'clearfy',
|
||||
'title' => sprintf( __( 'Clearfy [%s]', 'clearfy' ), $title ),
|
||||
'type' => 'internal',
|
||||
'build' => $this->is_premium ? 'premium' : 'free',
|
||||
'key' => $this->get_hidden_license_key(),
|
||||
'plan' => $this->get_plan(),
|
||||
'expiration_days' => $this->get_expiration_days(),
|
||||
'quota' => $this->is_premium ? $this->premium_license->get_count_active_sites() . ' ' . __( 'of', 'clearfy' ) . ' ' . $this->premium_license->get_sites_quota() : null,
|
||||
'subscription' => $this->is_premium && $this->premium_has_subscription ? sprintf( __( 'Automatic renewal, every %s', '' ), esc_attr( $this->get_billing_cycle_readable() ) ) : null,
|
||||
'url' => 'https://clearfy.pro/',
|
||||
'icon' => WCL_PLUGIN_URL . '/admin/assets/img/' . $icon,
|
||||
'description' => __( 'Public License is a GPLv3 compatible license allowing you to change and use this version of the plugin for free. Please keep in mind this license covers only free edition of the plugin. Premium versions are distributed with other type of a license.', 'clearfy' ),
|
||||
'license_page_id' => 'clearfy_license'
|
||||
];
|
||||
|
||||
return $components;
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return string
|
||||
* @since 1.6.0
|
||||
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
|
||||
*/
|
||||
public function get_plan_description() {
|
||||
$description = '<p style="font-size: 16px;">' . __( '<b>Clearfy Business</b> is a paid package of components for the popular free WordPress plugin named Clearfy. You get access to all paid components at one price.', 'clearfy' ) . '</p>';
|
||||
$description .= '<p style="font-size: 16px;">' . __( 'Paid license guarantees that you can download and update existing and future paid components of the plugin.', 'clearfy' ) . '</p>';
|
||||
|
||||
return $description;
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_PerformanceGooglePage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = "performance_google";
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_parent_page = 'performance';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_menu_dashicon = 'dashicons-performance';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $page_menu_position = 20;
|
||||
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Google services', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
public function afterFormSave()
|
||||
{
|
||||
$ga_cache = $this->getPopulateOption('ga_cache');
|
||||
$ga_caos_remove_wp_cron = $this->getPopulateOption('ga_caos_remove_wp_cron');
|
||||
|
||||
if( $ga_cache ) {
|
||||
if( !$ga_caos_remove_wp_cron ) {
|
||||
if( !wp_next_scheduled('wbcr_clearfy_update_local_ga') ) {
|
||||
wp_schedule_event(time(), 'daily', 'wbcr_clearfy_update_local_ga');
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if( (!$ga_cache || $ga_caos_remove_wp_cron) && wp_next_scheduled('wbcr_clearfy_update_local_ga') ) {
|
||||
wp_clear_scheduled_hook('wbcr_clearfy_update_local_ga');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permalinks options.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getPageOptions()
|
||||
{
|
||||
$options = array();
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-factory-page-group-header">' . __('<strong>Fonts and Maps</strong>.', 'clearfy') . '<p>' . __('Google Fonts and Maps strongly affect your website loading speed. Use settings below to disable or optimize Google fonts and Maps.', 'clearfy') . '</p></div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'lazy_load_google_fonts',
|
||||
'title' => __('Google Fonts asynchronous', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => __('By default, WordPress loads Google fonts synchronously, that is, your page will not be fully loaded until Google Fonts are loaded. This algorithm slows down the loading of your page and leads to errors when checking the site in Google Page Speed. Using this option, your Google Fonts will be loaded after your page is fully loaded. This method has a negative — you and visitors of your site will see how the font changes while loading a page, from the system to the downloadable one.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_google_fonts',
|
||||
'title' => __('Disable Google Fonts', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('This function stops loading of Open Sans and other fonts used by WordPress and bundled themes (Twenty Twelve, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen, Twenty Seventeen) from Google Fonts.
|
||||
Reasons for not using Google Fonts might be privacy and security, local development or production, blocking of Google’s servers, characters not supported by font, performance.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_google_maps',
|
||||
'title' => __('Disable Google maps', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('This function stops loading of Google Maps used by some themes or plugins.
|
||||
Reasons for not using Google Maps might be privacy and security, local development or production, blocking of Google’s servers, performance, not necessary, etc.', 'clearfy'),
|
||||
'default' => false,
|
||||
'eventsOn' => array(
|
||||
'show' => '.factory-control-exclude_from_disable_google_maps,.factory-control-remove_iframe_google_maps'
|
||||
),
|
||||
'eventsOff' => array(
|
||||
'hide' => '.factory-control-exclude_from_disable_google_maps,.factory-control-remove_iframe_google_maps'
|
||||
)
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_iframe_google_maps',
|
||||
'title' => __('Remove iframe Google maps', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('By default, the "Disable Google Maps" option removes maps inserted with the SCRIPT tag from the page source code. However, you can also cut out all maps inserted via the iframe by enabling this option.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'textbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'exclude_from_disable_google_maps',
|
||||
'title' => __('Exclude pages from Disable Google Maps filter', 'clearfy'),
|
||||
'hint' => __('Posts or Pages IDs separated by a ,', 'clearfy')
|
||||
);*/
|
||||
|
||||
$form_options = array();
|
||||
|
||||
$form_options[] = array(
|
||||
'type' => 'form-group',
|
||||
'items' => $options,
|
||||
//'cssClass' => 'postbox'
|
||||
);
|
||||
|
||||
return apply_filters('wbcr_clr_google_performance_form_options', $form_options, $this);
|
||||
}
|
||||
}
|
||||
@@ -1,477 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_PerformancePage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* @see {@inheritDoc}
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $id = "performance";
|
||||
|
||||
/**
|
||||
* @see {@inheritDoc}
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $page_menu_dashicon = 'dashicons-performance';
|
||||
|
||||
/**
|
||||
* @see {@inheritDoc}
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $page_menu_position = 20;
|
||||
|
||||
/**
|
||||
* @see {@inheritDoc}
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Performance', 'clearfy');
|
||||
$this->page_menu_short_description = __('Optimization js, css, fonts', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
public function afterFormSave()
|
||||
{
|
||||
if( $this->getPopulateOption('disable_gravatars') ) {
|
||||
update_option('show_avatars', false);
|
||||
} else {
|
||||
update_option('show_avatars', true);
|
||||
}
|
||||
}
|
||||
|
||||
public function warningNotice()
|
||||
{
|
||||
parent::warningNotice();
|
||||
|
||||
if( !$this->plugin->getPopulateOption('revisions_disable') && $this->is_post_revision_constant() ) {
|
||||
$this->printWarningNotice(__('Warning! In the wp-config.php file, a constant WP_POST_REVISIONS is found, it determines the number of revisions. Delete it so you can change this value through the admin panel.', 'clearfy'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permalinks options.
|
||||
*
|
||||
* @return mixed[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getPageOptions()
|
||||
{
|
||||
$options = [];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-factory-page-group-header">' . __('<strong>Clear the unnecessary scripts</strong>', 'clearfy') . '<p>' . __('This set of settings will help you remove unnecessary links and code from the head section, as well as reduce your website\'s pages weight.', 'clearfy') . '</p></div>'
|
||||
];
|
||||
|
||||
/*$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_json_rest_api',
|
||||
'title' => __('Remove REST API Links', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'red'],
|
||||
'hint' => __('The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving JSON (JavaScript Object Notation) objects. However, a lot of sites don’t use this, and therefore in most cases, it is just unnecessary code.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes REST API link tag from the front end and the REST API header link from page requests.', 'clearfy'),
|
||||
'default' => false,
|
||||
'eventsOn' => [
|
||||
'show' => '#wbcr-clearfy-rest-api-danger-message'
|
||||
],
|
||||
'eventsOff' => [
|
||||
'hide' => '#wbcr-clearfy-rest-api-danger-message'
|
||||
]
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => [$this, 'restApiDangerMessage']
|
||||
];*/
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_emoji',
|
||||
'title' => __('Disable Emojis', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('Emojis are fun and all, but if you are aren’t using them they actually load a JavaScript file (wp-emoji-release.min.js) on every page of your website. For a lot of businesses, this is not needed and simply adds load time to your site. So we recommend disabling this.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes WordPress Emojis JavaScript file (wp-emoji-release.min.js).', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
/*$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_jquery_migrate',
|
||||
'title' => __('Remove jQuery Migrate', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'red'],
|
||||
'hint' => __('They started adding jQuery migrate in WordPress 3.6. Most up-to-date frontend code and plugins don’t require jquery-migrate.min.js. In most cases, this simply adds unnecessary load to your site. You can see this running if you launch Chrome Devtools console.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes jQuery Migrate JavaScript file (jquery-migrate.min.js).', 'clearfy') . '<br>--<br><span class="wbcr-factory-light-orange-color">' . __('Warning! If there is a broke on your site, disable this option!', 'clearfy') . '</span>',
|
||||
'default' => false
|
||||
];*/
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_embeds',
|
||||
'title' => __('Disable Embeds', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('Embeds were released with WordPress 4.4. This is basically the magic that auto converts your YouTube videos, Tweets, and URLs into pretty previews while you are editing. However, this actually loads a JavaScript file (wp-embed.min.js) on every page of your website. If you don’t care about the auto converting preview (which we don’t), you can disable this across your site.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes WordPress Embed JavaScript file (wp-embed.min.js)', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_bloat',
|
||||
'title' => __('Remove bloat in head', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('Remove RSD Link, XFN (XHTML Friends Network) Profile Link, wlwmanifest Link, Shortlink, Remove links to previous, next post, .recentcomments styles', 'clearfy') . '<br><code>link rel="EditURI" type="application/rsd+xml" title="RSD"</code><br><br><b>Clearfy: </b>' . __('Remove RSD (Real Simple Discovery) link tag.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_dns_prefetch',
|
||||
'title' => __('Remove dns-prefetch', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => sprintf(__('Since version 4.6.1 in WordPress there are new links in the section %s this type of: ', 'clearfy'), 'head') . ' <code>link rel="dns-prefetch" href="//s.w.org"</code><br><br><b>Clearfy: </b>' . sprintf(__('Removes dns-prefetch links from the %s section', 'clearfy'), 'head'),
|
||||
'default' => false
|
||||
);*/
|
||||
/*$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_rsd_link',
|
||||
'title' => __('Remove RSD Link', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('The above link is used by blog clients. If you edit your site from your browser then you don’t need this. It is also used by some 3rd party applications that utilize XML-RPC requests. In most cases, this is just unnecessary code.', 'clearfy') . '<br><code>link rel="EditURI" type="application/rsd+xml" title="RSD"</code><br><br><b>Clearfy: </b>' . __('Remove RSD (Real Simple Discovery) link tag.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_xfn_link',
|
||||
'title' => __('Removing XFN (XHTML Friends Network) Profile Link', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('The profile attribute specifies the metadata profile address. Usually, the browser recognizes the value of this attribute and executes some conventions related to the specified profile. Loading the document itself at the specified address does not really happen, moreover, it may not exist at all.
|
||||
In particular, the profile is used for the XFN microformat (XHTML Friends Network) - a way of representing relationships between people using links and rel attributes with different values. WordPress also actively uses profile in its templates.
|
||||
', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Remove link tag', 'clearfy') . '<br><code>link rel="profile" href="http://gmpg.org/xfn/11"</code>',
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_wlw_link',
|
||||
'title' => __('Remove wlwmanifest Link', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => '<code>link rel="wlwmanifest" type="application/wlwmanifest+xml"</code><br>' . __('This link is actually used by Windows Live Writer. If you don’t know use Windows Live Writer, which we are guessing you don’t, this is just unnecessary code.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Remove wlwmanifest (Windows Live Writer) link tag.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_shortlink_link',
|
||||
'title' => __('Remove Shortlink', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => sprintf(__('By default, the following tag shows up in every WordPress install. %s This is used for a shortlink to your pages and posts. However, if you are already using pretty permalinks, such as domain.com/post, then there is no reason to keep this, it is just unnecessary code.', 'clearfy'), '<br><code>link rel="shortlink" href="https://domain.com?p=712"</code><br>') . '<br><br><b>Clearfy: </b>' . __('Remove Shortlink link tag.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_adjacent_posts_link',
|
||||
'title' => __('Remove links to previous, next post', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('If you use Wordpress as a CMS, then you can delete these links, they can only come in handy for a blog.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Remove the previous and next post links within the wp_head of your wordpress theme.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_recent_comments_style',
|
||||
'title' => __('Remove .recentcomments styles', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('WP by default for the widget "recent comments" prescribes in the code styles that are almost impossible to change, because to them apply! important.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes .recentcomments styles from head section.', 'clearfy'),
|
||||
'default' => false
|
||||
];*/
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_gravatars',
|
||||
'title' => __('Disable gravatars', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('This function that prevents the user’s gravatar being automatically obtained from gravatar.com based on their registered email. This would be useful for sites where users require an extra layer of privacy, or if you just want to prevent potentially silly or embarrasing avatar accidents.
|
||||
If you’re using Identicons or any other generated default avatar, the user should keep a consistent avatar unless they change their registered email.
|
||||
', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-factory-page-group-header">' . __('<strong>Fonts and Maps</strong>.', 'clearfy') . '<p>' . __('Google Fonts and Maps strongly affect your website loading speed. Use settings below to disable or optimize Google fonts and Maps.', 'clearfy') . '</p></div>'
|
||||
);
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'lazy_load_font_awesome',
|
||||
'title' => __('Font Awesome asynchronous', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('By default, WordPress loads Font Awesome icons synchronously, that is, your page will not be fully loaded until Font Awesome icons are loaded. This algorithm slows down the loading of your page and leads to errors when checking the site in Google Page Speed. Using this option, your Font Awesome icons will be loaded after your page is fully loaded. This method has a negative — you and visitors of your site will see changes while loading a page, from the placeholders to icons.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_dashicons',
|
||||
'title' => __('Disable Dashicons', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('Dashicons is the official icon font of the WordPress admin as of 3.8. Some of you have requested that we add a feature to remove Dashicons. Some themes and developers utilize this (dashicons.min.css) on the front-end of their sites.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'lazy_load_google_fonts',
|
||||
'title' => __('Google Fonts asynchronous', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => __('By default, WordPress loads Google fonts synchronously, that is, your page will not be fully loaded until Google Fonts are loaded. This algorithm slows down the loading of your page and leads to errors when checking the site in Google Page Speed. Using this option, your Google Fonts will be loaded after your page is fully loaded. This method has a negative — you and visitors of your site will see how the font changes while loading a page, from the system to the downloadable one.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_google_fonts',
|
||||
'title' => __('Disable Google Fonts', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('This function stops loading of Open Sans and other fonts used by WordPress and bundled themes (Twenty Twelve, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen, Twenty Seventeen) from Google Fonts.
|
||||
Reasons for not using Google Fonts might be privacy and security, local development or production, blocking of Google’s servers, characters not supported by font, performance.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_google_maps',
|
||||
'title' => __('Disable Google maps', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('This function stops loading of Google Maps used by some themes or plugins.
|
||||
Reasons for not using Google Maps might be privacy and security, local development or production, blocking of Google’s servers, performance, not necessary, etc.', 'clearfy'),
|
||||
'default' => false,
|
||||
'eventsOn' => array(
|
||||
'show' => '.factory-control-exclude_from_disable_google_maps,.factory-control-remove_iframe_google_maps'
|
||||
),
|
||||
'eventsOff' => array(
|
||||
'hide' => '.factory-control-exclude_from_disable_google_maps,.factory-control-remove_iframe_google_maps'
|
||||
)
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_iframe_google_maps',
|
||||
'title' => __('Remove iframe Google maps', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('By default, the "Disable Google Maps" option removes maps inserted with the SCRIPT tag from the page source code. However, you can also cut out all maps inserted via the iframe by enabling this option.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'textbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'exclude_from_disable_google_maps',
|
||||
'title' => __('Exclude pages from Disable Google Maps filter', 'clearfy'),
|
||||
'hint' => __('Posts or Pages IDs separated by a ,', 'clearfy')
|
||||
);
|
||||
|
||||
/*$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Remove query strings from static resources', 'clearfy') . '</strong>' . '<p>' . __('This funcitons will remove query strings from static resources like CSS & JS files inside the HTML <head> element to improve your speed scores in services like Pingdom, GTmetrix, PageSpeed and YSlow. <b style="color:#ff5722">Important:</b> This does not work for authorized users. To avoid problems after plugins update!', 'clearfy') . '</p>' . '</div>'
|
||||
];*/
|
||||
|
||||
/*$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_js_version',
|
||||
'title' => __('Remove Version from Script', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it\'s not possible to see if you run not the current version to exploit bugs from the older versions. <br><br>
|
||||
Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes wordpress version number from scripts (not logged in user only).', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_style_version',
|
||||
'title' => __('Remove Version from Stylesheet', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it\'s not possible to see if you run not the current version to exploit bugs from the older versions. <br><br>
|
||||
Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes the wordpress version number from stylesheets (not logged in user only).', 'clearfy'),
|
||||
'default' => false
|
||||
/*'eventsOn' => array(
|
||||
'show' => '.factory-control-disable_remove_style_version_for_auth_users'
|
||||
),
|
||||
'eventsOff' => array(
|
||||
'hide' => '.factory-control-disable_remove_style_version_for_auth_users'
|
||||
)
|
||||
];*/
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_remove_style_version_for_auth_users',
|
||||
'title' => __( 'Disable remove versions for auth users', 'clearfy' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'clearfy' ) . ')</span>',
|
||||
'layout' => array( 'hint-type' => 'icon' ),
|
||||
'default' => false
|
||||
);*/
|
||||
|
||||
/*$options[] = [
|
||||
'type' => 'textarea',
|
||||
'name' => 'remove_version_exclude',
|
||||
'height' => '120',
|
||||
'title' => __('Exclude stylesheet/script file names', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('Enter Stylesheet/Script file names to exclude from version removal (each exclude file starts with a new line)', 'clearfy') . '<br><br><b>' . __('Example', 'clearfy') . ':</b>' . ' http://testwp.dev/wp-includes/js/jquery/jquery.js',
|
||||
];*/
|
||||
|
||||
$options[] = [
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Heartbeat', 'clearfy') . '</strong>' . '<p>' . __('The WordPress Heartbeat API uses /wp-admin/admin-ajax.php to run AJAX calls from the web-browser. While this is great and all it can also cause high CPU usage and crazy amounts of PHP calls. For example, if you leave your dashboard open it will keep sending POST requests to this file on a regular interval, every 15 seconds. Here is an example below of it happening.', 'clearfy') . '</p>' . '</div>'
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'dropdown',
|
||||
'name' => 'disable_heartbeat',
|
||||
'way' => 'buttons',
|
||||
'title' => __('Disable Heartbeat', 'clearfy'),
|
||||
'data' => [
|
||||
['default', __('Default', 'clearfy')],
|
||||
['everywhere', __('Everywhere', 'clearfy')],
|
||||
['on_dashboard_page', __('In admin panel', 'clearfy')],
|
||||
['allow_only_on_post_edit_pages', __('Only allow when editing Posts/Pages', 'clearfy')]
|
||||
],
|
||||
//'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
//'hint' => __('You can disable all plugin updates or choose manual or automatic update mode.', 'clearfy'),
|
||||
'events' => [
|
||||
'default' => [
|
||||
'show' => '.factory-control-heartbeat_frequency'
|
||||
],
|
||||
'on_dashboard_page' => [
|
||||
'show' => '.factory-control-heartbeat_frequency'
|
||||
],
|
||||
'allow_only_on_post_edit_pages' => [
|
||||
'show' => '.factory-control-heartbeat_frequency'
|
||||
],
|
||||
'everywhere' => [
|
||||
'hide' => '.factory-control-heartbeat_frequency'
|
||||
]
|
||||
],
|
||||
'default' => 'default',
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'dropdown',
|
||||
'name' => 'heartbeat_frequency',
|
||||
'title' => __('Heartbeat frequency', 'clearfy'),
|
||||
'data' => [
|
||||
['default', __('Wordpress default', 'clearfy')],
|
||||
['20', '20 ' . __('seconds', 'clearfy')],
|
||||
['25', '25 ' . __('seconds', 'clearfy')],
|
||||
['30', '30 ' . __('seconds', 'clearfy')],
|
||||
['35', '35 ' . __('seconds', 'clearfy')],
|
||||
['40', '40 ' . __('seconds', 'clearfy')],
|
||||
['45', '45 ' . __('seconds', 'clearfy')],
|
||||
['50', '50 ' . __('seconds', 'clearfy')],
|
||||
['55', '55 ' . __('seconds', 'clearfy')],
|
||||
['60', '60 ' . __('seconds', 'clearfy')],
|
||||
['80', '80 ' . __('seconds', 'clearfy')],
|
||||
['120', '120 ' . __('seconds', 'clearfy')],
|
||||
['150', '150 ' . __('seconds', 'clearfy')],
|
||||
['200', '200 ' . __('seconds', 'clearfy')],
|
||||
['250', '250 ' . __('seconds', 'clearfy')],
|
||||
['300', '300 ' . __('seconds', 'clearfy')],
|
||||
['400', '400 ' . __('seconds', 'clearfy')],
|
||||
['500', '500 ' . __('seconds', 'clearfy')]
|
||||
],
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('Select the heartbeat frequency wordpress. We recommend you 60 seconds, default is 20 seconds.', 'clearfy'),
|
||||
'default' => 'default'
|
||||
];
|
||||
|
||||
$form_options = [];
|
||||
|
||||
$form_options[] = [
|
||||
'type' => 'form-group',
|
||||
'items' => $options,
|
||||
//'cssClass' => 'postbox'
|
||||
];
|
||||
|
||||
return apply_filters('wbcr_clr_code_clean_form_options', $form_options, $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an html warning notification html markup.
|
||||
*/
|
||||
public function restApiDangerMessage()
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label"></label>
|
||||
<div class="control-group col-sm-8">
|
||||
<div id="wbcr-clearfy-rest-api-danger-message" class="wbcr-clearfy-danger-message">
|
||||
<?php _e('<b>Use this option carefully!</b><br> Plugins like Contact form 7, Anycomments may have problems using this option.', 'clearfy') ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if WP_POST_REVISIONS is installed in wp-config file
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function is_post_revision_constant()
|
||||
{
|
||||
$config_path = ABSPATH . '/wp-config.php';
|
||||
|
||||
if( file_exists($config_path) ) {
|
||||
$file = fopen($config_path, 'r');
|
||||
$content = fread($file, filesize($config_path));
|
||||
fclose($file);
|
||||
|
||||
if( !empty($content) && preg_match('/define(.+?)WP_POST_REVISIONS/', $content) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,249 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_QuickStartPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = "quick_start";
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $page_menu_dashicon = 'dashicons-clock';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $page_menu_position = 100;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $internal = false;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $menu_target = 'options-general.php';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'page';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $add_link_to_plugin_actions = true;
|
||||
|
||||
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* Show on the page a search form for search options of plugin?
|
||||
*
|
||||
* @since 2.2.0 - Added
|
||||
* @var bool - true show, false hide
|
||||
*/
|
||||
public $show_search_options_form = true;
|
||||
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Clearfy', 'clearfy');
|
||||
$this->page_menu_short_description = __('One-click settings', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
public function getPageTitle()
|
||||
{
|
||||
return __('Quick start', 'clearfy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests assets (js and css) for the page.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.0.0
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
*/
|
||||
public function assets($scripts, $styles)
|
||||
{
|
||||
parent::assets($scripts, $styles);
|
||||
|
||||
/**
|
||||
* Подгружаем стили для вижета оптимизации изображений, если не установли плагин оптимизации изображений
|
||||
*/
|
||||
if( !defined('WIO_PLUGIN_ACTIVE') ) {
|
||||
$styles->add(WCL_PLUGIN_URL . '/admin/assets/css/base-statistic.css');
|
||||
}
|
||||
|
||||
//$this->scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/general.js');
|
||||
|
||||
$params = array(
|
||||
//'ajaxurl' => admin_url('admin-ajax.php'),
|
||||
'flush_cache_url' => $this->getActionUrl('flush-cache-and-rules', array('_wpnonce' => wp_create_nonce('wbcr_factory_' . $this->getResultId() . '_flush_action'))),
|
||||
'ajax_nonce' => wp_create_nonce('wbcr_clearfy_ajax_quick_start_nonce'),
|
||||
'i18n' => array(
|
||||
'success_update_settings' => __('Settings successfully updated!', 'clearfy'),
|
||||
'unknown_error' => __('During the setup, an unknown error occurred, please try again or contact the plugin support.', 'clearfy')
|
||||
)
|
||||
);
|
||||
$this->scripts->localize('wbcr_clearfy_ajax', $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the description above the options.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function _showHeader()
|
||||
{
|
||||
?>
|
||||
<div class="wbcr-clearfy-header">
|
||||
<?php _e('On this page you can quickly configure the plug-in without going into details.', 'clearfy') ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function showPageContent()
|
||||
{
|
||||
$allow_mods = apply_filters('wbcr_clearfy_allow_quick_mods', array(
|
||||
'clear_code' => array('title' => __('One click code clearing', 'clearfy'), 'icon' => 'dashicons-yes'),
|
||||
'defence' => array('title' => __('One click security', 'clearfy'), 'icon' => 'dashicons-shield'),
|
||||
'seo_optimize' => array(
|
||||
'title' => __('One click seo optimization', 'clearfy'),
|
||||
'icon' => 'dashicons-star-empty'
|
||||
),
|
||||
'remove_default_widgets' => array(
|
||||
'title' => __('One click remove default Widgets', 'clearfy'),
|
||||
'icon' => 'dashicons-networking'
|
||||
),
|
||||
));
|
||||
|
||||
if( !$this->plugin->isActivateComponent('widget_tools') ) {
|
||||
unset($allow_mods['remove_default_widgets']);
|
||||
}
|
||||
|
||||
$allow_mods['reset'] = array(
|
||||
'title' => __('Reset all settings', 'clearfy'),
|
||||
'icon' => 'dashicons-backup',
|
||||
'args' => array('flush_redirect' => 1)
|
||||
);
|
||||
?>
|
||||
<div class="wbcr-clearfy-confirm-popup">
|
||||
<h3><?php _e('Are you sure you want to enable the this options?', 'clearfy') ?></h3>
|
||||
|
||||
<div class="wbcr-clearfy-reset-warning-message">
|
||||
<?php _e('After confirmation, all the settings of the plug-in will return to the default state. Make backup settings by copying data from the export field.', 'clearfy') ?>
|
||||
</div>
|
||||
<ul class="wbcr-clearfy-list-options"></ul>
|
||||
<div class="wbcr-clearfy-popup-buttons">
|
||||
<button class="wbcr-clearfy-popup-button-ok"><?php _e('Confirm', 'clearfy') ?></button>
|
||||
<button class="wbcr-clearfy-popup-button-cancel"><?php _e('Cancel', 'clearfy') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wbcr-content-section">
|
||||
<div class="wbcr-factory-page-group-header" style="margin:0"><?php _e('<strong>Quick start</strong>.', 'clearfy') ?>
|
||||
<p><?php _e('These are quick optimization options for your website. You can activate the groups of necessary settings in one click. With the fast optimization mode, we are enable the only safe settings that do not break your website. That is why we recommend you to look at each setting of the plugin individually. The settings with grey and red question mark will not be active, until you do it yourself.', 'clearfy') ?></p>
|
||||
</div>
|
||||
|
||||
<?php do_action('wbcr_clearfy_quick_boards'); ?>
|
||||
|
||||
<div id="wbcr-clearfy-quick-mode-board">
|
||||
<h4 style="margin-top:10px;"><?php _e('Select what you need to do', 'clearfy') ?></h4>
|
||||
|
||||
<p style="color:#9e9e9e"><?php _e('After selecting any optimization case, the plugin will automatically enable the necessary settings in safe mode and one click.', 'clearfy') ?></p>
|
||||
|
||||
<ul>
|
||||
<?php foreach($allow_mods as $mode_name => $mode): ?>
|
||||
<?php
|
||||
$mode_title = $mode;
|
||||
$mode_icon = '';
|
||||
$mode_args = '';
|
||||
|
||||
if( is_array($mode) ) {
|
||||
$mode_title = isset($mode['title']) ? $mode['title'] : '';
|
||||
$mode_icon = isset($mode['icon']) ? $mode['icon'] : '';
|
||||
$mode_args = isset($mode['args']) && is_array($mode['args']) ? WCL_Helper::getEscapeJson($mode['args']) : '';
|
||||
}
|
||||
?>
|
||||
|
||||
<li>
|
||||
<?php
|
||||
$group = WCL_Group::getInstance($mode_name);
|
||||
|
||||
$filter_mode_options = array();
|
||||
foreach($group->getOptions() as $option) {
|
||||
$filter_mode_options[$option->getName()] = $option->getTitle();
|
||||
}
|
||||
|
||||
$print_group_options = WCL_Helper::getEscapeJson($filter_mode_options);
|
||||
?>
|
||||
<?php if( $mode_name == 'reset' ): ?>
|
||||
<h4><?php _e('Reset settings', 'clearfy') ?></h4>
|
||||
<p style="color:#9e9e9e"><?php _e('After confirmation, all the settings of the plug-in will return to the default state. Make backup settings by copying data from the export field.', 'clearfy') ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
<div class="wbcr-clearfy-switch wbcr-clearfy-switch-mode-<?= $mode_name ?>" data-mode="<?= $mode_name ?>" data-mode-args="<?= $mode_args ?>" data-mode-options="<?= $print_group_options ?>">
|
||||
<?php if( !empty($mode_icon) ): ?>
|
||||
<i class="dashicons <?= $mode_icon; ?>"></i>
|
||||
<?php endif; ?>
|
||||
<span><?= $mode_title ?></span>
|
||||
|
||||
<div class="wbcr-clearfy-switch-confirmation">
|
||||
<button class="wbcr-clearfy-button-activate-mode">
|
||||
<?php if( $mode_name == 'reset' ): ?>
|
||||
<?php _e('Reset', 'clearfy'); ?>
|
||||
<?php else: ?>
|
||||
<?php _e('Do It!', 'clearfy'); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<li>
|
||||
<div class="wbcr-clearfy-switch">
|
||||
<i class="dashicons dashicons-admin-settings"></i>
|
||||
<span><?php _e('Configuration wizard', 'clearfy'); ?></span>
|
||||
<div class="wbcr-clearfy-switch-confirmation">
|
||||
<a href="<?php echo WCL_Plugin::app()->getPluginPageUrl('setup'); ?>" class="btn wbcr-clearfy-button-activate-wizard"><?php _e('Start', 'clearfy'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_DoublePagesPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = "double_pages";
|
||||
|
||||
public $page_parent_page = 'seo';
|
||||
|
||||
public $page_menu_dashicon = 'dashicons-admin-page';
|
||||
|
||||
public $page_menu_position = 16;
|
||||
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Duplicate pages', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Permalinks options.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getPageOptions()
|
||||
{
|
||||
$options = array();
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => array($this, '_showHeader')
|
||||
);*/
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'redirect_archives_date',
|
||||
'title' => __('Disable search', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => sprintf(__('Many duplicates in date archives. Imagine, in addition, that your article will be displayed in the main and in the category, you will still receive at least 3 duplicates: in archives by year, month and date, for example %s.', 'clearfy'), '/2016/2016/02 / /2016/02/15') . '<br><b>Clearfy: </b>' . __('Removes all pages with the date archives and puts a redirect.', 'clearfy'),
|
||||
'default' => false
|
||||
);*/
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-factory-page-group-header">' . __('<strong>Delete duplicate pages.</strong>.', 'clearfy') . '<p>' . __('Search engines perceive these pages as website separate pages, therefore their content ceases to be unique because of duplication. In addition, page reference weight is reduced if it has a duplicate. A small number of duplicated pages will not be a serious problem, but if there are more than 50 percents of them - you urgently need to correct the situation.', 'clearfy') . '</p></div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'redirect_archives_date',
|
||||
'title' => __('Remove archives date', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => sprintf(__('Many duplicates in date archives. Imagine, in addition, that your article will be displayed in the main and in the category, you will still receive at least 3 duplicates: in archives by year, month and date, for example %s.', 'clearfy'), '/2016/2016/02 / /2016/02/15') . '<br><b>Clearfy: </b>' . __('Removes all pages with the date archives and puts a redirect.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'redirect_archives_author',
|
||||
'title' => __('Remove author archives ', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => sprintf(__('If the site is only filled by you - a mandatory item. Allows you to get rid of duplicates on user archives, for example %s.', 'clearfy'), '/author/admin/') . '<br><b>Clearfy: </b>' . __('Removes all pages with the author archives and puts a redirect.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'redirect_archives_tag',
|
||||
'title' => __('Remove archives tag', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('If you use tags only for the block Similar records, or do not use them at all - it will be more correct to close them to avoid duplicates.', 'clearfy') . '<br><b>Clearfy: </b>' . __('Removes all pages with the tag archives and puts a redirect.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'attachment_pages_redirect',
|
||||
'title' => __('Remove attachment pages', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => __('Every of the pictures has its own page on the site. Such pages are successfully indexed and create duplicates. The site can have thousands of same-type attachment pages.', 'clearfy') . '<br><b>Clearfy: </b>' . __('Removes attachment pages and puts a redirect.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_single_pagination_duplicate',
|
||||
'title' => __('Remove post pagination', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => sprintf(__('In WordPress, any post can be divided into parts (pages), each part will have its own address. But this functionality is rarely used, but it can create trouble for you. For example, you can add a number to the address of any entry of your blog, %s - the post itself will open, which will be a duplicate. You can substitute any number.', 'clearfy'), '/privet-mir/1/') . '<br><b>Clearfy: </b>' . sprintf(__('Removes the pagination from the post and puts a redirect. Example: %s', 'clearfy'), '/post-name/number'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_replytocom',
|
||||
'title' => __('Remove ?replytocom', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => sprintf(__('WordPress adds %s to the link "Reply" in the comments, if you use hierarchical comments.', 'clearfy'), '?replytocom') . '<br><b>Clearfy: </b>' . __('?relpytocom remove and and puts a redirect.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'separator',
|
||||
'cssClass' => 'factory-separator-dashed'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => array($this, '_showFormButton')
|
||||
);*/
|
||||
|
||||
$form_options = array();
|
||||
|
||||
$form_options[] = array(
|
||||
'type' => 'form-group',
|
||||
'items' => $options,
|
||||
//'cssClass' => 'postbox'
|
||||
);
|
||||
|
||||
return apply_filters('wbcr_clr_double_form_options', $form_options, $this);
|
||||
}
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_SeoPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = "seo";
|
||||
|
||||
public $page_menu_dashicon = 'dashicons-star-filled';
|
||||
|
||||
public $page_menu_position = 16;
|
||||
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('SEO', 'clearfy');
|
||||
$this->page_menu_short_description = __('Additional small fixes SEO', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Conflict notites
|
||||
*/
|
||||
public function warningNotice()
|
||||
{
|
||||
$notices = apply_filters('wbcr_clr_seo_page_warnings', array());
|
||||
|
||||
if( !empty($notices) ) {
|
||||
foreach($notices as $message) {
|
||||
$this->printWarningNotice($message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Permalinks options.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getPageOptions()
|
||||
{
|
||||
$options = array();
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-factory-page-group-header">' . __('<strong>Basic SEO optimization settings</strong>.', 'clearfy') . '<p>' . __('Recommended settings that can complement your SEO plugin.', 'clearfy') . '</p></div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'content_image_auto_alt',
|
||||
'title' => __('Automatically set the alt attribute', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => __('The alt attribute is mandatory, so most SEO experts say. If you missed or did not fill it at all, it will be automatically assigned and will be equal to the title of the article.', 'clearfy') . '<br><br><b>Clearfy: </b>' . sprintf(__('Replaces the %s, on attribute with an article name %s', 'clearfy'), '<code>img scr="" alt=""</code>', '<code>img scr="" alt="Hello world"</code>'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'right_robots_txt',
|
||||
'title' => __('Create right robots.txt', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('After installation, WP does not contain a robots.txt file and create it manually. We re-read about 30 different articles, instructions from Yandex and Google to create the perfect robots.txt', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Automatically creates the perfect robots.txt file', 'clearfy'),
|
||||
'default' => false,
|
||||
'eventsOn' => array(
|
||||
'show' => '.factory-control-robots_txt_text'
|
||||
),
|
||||
'eventsOff' => array(
|
||||
'hide' => '.factory-control-robots_txt_text'
|
||||
)
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'textarea',
|
||||
'name' => 'robots_txt_text',
|
||||
'title' => __('You can edit the robots.txt file in the box below:', 'clearfy'),
|
||||
'default' => WCL_Helper::getRightRobotTxt(),
|
||||
'height' => '300'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Server headers and response', 'clearfy') . '</strong>' . '<p>' . __('WordPress does not know how to give the Last Modified header in the server\'s responses. You can do this using the settings below.', 'clearfy') . '</p>' . '</div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'set_last_modified_headers',
|
||||
'title' => __('Automatically insert the Last Modified header', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'default' => false,
|
||||
'eventsOn' => array(
|
||||
'show' => '.factory-control-last_modified_exclude, .factory-control-disable_frontpage_last_modified_headers'
|
||||
),
|
||||
'eventsOff' => array(
|
||||
'hide' => '.factory-control-last_modified_exclude, .factory-control-disable_frontpage_last_modified_headers'
|
||||
)
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_frontpage_last_modified_headers',
|
||||
'title' => __('Disable Last Modified header on front page', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'default' => true,
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'textarea',
|
||||
'name' => 'last_modified_exclude',
|
||||
'height' => '120',
|
||||
'title' => __('Exclude pages:', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => sprintf(__('You can specify a page mask, for example: %s or %s. All pages that contain the string will be excluded. Each exclude must begin with a new line.', 'clearfy'), '/s=', '/manager/'),
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'if_modified_since_headers',
|
||||
'title' => __('Return an If-Modified-Since responce', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'default' => false
|
||||
);
|
||||
|
||||
if( $this->plugin->isActivateComponent('yoast_seo') ) {
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('For the Yoast SEO plugin', 'clearfy') . '</strong>' . '<p>' . __('These settings will help you eliminate some problems associated with the popular Yoast SEO plugin', 'clearfy') . '</p>' . '</div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_last_item_breadcrumb_yoast',
|
||||
'title' => __('Remove duplicate names in breadcrumbs WP SEO by Yoast', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => __('The last element in the breadcrumbs in the Yoast SEO plugin duplicates the title of the article. Some SEO-specialists consider this duplication to be superfluous.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes duplication of the name in the breadcrumbs of the WP SEO plugin from Yoast.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_remove_image_from_xml_sitemap',
|
||||
'title' => sprintf(__('Remove the tag %s from XML site map', 'clearfy'), 'image:image') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'green'),
|
||||
'hint' => __('Yandex.Webmaster swears on a standard XML card from the plugin Yoast, tk. it has a specific tag', 'clearfy') . 'image:image<br><br><b>Clearfy: </b>' . sprintf(__('Remove the tag %s from XML site map of the plugin Yoast SEO.', 'clearfy'), 'image:image') . '<br>--<br><span class="wbcr-factory-light-orange-color">' . __('Attention! After activation, turn off the site map and enable it back to regenerate it.', 'clearfy') . '</span>' . '<br><span class="wbcr-factory-light-orange-color">' . __('In older versions of Yoast SEO may not work - update the plugin Yoast', 'clearfy') . '</span>',
|
||||
'default' => false,
|
||||
'eventsOn' => array()
|
||||
);
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'html',
|
||||
'id' => 'wbcr-clearfy-image-xml-sitemap-warning',
|
||||
'cssClass' => 'factory-hints',
|
||||
'html' => array($this, 'sfsdfsdf')
|
||||
);*/
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_remove_json_ld_search',
|
||||
'title' => __('Disable JSON-LD sitelinks searchbox', 'clearfy') . '</span>',
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('If you’re not familiar with Search Action it’s the mark-up that helps search engines add a shiny Sitelinks Search Box below your search engine results. For the majority of webmasters the extra search box is an absolutely fantastic feature but for many it’s not required or wanted, especially if a site only has a few pages or if the site uses a customised search platform that only searches blog posts and not pages.', 'clearfy') . ' <br><b>Clearfy: </b>' . __('Disable JSON-LD sitelinks searchbox using WordPress in plugin Yoast SEO.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_remove_json_ld_output',
|
||||
'title' => __('Disable Yoast Structured Data', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text"></span>',
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('Prevents output of the script tag of type application/ld+json containing
|
||||
schema.org data from the popular Yoast SEO and Yoast SEO Premium plugins.
|
||||
There is currently no UI to do so.', 'clearfy') . ' <br><b>Clearfy: </b>' . __('Disable Structured Data in plugin Yoast SEO.', 'clearfy'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_canonical_pagination',
|
||||
'title' => sprintf(__('Canonical on pagination pages', 'clearfy'), 'head'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'hint' => __('It’s a well-known fact, that the Yoast SEO plugin outputs canonical links on pagination pages, such as /page/2/, /page/3/ and so on. While various search engines treat canonical links differently, it is always better to replace them with the link leading to the main pagination page.
|
||||
If enabled, this feature changes the canonical link to the main page or category link.
|
||||
When you deactivate some components, permanent links may work incorrectly. If this happens, please, update the structure of the permanent links, so you could complete the deactivation.
|
||||
', 'clearfy'),
|
||||
'default' => false
|
||||
);*/
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_remove_head_comment',
|
||||
'title' => sprintf(__('Remove comment from %s section', 'clearfy'), 'head') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'layout' => array('hint-type' => 'icon'),
|
||||
'hint' => sprintf(__('The Yoast SEO plugin displays a comment of the form %s in %s section', 'clearfy'), '!-- This site is optimized with the Yoast SEO plugin v3.1.1 - https://yoast.com/wordpress/plugins/seo/ --', 'head') . '<br><br><b>Clearfy: </b>' . sprintf(__('Removes the Yoast SEO plugin comment of their section %s', 'clearfy'), 'head'),
|
||||
'default' => false
|
||||
);
|
||||
}
|
||||
|
||||
$form_options = array();
|
||||
|
||||
$form_options[] = array(
|
||||
'type' => 'form-group',
|
||||
'items' => $options,
|
||||
//'cssClass' => 'postbox'
|
||||
);
|
||||
|
||||
return apply_filters('wbcr_clr_seo_form_options', $form_options, $this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The page Settings.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WCL_WidgetsPage extends WCL_Page {
|
||||
|
||||
/**
|
||||
* The id of the page in the admin menu.
|
||||
*
|
||||
* Mainly used to navigate between pages.
|
||||
* @see FactoryPages480_AdminPage
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
public $id = "widgets";
|
||||
|
||||
public $page_parent_page = "advanced";
|
||||
|
||||
public $page_menu_dashicon = 'dashicons-networking';
|
||||
|
||||
public $available_for_multisite = true;
|
||||
|
||||
/**
|
||||
* @param WCL_Plugin $plugin
|
||||
*/
|
||||
public function __construct(WCL_Plugin $plugin)
|
||||
{
|
||||
$this->menu_title = __('Widgets', 'clearfy');
|
||||
$this->page_menu_short_description = __('Disable unused widgets', 'clearfy');
|
||||
|
||||
parent::__construct($plugin);
|
||||
|
||||
$this->plugin = $plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permalinks options.
|
||||
*
|
||||
* @return mixed[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getPageOptions()
|
||||
{
|
||||
$options = array();
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => '<div class="wbcr-factory-page-group-header">' . __('<strong>Disable unused widgets</strong>.', 'clearfy') . '<p>' . __('Some widgets, such as the Calendar or Tag Cloud, create an extra query to the database, even if they are not displayed on the website. Of course, a couple of hits to the database will not do much harm to the whole site. However, if the resource contains a huge amount of content, and the speed of its work above all else, disabling unused functionality is the first step to optimizing and accelerating it.', 'clearfy') . '</p></div>'
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_page',
|
||||
'title' => __('Remove the "Pages" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_calendar',
|
||||
'title' => __('Remove calendar widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_tag_cloud',
|
||||
'title' => __('Remove the "Cloud of tags" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_archives',
|
||||
'title' => __('Remove the "Archives" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_links',
|
||||
'title' => __('Remove the "Links" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_meta',
|
||||
'title' => __('Remove the "Meta" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_search',
|
||||
'title' => __('Remove the "Search" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_text',
|
||||
'title' => __('Remove the "Text" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_categories',
|
||||
'title' => __('Remove the "Categories" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_recent_posts',
|
||||
'title' => __('Remove the "Recent Posts" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_recent_comments',
|
||||
'title' => __('Remove the "Recent Comments" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_rss',
|
||||
'title' => __('Remove the "RSS" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_menu',
|
||||
'title' => __('Remove the "Menu" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$options[] = array(
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_unneeded_widget_twenty_eleven_ephemera',
|
||||
'title' => __('Remove the "Twenty Eleven Ephemera" widget', 'clearfy'),
|
||||
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
||||
'default' => false
|
||||
);
|
||||
|
||||
$form_options = array();
|
||||
|
||||
$form_options[] = array(
|
||||
'type' => 'form-group',
|
||||
'items' => $options,
|
||||
//'cssClass' => 'postbox'
|
||||
);
|
||||
|
||||
return apply_filters('wbcr_clr_widgets_form_options', $form_options, $this);
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if( !defined('ABSPATH') ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class WCL_Setup
|
||||
*
|
||||
* Handles the initialization and execution of the setup wizard.
|
||||
* This class extends the Setup page template to provide a multi-step setup
|
||||
* experience, including various configuration options and enhancements
|
||||
* for the plugin.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
class WCL_Setup extends WBCR\Factory_Templates_134\Pages\Setup {
|
||||
|
||||
/**
|
||||
* Constructor method for initializing the setup wizard.
|
||||
*
|
||||
* @param \Wbcr_Factory480_Plugin $plugin An instance of the plugin class that provides necessary plugin functionality and settings.
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct(\Wbcr_Factory480_Plugin $plugin)
|
||||
{
|
||||
// Call parent constructor.
|
||||
parent::__construct($plugin);
|
||||
|
||||
// Path to the directory containing step classes.
|
||||
$path = WCL_PLUGIN_DIR . '/admin/pages/setup/steps';
|
||||
|
||||
// Registering the steps of the setup wizard.
|
||||
|
||||
# Step 1: Default step
|
||||
$this->register_step($path . '/class-step-default.php', '\WBCR\Clearfy\Pages\Step_Default');
|
||||
|
||||
# Step 2: Google Page Speed (Before)
|
||||
$this->register_step($path . '/class-step-google-page-speed-before.php', '\WBCR\Clearfy\Pages\Step_Google_Page_Speed_Before');
|
||||
|
||||
# Step 3: Plugins step
|
||||
$this->register_step($path . '/class-step-plugins.php', '\WBCR\Clearfy\Pages\Step_Plugins');
|
||||
|
||||
# Step 4: Speed Optimization Settings
|
||||
$this->register_step($path . '/class-step-setting-speed-optimize.php', '\WBCR\Clearfy\Pages\Step_Setting_Speed_Optimize');
|
||||
|
||||
# Step 5: SEO Optimization Settings
|
||||
$this->register_step($path . '/class-step-setting-seo-optimize.php', '\WBCR\Clearfy\Pages\Step_Setting_Seo');
|
||||
|
||||
# Step 6: Image Optimization
|
||||
$this->register_step($path . '/class-step-optimize-images.php', '\WBCR\Clearfy\Pages\Step_Optimize_Images');
|
||||
|
||||
# Step 7: Google Page Speed (After)
|
||||
$this->register_step($path . '/class-step-google-page-speed-after.php', '\WBCR\Clearfy\Pages\Step_Google_Page_Speed_After');
|
||||
|
||||
# Step 8: Congratulations step
|
||||
$this->register_step($path . '/class-step-congratulation.php', '\WBCR\Clearfy\Pages\Step_Congratulation');
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues required assets (js and css) for the setup wizard.
|
||||
*
|
||||
* This loads additional scripts and styles specific to the setup wizard page.
|
||||
*
|
||||
* @param object $scripts The object to enqueue scripts.
|
||||
* @param object $styles The object to enqueue styles.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.0.0
|
||||
* @see FactoryPages480_AdminPage
|
||||
*/
|
||||
public function assets($scripts, $styles)
|
||||
{
|
||||
// Call parent method to enqueue default assets.
|
||||
parent::assets($scripts, $styles);
|
||||
|
||||
// Add custom JavaScript files.
|
||||
$this->scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/circular-progress.js');
|
||||
$this->scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/setup.js');
|
||||
|
||||
// Add custom CSS files.
|
||||
$this->styles->add(WCL_PLUGIN_URL . '/admin/assets/css/setup/page-setup.css');
|
||||
}
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WBCR\Clearfy\Pages;
|
||||
|
||||
/**
|
||||
* The Step_Congratulation class represents the final step in the plugin's setup wizard.
|
||||
* It provides a congratulatory message to the user after completing the setup process
|
||||
* and offers information about upgrading to the Pro version for additional features.
|
||||
*
|
||||
* This class extends the Step_Custom class to utilize predefined methods for rendering
|
||||
* the setup wizard's steps and managing navigation between steps.
|
||||
*
|
||||
* Properties:
|
||||
* - $prev_id (protected): The identifier of the previous step in the setup wizard.
|
||||
* - $id (protected): The identifier of the current step in the setup wizard.
|
||||
*
|
||||
* Methods:
|
||||
* - get_title(): Returns the title of the step as displayed in the setup wizard.
|
||||
* - html(): Outputs HTML content for displaying the congratulatory message, feature comparison
|
||||
* table, and a link to upgrade to the Pro version.
|
||||
* - continue_step(bool $skip = false): Handles navigation to the next step or a fallback
|
||||
* redirect to the "Quick Start" page if no next step is defined.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
* /
|
||||
*/
|
||||
class Step_Congratulation extends \WBCR\Factory_Templates_134\Pages\Step_Custom
|
||||
{
|
||||
|
||||
protected $prev_id = 'step6';
|
||||
protected $id = 'step7';
|
||||
|
||||
//protected $next_id = 'step2';
|
||||
|
||||
/**
|
||||
* Retrieves the title text.
|
||||
*
|
||||
* @return string The localized title string.
|
||||
*/
|
||||
public function get_title(): string
|
||||
{
|
||||
return __("Finish", "clearfy");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the HTML content for the plugin setup wizard completion message and Pro version features comparison table.
|
||||
*
|
||||
* This method generates a message indicating the completion of the plugin setup process, provides a detailed comparison of Free and Pro features,
|
||||
* and includes a call-to-action button for upgrading to the Pro version.
|
||||
*
|
||||
* @return void Outputs the generated HTML directly to the page.
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function html(): void
|
||||
{
|
||||
$pricing_page_url = $this->plugin->get_support()->get_pricing_url(true, 'setup_wizard');
|
||||
?>
|
||||
<div class="w-factory-templates-134-setup__inner-wrap">
|
||||
<h3><?php echo __("Congratulations, the plugin configuration is complete!", "clearfy"); ?></h3>
|
||||
<p style="text-align: left;">
|
||||
<?php _e('You have successfully completed the basic plugin setup! You can go to the general plugin settings to enable other options that we did not offer you.', 'clearfy'); ?>
|
||||
</p>
|
||||
<hr>
|
||||
<div>
|
||||
<p style="text-align: left;">
|
||||
<?php _e("However, you can still improve your site's Google Page Speed score by simply purchasing the Pro version of our plugin.", "clearfy") ?>
|
||||
</p>
|
||||
<table style="width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Free</th>
|
||||
<th>PRO</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="https://wordpress.org/plugins/cyrlitera/" target="_blank">
|
||||
Transliteration of links and file names</a></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Optimize Yoast Seo</td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Post tools</td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin bar managers</td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://wordpress.org/plugins/disable-admin-notices/" target="_blank">Disable admin
|
||||
notices</a></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Disable widgets</td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="https://wordpress.org/plugins/comments-plus/" target="_blank">Disable comments</a>
|
||||
</td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://wordpress.org/plugins/gonzales/" target="_blank">Assets Manager</a></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Minify and combine (JS, CSS)</td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Html minify</td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://robinoptimizer.com/" target="_blank">Image optimizer</a></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hide login page</td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://clearfy.pro/hide-my-wp/" target="_blank">Hide My Wp PRO</a></td>
|
||||
<td class="wclearfy-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://clearfy.pro/assets-manager/" target="_blank">Assets Manager PRO</a></td>
|
||||
<td class="wclearfy-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Multisite control</td>
|
||||
<td class="wclearfy-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Update manager PRO</td>
|
||||
<td class="wclearfy-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SEO friendly images PRO</td>
|
||||
<td class="wclearfy-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
|
||||
<td class="wclearfy-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
<a href="<?php echo esc_url($pricing_page_url); ?>" class="wclearfy-setup__install-component-button"
|
||||
target="_blank"><?php _e('Go Pro', 'clearfy') ?></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->render_button(); ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the continuation to the next step in a multi-step process.
|
||||
*
|
||||
* This method determines the next step in the process and redirects the user to the appropriate URL.
|
||||
* If there are no further steps available, it redirects to a default Quick Start page.
|
||||
*
|
||||
* @param bool $skip Indicates whether the current step should be skipped. Defaults to false.
|
||||
* @return void Redirects the user to the URL of the next step or the Quick Start page.
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function continue_step($skip = false): void
|
||||
{
|
||||
$next_id = $this->get_next_id();
|
||||
if (!$next_id) {
|
||||
wp_safe_redirect($this->plugin->getPluginPageUrl('quick_start'));
|
||||
die();
|
||||
}
|
||||
wp_safe_redirect($this->page->getActionUrl($next_id));
|
||||
die();
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WBCR\Clearfy\Pages;
|
||||
|
||||
/**
|
||||
* Represents the default onboarding step in the Clearfy setup wizard.
|
||||
*
|
||||
* This class defines the basic attributes and methods used for displaying the
|
||||
* initial step of the setup wizard, including the title and HTML content.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
class Step_Default extends \WBCR\Factory_Templates_134\Pages\Step_Custom
|
||||
{
|
||||
|
||||
protected $id = 'step0';
|
||||
protected $next_id = 'step1';
|
||||
|
||||
/**
|
||||
* Retrieves the title text.
|
||||
*
|
||||
* @return string The translated title text.
|
||||
*/
|
||||
public function get_title(): string
|
||||
{
|
||||
return __("Welcome", 'clearfy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the HTML structure for the setup wizard onboarding interface.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function html(): void
|
||||
{
|
||||
?>
|
||||
<div class="w-factory-templates-134-setup__inner-wrap">
|
||||
<div class="w-factory-templates-134-setup-step__new_onboarding-wrapper">
|
||||
<p class="w-factory-templates-134-setup-step__new_onboarding-welcome">Welcome to</p>
|
||||
<h1 class="w-factory-templates-134-logo">
|
||||
<img src="<?php echo WCL_PLUGIN_URL ?>/admin/assets/img/clearfylogo-768x300.png" alt="Clearfy">
|
||||
</h1>
|
||||
<p><?php _e('Optimize your site even faster using the setup wizard!', 'clearfy') ?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php $this->render_button(true, false, __('Yes, I want to try the wizard'), 'center'); ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WBCR\Clearfy\Pages;
|
||||
|
||||
/**
|
||||
* Class Step_Google_Page_Speed_After
|
||||
*
|
||||
* This class represents a step in the Clearfy plugin setup process that evaluates
|
||||
* a website's performance using Google Page Speed Insights. It provides a visual
|
||||
* representation of the site's performance for desktop and mobile and displays
|
||||
* key metrics such as First Contentful Paint, Speed Index, and Time to Interactive.
|
||||
*
|
||||
* Inherits methods and properties from the Step_Custom class within the
|
||||
* WBCR\Factory_Templates_134 namespace.
|
||||
*
|
||||
* Properties:
|
||||
* - $prev_id: Identifier for the previous step in the setup process.
|
||||
* - $id: Identifier for the current step in the setup process.
|
||||
* - $next_id: Identifier for the next step in the setup process.
|
||||
*
|
||||
* Methods:
|
||||
* - get_title(): Returns the title of the current step as a string.
|
||||
* - html(): Outputs the HTML and JavaScript for rendering the Google Page Speed
|
||||
* Insights report and embeds the Clearfy plugin optimization information.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
class Step_Google_Page_Speed_After extends \WBCR\Factory_Templates_134\Pages\Step_Custom
|
||||
{
|
||||
|
||||
protected $prev_id = 'step5';
|
||||
protected $id = 'step6';
|
||||
protected $next_id = 'step7';
|
||||
|
||||
/**
|
||||
* Retrieves the title.
|
||||
*
|
||||
* @return string The title of the site.
|
||||
*/
|
||||
public function get_title(): string
|
||||
{
|
||||
return __("Site test #2", 'clearfy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the HTML content for displaying Google Page Speed statistics and analyses.
|
||||
*
|
||||
* The method integrates with the Google PageSpeed Insights API to analyze a website and display
|
||||
* the results, including scores for desktop and mobile versions, and key performance metrics such
|
||||
* as Speed Index and Time to Interactive. It also provides a link to view the complete results
|
||||
* on the official Google PageSpeed Insights platform.
|
||||
*
|
||||
* Additionally, this method manages the rendering of UI components for displaying scores,
|
||||
* statistics, and preloader icons.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function html(): void
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function ($) {
|
||||
wclearfy_fetch_google_pagespeed_audit("<?php echo wp_create_nonce('fetch_google_page_speed_audit') ?>", true);
|
||||
});
|
||||
</script>
|
||||
<div class="w-factory-templates-134-setup__inner-wrap">
|
||||
<h3><?php _e('Google Page Speed', 'clearfy'); ?></h3>
|
||||
<p style="text-align: left;">
|
||||
<?php _e('We analyzed your site on the Google Page Speed service. You can see the test results below. Our plugin is to improve the score of your site on Google Page Speed. Memorize the results to make a comparison after optimization by the Clearfy plugin.', 'clearfy'); ?>
|
||||
</p>
|
||||
<div class="wclearfy-gogle-page-speed-audit__errors">
|
||||
<?php _e('Memorize the results to make a comparison after optimization by the Clearfy plugin.', 'clearfy'); ?>
|
||||
</div>
|
||||
<div class="wclearfy-gogle-page-speed-audit__preloader"></div>
|
||||
<div class="wclearfy-gogle-page-speed-audit" style="display: none;">
|
||||
<div class="wclearfy-score">
|
||||
<!-- Desktop -->
|
||||
<div class="wclearfy-desktop-score">
|
||||
<h3><?php _e('Desktop score', 'clearfy'); ?></h3>
|
||||
<div class="wclearfy-desktop-score__circle-wrap">
|
||||
<div id="wclearfy-desktop-score__circle" class="wclearfy-score-circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mobile -->
|
||||
<div class="wclearfy-mobile-score">
|
||||
<h3><?php _e('Mobile score', 'clearfy'); ?></h3>
|
||||
<div class="wclearfy-mobile-score__circle-wrap">
|
||||
<div id="wclearfy-mobile-score__circle" class="wclearfy-score-circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Statistics -->
|
||||
<div class="wclearfy-statistic">
|
||||
<div class="wclearfy-statistic__line">
|
||||
<span><?php _e('First Contentful Paint', 'clearfy'); ?></span>
|
||||
<div class="wclearfy-statistic__results">
|
||||
<span id="wclearfy-statistic__desktop-first-contentful-paint">?? s</span> / <span
|
||||
id="wclearfy-statistic__mobile-first-contentful-paint">?? s</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wclearfy-statistic__line">
|
||||
<span><?php _e('Speed Index', 'clearfy'); ?></span>
|
||||
<div class="wclearfy-statistic__results">
|
||||
<span id="wclearfy-statistic__desktop-speed-index">?? s</span> / <span
|
||||
id="wclearfy-statistic__mobile-speed-index">?? s</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wclearfy-statistic__line">
|
||||
<span><?php _e('Time to Interactive', 'clearfy'); ?></span>
|
||||
<div class="wclearfy-statistic__results">
|
||||
<span id="wclearfy-statistic__desktop-interactive">?? s</span> / <span
|
||||
id="wclearfy-statistic__mobile-interactive">?? s</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$site_url = get_home_url();
|
||||
$google_page_speed_call = "https://developers.google.com/speed/pagespeed/insights/?url=" . esc_url($site_url);
|
||||
?>
|
||||
|
||||
<div style="margin-top: 5px;font-size:12px;">
|
||||
<a href="<?php echo esc_url($google_page_speed_call); ?>" target="_blank"
|
||||
style="outline: 0;text-decoration: none;"><?php _e('View complete results', 'clearfy'); ?></a> <?php _e('on Google PageSpeed Insights.', 'clearfy'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->render_button(); ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WBCR\Clearfy\Pages;
|
||||
|
||||
/**
|
||||
* Class Step_Google_Page_Speed_Before
|
||||
*
|
||||
* Represents a step in the process dedicated to analyzing and displaying
|
||||
* Google Page Speed results before optimizations.
|
||||
*
|
||||
* This class extends the Step_Custom page template and provides functionality
|
||||
* to fetch and display Google Page Speed Insights results for the website.
|
||||
* It renders a page with pre-analysis statistics for desktop and mobile scores,
|
||||
* along with detailed timing metrics such as First Contentful Paint, Speed Index,
|
||||
* and Time to Interactive. The data is retrieved via an AJAX request.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
class Step_Google_Page_Speed_Before extends \WBCR\Factory_Templates_134\Pages\Step_Custom
|
||||
{
|
||||
|
||||
protected $prev_id = 'step0';
|
||||
protected $id = 'step1';
|
||||
protected $next_id = 'step2';
|
||||
|
||||
/**
|
||||
* Retrieves the title of the site.
|
||||
*
|
||||
* @return string The translated site title.
|
||||
*/
|
||||
public function get_title(): string
|
||||
{
|
||||
return __("Site test #1", 'clearfy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the HTML and JavaScript for the Google Page Speed results interface.
|
||||
* This method includes a script to initiate fetching of Google Page Speed audits and displays desktop and mobile score results.
|
||||
* It also provides statistical insights and a link to view detailed results on Google PageSpeed Insights.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function html(): void
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function ($) {
|
||||
wclearfy_fetch_google_pagespeed_audit("<?php echo wp_create_nonce('fetch_google_page_speed_audit') ?>");
|
||||
});
|
||||
</script>
|
||||
<div class="w-factory-templates-134-setup__inner-wrap">
|
||||
<h3><?php _e('Google Page Speed', 'clearfy') ?></h3>
|
||||
<p style="text-align: left;">
|
||||
<?php _e('We analyzed your site on the Google Page Speed service. You can see the test results below. Our plugin
|
||||
is to improve the score of your site on Google Page Speed. Memorize the results to make a comparison after
|
||||
optimization by the Clearfy plugin.', 'clearfy') ?>
|
||||
</p>
|
||||
<div class="wclearfy-gogle-page-speed-audit__errors"><?php _e('Memorize the results to make a comparison after
|
||||
optimization by the Clearfy plugin.', 'clearfy') ?>
|
||||
</div>
|
||||
<div class="wclearfy-gogle-page-speed-audit__preloader"></div>
|
||||
<div class="wclearfy-gogle-page-speed-audit" style="display: none;">
|
||||
<div class="wclearfy-score">
|
||||
<!-- Desktop -->
|
||||
<div class="wclearfy-desktop-score">
|
||||
<h3><?php _e('Desktop score', 'clearfy'); ?></h3>
|
||||
<div class="wclearfy-desktop-score__circle-wrap">
|
||||
<div id="wclearfy-desktop-score__circle" class="wclearfy-score-circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mobile -->
|
||||
<div class="wclearfy-mobile-score">
|
||||
<h3><?php _e('Mobile score', 'clearfy'); ?></h3>
|
||||
<div class="wclearfy-mobile-score__circle-wrap">
|
||||
<div id="wclearfy-mobile-score__circle" class="wclearfy-score-circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Statistics -->
|
||||
<div class="wclearfy-statistic">
|
||||
<div class="wclearfy-statistic__line">
|
||||
<span><?php _e('First Contentful Paint', 'clearfy'); ?></span>
|
||||
<div class="wclearfy-statistic__results">
|
||||
<span id="wclearfy-statistic__desktop-first-contentful-paint">?? s</span> / <span
|
||||
id="wclearfy-statistic__mobile-first-contentful-paint">?? s</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wclearfy-statistic__line">
|
||||
<span><?php _e('Speed Index', 'clearfy'); ?></span>
|
||||
<div class="wclearfy-statistic__results">
|
||||
<span id="wclearfy-statistic__desktop-speed-index">?? s</span> / <span
|
||||
id="wclearfy-statistic__mobile-speed-index">?? s</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wclearfy-statistic__line">
|
||||
<span><?php _e('Time to Interactive', 'clearfy'); ?></span>
|
||||
<div class="wclearfy-statistic__results">
|
||||
<span id="wclearfy-statistic__desktop-interactive">?? s</span> / <span
|
||||
id="wclearfy-statistic__mobile-interactive">?? s</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$site_url = get_home_url();
|
||||
$google_page_speed_call = "https://developers.google.com/speed/pagespeed/insights/?url=" . esc_url($site_url);
|
||||
?>
|
||||
|
||||
<div style="margin-top: 5px;font-size:12px;">
|
||||
<a href="<?php echo esc_url($google_page_speed_call); ?>" target="_blank"
|
||||
style="outline: 0;text-decoration: none;"><?php _e('View complete results', 'clearfy'); ?></a> <?php _e('on Google PageSpeed Insights.', 'clearfy'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->render_button(); ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,219 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WBCR\Clearfy\Pages;
|
||||
|
||||
/**
|
||||
* Class Step_Optimize_Images
|
||||
*
|
||||
* Represents a step for optimizing images in a setup process. This class extends the base step functionality
|
||||
* to include specific operations related to optimizing images within the context of a plugin.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
class Step_Optimize_Images extends \WBCR\Factory_Templates_134\Pages\Step_Custom
|
||||
{
|
||||
|
||||
protected $prev_id = 'step4';
|
||||
protected $id = 'step5';
|
||||
protected $next_id = 'step6';
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param \WBCR\Factory_Templates_134\Pages\Setup $page An instance of the Setup page to initialize the constructor.
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(\WBCR\Factory_Templates_134\Pages\Setup $page)
|
||||
{
|
||||
parent::__construct($page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the title of the current context.
|
||||
*
|
||||
* @return string The title "Optimize images".
|
||||
*/
|
||||
public function get_title(): string
|
||||
{
|
||||
return __("Optimize images", 'clearfy');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function assets($scripts, $styles): void
|
||||
{
|
||||
parent::assets($scripts, $styles);
|
||||
|
||||
$styles->add(WCL_PLUGIN_URL . '/admin/assets/css/setup/step-optimize-images.css');
|
||||
|
||||
if (defined('WRIO_PLUGIN_ACTIVE')) {
|
||||
$scripts->add(WRIO_PLUGIN_URL . '/admin/assets/js/Chart.min.js', ['jquery'], 'wrio-charts');
|
||||
$scripts->add(WRIO_PLUGIN_URL . '/admin/assets/js/statistic.js', ['jquery', 'wrio-charts']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the HTML for the image optimization page in the plugin interface.
|
||||
*
|
||||
* This method checks if the plugin is active and, if so, displays the optimization statistics
|
||||
* and related user interface elements. It provides data about unoptimized, optimized, and error statistics.
|
||||
* If the plugin is not active, it renders alternate HTML content.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function html(): void
|
||||
{
|
||||
if (!defined('WRIO_PLUGIN_ACTIVE')) {
|
||||
$this->alternate_html();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$is_premium = wrio_is_license_activate();
|
||||
$statistics = \WRIO_Image_Statistic::get_instance();
|
||||
|
||||
$data = [
|
||||
'is_premium' => $is_premium,
|
||||
'scope' => 'media-library',
|
||||
'stats' => $statistics->get()
|
||||
];
|
||||
?>
|
||||
|
||||
<div class="w-factory-templates-134-setup__inner-wrap">
|
||||
<h3><?php _e("Optimize images", "clearfy") ?></h3>
|
||||
<p style="text-align: left;">
|
||||
<?php _e("We found unoptimized images in your media library. You can run background image optimization with the Robin image optimizer component of the Clearfy plugin. Background optimization is a long process, your images will be optimized after some time, so you won't be able to immediately see the improvement in Google Page Speed, but when the images are fully optimized you will see a score increase in Google Page Speed.", "clearfy"); ?>
|
||||
</p>
|
||||
<div class="wio-columns wio-page-statistic">
|
||||
<div>
|
||||
<div class="wio-chart-container wio-overview-chart-container">
|
||||
<canvas id="wio-main-chart" width="180" height="180"
|
||||
data-unoptimized="<?php echo esc_attr($data['stats']['unoptimized']); ?>"
|
||||
data-optimized="<?php echo esc_attr($data['stats']['optimized']); ?>"
|
||||
data-errors="<?php echo esc_attr($data['stats']['error']); ?>"
|
||||
style="display: block;">
|
||||
</canvas>
|
||||
<div id="wio-overview-chart-percent"
|
||||
class="wio-chart-percent"><?php echo esc_attr($data['stats']['optimized_percent']); ?>
|
||||
<span>%</span>
|
||||
</div>
|
||||
<p class="wio-global-optim-phrase wio-clear">
|
||||
<?php _e('You optimized', 'robin-image-optimizer'); ?>
|
||||
<span class="wio-total-percent">
|
||||
<?php echo esc_attr($data['stats']['optimized_percent']); ?>%
|
||||
</span>
|
||||
<?php _e("of your website's images", 'robin-image-optimizer'); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div style="margin-left:200px;">
|
||||
<div id="wio-overview-chart-legend">
|
||||
<ul class="wio-doughnut-legend">
|
||||
<li>
|
||||
<span style="background-color:#d6d6d6"></span>
|
||||
<?php _e('Unoptimized', 'robin-image-optimizer'); ?>-
|
||||
<span class="wio-num" id="wio-unoptimized-num">
|
||||
<?php echo esc_attr($data['stats']['unoptimized']); ?>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span style="background-color:#8bc34a"></span>
|
||||
<?php _e('Optimized', 'robin-image-optimizer'); ?>-
|
||||
<span class="wio-num" id="wio-optimized-num">
|
||||
<?php echo esc_attr($data['stats']['optimized']); ?>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span style="background-color:#f1b1b6"></span>
|
||||
<?php _e('Error', 'robin-image-optimizer'); ?>-
|
||||
<span class="wio-num" id="wio-error-num">
|
||||
<?php echo esc_attr($data['stats']['error']); ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3 class="screen-reader-text"><?php _e('Statistics', 'robin-image-optimizer'); ?></h3>
|
||||
<div class="wio-bars" style="width: 90%">
|
||||
<p><?php _e('Original size', 'robin-image-optimizer'); ?></p>
|
||||
<div class="wio-bar-negative base-transparent wio-right-outside-number">
|
||||
<div id="wio-original-bar" class="wio-progress" style="width: 100%">
|
||||
<span class="wio-barnb" id="wio-original-size">
|
||||
<?php echo esc_attr(wrio_convert_bytes($data['stats']['original_size'])); ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<p><?php _e('Optimized size', 'robin-image-optimizer'); ?></p>
|
||||
<div class="wio-bar-primary base-transparent wio-right-outside-number">
|
||||
<div id="wio-optimized-bar" class="wio-progress"
|
||||
style="width: <?php echo ($data['stats']['percent_line']) ? esc_attr($data['stats']['percent_line']) : 100; ?>%">
|
||||
<span class="wio-barnb" id="wio-optimized-size">
|
||||
<?php echo esc_attr(wrio_convert_bytes($data['stats']['optimized_size'])); ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wio-number-you-optimized">
|
||||
<p>
|
||||
<span id="wio-total-optimized-attachments-pct" class="wio-number">
|
||||
<?php echo esc_attr($data['stats']['save_size_percent']); ?>%
|
||||
</span>
|
||||
<span class="wio-text">
|
||||
<?php _e("that's the size you saved <br>by using Image Optimizer", 'robin-image-optimizer'); ?>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php $this->render_button(true, true, __('Shedule optimization and Continue', 'clearfy')); ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the continuation of the current step, optionally skipping certain processes.
|
||||
*
|
||||
* @param bool $skip Indicates whether to skip the current step logic. Default is false.
|
||||
* @return void
|
||||
*/
|
||||
protected function continue_step($skip = false): void
|
||||
{
|
||||
if (defined('WRIO_PLUGIN_ACTIVE')) {
|
||||
\WRIO_Plugin::app()->updatePopulateOption('cron_running', 'media-library');
|
||||
\WRIO_Cron::start();
|
||||
}
|
||||
parent::continue_step($skip);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Outputs the HTML content for the alternate setup interface related to image optimization.
|
||||
*
|
||||
* This method generates a section prompting the user to install or activate the "Robin Image Optimizer" plugin.
|
||||
* Includes an installation button and renders additional necessary controls for setup completion.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
private function alternate_html(): void
|
||||
{
|
||||
$install_robin_plugin_btn = $this->plugin->get_install_component_button('wordpress', 'robin-image-optimizer/robin-image-optimizer.php');
|
||||
$install_robin_plugin_btn->add_class('wclearfy-setup__install-component-button');
|
||||
|
||||
?>
|
||||
<div class="w-factory-templates-134-setup__inner-wrap">
|
||||
<h3><?php _e("Optimize images", "clearfy") ?></h3>
|
||||
<p style="text-align: left;">
|
||||
<?php _e("Robin Image optimizer plugin isn't installed or activated, you need to install or activate it to optimize your images.", "clearfy"); ?>
|
||||
</p>
|
||||
|
||||
<p style="text-align: center"><?php $install_robin_plugin_btn->render_button(); ?></p>
|
||||
</div>
|
||||
<?php $this->render_button(false, true); ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WBCR\Clearfy\Pages;
|
||||
|
||||
/**
|
||||
* Step_Plugins Class
|
||||
*
|
||||
* Represents a step in the setup process for suggesting and installing additional plugins
|
||||
* and components to optimize a WordPress site.
|
||||
*
|
||||
* This class extends the Step_Custom class from the Factory Templates framework and
|
||||
* is primarily used to present a user interface for recommending specific plugins to
|
||||
* enhance site performance. It displays plugins along with their respective optimization
|
||||
* scores and optional PRO scores, and provides buttons for installation.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
class Step_Plugins extends \WBCR\Factory_Templates_134\Pages\Step_Custom
|
||||
{
|
||||
|
||||
protected $prev_id = 'step1';
|
||||
protected $id = 'step2';
|
||||
protected $next_id = 'step3';
|
||||
|
||||
/**
|
||||
* Retrieves the title for the setup plugins section.
|
||||
*
|
||||
* @return string The localized title text.
|
||||
*/
|
||||
public function get_title(): string
|
||||
{
|
||||
return __("Setup Plugins", "clearfy");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the HTML content for displaying and installing recommended plugins and components.
|
||||
*
|
||||
* This method displays a structured interface that lists plugins and components
|
||||
* along with their associated benefits. It provides installation buttons to include
|
||||
* these plugins and components for optimizing the site.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function html(): void
|
||||
{
|
||||
$install_robin_plugin_btn = $this->plugin->get_install_component_button('wordpress', 'robin-image-optimizer/robin-image-optimizer.php');
|
||||
$install_wp_super_cache_btn = $this->plugin->get_install_component_button('wordpress', 'wp-super-cache/wp-cache.php');
|
||||
$install_assets_manager_component_btn = $this->plugin->get_install_component_button('internal', 'assets_manager');
|
||||
$install_minify_and_combine_component_btn = $this->plugin->get_install_component_button('internal', 'minify_and_combine');
|
||||
?>
|
||||
<div class="w-factory-templates-134-setup__inner-wrap">
|
||||
<h3><?php _e('Installing plugins', 'clearfy') ?></h3>
|
||||
<p style="text-align: left;"><?php _e('We analyzed your site and decided that in order to get the maximum result in
|
||||
optimizing your site, you will need to install additional plugins.', 'clearfy') ?></p>
|
||||
<table class="form-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e('Plugin', 'clearfy') ?></th>
|
||||
<th style="width:50px"><?php _e('Score', 'clearfy') ?></th>
|
||||
<th style="width:200px"><?php _e('Score with PRO', 'clearfy') ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>Robin image optimizer</td>
|
||||
<td style="color:grey">+10</td>
|
||||
<td style="color:green">+15</td>
|
||||
<td>
|
||||
<?php $install_robin_plugin_btn->render_link(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assets manager component</td>
|
||||
<td style="color:grey">+5</td>
|
||||
<td style="color:green">+10</td>
|
||||
<td><?php $install_assets_manager_component_btn->render_link(); ?></td>
|
||||
</tr>
|
||||
<!--<tr>
|
||||
<td>WP Super Cache</td>
|
||||
<td style="color:grey">+8</td>
|
||||
<td></td>
|
||||
<td><?php /*$install_wp_super_cache_btn->renderLink(); */ ?></td>
|
||||
</tr>-->
|
||||
<tr>
|
||||
<td>Minify and Combine component</td>
|
||||
<td style="color:grey">+10</td>
|
||||
<td style="color:green">+15</td>
|
||||
<td><?php $install_minify_and_combine_component_btn->render_link(); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php $this->render_button(); ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WBCR\Clearfy\Pages;
|
||||
|
||||
/**
|
||||
* Class Step_Setting_Seo
|
||||
*
|
||||
* Represents a page step within the "Clearfy" plugin meant for configuring SEO-related settings.
|
||||
* Extends the Step_Form class provided by WBCR Factory Templates framework.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
class Step_Setting_Seo extends \WBCR\Factory_Templates_134\Pages\Step_Form
|
||||
{
|
||||
|
||||
protected $prev_id = 'step3';
|
||||
protected $id = 'step4';
|
||||
protected $next_id = 'step5';
|
||||
|
||||
/**
|
||||
* Retrieves the title for the "Optimize SEO" feature.
|
||||
*
|
||||
* @return string The translated title for the "Optimize SEO" feature.
|
||||
*/
|
||||
public function get_title(): string
|
||||
{
|
||||
return __("Optimize SEO", "clearfy");
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the description for the settings form.
|
||||
*
|
||||
* @return string The translated description recommending settings to complement the SEO plugin.
|
||||
*/
|
||||
public function get_form_description(): string
|
||||
{
|
||||
return __('Recommended settings that can complement your SEO plugin.', 'clearfy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the configuration options for the form used in the system.
|
||||
* These options define the properties of form controls, including type, layout, default values, and hints.
|
||||
* The options also include conditional events based on plugin components, such as Yoast SEO.
|
||||
*
|
||||
* @return array An array of form configuration options. Each option is an associative array containing keys like type, way, name, title,
|
||||
* layout, hint, default values, and conditional events related to plugin activation.
|
||||
*/
|
||||
public function get_form_options(): array
|
||||
{
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'content_image_auto_alt',
|
||||
'title' => __('Automatically set the alt attribute', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('The alt attribute is mandatory, so most SEO experts say. If you missed or did not fill it at all, it will be automatically assigned and will be equal to the title of the article.', 'clearfy') . '<br><br><b>Clearfy: </b>' . sprintf(__('Replaces the %s, on attribute with an article name %s', 'clearfy'), '<code>img scr="" alt=""</code>', '<code>img scr="" alt="Hello world"</code>'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'set_last_modified_headers',
|
||||
'title' => __('Automatically insert the Last Modified header', 'clearfy'),
|
||||
'default' => false,
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('Automatically insert the Last Modified header', 'clearfy') . '<br><b>Clearfy: </b>' . __('Removes attachment pages and puts a redirect.', 'clearfy'),
|
||||
'eventsOn' => [
|
||||
'show' => '.factory-control-disable_frontpage_last_modified_headers'
|
||||
],
|
||||
'eventsOff' => [
|
||||
'hide' => '.factory-control-disable_frontpage_last_modified_headers'
|
||||
]
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'if_modified_since_headers',
|
||||
'title' => __('Return an If-Modified-Since responce', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('Return an If-Modified-Since responce.', 'clearfy') . '<br><b>Clearfy: </b>' . __('Removes attachment pages and puts a redirect.', 'clearfy'),
|
||||
|
||||
'default' => false
|
||||
];
|
||||
|
||||
if ($this->plugin->isActivateComponent('yoast_seo')) {
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_last_item_breadcrumb_yoast',
|
||||
'title' => __('Remove duplicate names in breadcrumbs WP SEO by Yoast', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('The last element in the breadcrumbs in the Yoast SEO plugin duplicates the title of the article. Some SEO-specialists consider this duplication to be superfluous.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes duplication of the name in the breadcrumbs of the WP SEO plugin from Yoast.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_remove_image_from_xml_sitemap',
|
||||
'title' => sprintf(__('Remove the tag %s from XML site map', 'clearfy'), 'image:image'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'green'],
|
||||
'hint' => __('Yandex.Webmaster swears on a standard XML card from the plugin Yoast, tk. it has a specific tag', 'clearfy') . 'image:image<br><br><b>Clearfy: </b>' . sprintf(__('Remove the tag %s from XML site map of the plugin Yoast SEO.', 'clearfy'), 'image:image') . '<br>--<br><span class="wbcr-factory-light-orange-color">' . __('Attention! After activation, turn off the site map and enable it back to regenerate it.', 'clearfy') . '</span>' . '<br><span class="wbcr-factory-light-orange-color">' . __('In older versions of Yoast SEO may not work - update the plugin Yoast', 'clearfy') . '</span>',
|
||||
'default' => true,
|
||||
'eventsOn' => []
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_remove_json_ld_search',
|
||||
'title' => __('Disable JSON-LD sitelinks searchbox', 'clearfy') . '</span>',
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('If you’re not familiar with Search Action it’s the mark-up that helps search engines add a shiny Sitelinks Search Box below your search engine results. For the majority of webmasters the extra search box is an absolutely fantastic feature but for many it’s not required or wanted, especially if a site only has a few pages or if the site uses a customised search platform that only searches blog posts and not pages.', 'clearfy') . ' <br><b>Clearfy: </b>' . __('Disable JSON-LD sitelinks searchbox using WordPress in plugin Yoast SEO.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_remove_json_ld_output',
|
||||
'title' => __('Disable Yoast Structured Data', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text"></span>',
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('Prevents output of the script tag of type application/ld+json containing
|
||||
schema.org data from the popular Yoast SEO and Yoast SEO Premium plugins.
|
||||
There is currently no UI to do so.', 'clearfy') . ' <br><b>Clearfy: </b>' . __('Disable Structured Data in plugin Yoast SEO.', 'clearfy'),
|
||||
'default' => false
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'yoast_remove_head_comment',
|
||||
'title' => sprintf(__('Remove comment from %s section', 'clearfy'), 'head'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => sprintf(__('The Yoast SEO plugin displays a comment of the form %s in %s section', 'clearfy'), '!-- This site is optimized with the Yoast SEO plugin v3.1.1 - https://yoast.com/wordpress/plugins/seo/ --', 'head') . '<br><br><b>Clearfy: </b>' . sprintf(__('Removes the Yoast SEO plugin comment of their section %s', 'clearfy'), 'head'),
|
||||
'default' => true
|
||||
];
|
||||
}
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'redirect_archives_date',
|
||||
'title' => __('Remove archives date', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => sprintf(__('Many duplicates in date archives. Imagine, in addition, that your article will be displayed in the main and in the category, you will still receive at least 3 duplicates: in archives by year, month and date, for example %s.', 'clearfy'), '/2016/2016/02 / /2016/02/15') . '<br><b>Clearfy: </b>' . __('Removes all pages with the date archives and puts a redirect.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'redirect_archives_author',
|
||||
'title' => __('Remove author archives ', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => sprintf(__('If the site is only filled by you - a mandatory item. Allows you to get rid of duplicates on user archives, for example %s.', 'clearfy'), '/author/admin/') . '<br><b>Clearfy: </b>' . __('Removes all pages with the author archives and puts a redirect.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'attachment_pages_redirect',
|
||||
'title' => __('Remove attachment pages', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('Every of the pictures has its own page on the site. Such pages are successfully indexed and create duplicates. The site can have thousands of same-type attachment pages.', 'clearfy') . '<br><b>Clearfy: </b>' . __('Removes attachment pages and puts a redirect.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_replytocom',
|
||||
'title' => __('Remove ?replytocom', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => sprintf(__('WordPress adds %s to the link "Reply" in the comments, if you use hierarchical comments.', 'clearfy'), '?replytocom') . '<br><b>Clearfy: </b>' . __('?relpytocom remove and and puts a redirect.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
@@ -1,319 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace WBCR\Clearfy\Pages;
|
||||
|
||||
use JetBrains\PhpStorm\NoReturn;
|
||||
|
||||
/**
|
||||
* Provides optimization settings for improving the speed of a WordPress site.
|
||||
*
|
||||
* This class extends the functionality of the Step_Form class to create a step-by-step
|
||||
* interface for configuring speed optimization options, including JavaScript, CSS, and other optimizations.
|
||||
*
|
||||
* Class Step_Setting_Speed_Optimize
|
||||
* Extends \WBCR\Factory_Templates_134\Pages\Step_Form
|
||||
*
|
||||
* Properties:
|
||||
* - $prev_id: Represents the identifier for the previous step in the form navigation.
|
||||
* - $id: The unique identifier for the current step.
|
||||
* - $next_id: Represents the identifier for the next step in the form navigation.
|
||||
*
|
||||
* Methods:
|
||||
* - get_title(): Returns the title of the current step.
|
||||
* - get_form_description(): Returns the description of the form for the current step, explaining
|
||||
* the benefits of caching to improve performance.
|
||||
* - get_form_options(): Returns an array of configurable options related to speed optimization,
|
||||
* which include enabling caching, optimizing JavaScript and CSS code, disabling unnecessary
|
||||
* functionalities like emojis or RSD links. Options may also include corresponding event triggers
|
||||
* to dynamically show/hide related fields or warnings.
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com> <Telegram:@alex_kovalevv>
|
||||
* @copyright (c) 23.07.2020, Webcraftic
|
||||
* @version 1.0
|
||||
*/
|
||||
class Step_Setting_Speed_Optimize extends \WBCR\Factory_Templates_134\Pages\Step_Form
|
||||
{
|
||||
|
||||
protected $prev_id = 'step2';
|
||||
protected $id = 'step3';
|
||||
protected $next_id = 'step4';
|
||||
|
||||
/**
|
||||
* Retrieves the title text.
|
||||
*
|
||||
* @return string The translated title string.
|
||||
*/
|
||||
public function get_title(): string
|
||||
{
|
||||
return __("Optimize speed", "clearfy");
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the description of the form.
|
||||
*
|
||||
* @return string The translated description of the form.
|
||||
*/
|
||||
public function get_form_description(): string
|
||||
{
|
||||
return __('Caching allows your WordPress site to skip a lot of steps. Instead of going through the whole page generation process every time, your caching plugin makes a copy of the page
|
||||
after the first load, and then serves that cached version to every subsequent user.', 'clearfy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of form options for configuring plugin settings.
|
||||
*
|
||||
* @return array An array of form configuration options, including types, names, titles, layouts, hints, default values,
|
||||
* and event handlers for JavaScript and CSS optimization, as well as options for removing unnecessary
|
||||
* WordPress features (e.g., emojis, RSD link, wlwmanifest link, shortlink).
|
||||
*/
|
||||
public function get_form_options(): array
|
||||
{
|
||||
/*$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'enable_cache_plugin',
|
||||
'title' => __('Enable Caching', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('Enable simple caching. If you require expert caching, go to the advanced settings of the wp super cache plugin.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_caching_for_logged_visitors',
|
||||
'title' => __('Disable caching for logged in visitors', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('Caching won\'t work for authenticated users.', 'clearfy'),
|
||||
'default' => true
|
||||
];*/
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'js_optimize',
|
||||
'title' => __('Optimize JavaScript Code?', 'minify-and-combine'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
//'hint' => __('Optimize JavaScript Code.', 'minify-and-combine'),
|
||||
'default' => true,
|
||||
'eventsOn' => [
|
||||
'show' => '#wbcr-mac-optimize-js-fields,#wbcr-mac-optimization-danger-message-1'
|
||||
],
|
||||
'eventsOff' => [
|
||||
'hide' => '#wbcr-mac-optimize-js-fields,#wbcr-mac-optimization-danger-message-1'
|
||||
]
|
||||
];
|
||||
|
||||
/*$options[] = array(
|
||||
'type' => 'html',
|
||||
'html' => array( $this, 'optimizationDangerMessage1' )
|
||||
);*/
|
||||
|
||||
$js_options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'js_aggregate',
|
||||
'title' => __('Aggregate JS-files?', 'minify-and-combine'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('Aggregate all linked JS-files to have them loaded non-render blocking? If this option is off, the individual JS-files will remain in place but will be minified.', 'minify-and-combine'),
|
||||
'default' => false,
|
||||
'eventsOn' => [
|
||||
'show' => '#wbcr-mac-optimization-danger-message-2'
|
||||
],
|
||||
'eventsOff' => [
|
||||
'hide' => '#wbcr-mac-optimization-danger-message-2'
|
||||
]
|
||||
];
|
||||
|
||||
$js_options[] = [
|
||||
'type' => 'html',
|
||||
'html' => [$this, 'optimizationDangerMessage2']
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'div',
|
||||
'id' => 'wbcr-mac-optimize-js-fields',
|
||||
'items' => $js_options
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'css_optimize',
|
||||
'title' => __('Optimize CSS Code?', 'minify-and-combine'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('If your scripts break because of a JS-error, you might want to try this.', 'minify-and-combine'),
|
||||
'default' => true,
|
||||
'eventsOn' => [
|
||||
'show' => '#wbcr-clr-optimize-css-fields'
|
||||
],
|
||||
'eventsOff' => [
|
||||
'hide' => '#wbcr-clr-optimize-css-fields'
|
||||
]
|
||||
];
|
||||
|
||||
$css_options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'css_aggregate',
|
||||
'title' => __('Aggregate CSS-files?', 'minify-and-combine'),
|
||||
'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
|
||||
'hint' => __('Aggregate all linked CSS-files? If this option is off, the individual CSS-files will remain in place but will be minified.', 'minify-and-combine'),
|
||||
'default' => false,
|
||||
'eventsOn' => [
|
||||
'show' => '#wbcr-mac-optimization-danger-message-4'
|
||||
],
|
||||
'eventsOff' => [
|
||||
'hide' => '#wbcr-mac-optimization-danger-message-4'
|
||||
]
|
||||
];
|
||||
|
||||
$css_options[] = [
|
||||
'type' => 'html',
|
||||
'html' => [$this, 'optimizationDangerMessage4']
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'div',
|
||||
'id' => 'wbcr-clr-optimize-css-fields',
|
||||
'items' => $css_options
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'disable_emoji',
|
||||
'title' => __('Disable Emojis', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('Emojis are fun and all, but if you are aren’t using them they actually load a JavaScript file (wp-emoji-release.min.js) on every page of your website. For a lot of businesses, this is not needed and simply adds load time to your site. So we recommend disabling this.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes WordPress Emojis JavaScript file (wp-emoji-release.min.js).', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_rsd_link',
|
||||
'title' => __('Remove RSD Link', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('The above link is used by blog clients. If you edit your site from your browser then you don’t need this. It is also used by some 3rd party applications that utilize XML-RPC requests. In most cases, this is just unnecessary code.', 'clearfy') . '<br><code>link rel="EditURI" type="application/rsd+xml" title="RSD"</code><br><br><b>Clearfy: </b>' . __('Remove RSD (Real Simple Discovery) link tag.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_wlw_link',
|
||||
'title' => __('Remove wlwmanifest Link', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => '<code>link rel="wlwmanifest" type="application/wlwmanifest+xml"</code><br>' . __('This link is actually used by Windows Live Writer. If you don’t know use Windows Live Writer, which we are guessing you don’t, this is just unnecessary code.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Remove wlwmanifest (Windows Live Writer) link tag.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_shortlink_link',
|
||||
'title' => __('Remove Shortlink', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => sprintf(__('By default, the following tag shows up in every WordPress install. %s This is used for a shortlink to your pages and posts. However, if you are already using pretty permalinks, such as domain.com/post, then there is no reason to keep this, it is just unnecessary code.', 'clearfy'), '<br><code>link rel="shortlink" href="https://domain.com?p=712"</code><br>') . '<br><br><b>Clearfy: </b>' . __('Remove Shortlink link tag.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_adjacent_posts_link',
|
||||
'title' => __('Remove links to previous, next post', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('If you use Wordpress as a CMS, then you can delete these links, they can only come in handy for a blog.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Remove the previous and next post links within the wp_head of your wordpress theme.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
$options[] = [
|
||||
'type' => 'checkbox',
|
||||
'way' => 'buttons',
|
||||
'name' => 'remove_recent_comments_style',
|
||||
'title' => __('Remove .recentcomments styles', 'clearfy'),
|
||||
'layout' => ['hint-type' => 'icon'],
|
||||
'hint' => __('WP by default for the widget "recent comments" prescribes in the code styles that are almost impossible to change, because to them apply! important.', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('Removes .recentcomments styles from head section.', 'clearfy'),
|
||||
'default' => true
|
||||
];
|
||||
|
||||
return apply_filters('wclearfy/setup_wizard/speed_optimize_step/form_options', $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a warning message indicating potential risks associated with activating a specific optimization setting.
|
||||
*
|
||||
* @param int $selector_id The unique identifier for the warning message container. Defaults to 1.
|
||||
*
|
||||
* @return void Outputs the HTML structure of the warning message directly to the page.
|
||||
*/
|
||||
public function optimizationDangerMessage($selector_id = 1): void
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label"></label>
|
||||
<div class="control-group col-sm-8">
|
||||
<div id="wbcr-mac-optimization-danger-message-<?= $selector_id ?>" class="wbcr-clearfy-danger-message">
|
||||
<?php _e('<b>This could break things!</b><br>If you notice any errors on your website after having activated this setting, just deactivate it again, and your site will be back to normal.', 'clearfy') ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a specific optimization danger message corresponding to level 1.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function optimizationDangerMessage1(): void
|
||||
{
|
||||
$this->optimizationDangerMessage(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a specific optimization danger message corresponding to level 2.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function optimizationDangerMessage2(): void
|
||||
{
|
||||
$this->optimizationDangerMessage(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a specific optimization danger message corresponding to level 3.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function optimizationDangerMessage3(): void
|
||||
{
|
||||
$this->optimizationDangerMessage(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a specific optimization danger message corresponding to level 4.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function optimizationDangerMessage4(): void
|
||||
{
|
||||
$this->optimizationDangerMessage(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the continuation of the current setup wizard step, with an optional skip parameter.
|
||||
*
|
||||
* @param bool $skip Determines if the step should be skipped. Default is false.
|
||||
* @return void
|
||||
*/
|
||||
protected function continue_step($skip = false): void
|
||||
{
|
||||
do_action('wclearfy/setup_wizard/speed_optimize_step/continue_step');
|
||||
|
||||
parent::continue_step();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Admin bar menu
|
||||
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
||||
* @copyright Webcraftic 01.07.2018
|
||||
*/
|
||||
#wp-admin-bar-clearfy-menu {
|
||||
background: #443a54 !important;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu::after {
|
||||
clear: both;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu .dashicons {
|
||||
font: 400 20px/1 dashicons;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu #wp-admin-bar-clearfy-menu-default {
|
||||
background: #565656 !important;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu .wbcr-clearfy-admin-bar-menu-icon {
|
||||
display: inline-block !important;
|
||||
width: 20px;
|
||||
height: 25px;
|
||||
margin-top: 6px;
|
||||
margin-right: 5px;
|
||||
float: left;
|
||||
background: url(../img/webcraftic-plugin-icon.png) 0 0 no-repeat;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu .wbcr-clearfy-admin-bar-menu-title {
|
||||
display: inline-block !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu .wbcr-clearfy-admin-bar-menu-title .dashicons {
|
||||
font-size: 20px !important;
|
||||
padding: 6px 0 !important;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu .ab-item .dashicons {
|
||||
font-size: 14px;
|
||||
padding: 6px 0;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu .ab-item .dashicons.dashicons-heart {
|
||||
color: #fb7976;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu .ab-item .dashicons.dashicons-sos {
|
||||
color: #c6e9f9;
|
||||
}
|
||||
#wp-admin-bar-clearfy-menu .ab-item .dashicons.dashicons-star-filled {
|
||||
color: #ffbe00;
|
||||
}
|
||||
/*# sourceMappingURL=admin-bar.css.map */
|
||||
@@ -1,101 +0,0 @@
|
||||
/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */
|
||||
|
||||
// https://github.com/filamentgroup/loadCSS/blob/master/src/loadCSS.js
|
||||
|
||||
(function(w) {
|
||||
"use strict";
|
||||
/* exported loadCSS */
|
||||
var loadCSS = function(href, before, media) {
|
||||
// Arguments explained:
|
||||
// `href` [REQUIRED] is the URL for your CSS file.
|
||||
// `before` [OPTIONAL] is the element the script should use as a reference for injecting our stylesheet <link>
|
||||
// before By default, loadCSS attempts to inject the link after the last stylesheet or script in the DOM.
|
||||
// However, you might desire a more specific location in your document. `media` [OPTIONAL] is the media type or
|
||||
// query of the stylesheet. By default it will be 'all'
|
||||
var doc = w.document;
|
||||
var ss = doc.createElement("link");
|
||||
var ref;
|
||||
if( before ) {
|
||||
ref = before;
|
||||
}
|
||||
else {
|
||||
var refs = ( doc.body || doc.getElementsByTagName("head")[0] ).childNodes;
|
||||
ref = refs[refs.length - 1];
|
||||
}
|
||||
|
||||
var sheets = doc.styleSheets;
|
||||
ss.rel = "stylesheet";
|
||||
ss.href = href;
|
||||
// temporarily set media to something inapplicable to ensure it'll fetch without blocking render
|
||||
ss.media = "only x";
|
||||
|
||||
// wait until body is defined before injecting link. This ensures a non-blocking load in IE11.
|
||||
function ready(cb) {
|
||||
if( doc.body ) {
|
||||
return cb();
|
||||
}
|
||||
setTimeout(function() {
|
||||
ready(cb);
|
||||
});
|
||||
}
|
||||
|
||||
// Inject link
|
||||
// Note: the ternary preserves the existing behavior of "before" argument, but we could choose to change the
|
||||
// argument to "after" in a later release and standardize on ref.nextSibling for all refs Note: `insertBefore`
|
||||
// is used instead of `appendChild`, for safety re:
|
||||
// http://www.paulirish.com/2011/surefire-dom-element-insertion/
|
||||
ready(function() {
|
||||
ref.parentNode.insertBefore(ss, ( before ? ref : ref.nextSibling ));
|
||||
});
|
||||
// A method (exposed on return object for external use) that mimics onload by polling document.styleSheets
|
||||
// until it includes the new sheet.
|
||||
var onloadcssdefined = function(cb) {
|
||||
var resolvedHref = ss.href;
|
||||
var i = sheets.length;
|
||||
while( i-- ) {
|
||||
if( sheets[i].href === resolvedHref ) {
|
||||
return cb();
|
||||
}
|
||||
}
|
||||
setTimeout(function() {
|
||||
onloadcssdefined(cb);
|
||||
});
|
||||
};
|
||||
|
||||
function loadCB() {
|
||||
if( ss.addEventListener ) {
|
||||
ss.removeEventListener("load", loadCB);
|
||||
}
|
||||
ss.media = media || "all";
|
||||
}
|
||||
|
||||
// once loaded, set link's media back to `all` so that the stylesheet applies once it loads
|
||||
if( ss.addEventListener ) {
|
||||
ss.addEventListener("load", loadCB);
|
||||
}
|
||||
ss.onloadcssdefined = onloadcssdefined;
|
||||
onloadcssdefined(loadCB);
|
||||
return ss;
|
||||
};
|
||||
// commonjs
|
||||
if( typeof exports !== "undefined" ) {
|
||||
exports.loadCSS = loadCSS;
|
||||
}
|
||||
else {
|
||||
w.loadCSS = loadCSS;
|
||||
}
|
||||
}(typeof global !== "undefined" ? global : this));
|
||||
|
||||
/**/
|
||||
jQuery(document).ready(function($) {
|
||||
"use strict";
|
||||
|
||||
if( 'undefined' !== typeof wbcr_clearfy_async_links && Object.keys(wbcr_clearfy_async_links).length ) {
|
||||
var key;
|
||||
for( key in wbcr_clearfy_async_links ) {
|
||||
if( wbcr_clearfy_async_links.hasOwnProperty(key) ) {
|
||||
loadCSS(wbcr_clearfy_async_links[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
!function(e){"use strict";var n=function(n,t,r){var i,a=e.document,o=a.createElement("link");if(t)i=t;else{var l=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=l[l.length-1]}var s=a.styleSheets;o.rel="stylesheet",o.href=n,o.media="only x",function e(n){if(a.body)return n();setTimeout(function(){e(n)})}(function(){i.parentNode.insertBefore(o,t?i:i.nextSibling)});var c=function(e){for(var n=o.href,t=s.length;t--;)if(s[t].href===n)return e();setTimeout(function(){c(e)})};function d(){o.addEventListener&&o.removeEventListener("load",d),o.media=r||"all"}return o.addEventListener&&o.addEventListener("load",d),o.onloadcssdefined=c,c(d),o};"undefined"!=typeof exports?exports.loadCSS=n:e.loadCSS=n}("undefined"!=typeof global?global:this),jQuery(document).ready(function(e){"use strict";var n;if("undefined"!=typeof wbcr_clearfy_async_links&&Object.keys(wbcr_clearfy_async_links).length)for(n in wbcr_clearfy_async_links)wbcr_clearfy_async_links.hasOwnProperty(n)&&loadCSS(wbcr_clearfy_async_links[n])});
|
||||
@@ -1,208 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Clearfy – WordPress optimization plugin
|
||||
* Plugin URI: https://clearfy.pro
|
||||
* Description: Disables unused Wordpress features, improves performance and increases SEO rankings, using Clearfy, which makes WordPress very easy.
|
||||
* Author: Creative Motion <info@cm-wp.com>
|
||||
* Version: 2.4.1
|
||||
* Text Domain: clearfy
|
||||
* Domain Path: /languages/
|
||||
* Author URI: https://cm-wp.com
|
||||
* Framework Version: FACTORY_480_VERSION
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* -----------------------------------------------------------------------------
|
||||
* CHECK REQUIREMENTS
|
||||
* Check compatibility with php and wp version of the user's site. As well as checking
|
||||
* compatibility with other plugins from Webcraftic.
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
require_once( dirname( __FILE__ ) . '/libs/factory/core/includes/class-factory-requirements.php' );
|
||||
|
||||
$plugin_info = [
|
||||
'prefix' => 'wbcr_clearfy_',
|
||||
'plugin_name' => 'wbcr_clearfy',
|
||||
'plugin_title' => 'Clearfy',
|
||||
|
||||
// PLUGIN SUPPORT
|
||||
'support_details' => [
|
||||
'url' => 'http://clearfy.pro',
|
||||
'pages_map' => [
|
||||
'features' => 'premium-features', // {site}/premium-features
|
||||
'pricing' => 'pricing', // {site}/prices
|
||||
'support' => 'support', // {site}/support
|
||||
'docs' => 'docs' // {site}/docs
|
||||
]
|
||||
],
|
||||
//todo: for compatibility with Robin image optimizer
|
||||
'freemius_plugin_id' => '2315',
|
||||
'freemius_public_key' => 'pk_70e226af07d37d2b9a69720e0952c',
|
||||
|
||||
'has_updates' => true,
|
||||
'updates_settings' => [
|
||||
'repository' => 'github',
|
||||
'alternate_updates_mode' => true,
|
||||
'github_username' => 'Creative-Motion-Development', // обязательно, имя пользователя репозитория в Github
|
||||
'github_authorize_token' => '', // необязательно, только если репозиторий приватный
|
||||
'github_repository' => 'wp-plugin-clearfy', // необязательно, если не заполнено берется из slug
|
||||
'slug' => 'clearfy', // обязательно, slug плагина
|
||||
'maybe_rollback' => false,
|
||||
'rollback_settings' => [
|
||||
'prev_stable_version' => '0.0.0'
|
||||
]
|
||||
],
|
||||
|
||||
// PLUGIN PREMIUM SETTINGS
|
||||
'has_premium' => true,
|
||||
'license_settings' => [
|
||||
'provider' => 'freemius',
|
||||
'slug' => 'clearfy_package',
|
||||
'plugin_id' => '2315',
|
||||
'public_key' => 'pk_70e226af07d37d2b9a69720e0952c',
|
||||
'price' => 29,
|
||||
'has_updates' => true,
|
||||
'updates_settings' => [
|
||||
'maybe_rollback' => true,
|
||||
'rollback_settings' => [
|
||||
'prev_stable_version' => '0.0.0'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
// PLUGIN SUBSCRIBE FORM
|
||||
'subscribe_widget' => true,
|
||||
'subscribe_settings' => [ 'group_id' => '105407119' ],
|
||||
|
||||
// PLUGIN ADVERTS
|
||||
'render_adverts' => true,
|
||||
'adverts_settings' => [
|
||||
'dashboard_widget' => true, // show dashboard widget (default: false)
|
||||
'right_sidebar' => true, // show adverts sidebar (default: false)
|
||||
'notice' => true, // show notice message (default: false)
|
||||
],
|
||||
// FRAMEWORK MODULES
|
||||
'load_factory_modules' => [
|
||||
[ 'libs/factory/bootstrap', 'factory_bootstrap_482', 'admin' ],
|
||||
[ 'libs/factory/forms', 'factory_forms_480', 'admin' ],
|
||||
[ 'libs/factory/pages', 'factory_pages_480', 'admin' ],
|
||||
[ 'libs/factory/templates', 'factory_templates_134', 'all' ],
|
||||
[ 'libs/factory/freemius', 'factory_freemius_170', 'all' ],
|
||||
[ 'libs/factory/adverts', 'factory_adverts_159', 'admin' ],
|
||||
[ 'libs/factory/logger', 'factory_logger_149', 'all' ],
|
||||
|
||||
],
|
||||
'load_plugin_components' => [
|
||||
'disable_notices' => [
|
||||
'autoload' => 'components/disable-admin-notices/clearfy.php',
|
||||
'plugin_prefix' => 'WDN_'
|
||||
],
|
||||
'cyrlitera' => [
|
||||
'autoload' => 'components/cyrlitera/clearfy.php',
|
||||
'plugin_prefix' => 'WCTR_'
|
||||
],
|
||||
'updates_manager' => [
|
||||
'autoload' => 'components/updates-manager/clearfy.php',
|
||||
'plugin_prefix' => 'WUPM_'
|
||||
],
|
||||
'comments_tools' => [
|
||||
'autoload' => 'components/comments-plus/clearfy.php',
|
||||
'plugin_prefix' => 'WCM_'
|
||||
],
|
||||
'ga_cache' => [
|
||||
'autoload' => 'components/ga-cache/clearfy.php',
|
||||
'plugin_prefix' => 'WGA_'
|
||||
],
|
||||
'assets_manager' => [
|
||||
'autoload' => 'components/assets-manager/clearfy.php',
|
||||
'plugin_prefix' => 'WGZ_'
|
||||
],
|
||||
'minify_and_combine' => [
|
||||
'autoload' => 'components/minify-and-combine/clearfy.php',
|
||||
'plugin_prefix' => 'WMAC_'
|
||||
],
|
||||
'html_minify' => [
|
||||
'autoload' => 'components/html-minify/clearfy.php',
|
||||
'plugin_prefix' => 'WHTM_'
|
||||
],
|
||||
'clearfy_cache' => [
|
||||
'autoload' => 'components/cache/clearfy.php',
|
||||
'plugin_prefix' => 'WCACHE_'
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
|
||||
$clearfy_compatibility = new Wbcr_Factory480_Requirements( __FILE__, array_merge( $plugin_info, [
|
||||
'plugin_already_activate' => defined( 'WCL_PLUGIN_ACTIVE' ),
|
||||
'required_php_version' => '7.0',
|
||||
'required_wp_version' => '5.2.0',
|
||||
'required_clearfy_check_component' => false
|
||||
] ) );
|
||||
|
||||
/**
|
||||
* If the plugin is compatible, then it will continue its work, otherwise it will be stopped,
|
||||
* and the user will throw a warning.
|
||||
*/
|
||||
if ( ! $clearfy_compatibility->check() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* -----------------------------------------------------------------------------
|
||||
* CONSTANTS
|
||||
* Install frequently used constants and constants for debugging, which will be
|
||||
* removed after compiling the plugin.
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// This plugin is activated
|
||||
define( 'WCL_PLUGIN_ACTIVE', true );
|
||||
|
||||
// For for compatibility with old plugins
|
||||
define( 'WBCR_CLEARFY_PLUGIN_ACTIVE', true );
|
||||
|
||||
// Plugin version
|
||||
define( 'WCL_PLUGIN_VERSION', $clearfy_compatibility->get_plugin_version() );
|
||||
define( 'WCL_FRAMEWORK_VER', 'FACTORY_480_VERSION' );
|
||||
|
||||
define( 'WCL_PLUGIN_DIR', dirname( __FILE__ ) );
|
||||
define( 'WCL_PLUGIN_BASE', plugin_basename( __FILE__ ) );
|
||||
define( 'WCL_PLUGIN_URL', plugins_url( '', __FILE__ ) );
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* -----------------------------------------------------------------------------
|
||||
* PLUGIN INIT
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
try {
|
||||
// creating a plugin via the factory
|
||||
require_once( WCL_PLUGIN_DIR . '/libs/factory/core/boot.php' );
|
||||
require_once( WCL_PLUGIN_DIR . '/includes/class.plugin.php' );
|
||||
|
||||
new WCL_Plugin( __FILE__, array_merge( $plugin_info, [
|
||||
'plugin_version' => WCL_PLUGIN_VERSION,
|
||||
'plugin_text_domain' => $clearfy_compatibility->get_text_domain(),
|
||||
] ) );
|
||||
} catch ( Exception $e ) {
|
||||
// Plugin wasn't initialized due to an error
|
||||
define( 'WCL_PLUGIN_THROW_ERROR', true );
|
||||
|
||||
$clearfy_plugin_error_func = function () use ( $e ) {
|
||||
$error = sprintf( "The %s plugin has stopped. <b>Error:</b> %s Code: %s", 'Clearfy', $e->getMessage(), $e->getCode() );
|
||||
echo '<div class="notice notice-error"><p>' . $error . '</p></div>';
|
||||
};
|
||||
|
||||
add_action( 'admin_notices', $clearfy_plugin_error_func );
|
||||
add_action( 'network_admin_notices', $clearfy_plugin_error_func );
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Activator for the cyrlitera
|
||||
*
|
||||
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
|
||||
* @copyright (c) 09.03.2018, Webcraftic
|
||||
* @see Wbcr_Factory480_Activator
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WGNZ_Activation extends Wbcr_Factory480_Activator {
|
||||
|
||||
/**
|
||||
* Runs activation actions.
|
||||
*/
|
||||
public function activate() {
|
||||
wbcr_gnz_deploy_mu_plugin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs deactivation actions.
|
||||
*/
|
||||
public function deactivate() {
|
||||
wbcr_gnz_remove_mu_plugin();
|
||||
}
|
||||
}
|
||||