Compare commits
10 Commits
918d19085a
...
84525b07b9
Author | SHA1 | Date | |
---|---|---|---|
84525b07b9 | |||
4cf485041f | |||
a7537a000c | |||
3cf5f63174 | |||
a6fef6200f | |||
1259843d4c | |||
0e7b8a5cc6 | |||
6fc054f2bf | |||
7f4ea3ec0c | |||
f2929bb43a |
@ -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,14 +26,14 @@
|
|||||||
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: #646970; /* Neutral gray color */
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@ -42,12 +42,15 @@
|
|||||||
.nav-tab-wrapper,
|
.nav-tab-wrapper,
|
||||||
.wrap h2.nav-tab-wrapper {
|
.wrap h2.nav-tab-wrapper {
|
||||||
border-bottom: 1px solid #c3c4c7;
|
border-bottom: 1px solid #c3c4c7;
|
||||||
margin: 0 -20px;
|
margin: 15px -20px 0;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 32px;
|
top: 32px;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
display: flex;
|
||||||
|
overflow-x: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab {
|
.nav-tab {
|
||||||
@ -64,6 +67,9 @@
|
|||||||
border-bottom: 2px solid transparent;
|
border-bottom: 2px solid transparent;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
|
position: relative;
|
||||||
|
outline: none;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab:hover,
|
.nav-tab:hover,
|
||||||
@ -83,8 +89,32 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tab content container */
|
||||||
|
.tab-content {
|
||||||
|
padding: 20px 0;
|
||||||
|
animation: fadeIn 0.3s ease-in-out;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure tab content containers don't have a background color */
|
||||||
|
.seoprostack-settings-content {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make sure toggle containers have background */
|
||||||
|
.seoprostack-toggle, .seoprostack-setting-base, .seoprostack-setting-row {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #c3c4c7;
|
||||||
|
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
/* 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 +125,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;
|
||||||
@ -104,7 +134,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-toggle-slider {
|
.seoprostack-toggle-slider {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -116,7 +146,7 @@
|
|||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-toggle-slider:before {
|
.seoprostack-toggle-slider:before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: "";
|
content: "";
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@ -129,27 +159,27 @@
|
|||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked + .wp-toggle-slider {
|
input:checked + .seoprostack-toggle-slider {
|
||||||
background-color: #2271b1;
|
background-color: #2271b1;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked + .wp-toggle-slider:before {
|
input:checked + .seoprostack-toggle-slider:before {
|
||||||
transform: translateX(16px);
|
transform: translateX(16px);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Base Setting Styles (Shared between simple and expandable) */
|
/* Base Setting Styles (Shared between simple and expandable) */
|
||||||
.wp-setting-base,
|
.seoprostack-setting-base,
|
||||||
.wp-setting-row,
|
.seoprostack-setting-row,
|
||||||
.wp-allstars-toggle {
|
.seoprostack-toggle {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-setting-base:hover,
|
.seoprostack-setting-base:hover,
|
||||||
.wp-setting-row:hover,
|
.seoprostack-setting-row:hover,
|
||||||
.wp-allstars-toggle:hover {
|
.seoprostack-toggle: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);
|
||||||
}
|
}
|
||||||
@ -240,15 +270,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 +288,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 +301,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 +661,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 +677,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 +725,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 +734,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 +745,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 +758,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 +792,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%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -865,12 +895,15 @@ input:checked + .wp-toggle-slider:before {
|
|||||||
.nav-tab-wrapper,
|
.nav-tab-wrapper,
|
||||||
.wrap h2.nav-tab-wrapper {
|
.wrap h2.nav-tab-wrapper {
|
||||||
border-bottom: 1px solid #c3c4c7;
|
border-bottom: 1px solid #c3c4c7;
|
||||||
margin: 0 -20px;
|
margin: 15px -20px 0;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 32px;
|
top: 32px;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
display: flex;
|
||||||
|
overflow-x: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab {
|
.nav-tab {
|
||||||
@ -903,10 +936,10 @@ input:checked + .wp-toggle-slider:before {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.seoprostack-settings-content {
|
.seoprostack-settings-content {
|
||||||
background: #fff;
|
background: transparent;
|
||||||
border: 1px solid #c3c4c7;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 0;
|
||||||
padding: 20px;
|
padding: 0;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1020,14 +1053,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;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Plugin Browser Styles */
|
/* Plugin Browser Styles */
|
||||||
.wp-allstars-wrap .wp-allstars-plugin-browser {
|
.seoprostack-wrap .seoprostack-plugin-browser {
|
||||||
margin: 0 -8px !important;
|
margin: 0 -8px !important;
|
||||||
padding: 0 8px !important;
|
padding: 0 8px !important;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
@ -7,7 +7,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Plugin List Container */
|
/* Plugin List Container */
|
||||||
.wp-allstars-wrap #wpa-plugin-list {
|
.seoprostack-wrap #seoprostack-plugin-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -15,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Filter Bar */
|
/* Filter Bar */
|
||||||
.wp-allstars-wrap #wpa-plugin-filters.wp-filter {
|
.seoprostack-wrap #seoprostack-plugin-filters.wp-filter {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -23,13 +23,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Standard WordPress Plugin Grid Layout - exactly matching core */
|
/* Standard WordPress Plugin Grid Layout - exactly matching core */
|
||||||
.wp-allstars-wrap .wp-list-table.plugin-install {
|
.seoprostack-wrap .wp-list-table.plugin-install {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
clear: both;
|
clear: both;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-allstars-wrap #the-list {
|
.seoprostack-wrap #the-list {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
@ -1,74 +1,114 @@
|
|||||||
/**
|
// Define loadTheme in the global scope so it can be called from inline scripts
|
||||||
* SEO Pro Stack Admin JavaScript
|
var loadTheme;
|
||||||
*/
|
|
||||||
(function($) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
jQuery(document).ready(function($) {
|
||||||
// Toggle sections
|
// Function to show notification
|
||||||
$('.seoprostack-toggle-header').on('click', function() {
|
function showNotification(message, $element, isError = false) {
|
||||||
$(this).toggleClass('active');
|
// Remove any existing notifications
|
||||||
$(this).next('.seoprostack-toggle-settings').slideToggle(300);
|
$('.seoprostack-setting-notification').remove();
|
||||||
|
|
||||||
|
// Create notification element
|
||||||
|
var $notification = $('<span class="seoprostack-setting-notification' + (isError ? ' error' : '') + '">' + message + '</span>');
|
||||||
|
|
||||||
|
// If element is provided, show notification next to it
|
||||||
|
if ($element && $element.length) {
|
||||||
|
$element.after($notification);
|
||||||
|
} else {
|
||||||
|
// Fallback to header if no element provided
|
||||||
|
$('.seoprostack-header h1').after($notification);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fade out after delay
|
||||||
|
setTimeout(function() {
|
||||||
|
$notification.fadeOut(300, function() {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle option updates
|
||||||
|
function updateOption(option, value) {
|
||||||
|
return $.ajax({
|
||||||
|
url: wpSeoProStack.ajaxurl,
|
||||||
|
type: 'POST',
|
||||||
|
data: {
|
||||||
|
action: 'wp_seoprostack_update_option',
|
||||||
|
option: option,
|
||||||
|
value: value,
|
||||||
|
nonce: wpSeoProStack.nonce
|
||||||
|
}
|
||||||
|
}).then(function(response) {
|
||||||
|
if (!response.success) {
|
||||||
|
throw new Error(response.data || 'Error saving setting');
|
||||||
|
}
|
||||||
|
return response;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
// Toggle sections
|
||||||
|
$('.seoprostack-toggle-header').on('click', function() {
|
||||||
|
$(this).toggleClass('active');
|
||||||
|
$(this).next('.seoprostack-toggle-settings').slideToggle(300);
|
||||||
|
});
|
||||||
|
|
||||||
// Tabs functionality (if not using WP default tabs)
|
// Tabs functionality (if not using WP default tabs)
|
||||||
$('.seoprostack-tab-nav a').on('click', function(e) {
|
$('.seoprostack-tab-nav a').on('click', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var targetTab = $(this).attr('href').substring(1);
|
||||||
|
|
||||||
|
// Update active tab
|
||||||
|
$('.seoprostack-tab-nav a').removeClass('active');
|
||||||
|
$(this).addClass('active');
|
||||||
|
|
||||||
|
// Show target tab content
|
||||||
|
$('.seoprostack-tab-content').hide();
|
||||||
|
$('#' + targetTab).show();
|
||||||
|
|
||||||
|
// Update URL without refreshing
|
||||||
|
if (history.pushState) {
|
||||||
|
var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?page=seoprostack&tab=' + targetTab;
|
||||||
|
window.history.pushState({path: newUrl}, '', newUrl);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Pro Plugins Tab
|
||||||
|
if ($('#pro-plugins').length) {
|
||||||
|
// Category filter
|
||||||
|
$('.seoprostack-category-filter a').on('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var targetTab = $(this).attr('href').substring(1);
|
|
||||||
|
|
||||||
// Update active tab
|
var category = $(this).data('category');
|
||||||
$('.seoprostack-tab-nav a').removeClass('active');
|
|
||||||
|
// Update active filter
|
||||||
|
$('.seoprostack-category-filter a').removeClass('active');
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
|
|
||||||
// Show target tab content
|
// Show loading
|
||||||
$('.seoprostack-tab-content').hide();
|
$('#seoprostack-plugins-grid').addClass('loading');
|
||||||
$('#' + targetTab).show();
|
|
||||||
|
|
||||||
// Update URL without refreshing
|
// Load plugins
|
||||||
if (history.pushState) {
|
$.ajax({
|
||||||
var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?page=seoprostack&tab=' + targetTab;
|
url: wpSeoProStack.ajaxurl,
|
||||||
window.history.pushState({path: newUrl}, '', newUrl);
|
type: 'POST',
|
||||||
}
|
data: {
|
||||||
});
|
action: 'wp_seoprostack_get_plugins',
|
||||||
|
category: category,
|
||||||
|
nonce: wpSeoProStack.nonce
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
$('#seoprostack-plugins-grid').removeClass('loading');
|
||||||
|
|
||||||
// Pro Plugins Tab
|
if (response.success) {
|
||||||
if ($('#pro-plugins').length) {
|
renderPlugins(response.data.plugins);
|
||||||
// Category filter
|
} else {
|
||||||
$('.seoprostack-category-filter a').on('click', function(e) {
|
$('#seoprostack-plugins-grid').html('<div class="seoprostack-notice seoprostack-notice-error">' + response.data.message + '</div>');
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
var category = $(this).data('category');
|
|
||||||
|
|
||||||
// Update active filter
|
|
||||||
$('.seoprostack-category-filter a').removeClass('active');
|
|
||||||
$(this).addClass('active');
|
|
||||||
|
|
||||||
// Show loading
|
|
||||||
$('#seoprostack-plugins-grid').addClass('loading');
|
|
||||||
|
|
||||||
// Load plugins
|
|
||||||
$.ajax({
|
|
||||||
url: seoProStack.ajaxurl,
|
|
||||||
type: 'POST',
|
|
||||||
data: {
|
|
||||||
action: 'seoprostack_get_pro_plugins',
|
|
||||||
category: category,
|
|
||||||
nonce: seoProStack.nonce
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
$('#seoprostack-plugins-grid').removeClass('loading');
|
|
||||||
|
|
||||||
if (response.success) {
|
|
||||||
renderPlugins(response.data.plugins);
|
|
||||||
} else {
|
|
||||||
$('#seoprostack-plugins-grid').html('<div class="seoprostack-notice seoprostack-notice-error">' + response.data.message + '</div>');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function() {
|
|
||||||
$('#seoprostack-plugins-grid').removeClass('loading');
|
|
||||||
$('#seoprostack-plugins-grid').html('<div class="seoprostack-notice seoprostack-notice-error">Error connecting to server</div>');
|
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
error: function() {
|
||||||
|
$('#seoprostack-plugins-grid').removeClass('loading');
|
||||||
|
$('#seoprostack-plugins-grid').html('<div class="seoprostack-notice seoprostack-notice-error">Error connecting to server</div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Activate plugin
|
// Activate plugin
|
||||||
@ -84,12 +124,12 @@
|
|||||||
|
|
||||||
// Send activation request
|
// Send activation request
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: seoProStack.ajaxurl,
|
url: wpSeoProStack.ajaxurl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: {
|
||||||
action: 'seoprostack_activate_plugin',
|
action: 'wp_seoprostack_activate_plugin',
|
||||||
plugin: plugin,
|
plugin: plugin,
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
@ -167,8 +207,8 @@
|
|||||||
// Get form data
|
// Get form data
|
||||||
var formData = $form.serializeArray();
|
var formData = $form.serializeArray();
|
||||||
var data = {
|
var data = {
|
||||||
action: 'seoprostack_save_advanced_settings',
|
action: 'wp_seoprostack_save_advanced_settings',
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert form data to proper format
|
// Convert form data to proper format
|
||||||
@ -230,11 +270,11 @@
|
|||||||
|
|
||||||
// Send AJAX request
|
// Send AJAX request
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: seoProStack.ajaxurl,
|
url: wpSeoProStack.ajaxurl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: {
|
||||||
action: 'seoprostack_optimize_database',
|
action: 'wp_seoprostack_optimize_database',
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
// Hide loading
|
// Hide loading
|
||||||
@ -302,11 +342,11 @@
|
|||||||
|
|
||||||
// Send AJAX request
|
// Send AJAX request
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: seoProStack.ajaxurl,
|
url: wpSeoProStack.ajaxurl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: {
|
||||||
action: 'seoprostack_generate_robots',
|
action: 'wp_seoprostack_generate_robots',
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
// Hide loading
|
// Hide loading
|
||||||
@ -360,5 +400,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
})(jQuery);
|
|
@ -9,7 +9,7 @@ function wp_seoprostack_admin_menu() {
|
|||||||
'SEO Pro Stack Settings',
|
'SEO Pro Stack Settings',
|
||||||
'SEO Pro Stack',
|
'SEO Pro Stack',
|
||||||
'manage_options',
|
'manage_options',
|
||||||
'wp-allstars',
|
'seoprostack',
|
||||||
'wp_seoprostack_settings_page'
|
'wp_seoprostack_settings_page'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ add_action('admin_init', 'wp_seoprostack_register_settings');
|
|||||||
|
|
||||||
// AJAX handler for settings
|
// AJAX handler for settings
|
||||||
function wp_seoprostack_update_option() {
|
function wp_seoprostack_update_option() {
|
||||||
check_ajax_referer('wp-seoprostack-nonce', 'nonce');
|
check_ajax_referer('seoprostack-nonce', 'nonce');
|
||||||
$option = sanitize_text_field($_POST['option']);
|
$option = sanitize_text_field($_POST['option']);
|
||||||
$value = intval($_POST['value']);
|
$value = intval($_POST['value']);
|
||||||
update_option($option, $value);
|
update_option($option, $value);
|
||||||
@ -1393,16 +1393,16 @@ function wp_seoprostack_settings_page() {
|
|||||||
wp_enqueue_script('plugin-install');
|
wp_enqueue_script('plugin-install');
|
||||||
wp_enqueue_script('updates');
|
wp_enqueue_script('updates');
|
||||||
add_thickbox();
|
add_thickbox();
|
||||||
wp_enqueue_style('wp-allstars-admin', plugins_url('css/wp-allstars-admin.css', __FILE__));
|
wp_enqueue_style('seoprostack-admin', SEOPROSTACK_PLUGIN_URL . 'admin/css/seoprostack-admin.css', array(), SEOPROSTACK_VERSION);
|
||||||
wp_enqueue_style('wp-allstars-plugins', plugins_url('css/wp-allstars-plugins.css', __FILE__));
|
wp_enqueue_style('seoprostack-plugins', SEOPROSTACK_PLUGIN_URL . 'admin/css/seoprostack-admin.css', array(), SEOPROSTACK_VERSION);
|
||||||
|
|
||||||
// Add inline script to load plugins on page load
|
// Add inline script to load plugins on page load
|
||||||
wp_add_inline_script('wp-allstars-admin', '
|
wp_add_inline_script('seoprostack-admin', '
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
if ($("#wpa-plugin-list").length && $("#wpa-plugin-list").is(":empty")) {
|
if ($("#seoprostack-plugin-list").length && $("#seoprostack-plugin-list").is(":empty")) {
|
||||||
var category = "' . esc_js($active_category) . '";
|
var category = "' . esc_js($active_category) . '";
|
||||||
var $container = $("#wpa-plugin-list");
|
var $container = $("#seoprostack-plugin-list");
|
||||||
var $loadingOverlay = $("<div class=\"wp-allstars-loading-overlay\"><span class=\"spinner is-active\"></span></div>");
|
var $loadingOverlay = $("<div class=\"seoprostack-loading-overlay\"><span class=\"spinner is-active\"></span></div>");
|
||||||
|
|
||||||
// Show loading overlay
|
// Show loading overlay
|
||||||
$container.css("position", "relative").append($loadingOverlay);
|
$container.css("position", "relative").append($loadingOverlay);
|
||||||
@ -1445,15 +1445,15 @@ function wp_seoprostack_settings_page() {
|
|||||||
wp_enqueue_script('theme-install');
|
wp_enqueue_script('theme-install');
|
||||||
wp_enqueue_script('updates');
|
wp_enqueue_script('updates');
|
||||||
add_thickbox();
|
add_thickbox();
|
||||||
wp_enqueue_style('wp-allstars-admin', plugins_url('css/wp-allstars-admin.css', __FILE__));
|
wp_enqueue_style('seoprostack-admin', SEOPROSTACK_PLUGIN_URL . 'admin/css/seoprostack-admin.css', array(), SEOPROSTACK_VERSION);
|
||||||
wp_enqueue_style('wp-allstars-plugins', plugins_url('css/wp-allstars-plugins.css', __FILE__));
|
wp_enqueue_style('seoprostack-plugins', SEOPROSTACK_PLUGIN_URL . 'admin/css/seoprostack-admin.css', array(), SEOPROSTACK_VERSION);
|
||||||
|
|
||||||
// Add inline script to load themes directly - same approach as plugins tab
|
// Add inline script to load themes directly - same approach as plugins tab
|
||||||
wp_add_inline_script('wp-allstars-admin', '
|
wp_add_inline_script('seoprostack-admin', '
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
if ($("#wpa-theme-list").length && $("#wpa-theme-list").is(":empty")) {
|
if ($("#seoprostack-theme-list").length && $("#seoprostack-theme-list").is(":empty")) {
|
||||||
var $container = $("#wpa-theme-list");
|
var $container = $("#seoprostack-theme-list");
|
||||||
var $loadingOverlay = $("<div class=\"wp-allstars-loading-overlay\"><span class=\"spinner is-active\"></span></div>");
|
var $loadingOverlay = $("<div class=\"seoprostack-loading-overlay\"><span class=\"spinner is-active\"></span></div>");
|
||||||
|
|
||||||
// Show loading overlay
|
// Show loading overlay
|
||||||
$container.css("position", "relative").append($loadingOverlay);
|
$container.css("position", "relative").append($loadingOverlay);
|
||||||
@ -1489,123 +1489,123 @@ function wp_seoprostack_settings_page() {
|
|||||||
');
|
');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="wrap wp-allstars-wrap">
|
<div class="wrap seoprostack-wrap">
|
||||||
<div class="wp-allstars-header">
|
<div class="seoprostack-header">
|
||||||
<h1><?php echo esc_html(get_admin_page_title()); ?></h1>
|
<h1><?php echo esc_html(get_admin_page_title()); ?></h1>
|
||||||
<div class="wp-allstars-header-actions">
|
<div class="seoprostack-header-actions">
|
||||||
<span class="wp-allstars-version">Version <?php echo esc_html(WP_ALLSTARS_VERSION); ?></span>
|
<span class="seoprostack-version">Version <?php echo esc_html(SEOPROSTACK_VERSION); ?></span>
|
||||||
<a href="https://www.wpallstars.com/" target="_blank" class="button button-secondary">
|
<a href="https://www.wpseoprostack.com/" target="_blank" class="button button-secondary">
|
||||||
<?php esc_html_e('Documentation', 'wp-allstars'); ?>
|
<?php esc_html_e('Documentation', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wpa-settings-container">
|
<div class="seoprostack-settings-container">
|
||||||
<div class="wp-allstars-nav">
|
<div class="seoprostack-nav">
|
||||||
<h2 class="nav-tab-wrapper">
|
<h2 class="nav-tab-wrapper">
|
||||||
<a href="?page=wp-allstars&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>">
|
<a href="?page=seoprostack&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>">
|
||||||
<?php esc_html_e('General', 'wp-allstars'); ?>
|
<?php esc_html_e('General', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="?page=wp-allstars&tab=advanced" class="nav-tab <?php echo $active_tab == 'advanced' ? 'nav-tab-active' : ''; ?>">
|
<a href="?page=seoprostack&tab=advanced" class="nav-tab <?php echo $active_tab == 'advanced' ? 'nav-tab-active' : ''; ?>">
|
||||||
<?php esc_html_e('Advanced', 'wp-allstars'); ?>
|
<?php esc_html_e('Advanced', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="?page=wp-allstars&tab=workflow" class="nav-tab <?php echo $active_tab == 'workflow' ? 'nav-tab-active' : ''; ?>">
|
<a href="?page=seoprostack&tab=workflow" class="nav-tab <?php echo $active_tab == 'workflow' ? 'nav-tab-active' : ''; ?>">
|
||||||
<?php esc_html_e('Workflow', 'wp-allstars'); ?>
|
<?php esc_html_e('Workflow', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="?page=wp-allstars&tab=recommended" class="nav-tab <?php echo $active_tab == 'recommended' ? 'nav-tab-active' : ''; ?>">
|
<a href="?page=seoprostack&tab=recommended" class="nav-tab <?php echo $active_tab == 'recommended' ? 'nav-tab-active' : ''; ?>">
|
||||||
<?php esc_html_e('Free Plugins', 'wp-allstars'); ?>
|
<?php esc_html_e('Free Plugins', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="?page=wp-allstars&tab=pro" class="nav-tab <?php echo $active_tab == 'pro' ? 'nav-tab-active' : ''; ?>">
|
<a href="?page=seoprostack&tab=pro" class="nav-tab <?php echo $active_tab == 'pro' ? 'nav-tab-active' : ''; ?>">
|
||||||
<?php esc_html_e('Pro Plugins', 'wp-allstars'); ?>
|
<?php esc_html_e('Pro Plugins', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="?page=wp-allstars&tab=theme" class="nav-tab <?php echo $active_tab == 'theme' ? 'nav-tab-active' : ''; ?>">
|
<a href="?page=seoprostack&tab=theme" class="nav-tab <?php echo $active_tab == 'theme' ? 'nav-tab-active' : ''; ?>">
|
||||||
<?php esc_html_e('Theme', 'wp-allstars'); ?>
|
<?php esc_html_e('Theme', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="?page=wp-allstars&tab=hosting" class="nav-tab <?php echo $active_tab == 'hosting' ? 'nav-tab-active' : ''; ?>">
|
<a href="?page=seoprostack&tab=hosting" class="nav-tab <?php echo $active_tab == 'hosting' ? 'nav-tab-active' : ''; ?>">
|
||||||
<?php esc_html_e('Hosting', 'wp-allstars'); ?>
|
<?php esc_html_e('Hosting', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="?page=wp-allstars&tab=tools" class="nav-tab <?php echo $active_tab == 'tools' ? 'nav-tab-active' : ''; ?>">
|
<a href="?page=seoprostack&tab=tools" class="nav-tab <?php echo $active_tab == 'tools' ? 'nav-tab-active' : ''; ?>">
|
||||||
<?php esc_html_e('Tools', 'wp-allstars'); ?>
|
<?php esc_html_e('Tools', 'seoprostack'); ?>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wpa-settings-content">
|
<div class="seoprostack-settings-content">
|
||||||
<?php if ($active_tab == 'workflow'): ?>
|
<?php if ($active_tab == 'workflow'): ?>
|
||||||
<div class="wp-allstars-settings-content tab-content" id="workflow">
|
<div class="tab-content" id="workflow">
|
||||||
<div class="wp-allstars-toggle">
|
<div class="seoprostack-toggle">
|
||||||
<div class="wp-allstars-toggle-header" aria-expanded="false">
|
<div class="seoprostack-toggle-header" aria-expanded="false">
|
||||||
<div class="wp-allstars-toggle-main">
|
<div class="seoprostack-toggle-main">
|
||||||
<div class="wp-allstars-toggle-left">
|
<div class="seoprostack-toggle-left">
|
||||||
<div class="wp-toggle-switch">
|
<div class="seoprostack-toggle-switch">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="wp_seoprostack_auto_upload_images"
|
id="wp_seoprostack_auto_upload_images"
|
||||||
name="wp_seoprostack_auto_upload_images"
|
name="wp_seoprostack_auto_upload_images"
|
||||||
value="1"
|
value="1"
|
||||||
<?php checked(get_option('wp_seoprostack_auto_upload_images', get_option('wp_allstars_auto_upload_images', false))); ?>
|
<?php checked(get_option('wp_seoprostack_auto_upload_images', get_option('wp_allstars_auto_upload_images', false))); ?>
|
||||||
/>
|
/>
|
||||||
<span class="wp-toggle-slider"></span>
|
<span class="seoprostack-toggle-slider"></span>
|
||||||
</div>
|
</div>
|
||||||
<label for="wp_seoprostack_auto_upload_images">
|
<label for="wp_seoprostack_auto_upload_images">
|
||||||
<?php esc_html_e('Enable Auto Upload Images', 'wp-allstars'); ?>
|
<?php esc_html_e('Enable Auto Upload Images', 'seoprostack'); ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="wp-setting-description">
|
<p class="seoprostack-setting-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.', 'wp-allstars'); ?>
|
<?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.', 'seoprostack'); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="wp-allstars-toggle-settings">
|
<div class="seoprostack-toggle-settings">
|
||||||
<div class="wp-allstars-setting-row">
|
<div class="seoprostack-setting-row">
|
||||||
<label for="wp_seoprostack_max_width"><?php esc_html_e('Max Width', 'wp-allstars'); ?></label>
|
<label for="wp_seoprostack_max_width"><?php esc_html_e('Max Width', 'seoprostack'); ?></label>
|
||||||
<input type="number"
|
<input type="number"
|
||||||
id="wp_seoprostack_max_width"
|
id="wp_seoprostack_max_width"
|
||||||
name="wp_seoprostack_max_width"
|
name="wp_seoprostack_max_width"
|
||||||
value="<?php echo esc_attr(get_option('wp_seoprostack_max_width', get_option('wp_allstars_max_width', 2560))); ?>"
|
value="<?php echo esc_attr(get_option('wp_seoprostack_max_width', get_option('wp_allstars_max_width', 2560))); ?>"
|
||||||
/>
|
/>
|
||||||
<p class="description"><?php esc_html_e('Maximum width for uploaded images in pixels.', 'wp-allstars'); ?></p>
|
<p class="description"><?php esc_html_e('Maximum width for uploaded images in pixels.', 'seoprostack'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="wp-allstars-setting-row">
|
<div class="seoprostack-setting-row">
|
||||||
<label for="wp_seoprostack_max_height"><?php esc_html_e('Max Height', 'wp-allstars'); ?></label>
|
<label for="wp_seoprostack_max_height"><?php esc_html_e('Max Height', 'seoprostack'); ?></label>
|
||||||
<input type="number"
|
<input type="number"
|
||||||
id="wp_seoprostack_max_height"
|
id="wp_seoprostack_max_height"
|
||||||
name="wp_seoprostack_max_height"
|
name="wp_seoprostack_max_height"
|
||||||
value="<?php echo esc_attr(get_option('wp_seoprostack_max_height', get_option('wp_allstars_max_height', 2560))); ?>"
|
value="<?php echo esc_attr(get_option('wp_seoprostack_max_height', get_option('wp_allstars_max_height', 2560))); ?>"
|
||||||
/>
|
/>
|
||||||
<p class="description"><?php esc_html_e('Maximum height for uploaded images in pixels.', 'wp-allstars'); ?></p>
|
<p class="description"><?php esc_html_e('Maximum height for uploaded images in pixels.', 'seoprostack'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wp-allstars-setting-row">
|
<div class="seoprostack-setting-row">
|
||||||
<label for="wp_seoprostack_exclude_urls"><?php esc_html_e('Exclude URLs', 'wp-allstars'); ?></label>
|
<label for="wp_seoprostack_exclude_urls"><?php esc_html_e('Exclude URLs', 'seoprostack'); ?></label>
|
||||||
<textarea id="wp_seoprostack_exclude_urls"
|
<textarea id="wp_seoprostack_exclude_urls"
|
||||||
name="wp_seoprostack_exclude_urls"
|
name="wp_seoprostack_exclude_urls"
|
||||||
rows="3"
|
rows="3"
|
||||||
placeholder="example.com another-domain.com"
|
placeholder="example.com another-domain.com"
|
||||||
><?php echo esc_textarea(get_option('wp_seoprostack_exclude_urls', get_option('wp_allstars_exclude_urls', ''))); ?></textarea>
|
><?php echo esc_textarea(get_option('wp_seoprostack_exclude_urls', get_option('wp_allstars_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.', 'wp-allstars'); ?></p>
|
<p class="description"><?php esc_html_e('Enter domains to exclude (one per line). Images from these domains will not be imported.', 'seoprostack'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wp-allstars-setting-row">
|
<div class="seoprostack-setting-row">
|
||||||
<label for="wp_seoprostack_image_name"><?php esc_html_e('Image Name Pattern', 'wp-allstars'); ?></label>
|
<label for="wp_seoprostack_image_name"><?php esc_html_e('Image Name Pattern', 'seoprostack'); ?></label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
id="wp_seoprostack_image_name"
|
id="wp_seoprostack_image_name"
|
||||||
name="wp_seoprostack_image_name"
|
name="wp_seoprostack_image_name"
|
||||||
value="<?php echo esc_attr(get_option('wp_seoprostack_image_name_pattern', get_option('wp_allstars_image_name_pattern', '%filename%'))); ?>"
|
value="<?php echo esc_attr(get_option('wp_seoprostack_image_name_pattern', get_option('wp_allstars_image_name_pattern', '%filename%'))); ?>"
|
||||||
/>
|
/>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
<?php esc_html_e('Available patterns:', 'wp-allstars'); ?> %filename%, %post_id%, %postname%, %timestamp%, %date%, %year%, %month%, %day%
|
<?php esc_html_e('Available patterns:', 'seoprostack'); ?> %filename%, %post_id%, %postname%, %timestamp%, %date%, %year%, %month%, %day%
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wp-allstars-setting-row">
|
<div class="seoprostack-setting-row">
|
||||||
<label for="wp_seoprostack_image_alt"><?php esc_html_e('Image Alt Pattern', 'wp-allstars'); ?></label>
|
<label for="wp_seoprostack_image_alt"><?php esc_html_e('Image Alt Pattern', 'seoprostack'); ?></label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
id="wp_seoprostack_image_alt"
|
id="wp_seoprostack_image_alt"
|
||||||
name="wp_seoprostack_image_alt"
|
name="wp_seoprostack_image_alt"
|
||||||
value="<?php echo esc_attr(get_option('wp_seoprostack_image_alt_pattern', get_option('wp_allstars_image_alt_pattern', '%filename%'))); ?>"
|
value="<?php echo esc_attr(get_option('wp_seoprostack_image_alt_pattern', get_option('wp_allstars_image_alt_pattern', '%filename%'))); ?>"
|
||||||
/>
|
/>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
<?php esc_html_e('Available patterns:', 'wp-allstars'); ?> %filename%, %post_title%, %post_id%, %postname%, %timestamp%
|
<?php esc_html_e('Available patterns:', 'seoprostack'); ?> %filename%, %post_title%, %post_id%, %postname%, %timestamp%
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1615,7 +1615,7 @@ function wp_seoprostack_settings_page() {
|
|||||||
<?php elseif ($active_tab == 'theme'): ?>
|
<?php elseif ($active_tab == 'theme'): ?>
|
||||||
<div class="tab-content" id="theme">
|
<div class="tab-content" id="theme">
|
||||||
<style>
|
<style>
|
||||||
#wpa-theme-list {
|
#seoprostack-theme-list {
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@ -1714,7 +1714,7 @@ function wp_seoprostack_settings_page() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="wpa-theme-list"></div>
|
<div id="seoprostack-theme-list"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php elseif ($active_tab == 'hosting'): ?>
|
<?php elseif ($active_tab == 'hosting'): ?>
|
||||||
<div class="tab-content" id="hosting">
|
<div class="tab-content" id="hosting">
|
||||||
@ -1800,8 +1800,8 @@ function wp_seoprostack_settings_page() {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wp-allstars-plugin-browser">
|
<div class="seoprostack-plugin-browser">
|
||||||
<div id="wpa-plugin-list"></div>
|
<div id="seoprostack-plugin-list"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php elseif ($active_tab == 'pro'): ?>
|
<?php elseif ($active_tab == 'pro'): ?>
|
||||||
@ -1936,29 +1936,29 @@ function wp_seoprostack_settings_page() {
|
|||||||
</div>
|
</div>
|
||||||
<?php elseif ($active_tab == 'general'): ?>
|
<?php elseif ($active_tab == 'general'): ?>
|
||||||
<div class="tab-content" id="general">
|
<div class="tab-content" id="general">
|
||||||
<div class="wp-allstars-settings-section">
|
<div class="seoprostack-settings-section">
|
||||||
<div class="wp-allstars-settings-grid">
|
<div class="seoprostack-settings-grid">
|
||||||
<!-- Example of a simple toggle setting (no panel) -->
|
<!-- Example of a simple toggle setting (no panel) -->
|
||||||
<div class="wp-setting-row">
|
<div class="seoprostack-setting-row">
|
||||||
<div class="wp-setting-header">
|
<div class="seoprostack-setting-header">
|
||||||
<div class="wp-setting-main">
|
<div class="seoprostack-setting-main">
|
||||||
<div class="wp-setting-left">
|
<div class="seoprostack-setting-left">
|
||||||
<div class="wp-toggle-switch">
|
<div class="seoprostack-toggle-switch">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="wp_seoprostack_simple_setting"
|
id="wp_seoprostack_simple_setting"
|
||||||
name="wp_seoprostack_simple_setting"
|
name="wp_seoprostack_simple_setting"
|
||||||
value="1"
|
value="1"
|
||||||
<?php checked(get_option('wp_seoprostack_simple_setting', get_option('wp_allstars_simple_setting', false))); ?>
|
<?php checked(get_option('wp_seoprostack_simple_setting', get_option('wp_allstars_simple_setting', false))); ?>
|
||||||
/>
|
/>
|
||||||
<span class="wp-toggle-slider"></span>
|
<span class="seoprostack-toggle-slider"></span>
|
||||||
</div>
|
</div>
|
||||||
<label for="wp_seoprostack_simple_setting" class="wp-setting-label">
|
<label for="wp_seoprostack_simple_setting" class="seoprostack-setting-label">
|
||||||
<?php esc_html_e('Example: Simple Toggle', 'wp-allstars'); ?>
|
<?php esc_html_e('Example: Simple Toggle', 'seoprostack'); ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="wp-setting-description">
|
<p class="seoprostack-setting-description">
|
||||||
<?php esc_html_e('This is an example of a simple toggle setting without an expandable panel. Currently for demonstration purposes only.', 'wp-allstars'); ?>
|
<?php esc_html_e('This is an example of a simple toggle setting without an expandable panel. Currently for demonstration purposes only.', 'seoprostack'); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1966,34 +1966,34 @@ function wp_seoprostack_settings_page() {
|
|||||||
</div>
|
</div>
|
||||||
<?php elseif ($active_tab == 'advanced'): ?>
|
<?php elseif ($active_tab == 'advanced'): ?>
|
||||||
<div class="tab-content" id="advanced">
|
<div class="tab-content" id="advanced">
|
||||||
<div class="wp-allstars-settings-section">
|
<div class="seoprostack-settings-section">
|
||||||
<div class="wp-allstars-settings-grid">
|
<div class="seoprostack-settings-grid">
|
||||||
<!-- Example of an expandable panel setting -->
|
<!-- Example of an expandable panel setting -->
|
||||||
<div class="wp-allstars-toggle">
|
<div class="seoprostack-toggle">
|
||||||
<div class="wp-allstars-toggle-header" aria-expanded="false">
|
<div class="seoprostack-toggle-header" aria-expanded="false">
|
||||||
<div class="wp-allstars-toggle-main">
|
<div class="seoprostack-toggle-main">
|
||||||
<div class="wp-allstars-toggle-left">
|
<div class="seoprostack-toggle-left">
|
||||||
<div class="wp-toggle-switch">
|
<div class="seoprostack-toggle-switch">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="wp_seoprostack_auto_upload_images"
|
id="wp_seoprostack_auto_upload_images"
|
||||||
name="wp_seoprostack_auto_upload_images"
|
name="wp_seoprostack_auto_upload_images"
|
||||||
value="1"
|
value="1"
|
||||||
<?php checked(get_option('wp_seoprostack_auto_upload_images', get_option('wp_allstars_auto_upload_images', false))); ?>
|
<?php checked(get_option('wp_seoprostack_auto_upload_images', get_option('wp_allstars_auto_upload_images', false))); ?>
|
||||||
/>
|
/>
|
||||||
<span class="wp-toggle-slider"></span>
|
<span class="seoprostack-toggle-slider"></span>
|
||||||
</div>
|
</div>
|
||||||
<label for="wp_seoprostack_auto_upload_images">
|
<label for="wp_seoprostack_auto_upload_images">
|
||||||
<?php esc_html_e('Example: Expandable Panel', 'wp-allstars'); ?>
|
<?php esc_html_e('Example: Expandable Panel', 'seoprostack'); ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="wp-setting-description">
|
<p class="seoprostack-setting-description">
|
||||||
<?php esc_html_e('This is an example of an expandable panel setting. Currently for demonstration purposes only - no actual functionality.', 'wp-allstars'); ?>
|
<?php esc_html_e('This is an example of an expandable panel setting. Currently for demonstration purposes only - no actual functionality.', 'seoprostack'); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="wp-allstars-toggle-settings">
|
<div class="seoprostack-toggle-settings">
|
||||||
<div class="wp-allstars-setting-row">
|
<div class="seoprostack-setting-row">
|
||||||
<label for="example_text"><?php esc_html_e('Example Text Field', 'wp-allstars'); ?></label>
|
<label for="example_text"><?php esc_html_e('Example Text Field', 'seoprostack'); ?></label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
id="example_text"
|
id="example_text"
|
||||||
name="example_text"
|
name="example_text"
|
||||||
|
@ -28,8 +28,24 @@ class SEOProStack_Tab_Hosting {
|
|||||||
* Initialize the class.
|
* Initialize the class.
|
||||||
* Register any hooks or actions here.
|
* Register any hooks or actions here.
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Hosting providers data
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $hosting_providers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Server information
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $server_info;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
// If needed, register hooks or actions here
|
// Initialize the hosting providers data
|
||||||
|
$this->hosting_providers = $this->get_hosting_providers();
|
||||||
|
$this->server_info = $this->get_server_info();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,6 +66,223 @@ class SEOProStack_Tab_Hosting {
|
|||||||
return __('Hosting', 'seoprostack');
|
return __('Hosting', 'seoprostack');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get server information
|
||||||
|
*
|
||||||
|
* @return array Server information
|
||||||
|
*/
|
||||||
|
private function get_server_info() {
|
||||||
|
global $wpdb;
|
||||||
|
|
||||||
|
$server_info = array();
|
||||||
|
|
||||||
|
// PHP Version
|
||||||
|
$server_info['php_version'] = array(
|
||||||
|
'label' => __('PHP Version', 'seoprostack'),
|
||||||
|
'value' => phpversion(),
|
||||||
|
'recommendation' => __('PHP 8.0 or higher recommended', 'seoprostack')
|
||||||
|
);
|
||||||
|
|
||||||
|
// MySQL Version
|
||||||
|
$server_info['mysql_version'] = array(
|
||||||
|
'label' => __('MySQL Version', 'seoprostack'),
|
||||||
|
'value' => $wpdb->db_version(),
|
||||||
|
'recommendation' => __('MySQL 8.0 or higher recommended', 'seoprostack')
|
||||||
|
);
|
||||||
|
|
||||||
|
// Server Software
|
||||||
|
$server_info['server_software'] = array(
|
||||||
|
'label' => __('Server Software', 'seoprostack'),
|
||||||
|
'value' => $_SERVER['SERVER_SOFTWARE'] ?? __('Unknown', 'seoprostack'),
|
||||||
|
'recommendation' => ''
|
||||||
|
);
|
||||||
|
|
||||||
|
// PHP Memory Limit
|
||||||
|
$memory_limit = ini_get('memory_limit');
|
||||||
|
$server_info['php_memory_limit'] = array(
|
||||||
|
'label' => __('PHP Memory Limit', 'seoprostack'),
|
||||||
|
'value' => $memory_limit,
|
||||||
|
'recommendation' => __('256M or higher recommended', 'seoprostack')
|
||||||
|
);
|
||||||
|
|
||||||
|
// Max Upload Size
|
||||||
|
$upload_max_filesize = ini_get('upload_max_filesize');
|
||||||
|
$server_info['upload_max_filesize'] = array(
|
||||||
|
'label' => __('Max Upload Size', 'seoprostack'),
|
||||||
|
'value' => $upload_max_filesize,
|
||||||
|
'recommendation' => __('64M or higher recommended', 'seoprostack')
|
||||||
|
);
|
||||||
|
|
||||||
|
return $server_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get hosting providers
|
||||||
|
*
|
||||||
|
* @return array The hosting providers data
|
||||||
|
*/
|
||||||
|
private function get_hosting_providers() {
|
||||||
|
return array(
|
||||||
|
'kinsta' => array(
|
||||||
|
'name' => 'Kinsta',
|
||||||
|
'description' => 'Premium WordPress hosting with excellent performance, security, and customer support.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://kinsta.com/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://kinsta.com/plans/'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'wpengine' => array(
|
||||||
|
'name' => 'WP Engine',
|
||||||
|
'description' => 'Managed WordPress hosting provider with solid performance and security features.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://wpengine.com/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://wpengine.com/plans/'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'siteground' => array(
|
||||||
|
'name' => 'SiteGround',
|
||||||
|
'description' => 'Popular WordPress hosting with good performance and customer support.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://www.siteground.com/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://www.siteground.com/wordpress-hosting.htm'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'hostinger' => array(
|
||||||
|
'name' => 'Hostinger',
|
||||||
|
'description' => 'Affordable WordPress hosting with good performance and user-friendly management tools.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://www.hostinger.com/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://www.hostinger.com/wordpress-hosting'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'hetzner' => array(
|
||||||
|
'name' => 'Hetzner Cloud',
|
||||||
|
'description' => 'High-performance cloud servers with excellent price-to-performance ratio for self-managed WordPress hosting.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://www.hetzner.com/cloud/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://www.hetzner.com/cloud#pricing'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'simplehost' => array(
|
||||||
|
'name' => 'SimpleHost',
|
||||||
|
'description' => 'Streamlined WordPress hosting with a focus on simplicity and performance.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://simplehost.so/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://simplehost.so/#pricing'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'cloudflare' => array(
|
||||||
|
'name' => 'Cloudflare',
|
||||||
|
'description' => 'Global cloud platform that provides CDN, security, and performance optimization services.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://www.cloudflare.com/en-gb/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://www.cloudflare.com/en-gb/plans/'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'spaceship' => array(
|
||||||
|
'name' => 'Spaceship',
|
||||||
|
'description' => 'Modern hosting platform with advanced features for WordPress sites.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://www.spaceship.com/',
|
||||||
|
'primary' => true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'101domain' => array(
|
||||||
|
'name' => '101Domain',
|
||||||
|
'description' => 'Domain registration and management service with support for hundreds of TLDs.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://www.101domain.com/',
|
||||||
|
'primary' => true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'namecheap' => array(
|
||||||
|
'name' => 'Namecheap',
|
||||||
|
'description' => 'Domain registrar and web hosting provider with competitive pricing and good support.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://www.namecheap.com/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://www.namecheap.com/hosting/shared/'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'updownio' => array(
|
||||||
|
'name' => 'Updown.io',
|
||||||
|
'description' => 'Simple and affordable website monitoring service with uptime checks and performance metrics.',
|
||||||
|
'button_group' => array(
|
||||||
|
array(
|
||||||
|
'text' => 'Home Page',
|
||||||
|
'url' => 'https://updown.io/',
|
||||||
|
'primary' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'text' => 'Pricing',
|
||||||
|
'url' => 'https://updown.io/pricing'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the tab description
|
* Get the tab description
|
||||||
*
|
*
|
||||||
@ -60,12 +293,11 @@ class SEOProStack_Tab_Hosting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get hosting providers
|
* Get additional hosting providers for specialized cases
|
||||||
* This internalizes the data previously retrieved from wp_seoprostack_get_hosting_providers()
|
|
||||||
*
|
*
|
||||||
* @return array Array of hosting providers with their details
|
* @return array Array of additional hosting providers
|
||||||
*/
|
*/
|
||||||
public function get_hosting_providers() {
|
private function get_additional_hosting_providers() {
|
||||||
return array(
|
return array(
|
||||||
'closte' => array(
|
'closte' => array(
|
||||||
'name' => 'Closte',
|
'name' => 'Closte',
|
||||||
@ -276,13 +508,11 @@ class SEOProStack_Tab_Hosting {
|
|||||||
* Render the tab content.
|
* Render the tab content.
|
||||||
*/
|
*/
|
||||||
public function render() {
|
public function render() {
|
||||||
// Get server information
|
// Use the self-contained data
|
||||||
$server_info = $this->get_server_info();
|
$server_info = $this->server_info;
|
||||||
|
$hosting_providers = $this->hosting_providers;
|
||||||
|
|
||||||
// Get hosting providers from the internal method
|
echo '<div class="tab-content" id="' . esc_attr($this->tab_id) . '">;
|
||||||
$hosting_providers = $this->get_hosting_providers();
|
|
||||||
|
|
||||||
// For backward compatibility, make hosting providers available through global function
|
|
||||||
if (function_exists('wp_seoprostack_get_hosting_providers') && empty($GLOBALS['_wp_seoprostack_hosting_loaded'])) {
|
if (function_exists('wp_seoprostack_get_hosting_providers') && empty($GLOBALS['_wp_seoprostack_hosting_loaded'])) {
|
||||||
// Optional: merge with any providers from the external function to ensure none are lost
|
// Optional: merge with any providers from the external function to ensure none are lost
|
||||||
$external_providers = wp_seoprostack_get_hosting_providers();
|
$external_providers = wp_seoprostack_get_hosting_providers();
|
||||||
|
@ -2,10 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* Auto Upload Images functionality
|
* Auto Upload Images functionality
|
||||||
*
|
*
|
||||||
* @package WP_Allstars
|
* @package SEO_Pro_Stack
|
||||||
|
* @deprecated 1.0.0 Use the class in includes/features/auto-upload/class-seoprostack-auto-upload.php instead
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WP_Allstars_Auto_Upload {
|
// If this file is called directly, abort.
|
||||||
|
if (!defined('ABSPATH')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 1.0.0 Use SEOProStack_Auto_Upload instead
|
||||||
|
*/
|
||||||
|
class SEOProStack_Auto_Upload_Legacy {
|
||||||
/**
|
/**
|
||||||
* Initialize the class
|
* Initialize the class
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @package SEO_Pro_Stack
|
* @package SEO_Pro_Stack
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SEO_Pro_Stack_Auto_Upload {
|
class SEOProStack_Auto_Upload {
|
||||||
/**
|
/**
|
||||||
* Initialize the class
|
* Initialize the class
|
||||||
*/
|
*/
|
||||||
|
@ -15,56 +15,50 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// If this file is called directly, abort.
|
// If this file is called directly, abort.
|
||||||
if (!defined('ABSPATH')) {
|
if ( ! defined( 'WPINC' ) ) {
|
||||||
exit;
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define plugin version - extract from plugin header
|
||||||
|
if (!function_exists('get_plugin_data')) {
|
||||||
|
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define the version constant - first try get_plugin_data() if available,
|
||||||
|
// otherwise fall back to direct string extraction
|
||||||
|
if (function_exists('get_plugin_data')) {
|
||||||
|
$plugin_data = get_plugin_data(__FILE__, false, false);
|
||||||
|
define('SEOPROSTACK_VERSION', $plugin_data['Version']);
|
||||||
|
} else {
|
||||||
|
// Manual extraction as fallback
|
||||||
|
$plugin_file = file_get_contents(__FILE__);
|
||||||
|
preg_match('/Version:\s*([^\s]+)/i', $plugin_file, $matches);
|
||||||
|
define('SEOPROSTACK_VERSION', isset($matches[1]) ? $matches[1] : '1.0.0');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define plugin constants
|
|
||||||
define('SEOPROSTACK_VERSION', '1.0.0');
|
|
||||||
define('SEOPROSTACK_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
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
|
// Activation hook
|
||||||
require_once SEOPROSTACK_PLUGIN_DIR . 'includes/core/class-seoprostack-autoloader.php';
|
function seoprostack_activate() {
|
||||||
|
// Add activation logic later if needed
|
||||||
|
}
|
||||||
|
register_activation_hook( __FILE__, 'seoprostack_activate' );
|
||||||
|
|
||||||
// Backward compatibility - load the existing functionality
|
// Load core functionality
|
||||||
// This will be removed in future iterations
|
require_once SEOPROSTACK_PLUGIN_DIR . 'includes/features/auto-upload/class-seoprostack-auto-upload.php';
|
||||||
if (is_admin()) {
|
|
||||||
|
// Load admin UI and configurations
|
||||||
|
if ( is_admin() ) {
|
||||||
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/pro-plugins-config.php';
|
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/pro-plugins-config.php';
|
||||||
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/settings.php';
|
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/settings.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activation hook
|
|
||||||
function seoprostack_activate() {
|
|
||||||
// Activation logic
|
|
||||||
}
|
|
||||||
register_activation_hook(__FILE__, 'seoprostack_activate');
|
|
||||||
|
|
||||||
// Deactivation hook
|
|
||||||
function seoprostack_deactivate() {
|
|
||||||
// Deactivation logic
|
|
||||||
}
|
|
||||||
register_deactivation_hook(__FILE__, 'seoprostack_deactivate');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Begin execution of the plugin.
|
|
||||||
*/
|
|
||||||
function run_seoprostack() {
|
|
||||||
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() {
|
||||||
// Only load on the plugin settings page
|
|
||||||
$screen = get_current_screen();
|
|
||||||
if ($screen->id !== 'settings_page_seoprostack') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enqueue styles
|
// Enqueue styles
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'seoprostack-admin',
|
'seoprostack-admin',
|
||||||
@ -91,6 +85,9 @@ function seoprostack_admin_assets() {
|
|||||||
'nonce' => wp_create_nonce('seoprostack-nonce'),
|
'nonce' => wp_create_nonce('seoprostack-nonce'),
|
||||||
'updateNonce' => wp_create_nonce('updates')
|
'updateNonce' => wp_create_nonce('updates')
|
||||||
);
|
);
|
||||||
wp_localize_script('seoprostack-admin', 'seoProStack', $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();
|
Reference in New Issue
Block a user