Remove lazy loading and minification features
- Remove CSS minifier and speed functions\n- Remove lazy loading functionality\n- Update plugin description and README\n- Simplify plugin to focus on auto upload feature\n- Rename files from wpa-superstar to wp-allstars
This commit is contained in:
125
admin/css/wp-allstars-admin.css
Normal file
125
admin/css/wp-allstars-admin.css
Normal file
@ -0,0 +1,125 @@
|
||||
.wp-allstars-wrap {
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.wp-allstars-header {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #c3c4c7;
|
||||
box-shadow: 0 1px 0 rgba(0,0,0,.04);
|
||||
margin: 0 -20px 20px -20px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.wp-allstars-header h1 {
|
||||
font-size: 23px;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1.3;
|
||||
color: #1d2327;
|
||||
}
|
||||
|
||||
.wp-allstars-header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.wp-allstars-version {
|
||||
color: #646970;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.wp-allstars-toggle {
|
||||
margin: 15px 0;
|
||||
padding: 16px 20px;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.02);
|
||||
transition: all .15s ease-in-out;
|
||||
}
|
||||
|
||||
.wp-allstars-toggle:hover {
|
||||
border-color: #4caf50;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.04);
|
||||
}
|
||||
|
||||
.wp-allstars-toggle label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
font-weight: 500;
|
||||
color: #1d2327;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wp-allstars-toggle .description {
|
||||
margin: 6px 0 0 52px;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wp-allstars-loading-overlay {
|
||||
position: fixed;
|
||||
top: 32px;
|
||||
left: 160px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
z-index: 100000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.wp-allstars-plugin-filters {
|
||||
margin: 0 0 20px;
|
||||
padding: 0 0 12px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.wp-allstars-settings-container {
|
||||
padding: 0 20px;
|
||||
max-width: 1100px;
|
||||
}
|
||||
|
||||
.wp-allstars-settings-content {
|
||||
margin-top: 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wp-allstars-toggle-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wp-allstars-toggle-settings {
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.wp-allstars-setting-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.wp-allstars-expand-settings {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
color: #787c82;
|
||||
transition: color .15s ease-in-out;
|
||||
}
|
@ -1,328 +0,0 @@
|
||||
.wpa-superstar-wrap {
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.wpa-superstar-header {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #c3c4c7;
|
||||
box-shadow: 0 1px 0 rgba(0,0,0,.04);
|
||||
margin: 0 -20px 20px -20px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.wpa-superstar-header h1 {
|
||||
font-size: 23px;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1.3;
|
||||
color: #1d2327;
|
||||
}
|
||||
|
||||
.wpa-superstar-header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.wpa-superstar-version {
|
||||
color: #646970;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.wpa-settings-container {
|
||||
padding: 0 20px;
|
||||
max-width: 1100px;
|
||||
}
|
||||
|
||||
/* RankMath-style Tabs */
|
||||
.nav-tab-wrapper {
|
||||
margin: 0;
|
||||
padding-top: 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
line-height: inherit;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.nav-tab {
|
||||
margin: 0 6px 0 0;
|
||||
padding: 12px 20px;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
font-weight: 500;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
color: #646970;
|
||||
transition: all .2s ease;
|
||||
}
|
||||
|
||||
.nav-tab:hover,
|
||||
.nav-tab:focus {
|
||||
background: transparent;
|
||||
color: #2271b1;
|
||||
border-bottom-color: rgba(34, 113, 177, 0.4);
|
||||
}
|
||||
|
||||
.nav-tab-active,
|
||||
.nav-tab-active:focus,
|
||||
.nav-tab-active:focus:active,
|
||||
.nav-tab-active:hover {
|
||||
background: transparent;
|
||||
color: #2271b1;
|
||||
border: 0;
|
||||
border-bottom: 2px solid #2271b1;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* RankMath-style toggle switches */
|
||||
.wpa-superstar-toggle {
|
||||
margin: 15px 0;
|
||||
padding: 16px 20px;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.02);
|
||||
transition: all .15s ease-in-out;
|
||||
}
|
||||
|
||||
.wpa-superstar-toggle:hover {
|
||||
border-color: #4caf50;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.04);
|
||||
}
|
||||
|
||||
.wpa-superstar-toggle label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
font-weight: 500;
|
||||
color: #1d2327;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpa-superstar-toggle .description {
|
||||
margin: 6px 0 0 52px;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* RankMath-style Toggle Switch */
|
||||
.wpa-toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.wpa-toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpa-toggle-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #b5bfc9;
|
||||
transition: .15s ease-in-out;
|
||||
border-radius: 100px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.wpa-toggle-slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: .15s ease-in-out;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.wpa-toggle-switch input:checked + .wpa-toggle-slider {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
|
||||
.wpa-toggle-switch input:checked + .wpa-toggle-slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
.wpa-toggle-switch input:focus + .wpa-toggle-slider {
|
||||
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(76, 175, 80, 0.25);
|
||||
}
|
||||
|
||||
.wpa-toggle-switch:hover .wpa-toggle-slider:before {
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
/* Plugin filters */
|
||||
.wpa-plugin-filters {
|
||||
margin: 0 0 20px;
|
||||
padding: 0 0 12px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.wpa-plugin-filters .button {
|
||||
margin: 0 8px 8px 0;
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
/* Settings content spacing */
|
||||
.wpa-settings-content {
|
||||
margin-top: 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Loading overlay */
|
||||
.wpa-loading-overlay {
|
||||
position: fixed;
|
||||
top: 32px;
|
||||
left: 160px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
z-index: 100000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.wp-list-table-container {
|
||||
position: relative;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.wp-list-table-container .spinner {
|
||||
float: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpa-superstar-workflow-toggle {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
.wpa-superstar-workflow-toggle label {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
.wpa-superstar-workflow-toggle .description {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
/* Toggle switch styles */
|
||||
.switch {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
.switch input {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
.slider {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
/* Remove these style blocks entirely */
|
||||
}
|
||||
|
||||
/* Active tab styles */
|
||||
.nav-tab-active {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
|
||||
.wpa-toggle-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpa-expand-settings {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
color: #787c82;
|
||||
transition: color .15s ease-in-out;
|
||||
}
|
||||
|
||||
.wpa-expand-settings:hover {
|
||||
color: #2271b1;
|
||||
}
|
||||
|
||||
.wpa-expand-settings .dashicons {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.wpa-toggle-settings {
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.wpa-setting-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.wpa-setting-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wpa-setting-row label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.wpa-setting-row input[type="text"],
|
||||
.wpa-setting-row input[type="number"],
|
||||
.wpa-setting-row textarea {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.wpa-setting-row textarea {
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.wpa-setting-row .description {
|
||||
margin-top: 5px;
|
||||
margin-left: 0;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
}
|
@ -1,21 +1,21 @@
|
||||
jQuery(document).ready(function($) {
|
||||
$('.wpa-superstar-toggle input').on('change', function() {
|
||||
$('.wp-allstars-toggle input').on('change', function() {
|
||||
var $input = $(this);
|
||||
var option = $input.attr('name');
|
||||
var value = $input.is(':checked') ? 1 : 0;
|
||||
|
||||
// Remove any existing status messages
|
||||
$('.wpa-status').remove();
|
||||
$('.wp-status').remove();
|
||||
|
||||
// Add a small notification that fades out
|
||||
var $notification = $('<span class="wpa-status" style="position: fixed; top: 32px; left: 50%; transform: translateX(-50%); z-index: 99999; background: #00a32a; color: white; padding: 8px 16px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">Setting saved</span>');
|
||||
var $notification = $('<span class="wp-status" style="position: fixed; top: 32px; left: 50%; transform: translateX(-50%); z-index: 99999; background: #00a32a; color: white; padding: 8px 16px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">Setting saved</span>');
|
||||
$('body').append($notification);
|
||||
|
||||
$.post(wpaSuperstar.ajaxurl, {
|
||||
action: 'wpa_superstar_update_option',
|
||||
$.post(wpAllstars.ajaxurl, {
|
||||
action: 'wp_allstars_update_option',
|
||||
option: option,
|
||||
value: value,
|
||||
nonce: wpaSuperstar.nonce
|
||||
nonce: wpAllstars.nonce
|
||||
}, function(response) {
|
||||
if (!response.success) {
|
||||
console.error('Error:', response);
|
@ -4,37 +4,37 @@
|
||||
*/
|
||||
|
||||
// Add menu item
|
||||
function wpa_superstar_admin_menu() {
|
||||
function wp_allstars_admin_menu() {
|
||||
add_options_page(
|
||||
'WPA Superstar Settings',
|
||||
'WPA Superstar',
|
||||
'WP ALLSTARS Settings',
|
||||
'WP ALLSTARS',
|
||||
'manage_options',
|
||||
'wpa-superstar',
|
||||
'wpa_superstar_settings_page'
|
||||
'wp-allstars',
|
||||
'wp_allstars_settings_page'
|
||||
);
|
||||
}
|
||||
add_action('admin_menu', 'wpa_superstar_admin_menu');
|
||||
add_action('admin_menu', 'wp_allstars_admin_menu');
|
||||
|
||||
// Register settings
|
||||
function wpa_superstar_register_settings() {
|
||||
register_setting('wpa-superstar-settings', 'wpa_superstar_lazy_load');
|
||||
register_setting('wpa-superstar-settings', 'wpa_superstar_minify_css');
|
||||
register_setting('wpa-superstar-settings', 'wpa_superstar_minify_js');
|
||||
function wp_allstars_register_settings() {
|
||||
register_setting('wp-allstars-settings', 'wp_allstars_lazy_load');
|
||||
register_setting('wp-allstars-settings', 'wp_allstars_minify_css');
|
||||
register_setting('wp-allstars-settings', 'wp_allstars_minify_js');
|
||||
}
|
||||
add_action('admin_init', 'wpa_superstar_register_settings');
|
||||
add_action('admin_init', 'wp_allstars_register_settings');
|
||||
|
||||
// AJAX handler for settings
|
||||
function wpa_superstar_update_option() {
|
||||
check_ajax_referer('wpa-superstar-nonce', 'nonce');
|
||||
function wp_allstars_update_option() {
|
||||
check_ajax_referer('wp-allstars-nonce', 'nonce');
|
||||
$option = sanitize_text_field($_POST['option']);
|
||||
$value = intval($_POST['value']);
|
||||
update_option($option, $value);
|
||||
wp_send_json_success('Option updated');
|
||||
}
|
||||
add_action('wp_ajax_wpa_superstar_update_option', 'wpa_superstar_update_option');
|
||||
add_action('wp_ajax_wp_allstars_update_option', 'wp_allstars_update_option');
|
||||
|
||||
// Define recommended plugins
|
||||
function wpa_superstar_get_recommended_plugins() {
|
||||
function wp_allstars_get_recommended_plugins() {
|
||||
return array(
|
||||
'minimal' => array(
|
||||
'antispam-bee',
|
||||
@ -64,8 +64,8 @@ function wpa_superstar_get_recommended_plugins() {
|
||||
}
|
||||
|
||||
// Add transient caching for plugin data
|
||||
function wpa_superstar_get_cached_plugins($category) {
|
||||
$cache_key = 'wpa_superstar_plugins_' . $category;
|
||||
function wp_allstars_get_cached_plugins($category) {
|
||||
$cache_key = 'wp_allstars_plugins_' . $category;
|
||||
$cached_data = get_transient($cache_key);
|
||||
|
||||
if ($cached_data !== false) {
|
||||
@ -75,13 +75,13 @@ function wpa_superstar_get_cached_plugins($category) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function wpa_superstar_set_cached_plugins($category, $data) {
|
||||
$cache_key = 'wpa_superstar_plugins_' . $category;
|
||||
function wp_allstars_set_cached_plugins($category, $data) {
|
||||
$cache_key = 'wp_allstars_plugins_' . $category;
|
||||
set_transient($cache_key, $data, 12 * HOUR_IN_SECONDS);
|
||||
}
|
||||
|
||||
// Add AJAX endpoint for plugin list
|
||||
function wpa_superstar_ajax_get_plugins() {
|
||||
function wp_allstars_ajax_get_plugins() {
|
||||
check_ajax_referer('updates');
|
||||
|
||||
if (!current_user_can('install_plugins')) {
|
||||
@ -93,13 +93,13 @@ function wpa_superstar_ajax_get_plugins() {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
||||
|
||||
// Get our recommended plugins for this category
|
||||
$recommended_plugins = wpa_superstar_get_recommended_plugins();
|
||||
$recommended_plugins = wp_allstars_get_recommended_plugins();
|
||||
if (!isset($recommended_plugins[$category])) {
|
||||
wp_send_json_error('Invalid category: ' . $category);
|
||||
}
|
||||
|
||||
// Try to get cached data first
|
||||
$cached_data = wpa_superstar_get_cached_plugins($category);
|
||||
$cached_data = wp_allstars_get_cached_plugins($category);
|
||||
if ($cached_data !== false) {
|
||||
error_log('Using cached data for category: ' . $category);
|
||||
// Setup the list table with cached data
|
||||
@ -188,7 +188,7 @@ function wpa_superstar_ajax_get_plugins() {
|
||||
);
|
||||
|
||||
// Cache the results
|
||||
wpa_superstar_set_cached_plugins($category, $res);
|
||||
wp_allstars_set_cached_plugins($category, $res);
|
||||
|
||||
// Setup the list table
|
||||
$GLOBALS['tab'] = 'plugin-install';
|
||||
@ -218,49 +218,49 @@ function wpa_superstar_ajax_get_plugins() {
|
||||
wp_send_json_error('Failed to fetch plugin data: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
add_action('wp_ajax_wpa_get_plugins', 'wpa_superstar_ajax_get_plugins');
|
||||
add_action('wp_ajax_wp_allstars_get_plugins', 'wp_allstars_ajax_get_plugins');
|
||||
|
||||
// Remove the old plugins API filter since we're handling everything in the AJAX endpoint
|
||||
remove_filter('plugins_api_result', 'wpa_superstar_plugins_api_result');
|
||||
remove_filter('plugins_api_result', 'wp_allstars_plugins_api_result');
|
||||
|
||||
// Clear plugin cache when plugins are updated, activated, or deactivated
|
||||
function wpa_superstar_clear_plugin_cache() {
|
||||
$recommended_plugins = wpa_superstar_get_recommended_plugins();
|
||||
function wp_allstars_clear_plugin_cache() {
|
||||
$recommended_plugins = wp_allstars_get_recommended_plugins();
|
||||
foreach (array_keys($recommended_plugins) as $category) {
|
||||
delete_transient('wpa_superstar_plugins_' . $category);
|
||||
delete_transient('wp_allstars_plugins_' . $category);
|
||||
}
|
||||
}
|
||||
add_action('upgrader_process_complete', 'wpa_superstar_clear_plugin_cache', 10, 0);
|
||||
add_action('activated_plugin', 'wpa_superstar_clear_plugin_cache');
|
||||
add_action('deactivated_plugin', 'wpa_superstar_clear_plugin_cache');
|
||||
add_action('deleted_plugin', 'wpa_superstar_clear_plugin_cache');
|
||||
add_action('update_option_active_plugins', 'wpa_superstar_clear_plugin_cache');
|
||||
add_action('upgrader_process_complete', 'wp_allstars_clear_plugin_cache', 10, 0);
|
||||
add_action('activated_plugin', 'wp_allstars_clear_plugin_cache');
|
||||
add_action('deactivated_plugin', 'wp_allstars_clear_plugin_cache');
|
||||
add_action('deleted_plugin', 'wp_allstars_clear_plugin_cache');
|
||||
add_action('update_option_active_plugins', 'wp_allstars_clear_plugin_cache');
|
||||
|
||||
// Add transient caching for theme data
|
||||
function wpa_superstar_get_cached_theme() {
|
||||
$cache_key = 'wpa_superstar_theme_kadence';
|
||||
function wp_allstars_get_cached_theme() {
|
||||
$cache_key = 'wp_allstars_theme_kadence';
|
||||
return get_transient($cache_key);
|
||||
}
|
||||
|
||||
function wpa_superstar_set_cached_theme($data) {
|
||||
$cache_key = 'wpa_superstar_theme_kadence';
|
||||
function wp_allstars_set_cached_theme($data) {
|
||||
$cache_key = 'wp_allstars_theme_kadence';
|
||||
set_transient($cache_key, $data, 12 * HOUR_IN_SECONDS);
|
||||
}
|
||||
|
||||
// Add AJAX endpoint for theme
|
||||
function wpa_superstar_ajax_get_theme() {
|
||||
function wp_allstars_ajax_get_theme() {
|
||||
check_ajax_referer('updates');
|
||||
|
||||
if (!current_user_can('install_themes')) {
|
||||
error_log('WPA Superstar: User does not have permission to install themes');
|
||||
error_log('WP ALLSTARS: User does not have permission to install themes');
|
||||
wp_send_json_error('Permission denied');
|
||||
return;
|
||||
}
|
||||
|
||||
error_log('WPA Superstar: Starting theme fetch process');
|
||||
error_log('WP ALLSTARS: Starting theme fetch process');
|
||||
|
||||
try {
|
||||
error_log('WPA Superstar: Fetching theme data for kadence');
|
||||
error_log('WP ALLSTARS: Fetching theme data for kadence');
|
||||
|
||||
// Get theme data with minimal fields
|
||||
$theme_data = themes_api('theme_information', array(
|
||||
@ -286,12 +286,12 @@ function wpa_superstar_ajax_get_theme() {
|
||||
));
|
||||
|
||||
if (is_wp_error($theme_data)) {
|
||||
error_log('WPA Superstar Theme API Error: ' . $theme_data->get_error_message());
|
||||
error_log('WP ALLSTARS Theme API Error: ' . $theme_data->get_error_message());
|
||||
wp_send_json_error('Theme API Error: ' . $theme_data->get_error_message());
|
||||
return;
|
||||
}
|
||||
|
||||
error_log('WPA Superstar: Successfully fetched theme data');
|
||||
error_log('WP ALLSTARS: Successfully fetched theme data');
|
||||
|
||||
// Format author data
|
||||
$author = '';
|
||||
@ -391,35 +391,35 @@ function wpa_superstar_ajax_get_theme() {
|
||||
$html = ob_get_clean();
|
||||
|
||||
if (empty($html)) {
|
||||
error_log('WPA Superstar: Empty HTML generated');
|
||||
error_log('WP ALLSTARS: Empty HTML generated');
|
||||
wp_send_json_error('Failed to generate theme display');
|
||||
return;
|
||||
}
|
||||
|
||||
error_log('WPA Superstar: Successfully generated theme display');
|
||||
error_log('WP ALLSTARS: Successfully generated theme display');
|
||||
wp_send_json_success($html);
|
||||
|
||||
} catch (Exception $e) {
|
||||
error_log('WPA Superstar Theme loading exception: ' . $e->getMessage());
|
||||
error_log('WPA Superstar Theme loading exception trace: ' . $e->getTraceAsString());
|
||||
error_log('WP ALLSTARS Theme loading exception: ' . $e->getMessage());
|
||||
error_log('WP ALLSTARS Theme loading exception trace: ' . $e->getTraceAsString());
|
||||
wp_send_json_error('Theme loading error: ' . $e->getMessage());
|
||||
} catch (Error $e) {
|
||||
error_log('WPA Superstar Theme loading error: ' . $e->getMessage());
|
||||
error_log('WPA Superstar Theme loading error trace: ' . $e->getTraceAsString());
|
||||
error_log('WP ALLSTARS Theme loading error: ' . $e->getMessage());
|
||||
error_log('WP ALLSTARS Theme loading error trace: ' . $e->getTraceAsString());
|
||||
wp_send_json_error('Theme loading error: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
add_action('wp_ajax_wpa_get_theme', 'wpa_superstar_ajax_get_theme');
|
||||
add_action('wp_ajax_wp_allstars_get_theme', 'wp_allstars_ajax_get_theme');
|
||||
|
||||
// Clear theme cache when themes are updated
|
||||
function wpa_superstar_clear_theme_cache() {
|
||||
delete_transient('wpa_superstar_theme_kadence');
|
||||
function wp_allstars_clear_theme_cache() {
|
||||
delete_transient('wp_allstars_theme_kadence');
|
||||
}
|
||||
add_action('upgrader_process_complete', 'wpa_superstar_clear_theme_cache', 10, 0);
|
||||
add_action('switch_theme', 'wpa_superstar_clear_theme_cache');
|
||||
add_action('upgrader_process_complete', 'wp_allstars_clear_theme_cache', 10, 0);
|
||||
add_action('switch_theme', 'wp_allstars_clear_theme_cache');
|
||||
|
||||
// Add AJAX handler for theme activation
|
||||
function wpa_superstar_activate_theme() {
|
||||
function wp_allstars_activate_theme() {
|
||||
check_ajax_referer('updates');
|
||||
|
||||
if (!current_user_can('switch_themes')) {
|
||||
@ -447,10 +447,10 @@ function wpa_superstar_activate_theme() {
|
||||
wp_send_json_error('Failed to activate theme');
|
||||
}
|
||||
}
|
||||
add_action('wp_ajax_wpa_activate_theme', 'wpa_superstar_activate_theme');
|
||||
add_action('wp_ajax_wp_allstars_activate_theme', 'wp_allstars_activate_theme');
|
||||
|
||||
// Settings page HTML
|
||||
function wpa_superstar_settings_page() {
|
||||
function wp_allstars_settings_page() {
|
||||
global $tabs;
|
||||
|
||||
$active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'general';
|
||||
@ -458,47 +458,49 @@ function wpa_superstar_settings_page() {
|
||||
|
||||
// Clear cache and load required files
|
||||
if ($active_tab === 'recommended') {
|
||||
wpa_superstar_clear_plugin_cache();
|
||||
wp_allstars_clear_plugin_cache();
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
||||
wp_enqueue_script('plugin-install');
|
||||
wp_enqueue_script('updates');
|
||||
add_thickbox();
|
||||
wp_enqueue_style('wp-allstars-admin', plugins_url('css/wp-allstars-admin.css', __FILE__));
|
||||
} elseif ($active_tab === 'theme') {
|
||||
wpa_superstar_clear_theme_cache();
|
||||
wp_allstars_clear_theme_cache();
|
||||
require_once ABSPATH . 'wp-admin/includes/theme.php';
|
||||
wp_enqueue_script('theme-install');
|
||||
wp_enqueue_script('updates');
|
||||
add_thickbox();
|
||||
wp_enqueue_style('wp-allstars-admin', plugins_url('css/wp-allstars-admin.css', __FILE__));
|
||||
}
|
||||
?>
|
||||
<div class="wrap wpa-superstar-wrap">
|
||||
<div class="wpa-superstar-header">
|
||||
<div class="wrap wp-allstars-wrap">
|
||||
<div class="wp-allstars-header">
|
||||
<h1><?php echo esc_html(get_admin_page_title()); ?></h1>
|
||||
<div class="wpa-superstar-header-actions">
|
||||
<span class="wpa-superstar-version">Version <?php echo esc_html(WPA_SUPERSTAR_VERSION); ?></span>
|
||||
<div class="wp-allstars-header-actions">
|
||||
<span class="wp-allstars-version">Version <?php echo esc_html(WP_ALLSTARS_VERSION); ?></span>
|
||||
<a href="https://www.wpallstars.com/docs/superstar-plugin/" target="_blank" class="button button-secondary">
|
||||
<?php esc_html_e('Documentation', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Documentation', 'wp-allstars'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpa-settings-container">
|
||||
<div class="wpa-superstar-nav">
|
||||
<div class="wp-allstars-nav">
|
||||
<h2 class="nav-tab-wrapper">
|
||||
<a href="?page=wpa-superstar&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('General', 'wpa-superstar'); ?>
|
||||
<a href="?page=wp-allstars&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('General', 'wp-allstars'); ?>
|
||||
</a>
|
||||
<a href="?page=wpa-superstar&tab=workflow" class="nav-tab <?php echo $active_tab == 'workflow' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('Workflow', 'wpa-superstar'); ?>
|
||||
<a href="?page=wp-allstars&tab=workflow" class="nav-tab <?php echo $active_tab == 'workflow' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('Workflow', 'wp-allstars'); ?>
|
||||
</a>
|
||||
<a href="?page=wpa-superstar&tab=advanced" class="nav-tab <?php echo $active_tab == 'advanced' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('Advanced', 'wpa-superstar'); ?>
|
||||
<a href="?page=wp-allstars&tab=advanced" class="nav-tab <?php echo $active_tab == 'advanced' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('Advanced', 'wp-allstars'); ?>
|
||||
</a>
|
||||
<a href="?page=wpa-superstar&tab=recommended" class="nav-tab <?php echo $active_tab == 'recommended' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('Free Plugins', 'wpa-superstar'); ?>
|
||||
<a href="?page=wp-allstars&tab=recommended" class="nav-tab <?php echo $active_tab == 'recommended' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('Free Plugins', 'wp-allstars'); ?>
|
||||
</a>
|
||||
<a href="?page=wpa-superstar&tab=theme" class="nav-tab <?php echo $active_tab == 'theme' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('Theme', 'wpa-superstar'); ?>
|
||||
<a href="?page=wp-allstars&tab=theme" class="nav-tab <?php echo $active_tab == 'theme' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e('Theme', 'wp-allstars'); ?>
|
||||
</a>
|
||||
</h2>
|
||||
</div>
|
||||
@ -506,20 +508,20 @@ function wpa_superstar_settings_page() {
|
||||
<div class="wpa-settings-content">
|
||||
<?php if ($active_tab == 'workflow'): ?>
|
||||
<form action="options.php" method="post">
|
||||
<?php settings_fields('wpa_superstar_workflow'); ?>
|
||||
<div class="wpa-superstar-toggle">
|
||||
<div class="wpa-toggle-header">
|
||||
<label for="wpa_superstar_auto_upload_images">
|
||||
<div class="wpa-toggle-switch">
|
||||
<?php settings_fields('wp_allstars_workflow'); ?>
|
||||
<div class="wp-allstars-toggle">
|
||||
<div class="wp-toggle-header">
|
||||
<label for="wp_allstars_auto_upload_images">
|
||||
<div class="wp-toggle-switch">
|
||||
<input type="checkbox"
|
||||
id="wpa_superstar_auto_upload_images"
|
||||
name="wpa_superstar_workflow_options[auto_upload_images]"
|
||||
id="wp_allstars_auto_upload_images"
|
||||
name="wp_allstars_workflow_options[auto_upload_images]"
|
||||
value="1"
|
||||
<?php
|
||||
$options = get_option('wpa_superstar_workflow_options', array(
|
||||
$options = get_option('wp_allstars_workflow_options', array(
|
||||
'auto_upload_images' => false,
|
||||
'max_width' => 1920,
|
||||
'max_height' => 1080,
|
||||
'max_width' => 2560,
|
||||
'max_height' => 2560,
|
||||
'exclude_urls' => '',
|
||||
'exclude_post_types' => array(),
|
||||
'image_name_pattern' => '%filename%',
|
||||
@ -528,71 +530,71 @@ function wpa_superstar_settings_page() {
|
||||
checked($options['auto_upload_images'], true);
|
||||
?>
|
||||
/>
|
||||
<span class="wpa-toggle-slider"></span>
|
||||
<span class="wp-toggle-slider"></span>
|
||||
</div>
|
||||
<?php esc_html_e('Enable Auto Upload Images', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Enable Auto Upload Images', 'wp-allstars'); ?>
|
||||
</label>
|
||||
<button type="button" class="wpa-expand-settings" aria-expanded="false">
|
||||
<button type="button" class="wp-expand-settings" aria-expanded="false">
|
||||
<span class="dashicons dashicons-arrow-down-alt2"></span>
|
||||
</button>
|
||||
</div>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Import images that have external URLs into your Media Library when saving. Consider disabling during large data imports with many external image URLs.', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Import images that have external URLs into your Media Library when saving. Consider disabling during large data imports with many external image URLs.', 'wp-allstars'); ?>
|
||||
</p>
|
||||
<div class="wpa-toggle-settings" style="display: none;">
|
||||
<div class="wpa-setting-row">
|
||||
<label for="wpa_max_width"><?php esc_html_e('Max Width', 'wpa-superstar'); ?></label>
|
||||
<div class="wp-toggle-settings" style="display: none;">
|
||||
<div class="wp-setting-row">
|
||||
<label for="wp_max_width"><?php esc_html_e('Max Width', 'wp-allstars'); ?></label>
|
||||
<input type="number"
|
||||
id="wpa_max_width"
|
||||
name="wpa_superstar_workflow_options[max_width]"
|
||||
id="wp_max_width"
|
||||
name="wp_allstars_workflow_options[max_width]"
|
||||
value="<?php echo esc_attr($options['max_width']); ?>"
|
||||
min="0"
|
||||
/>
|
||||
<p class="description"><?php esc_html_e('Maximum width of uploaded images (px). Leave empty for no limit.', 'wpa-superstar'); ?></p>
|
||||
<p class="description"><?php esc_html_e('Maximum width of uploaded images (px). Leave empty for no limit.', 'wp-allstars'); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="wpa-setting-row">
|
||||
<label for="wpa_max_height"><?php esc_html_e('Max Height', 'wpa-superstar'); ?></label>
|
||||
<div class="wp-setting-row">
|
||||
<label for="wp_max_height"><?php esc_html_e('Max Height', 'wp-allstars'); ?></label>
|
||||
<input type="number"
|
||||
id="wpa_max_height"
|
||||
name="wpa_superstar_workflow_options[max_height]"
|
||||
id="wp_max_height"
|
||||
name="wp_allstars_workflow_options[max_height]"
|
||||
value="<?php echo esc_attr($options['max_height']); ?>"
|
||||
min="0"
|
||||
/>
|
||||
<p class="description"><?php esc_html_e('Maximum height of uploaded images (px). Leave empty for no limit.', 'wpa-superstar'); ?></p>
|
||||
<p class="description"><?php esc_html_e('Maximum height of uploaded images (px). Leave empty for no limit.', 'wp-allstars'); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="wpa-setting-row">
|
||||
<label for="wpa_exclude_urls"><?php esc_html_e('Exclude URLs', 'wpa-superstar'); ?></label>
|
||||
<textarea id="wpa_exclude_urls"
|
||||
name="wpa_superstar_workflow_options[exclude_urls]"
|
||||
<div class="wp-setting-row">
|
||||
<label for="wp_exclude_urls"><?php esc_html_e('Exclude URLs', 'wp-allstars'); ?></label>
|
||||
<textarea id="wp_exclude_urls"
|
||||
name="wp_allstars_workflow_options[exclude_urls]"
|
||||
rows="3"
|
||||
placeholder="example.com another-domain.com"
|
||||
><?php echo esc_textarea($options['exclude_urls']); ?></textarea>
|
||||
<p class="description"><?php esc_html_e('Enter domains to exclude (one per line). Images from these domains will not be imported.', 'wpa-superstar'); ?></p>
|
||||
<p class="description"><?php esc_html_e('Enter domains to exclude (one per line). Images from these domains will not be imported.', 'wp-allstars'); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="wpa-setting-row">
|
||||
<label for="wpa_image_name"><?php esc_html_e('Image Name Pattern', 'wpa-superstar'); ?></label>
|
||||
<div class="wp-setting-row">
|
||||
<label for="wp_image_name"><?php esc_html_e('Image Name Pattern', 'wp-allstars'); ?></label>
|
||||
<input type="text"
|
||||
id="wpa_image_name"
|
||||
name="wpa_superstar_workflow_options[image_name_pattern]"
|
||||
id="wp_image_name"
|
||||
name="wp_allstars_workflow_options[image_name_pattern]"
|
||||
value="<?php echo esc_attr($options['image_name_pattern']); ?>"
|
||||
/>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Available patterns:', 'wpa-superstar'); ?> %filename%, %post_id%, %postname%, %timestamp%, %date%, %year%, %month%, %day%
|
||||
<?php esc_html_e('Available patterns:', 'wp-allstars'); ?> %filename%, %post_id%, %postname%, %timestamp%, %date%, %year%, %month%, %day%
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="wpa-setting-row">
|
||||
<label for="wpa_image_alt"><?php esc_html_e('Image Alt Pattern', 'wpa-superstar'); ?></label>
|
||||
<div class="wp-setting-row">
|
||||
<label for="wp_image_alt"><?php esc_html_e('Image Alt Pattern', 'wp-allstars'); ?></label>
|
||||
<input type="text"
|
||||
id="wpa_image_alt"
|
||||
name="wpa_superstar_workflow_options[image_alt_pattern]"
|
||||
id="wp_image_alt"
|
||||
name="wp_allstars_workflow_options[image_alt_pattern]"
|
||||
value="<?php echo esc_attr($options['image_alt_pattern']); ?>"
|
||||
/>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Available patterns:', 'wpa-superstar'); ?> %filename%, %post_title%, %post_id%, %postname%, %timestamp%
|
||||
<?php esc_html_e('Available patterns:', 'wp-allstars'); ?> %filename%, %post_title%, %post_id%, %postname%, %timestamp%
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -602,10 +604,10 @@ function wpa_superstar_settings_page() {
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
$('.wpa-expand-settings').on('click', function(e) {
|
||||
$('.wp-expand-settings').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var $button = $(this);
|
||||
var $settings = $button.closest('.wpa-superstar-toggle').find('.wpa-toggle-settings');
|
||||
var $settings = $button.closest('.wp-allstars-toggle').find('.wp-toggle-settings');
|
||||
var isExpanded = $button.attr('aria-expanded') === 'true';
|
||||
|
||||
$button.attr('aria-expanded', !isExpanded);
|
||||
@ -642,7 +644,7 @@ function wpa_superstar_settings_page() {
|
||||
currentRequest = $.ajax({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'wpa_get_theme',
|
||||
action: 'wp_allstars_get_theme',
|
||||
_ajax_nonce: '<?php echo wp_create_nonce("updates"); ?>'
|
||||
},
|
||||
beforeSend: function() {
|
||||
@ -715,7 +717,7 @@ function wpa_superstar_settings_page() {
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'wpa_activate_theme',
|
||||
action: 'wp_allstars_activate_theme',
|
||||
theme: slug,
|
||||
_ajax_nonce: '<?php echo wp_create_nonce("updates"); ?>'
|
||||
},
|
||||
@ -763,21 +765,21 @@ function wpa_superstar_settings_page() {
|
||||
|
||||
<?php elseif ($active_tab == 'recommended'): ?>
|
||||
<div class="wpa-plugin-filters">
|
||||
<a href="?page=wpa-superstar&tab=recommended&category=minimal"
|
||||
<a href="?page=wp-allstars&tab=recommended&category=minimal"
|
||||
class="button <?php echo $active_category == 'minimal' ? 'button-primary' : ''; ?>">
|
||||
<?php esc_html_e('Minimal', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Minimal', 'wp-allstars'); ?>
|
||||
</a>
|
||||
<a href="?page=wpa-superstar&tab=recommended&category=advanced"
|
||||
<a href="?page=wp-allstars&tab=recommended&category=advanced"
|
||||
class="button <?php echo $active_category == 'advanced' ? 'button-primary' : ''; ?>">
|
||||
<?php esc_html_e('Advanced', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Advanced', 'wp-allstars'); ?>
|
||||
</a>
|
||||
<a href="?page=wpa-superstar&tab=recommended&category=ecommerce"
|
||||
<a href="?page=wp-allstars&tab=recommended&category=ecommerce"
|
||||
class="button <?php echo $active_category == 'ecommerce' ? 'button-primary' : ''; ?>">
|
||||
<?php esc_html_e('Ecommerce', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Ecommerce', 'wp-allstars'); ?>
|
||||
</a>
|
||||
<a href="?page=wpa-superstar&tab=recommended&category=lms"
|
||||
<a href="?page=wp-allstars&tab=recommended&category=lms"
|
||||
class="button <?php echo $active_category == 'lms' ? 'button-primary' : ''; ?>">
|
||||
<?php esc_html_e('LMS', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('LMS', 'wp-allstars'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -807,7 +809,7 @@ function wpa_superstar_settings_page() {
|
||||
currentRequest = $.ajax({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'wpa_get_plugins',
|
||||
action: 'wp_allstars_get_plugins',
|
||||
category: category || 'minimal',
|
||||
_ajax_nonce: '<?php echo wp_create_nonce("updates"); ?>'
|
||||
},
|
||||
@ -872,58 +874,58 @@ function wpa_superstar_settings_page() {
|
||||
</script>
|
||||
|
||||
<?php elseif ($active_tab == 'general'): ?>
|
||||
<div class="wpa-superstar-toggle">
|
||||
<label for="wpa_superstar_lazy_load">
|
||||
<div class="wpa-toggle-switch">
|
||||
<div class="wp-allstars-toggle">
|
||||
<label for="wp_allstars_lazy_load">
|
||||
<div class="wp-toggle-switch">
|
||||
<input type="checkbox"
|
||||
id="wpa_superstar_lazy_load"
|
||||
name="wpa_superstar_lazy_load"
|
||||
id="wp_allstars_lazy_load"
|
||||
name="wp_allstars_lazy_load"
|
||||
value="1"
|
||||
<?php checked(get_option('wpa_superstar_lazy_load', 1)); ?>
|
||||
<?php checked(get_option('wp_allstars_lazy_load', 1)); ?>
|
||||
/>
|
||||
<span class="wpa-toggle-slider"></span>
|
||||
<span class="wp-toggle-slider"></span>
|
||||
</div>
|
||||
<?php esc_html_e('Enable lazy loading for images', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Enable lazy loading for images', 'wp-allstars'); ?>
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Improves page load time by loading images only when they enter the viewport.', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Improves page load time by loading images only when they enter the viewport.', 'wp-allstars'); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ($active_tab == 'advanced'): ?>
|
||||
<div class="wpa-superstar-toggle">
|
||||
<label for="wpa_superstar_minify_css">
|
||||
<div class="wpa-toggle-switch">
|
||||
<div class="wp-allstars-toggle">
|
||||
<label for="wp_allstars_minify_css">
|
||||
<div class="wp-toggle-switch">
|
||||
<input type="checkbox"
|
||||
id="wpa_superstar_minify_css"
|
||||
name="wpa_superstar_minify_css"
|
||||
id="wp_allstars_minify_css"
|
||||
name="wp_allstars_minify_css"
|
||||
value="1"
|
||||
<?php checked(get_option('wpa_superstar_minify_css', 0)); ?>
|
||||
<?php checked(get_option('wp_allstars_minify_css', 0)); ?>
|
||||
/>
|
||||
<span class="wpa-toggle-slider"></span>
|
||||
<span class="wp-toggle-slider"></span>
|
||||
</div>
|
||||
<?php esc_html_e('Enable CSS minification', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Enable CSS minification', 'wp-allstars'); ?>
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Minifies CSS files to reduce file size and improve load times.', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Minifies CSS files to reduce file size and improve load times.', 'wp-allstars'); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="wpa-superstar-toggle">
|
||||
<label for="wpa_superstar_minify_js">
|
||||
<div class="wpa-toggle-switch">
|
||||
<div class="wp-allstars-toggle">
|
||||
<label for="wp_allstars_minify_js">
|
||||
<div class="wp-toggle-switch">
|
||||
<input type="checkbox"
|
||||
id="wpa_superstar_minify_js"
|
||||
name="wpa_superstar_minify_js"
|
||||
id="wp_allstars_minify_js"
|
||||
name="wp_allstars_minify_js"
|
||||
value="1"
|
||||
<?php checked(get_option('wpa_superstar_minify_js', 0)); ?>
|
||||
<?php checked(get_option('wp_allstars_minify_js', 0)); ?>
|
||||
/>
|
||||
<span class="wpa-toggle-slider"></span>
|
||||
<span class="wp-toggle-slider"></span>
|
||||
</div>
|
||||
<?php esc_html_e('Enable JS minification', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Enable JS minification', 'wp-allstars'); ?>
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Minifies JavaScript files to reduce file size and improve load times.', 'wpa-superstar'); ?>
|
||||
<?php esc_html_e('Minifies JavaScript files to reduce file size and improve load times.', 'wp-allstars'); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
Reference in New Issue
Block a user