From b66c727a9570f4bcb5a920e22a0ff21f534cba8f Mon Sep 17 00:00:00 2001 From: Javier Casares Date: Tue, 3 Nov 2026 17:01:44 +0000 Subject: [PATCH 1/7] v3.1.6 --- assets/css/admin.css | 541 +++++++++++++++++++++------------ changelog.txt | 38 +++ languages/noindex-seo-ca.mo | Bin 16146 -> 16104 bytes languages/noindex-seo-ca.po | 6 +- languages/noindex-seo-es_ES.mo | Bin 16119 -> 16083 bytes languages/noindex-seo-es_ES.po | 6 +- languages/noindex-seo.pot | 5 +- noindex-seo.php | 178 ++++++----- readme.txt | 14 +- 9 files changed, 496 insertions(+), 292 deletions(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index 8910d4a..39b51b9 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1,7 +1,9 @@ /** - * noindex SEO - Admin Panel Styles - * Version: 2.0.0 - * Modern, visual admin interface + * noindex SEO - Admin styles + * + * 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; } -/* Header styles removed - using WordPress default styles */ - /* =========================== Tabs Navigation =========================== */ @@ -21,7 +21,7 @@ display: flex; gap: 10px; margin-bottom: 30px; - border-bottom: 2px solid #e5e7eb; + border-bottom: 2px solid #c3c4c7; flex-wrap: wrap; } @@ -29,23 +29,23 @@ padding: 12px 24px; background: transparent; border: none; - color: #6b7280; + color: #646970; font-size: 15px; font-weight: 500; cursor: pointer; border-bottom: 3px solid transparent; - transition: all 0.3s ease; + transition: color 0.3s ease; position: relative; top: 2px; } -.noindex-seo-tab:hover { - color: #667eea; +.noindex-seo-tab:hover, +.noindex-seo-tab.active { + color: var(--wp-admin-theme-color, #2271b1); } .noindex-seo-tab.active { - color: #667eea; - border-bottom-color: #667eea; + border-bottom-color: var(--wp-admin-theme-color, #2271b1); } /* =========================== @@ -57,10 +57,10 @@ .noindex-seo-tab-content.active { display: block; - animation: fadeIn 0.3s ease; + animation: noindexSeoFadeIn 0.3s ease; } -@keyframes fadeIn { +@keyframes noindexSeoFadeIn { from { opacity: 0; transform: translateY(10px); @@ -80,13 +80,13 @@ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); margin-bottom: 20px; overflow: hidden; - border: 1px solid #e5e7eb; + border: 1px solid #c3c4c7; } .noindex-seo-card-header { padding: 20px 24px; - background: #f9fafb; - border-bottom: 1px solid #e5e7eb; + background: #f6f7f7; + border-bottom: 1px solid #c3c4c7; display: flex; align-items: center; justify-content: space-between; @@ -95,28 +95,28 @@ } .noindex-seo-card-header:hover { - background: #f3f4f6; + background: #f0f0f1; } .noindex-seo-card-header h3 { margin: 0; font-size: 16px; font-weight: 600; - color: #111827; + color: #2c3338; display: flex; align-items: center; gap: 10px; } .noindex-seo-card-header .dashicons { - color: #667eea; + color: var(--wp-admin-theme-color, #2271b1); font-size: 20px; width: 20px; height: 20px; } .noindex-seo-card-toggle { - color: #9ca3af; + color: #8c8f94; transition: transform 0.3s ease; } @@ -124,6 +124,10 @@ transform: rotate(-90deg); } +[dir="rtl"] .noindex-seo-card.collapsed .noindex-seo-card-toggle { + transform: rotate(90deg); +} + .noindex-seo-card-body { padding: 24px; display: grid; @@ -140,10 +144,10 @@ =========================== */ .noindex-seo-option { padding: 24px; - background: #f9fafb; + background: #f6f7f7; border-radius: 8px; - border: 1px solid #e5e7eb; - transition: all 0.2s ease; + border: 1px solid #c3c4c7; + transition: border-color 0.2s ease; margin-bottom: 20px; } @@ -152,15 +156,15 @@ } .noindex-seo-option:hover { - background: #f3f4f6; - border-color: #d1d5db; + background: #f0f0f1; + border-color: #8c8f94; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .noindex-seo-option-header { margin-bottom: 18px; padding-bottom: 14px; - border-bottom: 1px solid #e5e7eb; + border-bottom: 1px solid #c3c4c7; } .noindex-seo-option-title { @@ -169,7 +173,7 @@ gap: 8px; margin-bottom: 6px; font-size: 15px; - color: #111827; + color: #2c3338; } .noindex-seo-option-title strong { @@ -177,32 +181,12 @@ } .noindex-seo-option-description { - color: #6b7280; + color: #646970; font-size: 13px; line-height: 1.5; 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 =========================== */ @@ -219,18 +203,18 @@ gap: 10px; padding: 10px 14px; background: #fff; - border: 2px solid #e5e7eb; + border: 2px solid #c3c4c7; border-radius: 6px; cursor: pointer; - transition: all 0.2s ease; + transition: border-color 0.2s ease; user-select: none; font-size: 13px; font-weight: 500; - color: #374151; + color: #3c434a; } .noindex-seo-directive-checkbox:hover { - border-color: #d1d5db; + border-color: #8c8f94; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } @@ -239,21 +223,16 @@ width: 18px; height: 18px; cursor: pointer; - accent-color: #667eea; flex-shrink: 0; } -.noindex-seo-directive-checkbox input[type="checkbox"]:checked { - background-color: #667eea; -} - .noindex-seo-directive-checkbox:has(input:checked) { - border-color: #667eea; - background-color: #eff6ff; + border-color: var(--wp-admin-theme-color, #2271b1); + background-color: #f0f6fc; } .noindex-seo-directive-checkbox:has(input:checked) .directive-label { - color: #667eea; + color: var(--wp-admin-theme-color, #2271b1); font-weight: 600; } @@ -273,21 +252,22 @@ } .directive-description { - color: #6b7280; + color: #646970; font-size: 12px; font-weight: 400; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + font-family: inherit; flex: 2; } /* =========================== - Toggle Switch (Modern) + Toggle Switch =========================== */ .noindex-seo-switch { position: relative; display: inline-block; width: 48px; height: 26px; + flex-shrink: 0; } .noindex-seo-switch input { @@ -303,7 +283,7 @@ left: 0; right: 0; bottom: 0; - background-color: #cbd5e1; + background-color: #8c8f94; transition: 0.3s; border-radius: 34px; } @@ -315,24 +295,34 @@ width: 20px; left: 3px; bottom: 3px; - background-color: white; + background-color: #fff; transition: 0.3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } input:checked + .noindex-seo-slider { - background-color: #667eea; + background-color: var(--wp-admin-theme-color, #2271b1); } -input:focus + .noindex-seo-slider { - box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2); +input:focus-visible + .noindex-seo-slider { + outline: 2px solid var(--wp-admin-theme-color, #2271b1); + outline-offset: 2px; } input:checked + .noindex-seo-slider:before { 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 =========================== */ @@ -348,18 +338,18 @@ input:checked + .noindex-seo-slider:before { } .noindex-seo-badge.recommended { - background: #dcfce7; - color: #166534; + background: #edfaef; + color: #076b32; } .noindex-seo-badge.not-recommended { - background: #fee2e2; - color: #991b1b; + background: #fcf0f1; + color: #b32d2e; } .noindex-seo-badge.neutral { - background: #e0e7ff; - color: #3730a3; + background: #f0f0f1; + color: #3c434a; } .noindex-seo-badge .dashicons { @@ -368,12 +358,24 @@ input:checked + .noindex-seo-slider:before { 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 =========================== */ .noindex-seo-general-config { - background: #fffbeb; - border: 1px solid #fcd34d; + background: #fff; + border: 1px solid #c3c4c7; border-radius: 8px; padding: 20px; margin-bottom: 30px; @@ -382,14 +384,14 @@ input:checked + .noindex-seo-slider:before { .noindex-seo-general-config h2 { margin: 0 0 16px 0; font-size: 18px; - color: #92400e; + color: #2c3338; display: flex; align-items: center; gap: 8px; } .noindex-seo-general-config .dashicons { - color: #f59e0b; + color: var(--wp-admin-theme-color, #2271b1); } .noindex-seo-config-option { @@ -398,18 +400,38 @@ input:checked + .noindex-seo-slider:before { gap: 12px; } +.noindex-seo-config-option + .noindex-seo-config-option { + margin-top: 20px; +} + .noindex-seo-config-option label { - color: #78350f; - font-weight: 500; 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 =========================== */ .noindex-seo-alert { - background: #fef3c7; - border-left: 4px solid #f59e0b; + background: #fcf9e8; + border-inline-start: 4px solid #dba617; padding: 16px 20px; margin-bottom: 24px; border-radius: 4px; @@ -419,22 +441,17 @@ input:checked + .noindex-seo-slider:before { } .noindex-seo-alert .dashicons { - color: #d97706; + color: #dba617; flex-shrink: 0; margin-top: 2px; } .noindex-seo-alert p { margin: 0; - color: #92400e; + color: #3c434a; line-height: 1.6; } -/* =========================== - Submit Button - =========================== */ -/* Submit button styles removed - using WordPress default submit_button() */ - /* =========================== Search/Filter =========================== */ @@ -445,17 +462,12 @@ input:checked + .noindex-seo-slider:before { .noindex-seo-search input { width: 100%; 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 { outline: none; - border-color: #667eea; - box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); + border-color: var(--wp-admin-theme-color, #2271b1); + 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 { - background: white; + background: #fff; padding: 20px; border-radius: 8px; - border: 1px solid #e5e7eb; + border: 1px solid #c3c4c7; text-align: center; } .noindex-seo-stat-number { font-size: 32px; font-weight: 700; - color: #667eea; + color: var(--wp-admin-theme-color, #2271b1); margin: 0; line-height: 1; } .noindex-seo-stat-label { - color: #6b7280; + color: #646970; font-size: 13px; margin-top: 8px; font-weight: 500; @@ -495,27 +507,249 @@ input:checked + .noindex-seo-slider:before { View Link =========================== */ .noindex-seo-view-link { - color: #667eea; + color: var(--wp-admin-theme-color, #2271b1); text-decoration: none; - font-size: 13px; - font-weight: 500; display: inline-flex; align-items: center; gap: 4px; + font-size: 13px; + font-weight: 500; transition: color 0.2s ease; } .noindex-seo-view-link:hover { - color: #764ba2; text-decoration: underline; } .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; width: 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 =========================== */ @@ -536,102 +770,7 @@ input:checked + .noindex-seo-slider:before { .noindex-seo-stats { 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 { flex-direction: row; flex-wrap: wrap; @@ -639,7 +778,7 @@ input:checked + .noindex-seo-slider:before { .directive-description { flex-basis: 100%; - margin-left: 52px; + margin-inline-start: 52px; margin-top: 4px; font-size: 11px; } diff --git a/changelog.txt b/changelog.txt index 0cf898f..6efd308 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,43 @@ == 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 = _Release date: 2026-09-18_ diff --git a/languages/noindex-seo-ca.mo b/languages/noindex-seo-ca.mo index 60c5bde3a0f49547824a37d7ef4c7560eb99d8d8..4a9cbac24af377a7744d6b3a64d611438e0b3550 100644 GIT binary patch delta 1842 zcmXZcdq~x19LMqRG41Hl)GV7io3_d_wer$U&vaCywG^`(id~=(3xNkVkr7*02pfwn@{bTg3|80^AncnM?ij$40(8PrE{DJCbH&BBeS_C}nKr!Wuy z!)){=nKL$!Kgnzk4J8QpZDEi5jp5{rIixc`Ts*4C!KXW|-yTD%6Bc zs0|!K9pz#4;&IeQx^XIAz*=-}P*BIb&&MNC=vsmrU^8lAJ5e3$&_c|9z$p~lIB244 zUC1V_AH#4E74jj}k&K`g^49%5WcJv?9Sf(hf*<_22KVC^cn?d^mu9vE%Tev^s9YJq zbbO6Uu2dRTFGZbs1Ac`!Q2l&!%@*RbnHZmC zwi1`2vb`Bo@hGmwUewM%AW^mXR7!C@YGK_tfalzLfL-a@wzwWcCx(VI6f{8}>Wl|a zA$o$#Fon2FbV^x@xRAU@FeO;u4EH`?erB5 zIhe@9i^ZscH((rAqYs-f23t@I`2}@k7f=&EMJ1z`E3pV?q9(4u=~#%eqrQ-}s3T}`ZO2yX9mvPe z(nz?8_@zT(GKE#B0V=Q_Yj8IXqe5TK6;Q{msQ2n|61HM2{)&4wWAi^;d&O; zzYi6mn>ZC8Ap05nx1Hw}{wG-QaKs5uSuo4D!*ekBlkY`XfaXoXLy>=btY>x9P-IVj N!gonM4|58lJ_5EH&%gix delta 1886 zcmXZceMnVz9LMqRZ9e3^>h)@^>ovF2lS|9$R%@+HM-PA4cCp6T7NM*ME9IuG!KFs- zfUf2;7j+?NG_yfZv_jH|#c*SW6oCzzWBoCTq6h2`+t?pt6!iXdk6h2|_xqjmd;0#q z=R9sX{6+7vaqcuT3x~~SV+Ceo1BNhxrPz)^yoj&jub79oz4|E5qV6j+Ta4v69k-y` zJ8%wO#)bG0qgWI%_vJvbh}j!7)ZuvChq-tVv#=Wjcm`XsA1C5lMP?ZoLoN6N%*QSG z9`44~ID~pGG?~p}7&U%$vYRTrLxTpWK`med^0P)Rn)oZPJ&CVSKZbtn!Ad-bX*h~G zIEGsIbIkPdUu-r&J@}eg5{Gd;ZggKaJ5FH$)v?Y=g*J{Fumvly)$?auO8ptq#THL7 zTYw*+}l0kx5SoPfVzGrA)b)N$3+R3vIV>rex1M=k7gRL6F-ac19P z0mW_(n&{d^WV1Gm>G%W{^1o3>@*ip;ff=d$1<1l(E2OZ38!>zr58*QW3u9PR!Z~9D zs{I5iSMFdbW>QgdMN#!nP-ng$SK$b%U(rmndAJT0!Tngp{5C{k5e*siR`xE#xtKuu z+9|BVVXVaRGBXF`n1!8q6T47JwRINvFoCD>J`!Z>m~F^!F7EzD(p`;&r_>Jcu% zCpZmD%FR~dYE-r#LPW6d ziNAK5G2e`zm2t_$TGYVxn2)>Bj|VV_UC0=A8g*p1Q4{8qQA)-rzKJo^#BErNN3j4e zqn^L9fcUdX8>L}6M)*AGwW>v(eGBUTNmN8eP!oq3T?4H^qH7;vKJG((A&;Vtpx5&X zc2K{HeEe(;373J5E`<<co?;y6IkIh>%#}spOOd{@DDOHj(Z8mb^HeviJ$mN zO~l_&x$qFHa1?dcWnAPoE{gCeBgUW>nYG+fC&%VvU9axR( zcLlZZtDd(|{qLb7G=>xKIkKOZe{EcA`43z2o2+i%hskpPCZ8n_`Nz`N(!4RbH!$ei z(^s8+HxP1~cRCGCi4F0F%}!Hu)28~q((sp&LZ{iOkEa^AI)i6Fa}t9+Jk)o7{?hCh D?#tp( diff --git a/languages/noindex-seo-ca.po b/languages/noindex-seo-ca.po index d13675f..d4e1122 100644 --- a/languages/noindex-seo-ca.po +++ b/languages/noindex-seo-ca.po @@ -90,9 +90,9 @@ msgstr "" "noindex SEO ha detectat que %s és actiu. Això pot causar conflictes. " "Configureu les opcions en conseqüència." -#: noindex-seo.php:1657 noindex-seo.php:1756 -msgid "Permission denied or invalid nonce." -msgstr "S'ha denegat el permís o el nonce no és vàlid." +#: noindex-seo.php:1659 noindex-seo.php:1760 +msgid "Permission denied." +msgstr "S'ha denegat el permís." #: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91 msgid "Search Engine Visibility" diff --git a/languages/noindex-seo-es_ES.mo b/languages/noindex-seo-es_ES.mo index 718993fdf72dc0b562f66dcede0e557fc7e33f81..23164c5499d1c430c7bbc86598af233f9dc47b69 100644 GIT binary patch delta 1842 zcmXZcduYvJ9LMqRna#0tX0{n-8%E67T<309yE5ry1s{6dqk3rEq+Y@PVa zwKc4^6V2@pgv^7j&+~kr@ALhg-+P|yxl$G3B$!!Jl35mJ zVhk?8cwB@1a0hn4TI`HhF%Iv${T9rm{~bqRYFD$~Scn?mjRWyK4#Q_S1bxZo{9h<1 z*{m-E`PdG(VJz;&Xe>oPp2Yna#7>x=V%8ROPytUu9jFjz;#!=J^{D48mBWG;wSHQv z6K)J*Knvue0+@|_Y$0FTc)L5kAKTDBf<7$AT&%=MY{B;U8Ws3w^m@#GVTgWfH?sgX zbvIj#1x^pMvotQECg!JwQ@a?o;0DaW&90YlEd5W&6zkj5EE}hwHY`FNpagZ5W$4Az zsDlJC5ijFLbZ*no#9_U{naFj`M=h`f71%n|#2x65FguDJ>7U}FmC_5ChIddKzDEV} z6*cd-+mGpE7Dc}k4rhN$p)r+#0@R&V;&}Xkb1)-4oPi>oNdE?A;a^m7Wl%UOrn#sh zJBV7R9;abM26cfmaVS>ccx=WA>~E3%%*HT~=eiG7rH!bKe&AB<-aq_YF>-x&9ewy5 zpWs_mrs|1mH8x`qGgyQq+XK{oza`R$#B>~tnWzVspzgjHRqYK(9oa*i zfuB(Uj^fxH#@3+5%P<;W;tPD|_L~NUi~Jt8XS@X+Rs9DVdawVu55y6Ls=5~{Gb^wy zRv~Ym1+fN0sJmTG{`FRDMUr4UkwUj1#^NpPf{#!K`H1?RXdOcS_25V@Mky~uFCIn} z*Kth1^XSJ0jKez^kIzvHeMD{0lUG3*8jYiI9_pkOsEk%)0)|lgKF%ipT$6ocK(AE_ zQRuGbqsDh3*|T$~1)t&wjHPrt;AGTzA?l>%s6eVwS8xp#_)RRu2gr|~En*R6bgM%{ zCn-WjR*EW~8eE1^Bf}4_MonCg+Mom#z!}uMi>S=qMBYrh?~Z@McJy0ay`)P4#o;V; zQfa98)}vCp$$elS=6MJR-!T4^W2&0#DF_9)kaRu55b6NsRI02+tyhQ2=nZ6V`|0+x z#)Yq9Es}J{4$)Am8c~tn#Ta~uI?*ds#P6^(e#b57r9w5Y2$lL0*AuAuLDbz}!9)xp z=lTD)lJBMbCt08@y4q6^7~oswIS@GJ`xaHq@Vr2Yzu9AT(_-HE>&7HCCD-|~zxe+F Ddv?{o delta 1878 zcmXZcduUWg6vy$i(U@d+bUs2-&e6*%kOA9dsg(##{#0ZN0{=7G2_cJrxnK^Uj+`ZTM zvhml0Db7SQ3x~}LundD3#Y}9#JZ!=cp2p$WjzjUG*YCxA`o587bFdI6VGU}0KfaG= za27tsnK&xfoOcT?&o!IMKozFr9vp(Ln1P2efIs6-OyV#s8D%yIm!kq+i&l(FkbnD}FKxWn8;{`t`UlaEM{pjVz=7C{gRu`4 z_!~^~@fl-wo_=VoSqyLEXISlwGmFzWkD6E&aZ_81TCfqzaHr=5{E+@@WQxrhZ&r+- zqBd+s9pC`!D&v@jCs7AUVh&!!dUXDvp^1woxS3e#S%q3)3o5YfsEJJ&NHIHv+4S4E zXr=TVM({pr!rbFqQrkoX!4LKw~ij)u=l=f#ukbYp`^Rn}KFrK>r37 zV32}Qah0NqX)~(Gen73$ffblN&1@l7Vi6w2a_q$U>~F*J%;qw%-t#+DmEJ;al=2>v zaXRX`7UcTuI{NVm-oyV;nd%^_P1uRYu#`nevi*a)vbUIu;|i%c_P5D224V@$z%tZ> zTTpl3f~xkLNIh8>F2y&f04q2)hp`6KcpNkEDL%j#UjO!Vx5yvhV8(mVQPua;(0lD? zclF2PJS;|?cq{7l`2~6NEQv?(4(e{dApd$Rb|Xo!eMrGu5{KaLI07G`4)O~1I}s`( z|9WsS7o(KdU>g2}Dz0Ogg=a8;H*qN5N9xL+pcV@93TT5xs0>wNDQ-udG>OV+J7!@w zYTp;dI(is1>S=# z_%HI~XJ503GWw%KBa=oP71=3N@m#?w%qwvpY(h#$n&OSfPKT&tl*D`%+gkTpimTxa`}Js0eli rG9&d{Bhk8s4Ykotk-GZ2jhhpB;d8kRyFI=m4VRDBMiV_neS!Z0WIpFo diff --git a/languages/noindex-seo-es_ES.po b/languages/noindex-seo-es_ES.po index a239e91..c3774cb 100644 --- a/languages/noindex-seo-es_ES.po +++ b/languages/noindex-seo-es_ES.po @@ -91,9 +91,9 @@ msgstr "" "noindex SEO ha detectado que %s está activo. Esto puede causar conflictos. " "Configura las opciones en consecuencia." -#: noindex-seo.php:1657 noindex-seo.php:1756 -msgid "Permission denied or invalid nonce." -msgstr "Permiso denegado o nonce no válido." +#: noindex-seo.php:1659 noindex-seo.php:1760 +msgid "Permission denied." +msgstr "Permiso denegado." #: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91 msgid "Search Engine Visibility" diff --git a/languages/noindex-seo.pot b/languages/noindex-seo.pot index 9ba7c20..b90ec37 100644 --- a/languages/noindex-seo.pot +++ b/languages/noindex-seo.pot @@ -79,9 +79,8 @@ msgstr "" msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly." msgstr "" -#: noindex-seo.php:1657 -#: noindex-seo.php:1756 -msgid "Permission denied or invalid nonce." +#: noindex-seo.php:1659 noindex-seo.php:1760 +msgid "Permission denied." msgstr "" #: noindex-seo.php:1914 diff --git a/noindex-seo.php b/noindex-seo.php index 845b80f..beba44b 100644 --- a/noindex-seo.php +++ b/noindex-seo.php @@ -3,7 +3,7 @@ * Plugin Name: 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. - * Version: 3.1.5 + * Version: 3.1.6 * Requires at least: 4.7 * Requires PHP: 5.6 * Author: ROBOTSTXT @@ -64,8 +64,12 @@ defined( 'ABSPATH' ) || die( 'Bye bye!' ); * oldest tested version and the first with the complete REST * API); nonce verification in the form handlers split into a * 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. @@ -1062,11 +1066,10 @@ add_action( 'rest_api_init', 'noindex_seo_register_rest_routes' ); */ function noindex_seo_rest_settings_permission_check() { if ( ! current_user_can( 'manage_options' ) ) { - $status = function_exists( 'rest_authorization_required_code' ) ? rest_authorization_required_code() : 401; return new WP_Error( 'noindex_seo_rest_forbidden', __( 'You do not have permission to read the noindex SEO settings.', 'noindex-seo' ), - array( 'status' => $status ) + array( 'status' => rest_authorization_required_code() ) ); } 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. if ( ! current_user_can( 'edit_post', $post->ID ) ) { - $status = function_exists( 'rest_authorization_required_code' ) ? rest_authorization_required_code() : 401; return new WP_Error( 'noindex_seo_rest_forbidden', __( '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. * - * Loads the modern admin panel styles and interactive JavaScript only on the - * noindex SEO settings page for better performance. + * The stylesheet loads on every admin screen where the plugin renders UI: + * 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 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. * @return void */ function noindex_seo_enqueue_admin_assets( $hook ) { - // Only load on our settings page.. - if ( 'settings_page_noindex_seo' !== $hook ) { + $is_settings_page = ( '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; } @@ -1283,6 +1306,11 @@ function noindex_seo_enqueue_admin_assets( $hook ) { 'all' ); + // The interactive script is only needed on the settings page.. + if ( ! $is_settings_page ) { + return; + } + // Enqueue admin JavaScript.. wp_enqueue_script( 'noindex-seo-admin', @@ -1656,7 +1684,7 @@ add_action( 'admin_init', 'noindex_seo_detect_conflicts' ); */ function noindex_seo_process_form() { 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' ); @@ -1757,7 +1785,7 @@ add_action( 'admin_post_update_noindex_seo', 'noindex_seo_process_form' ); */ function noindex_seo_process_apply_suggestions() { 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' ); @@ -1965,49 +1993,49 @@ function noindex_seo_render_meta_box( WP_Post $post ) { ?>
-

+

-

+

-
-
-