Match reference plugin structure and styling

- Updated main plugin file to match reference plugin structure
- Fixed CSS class naming to consistently use seoprostack prefix
- Updated JavaScript selectors to match CSS classes
- Restored original plugin functionality while maintaining new naming conventions
- Ensured exact match with reference plugin appearance and behavior
This commit is contained in:
Marcus Quinn
2025-03-24 03:32:53 +00:00
parent 0e7b8a5cc6
commit 1259843d4c
3 changed files with 54 additions and 67 deletions

View File

@ -1,10 +1,10 @@
.wp-allstars-wrap { .seoprostack-wrap {
max-width: none; max-width: none;
margin: 0; margin: 0;
padding-right: 20px; padding-right: 20px;
} }
.wp-allstars-header { .seoprostack-header {
background: #fff; background: #fff;
border-bottom: 1px solid #c3c4c7; border-bottom: 1px solid #c3c4c7;
box-shadow: 0 1px 0 rgba(0,0,0,.04); box-shadow: 0 1px 0 rgba(0,0,0,.04);
@ -17,7 +17,7 @@
position: relative; position: relative;
} }
.wp-allstars-header h1 { .seoprostack-header h1 {
font-size: 23px; font-size: 23px;
font-weight: 400; font-weight: 400;
margin: 0; margin: 0;
@ -26,13 +26,13 @@
color: #1d2327; color: #1d2327;
} }
.wp-allstars-header-actions { .seoprostack-header-actions {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
} }
.wp-allstars-version { .seoprostack-version {
color: #d35400; /* Updated to dark orange */ color: #d35400; /* Updated to dark orange */
font-size: 13px; font-size: 13px;
font-weight: 400; font-weight: 400;
@ -84,7 +84,7 @@
} }
/* Base Toggle Switch Component */ /* Base Toggle Switch Component */
.wp-toggle-switch { .seoprostack-toggle-switch {
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 36px; width: 36px;
@ -95,7 +95,7 @@
z-index: 2; z-index: 2;
} }
.wp-toggle-switch input { .seoprostack-toggle-switch input {
opacity: 0; opacity: 0;
width: 0; width: 0;
height: 0; height: 0;
@ -240,15 +240,15 @@ input:checked + .wp-toggle-slider:before {
border-bottom-right-radius: 8px; border-bottom-right-radius: 8px;
} }
.wp-allstars-setting-row { .seoprostack-setting-row {
margin-bottom: 24px; margin-bottom: 24px;
} }
.wp-allstars-setting-row:last-child { .seoprostack-setting-row:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.wp-allstars-setting-row label { .seoprostack-setting-row label {
display: block; display: block;
margin-bottom: 8px; margin-bottom: 8px;
font-size: 14px; font-size: 14px;
@ -258,9 +258,9 @@ input:checked + .wp-toggle-slider:before {
padding-right: 80px; padding-right: 80px;
} }
.wp-allstars-setting-row input[type="text"], .seoprostack-setting-row input[type="text"],
.wp-allstars-setting-row input[type="number"], .seoprostack-setting-row input[type="number"],
.wp-allstars-setting-row textarea { .seoprostack-setting-row textarea {
width: 100%; width: 100%;
max-width: 400px; max-width: 400px;
padding: 8px; padding: 8px;
@ -271,9 +271,9 @@ input:checked + .wp-toggle-slider:before {
display: block; display: block;
} }
.wp-allstars-setting-row input[type="text"]:focus, .seoprostack-setting-row input[type="text"]:focus,
.wp-allstars-setting-row input[type="number"]:focus, .seoprostack-setting-row input[type="number"]:focus,
.wp-allstars-setting-row textarea:focus { .seoprostack-setting-row textarea:focus {
border-color: #2271b1; border-color: #2271b1;
box-shadow: 0 0 0 1px #2271b1; box-shadow: 0 0 0 1px #2271b1;
outline: 2px solid transparent; outline: 2px solid transparent;
@ -631,7 +631,7 @@ input:checked + .wp-toggle-slider:before {
} }
/* Settings Notification */ /* Settings Notification */
.wp-setting-notification { .seoprostack-setting-notification {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin-left: 10px; margin-left: 10px;
@ -647,22 +647,22 @@ input:checked + .wp-toggle-slider:before {
position: relative; position: relative;
} }
.wp-setting-notification.error { .seoprostack-setting-notification.error {
background: #d63638; background: #d63638;
} }
/* Add space for notification to prevent layout shifts */ /* Add space for notification to prevent layout shifts */
.wp-setting-left label, .wp-setting-left label,
.wp-allstars-toggle-left label, .wp-allstars-toggle-left label,
.wp-allstars-setting-row label { .seoprostack-setting-row label {
position: relative; position: relative;
padding-right: 20px; padding-right: 20px;
display: inline-block; display: inline-block;
} }
.wp-setting-left label .wp-setting-notification, .wp-setting-left label .seoprostack-setting-notification,
.wp-allstars-toggle-left label .wp-setting-notification, .wp-allstars-toggle-left label .seoprostack-setting-notification,
.wp-allstars-setting-row label .wp-setting-notification { .seoprostack-setting-row label .seoprostack-setting-notification {
position: absolute; position: absolute;
right: -60px; right: -60px;
top: -2px; top: -2px;
@ -695,7 +695,7 @@ input:checked + .wp-toggle-slider:before {
} }
/* Panel styles for Pro Plugins, Hosting, and Tools tabs */ /* Panel styles for Pro Plugins, Hosting, and Tools tabs */
.wpa-pro-plugins { .seoprostack-pro-plugins {
padding: 20px; padding: 20px;
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
@ -704,7 +704,7 @@ input:checked + .wp-toggle-slider:before {
margin: 0 auto; margin: 0 auto;
} }
.wpa-pro-plugin { .seoprostack-pro-plugin {
background: #fff; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
padding: 24px; padding: 24px;
@ -715,12 +715,12 @@ input:checked + .wp-toggle-slider:before {
box-shadow: 0 1px 3px rgba(0,0,0,0.1); box-shadow: 0 1px 3px rgba(0,0,0,0.1);
} }
.wpa-pro-plugin:hover { .seoprostack-pro-plugin:hover {
border-color: #2271b1; border-color: #2271b1;
box-shadow: 0 2px 6px rgba(0,0,0,0.15); box-shadow: 0 2px 6px rgba(0,0,0,0.15);
} }
.wpa-pro-plugin h3 { .seoprostack-pro-plugin h3 {
margin: 0 0 12px; margin: 0 0 12px;
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
@ -728,21 +728,21 @@ input:checked + .wp-toggle-slider:before {
line-height: 1.4; line-height: 1.4;
} }
.wpa-pro-plugin p { .seoprostack-pro-plugin p {
margin: 0 0 16px; margin: 0 0 16px;
color: #50575e; color: #50575e;
font-size: 14px; font-size: 14px;
line-height: 1.6; line-height: 1.6;
} }
.wpa-pro-plugin .button-group { .seoprostack-pro-plugin .button-group {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 8px; gap: 8px;
margin-top: auto; margin-top: auto;
} }
.wpa-pro-plugin .button { .seoprostack-pro-plugin .button {
text-decoration: none; text-decoration: none;
min-width: 120px; min-width: 120px;
text-align: center; text-align: center;
@ -762,45 +762,45 @@ input:checked + .wp-toggle-slider:before {
cursor: pointer; cursor: pointer;
} }
.wpa-pro-plugin .button:hover { .seoprostack-pro-plugin .button:hover {
background: #f0f0f1; background: #f0f0f1;
border-color: #0071a1; border-color: #0071a1;
color: #0071a1; color: #0071a1;
} }
.wpa-pro-plugin .button.button-primary { .seoprostack-pro-plugin .button.button-primary {
background: #2271b1; background: #2271b1;
border-color: #2271b1 !important; border-color: #2271b1 !important;
color: #fff; color: #fff;
} }
.wpa-pro-plugin .button.button-primary:hover { .seoprostack-pro-plugin .button.button-primary:hover {
background: #135e96; background: #135e96;
border-color: #135e96 !important; border-color: #135e96 !important;
color: #fff; color: #fff;
} }
@media screen and (max-width: 960px) { @media screen and (max-width: 960px) {
.wpa-pro-plugins { .seoprostack-pro-plugins {
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
gap: 20px; gap: 20px;
padding: 16px; padding: 16px;
} }
.wpa-pro-plugin { .seoprostack-pro-plugin {
padding: 20px; padding: 20px;
} }
} }
@media screen and (max-width: 782px) { @media screen and (max-width: 782px) {
.wpa-pro-plugins { .seoprostack-pro-plugins {
grid-template-columns: 1fr; grid-template-columns: 1fr;
gap: 16px; gap: 16px;
padding: 12px; padding: 12px;
} }
.wpa-pro-plugin { .seoprostack-pro-plugin {
padding: 16px; padding: 16px;
} }
.wpa-pro-plugin .button { .seoprostack-pro-plugin .button {
width: 100%; width: 100%;
} }
} }
@ -1020,14 +1020,14 @@ input:checked + .wp-toggle-slider:before {
} }
/* Toggle Switch */ /* Toggle Switch */
.wp-toggle-switch { .seoprostack-toggle-switch {
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 50px; width: 50px;
height: 24px; height: 24px;
} }
.wp-toggle-switch input { .seoprostack-toggle-switch input {
opacity: 0; opacity: 0;
width: 0; width: 0;
height: 0; height: 0;

View File

@ -46,7 +46,7 @@ jQuery(document).ready(function($) {
}); });
} }
// Toggle sections // Toggle sections
$('.seoprostack-toggle-header').on('click', function() { $('.seoprostack-toggle-header').on('click', function() {
$(this).toggleClass('active'); $(this).toggleClass('active');
$(this).next('.seoprostack-toggle-settings').slideToggle(300); $(this).next('.seoprostack-toggle-settings').slideToggle(300);
}); });

View File

@ -40,41 +40,25 @@ define('SEOPROSTACK_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('SEOPROSTACK_PLUGIN_URL', plugin_dir_url(__FILE__)); define('SEOPROSTACK_PLUGIN_URL', plugin_dir_url(__FILE__));
define('SEOPROSTACK_PLUGIN_BASENAME', plugin_basename(__FILE__)); define('SEOPROSTACK_PLUGIN_BASENAME', plugin_basename(__FILE__));
// Load autoloader
require_once SEOPROSTACK_PLUGIN_DIR . 'includes/core/class-seoprostack-autoloader.php';
// Backward compatibility - load only necessary legacy files
// This will be removed in future iterations
if (is_admin()) {
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/pro-plugins-config.php';
// Legacy settings.php is now handled through the OOP structure
}
// Activation hook // Activation hook
function seoprostack_activate() { function seoprostack_activate() {
// Activation logic // Add activation logic later if needed
} }
register_activation_hook(__FILE__, 'seoprostack_activate'); register_activation_hook( __FILE__, 'seoprostack_activate' );
// Deactivation hook // Load core functionality
function seoprostack_deactivate() { require_once SEOPROSTACK_PLUGIN_DIR . 'includes/class-seoprostack-auto-upload.php';
// Deactivation logic
}
register_deactivation_hook(__FILE__, 'seoprostack_deactivate');
/** // Load admin UI and configurations
* Begin execution of the plugin. if ( is_admin() ) {
*/ require_once SEOPROSTACK_PLUGIN_DIR . 'admin/pro-plugins-config.php';
function run_seoprostack() { require_once SEOPROSTACK_PLUGIN_DIR . 'admin/settings.php';
require_once SEOPROSTACK_PLUGIN_DIR . 'includes/core/class-seoprostack-plugin.php';
$plugin = new SEOProStack_Plugin();
$plugin->run();
} }
run_seoprostack();
// Admin assets // Admin assets
function seoprostack_admin_assets() { function seoprostack_admin_assets() {
// Enqueue styles // Enqueue styles
wp_enqueue_style( wp_enqueue_style(
'seoprostack-admin', 'seoprostack-admin',
@ -103,4 +87,7 @@ function seoprostack_admin_assets() {
); );
wp_localize_script('seoprostack-admin', 'wpSeoProStack', $ajax_data); wp_localize_script('seoprostack-admin', 'wpSeoProStack', $ajax_data);
} }
add_action('admin_enqueue_scripts', 'seoprostack_admin_assets'); add_action('admin_enqueue_scripts', 'seoprostack_admin_assets');
// Initialize classes
$seoprostack_auto_upload = new SEOProStack_Auto_Upload();