v3.1.6
This commit is contained in:
parent
a50d125883
commit
b66c727a95
9 changed files with 438 additions and 234 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
/**
|
/**
|
||||||
* noindex SEO - Admin Panel Styles
|
* noindex SEO - Admin styles
|
||||||
* Version: 2.0.0
|
*
|
||||||
* Modern, visual admin interface
|
* Follows the WordPress admin color scheme via the --wp-admin-theme-color
|
||||||
|
* custom property (with the core default as fallback) and the core admin
|
||||||
|
* status palette. Uses logical properties so RTL works out of the box.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
|
|
@ -12,8 +14,6 @@
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Header styles removed - using WordPress default styles */
|
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
Tabs Navigation
|
Tabs Navigation
|
||||||
=========================== */
|
=========================== */
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
border-bottom: 2px solid #e5e7eb;
|
border-bottom: 2px solid #c3c4c7;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -29,23 +29,23 @@
|
||||||
padding: 12px 24px;
|
padding: 12px 24px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
color: #6b7280;
|
color: #646970;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: 3px solid transparent;
|
border-bottom: 3px solid transparent;
|
||||||
transition: all 0.3s ease;
|
transition: color 0.3s ease;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-tab:hover {
|
.noindex-seo-tab:hover,
|
||||||
color: #667eea;
|
.noindex-seo-tab.active {
|
||||||
|
color: var(--wp-admin-theme-color, #2271b1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-tab.active {
|
.noindex-seo-tab.active {
|
||||||
color: #667eea;
|
border-bottom-color: var(--wp-admin-theme-color, #2271b1);
|
||||||
border-bottom-color: #667eea;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
|
|
@ -57,10 +57,10 @@
|
||||||
|
|
||||||
.noindex-seo-tab-content.active {
|
.noindex-seo-tab-content.active {
|
||||||
display: block;
|
display: block;
|
||||||
animation: fadeIn 0.3s ease;
|
animation: noindexSeoFadeIn 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeIn {
|
@keyframes noindexSeoFadeIn {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(10px);
|
transform: translateY(10px);
|
||||||
|
|
@ -80,13 +80,13 @@
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #c3c4c7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-card-header {
|
.noindex-seo-card-header {
|
||||||
padding: 20px 24px;
|
padding: 20px 24px;
|
||||||
background: #f9fafb;
|
background: #f6f7f7;
|
||||||
border-bottom: 1px solid #e5e7eb;
|
border-bottom: 1px solid #c3c4c7;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
@ -95,28 +95,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-card-header:hover {
|
.noindex-seo-card-header:hover {
|
||||||
background: #f3f4f6;
|
background: #f0f0f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-card-header h3 {
|
.noindex-seo-card-header h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #111827;
|
color: #2c3338;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-card-header .dashicons {
|
.noindex-seo-card-header .dashicons {
|
||||||
color: #667eea;
|
color: var(--wp-admin-theme-color, #2271b1);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-card-toggle {
|
.noindex-seo-card-toggle {
|
||||||
color: #9ca3af;
|
color: #8c8f94;
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -124,6 +124,10 @@
|
||||||
transform: rotate(-90deg);
|
transform: rotate(-90deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[dir="rtl"] .noindex-seo-card.collapsed .noindex-seo-card-toggle {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
.noindex-seo-card-body {
|
.noindex-seo-card-body {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
@ -140,10 +144,10 @@
|
||||||
=========================== */
|
=========================== */
|
||||||
.noindex-seo-option {
|
.noindex-seo-option {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
background: #f9fafb;
|
background: #f6f7f7;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #c3c4c7;
|
||||||
transition: all 0.2s ease;
|
transition: border-color 0.2s ease;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -152,15 +156,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-option:hover {
|
.noindex-seo-option:hover {
|
||||||
background: #f3f4f6;
|
background: #f0f0f1;
|
||||||
border-color: #d1d5db;
|
border-color: #8c8f94;
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-option-header {
|
.noindex-seo-option-header {
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
padding-bottom: 14px;
|
padding-bottom: 14px;
|
||||||
border-bottom: 1px solid #e5e7eb;
|
border-bottom: 1px solid #c3c4c7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-option-title {
|
.noindex-seo-option-title {
|
||||||
|
|
@ -169,7 +173,7 @@
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: #111827;
|
color: #2c3338;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-option-title strong {
|
.noindex-seo-option-title strong {
|
||||||
|
|
@ -177,32 +181,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-option-description {
|
.noindex-seo-option-description {
|
||||||
color: #6b7280;
|
color: #646970;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-view-link {
|
|
||||||
color: #667eea;
|
|
||||||
text-decoration: none;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
font-size: 13px;
|
|
||||||
transition: color 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-view-link:hover {
|
|
||||||
color: #5568d3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-view-link .dashicons {
|
|
||||||
width: 14px;
|
|
||||||
height: 14px;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
Directives Checkboxes
|
Directives Checkboxes
|
||||||
=========================== */
|
=========================== */
|
||||||
|
|
@ -219,18 +203,18 @@
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 10px 14px;
|
padding: 10px 14px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 2px solid #e5e7eb;
|
border: 2px solid #c3c4c7;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
transition: border-color 0.2s ease;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #374151;
|
color: #3c434a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-directive-checkbox:hover {
|
.noindex-seo-directive-checkbox:hover {
|
||||||
border-color: #d1d5db;
|
border-color: #8c8f94;
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -239,21 +223,16 @@
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
accent-color: #667eea;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-directive-checkbox input[type="checkbox"]:checked {
|
|
||||||
background-color: #667eea;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-directive-checkbox:has(input:checked) {
|
.noindex-seo-directive-checkbox:has(input:checked) {
|
||||||
border-color: #667eea;
|
border-color: var(--wp-admin-theme-color, #2271b1);
|
||||||
background-color: #eff6ff;
|
background-color: #f0f6fc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-directive-checkbox:has(input:checked) .directive-label {
|
.noindex-seo-directive-checkbox:has(input:checked) .directive-label {
|
||||||
color: #667eea;
|
color: var(--wp-admin-theme-color, #2271b1);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -273,21 +252,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.directive-description {
|
.directive-description {
|
||||||
color: #6b7280;
|
color: #646970;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
font-family: inherit;
|
||||||
flex: 2;
|
flex: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
Toggle Switch (Modern)
|
Toggle Switch
|
||||||
=========================== */
|
=========================== */
|
||||||
.noindex-seo-switch {
|
.noindex-seo-switch {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-switch input {
|
.noindex-seo-switch input {
|
||||||
|
|
@ -303,7 +283,7 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: #cbd5e1;
|
background-color: #8c8f94;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
border-radius: 34px;
|
border-radius: 34px;
|
||||||
}
|
}
|
||||||
|
|
@ -315,24 +295,34 @@
|
||||||
width: 20px;
|
width: 20px;
|
||||||
left: 3px;
|
left: 3px;
|
||||||
bottom: 3px;
|
bottom: 3px;
|
||||||
background-color: white;
|
background-color: #fff;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked + .noindex-seo-slider {
|
input:checked + .noindex-seo-slider {
|
||||||
background-color: #667eea;
|
background-color: var(--wp-admin-theme-color, #2271b1);
|
||||||
}
|
}
|
||||||
|
|
||||||
input:focus + .noindex-seo-slider {
|
input:focus-visible + .noindex-seo-slider {
|
||||||
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
|
outline: 2px solid var(--wp-admin-theme-color, #2271b1);
|
||||||
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked + .noindex-seo-slider:before {
|
input:checked + .noindex-seo-slider:before {
|
||||||
transform: translateX(22px);
|
transform: translateX(22px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[dir="rtl"] .noindex-seo-slider:before {
|
||||||
|
left: auto;
|
||||||
|
right: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
[dir="rtl"] input:checked + .noindex-seo-slider:before {
|
||||||
|
transform: translateX(-22px);
|
||||||
|
}
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
Badges & Indicators
|
Badges & Indicators
|
||||||
=========================== */
|
=========================== */
|
||||||
|
|
@ -348,18 +338,18 @@ input:checked + .noindex-seo-slider:before {
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-badge.recommended {
|
.noindex-seo-badge.recommended {
|
||||||
background: #dcfce7;
|
background: #edfaef;
|
||||||
color: #166534;
|
color: #076b32;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-badge.not-recommended {
|
.noindex-seo-badge.not-recommended {
|
||||||
background: #fee2e2;
|
background: #fcf0f1;
|
||||||
color: #991b1b;
|
color: #b32d2e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-badge.neutral {
|
.noindex-seo-badge.neutral {
|
||||||
background: #e0e7ff;
|
background: #f0f0f1;
|
||||||
color: #3730a3;
|
color: #3c434a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-badge .dashicons {
|
.noindex-seo-badge .dashicons {
|
||||||
|
|
@ -368,12 +358,24 @@ input:checked + .noindex-seo-slider:before {
|
||||||
height: 14px;
|
height: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
"Apply Recommended Defaults" form
|
||||||
|
=========================== */
|
||||||
|
.noindex-seo-apply-form {
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-apply-note {
|
||||||
|
margin-inline-start: 8px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
General Config Section
|
General Config Section
|
||||||
=========================== */
|
=========================== */
|
||||||
.noindex-seo-general-config {
|
.noindex-seo-general-config {
|
||||||
background: #fffbeb;
|
background: #fff;
|
||||||
border: 1px solid #fcd34d;
|
border: 1px solid #c3c4c7;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
|
|
@ -382,14 +384,14 @@ input:checked + .noindex-seo-slider:before {
|
||||||
.noindex-seo-general-config h2 {
|
.noindex-seo-general-config h2 {
|
||||||
margin: 0 0 16px 0;
|
margin: 0 0 16px 0;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #92400e;
|
color: #2c3338;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-general-config .dashicons {
|
.noindex-seo-general-config .dashicons {
|
||||||
color: #f59e0b;
|
color: var(--wp-admin-theme-color, #2271b1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-config-option {
|
.noindex-seo-config-option {
|
||||||
|
|
@ -398,18 +400,38 @@ input:checked + .noindex-seo-slider:before {
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noindex-seo-config-option + .noindex-seo-config-option {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.noindex-seo-config-option label {
|
.noindex-seo-config-option label {
|
||||||
color: #78350f;
|
|
||||||
font-weight: 500;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noindex-seo-config-body {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-config-label {
|
||||||
|
display: block;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-config-label-danger {
|
||||||
|
color: #b32d2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-config-select {
|
||||||
|
max-width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
Alert / Notice
|
Alert / Notice
|
||||||
=========================== */
|
=========================== */
|
||||||
.noindex-seo-alert {
|
.noindex-seo-alert {
|
||||||
background: #fef3c7;
|
background: #fcf9e8;
|
||||||
border-left: 4px solid #f59e0b;
|
border-inline-start: 4px solid #dba617;
|
||||||
padding: 16px 20px;
|
padding: 16px 20px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
@ -419,22 +441,17 @@ input:checked + .noindex-seo-slider:before {
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-alert .dashicons {
|
.noindex-seo-alert .dashicons {
|
||||||
color: #d97706;
|
color: #dba617;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-alert p {
|
.noindex-seo-alert p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #92400e;
|
color: #3c434a;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===========================
|
|
||||||
Submit Button
|
|
||||||
=========================== */
|
|
||||||
/* Submit button styles removed - using WordPress default submit_button() */
|
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
Search/Filter
|
Search/Filter
|
||||||
=========================== */
|
=========================== */
|
||||||
|
|
@ -445,17 +462,12 @@ input:checked + .noindex-seo-slider:before {
|
||||||
.noindex-seo-search input {
|
.noindex-seo-search input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
padding: 10px 16px;
|
|
||||||
border: 1px solid #d1d5db;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 14px;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-search input:focus {
|
.noindex-seo-search input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: #667eea;
|
border-color: var(--wp-admin-theme-color, #2271b1);
|
||||||
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
|
|
@ -469,23 +481,23 @@ input:checked + .noindex-seo-slider:before {
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-stat-card {
|
.noindex-seo-stat-card {
|
||||||
background: white;
|
background: #fff;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #c3c4c7;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-stat-number {
|
.noindex-seo-stat-number {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #667eea;
|
color: var(--wp-admin-theme-color, #2271b1);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-stat-label {
|
.noindex-seo-stat-label {
|
||||||
color: #6b7280;
|
color: #646970;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
@ -495,27 +507,249 @@ input:checked + .noindex-seo-slider:before {
|
||||||
View Link
|
View Link
|
||||||
=========================== */
|
=========================== */
|
||||||
.noindex-seo-view-link {
|
.noindex-seo-view-link {
|
||||||
color: #667eea;
|
color: var(--wp-admin-theme-color, #2271b1);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 500;
|
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
transition: color 0.2s ease;
|
transition: color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-view-link:hover {
|
.noindex-seo-view-link:hover {
|
||||||
color: #764ba2;
|
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noindex-seo-view-link .dashicons {
|
.noindex-seo-view-link .dashicons {
|
||||||
|
font-size: 14px;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
Success Message
|
||||||
|
=========================== */
|
||||||
|
.noindex-seo-success {
|
||||||
|
background: #edfaef;
|
||||||
|
border-inline-start: 4px solid #00a32a;
|
||||||
|
padding: 16px 20px;
|
||||||
|
margin: 20px 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
animation: noindexSeoSlideDown 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes noindexSeoSlideDown {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-10px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-success .dashicons {
|
||||||
|
color: #00a32a;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-success p {
|
||||||
|
margin: 0;
|
||||||
|
color: #076b32;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
Tooltips
|
||||||
|
=========================== */
|
||||||
|
.noindex-seo-tooltip {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-tooltip .dashicons {
|
||||||
|
color: #8c8f94;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noindex-seo-tooltip:hover .dashicons {
|
||||||
|
color: var(--wp-admin-theme-color, #2271b1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
Disabled Fields
|
||||||
|
=========================== */
|
||||||
|
.noindex-seo-option.disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
cursor: not-allowed;
|
||||||
|
position: relative;
|
||||||
|
background: #f6f7f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-option.disabled::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-option.disabled .noindex-seo-directive-checkbox {
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-option.disabled .noindex-seo-option-title {
|
||||||
|
color: #8c8f94;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-option.disabled .noindex-seo-option-description {
|
||||||
|
color: #a7aaad;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
Post meta box (classic editor)
|
||||||
|
=========================== */
|
||||||
|
.noindex-seo-meta-override {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-meta-note {
|
||||||
|
margin: 8px 0 12px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-directive-list {
|
||||||
|
border-top: 1px solid #dcdcde;
|
||||||
|
padding-top: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-directive-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-reference {
|
||||||
|
margin-top: 12px;
|
||||||
|
padding: 10px;
|
||||||
|
background: #f6f7f7;
|
||||||
|
border: 1px solid #c3c4c7;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-reference-title {
|
||||||
|
margin: 0 0 8px 0;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #3c434a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-ref {
|
||||||
|
margin: 0 0 4px 0;
|
||||||
|
padding: 6px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-ref:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-ref code {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-ref-override {
|
||||||
|
background: #f0f6fc;
|
||||||
|
border-inline-start: 3px solid #72aee6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-ref-none {
|
||||||
|
background: #fcf9e8;
|
||||||
|
border-inline-start: 3px solid #dba617;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-ref-global {
|
||||||
|
background: #fff;
|
||||||
|
border-inline-start: 3px solid #c3c4c7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-ref-ok {
|
||||||
|
background: #edfaef;
|
||||||
|
border-inline-start: 3px solid #00a32a;
|
||||||
|
color: #076b32;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
Term edit panel
|
||||||
|
=========================== */
|
||||||
|
.noindex-seo-term-directives {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-term-directive {
|
||||||
|
display: inline-block;
|
||||||
|
margin-inline-end: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
List-table columns (posts and terms)
|
||||||
|
=========================== */
|
||||||
|
.noindex-seo-col-empty {
|
||||||
|
color: #8c8f94;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-badges {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-badge-item {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px 6px;
|
||||||
|
background: #f0f6fc;
|
||||||
|
border: 1px solid var(--wp-admin-theme-color, #2271b1);
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
Quick Edit
|
||||||
|
=========================== */
|
||||||
|
.noindex-seo-quick-edit-list {
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-quick-edit-label {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-quick-edit-nested {
|
||||||
|
margin-inline-start: 20px;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noindex-seo-quick-edit-option {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===========================
|
/* ===========================
|
||||||
Responsive Design
|
Responsive Design
|
||||||
=========================== */
|
=========================== */
|
||||||
|
|
@ -536,102 +770,7 @@ input:checked + .noindex-seo-slider:before {
|
||||||
.noindex-seo-stats {
|
.noindex-seo-stats {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* ===========================
|
|
||||||
Success Message
|
|
||||||
=========================== */
|
|
||||||
.noindex-seo-success {
|
|
||||||
background: #dcfce7;
|
|
||||||
border-left: 4px solid #16a34a;
|
|
||||||
padding: 16px 20px;
|
|
||||||
margin: 20px 0;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
animation: slideDown 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes slideDown {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-10px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-success .dashicons {
|
|
||||||
color: #16a34a;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-success p {
|
|
||||||
margin: 0;
|
|
||||||
color: #166534;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===========================
|
|
||||||
Tooltips
|
|
||||||
=========================== */
|
|
||||||
.noindex-seo-tooltip {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-tooltip .dashicons {
|
|
||||||
color: #9ca3af;
|
|
||||||
font-size: 16px;
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-tooltip:hover .dashicons {
|
|
||||||
color: #667eea;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===========================
|
|
||||||
Disabled Fields
|
|
||||||
=========================== */
|
|
||||||
.noindex-seo-option.disabled {
|
|
||||||
opacity: 0.6;
|
|
||||||
cursor: not-allowed;
|
|
||||||
position: relative;
|
|
||||||
background: #f9fafb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-option.disabled::before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-option.disabled .noindex-seo-directive-checkbox {
|
|
||||||
pointer-events: none;
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-option.disabled .noindex-seo-option-title {
|
|
||||||
color: #9ca3af;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noindex-seo-option.disabled .noindex-seo-option-description {
|
|
||||||
color: #d1d5db;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===========================
|
|
||||||
Responsive Design
|
|
||||||
=========================== */
|
|
||||||
@media screen and (max-width: 782px) {
|
|
||||||
.noindex-seo-directive-checkbox {
|
.noindex-seo-directive-checkbox {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
@ -639,7 +778,7 @@ input:checked + .noindex-seo-slider:before {
|
||||||
|
|
||||||
.directive-description {
|
.directive-description {
|
||||||
flex-basis: 100%;
|
flex-basis: 100%;
|
||||||
margin-left: 52px;
|
margin-inline-start: 52px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,43 @@
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 3.1.6 =
|
||||||
|
|
||||||
|
_Release date: 2026-09-18_
|
||||||
|
**Highlights**
|
||||||
|
|
||||||
|
* Admin UI modernization: all inline styles removed in favour of WordPress admin color-scheme-aware, RTL-ready classes (audit finding M7), plus the two minor items deferred from the 3.1.5 deploy audit (stale wp_die message, unreachable REST fallbacks).
|
||||||
|
|
||||||
|
**Added**
|
||||||
|
|
||||||
|
* Regression tests locking in the new UI conventions: the settings page and meta box render without any `style="..."` attribute, and the stylesheet is verified to load on the post-list / post-edit / term-edit screens (gated by the granular flags) while staying off everything else.
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
* All 61 inline `style="..."` attributes removed from the settings page, post meta box, term edit panel, Quick Edit, and the post/term list "Robots" columns. Styling now lives in `assets/css/admin.css` under semantic class names.
|
||||||
|
* Admin styling now follows the WordPress admin color scheme: accents use `var(--wp-admin-theme-color, #2271b1)`, status boxes and badges use the core admin palette, and neutral grays match wp-admin. The UI adapts to Light / Blue / Midnight / Coffee / Ocean / etc. instead of hardcoded Material-Design colors.
|
||||||
|
* RTL support: layout uses logical CSS properties (`margin-inline-start`, `border-inline-start`) and the toggle switch mirrors under `[dir="rtl"]`.
|
||||||
|
* Dynamic visibility (override toggles in the meta box and term panel) uses the core `.hidden` class with `classList.toggle()` instead of inline `display` manipulation.
|
||||||
|
* `assets/css/admin.css` also enqueues on the admin screens where the plugin renders UI (post list, post editor, term editor), gated by the granular-control flags; the interactive JavaScript remains settings-page-only.
|
||||||
|
* Admin stylesheet cleanup: duplicate `.noindex-seo-view-link` rule block removed; keyframe names prefixed to avoid collisions.
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
* Stale `wp_die()` message in the two form handlers: after the 3.1.5 nonce split only the capability path is reachable there, so the message is now "Permission denied." instead of "Permission denied or invalid nonce." (deploy-audit finding I2). Catalan and Spanish translations and the `.pot` template updated; `.mo` files recompiled.
|
||||||
|
* Unreachable `function_exists( 'rest_authorization_required_code' )` ternaries removed from both REST permission callbacks — the function exists on every supported WordPress version (deploy-audit finding I5).
|
||||||
|
|
||||||
|
**Security**
|
||||||
|
|
||||||
|
* No security changes; the full canonical checklist (`AGENTS-security.md`), PHPCS security sniffs and `composer audit` remain clean.
|
||||||
|
|
||||||
|
**Compatibility**
|
||||||
|
|
||||||
|
* WordPress: 4.7 - 7.2
|
||||||
|
* PHP: 5.6 - 8.5
|
||||||
|
|
||||||
|
**Tests**
|
||||||
|
|
||||||
|
* PHPUnit: 9.6.36 (150 tests, all passing). Coverage maintained above the 80% floor.
|
||||||
|
|
||||||
= 3.1.5 =
|
= 3.1.5 =
|
||||||
|
|
||||||
_Release date: 2026-09-18_
|
_Release date: 2026-09-18_
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -90,9 +90,9 @@ msgstr ""
|
||||||
"noindex SEO ha detectat que %s és actiu. Això pot causar conflictes. "
|
"noindex SEO ha detectat que %s és actiu. Això pot causar conflictes. "
|
||||||
"Configureu les opcions en conseqüència."
|
"Configureu les opcions en conseqüència."
|
||||||
|
|
||||||
#: noindex-seo.php:1657 noindex-seo.php:1756
|
#: noindex-seo.php:1659 noindex-seo.php:1760
|
||||||
msgid "Permission denied or invalid nonce."
|
msgid "Permission denied."
|
||||||
msgstr "S'ha denegat el permís o el nonce no és vàlid."
|
msgstr "S'ha denegat el permís."
|
||||||
|
|
||||||
#: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91
|
#: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91
|
||||||
msgid "Search Engine Visibility"
|
msgid "Search Engine Visibility"
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -91,9 +91,9 @@ msgstr ""
|
||||||
"noindex SEO ha detectado que %s está activo. Esto puede causar conflictos. "
|
"noindex SEO ha detectado que %s está activo. Esto puede causar conflictos. "
|
||||||
"Configura las opciones en consecuencia."
|
"Configura las opciones en consecuencia."
|
||||||
|
|
||||||
#: noindex-seo.php:1657 noindex-seo.php:1756
|
#: noindex-seo.php:1659 noindex-seo.php:1760
|
||||||
msgid "Permission denied or invalid nonce."
|
msgid "Permission denied."
|
||||||
msgstr "Permiso denegado o nonce no válido."
|
msgstr "Permiso denegado."
|
||||||
|
|
||||||
#: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91
|
#: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91
|
||||||
msgid "Search Engine Visibility"
|
msgid "Search Engine Visibility"
|
||||||
|
|
|
||||||
|
|
@ -79,9 +79,8 @@ msgstr ""
|
||||||
msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly."
|
msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: noindex-seo.php:1657
|
#: noindex-seo.php:1659 noindex-seo.php:1760
|
||||||
#: noindex-seo.php:1756
|
msgid "Permission denied."
|
||||||
msgid "Permission denied or invalid nonce."
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: noindex-seo.php:1914
|
#: noindex-seo.php:1914
|
||||||
|
|
|
||||||
178
noindex-seo.php
178
noindex-seo.php
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: noindex SEO
|
* Plugin Name: noindex SEO
|
||||||
* Plugin URI: https://www.robotstxt.software/plugins/noindex-seo/
|
* Plugin URI: https://www.robotstxt.software/plugins/noindex-seo/
|
||||||
* Description: Control search engine indexing with robots directives (noindex, nofollow, noarchive, nosnippet, noimageindex) for specific parts of your WordPress site.
|
* Description: Control search engine indexing with robots directives (noindex, nofollow, noarchive, nosnippet, noimageindex) for specific parts of your WordPress site.
|
||||||
* Version: 3.1.5
|
* Version: 3.1.6
|
||||||
* Requires at least: 4.7
|
* Requires at least: 4.7
|
||||||
* Requires PHP: 5.6
|
* Requires PHP: 5.6
|
||||||
* Author: ROBOTSTXT
|
* Author: ROBOTSTXT
|
||||||
|
|
@ -64,8 +64,12 @@ defined( 'ABSPATH' ) || die( 'Bye bye!' );
|
||||||
* oldest tested version and the first with the complete REST
|
* oldest tested version and the first with the complete REST
|
||||||
* API); nonce verification in the form handlers split into a
|
* API); nonce verification in the form handlers split into a
|
||||||
* capability check plus a standalone check_admin_referer().
|
* capability check plus a standalone check_admin_referer().
|
||||||
|
* @since 3.1.6 Admin UI modernization: inline styles replaced with admin
|
||||||
|
* color-scheme-aware, RTL-ready classes (audit M7); stale
|
||||||
|
* form-handler wp_die() message corrected (I2); unreachable
|
||||||
|
* REST fallbacks removed (I5).
|
||||||
*/
|
*/
|
||||||
define( 'NOINDEX_SEO_VERSION', '3.1.5' );
|
define( 'NOINDEX_SEO_VERSION', '3.1.6' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Option key holding the consolidated plugin settings array.
|
* Option key holding the consolidated plugin settings array.
|
||||||
|
|
@ -1062,11 +1066,10 @@ add_action( 'rest_api_init', 'noindex_seo_register_rest_routes' );
|
||||||
*/
|
*/
|
||||||
function noindex_seo_rest_settings_permission_check() {
|
function noindex_seo_rest_settings_permission_check() {
|
||||||
if ( ! current_user_can( 'manage_options' ) ) {
|
if ( ! current_user_can( 'manage_options' ) ) {
|
||||||
$status = function_exists( 'rest_authorization_required_code' ) ? rest_authorization_required_code() : 401;
|
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'noindex_seo_rest_forbidden',
|
'noindex_seo_rest_forbidden',
|
||||||
__( 'You do not have permission to read the noindex SEO settings.', 'noindex-seo' ),
|
__( 'You do not have permission to read the noindex SEO settings.', 'noindex-seo' ),
|
||||||
array( 'status' => $status )
|
array( 'status' => rest_authorization_required_code() )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -1113,11 +1116,10 @@ function noindex_seo_rest_effective_permission_check( WP_REST_Request $request )
|
||||||
|
|
||||||
// Everything else requires edit permission for the specific post.
|
// Everything else requires edit permission for the specific post.
|
||||||
if ( ! current_user_can( 'edit_post', $post->ID ) ) {
|
if ( ! current_user_can( 'edit_post', $post->ID ) ) {
|
||||||
$status = function_exists( 'rest_authorization_required_code' ) ? rest_authorization_required_code() : 401;
|
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'noindex_seo_rest_forbidden',
|
'noindex_seo_rest_forbidden',
|
||||||
__( 'You do not have permission to read directives for this post.', 'noindex-seo' ),
|
__( 'You do not have permission to read directives for this post.', 'noindex-seo' ),
|
||||||
array( 'status' => $status )
|
array( 'status' => rest_authorization_required_code() )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1260,17 +1262,38 @@ add_action( 'add_option_' . NOINDEX_SEO_SETTINGS_KEY, 'noindex_seo_invalidate_ca
|
||||||
/**
|
/**
|
||||||
* Enqueues admin CSS and JavaScript assets.
|
* Enqueues admin CSS and JavaScript assets.
|
||||||
*
|
*
|
||||||
* Loads the modern admin panel styles and interactive JavaScript only on the
|
* The stylesheet loads on every admin screen where the plugin renders UI:
|
||||||
* noindex SEO settings page for better performance.
|
* the settings page, the post list (Robots column + Quick Edit + bulk
|
||||||
|
* actions), the post editor (meta box), and the term editor (per-term
|
||||||
|
* panel) — gated by the same configuration flags that gate the UI itself.
|
||||||
|
* The interactive JavaScript only loads on the settings page.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
|
* @since 3.1.6 Stylesheet also loads on list/edit/term screens so the
|
||||||
|
* meta box, Quick Edit, columns and term panel are styled
|
||||||
|
* through classes instead of inline styles (audit M7).
|
||||||
|
* Gate widened to the `edit-tags` term-list screens and the
|
||||||
|
* `attachment` Edit-Media screen (deploy-audit W1).
|
||||||
*
|
*
|
||||||
* @param string $hook The current admin page hook.
|
* @param string $hook The current admin page hook.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function noindex_seo_enqueue_admin_assets( $hook ) {
|
function noindex_seo_enqueue_admin_assets( $hook ) {
|
||||||
// Only load on our settings page..
|
$is_settings_page = ( 'settings_page_noindex_seo' === $hook );
|
||||||
if ( 'settings_page_noindex_seo' !== $hook ) {
|
|
||||||
|
$load_style = $is_settings_page;
|
||||||
|
if ( ! $load_style ) {
|
||||||
|
$screen = get_current_screen();
|
||||||
|
if ( $screen ) {
|
||||||
|
if ( noindex_seo_get_config( 'granular', 0 ) && in_array( $screen->base, array( 'edit', 'post', 'attachment' ), true ) ) {
|
||||||
|
$load_style = true;
|
||||||
|
} elseif ( noindex_seo_get_config( 'taxonomies_granular', 0 ) && in_array( $screen->base, array( 'term', 'edit-tags' ), true ) ) {
|
||||||
|
$load_style = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! $load_style ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1283,6 +1306,11 @@ function noindex_seo_enqueue_admin_assets( $hook ) {
|
||||||
'all'
|
'all'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// The interactive script is only needed on the settings page..
|
||||||
|
if ( ! $is_settings_page ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Enqueue admin JavaScript..
|
// Enqueue admin JavaScript..
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'noindex-seo-admin',
|
'noindex-seo-admin',
|
||||||
|
|
@ -1656,7 +1684,7 @@ add_action( 'admin_init', 'noindex_seo_detect_conflicts' );
|
||||||
*/
|
*/
|
||||||
function noindex_seo_process_form() {
|
function noindex_seo_process_form() {
|
||||||
if ( ! current_user_can( 'manage_options' ) ) {
|
if ( ! current_user_can( 'manage_options' ) ) {
|
||||||
wp_die( esc_html__( 'Permission denied or invalid nonce.', 'noindex-seo' ) );
|
wp_die( esc_html__( 'Permission denied.', 'noindex-seo' ) );
|
||||||
}
|
}
|
||||||
check_admin_referer( 'update_noindex_seo_nonce' );
|
check_admin_referer( 'update_noindex_seo_nonce' );
|
||||||
|
|
||||||
|
|
@ -1757,7 +1785,7 @@ add_action( 'admin_post_update_noindex_seo', 'noindex_seo_process_form' );
|
||||||
*/
|
*/
|
||||||
function noindex_seo_process_apply_suggestions() {
|
function noindex_seo_process_apply_suggestions() {
|
||||||
if ( ! current_user_can( 'manage_options' ) ) {
|
if ( ! current_user_can( 'manage_options' ) ) {
|
||||||
wp_die( esc_html__( 'Permission denied or invalid nonce.', 'noindex-seo' ) );
|
wp_die( esc_html__( 'Permission denied.', 'noindex-seo' ) );
|
||||||
}
|
}
|
||||||
check_admin_referer( 'noindex_seo_apply_suggestions_nonce' );
|
check_admin_referer( 'noindex_seo_apply_suggestions_nonce' );
|
||||||
|
|
||||||
|
|
@ -1965,49 +1993,49 @@ function noindex_seo_render_meta_box( WP_Post $post ) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="noindex-seo-meta-box">
|
<div class="noindex-seo-meta-box">
|
||||||
<p style="margin-top: 0;">
|
<p class="noindex-seo-meta-override">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="noindex_seo_override" value="1" <?php checked( 1, $override ); ?> id="noindex-seo-override-toggle">
|
<input type="checkbox" name="noindex_seo_override" value="1" <?php checked( 1, $override ); ?> id="noindex-seo-override-toggle">
|
||||||
<strong><?php esc_html_e( 'Override global settings', 'noindex-seo' ); ?></strong>
|
<strong><?php esc_html_e( 'Override global settings', 'noindex-seo' ); ?></strong>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="description" style="margin: 8px 0 12px 0; font-size: 12px; line-height: 1.4;">
|
<p class="description noindex-seo-meta-note">
|
||||||
<?php esc_html_e( 'When enabled, these directives will override the global settings for this specific content.', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'When enabled, these directives will override the global settings for this specific content.', 'noindex-seo' ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div id="noindex-seo-directives-container" style="<?php echo $override ? '' : 'display: none;'; ?>">
|
<div id="noindex-seo-directives-container" class="noindex-seo-directives-box<?php echo $override ? '' : ' hidden'; ?>">
|
||||||
<div style="border-top: 1px solid #ddd; padding-top: 12px; margin-bottom: 12px;">
|
<div class="noindex-seo-directive-list">
|
||||||
<label style="display: flex; align-items: center; margin-bottom: 8px;">
|
<label class="noindex-seo-directive-row">
|
||||||
<input type="checkbox" name="noindex_seo_noindex" value="1" <?php checked( 1, $noindex ); ?> style="margin: 0 8px 0 0;">
|
<input type="checkbox" name="noindex_seo_noindex" value="1" <?php checked( 1, $noindex ); ?>>
|
||||||
<span><strong>🔍 noindex</strong> — <?php esc_html_e( 'Prevent indexing', 'noindex-seo' ); ?></span>
|
<span><strong>🔍 noindex</strong> — <?php esc_html_e( 'Prevent indexing', 'noindex-seo' ); ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label style="display: flex; align-items: center; margin-bottom: 8px;">
|
<label class="noindex-seo-directive-row">
|
||||||
<input type="checkbox" name="noindex_seo_nofollow" value="1" <?php checked( 1, $nofollow ); ?> style="margin: 0 8px 0 0;">
|
<input type="checkbox" name="noindex_seo_nofollow" value="1" <?php checked( 1, $nofollow ); ?>>
|
||||||
<span><strong>🔗 nofollow</strong> — <?php esc_html_e( 'Prevent link following', 'noindex-seo' ); ?></span>
|
<span><strong>🔗 nofollow</strong> — <?php esc_html_e( 'Prevent link following', 'noindex-seo' ); ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label style="display: flex; align-items: center; margin-bottom: 8px;">
|
<label class="noindex-seo-directive-row">
|
||||||
<input type="checkbox" name="noindex_seo_noarchive" value="1" <?php checked( 1, $noarchive ); ?> style="margin: 0 8px 0 0;">
|
<input type="checkbox" name="noindex_seo_noarchive" value="1" <?php checked( 1, $noarchive ); ?>>
|
||||||
<span><strong>💾 noarchive</strong> — <?php esc_html_e( 'Prevent caching', 'noindex-seo' ); ?></span>
|
<span><strong>💾 noarchive</strong> — <?php esc_html_e( 'Prevent caching', 'noindex-seo' ); ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label style="display: flex; align-items: center; margin-bottom: 8px;">
|
<label class="noindex-seo-directive-row">
|
||||||
<input type="checkbox" name="noindex_seo_nosnippet" value="1" <?php checked( 1, $nosnippet ); ?> style="margin: 0 8px 0 0;">
|
<input type="checkbox" name="noindex_seo_nosnippet" value="1" <?php checked( 1, $nosnippet ); ?>>
|
||||||
<span><strong>📄 nosnippet</strong> — <?php esc_html_e( 'Prevent snippets', 'noindex-seo' ); ?></span>
|
<span><strong>📄 nosnippet</strong> — <?php esc_html_e( 'Prevent snippets', 'noindex-seo' ); ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label style="display: flex; align-items: center; margin-bottom: 8px;">
|
<label class="noindex-seo-directive-row">
|
||||||
<input type="checkbox" name="noindex_seo_noimageindex" value="1" <?php checked( 1, $noimageindex ); ?> style="margin: 0 8px 0 0;">
|
<input type="checkbox" name="noindex_seo_noimageindex" value="1" <?php checked( 1, $noimageindex ); ?>>
|
||||||
<span><strong>🖼️ noimageindex</strong> — <?php esc_html_e( 'Prevent image indexing', 'noindex-seo' ); ?></span>
|
<span><strong>🖼️ noimageindex</strong> — <?php esc_html_e( 'Prevent image indexing', 'noindex-seo' ); ?></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Information Section -->
|
<!-- Information Section -->
|
||||||
<div style="margin-top: 12px; padding: 10px; background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 4px;">
|
<div class="noindex-seo-reference">
|
||||||
<p style="margin: 0 0 8px 0; font-size: 11px; font-weight: 600; color: #333;">
|
<p class="noindex-seo-reference-title">
|
||||||
<?php esc_html_e( 'Effective Directives:', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Effective Directives:', 'noindex-seo' ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -2032,23 +2060,23 @@ function noindex_seo_render_meta_box( WP_Post $post ) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php if ( ! empty( $active_directives ) ) : ?>
|
<?php if ( ! empty( $active_directives ) ) : ?>
|
||||||
<p style="margin: 0 0 4px 0; padding: 6px; background: #e3f2fd; border-left: 3px solid #2196f3; font-size: 11px;">
|
<p class="noindex-seo-ref noindex-seo-ref-override">
|
||||||
<strong style="color: #1976d2;"><?php esc_html_e( 'Override active:', 'noindex-seo' ); ?></strong><br>
|
<strong><?php esc_html_e( 'Override active:', 'noindex-seo' ); ?></strong><br>
|
||||||
<code style="font-size: 10px;"><?php echo esc_html( implode( ', ', $active_directives ) ); ?></code>
|
<code><?php echo esc_html( implode( ', ', $active_directives ) ); ?></code>
|
||||||
</p>
|
</p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<p style="margin: 0; padding: 6px; background: #fff3cd; border-left: 3px solid #ffc107; font-size: 11px; color: #856404;">
|
<p class="noindex-seo-ref noindex-seo-ref-none">
|
||||||
<?php esc_html_e( 'Override enabled but no directives selected', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Override enabled but no directives selected', 'noindex-seo' ); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<?php if ( ! empty( $global_directives ) ) : ?>
|
<?php if ( ! empty( $global_directives ) ) : ?>
|
||||||
<p style="margin: 0; padding: 6px; background: #fff; border-left: 3px solid #9e9e9e; font-size: 11px;">
|
<p class="noindex-seo-ref noindex-seo-ref-global">
|
||||||
<strong style="color: #666;"><?php esc_html_e( 'Global settings:', 'noindex-seo' ); ?></strong><br>
|
<strong><?php esc_html_e( 'Global settings:', 'noindex-seo' ); ?></strong><br>
|
||||||
<code style="font-size: 10px;"><?php echo esc_html( implode( ', ', $global_directives ) ); ?></code>
|
<code><?php echo esc_html( implode( ', ', $global_directives ) ); ?></code>
|
||||||
</p>
|
</p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<p style="margin: 0; padding: 6px; background: #e8f5e9; border-left: 3px solid #4caf50; font-size: 11px; color: #2e7d32;">
|
<p class="noindex-seo-ref noindex-seo-ref-ok">
|
||||||
<?php esc_html_e( 'No restrictions (indexable)', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'No restrictions (indexable)', 'noindex-seo' ); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
@ -2061,7 +2089,7 @@ function noindex_seo_render_meta_box( WP_Post $post ) {
|
||||||
var container = document.getElementById('noindex-seo-directives-container');
|
var container = document.getElementById('noindex-seo-directives-container');
|
||||||
if (toggle && container) {
|
if (toggle && container) {
|
||||||
toggle.addEventListener('change', function() {
|
toggle.addEventListener('change', function() {
|
||||||
container.style.display = this.checked ? 'block' : 'none';
|
container.classList.toggle('hidden', !this.checked);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
@ -2247,9 +2275,9 @@ function noindex_seo_render_term_form_fields( WP_Term $term ) {
|
||||||
<?php esc_html_e( 'Override global settings for this term', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Override global settings for this term', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="noindex-seo-term-directives" style="margin-top: 8px; <?php echo $override ? '' : 'display:none;'; ?>">
|
<div class="noindex-seo-term-directives<?php echo $override ? '' : ' hidden'; ?>">
|
||||||
<?php foreach ( $directives as $directive ) : ?>
|
<?php foreach ( $directives as $directive ) : ?>
|
||||||
<label style="display: inline-block; margin-right: 12px;">
|
<label class="noindex-seo-term-directive">
|
||||||
<input type="checkbox" name="noindex_seo_<?php echo esc_attr( $directive ); ?>" value="1" <?php checked( 1, $values[ $directive ] ); ?> />
|
<input type="checkbox" name="noindex_seo_<?php echo esc_attr( $directive ); ?>" value="1" <?php checked( 1, $values[ $directive ] ); ?> />
|
||||||
<?php echo esc_html( $directive ); ?>
|
<?php echo esc_html( $directive ); ?>
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -2268,7 +2296,7 @@ function noindex_seo_render_term_form_fields( WP_Term $term ) {
|
||||||
var group = document.querySelector('.noindex-seo-term-directives');
|
var group = document.querySelector('.noindex-seo-term-directives');
|
||||||
if (!override || !group) return;
|
if (!override || !group) return;
|
||||||
override.addEventListener('change', function () {
|
override.addEventListener('change', function () {
|
||||||
group.style.display = override.checked ? '' : 'none';
|
group.classList.toggle('hidden', !override.checked);
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -2404,7 +2432,7 @@ function noindex_seo_display_custom_column( $column, $post_id ) {
|
||||||
echo '></div>';
|
echo '></div>';
|
||||||
|
|
||||||
if ( ! $override ) {
|
if ( ! $override ) {
|
||||||
echo '<span style="color: #999;">—</span>';
|
echo '<span class="noindex-seo-col-empty">—</span>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2419,12 +2447,12 @@ function noindex_seo_display_custom_column( $column, $post_id ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $active ) ) {
|
if ( empty( $active ) ) {
|
||||||
echo '<span style="color: #999;">' . esc_html__( 'Override (none)', 'noindex-seo' ) . '</span>';
|
echo '<span class="noindex-seo-col-empty">' . esc_html__( 'Override (none)', 'noindex-seo' ) . '</span>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display active directives as badges.
|
// Display active directives as badges.
|
||||||
echo '<div style="display: flex; flex-wrap: wrap; gap: 4px;">';
|
echo '<div class="noindex-seo-badges">';
|
||||||
foreach ( $active as $directive ) {
|
foreach ( $active as $directive ) {
|
||||||
$emoji = '';
|
$emoji = '';
|
||||||
switch ( $directive ) {
|
switch ( $directive ) {
|
||||||
|
|
@ -2444,7 +2472,7 @@ function noindex_seo_display_custom_column( $column, $post_id ) {
|
||||||
$emoji = '🖼️';
|
$emoji = '🖼️';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
echo '<span style="display: inline-block; padding: 2px 6px; background: #eff6ff; border: 1px solid #667eea; border-radius: 3px; font-size: 11px; line-height: 1.2;">';
|
echo '<span class="noindex-seo-badge-item">';
|
||||||
echo esc_html( $emoji . ' ' . $directive );
|
echo esc_html( $emoji . ' ' . $directive );
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
}
|
}
|
||||||
|
|
@ -2532,7 +2560,7 @@ function noindex_seo_display_term_custom_column( $content, $column, $term_id ) {
|
||||||
$override = ( is_scalar( $override_raw ) && 1 === absint( $override_raw ) ) ? 1 : 0;
|
$override = ( is_scalar( $override_raw ) && 1 === absint( $override_raw ) ) ? 1 : 0;
|
||||||
|
|
||||||
if ( ! $override ) {
|
if ( ! $override ) {
|
||||||
return '<span style="color: #999;">—</span>';
|
return '<span class="noindex-seo-col-empty">—</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
|
$directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
|
||||||
|
|
@ -2545,7 +2573,7 @@ function noindex_seo_display_term_custom_column( $content, $column, $term_id ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $active ) ) {
|
if ( empty( $active ) ) {
|
||||||
return '<span style="color: #999;">' . esc_html__( 'Override (none)', 'noindex-seo' ) . '</span>';
|
return '<span class="noindex-seo-col-empty">' . esc_html__( 'Override (none)', 'noindex-seo' ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$emojis = array(
|
$emojis = array(
|
||||||
|
|
@ -2556,9 +2584,9 @@ function noindex_seo_display_term_custom_column( $content, $column, $term_id ) {
|
||||||
'noimageindex' => '🖼️',
|
'noimageindex' => '🖼️',
|
||||||
);
|
);
|
||||||
|
|
||||||
$out = '<div style="display: flex; flex-wrap: wrap; gap: 4px;">';
|
$out = '<div class="noindex-seo-badges">';
|
||||||
foreach ( $active as $directive ) {
|
foreach ( $active as $directive ) {
|
||||||
$out .= '<span style="display: inline-block; padding: 2px 6px; background: #eff6ff; border: 1px solid #667eea; border-radius: 3px; font-size: 11px; line-height: 1.2;">';
|
$out .= '<span class="noindex-seo-badge-item">';
|
||||||
$out .= esc_html( $emojis[ $directive ] . ' ' . $directive );
|
$out .= esc_html( $emojis[ $directive ] . ' ' . $directive );
|
||||||
$out .= '</span>';
|
$out .= '</span>';
|
||||||
}
|
}
|
||||||
|
|
@ -2596,29 +2624,29 @@ function noindex_seo_quick_edit_fields( $column_name, $post_type ) { // phpcs:ig
|
||||||
<div class="inline-edit-col">
|
<div class="inline-edit-col">
|
||||||
<label class="inline-edit-group">
|
<label class="inline-edit-group">
|
||||||
<span class="title"><?php esc_html_e( 'Robots Directives', 'noindex-seo' ); ?></span>
|
<span class="title"><?php esc_html_e( 'Robots Directives', 'noindex-seo' ); ?></span>
|
||||||
<div style="padding: 5px 0;">
|
<div class="noindex-seo-quick-edit-list">
|
||||||
<label style="display: block; margin-bottom: 6px;">
|
<label class="noindex-seo-quick-edit-label">
|
||||||
<input type="checkbox" name="noindex_seo_override" value="1" id="noindex-seo-quick-edit-override">
|
<input type="checkbox" name="noindex_seo_override" value="1" id="noindex-seo-quick-edit-override">
|
||||||
<strong><?php esc_html_e( 'Override global settings', 'noindex-seo' ); ?></strong>
|
<strong><?php esc_html_e( 'Override global settings', 'noindex-seo' ); ?></strong>
|
||||||
</label>
|
</label>
|
||||||
<div id="noindex-seo-quick-edit-directives" style="margin-left: 20px; margin-top: 8px; display: none;">
|
<div id="noindex-seo-quick-edit-directives" class="noindex-seo-quick-edit-nested hidden">
|
||||||
<label style="display: block; margin-bottom: 4px;">
|
<label class="noindex-seo-quick-edit-option">
|
||||||
<input type="checkbox" name="noindex_seo_noindex" value="1">
|
<input type="checkbox" name="noindex_seo_noindex" value="1">
|
||||||
<?php esc_html_e( '🔍 noindex', 'noindex-seo' ); ?>
|
<?php esc_html_e( '🔍 noindex', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<label style="display: block; margin-bottom: 4px;">
|
<label class="noindex-seo-quick-edit-option">
|
||||||
<input type="checkbox" name="noindex_seo_nofollow" value="1">
|
<input type="checkbox" name="noindex_seo_nofollow" value="1">
|
||||||
<?php esc_html_e( '🔗 nofollow', 'noindex-seo' ); ?>
|
<?php esc_html_e( '🔗 nofollow', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<label style="display: block; margin-bottom: 4px;">
|
<label class="noindex-seo-quick-edit-option">
|
||||||
<input type="checkbox" name="noindex_seo_noarchive" value="1">
|
<input type="checkbox" name="noindex_seo_noarchive" value="1">
|
||||||
<?php esc_html_e( '💾 noarchive', 'noindex-seo' ); ?>
|
<?php esc_html_e( '💾 noarchive', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<label style="display: block; margin-bottom: 4px;">
|
<label class="noindex-seo-quick-edit-option">
|
||||||
<input type="checkbox" name="noindex_seo_nosnippet" value="1">
|
<input type="checkbox" name="noindex_seo_nosnippet" value="1">
|
||||||
<?php esc_html_e( '📄 nosnippet', 'noindex-seo' ); ?>
|
<?php esc_html_e( '📄 nosnippet', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<label style="display: block; margin-bottom: 4px;">
|
<label class="noindex-seo-quick-edit-option">
|
||||||
<input type="checkbox" name="noindex_seo_noimageindex" value="1">
|
<input type="checkbox" name="noindex_seo_noimageindex" value="1">
|
||||||
<?php esc_html_e( '🖼️ noimageindex', 'noindex-seo' ); ?>
|
<?php esc_html_e( '🖼️ noimageindex', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -3326,7 +3354,7 @@ function noindex_seo_admin() {
|
||||||
forbids nested <form> elements; a stray </form> inside the parent
|
forbids nested <form> elements; a stray </form> inside the parent
|
||||||
would close the parent early and orphan the Save Changes button and
|
would close the parent early and orphan the Save Changes button and
|
||||||
all directive checkboxes. -->
|
all directive checkboxes. -->
|
||||||
<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" style="margin: 0 0 20px 0;">
|
<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" class="noindex-seo-apply-form">
|
||||||
<input type="hidden" name="action" value="noindex_seo_apply_suggestions">
|
<input type="hidden" name="action" value="noindex_seo_apply_suggestions">
|
||||||
<?php wp_nonce_field( 'noindex_seo_apply_suggestions_nonce' ); ?>
|
<?php wp_nonce_field( 'noindex_seo_apply_suggestions_nonce' ); ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -3340,7 +3368,7 @@ function noindex_seo_admin() {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<span class="description" style="margin-left: 8px; vertical-align: middle;">
|
<span class="description noindex-seo-apply-note">
|
||||||
<?php esc_html_e( 'Enables all 5 directives on the 12 contexts flagged "Recommended" (privacy policy, date archives, pagination, search results, attachment pages, previews, 404). Review and save.', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Enables all 5 directives on the 12 contexts flagged "Recommended" (privacy policy, date archives, pagination, search results, attachment pages, previews, 404). Review and save.', 'noindex-seo' ); ?>
|
||||||
</span>
|
</span>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -3388,15 +3416,15 @@ function noindex_seo_admin() {
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="noindex-seo-config-option" style="margin-top: 20px;">
|
<div class="noindex-seo-config-option">
|
||||||
<div style="flex: 1;">
|
<div class="noindex-seo-config-body">
|
||||||
<label for="noindex_seo_config_method" style="display: block; font-weight: 600; margin-bottom: 8px; color: #92400e;">
|
<label for="noindex_seo_config_method" class="noindex-seo-config-label">
|
||||||
<?php esc_html_e( 'Implementation Method', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Implementation Method', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
id="noindex_seo_config_method"
|
id="noindex_seo_config_method"
|
||||||
name="noindex_seo_config_method"
|
name="noindex_seo_config_method"
|
||||||
style="width: 100%; max-width: 400px; padding: 8px; border: 1px solid #fcd34d; border-radius: 4px; background: #fff; color: #78350f;"
|
class="noindex-seo-config-select"
|
||||||
>
|
>
|
||||||
<option value="meta" <?php selected( $option_config_method, 'meta' ); ?>>
|
<option value="meta" <?php selected( $option_config_method, 'meta' ); ?>>
|
||||||
<?php esc_html_e( 'HTML Meta Tags (default, easier to verify)', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'HTML Meta Tags (default, easier to verify)', 'noindex-seo' ); ?>
|
||||||
|
|
@ -3408,13 +3436,13 @@ function noindex_seo_admin() {
|
||||||
<?php esc_html_e( 'Both (maximum compatibility)', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Both (maximum compatibility)', 'noindex-seo' ); ?>
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<p style="margin: 8px 0 0 0; font-size: 13px; color: #92400e; line-height: 1.5;">
|
<p class="description">
|
||||||
<?php esc_html_e( 'Choose how noindex directives are sent to search engines. Meta tags work for HTML pages. HTTP headers work for all content types including PDFs, images, and feeds.', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Choose how noindex directives are sent to search engines. Meta tags work for HTML pages. HTTP headers work for all content types including PDFs, images, and feeds.', 'noindex-seo' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="noindex-seo-config-option" style="margin-top: 20px;">
|
<div class="noindex-seo-config-option">
|
||||||
<label class="noindex-seo-switch">
|
<label class="noindex-seo-switch">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|
@ -3425,17 +3453,17 @@ function noindex_seo_admin() {
|
||||||
>
|
>
|
||||||
<span class="noindex-seo-slider"></span>
|
<span class="noindex-seo-slider"></span>
|
||||||
</label>
|
</label>
|
||||||
<div style="flex: 1;">
|
<div class="noindex-seo-config-body">
|
||||||
<label for="noindex_seo_config_granular" style="display: block; font-weight: 600; color: #1e40af;">
|
<label for="noindex_seo_config_granular" class="noindex-seo-config-label">
|
||||||
<?php esc_html_e( 'Enable per-post/page granular control', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Enable per-post/page granular control', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<p style="margin: 4px 0 0 0; font-size: 13px; color: #64748b; line-height: 1.5;">
|
<p class="description">
|
||||||
<?php esc_html_e( 'When enabled, a meta box will appear in the post/page editor allowing you to override global settings for individual content. Useful for specific pages that need different robots directives.', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'When enabled, a meta box will appear in the post/page editor allowing you to override global settings for individual content. Useful for specific pages that need different robots directives.', 'noindex-seo' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="noindex-seo-config-option" style="margin-top: 20px;">
|
<div class="noindex-seo-config-option">
|
||||||
<label class="noindex-seo-switch">
|
<label class="noindex-seo-switch">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|
@ -3446,17 +3474,17 @@ function noindex_seo_admin() {
|
||||||
>
|
>
|
||||||
<span class="noindex-seo-slider"></span>
|
<span class="noindex-seo-slider"></span>
|
||||||
</label>
|
</label>
|
||||||
<div style="flex: 1;">
|
<div class="noindex-seo-config-body">
|
||||||
<label for="noindex_seo_config_taxonomies_granular" style="display: block; font-weight: 600; color: #1e40af;">
|
<label for="noindex_seo_config_taxonomies_granular" class="noindex-seo-config-label">
|
||||||
<?php esc_html_e( 'Enable per-term granular control', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Enable per-term granular control', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<p style="margin: 4px 0 0 0; font-size: 13px; color: #64748b; line-height: 1.5;">
|
<p class="description">
|
||||||
<?php esc_html_e( 'When enabled, a "Search Engine Visibility" panel will appear on the Edit screen for every public taxonomy (categories, tags, and custom taxonomies like WooCommerce product categories). Useful for noindexing a specific category or tag without affecting the others.', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'When enabled, a "Search Engine Visibility" panel will appear on the Edit screen for every public taxonomy (categories, tags, and custom taxonomies like WooCommerce product categories). Useful for noindexing a specific category or tag without affecting the others.', 'noindex-seo' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="noindex-seo-config-option" style="margin-top: 20px;">
|
<div class="noindex-seo-config-option">
|
||||||
<label class="noindex-seo-switch">
|
<label class="noindex-seo-switch">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|
@ -3467,11 +3495,11 @@ function noindex_seo_admin() {
|
||||||
>
|
>
|
||||||
<span class="noindex-seo-slider"></span>
|
<span class="noindex-seo-slider"></span>
|
||||||
</label>
|
</label>
|
||||||
<div style="flex: 1;">
|
<div class="noindex-seo-config-body">
|
||||||
<label for="noindex_seo_config_delete_on_uninstall" style="display: block; font-weight: 600; color: #b91c1c;">
|
<label for="noindex_seo_config_delete_on_uninstall" class="noindex-seo-config-label noindex-seo-config-label-danger">
|
||||||
<?php esc_html_e( 'Delete all plugin data on uninstall', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'Delete all plugin data on uninstall', 'noindex-seo' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<p style="margin: 4px 0 0 0; font-size: 13px; color: #64748b; line-height: 1.5;">
|
<p class="description">
|
||||||
<?php esc_html_e( 'When enabled, all settings and per-post robots directives will be permanently deleted when the plugin is uninstalled. By default data is preserved.', 'noindex-seo' ); ?>
|
<?php esc_html_e( 'When enabled, all settings and per-post robots directives will be permanently deleted when the plugin is uninstalled. By default data is preserved.', 'noindex-seo' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
14
readme.txt
14
readme.txt
|
|
@ -3,9 +3,9 @@ Contributors: robotstxt, javiercasares
|
||||||
Tags: seo, noindex, nofollow, noarchive, robots
|
Tags: seo, noindex, nofollow, noarchive, robots
|
||||||
Requires at least: 4.7
|
Requires at least: 4.7
|
||||||
Tested up to: 7.2
|
Tested up to: 7.2
|
||||||
Stable tag: 3.1.5
|
Stable tag: 3.1.6
|
||||||
Requires PHP: 5.6
|
Requires PHP: 5.6
|
||||||
Version: 3.1.5
|
Version: 3.1.6
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
||||||
|
|
||||||
|
|
@ -139,6 +139,10 @@ No. By default all plugin data is preserved on uninstall. If you want a complete
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 3.1.6 =
|
||||||
|
|
||||||
|
Admin UI modernization: all inline styles removed in favour of WordPress admin color-scheme-aware, RTL-ready classes (follows the admin color schemes instead of hardcoded colors); stale form-handler message corrected; unreachable REST fallbacks removed; Catalan and Spanish translations updated.
|
||||||
|
|
||||||
= 3.1.5 =
|
= 3.1.5 =
|
||||||
|
|
||||||
Maintenance review: WordPress floor corrected to 4.7 (oldest tested version, first with the complete REST API) and tested up to 7.2; nonce verification in the form handlers split into a capability check plus a standalone `check_admin_referer()`; dev dependencies updated; test suite expanded to 147 tests with 94.78% coverage.
|
Maintenance review: WordPress floor corrected to 4.7 (oldest tested version, first with the complete REST API) and tested up to 7.2; nonce verification in the form handlers split into a capability check plus a standalone `check_admin_referer()`; dev dependencies updated; test suite expanded to 147 tests with 94.78% coverage.
|
||||||
|
|
@ -147,10 +151,6 @@ Maintenance review: WordPress floor corrected to 4.7 (oldest tested version, fir
|
||||||
|
|
||||||
Compatibility release: WordPress 4.0+ and PHP 5.6+ supported again (the classic `<meta name="robots">` output covers WordPress versions without the `wp_robots` API, and every newer-API integration degrades gracefully). Branding moved to robotstxt.software.
|
Compatibility release: WordPress 4.0+ and PHP 5.6+ supported again (the classic `<meta name="robots">` output covers WordPress versions without the `wp_robots` API, and every newer-API integration degrades gracefully). Branding moved to robotstxt.software.
|
||||||
|
|
||||||
= 3.1.2 =
|
|
||||||
|
|
||||||
Audit-driven maintenance release: fixed the composer-audit gate in the preflight script, un-nested the settings page forms, added `load_plugin_textdomain()` for the bundled translations, pinned all dev dependencies, wired up coverage measurement.
|
|
||||||
|
|
||||||
= Previous versions =
|
= Previous versions =
|
||||||
|
|
||||||
If you want to see the full changelog, visit the [noindex SEO plugin page](https://www.robotstxt.software/plugins/noindex-seo/).
|
If you want to see the full changelog, visit the [noindex SEO plugin page](https://www.robotstxt.software/plugins/noindex-seo/).
|
||||||
|
|
@ -171,6 +171,6 @@ This plugin adheres to the following security measures and review protocols for
|
||||||
|
|
||||||
== Vulnerabilities ==
|
== Vulnerabilities ==
|
||||||
|
|
||||||
* No vulnerabilities have been published up to version 3.1.5.
|
* No vulnerabilities have been published up to version 3.1.6.
|
||||||
|
|
||||||
Found a security vulnerability? Please report it to us privately at the [noindex SEO GitHub repository](https://github.com/javiercasares/noindex-seo/security/advisories/new).
|
Found a security vulnerability? Please report it to us privately at the [noindex SEO GitHub repository](https://github.com/javiercasares/noindex-seo/security/advisories/new).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue