From 3cf187303e3b3f6db41d41ab5013137ccb19c2c9 Mon Sep 17 00:00:00 2001 From: Javier Casares Date: Wed, 4 Nov 2026 13:41:38 +0000 Subject: [PATCH] v3.6.0 --- assets/css/admin.css | 91 +++ assets/js/admin.js | 39 + assets/js/editor-sidebar.js | 330 ++++----- changelog.txt | 44 ++ languages/noindex-seo-ca.mo | Bin 18222 -> 20667 bytes languages/noindex-seo-ca.po | 498 ++++++++----- languages/noindex-seo-es_ES.mo | Bin 18204 -> 20512 bytes languages/noindex-seo-es_ES.po | 496 ++++++++----- languages/noindex-seo.pot | 567 +++++++++------ noindex-seo.php | 1220 +++++++++++++++++++++++++------- readme.txt | 40 +- uninstall.php | 8 +- 12 files changed, 2320 insertions(+), 1013 deletions(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index 200336e..48192ae 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -761,3 +761,94 @@ input:checked + .noindex-seo-slider:before { display: none; } } + +/* =========================== + Value directives & rules (3.6.0) + =========================== */ + +/* Settings-grid value cells: number, select and datetime inputs. */ +.noindex-seo-directive-value input[type="number"], +.noindex-seo-directive-value input[type="datetime-local"] { + width: 130px; + max-width: 100%; +} + +.noindex-seo-directive-value select { + width: 130px; + max-width: 100%; +} + +.noindex-seo-directive-value .directive-label { + font-family: 'Courier New', monospace; + font-size: 13px; +} + +/* Meta-box and term-panel value rows. */ +.noindex-seo-value-list { + margin-top: 10px; + padding-top: 8px; + border-top: 1px solid #c3c4c7; +} + +.noindex-seo-values-title { + margin: 0 0 6px; +} + +.noindex-seo-value-row input[type="number"], +.noindex-seo-value-row input[type="datetime-local"] { + width: 150px; + max-width: 100%; +} + +.noindex-seo-value-row select { + width: 110px; + max-width: 100%; +} + +.noindex-seo-term-directive-value { + display: inline-flex; + align-items: center; + gap: 6px; + margin-top: 6px; +} + +.noindex-seo-term-directive-value input[type="number"], +.noindex-seo-term-directive-value input[type="datetime-local"] { + width: 150px; + max-width: 100%; +} + +/* Quick Edit value rows. */ +.noindex-seo-quick-edit-value input[type="number"], +.noindex-seo-quick-edit-value input[type="datetime-local"] { + width: 130px; + max-width: 100%; +} + +.noindex-seo-quick-edit-value select { + width: 110px; + max-width: 100%; +} + +/* Conditional-rules table. */ +.noindex-seo-rules-table { + padding: 8px 0; +} + +.noindex-seo-rule-head, +.noindex-seo-rule-row { + display: grid; + grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 44px; + gap: 8px; + align-items: center; + margin-bottom: 8px; +} + +.noindex-seo-rule-head { + font-weight: 600; +} + +.noindex-seo-rule-remove .dashicons { + margin-top: 4px; + line-height: 1; +} diff --git a/assets/js/admin.js b/assets/js/admin.js index e4a56c9..13cdd70 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -17,6 +17,45 @@ initSearch(); initStats(); initTooltips(); + initRules(); + } + + /** + * Initialize the conditional-rules table (add / remove rows) + */ + function initRules() { + // Add rule: clone the last row and clear its inputs. + $( '.noindex-seo-rule-add' ).on( + 'click', + function () { + const $rows = $( '.noindex-seo-rule-rows' ); + const max = parseInt( $rows.data( 'max-rules' ) || 20, 10 ); + + if ( $rows.find( '.noindex-seo-rule-row' ).length >= max ) { + return; + } + + const $clone = $rows.find( '.noindex-seo-rule-row' ).last().clone(); + $clone.find( 'input' ).val( '' ); + $rows.append( $clone ); + } + ); + + // Remove rule: drop the row, or clear it when it is the last one left. + $( document ).on( + 'click', + '.noindex-seo-rule-remove', + function () { + const $row = $( this ).closest( '.noindex-seo-rule-row' ); + const $rows = $( this ).closest( '.noindex-seo-rule-rows' ); + + if ( $rows.find( '.noindex-seo-rule-row' ).length > 1 ) { + $row.remove(); + } else { + $row.find( 'input' ).val( '' ); + } + } + ); } /** diff --git a/assets/js/editor-sidebar.js b/assets/js/editor-sidebar.js index cec097a..66e3ea3 100644 --- a/assets/js/editor-sidebar.js +++ b/assets/js/editor-sidebar.js @@ -1,9 +1,11 @@ /** * Noindex SEO - Gutenberg Sidebar Panel - * Version: 2.0.0 + * Version: 3.0.0 * * Provides a native Gutenberg sidebar panel for controlling robots directives - * on individual posts and pages. + * on individual posts and pages: boolean flags plus the value directives + * introduced in 3.6.0 (max-snippet, max-image-preview, max-video-preview, + * unavailable_after). * * @package noindex-seo */ @@ -11,11 +13,21 @@ (function (wp) { const { registerPlugin } = wp.plugins; const { PluginDocumentSettingPanel } = wp.editPost; - const { CheckboxControl, PanelRow } = wp.components; + const { CheckboxControl, PanelRow, SelectControl, TextControl } = wp.components; const { useSelect, useDispatch } = wp.data; const { createElement: el } = wp.element; const { __ } = wp.i18n; + /** + * Boolean directives: checkbox controls backed by integer meta (0/1). + */ + const booleanDirectives = ['noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex', 'notranslate']; + + /** + * Value directives: inputs backed by string meta ('' = off). + */ + const valueDirectives = ['max-snippet', 'max-image-preview', 'max-video-preview', 'unavailable_after']; + /** * Robots Directives Sidebar Panel Component */ @@ -29,34 +41,42 @@ const { editPost } = useDispatch( 'core/editor' ); - // Current values. - const override = Boolean( postMeta._noindex_seo_override ); - const noindex = Boolean( postMeta._noindex_seo_noindex ); - const nofollow = Boolean( postMeta._noindex_seo_nofollow ); - const noarchive = Boolean( postMeta._noindex_seo_noarchive ); - const nosnippet = Boolean( postMeta._noindex_seo_nosnippet ); - const noimageindex = Boolean( postMeta._noindex_seo_noimageindex ); + // Current override state. + const override = Boolean( postMeta._noindex_seo_override ); - // Update meta function. - const updateMeta = function (key, value) { + // Update a boolean meta value (0/1). + const updateBoolean = function (key, value) { const newMeta = {}; newMeta[key] = value ? 1 : 0; editPost( { meta: newMeta } ); }; + // Update a value-directive meta value (string, '' = off). + const updateValue = function (key, value) { + const newMeta = {}; + newMeta[key] = value || ''; + editPost( { meta: newMeta } ); + }; + // Clear all directive meta values. const clearAllDirectives = function () { - const directives = ['noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex']; - directives.forEach( + const newMeta = {}; + booleanDirectives.forEach( function (directive) { - updateMeta( '_noindex_seo_' + directive, false ); + newMeta['_noindex_seo_' + directive] = 0; } ); + valueDirectives.forEach( + function (directive) { + newMeta['_noindex_seo_' + directive] = ''; + } + ); + editPost( { meta: newMeta } ); }; // Handle override toggle. const handleOverrideChange = function (value) { - updateMeta( '_noindex_seo_override', value ); + updateBoolean( '_noindex_seo_override', value ); // If disabling override, clear all directives. if ( ! value) { @@ -64,26 +84,91 @@ } }; - // Get active directives for preview. + // Build the preview list: names for booleans, name:value for values. const activeDirectives = []; if (override) { - if (noindex) { - activeDirectives.push( 'noindex' ); - } - if (nofollow) { - activeDirectives.push( 'nofollow' ); - } - if (noarchive) { - activeDirectives.push( 'noarchive' ); - } - if (nosnippet) { - activeDirectives.push( 'nosnippet' ); - } - if (noimageindex) { - activeDirectives.push( 'noimageindex' ); - } + booleanDirectives.forEach( + function (directive) { + if ( Boolean( postMeta['_noindex_seo_' + directive] ) ) { + activeDirectives.push( directive ); + } + } + ); + valueDirectives.forEach( + function (directive) { + const value = postMeta['_noindex_seo_' + directive]; + if ( value ) { + activeDirectives.push( directive + ':' + value ); + } + } + ); } + // Boolean directive rows. + const booleanRows = booleanDirectives.map( + function (directive) { + return el( + PanelRow, + { key: directive + '-row' }, + el( + CheckboxControl, + { + label: __( directive, 'noindex-seo' ), + checked: Boolean( postMeta['_noindex_seo_' + directive] ), + onChange: function (value) { + updateBoolean( '_noindex_seo_' + directive, value ); }, + } + ) + ); + } + ); + + // Value directive rows. + const valueRows = valueDirectives.map( + function (directive) { + const metaKey = '_noindex_seo_' + directive; + + if ( 'max-image-preview' === directive) { + return el( + PanelRow, + { key: directive + '-row' }, + el( + SelectControl, + { + label: __( directive, 'noindex-seo' ), + value: postMeta[metaKey] || '', + options: [ + { value: '', label: __( 'Off', 'noindex-seo' ) }, + { value: 'none', label: __( 'none', 'noindex-seo' ) }, + { value: 'standard', label: __( 'standard', 'noindex-seo' ) }, + { value: 'large', label: __( 'large', 'noindex-seo' ) }, + ], + onChange: function (value) { + updateValue( metaKey, value ); }, + } + ) + ); + } + + const inputType = ( 'unavailable_after' === directive) ? 'datetime-local' : 'number'; + + return el( + PanelRow, + { key: directive + '-row' }, + el( + TextControl, + { + type: inputType, + label: __( directive, 'noindex-seo' ), + value: ( postMeta[metaKey] || '' ).toString().replace( ' ', 'T' ), + onChange: function (value) { + updateValue( metaKey, value ); }, + } + ) + ); + } + ); + return el( PluginDocumentSettingPanel, { @@ -119,141 +204,68 @@ } }, [ - el( - 'p', - { - key: 'directives-label', - style: { - fontSize: '12px', - fontWeight: '600', - marginBottom: '12px', - color: '#1e1e1e', - } - }, - __( 'Robots Directives:', 'noindex-seo' ) - ), - - el( - PanelRow, - { key: 'noindex-row' }, - el( - CheckboxControl, - { - label: '🔍 ' + __( 'noindex', 'noindex-seo' ), - help: __( 'Prevent search engines from indexing', 'noindex-seo' ), - checked: noindex, - onChange: function (value) { - updateMeta( '_noindex_seo_noindex', value ); }, - } - ) - ), - - el( - PanelRow, - { key: 'nofollow-row' }, - el( - CheckboxControl, - { - label: '🔗 ' + __( 'nofollow', 'noindex-seo' ), - help: __( 'Prevent search engines from following links', 'noindex-seo' ), - checked: nofollow, - onChange: function (value) { - updateMeta( '_noindex_seo_nofollow', value ); }, - } - ) - ), - - el( - PanelRow, - { key: 'noarchive-row' }, - el( - CheckboxControl, - { - label: '💾 ' + __( 'noarchive', 'noindex-seo' ), - help: __( 'Prevent cached versions in search results', 'noindex-seo' ), - checked: noarchive, - onChange: function (value) { - updateMeta( '_noindex_seo_noarchive', value ); }, - } - ) - ), - - el( - PanelRow, - { key: 'nosnippet-row' }, - el( - CheckboxControl, - { - label: '📄 ' + __( 'nosnippet', 'noindex-seo' ), - help: __( 'Prevent text snippets in search results', 'noindex-seo' ), - checked: nosnippet, - onChange: function (value) { - updateMeta( '_noindex_seo_nosnippet', value ); }, - } - ) - ), - - el( - PanelRow, - { key: 'noimageindex-row' }, - el( - CheckboxControl, - { - label: '🖼️ ' + __( 'noimageindex', 'noindex-seo' ), - help: __( 'Prevent image indexing', 'noindex-seo' ), - checked: noimageindex, - onChange: function (value) { - updateMeta( '_noindex_seo_noimageindex', value ); }, - } - ) - ), - - // Preview section. - activeDirectives.length > 0 && el( - 'div', - { - key: 'preview-section', - style: { - marginTop: '16px', - padding: '12px', - background: '#f0f6fc', - border: '1px solid #0969da', - borderRadius: '4px', - } - }, - [ el( 'p', { - key: 'preview-label', - style: { - fontSize: '11px', - fontWeight: '600', - marginBottom: '8px', - color: '#0969da', - textTransform: 'uppercase', - } - }, - __( 'Active Directives:', 'noindex-seo' ) - ), - el( - 'code', - { - key: 'preview-code', + key: 'directives-label', style: { fontSize: '12px', - display: 'block', - padding: '8px', - background: '#fff', - border: '1px solid #d0d7de', - borderRadius: '3px', - wordBreak: 'break-word', + fontWeight: '600', + marginBottom: '12px', + color: '#1e1e1e', } }, - activeDirectives.join( ', ' ) + __( 'Robots Directives:', 'noindex-seo' ) + ), + booleanRows, + valueRows, + + // Preview section. + activeDirectives.length > 0 && el( + 'div', + { + key: 'preview-section', + style: { + marginTop: '16px', + padding: '12px', + background: '#f0f6fc', + border: '1px solid #0969da', + borderRadius: '4px', + } + }, + [ + el( + 'p', + { + key: 'preview-label', + style: { + fontSize: '11px', + fontWeight: '600', + marginBottom: '8px', + color: '#0969da', + textTransform: 'uppercase', + } + }, + __( 'Active Directives:', 'noindex-seo' ) + ), + el( + 'code', + { + key: 'preview-code', + style: { + fontSize: '12px', + display: 'block', + padding: '8px', + background: '#fff', + border: '1px solid #d0d7de', + borderRadius: '3px', + wordBreak: 'break-word', + } + }, + activeDirectives.join( ', ' ) + ) + ] ) - ] - ) ] ) ] diff --git a/changelog.txt b/changelog.txt index 5560aca..5857615 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,49 @@ == Changelog == += 3.6.0 = + +_Release date: 2026-11-03_ + +**Highlights** + +* Modern robots directives (TODO #5): `notranslate`, `max-snippet`, `max-image-preview`, `max-video-preview` and `unavailable_after` join the five existing booleans — on every surface: the global context grid, per-post and per-term granular overrides, Quick Edit, the block editor sidebar, the REST `/effective` endpoint and WP-CLI (`name=value` tokens). +* Conditional auto-noindex rules (TODO #11): apply `noindex` automatically to any post whose custom field (for example an ACF field) exactly matches a value; matched posts also drop out of the core XML sitemap. +* Multisite behavior documented (TODO #9, docs variant): per-site by design, with an export/import-based rollout recipe. + +**Added** + +* **Value directives everywhere.** Boolean directives are flags; value directives carry a value and render as `name:value` (`max-snippet:-1`, `max-image-preview:large`, `unavailable_after: Tue, 01 Jan 2030 09:00:00 +0000` in site time with a numeric UTC offset). They are configured with typed inputs (number, size select, `datetime-local`) on the settings grid, the post meta box, Quick Edit, the term panel and the Gutenberg sidebar; stored in the consolidated option (contexts) and in `_noindex_seo_{directive}` post/term meta; registered with the REST API (`register_post_meta`/`register_term_meta` with per-type sanitization); exported/imported with normalization; and supported by WP-CLI — `wp noindex-seo set archive max-snippet=-1 max-image-preview=large`, `wp noindex-seo unset archive max-snippet` (plain name clears the value), and `list` reports the configured value (`max-snippet:-1`) or `off`. +* **`notranslate`** as the sixth boolean directive, including a matching SVG icon in the plugin's icon registry and membership in the "Apply Recommended Defaults" set (which enables the six booleans; value directives stay untouched — "enabling" them without a value is meaningless). +* **Conditional rules (TODO #11).** A "Conditional rules" card on the SEO Settings tab manages up to 20 exact-match rules (custom field name + value; rows with empty field/value are ignored, and the plugin's own `_noindex_seo_` meta keys are rejected). Rules run on the front-end below an explicit per-post override and above per-CPT/global defaults; matched posts surface as `source: auto_rule` in `/effective` and are excluded from the pages sitemap. The rules read plain post meta, so no ACF installation is required. +* A `notranslate` SVG directive icon, plus badge support for value directives in the Robots columns (`max-snippet:-1` tokens). + +**Changed** + +* `noindex_seo_metarobots()` now takes a directive **map** (`name => true|value`); a flat list of boolean names (the pre-3.6.0 third-party calling convention) is still accepted and normalized. The `wp_robots` integration passes directive values through to core (`$robots['max-snippet'] = '-1'`). +* `noindex_seo_get_setting()` returns the normalized string value for value directives ('' = off) instead of coercing everything to 0/1; the hourly transient cache stores values the same way. +* The WP-CLI `set`/`unset` default (no directive arguments) now enables/disables the six boolean directives; value directives always require explicit `name=value` tokens (a value on a boolean, or an invalid/missing value, is rejected with a descriptive error). Datetime values need quoting or a `T` separator because of the space: `unavailable_after=2030-01-01T09:00`. +* Block editor sidebar labels dropped their emoji prefixes (matching the 3.5.0 admin UI icon direction), and the sidebar gained controls for all five new directives. + +**Fixed** + +* Nothing. + +**Security** + +* No new attack surface: rules and value directives ride the existing nonce + capability paths (settings form: `manage_options` + `check_admin_referer`; meta box/Quick Edit: `edit_post`; term panel: `manage_categories`); every value normalizes through a single whitelist-driven normalizer (integers ≥ -1, a none/standard/large enum, a parse-validated datetime); rule fields strip everything but `[A-Za-z0-9_-]` and values go through `sanitize_text_field()`; sitemap rule clauses use WP_Query's `meta_query` (prepared by core). PHPCS/PHPStan/composer audit clean. + +**Compatibility** + +* WordPress: 7.0 - 7.2 +* PHP: 8.3 - 8.6 + +**Tests** + +* PHPUnit: 9.6.38 (216 tests, 1107 assertions, all passing) on the WordPress 7.2-beta3 test library, run under PHP 8.3, 8.4, 8.5 and 8.6.0RC3 — including the new registry/normalization, settings-merge, form-roundtrip, front-end value output, granular value overrides, REST formatted tokens, CLI name=value, rules sanitization/matching/precedence/sitemap/auto_rule suites. +* PHPCompatibility: 0 errors on the declared range 8.3-8.6 and on the full review range 5.6-8.6. +* PHPCS (WordPress-Core, -Docs, -Extra) and PHPStan level 9: 0 errors. +* Translations: Catalan and Spanish catalogs regenerated and 100% complete (188/187 strings), including the previously untranslated strings found during the merge. + = 3.5.0 = _Release date: 2026-11-03_ diff --git a/languages/noindex-seo-ca.mo b/languages/noindex-seo-ca.mo index fcdb88a4e90ee0392eb9c1c4bf4dd6c10e9dc6e2..17f19847ef88e6ff8ea8bd759a68d62fbce9d7f8 100644 GIT binary patch delta 6327 zcmb7`3vgW3dB@Mn7Jkdv28@vn2e6T3OSX|L`~W``WMg945WjFSv3j+8CEa*;@A~dt zS#|>pF%Fa@#AHKo3QO3NgqGa;FFN(!0&{`X!P zI}&bjCDo$n=o>-N-h_ovFor;fhU(7un%L`I)xOe$r}uP12MnBPn`W(<5E zPK6)9v2fz)#!Q1}!gF8~)VfZn?_ID3Zh`zW`}on3Ux!>_hTwa~l+6)37co(pVoWRi zE?frx11^A#+wVLNQ( zesc|-g-qNC7r~=22mc*vUCe7x zuKF!hEHunArWS62TDKj_$Gwod%&k!8J_u#8r;_orv#`H3dx;78_87!^ruN)8D9?rR z-D)UBH$a(w6V!oD!d*}o-vs5#FGJ$e+zSUpdZ_xa0V+*Pa1?wP%H)qi7d{PF!1~#-tFDD|RX5ap4k|_- zgIsK$gyWR|Kch1yMHay4`S8vhiV-}_t=r*Zs>*$^0(D?pV{GycC`C8I(QpU645kwf z!Alvx3H7iUP4UI^U>oCgu$KExnT{6hhdS`CWPBKoWBfE63;zx(h+cw9uUDbgzX|2b zUqT=L0X_}$b7RG3&x_A#f?D4Ob>2!?*2Qb-C{3<~riKazb;0hIIH<}{>nc#|9)fb& z3s5FK4(0oIpz6naP_c3$5vy}9fm*i$uEWxuP!>3_0Q+A~=SK^S`34+|gO|hm;ClEb z)PeIZj_1=5FPQrwk2Ehs&N9DC#urdk6qH?XHM|Szyf>j@r=DBok}lW@Z*9Z=9dv%o z#Eo$BBFq90z)RpOP-!@(J+AqypcE*;AHsuB!L^;m79N5!?Q?J({82Lg3H&MJ*I*qy z!mFmiXUcT4bp8Pzfs48AeE1e54ozxl?864Ajm>Zryc8~jD5Tcfc<(zB~Eefca$c6|k(0 z+vwZ^cS7ay@8A^pd#LXdR~s`3&w~Lx2=(F#Yhp{)LmhZN)cQ-IT(SWwcCLdHU=B9J zJy7ZU@EYu|jju4FjlY6QpO2t?e%cjrdbLB%hfpTJ9)2F)3Lk{EYvU|=6e>%;4SB42 z9?F$9SH>5Pg?d;kyevf=U5WkwjftD68sCC_>*91gtBc~ocpsF{*Hew;I|u3|yWuE( zhs2k;1ro>R#e}sR;{T{z4$otL2W*2kz|rtYC`G{RMIu!Fq;mQLKCgsu7#f%hdmlerQry0lq>5+INwo$YP{~)akR#_a#IrqIL*b zhqY(?!HuW1J&cwnGxF!-$V}u(WCx;lA@UreI8l??Pi{L;8mvzGGh`n5L%zH{nS2Je zAon4P?njX<^4G|%NG+l^8F>Oxyr^wQEO2?H(kL+^qra&yXnp6$sC2 zCTTZA6{I_o@gN*Ru1Us!33JFpND=Xon~)okdy)Bw8d)5*E&MhkpGBN#CjMCxhe!NB z+79L{vN!$~RkDZae=!-SVIy(?xfb~*;vy%vnq=^Om_fpmJ|3a}2=e7*ZWH{T{C_8% z^O0T1ZbWSsG8_3DWF4Y*JyJ!!hRj9yQy!J&%isniKsF*{k =MukY@wIh@8B4hx0 zO8%dRsI7{Ajqwup!2&WJnS^{DQM))s^!vB`-iB0=?r0|dzu#w)zOWhDhb%xojci4x zA!>`h!B1z@HRh{gM>_QUd@VUZQc)U=-V)G^2MwZx;E_hinieNxs`QwbIKj1(9b!cmv*w*J=Q4{_|5xXKI0B* zo0H#T3w|-QyZim3YtyA7%WbdcW;3?2*AJ{a=;R7nmxZ?D@-^|7Ce5ZpPU7TrKT0@u zz{!@}`F10U7Ew2Ed)%zQ+wKheU0ZO2mgo|HzzqT~qYe3tb$S@1u50_Uevgy2X+Iyj zgCQ>rLoeS~Y>t-2cVr?pi#8MZ1?!hW>-R=mx2^B8MK5%7PNDL`l(VZ}tb3=nF5}6X zoG7~$tG#EuI%-_>q`Z@Jt4q)BPL-WOFIUQ0FNdLQA#evgcQ*&^b2xYp~- z`+=L8Z??+)@vqIC2wvM5?_7?zdYhJ+tupe}SlnFG?{aM3>B+ho+-$4Au`Q#g#NpQ+ zgZ-hJ^8UygGG!!5Ofke< zPLMIByfffc7;X0|XqL~=Wo z&ZY~>9fhpNG@F&l!$V5toSP3vbi#PMN*wGC_*pEf(;VxPOysRHuc$=u!o55v zs&k7zZ^*bj*7=+YN>M@U;U4KJEieE&Cc1jbo*v@qluc1p=t_3PrJ>n+9Y%`D)Xl>hY$0?KqCeQT_s_a@B&? z%JHV@)ny9~r>1R;-=*yJ_s~dW~ycc{N_m!E8 z7F0iMJCvHZfnq96R3B}WKca9hVj4Lq?G0CLrh%_vpIbCtK2<&} zWlq|XwY`DU7exTiOgq8w(8(pK=;o>8+2O~dvb4$VCCUneZXVB04Ij^#L<__h<4jk@`$iv zLtOCkQNi;A^YP#5Xk(Nawo!}u>!5g)$()eVw?2xp$okbat4^yu2aUQ3jc(o4eM+9H u=q>7_RQ-QzUZpUnz50vQSEsH{JB3dueAJiWq5q@wQQlRTV#P;ljQL+GDZz>W delta 4016 zcmZ|RdvKK18OQOnAqnN43n7G%WFdjvfM5V2i6P`xNDM&`Vvq!hVM!Kpb2mX+Y!+hF zD1m~n8i-;LLqHs`bz53$r_zC$TC}!xuo*ioN^OglQD>Z~W0lr^f4lG6KiZzjv!8R` z-S@ob@|<__%5#ph2OPeuG2u@d$_O!&sERP=U3_3XAC%80854v5z*w9(*_avV#Iaa_ z-@sCg!YZ7A^%#k6oQoZpivyUCmodi}pNW`aOa&K~U^e=2KE8-q_ztFFIK8K1CeFjP zn1|iC0Dp}7{dJs$G110k;9^{e^|%-hU@Kn41w7x}!t~VP7SsUtV-B9T+aF>f?Kq~d z2i=KUsU8f+A=C;C+n&MaX`jQ1c=uFe>aYn9<0a(TralgNzGfo=opP?QcNd{`G;*ma0DJse8P+RdJY9Rfn6+MLNXUO&?)I?vM!TM`2 zE^~oxHh)0n!Y8P`o5?8jeI{mN0jeVxvYMs~HK2aGeH1mYAK)^457RJ#gwgfos2tjk zO2#8TDz{L16V;JP3TAmUY9@KeNiij;ty+r{a1-`m6OvEnZ>S~z3U^>!a`5==MNOa& zHNiow!ZTQjzAva~rsXNY8`hzgbR+7)9^1XBjt-&*b{zRLFY>|I&FiS|KR^xe3)Jr- zoxxt zpWqKMiwxBL?Sk(gaF6p*zc0cuSdIC(4oMHQA2pHhqbB$n z>a?UUV*Q;|3R&k0+>8v`oI>)$jN%%+i5h4XhxSXXLABQ{2_{{gZ7cFtHQhJ`pF(Zv z2*%-ARPJ0tt?)ZODtT1mSjPxlgF1d2ke8ilLv`4P$M6`&Vlf-8nQp*IxDnY-(}c-r z;Y55H_25@A9^Xdg$VaG^@ny4dtcF>G8bA+f#C@od9z;Fx1jgWb9FK3HW;lw|@jCJs zn2iRI$E*^u7MY{zL=EIL@{TeWkbZsUDiz)EDYES*nvE;LVobqaR5A^tzJCL?bT^SS zFw1CYfZI`9*NqzJ8Jva}P+K)>dky!|z7hDI{lA~LLjo5L;3IenBXJ??q&M19REHI~ z3+vE>Z=+UV6{)S2t3~y*8TI>JsIA$DQFsI=;A!MwnRA%Q^UeEIbmOF=;En01`J#xHVO{i0dt=B|e54_-Rz~`BAxa0oCtoI0LU>2Yyn{ z{$HfB<(t6{(pDP7!2hfCa77)c^Yw%t`WV5&nePzFixi@hxQ9q0LZ#lWtUx_{faoGr z>h%8KNo9yo@@PMmttz{TJ;dXL@F`<3lOC%DZLf!?+ zVLqSb`GMo7D^CzgoWL={BZR&WmD}x#wnl|lfoULmiDp9OyF>)>JaLTJLOe~70)e6g zK2Ed|8HBHj4-!7`o@N)!R>DI(NjyayC7OuYghiYnRCM%|v`%6>5h|PPit@=t3=^%y zej<(NBWj4}h(ns+{Zv9l?`D;mK?3jaTIvUhY+{amJsDRK(+DM=k}XuG+m%90CGI73 zT9k;P(r8y=wZ1x=-zL1oKKqLU*iVEL@kBK-mDon8v=bWxwctOVS=2WWYwT+wDyiH@ z%(pL;;vGaDQBFJ*+TXirxQQJ^Ix$G-EEf?Ygi09kNTBwgkJVJWi8A}romgSl*J6iV zpJY1=A0#FdcM<8Ce5kY#dbyOSQQX++-sy6dxjn8x&6{scjViHvqf)KoG1L4nME^O$ zKNSDlG5+0&^$x2h=^p?2q&pl*uC30UE|1sU-sW|>+niokgQv0C>2Z0xS~|Vf&E(zI z_fnFq=9FTbYn@K{QL<}Sr_F4 zddT6wy!2?8bvFM|e_w&+@MjcWa9Gb2x&2WqUUB4nJr7r#v(?pl@nw&@!P(f*6OTZmcW4>EBWIbePq- c@_p-tRdN2@is%SU(|^6X*D=1W-JYcRH%6uRc>n+a diff --git a/languages/noindex-seo-ca.po b/languages/noindex-seo-ca.po index 1b0932f..0658c70 100644 --- a/languages/noindex-seo-ca.po +++ b/languages/noindex-seo-ca.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: noindex SEO 3.1.3\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/noindex-seo\n" -"POT-Creation-Date: 2026-11-03T15:21:45+00:00\n" +"POT-Creation-Date: 2026-11-03T17:16:14+00:00\n" "PO-Revision-Date: 2026-08-17T20:00+00:00\n" "Last-Translator: ROBOTSTXT \n" "Language-Team: Catalan — https://translate.wordpress.org/locale/ca/default/\n" @@ -18,7 +18,7 @@ msgstr "" "X-Domain: noindex-seo\n" #. Plugin Name of the plugin -#: noindex-seo.php noindex-seo.php:1657 noindex-seo.php:1658 +#: noindex-seo.php noindex-seo.php:2044 noindex-seo.php:2045 msgid "noindex SEO" msgstr "noindex SEO" @@ -48,40 +48,40 @@ msgstr "ROBOTSTXT" msgid "https://www.robotstxt.software/" msgstr "https://www.robotstxt.software/" -#: noindex-seo.php:1080 +#: noindex-seo.php:1449 msgid "Post ID to compute effective directives for." msgstr "ID de l'entrada per a calcular les directives efectives." -#: noindex-seo.php:1107 +#: noindex-seo.php:1476 msgid "You do not have permission to read the noindex SEO settings." msgstr "No teniu permís per a llegir els ajustaments de noindex SEO." -#: noindex-seo.php:1157 +#: noindex-seo.php:1526 msgid "You do not have permission to read directives for this post." msgstr "No teniu permís per a llegir les directives d'aquesta entrada." -#: noindex-seo.php:1217 +#: noindex-seo.php:1589 msgid "No post exists with that post_id." msgstr "No existeix cap entrada amb aquest post_id." -#: noindex-seo.php:1508 +#: noindex-seo.php:1895 msgid "Settings saved successfully!" msgstr "S'han desat els ajustaments correctament." -#: noindex-seo.php:1509 +#: noindex-seo.php:1896 msgid "Expand All" msgstr "Expandeix-ho tot" -#: noindex-seo.php:1510 +#: noindex-seo.php:1897 msgid "Collapse All" msgstr "Redueix-ho tot" -#: noindex-seo.php:1590 +#: noindex-seo.php:1977 msgid "Settings" msgstr "Ajustaments" #. translators: plugin name. -#: noindex-seo.php:1883 +#: noindex-seo.php:2270 #, php-format msgid "" "noindex SEO has detected that %s is active. This may cause conflicts. Please " @@ -91,7 +91,7 @@ msgstr "" "Configureu les opcions en conseqüència." #. translators: %s: comma-separated list of wp_robots callbacks. -#: noindex-seo.php:1904 +#: noindex-seo.php:2291 #, php-format msgid "" "noindex SEO has detected that another plugin or theme is adding robots " @@ -102,20 +102,20 @@ msgstr "" "directrius de robots a través de l'API wp_robots (%s). Això pot causar " "conflictes. Configureu les opcions en conseqüència." -#: noindex-seo.php:2021 noindex-seo.php:2151 noindex-seo.php:2202 -#: noindex-seo.php:2290 +#: noindex-seo.php:2408 noindex-seo.php:2561 noindex-seo.php:2612 +#: noindex-seo.php:2710 msgid "Permission denied." msgstr "S'ha denegat el permís." -#: noindex-seo.php:2886 noindex-seo.php:3210 assets/js/editor-sidebar.js:91 +#: noindex-seo.php:3402 noindex-seo.php:3791 assets/js/editor-sidebar.js:176 msgid "Search Engine Visibility" msgstr "Visibilitat als cercadors" -#: noindex-seo.php:2938 noindex-seo.php:3545 assets/js/editor-sidebar.js:102 +#: noindex-seo.php:3463 noindex-seo.php:4161 assets/js/editor-sidebar.js:187 msgid "Override global settings" msgstr "Sobreescriu els ajustaments globals" -#: noindex-seo.php:2943 +#: noindex-seo.php:3468 msgid "" "When enabled, these directives will override the global settings for this " "specific content." @@ -123,51 +123,97 @@ msgstr "" "En activar-se, aquestes directrius sobreescriuran els ajustaments globals " "per a aquest contingut específic." -#: noindex-seo.php:2950 +#: noindex-seo.php:3475 msgid "Prevent indexing" msgstr "Evita la indexació" -#: noindex-seo.php:2955 +#: noindex-seo.php:3480 msgid "Prevent link following" msgstr "Evita el seguiment d'enllaços" -#: noindex-seo.php:2960 +#: noindex-seo.php:3485 msgid "Prevent caching" msgstr "Evita la memòria cau" -#: noindex-seo.php:2965 +#: noindex-seo.php:3490 msgid "Prevent snippets" msgstr "Evita els fragments" -#: noindex-seo.php:2970 assets/js/editor-sidebar.js:203 +#: noindex-seo.php:3495 msgid "Prevent image indexing" msgstr "Evita la indexació d'imatges" -#: noindex-seo.php:2978 +#: noindex-seo.php:3500 +msgid "Prevent translation" +msgstr "Evita la traducció" + +#: noindex-seo.php:3505 +msgid "Value directives (empty = off):" +msgstr "Directives amb valor (buit = desactivat):" + +#: noindex-seo.php:3508 noindex-seo.php:3514 noindex-seo.php:3523 +#: noindex-seo.php:3810 noindex-seo.php:3818 noindex-seo.php:4195 +#: noindex-seo.php:4200 noindex-seo.php:4208 noindex-seo.php:5296 +#: noindex-seo.php:5312 assets/js/editor-sidebar.js:141 +msgid "Off" +msgstr "Desactivat" + +#: noindex-seo.php:3509 noindex-seo.php:4962 +msgid "Maximum snippet length in characters (-1 = no limit)" +msgstr "Longitud màxima del fragment en caràcters (-1 = sense límit)" + +#: noindex-seo.php:3515 noindex-seo.php:3811 noindex-seo.php:4201 +#: noindex-seo.php:5313 assets/js/editor-sidebar.js:142 +msgid "none" +msgstr "cap" + +#: noindex-seo.php:3516 noindex-seo.php:3812 noindex-seo.php:4202 +#: noindex-seo.php:5314 assets/js/editor-sidebar.js:143 +msgid "standard" +msgstr "estàndard" + +#: noindex-seo.php:3517 noindex-seo.php:3813 noindex-seo.php:4203 +#: noindex-seo.php:5315 assets/js/editor-sidebar.js:144 +msgid "large" +msgstr "gran" + +#: noindex-seo.php:3519 noindex-seo.php:4967 +msgid "Maximum image preview size" +msgstr "Mida màxima de la previsualització d'imatges" + +#: noindex-seo.php:3524 noindex-seo.php:4972 +msgid "Maximum video preview seconds (-1 = no limit)" +msgstr "Segons màxims de la previsualització de vídeo (-1 = sense límit)" + +#: noindex-seo.php:3529 +msgid "Stop indexing after this date and time" +msgstr "Deixa d'indexar després d'aquesta data i hora" + +#: noindex-seo.php:3537 msgid "Effective Directives:" msgstr "Directrius efectives:" -#: noindex-seo.php:3003 +#: noindex-seo.php:3547 msgid "Override active:" msgstr "Sobreescriptura activa:" -#: noindex-seo.php:3008 +#: noindex-seo.php:3552 msgid "Override enabled but no directives selected" msgstr "Sobreescriptura activada però sense directrius seleccionades" -#: noindex-seo.php:3014 +#: noindex-seo.php:3558 msgid "Global settings:" msgstr "Ajustaments globals:" -#: noindex-seo.php:3019 +#: noindex-seo.php:3563 msgid "No restrictions (indexable)" msgstr "Sense restriccions (indexable)" -#: noindex-seo.php:3214 +#: noindex-seo.php:3795 msgid "Override global settings for this term" msgstr "Sobreescriu els ajustaments globals d'aquest terme" -#: noindex-seo.php:3227 +#: noindex-seo.php:3826 msgid "" "When override is enabled, the directives checked above apply to this term's " "archive page and take precedence over the global category / tag / archive " @@ -177,49 +223,69 @@ msgstr "" "asobre s'apliquen a la pàgina d'arxiu d'aquest terme i prevalen sobre " "elsajustaments globals de categories, etiquetes i arxius." -#: noindex-seo.php:3322 noindex-seo.php:3328 noindex-seo.php:3443 -#: noindex-seo.php:3449 +#: noindex-seo.php:3928 noindex-seo.php:3934 noindex-seo.php:4050 +#: noindex-seo.php:4056 msgid "Robots" msgstr "Robots" -#: noindex-seo.php:3389 noindex-seo.php:3498 +#: noindex-seo.php:3992 noindex-seo.php:4111 msgid "Override (none)" msgstr "Sobreescriptura (cap)" -#: noindex-seo.php:3541 +#: noindex-seo.php:4157 msgid "Robots Directives" msgstr "Directrius Robots" -#: noindex-seo.php:3551 noindex-seo.php:4285 assets/js/editor-sidebar.js:142 +#: noindex-seo.php:4167 noindex-seo.php:4931 msgid "noindex" msgstr "noindex" -#: noindex-seo.php:3556 noindex-seo.php:4289 assets/js/editor-sidebar.js:157 +#: noindex-seo.php:4172 noindex-seo.php:4936 msgid "nofollow" msgstr "nofollow" -#: noindex-seo.php:3561 noindex-seo.php:4293 assets/js/editor-sidebar.js:172 +#: noindex-seo.php:4177 noindex-seo.php:4941 msgid "noarchive" msgstr "noarchive" -#: noindex-seo.php:3566 noindex-seo.php:4297 assets/js/editor-sidebar.js:187 +#: noindex-seo.php:4182 noindex-seo.php:4946 msgid "nosnippet" msgstr "nosnippet" -#: noindex-seo.php:3571 noindex-seo.php:4301 assets/js/editor-sidebar.js:202 +#: noindex-seo.php:4187 noindex-seo.php:4951 msgid "noimageindex" msgstr "noimageindex" -#: noindex-seo.php:3682 +#: noindex-seo.php:4192 noindex-seo.php:4956 +msgid "notranslate" +msgstr "notranslate" + +#: noindex-seo.php:4196 noindex-seo.php:4961 +msgid "max-snippet" +msgstr "max-snippet" + +#: noindex-seo.php:4205 noindex-seo.php:4966 +msgid "max-image-preview" +msgstr "max-image-preview" + +#: noindex-seo.php:4209 noindex-seo.php:4971 +msgid "max-video-preview" +msgstr "max-video-preview" + +#: noindex-seo.php:4213 noindex-seo.php:4976 +msgid "unavailable_after" +msgstr "unavailable_after" + +#: noindex-seo.php:4326 msgid "Enable Robots Override" msgstr "Activa la sobreescriptura Robots" -#: noindex-seo.php:3683 +#: noindex-seo.php:4327 msgid "Disable Robots Override" msgstr "Desactiva la sobreescriptura Robots" #. translators: %d: Number of posts updated -#: noindex-seo.php:3780 +#: noindex-seo.php:4424 #, php-format msgid "Robots override enabled for %d post." msgid_plural "Robots override enabled for %d posts." @@ -227,309 +293,309 @@ msgstr[0] "S'ha activat la sobreescriptura Robots per a %d entrada." msgstr[1] "S'ha activat la sobreescriptura Robots per a %d entrades." #. translators: %d: Number of posts updated -#: noindex-seo.php:3801 +#: noindex-seo.php:4445 #, php-format msgid "Robots override disabled for %d post." msgid_plural "Robots override disabled for %d posts." msgstr[0] "S'ha desactivat la sobreescriptura Robots per a %d entrada." msgstr[1] "S'ha desactivat la sobreescriptura Robots per a %d entrades." -#: noindex-seo.php:3850 +#: noindex-seo.php:4494 msgid "All robots settings" msgstr "Tots els ajustaments robots" -#: noindex-seo.php:3852 +#: noindex-seo.php:4496 msgid "With override" msgstr "Amb sobreescriptura" -#: noindex-seo.php:3855 +#: noindex-seo.php:4499 msgid "Without override" msgstr "Sense sobreescriptura" -#: noindex-seo.php:3974 +#: noindex-seo.php:4618 msgid "You do not have sufficient permissions to access this page." msgstr "No teniu permisos suficients per a accedir a aquesta pàgina." -#: noindex-seo.php:3975 +#: noindex-seo.php:4619 msgid "Permission Denied" msgstr "Permís denegat" -#: noindex-seo.php:3987 +#: noindex-seo.php:4631 msgid "General" msgstr "General" -#: noindex-seo.php:3988 +#: noindex-seo.php:4632 msgid "SEO Settings" msgstr "Ajustaments SEO" -#: noindex-seo.php:3989 +#: noindex-seo.php:4633 msgid "Import / Export" msgstr "Importació i exportació" -#: noindex-seo.php:4009 +#: noindex-seo.php:4653 msgid "Main Pages" msgstr "Pàgines principals" -#: noindex-seo.php:4012 +#: noindex-seo.php:4656 msgid "Front Page" msgstr "Pàgina d'inici" -#: noindex-seo.php:4013 noindex-seo.php:4020 noindex-seo.php:4032 -#: noindex-seo.php:4038 noindex-seo.php:4045 noindex-seo.php:4051 -#: noindex-seo.php:4062 noindex-seo.php:4068 noindex-seo.php:4079 -#: noindex-seo.php:4085 noindex-seo.php:4091 noindex-seo.php:4097 -#: noindex-seo.php:4103 noindex-seo.php:4114 noindex-seo.php:4120 -#: noindex-seo.php:4126 noindex-seo.php:4137 noindex-seo.php:4148 -#: noindex-seo.php:4159 noindex-seo.php:4170 noindex-seo.php:4176 -#: noindex-seo.php:4187 noindex-seo.php:4211 noindex-seo.php:4252 -#: noindex-seo.php:4578 +#: noindex-seo.php:4657 noindex-seo.php:4664 noindex-seo.php:4676 +#: noindex-seo.php:4682 noindex-seo.php:4689 noindex-seo.php:4695 +#: noindex-seo.php:4706 noindex-seo.php:4712 noindex-seo.php:4723 +#: noindex-seo.php:4729 noindex-seo.php:4735 noindex-seo.php:4741 +#: noindex-seo.php:4747 noindex-seo.php:4758 noindex-seo.php:4764 +#: noindex-seo.php:4770 noindex-seo.php:4781 noindex-seo.php:4792 +#: noindex-seo.php:4803 noindex-seo.php:4814 noindex-seo.php:4820 +#: noindex-seo.php:4831 noindex-seo.php:4855 noindex-seo.php:4896 +#: noindex-seo.php:5254 msgid "Recommended" msgstr "Recomanat" -#: noindex-seo.php:4015 +#: noindex-seo.php:4659 msgid "Block the indexing of the site's front page." msgstr "Bloqueja la indexació de la pàgina d'inici del lloc." -#: noindex-seo.php:4019 +#: noindex-seo.php:4663 msgid "Home" msgstr "Inici" -#: noindex-seo.php:4022 +#: noindex-seo.php:4666 msgid "Block the indexing of the site's home page." msgstr "Bloqueja la indexació de la pàgina principal del lloc." -#: noindex-seo.php:4028 +#: noindex-seo.php:4672 msgid "Pages and Posts" msgstr "Pàgines i entrades" -#: noindex-seo.php:4031 +#: noindex-seo.php:4675 msgid "Page" msgstr "Pàgina" -#: noindex-seo.php:4034 +#: noindex-seo.php:4678 msgid "Block the indexing of site pages." msgstr "Bloqueja la indexació de les pàgines del lloc." -#: noindex-seo.php:4037 +#: noindex-seo.php:4681 msgid "Privacy Policy" msgstr "Política de privadesa" -#: noindex-seo.php:4040 +#: noindex-seo.php:4684 msgid "Block the indexing of the privacy policy page." msgstr "Bloqueja la indexació de la pàgina de política de privadesa." -#: noindex-seo.php:4044 +#: noindex-seo.php:4688 msgid "Single Post" msgstr "Entrada individual" -#: noindex-seo.php:4047 +#: noindex-seo.php:4691 msgid "Block the indexing of individual posts." msgstr "Bloqueja la indexació d'entrades individuals." -#: noindex-seo.php:4050 +#: noindex-seo.php:4694 msgid "Singular" msgstr "Singular" -#: noindex-seo.php:4053 +#: noindex-seo.php:4697 msgid "Block the indexing of any singular content (post or page)." -msgstr "" +msgstr "Bloqueja la indexació de qualsevol contingut singular (entrada o pàgina)." "Bloqueja la indexació de qualsevol contingut singular (entrada o pàgina)." -#: noindex-seo.php:4058 +#: noindex-seo.php:4702 msgid "Taxonomies" msgstr "Taxonomies" -#: noindex-seo.php:4061 +#: noindex-seo.php:4705 msgid "Category" msgstr "Categoria" -#: noindex-seo.php:4064 +#: noindex-seo.php:4708 msgid "Block the indexing of category archive pages." msgstr "Bloqueja la indexació de les pàgines d'arxiu de categories." -#: noindex-seo.php:4067 +#: noindex-seo.php:4711 msgid "Tag" msgstr "Etiqueta" -#: noindex-seo.php:4070 +#: noindex-seo.php:4714 msgid "Block the indexing of tag archive pages." msgstr "Bloqueja la indexació de les pàgines d'arxiu d'etiquetes." -#: noindex-seo.php:4075 +#: noindex-seo.php:4719 msgid "Date Archives" msgstr "Arxius de data" -#: noindex-seo.php:4078 +#: noindex-seo.php:4722 msgid "Date" msgstr "Data" -#: noindex-seo.php:4081 +#: noindex-seo.php:4725 msgid "Block the indexing of any date-based archive page." msgstr "Bloqueja la indexació de qualsevol pàgina d'arxiu basada en data." -#: noindex-seo.php:4084 +#: noindex-seo.php:4728 msgid "Day" msgstr "Dia" -#: noindex-seo.php:4087 +#: noindex-seo.php:4731 msgid "Block the indexing of daily archive pages." msgstr "Bloqueja la indexació d'arxius diaris." -#: noindex-seo.php:4090 +#: noindex-seo.php:4734 msgid "Month" msgstr "Mes" -#: noindex-seo.php:4093 +#: noindex-seo.php:4737 msgid "Block the indexing of monthly archive pages." msgstr "Bloqueja la indexació d'arxius mensuals." -#: noindex-seo.php:4096 +#: noindex-seo.php:4740 msgid "Time" msgstr "Hora" -#: noindex-seo.php:4099 +#: noindex-seo.php:4743 msgid "Block the indexing of time-based archive pages." msgstr "Bloqueja la indexació d'arxius basats en hora." -#: noindex-seo.php:4102 +#: noindex-seo.php:4746 msgid "Year" msgstr "Any" -#: noindex-seo.php:4105 +#: noindex-seo.php:4749 msgid "Block the indexing of yearly archive pages." msgstr "Bloqueja la indexació d'arxius anuals." -#: noindex-seo.php:4110 +#: noindex-seo.php:4754 msgid "Archives" msgstr "Arxius" -#: noindex-seo.php:4113 +#: noindex-seo.php:4757 msgid "Archive" msgstr "Arxiu" -#: noindex-seo.php:4116 +#: noindex-seo.php:4760 msgid "Block the indexing of any type of archive page." msgstr "Bloqueja la indexació de qualsevol tipus de pàgina d'arxiu." -#: noindex-seo.php:4119 +#: noindex-seo.php:4763 msgid "Author" msgstr "Autor" -#: noindex-seo.php:4122 +#: noindex-seo.php:4766 msgid "Block the indexing of author archive pages." msgstr "Bloqueja la indexació de les pàgines d'arxiu d'autor." -#: noindex-seo.php:4125 +#: noindex-seo.php:4769 msgid "Post Type Archive" msgstr "Arxiu de tipus de contingut" -#: noindex-seo.php:4128 +#: noindex-seo.php:4772 msgid "Block the indexing of post type archive pages." msgstr "Bloqueja la indexació de les pàgines d'arxiu de tipus de contingut." -#: noindex-seo.php:4133 +#: noindex-seo.php:4777 msgid "Pagination" msgstr "Paginació" -#: noindex-seo.php:4136 +#: noindex-seo.php:4780 msgid "Paginated Pages" msgstr "Pàgines paginades" -#: noindex-seo.php:4139 +#: noindex-seo.php:4783 msgid "Block the indexing of pagination pages (page 2, 3, etc.)." msgstr "Bloqueja la indexació de les pàgines de paginació (pàgina 2, 3, etc.)." -#: noindex-seo.php:4144 +#: noindex-seo.php:4788 msgid "Search" msgstr "Cerca" -#: noindex-seo.php:4147 +#: noindex-seo.php:4791 msgid "Search Results" msgstr "Resultats de cerca" -#: noindex-seo.php:4150 +#: noindex-seo.php:4794 msgid "Block the indexing of search result pages." msgstr "Bloqueja la indexació de les pàgines de resultats de cerca." -#: noindex-seo.php:4155 +#: noindex-seo.php:4799 msgid "Attachments" msgstr "Adjunts" -#: noindex-seo.php:4158 +#: noindex-seo.php:4802 msgid "Attachment Pages" msgstr "Pàgines d'adjunts" -#: noindex-seo.php:4161 +#: noindex-seo.php:4805 msgid "" "Block the indexing of attachment pages (does not affect the file itself)." msgstr "" "Bloqueja la indexació de les pàgines d'adjunts (no afecta el fitxer en si)." -#: noindex-seo.php:4166 +#: noindex-seo.php:4810 msgid "Previews" msgstr "Previsualitzacions" -#: noindex-seo.php:4169 +#: noindex-seo.php:4813 msgid "Customize Preview" msgstr "Previsualització del personalitzador" -#: noindex-seo.php:4172 +#: noindex-seo.php:4816 msgid "Block the indexing when content is in customize preview mode." -msgstr "" +msgstr "Bloqueja la indexació quan el contingut es mostra en mode de previsualització del personalitzador." "Bloqueja la indexació quan el contingut és en mode de previsualització del " "personalitzador." -#: noindex-seo.php:4175 +#: noindex-seo.php:4819 msgid "Post Preview" msgstr "Previsualització de l'entrada" -#: noindex-seo.php:4178 +#: noindex-seo.php:4822 msgid "Block the indexing when viewing post previews." msgstr "Bloqueja la indexació en veure previsualitzacions d'entrades." -#: noindex-seo.php:4183 +#: noindex-seo.php:4827 msgid "Error Pages" msgstr "Pàgines d'error" -#: noindex-seo.php:4186 +#: noindex-seo.php:4830 msgid "Error 404" msgstr "Error 404" -#: noindex-seo.php:4189 +#: noindex-seo.php:4833 msgid "Block the indexing of 404 error pages." msgstr "Bloqueja la indexació de les pàgines d'error 404." #. translators: %s: post type singular name. -#: noindex-seo.php:4214 +#: noindex-seo.php:4858 #, php-format msgid "Block the indexing of individual %s." msgstr "Bloqueja la indexació de %s individuals." -#: noindex-seo.php:4218 +#: noindex-seo.php:4862 msgid "Custom Post Types" msgstr "Tipus de contingut personalitzats" -#: noindex-seo.php:4231 +#: noindex-seo.php:4875 msgid "Cart" msgstr "Cistella" -#: noindex-seo.php:4232 +#: noindex-seo.php:4876 msgid "Block the indexing of the WooCommerce cart page." msgstr "Bloqueja la indexació de la pàgina de la cistella del WooCommerce." -#: noindex-seo.php:4235 +#: noindex-seo.php:4879 msgid "Checkout" msgstr "Pagament" -#: noindex-seo.php:4236 +#: noindex-seo.php:4880 msgid "Block the indexing of the WooCommerce checkout page." msgstr "Bloqueja la indexació de la pàgina de pagament del WooCommerce." -#: noindex-seo.php:4239 +#: noindex-seo.php:4883 msgid "My Account" msgstr "El meu compte" -#: noindex-seo.php:4240 +#: noindex-seo.php:4884 msgid "" "Block the indexing of the WooCommerce customer account pages (including " "order history and address endpoints)." @@ -537,35 +603,43 @@ msgstr "" "Bloqueja la indexació de les pàgines del compte de client del WooCommerce " "(incloent-hi l'historial de comandes i les adreces)." -#: noindex-seo.php:4260 +#: noindex-seo.php:4904 msgid "WooCommerce" msgstr "WooCommerce" -#: noindex-seo.php:4286 +#: noindex-seo.php:4932 msgid "Prevent search engines from indexing this page" msgstr "Evita que els cercadors indexin aquesta pàgina" -#: noindex-seo.php:4290 +#: noindex-seo.php:4937 msgid "Prevent search engines from following links on this page" msgstr "Evita que els cercadors segueixin els enllaços en aquesta pàgina" -#: noindex-seo.php:4294 +#: noindex-seo.php:4942 msgid "Prevent search engines from showing a cached version" msgstr "Evita que els cercadors mostrin una versió en memòria cau" -#: noindex-seo.php:4298 +#: noindex-seo.php:4947 msgid "Prevent search engines from showing text snippets" msgstr "Evita que els cercadors mostrin fragments de text" -#: noindex-seo.php:4302 +#: noindex-seo.php:4952 msgid "Prevent search engines from indexing images" msgstr "Evita que els cercadors indexin imatges" -#: noindex-seo.php:4308 +#: noindex-seo.php:4957 +msgid "Ask search engines not to translate this page" +msgstr "Demaneu als cercadors que no tradueixin aquesta pàgina" + +#: noindex-seo.php:4977 +msgid "Stop indexing this page after this date and time" +msgstr "Deixa d'indexar aquesta pàgina a partir d'aquesta data i hora" + +#: noindex-seo.php:4984 msgid "noindex SEO Settings" msgstr "Ajustaments de noindex SEO" -#: noindex-seo.php:4309 +#: noindex-seo.php:4985 msgid "" "Control how search engines index and display your WordPress content using " "robots directives." @@ -573,7 +647,7 @@ msgstr "" "Controla com els cercadors indexen i mostren el vostre contingut de " "WordPress fent servir directrius robots." -#: noindex-seo.php:4320 +#: noindex-seo.php:4996 msgid "" "Recommended defaults applied. Review the changes below and click \"Save " "Changes\" to keep them, or uncheck anything you do not want." @@ -581,11 +655,11 @@ msgstr "" "Valors recomanats aplicats. Reviseu els canvis de baix i feu clic a «Desaels " "canvis» per a conservar-los, o desmarqueu el que no vulgueu." -#: noindex-seo.php:4328 +#: noindex-seo.php:5004 msgid "Settings imported successfully." msgstr "S'han importat els ajustaments correctament." -#: noindex-seo.php:4335 +#: noindex-seo.php:5011 msgid "" "The settings file could not be imported: it is missing, too large, or not a " "valid noindex SEO export." @@ -593,35 +667,35 @@ msgstr "" "No s'ha pogut importar el fitxer d'ajustaments: no existeix, és massa gran o " "no és una exportació vàlida de noindex SEO." -#: noindex-seo.php:4343 +#: noindex-seo.php:5019 msgid "Settings sections" msgstr "Seccions dels ajustaments" -#: noindex-seo.php:4370 +#: noindex-seo.php:5046 msgid "General Configuration" msgstr "Configuració general" -#: noindex-seo.php:4384 +#: noindex-seo.php:5060 msgid "Disable compatibility warnings with other SEO plugins" msgstr "Desactiva els avisos de compatibilitat amb altres complements de SEO" -#: noindex-seo.php:4391 +#: noindex-seo.php:5067 msgid "Implementation Method" msgstr "Mètode d'implementació" -#: noindex-seo.php:4399 +#: noindex-seo.php:5075 msgid "HTML Meta Tags (default, easier to verify)" msgstr "Etiquetes meta HTML (per defecte, més fàcil de comprovar)" -#: noindex-seo.php:4402 +#: noindex-seo.php:5078 msgid "HTTP Headers (more robust, works with PDFs/images)" msgstr "Capçaleres HTTP (més robust, funciona amb PDFs/imatges)" -#: noindex-seo.php:4405 +#: noindex-seo.php:5081 msgid "Both (maximum compatibility)" msgstr "Ambdós (màxima compatibilitat)" -#: noindex-seo.php:4409 +#: noindex-seo.php:5085 msgid "" "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, " @@ -631,11 +705,11 @@ msgstr "" "funcionen per a pàgines HTML. Les capçaleres HTTP funcionen per a tots els " "tipus de contingut, incloent-hi PDFs, imatges i feeds." -#: noindex-seo.php:4427 +#: noindex-seo.php:5103 msgid "Enable per-post/page granular control" msgstr "Activa el control granular per entrada/pàgina" -#: noindex-seo.php:4430 +#: noindex-seo.php:5106 msgid "" "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 " @@ -645,11 +719,11 @@ msgstr "" "permet sobreescriure els ajustaments globals per a contingut individual. " "Útil per a pàgines específiques que necessiten directrius robots diferents." -#: noindex-seo.php:4448 +#: noindex-seo.php:5124 msgid "Enable per-term granular control" msgstr "Activa el control granular per terme" -#: noindex-seo.php:4451 +#: noindex-seo.php:5127 msgid "" "When enabled, a \"Search Engine Visibility\" panel will appear on the Edit " "screen for every public taxonomy (categories, tags, and custom taxonomies " @@ -662,11 +736,11 @@ msgstr "" "És útil per a aplicar noindex a una categoria o etiqueta concreta " "senseafectar les altres." -#: noindex-seo.php:4469 +#: noindex-seo.php:5145 msgid "Delete all plugin data on uninstall" msgstr "Suprimeix totes les dades del complement en desinstal·lar" -#: noindex-seo.php:4472 +#: noindex-seo.php:5148 msgid "" "When enabled, all settings and per-post robots directives will be " "permanently deleted when the plugin is uninstalled. By default data is " @@ -676,11 +750,11 @@ msgstr "" "suprimiran de forma permanent en desinstal·lar el complement. Per defecte, " "les dades es conserven." -#: noindex-seo.php:4488 +#: noindex-seo.php:5164 msgid "Recommended settings" msgstr "Ajustaments recomanats" -#: noindex-seo.php:4490 +#: noindex-seo.php:5166 msgid "" "Enables all 5 directives on the 15 contexts flagged \"Recommended\" (privacy " "policy, date archives, pagination, search results, attachment pages, " @@ -691,36 +765,36 @@ msgstr "" "cerca,pàgines d'adjunts, previsualitzacions, 404 i cistella, pagament i " "compte del WooCommerce). Reviseu i deseu." -#: noindex-seo.php:4497 +#: noindex-seo.php:5173 msgid "Apply Recommended Defaults" msgstr "Aplica els valors recomanats" -#: noindex-seo.php:4502 +#: noindex-seo.php:5178 msgid "Enable all directives for the 15 contexts flagged as recommended." -msgstr "" +msgstr "Activa totes les directives dels 15 contextos marcats com a recomanats." "Activa totes les directives en els 15 contextos marcats com a recomanats." -#: noindex-seo.php:4516 +#: noindex-seo.php:5192 msgid "Overview" msgstr "Resum" -#: noindex-seo.php:4520 +#: noindex-seo.php:5196 msgid "Total Options" msgstr "Opcions totals" -#: noindex-seo.php:4524 +#: noindex-seo.php:5200 msgid "Enabled" msgstr "Activades" -#: noindex-seo.php:4528 +#: noindex-seo.php:5204 msgid "Recommended to Enable" msgstr "Recomanades per a activar" -#: noindex-seo.php:4533 +#: noindex-seo.php:5209 msgid "Page contexts" msgstr "Contextos de pàgina" -#: noindex-seo.php:4538 +#: noindex-seo.php:5214 msgid "" "Important: Enabling noindex on the wrong pages can harm your search engine " "rankings. Only enable options you fully understand." @@ -729,40 +803,89 @@ msgstr "" "vostre posicionament als cercadors. Activeu només les opcions que enteneu " "completament." -#: noindex-seo.php:4545 +#: noindex-seo.php:5221 msgid "Search options..." msgstr "Cerca opcions…" -#: noindex-seo.php:4546 +#: noindex-seo.php:5222 msgid "Search options" msgstr "Cerca opcions" -#: noindex-seo.php:4571 +#: noindex-seo.php:5247 msgid "This option only works with HTTP Headers implementation method" -msgstr "" +msgstr "Aquesta opció només funciona amb el mètode d'implementació de capçaleres HTTP" "Aquesta opció només funciona amb el mètode d'implementació de capçaleres HTTP" -#: noindex-seo.php:4580 +#: noindex-seo.php:5256 msgid "Not Recommended" msgstr "No recomanat" -#: noindex-seo.php:4585 +#: noindex-seo.php:5261 msgid "View Page" msgstr "Mostra la pàgina" -#: noindex-seo.php:4629 noindex-seo.php:4638 +#: noindex-seo.php:5342 noindex-seo.php:5350 +msgid "Conditional rules" +msgstr "Regles condicionals" + +#: noindex-seo.php:5344 +msgid "" +"Automatically apply noindex to any post whose custom field (for example an " +"ACF field) exactly matches a value. Rules run below the per-post overrides " +"and above the global context settings, and matched posts drop out of the XML " +"sitemap." +msgstr "" +"Apliqueu automàticament noindex a qualsevol entrada el camp personalitzat " +"de la qual (per exemple, un camp d'ACF) coincideixi exactament amb un valor. " +"Les regles s'executen per sota dels ajustos individuals de cada entrada i " +"per sobre dels ajustos globals de context, i les entrades coincidents " +"desapareixen del mapa del lloc XML." + +#: noindex-seo.php:5357 +msgid "Field name" +msgstr "Nom del camp" + +#: noindex-seo.php:5358 +msgid "Value" +msgstr "Valor" + +#: noindex-seo.php:5359 +msgid "Actions" +msgstr "Accions" + +#: noindex-seo.php:5375 +msgid "custom_field_name" +msgstr "nom_del_camp_personalitzat" + +#: noindex-seo.php:5376 +msgid "value that triggers noindex" +msgstr "valor que activa noindex" + +#: noindex-seo.php:5377 +msgid "Remove rule" +msgstr "Suprimeix la regla" + +#: noindex-seo.php:5382 +msgid "Add rule" +msgstr "Afegeix una regla" + +#: noindex-seo.php:5383 +msgid "Up to 20 rules. Rows with an empty field or value are ignored." +msgstr "Fins a 20 regles. Les files amb un camp o un valor buits s'ignoren." + +#: noindex-seo.php:5397 noindex-seo.php:5406 msgid "Export settings" msgstr "Exporta els ajustaments" -#: noindex-seo.php:4631 +#: noindex-seo.php:5399 msgid "Download the current settings as a JSON file." msgstr "Baixa els ajustaments actuals en un fitxer JSON." -#: noindex-seo.php:4647 noindex-seo.php:4655 noindex-seo.php:4665 +#: noindex-seo.php:5415 noindex-seo.php:5423 noindex-seo.php:5433 msgid "Import settings" msgstr "Importa els ajustaments" -#: noindex-seo.php:4649 +#: noindex-seo.php:5417 msgid "" "Restore the global settings from a previously exported JSON file. Per-post " "and per-term overrides are kept." @@ -770,36 +893,32 @@ msgstr "" "Restaura els ajustaments globals des d'un fitxer JSON exportat anteriorment. " "Les sobreescriptures per entrada i per terme es conserven." -#: assets/js/editor-sidebar.js:103 +#: assets/js/editor-sidebar.js:188 msgid "Enable to set custom robots directives for this content" -msgstr "" +msgstr "Activeu-la per a definir directives robots personalitzades per a aquest contingut" "Activeu per a establir directrius robots personalitzades per a aquest " "contingut" -#: assets/js/editor-sidebar.js:133 +#: assets/js/editor-sidebar.js:218 msgid "Robots Directives:" msgstr "Directrius robots:" -#: assets/js/editor-sidebar.js:143 -msgid "Prevent search engines from indexing" -msgstr "Evita que els cercadors indexin" - -#: assets/js/editor-sidebar.js:158 -msgid "Prevent search engines from following links" -msgstr "Evita que els cercadors segueixin els enllaços" - -#: assets/js/editor-sidebar.js:173 -msgid "Prevent cached versions in search results" -msgstr "Evita versions en memòria cau als resultats de cerca" - -#: assets/js/editor-sidebar.js:188 -msgid "Prevent text snippets in search results" -msgstr "Evita fragments de text als resultats de cerca" - -#: assets/js/editor-sidebar.js:237 +#: assets/js/editor-sidebar.js:249 msgid "Active Directives:" msgstr "Directrius actives:" +#~ msgid "Prevent search engines from indexing" +#~ msgstr "Evita que els cercadors indexin" + +#~ msgid "Prevent search engines from following links" +#~ msgstr "Evita que els cercadors segueixin els enllaços" + +#~ msgid "Prevent cached versions in search results" +#~ msgstr "Evita versions en memòria cau als resultats de cerca" + +#~ msgid "Prevent text snippets in search results" +#~ msgstr "Evita fragments de text als resultats de cerca" + #~ msgid "🔍 noindex" #~ msgstr "🔍 noindex" @@ -814,3 +933,4 @@ msgstr "Directrius actives:" #~ msgid "🖼️ noimageindex" #~ msgstr "🖼️ noimageindex" + diff --git a/languages/noindex-seo-es_ES.mo b/languages/noindex-seo-es_ES.mo index 0c8b1a02c0dfafe829fdaaccf05a4e062d3e9838..4dbc926e7c3a788e6c19940f1e4c5d9501298377 100644 GIT binary patch delta 6208 zcmb7{d303O9mj717}h`p*#lQ4m|(&dkj)gZfTAE6L9n3sGV_u=n3*@u5*C-SE(jK= zc4~`OE7ZLfEgg3~+M3p__E=Bl^yqOvc(kI`E?Qft_Va!3#iiOmdJo_E-22{r_x|p0 zxyI{ulh;h5WWY8!?FS4 zypd4v$G`^I0QqND@uMXZ@G!Um9x$e03UtQuU|p3lli~N^O!yl(0czKUU?MygZh~6) z7B~(*568ey;W2OwR@K8ra0c86$HNlT{5Rl{u-_nKYT4gRpfiyNE8!Hl6(->$P#@MG z5iYn2%786UhTR>F_roT}0|tllPlfX21+Y837RnBh5Mwy3X@RR@ z4(^1{MbFm`4d0&+wcrle4;EoJxEme~Z-#tgo`O^1>rkE=GRzokH1i>QnpJQv%)mko zoxAB+_#&JJ4?@Mfk-)wPXTe@@@Q5&m7WQUb4++1S7L8Ag*bMdkSx_6hkSLq;phB<> zPKNi5!2deYJJH1Vp%(0c|HLEUg|G%{!J*e+S z+prubLK!>{R>H+lp<506z*cxM%s}$n6h5S*81=?qnqc8NSPxaFJE2Z=1JsH3!bR}c z@MKtZRCu!0Q1d+~52m3E*cx#s)H=698TbIi_JVng4&gIzL=!%RGNg)>4qOi>G9C*R zyA@EbUIks)3cmrLfy$*mW5N&(fOV!l1H09R8}^6CGaeN2G&qa#4yY494Yl!0un``DGH7BQ@7doR zM@I{uqz7;r>;+q4Pnd>Eo{g{qZibq_11g5sLLc4*?}4Mog@)~ey%@g;HGefgE??5fo_I(K)Li2cmkX?DJ-K4AvT&jApguC`B7E$ z;xHuS;#*#5WmlX3*cOMIa~^#YQ+DS(HV~Uda(=6gl|Nw#$38)C9H?r z;iK?DsCk=?Bf;Q3P#$?6_J%LP0q`yO2lz4U2cO}39Ry#5arl0L&W&`IQS3*;kD-!f z_>9nXGhr3uIj}oyhB(EnfSR`j%2T&NdE`xa1RR2Os;UO~LwGXO0p5VMus<3416Y_& zM@jN5972ptcQBv1aWqKv>T1hr_{8E3lB!A3Dus>`dwRMsv zsFR)!wP6dCM>atjcq!ZtuY@|tsCmW=gN;z%Erx|HbXL<*Y~F-A$-7V%egfmLYCg3O zJD?Wc2Q~k7s0H7KGN61xXy9g!e*u;?Zb) z5NgBjC-TPw900F_+hBKCcTyOF@sO!zHtYd6LuLCmsP7-p`!fEfgs(B~dvaKH@12bQ zb;7GoG3NL1BPb6%!EGYG0JXpYs15%CW#Az=4NhMij?++C{WGW-KLNR8%v)}JNYDqZncTnr>gPQ+pG(G@z zkPo3;Ua^$YgBK$TOZkr*k-~62Qleahy4sy|&WHv#!YhzMpg5}aL*EH{{0Azca%C;L z9LZbCjdRd8GzzUmswi5)Y~c3}GzOiCZbn^AC*6fqW;xUwsqH{DNGDRON4KKch!B6N zEn`Hu&1NJIFGmy6FVIao|7mp2M;0ZKZmZi+2U0r)eGlEO0qv>~U-~7?!JqC5flAXu zX{4A8qn?uVcOtX zQGXTG1vCXI$<>q_YR95EsBk<#*B~FM%|$cN_t6PRZ5(Ps3(y4gAX3{DBKWQ1cROl9 z>w_m$13WM43wxse58?E%ud{`J6o@CH`_XsNR`hK&4XHVZq!0c_H3ct2BhWfjj@F

zFIs`Vg|0-$p{{l`ox!M54|M*e>d=OvbJ5kPh}3$ZZs^CT0wvI0Xd#NB@u;gkL}yVn z*a=JMC(+o!pKyzPDo?1-uCrO!$;8^Nn`-k? zZq}y!oXz<*mvK_rgp+e^uHDPpwA1DmPpPaa%+2Tgq?7YvP9m|uM3@Z9w*w8=G#qgUCKmrlDm zo50h#cI%~Vtli0QZa0&)wGESO6OObAFX`p#KKrPH)A^sT=W?X@*Ua{d*9<$mytTFT z;jrei;<+PI#Xch^7h6W&-#ZE;<`<_|zgm%$i!%Ar;iLXtHu3ZvXAeS$cRr7^by~40 z9LJRba&FE`y2VQSWMO$)ah^Oe^aT;}*Jtf|j}sA6H<`|DjKWQ@gCJTb<65sR0b;vwUj8$?!$e+0YP#p&<%G@Fenn&<~v2^|q9*$&@WgxhCaz&7lOkvfpHLoZiXA zO+MvxI9@`AtO*=s!qes29SSDnwY4dZQ7M%EG`3&)xVf;Q9QpXCLd#xO?U35T%F>wI!ZE~ zpd9&BrP;Y#wV8Cu{4QfyGnRJ}=jJ`4$_rM~la0P*Vw&v2aAmi*i7jnyT2;E1cqIIK zOW}o+;;!noj+*jPF^>g;lGR29b|Nh`6_5Ct@pcjC433qh^t4tij~6MpjE%c3&RQP? z$8^?mKX68J&?6`q$$)p9oed&Ob)m@a7(xB-4^`;J0ZkPPyJ{ViH`)aIM_*^V43)e?k2cz(pod2lJ|T|@fWM=8;Up8?J6GGFrs+QxZb7eaX0no%`uXB9G`KD zk58!Q-O$pW3AdCDYF6;H2M18Bb%0Xyq?Ynw)Q=zMm0ow{xw>xgms4!<-Nt^!I~#8v z*trLn5l!v^UbT8DFH?Md(!k=zDMyu-PPx5oz^Q(+h4PV!K^#gSPwgx#EOU}h=U(3u zZLXcrom`n-kQusr0!MkgZgZ7?i+nEkTs|Is5FWWT}h8s?%rwD#^%Z|=Hy05;vMDf9CZ9V7VeWib?ditGZ#U3*+Dc(JE za_xnsu;pzHY)4X&q!z>7(Q0<+J9wYk9!d!KFp_i?u+S=H%_j$hO ze((97^Eu~y_1H1j(E~33@8ZG_8Oks*k*JI?<`Q;~;e&EL+L$=}4BZ$t)|h1U;3&+; zo3Ipb#!8IDdK`%@I0f5r4)$XnUcgz#_)SENF-vKfkJHhQGw}tShVNn~hSU30%*Gj5 zg9~v7=HRQS`#->RjEglU3+G`j*5f=pfSd6w=J0$oo9U^;2Gjud<1Bp5x&AX2aGk*P z^`PabOzp&Q97JVc$nixy&h;sb!qxG{)L}Co#y62?oB9Og`KFDEI_g2PY3X=QD~RY7cEh zZN?*hDzmBl6xESQv3GeaY9`yC+~L@R>gaLQz@A0^%nN)lc5@N+{Z-TeZ=miQ z>9IF+3@YVr^kOP5*7@H}MQe2ywN~d*GyN5ga*;xOgX^no3=2<8V)mHN(HO*j)bAFM zXJxP)HGq| zU31C5c5fdIci^{>$(tLo-^*J@`Co!0(|Za@A@747Jvg zx7hCsH|qXr$nH0b{8W^hE*y!ckav%H9eH<{cTgREg2ym|7kNAm;|M&B8rT_R`OS}! zSAh8h$6_3Bp(ISl1YC&xnLGK=ef~XEn2Z@ljr2E;e?&d#Lv*A5t&M|tjKry^fz3tD zs0_K)tVBKVF;r$xAb;jfK9r$zt(O| znLX2XR0lgT91kE_G!`zvpE=i~%I!5QMGlH-LZ!GLHSlLJ3QwYD{9RPPXD|^jq7VO2 zPX13*S-HgSAnrC}82JB`owTR}b$%D2hklJ9gXTek_eyY6b>h853K1&xPNfKwiGE@$ zp;D*y-$rGS(B{&5ab$x^1+4=?r2saxIsGb5bbmJVW$pe)m%em0YJX(UBu>zCt`sOeZE2Dyc*Tkw|FcX|sjOIHyv88N^zm zme58Fl_sa+R(|ys`zoOw`Ka^70o+G~6FSQ}Zt=u=LZyvZ6|C9+@zkq#1#zd-7UFg) zTZoxXLn&4h3yE^#;n4c7=AwnTkC;k4N$6-662pW_81YE3_TP_XRCf?%PSbK+>eOqn z-Kj@ArsFPREO9pxpUsELCZd}tA*{Dz60B=6MONL-8P>tr#6VB%m59LoNk1PESU#cN zW#y#Y8|X`^cBOdNdA4~wd@XIQK2J-l$LDSAXxiZE@cOoH>hxJ}r*>I&X(?7wTCtUZ z+tYrK>V2To<7;hcZ})cozn_$PE(LPZue+?fGkz4($;^I3I^##!fz zAGI<|)>sWCSCZFvG&XPcwsyApJnOukPNvlM diff --git a/languages/noindex-seo-es_ES.po b/languages/noindex-seo-es_ES.po index 2faec61..3f9f101 100644 --- a/languages/noindex-seo-es_ES.po +++ b/languages/noindex-seo-es_ES.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: noindex SEO 3.1.3\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/noindex-seo\n" -"POT-Creation-Date: 2026-11-03T15:21:45+00:00\n" +"POT-Creation-Date: 2026-11-03T17:16:14+00:00\n" "PO-Revision-Date: 2026-08-17T20:00+00:00\n" "Last-Translator: ROBOTSTXT \n" "Language-Team: Spanish (Spain) — https://translate.wordpress.org/locale/es/" @@ -19,7 +19,7 @@ msgstr "" "X-Domain: noindex-seo\n" #. Plugin Name of the plugin -#: noindex-seo.php noindex-seo.php:1657 noindex-seo.php:1658 +#: noindex-seo.php noindex-seo.php:2044 noindex-seo.php:2045 msgid "noindex SEO" msgstr "noindex SEO" @@ -49,40 +49,40 @@ msgstr "ROBOTSTXT" msgid "https://www.robotstxt.software/" msgstr "https://www.robotstxt.software/" -#: noindex-seo.php:1080 +#: noindex-seo.php:1449 msgid "Post ID to compute effective directives for." msgstr "ID de la entrada para calcular las directivas efectivas." -#: noindex-seo.php:1107 +#: noindex-seo.php:1476 msgid "You do not have permission to read the noindex SEO settings." msgstr "No tienes permiso para leer los ajustes de noindex SEO." -#: noindex-seo.php:1157 +#: noindex-seo.php:1526 msgid "You do not have permission to read directives for this post." msgstr "No tienes permiso para leer las directivas de esta entrada." -#: noindex-seo.php:1217 +#: noindex-seo.php:1589 msgid "No post exists with that post_id." msgstr "No existe ninguna entrada con ese post_id." -#: noindex-seo.php:1508 +#: noindex-seo.php:1895 msgid "Settings saved successfully!" msgstr "¡Ajustes guardados correctamente!" -#: noindex-seo.php:1509 +#: noindex-seo.php:1896 msgid "Expand All" msgstr "Expandir todo" -#: noindex-seo.php:1510 +#: noindex-seo.php:1897 msgid "Collapse All" msgstr "Contraer todo" -#: noindex-seo.php:1590 +#: noindex-seo.php:1977 msgid "Settings" msgstr "Ajustes" #. translators: plugin name. -#: noindex-seo.php:1883 +#: noindex-seo.php:2270 #, php-format msgid "" "noindex SEO has detected that %s is active. This may cause conflicts. Please " @@ -92,7 +92,7 @@ msgstr "" "Configura las opciones en consecuencia." #. translators: %s: comma-separated list of wp_robots callbacks. -#: noindex-seo.php:1904 +#: noindex-seo.php:2291 #, php-format msgid "" "noindex SEO has detected that another plugin or theme is adding robots " @@ -103,20 +103,20 @@ msgstr "" "robots mediante la API wp_robots (%s). Esto puede causar conflictos. " "Configura las opciones en consecuencia." -#: noindex-seo.php:2021 noindex-seo.php:2151 noindex-seo.php:2202 -#: noindex-seo.php:2290 +#: noindex-seo.php:2408 noindex-seo.php:2561 noindex-seo.php:2612 +#: noindex-seo.php:2710 msgid "Permission denied." msgstr "Permiso denegado." -#: noindex-seo.php:2886 noindex-seo.php:3210 assets/js/editor-sidebar.js:91 +#: noindex-seo.php:3402 noindex-seo.php:3791 assets/js/editor-sidebar.js:176 msgid "Search Engine Visibility" msgstr "Visibilidad en buscadores" -#: noindex-seo.php:2938 noindex-seo.php:3545 assets/js/editor-sidebar.js:102 +#: noindex-seo.php:3463 noindex-seo.php:4161 assets/js/editor-sidebar.js:187 msgid "Override global settings" msgstr "Sobrescribir ajustes globales" -#: noindex-seo.php:2943 +#: noindex-seo.php:3468 msgid "" "When enabled, these directives will override the global settings for this " "specific content." @@ -124,51 +124,95 @@ msgstr "" "Al activarse, estas directivas sobrescribirán los ajustes globales para este " "contenido específico." -#: noindex-seo.php:2950 +#: noindex-seo.php:3475 msgid "Prevent indexing" msgstr "Evitar indexación" -#: noindex-seo.php:2955 +#: noindex-seo.php:3480 msgid "Prevent link following" msgstr "Evitar seguimiento de enlaces" -#: noindex-seo.php:2960 +#: noindex-seo.php:3485 msgid "Prevent caching" msgstr "Evitar caché" -#: noindex-seo.php:2965 +#: noindex-seo.php:3490 msgid "Prevent snippets" msgstr "Evitar snippets" -#: noindex-seo.php:2970 assets/js/editor-sidebar.js:203 +#: noindex-seo.php:3495 msgid "Prevent image indexing" msgstr "Evitar indexación de imágenes" -#: noindex-seo.php:2978 +#: noindex-seo.php:3500 +msgid "Prevent translation" +msgstr "Evitar la traducción" + +#: noindex-seo.php:3505 +msgid "Value directives (empty = off):" +msgstr "Directivas con valor (vacío = desactivado):" + +#: noindex-seo.php:3508 noindex-seo.php:3514 noindex-seo.php:3523 +#: noindex-seo.php:3810 noindex-seo.php:3818 noindex-seo.php:4195 +#: noindex-seo.php:4200 noindex-seo.php:4208 noindex-seo.php:5296 +#: noindex-seo.php:5312 assets/js/editor-sidebar.js:141 +msgid "Off" +msgstr "Desactivado" + +#: noindex-seo.php:3509 noindex-seo.php:4962 +msgid "Maximum snippet length in characters (-1 = no limit)" +msgstr "Longitud máxima del fragmento en caracteres (-1 = sin límite)" + +#: noindex-seo.php:3515 noindex-seo.php:3811 noindex-seo.php:4201 +#: noindex-seo.php:5313 assets/js/editor-sidebar.js:142 +msgid "none" +msgstr "ninguna" + +#: noindex-seo.php:3516 noindex-seo.php:3812 noindex-seo.php:4202 +#: noindex-seo.php:5314 assets/js/editor-sidebar.js:143 +msgid "standard" +msgstr "estándar" + +#: noindex-seo.php:3517 noindex-seo.php:3813 noindex-seo.php:4203 +#: noindex-seo.php:5315 assets/js/editor-sidebar.js:144 +msgid "large" +msgstr "grande" + +#: noindex-seo.php:3519 noindex-seo.php:4967 +msgid "Maximum image preview size" +msgstr "Tamaño máximo de la vista previa de imágenes" + +#: noindex-seo.php:3524 noindex-seo.php:4972 +msgid "Maximum video preview seconds (-1 = no limit)" +msgstr "Segundos máximos de la vista previa de vídeo (-1 = sin límite)" + +#: noindex-seo.php:3529 + +#: noindex-seo.php:3537 msgid "Effective Directives:" msgstr "Directivas efectivas:" -#: noindex-seo.php:3003 +#: noindex-seo.php:3547 msgid "Override active:" msgstr "Sobrescritura activa:" -#: noindex-seo.php:3008 +#: noindex-seo.php:3552 msgid "Override enabled but no directives selected" msgstr "Sobrescritura activada pero sin directivas seleccionadas" -#: noindex-seo.php:3014 +#: noindex-seo.php:3558 msgid "Global settings:" msgstr "Ajustes globales:" -#: noindex-seo.php:3019 +#: noindex-seo.php:3563 msgid "No restrictions (indexable)" msgstr "Sin restricciones (indexable)" -#: noindex-seo.php:3214 +#: noindex-seo.php:3795 msgid "Override global settings for this term" msgstr "Sobrescribir los ajustes globales para este término" -#: noindex-seo.php:3227 +#: noindex-seo.php:3826 msgid "" "When override is enabled, the directives checked above apply to this term's " "archive page and take precedence over the global category / tag / archive " @@ -178,49 +222,69 @@ msgstr "" "marcadasarriba se aplican a la página de archivo de este término y " "prevalecen sobrelos ajustes globales de categorías, etiquetas y archivos." -#: noindex-seo.php:3322 noindex-seo.php:3328 noindex-seo.php:3443 -#: noindex-seo.php:3449 +#: noindex-seo.php:3928 noindex-seo.php:3934 noindex-seo.php:4050 +#: noindex-seo.php:4056 msgid "Robots" msgstr "Robots" -#: noindex-seo.php:3389 noindex-seo.php:3498 +#: noindex-seo.php:3992 noindex-seo.php:4111 msgid "Override (none)" msgstr "Sobrescritura (ninguna)" -#: noindex-seo.php:3541 +#: noindex-seo.php:4157 msgid "Robots Directives" msgstr "Directivas Robots" -#: noindex-seo.php:3551 noindex-seo.php:4285 assets/js/editor-sidebar.js:142 +#: noindex-seo.php:4167 noindex-seo.php:4931 msgid "noindex" msgstr "noindex" -#: noindex-seo.php:3556 noindex-seo.php:4289 assets/js/editor-sidebar.js:157 +#: noindex-seo.php:4172 noindex-seo.php:4936 msgid "nofollow" msgstr "nofollow" -#: noindex-seo.php:3561 noindex-seo.php:4293 assets/js/editor-sidebar.js:172 +#: noindex-seo.php:4177 noindex-seo.php:4941 msgid "noarchive" msgstr "noarchive" -#: noindex-seo.php:3566 noindex-seo.php:4297 assets/js/editor-sidebar.js:187 +#: noindex-seo.php:4182 noindex-seo.php:4946 msgid "nosnippet" msgstr "nosnippet" -#: noindex-seo.php:3571 noindex-seo.php:4301 assets/js/editor-sidebar.js:202 +#: noindex-seo.php:4187 noindex-seo.php:4951 msgid "noimageindex" msgstr "noimageindex" -#: noindex-seo.php:3682 +#: noindex-seo.php:4192 noindex-seo.php:4956 +msgid "notranslate" +msgstr "notranslate" + +#: noindex-seo.php:4196 noindex-seo.php:4961 +msgid "max-snippet" +msgstr "max-snippet" + +#: noindex-seo.php:4205 noindex-seo.php:4966 +msgid "max-image-preview" +msgstr "max-image-preview" + +#: noindex-seo.php:4209 noindex-seo.php:4971 +msgid "max-video-preview" +msgstr "max-video-preview" + +#: noindex-seo.php:4213 noindex-seo.php:4976 +msgid "unavailable_after" +msgstr "unavailable_after" + +#: noindex-seo.php:4326 msgid "Enable Robots Override" msgstr "Activar sobrescritura Robots" -#: noindex-seo.php:3683 +#: noindex-seo.php:4327 msgid "Disable Robots Override" msgstr "Desactivar sobrescritura Robots" #. translators: %d: Number of posts updated -#: noindex-seo.php:3780 +#: noindex-seo.php:4424 #, php-format msgid "Robots override enabled for %d post." msgid_plural "Robots override enabled for %d posts." @@ -228,313 +292,313 @@ msgstr[0] "Sobrescritura Robots activada para %d entrada." msgstr[1] "Sobrescritura Robots activada para %d entradas." #. translators: %d: Number of posts updated -#: noindex-seo.php:3801 +#: noindex-seo.php:4445 #, php-format msgid "Robots override disabled for %d post." msgid_plural "Robots override disabled for %d posts." msgstr[0] "Sobrescritura Robots desactivada para %d entrada." msgstr[1] "Sobrescritura Robots desactivada para %d entradas." -#: noindex-seo.php:3850 +#: noindex-seo.php:4494 msgid "All robots settings" msgstr "Todos los ajustes robots" -#: noindex-seo.php:3852 +#: noindex-seo.php:4496 msgid "With override" msgstr "Con sobrescritura" -#: noindex-seo.php:3855 +#: noindex-seo.php:4499 msgid "Without override" msgstr "Sin sobrescritura" -#: noindex-seo.php:3974 +#: noindex-seo.php:4618 msgid "You do not have sufficient permissions to access this page." msgstr "No tienes permisos suficientes para acceder a esta página." -#: noindex-seo.php:3975 +#: noindex-seo.php:4619 msgid "Permission Denied" msgstr "Permiso denegado" -#: noindex-seo.php:3987 +#: noindex-seo.php:4631 msgid "General" msgstr "General" -#: noindex-seo.php:3988 +#: noindex-seo.php:4632 msgid "SEO Settings" msgstr "Ajustes SEO" -#: noindex-seo.php:3989 +#: noindex-seo.php:4633 msgid "Import / Export" msgstr "Importación y exportación" -#: noindex-seo.php:4009 +#: noindex-seo.php:4653 msgid "Main Pages" msgstr "Páginas principales" -#: noindex-seo.php:4012 +#: noindex-seo.php:4656 msgid "Front Page" msgstr "Página de inicio" -#: noindex-seo.php:4013 noindex-seo.php:4020 noindex-seo.php:4032 -#: noindex-seo.php:4038 noindex-seo.php:4045 noindex-seo.php:4051 -#: noindex-seo.php:4062 noindex-seo.php:4068 noindex-seo.php:4079 -#: noindex-seo.php:4085 noindex-seo.php:4091 noindex-seo.php:4097 -#: noindex-seo.php:4103 noindex-seo.php:4114 noindex-seo.php:4120 -#: noindex-seo.php:4126 noindex-seo.php:4137 noindex-seo.php:4148 -#: noindex-seo.php:4159 noindex-seo.php:4170 noindex-seo.php:4176 -#: noindex-seo.php:4187 noindex-seo.php:4211 noindex-seo.php:4252 -#: noindex-seo.php:4578 +#: noindex-seo.php:4657 noindex-seo.php:4664 noindex-seo.php:4676 +#: noindex-seo.php:4682 noindex-seo.php:4689 noindex-seo.php:4695 +#: noindex-seo.php:4706 noindex-seo.php:4712 noindex-seo.php:4723 +#: noindex-seo.php:4729 noindex-seo.php:4735 noindex-seo.php:4741 +#: noindex-seo.php:4747 noindex-seo.php:4758 noindex-seo.php:4764 +#: noindex-seo.php:4770 noindex-seo.php:4781 noindex-seo.php:4792 +#: noindex-seo.php:4803 noindex-seo.php:4814 noindex-seo.php:4820 +#: noindex-seo.php:4831 noindex-seo.php:4855 noindex-seo.php:4896 +#: noindex-seo.php:5254 msgid "Recommended" msgstr "Recomendado" -#: noindex-seo.php:4015 +#: noindex-seo.php:4659 msgid "Block the indexing of the site's front page." msgstr "Bloquear la indexación de la página de inicio del sitio." -#: noindex-seo.php:4019 +#: noindex-seo.php:4663 msgid "Home" msgstr "Inicio" -#: noindex-seo.php:4022 +#: noindex-seo.php:4666 msgid "Block the indexing of the site's home page." msgstr "Bloquear la indexación de la página principal del sitio." -#: noindex-seo.php:4028 +#: noindex-seo.php:4672 msgid "Pages and Posts" msgstr "Páginas y entradas" -#: noindex-seo.php:4031 +#: noindex-seo.php:4675 msgid "Page" msgstr "Página" -#: noindex-seo.php:4034 +#: noindex-seo.php:4678 msgid "Block the indexing of site pages." msgstr "Bloquear la indexación de las páginas del sitio." -#: noindex-seo.php:4037 +#: noindex-seo.php:4681 msgid "Privacy Policy" msgstr "Política de privacidad" -#: noindex-seo.php:4040 +#: noindex-seo.php:4684 msgid "Block the indexing of the privacy policy page." msgstr "Bloquear la indexación de la página de política de privacidad." -#: noindex-seo.php:4044 +#: noindex-seo.php:4688 msgid "Single Post" msgstr "Entrada individual" -#: noindex-seo.php:4047 +#: noindex-seo.php:4691 msgid "Block the indexing of individual posts." msgstr "Bloquear la indexación de entradas individuales." -#: noindex-seo.php:4050 +#: noindex-seo.php:4694 msgid "Singular" msgstr "Singular" -#: noindex-seo.php:4053 +#: noindex-seo.php:4697 msgid "Block the indexing of any singular content (post or page)." -msgstr "" +msgstr "Bloquear la indexación de cualquier contenido singular (entrada o página)." "Bloquear la indexación de cualquier contenido singular (entrada o página)." -#: noindex-seo.php:4058 +#: noindex-seo.php:4702 msgid "Taxonomies" msgstr "Taxonomías" -#: noindex-seo.php:4061 +#: noindex-seo.php:4705 msgid "Category" msgstr "Categoría" -#: noindex-seo.php:4064 +#: noindex-seo.php:4708 msgid "Block the indexing of category archive pages." msgstr "Bloquear la indexación de las páginas de archivo de categorías." -#: noindex-seo.php:4067 +#: noindex-seo.php:4711 msgid "Tag" msgstr "Etiqueta" -#: noindex-seo.php:4070 +#: noindex-seo.php:4714 msgid "Block the indexing of tag archive pages." msgstr "Bloquear la indexación de las páginas de archivo de etiquetas." -#: noindex-seo.php:4075 +#: noindex-seo.php:4719 msgid "Date Archives" msgstr "Archivos de fecha" -#: noindex-seo.php:4078 +#: noindex-seo.php:4722 msgid "Date" msgstr "Fecha" -#: noindex-seo.php:4081 +#: noindex-seo.php:4725 msgid "Block the indexing of any date-based archive page." msgstr "Bloquear la indexación de cualquier página de archivo basada en fecha." -#: noindex-seo.php:4084 +#: noindex-seo.php:4728 msgid "Day" msgstr "Día" -#: noindex-seo.php:4087 +#: noindex-seo.php:4731 msgid "Block the indexing of daily archive pages." msgstr "Bloquear la indexación de archivos diarios." -#: noindex-seo.php:4090 +#: noindex-seo.php:4734 msgid "Month" msgstr "Mes" -#: noindex-seo.php:4093 +#: noindex-seo.php:4737 msgid "Block the indexing of monthly archive pages." msgstr "Bloquear la indexación de archivos mensuales." -#: noindex-seo.php:4096 +#: noindex-seo.php:4740 msgid "Time" msgstr "Hora" -#: noindex-seo.php:4099 +#: noindex-seo.php:4743 msgid "Block the indexing of time-based archive pages." msgstr "Bloquear la indexación de archivos basados en hora." -#: noindex-seo.php:4102 +#: noindex-seo.php:4746 msgid "Year" msgstr "Año" -#: noindex-seo.php:4105 +#: noindex-seo.php:4749 msgid "Block the indexing of yearly archive pages." msgstr "Bloquear la indexación de archivos anuales." -#: noindex-seo.php:4110 +#: noindex-seo.php:4754 msgid "Archives" msgstr "Archivos" -#: noindex-seo.php:4113 +#: noindex-seo.php:4757 msgid "Archive" msgstr "Archivo" -#: noindex-seo.php:4116 +#: noindex-seo.php:4760 msgid "Block the indexing of any type of archive page." msgstr "Bloquear la indexación de cualquier tipo de página de archivo." -#: noindex-seo.php:4119 +#: noindex-seo.php:4763 msgid "Author" msgstr "Autor" -#: noindex-seo.php:4122 +#: noindex-seo.php:4766 msgid "Block the indexing of author archive pages." msgstr "Bloquear la indexación de las páginas de archivo de autor." -#: noindex-seo.php:4125 +#: noindex-seo.php:4769 msgid "Post Type Archive" msgstr "Archivo de tipo de contenido" -#: noindex-seo.php:4128 +#: noindex-seo.php:4772 msgid "Block the indexing of post type archive pages." msgstr "" "Bloquear la indexación de las páginas de archivo de tipos de contenido." -#: noindex-seo.php:4133 +#: noindex-seo.php:4777 msgid "Pagination" msgstr "Paginación" -#: noindex-seo.php:4136 +#: noindex-seo.php:4780 msgid "Paginated Pages" msgstr "Páginas paginadas" -#: noindex-seo.php:4139 +#: noindex-seo.php:4783 msgid "Block the indexing of pagination pages (page 2, 3, etc.)." msgstr "" "Bloquear la indexación de las páginas de paginación (página 2, 3, etc.)." -#: noindex-seo.php:4144 +#: noindex-seo.php:4788 msgid "Search" msgstr "Buscar" -#: noindex-seo.php:4147 +#: noindex-seo.php:4791 msgid "Search Results" msgstr "Resultados de búsqueda" -#: noindex-seo.php:4150 +#: noindex-seo.php:4794 msgid "Block the indexing of search result pages." msgstr "Bloquear la indexación de las páginas de resultados de búsqueda." -#: noindex-seo.php:4155 +#: noindex-seo.php:4799 msgid "Attachments" msgstr "Adjuntos" -#: noindex-seo.php:4158 +#: noindex-seo.php:4802 msgid "Attachment Pages" msgstr "Páginas de adjuntos" -#: noindex-seo.php:4161 +#: noindex-seo.php:4805 msgid "" "Block the indexing of attachment pages (does not affect the file itself)." msgstr "" "Bloquear la indexación de las páginas de adjuntos (no afecta al archivo en " "sí)." -#: noindex-seo.php:4166 +#: noindex-seo.php:4810 msgid "Previews" msgstr "Vistas previas" -#: noindex-seo.php:4169 +#: noindex-seo.php:4813 msgid "Customize Preview" msgstr "Vista previa del personalizador" -#: noindex-seo.php:4172 +#: noindex-seo.php:4816 msgid "Block the indexing when content is in customize preview mode." -msgstr "" +msgstr "Bloquear la indexación cuando el contenido se muestra en modo de vista previa del personalizador." "Bloquear la indexación cuando el contenido está en modo de vista previa del " "personalizador." -#: noindex-seo.php:4175 +#: noindex-seo.php:4819 msgid "Post Preview" msgstr "Vista previa de entrada" -#: noindex-seo.php:4178 +#: noindex-seo.php:4822 msgid "Block the indexing when viewing post previews." msgstr "Bloquear la indexación al ver vistas previas de entradas." -#: noindex-seo.php:4183 +#: noindex-seo.php:4827 msgid "Error Pages" msgstr "Páginas de error" -#: noindex-seo.php:4186 +#: noindex-seo.php:4830 msgid "Error 404" msgstr "Error 404" -#: noindex-seo.php:4189 +#: noindex-seo.php:4833 msgid "Block the indexing of 404 error pages." msgstr "Bloquear la indexación de las páginas de error 404." #. translators: %s: post type singular name. -#: noindex-seo.php:4214 +#: noindex-seo.php:4858 #, php-format msgid "Block the indexing of individual %s." msgstr "Bloquear la indexación de %s individuales." -#: noindex-seo.php:4218 +#: noindex-seo.php:4862 msgid "Custom Post Types" msgstr "Tipos de contenido personalizados" -#: noindex-seo.php:4231 +#: noindex-seo.php:4875 msgid "Cart" msgstr "Carrito" -#: noindex-seo.php:4232 +#: noindex-seo.php:4876 msgid "Block the indexing of the WooCommerce cart page." msgstr "Bloquear la indexación de la página del carrito de WooCommerce." -#: noindex-seo.php:4235 +#: noindex-seo.php:4879 msgid "Checkout" msgstr "Finalizar compra" -#: noindex-seo.php:4236 +#: noindex-seo.php:4880 msgid "Block the indexing of the WooCommerce checkout page." msgstr "" "Bloquear la indexación de la página de finalización de compra de WooCommerce." -#: noindex-seo.php:4239 +#: noindex-seo.php:4883 msgid "My Account" msgstr "Mi cuenta" -#: noindex-seo.php:4240 +#: noindex-seo.php:4884 msgid "" "Block the indexing of the WooCommerce customer account pages (including " "order history and address endpoints)." @@ -542,35 +606,43 @@ msgstr "" "Bloquear la indexación de las páginas de la cuenta de cliente de WooCommerce " "(incluidos el historial de pedidos y las direcciones)." -#: noindex-seo.php:4260 +#: noindex-seo.php:4904 msgid "WooCommerce" msgstr "WooCommerce" -#: noindex-seo.php:4286 +#: noindex-seo.php:4932 msgid "Prevent search engines from indexing this page" msgstr "Evitar que los buscadores indexen esta página" -#: noindex-seo.php:4290 +#: noindex-seo.php:4937 msgid "Prevent search engines from following links on this page" msgstr "Evitar que los buscadores sigan los enlaces en esta página" -#: noindex-seo.php:4294 +#: noindex-seo.php:4942 msgid "Prevent search engines from showing a cached version" msgstr "Evitar que los buscadores muestren una versión en caché" -#: noindex-seo.php:4298 +#: noindex-seo.php:4947 msgid "Prevent search engines from showing text snippets" msgstr "Evitar que los buscadores muestren fragmentos de texto" -#: noindex-seo.php:4302 +#: noindex-seo.php:4952 msgid "Prevent search engines from indexing images" msgstr "Evitar que los buscadores indexen imágenes" -#: noindex-seo.php:4308 +#: noindex-seo.php:4957 +msgid "Ask search engines not to translate this page" +msgstr "Pedir a los buscadores que no traduzcan esta página" + +#: noindex-seo.php:4977 +msgid "Stop indexing this page after this date and time" +msgstr "Dejar de indexar esta página a partir de esta fecha y hora" + +#: noindex-seo.php:4984 msgid "noindex SEO Settings" msgstr "Ajustes de noindex SEO" -#: noindex-seo.php:4309 +#: noindex-seo.php:4985 msgid "" "Control how search engines index and display your WordPress content using " "robots directives." @@ -578,7 +650,7 @@ msgstr "" "Controla cómo los buscadores indexan y muestran tu contenido de WordPress " "usando directivas robots." -#: noindex-seo.php:4320 +#: noindex-seo.php:4996 msgid "" "Recommended defaults applied. Review the changes below and click \"Save " "Changes\" to keep them, or uncheck anything you do not want." @@ -586,11 +658,11 @@ msgstr "" "Valores recomendados aplicados. Revisa los cambios de abajo y haz clic " "en«Guardar cambios» para conservarlos, o desmarca lo que no quieras." -#: noindex-seo.php:4328 +#: noindex-seo.php:5004 msgid "Settings imported successfully." msgstr "Ajustes importados correctamente." -#: noindex-seo.php:4335 +#: noindex-seo.php:5011 msgid "" "The settings file could not be imported: it is missing, too large, or not a " "valid noindex SEO export." @@ -598,35 +670,35 @@ msgstr "" "No se ha podido importar el archivo de ajustes: falta, es demasiado grande o " "no es una exportación válida de noindex SEO." -#: noindex-seo.php:4343 +#: noindex-seo.php:5019 msgid "Settings sections" msgstr "Secciones de los ajustes" -#: noindex-seo.php:4370 +#: noindex-seo.php:5046 msgid "General Configuration" msgstr "Configuración general" -#: noindex-seo.php:4384 +#: noindex-seo.php:5060 msgid "Disable compatibility warnings with other SEO plugins" msgstr "Desactivar avisos de compatibilidad con otros plugins de SEO" -#: noindex-seo.php:4391 +#: noindex-seo.php:5067 msgid "Implementation Method" msgstr "Método de implementación" -#: noindex-seo.php:4399 +#: noindex-seo.php:5075 msgid "HTML Meta Tags (default, easier to verify)" msgstr "Etiquetas meta HTML (predeterminado, más fácil de verificar)" -#: noindex-seo.php:4402 +#: noindex-seo.php:5078 msgid "HTTP Headers (more robust, works with PDFs/images)" msgstr "Cabeceras HTTP (más robusto, funciona con PDFs/imágenes)" -#: noindex-seo.php:4405 +#: noindex-seo.php:5081 msgid "Both (maximum compatibility)" msgstr "Ambos (máxima compatibilidad)" -#: noindex-seo.php:4409 +#: noindex-seo.php:5085 msgid "" "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, " @@ -636,11 +708,11 @@ msgstr "" "meta funcionan para páginas HTML. Las cabeceras HTTP funcionan para todos " "los tipos de contenido, incluidos PDFs, imágenes y feeds." -#: noindex-seo.php:4427 +#: noindex-seo.php:5103 msgid "Enable per-post/page granular control" msgstr "Activar control granular por entrada/página" -#: noindex-seo.php:4430 +#: noindex-seo.php:5106 msgid "" "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 " @@ -650,11 +722,11 @@ msgstr "" "permite sobrescribir los ajustes globales para contenido individual. Útil " "para páginas específicas que necesitan directivas robots diferentes." -#: noindex-seo.php:4448 +#: noindex-seo.php:5124 msgid "Enable per-term granular control" msgstr "Activar el control granular por término" -#: noindex-seo.php:4451 +#: noindex-seo.php:5127 msgid "" "When enabled, a \"Search Engine Visibility\" panel will appear on the Edit " "screen for every public taxonomy (categories, tags, and custom taxonomies " @@ -667,11 +739,11 @@ msgstr "" "WooCommerce).Resulta útil para aplicar noindex a una categoría o etiqueta " "concreta sinafectar a las demás." -#: noindex-seo.php:4469 +#: noindex-seo.php:5145 msgid "Delete all plugin data on uninstall" msgstr "Borrar todos los datos del plugin al desinstalar" -#: noindex-seo.php:4472 +#: noindex-seo.php:5148 msgid "" "When enabled, all settings and per-post robots directives will be " "permanently deleted when the plugin is uninstalled. By default data is " @@ -681,11 +753,11 @@ msgstr "" "borrarán de forma permanente al desinstalar el plugin. Por defecto, los " "datos se conservan." -#: noindex-seo.php:4488 +#: noindex-seo.php:5164 msgid "Recommended settings" msgstr "Ajustes recomendados" -#: noindex-seo.php:4490 +#: noindex-seo.php:5166 msgid "" "Enables all 5 directives on the 15 contexts flagged \"Recommended\" (privacy " "policy, date archives, pagination, search results, attachment pages, " @@ -696,36 +768,36 @@ msgstr "" "resultados de búsqueda, páginas de adjuntos, vistas previas, 404 y carrito, " "finalización de compra y mi cuenta de WooCommerce). Revisa y guarda." -#: noindex-seo.php:4497 +#: noindex-seo.php:5173 msgid "Apply Recommended Defaults" msgstr "Aplicar los valores recomendados" -#: noindex-seo.php:4502 +#: noindex-seo.php:5178 msgid "Enable all directives for the 15 contexts flagged as recommended." -msgstr "" +msgstr "Activar todas las directivas de los 15 contextos marcados como recomendados." "Activa todas las directivas en los 15 contextos marcados como recomendados." -#: noindex-seo.php:4516 +#: noindex-seo.php:5192 msgid "Overview" msgstr "Resumen" -#: noindex-seo.php:4520 +#: noindex-seo.php:5196 msgid "Total Options" msgstr "Opciones totales" -#: noindex-seo.php:4524 +#: noindex-seo.php:5200 msgid "Enabled" msgstr "Activadas" -#: noindex-seo.php:4528 +#: noindex-seo.php:5204 msgid "Recommended to Enable" msgstr "Recomendadas para activar" -#: noindex-seo.php:4533 +#: noindex-seo.php:5209 msgid "Page contexts" msgstr "Contextos de página" -#: noindex-seo.php:4538 +#: noindex-seo.php:5214 msgid "" "Important: Enabling noindex on the wrong pages can harm your search engine " "rankings. Only enable options you fully understand." @@ -734,40 +806,89 @@ msgstr "" "posicionamiento en buscadores. Activa solo las opciones que entiendas " "completamente." -#: noindex-seo.php:4545 +#: noindex-seo.php:5221 msgid "Search options..." msgstr "Buscar opciones…" -#: noindex-seo.php:4546 +#: noindex-seo.php:5222 msgid "Search options" msgstr "Buscar opciones" -#: noindex-seo.php:4571 +#: noindex-seo.php:5247 msgid "This option only works with HTTP Headers implementation method" -msgstr "" +msgstr "Esta opción solo funciona con el método de implementación de cabeceras HTTP" "Esta opción solo funciona con el método de implementación de cabeceras HTTP" -#: noindex-seo.php:4580 +#: noindex-seo.php:5256 msgid "Not Recommended" msgstr "No recomendado" -#: noindex-seo.php:4585 +#: noindex-seo.php:5261 msgid "View Page" msgstr "Ver página" -#: noindex-seo.php:4629 noindex-seo.php:4638 +#: noindex-seo.php:5342 noindex-seo.php:5350 +msgid "Conditional rules" +msgstr "Reglas condicionales" + +#: noindex-seo.php:5344 +msgid "" +"Automatically apply noindex to any post whose custom field (for example an " +"ACF field) exactly matches a value. Rules run below the per-post overrides " +"and above the global context settings, and matched posts drop out of the XML " +"sitemap." +msgstr "" +"Aplicar automáticamente noindex a cualquier entrada cuyo campo personalizado " +"(por ejemplo, un campo de ACF) coincida exactamente con un valor. Las reglas " +"se ejecutan por debajo de los ajustes individuales de cada entrada y por " +"encima de los ajustes globales de contexto, y las entradas coincidentes " +"desaparecen del mapa del sitio XML." + +#: noindex-seo.php:5357 +msgid "Field name" +msgstr "Nombre del campo" + +#: noindex-seo.php:5358 +msgid "Value" +msgstr "Valor" + +#: noindex-seo.php:5359 +msgid "Actions" +msgstr "Acciones" + +#: noindex-seo.php:5375 +msgid "custom_field_name" +msgstr "nombre_campo_personalizado" + +#: noindex-seo.php:5376 +msgid "value that triggers noindex" +msgstr "valor que activa noindex" + +#: noindex-seo.php:5377 +msgid "Remove rule" +msgstr "Eliminar regla" + +#: noindex-seo.php:5382 +msgid "Add rule" +msgstr "Añadir regla" + +#: noindex-seo.php:5383 +msgid "Up to 20 rules. Rows with an empty field or value are ignored." +msgstr "Hasta 20 reglas. Las filas con un campo o un valor vacíos se ignoran." + +#: noindex-seo.php:5397 noindex-seo.php:5406 msgid "Export settings" msgstr "Exportar ajustes" -#: noindex-seo.php:4631 +#: noindex-seo.php:5399 msgid "Download the current settings as a JSON file." msgstr "Descarga los ajustes actuales en un archivo JSON." -#: noindex-seo.php:4647 noindex-seo.php:4655 noindex-seo.php:4665 +#: noindex-seo.php:5415 noindex-seo.php:5423 noindex-seo.php:5433 msgid "Import settings" msgstr "Importar ajustes" -#: noindex-seo.php:4649 +#: noindex-seo.php:5417 msgid "" "Restore the global settings from a previously exported JSON file. Per-post " "and per-term overrides are kept." @@ -775,35 +896,31 @@ msgstr "" "Restaura los ajustes globales desde un archivo JSON exportado anteriormente. " "Las sobrescrituras por entrada y por término se conservan." -#: assets/js/editor-sidebar.js:103 +#: assets/js/editor-sidebar.js:188 msgid "Enable to set custom robots directives for this content" -msgstr "" +msgstr "Actívala para definir directivas robots personalizadas para este contenido" "Activa para establecer directivas robots personalizadas para este contenido" -#: assets/js/editor-sidebar.js:133 +#: assets/js/editor-sidebar.js:218 msgid "Robots Directives:" msgstr "Directivas robots:" -#: assets/js/editor-sidebar.js:143 -msgid "Prevent search engines from indexing" -msgstr "Evitar que los buscadores indexen" - -#: assets/js/editor-sidebar.js:158 -msgid "Prevent search engines from following links" -msgstr "Evitar que los buscadores sigan los enlaces" - -#: assets/js/editor-sidebar.js:173 -msgid "Prevent cached versions in search results" -msgstr "Evitar versiones en caché en los resultados de búsqueda" - -#: assets/js/editor-sidebar.js:188 -msgid "Prevent text snippets in search results" -msgstr "Evitar fragmentos de texto en los resultados de búsqueda" - -#: assets/js/editor-sidebar.js:237 +#: assets/js/editor-sidebar.js:249 msgid "Active Directives:" msgstr "Directivas activas:" +#~ msgid "Prevent search engines from indexing" +#~ msgstr "Evitar que los buscadores indexen" + +#~ msgid "Prevent search engines from following links" +#~ msgstr "Evitar que los buscadores sigan los enlaces" + +#~ msgid "Prevent cached versions in search results" +#~ msgstr "Evitar versiones en caché en los resultados de búsqueda" + +#~ msgid "Prevent text snippets in search results" +#~ msgstr "Evitar fragmentos de texto en los resultados de búsqueda" + #~ msgid "🔍 noindex" #~ msgstr "🔍 noindex" @@ -818,3 +935,4 @@ msgstr "Directivas activas:" #~ msgid "🖼️ noimageindex" #~ msgstr "🖼️ noimageindex" + diff --git a/languages/noindex-seo.pot b/languages/noindex-seo.pot index 9a25c2b..f34c1c7 100644 --- a/languages/noindex-seo.pot +++ b/languages/noindex-seo.pot @@ -2,22 +2,22 @@ # This file is distributed under the GPL-3.0-or-later. msgid "" msgstr "" -"Project-Id-Version: noindex SEO 3.5.0\n" +"Project-Id-Version: noindex SEO 3.6.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/noindex-seo\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2026-11-03T15:21:45+00:00\n" +"POT-Creation-Date: 2026-11-03T17:16:14+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.12.0\n" "X-Domain: noindex-seo\n" #. Plugin Name of the plugin #: noindex-seo.php -#: noindex-seo.php:1657 -#: noindex-seo.php:1658 +#: noindex-seo.php:2044 +#: noindex-seo.php:2045 msgid "noindex SEO" msgstr "" @@ -41,178 +41,262 @@ msgstr "" msgid "https://www.robotstxt.software/" msgstr "" -#: noindex-seo.php:1080 +#: noindex-seo.php:1449 msgid "Post ID to compute effective directives for." msgstr "" -#: noindex-seo.php:1107 +#: noindex-seo.php:1476 msgid "You do not have permission to read the noindex SEO settings." msgstr "" -#: noindex-seo.php:1157 +#: noindex-seo.php:1526 msgid "You do not have permission to read directives for this post." msgstr "" -#: noindex-seo.php:1217 +#: noindex-seo.php:1589 msgid "No post exists with that post_id." msgstr "" -#: noindex-seo.php:1508 +#: noindex-seo.php:1895 msgid "Settings saved successfully!" msgstr "" -#: noindex-seo.php:1509 +#: noindex-seo.php:1896 msgid "Expand All" msgstr "" -#: noindex-seo.php:1510 +#: noindex-seo.php:1897 msgid "Collapse All" msgstr "" -#: noindex-seo.php:1590 +#: noindex-seo.php:1977 msgid "Settings" msgstr "" #. translators: plugin name. -#: noindex-seo.php:1883 +#: noindex-seo.php:2270 #, php-format msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly." msgstr "" #. translators: %s: comma-separated list of wp_robots callbacks. -#: noindex-seo.php:1904 +#: noindex-seo.php:2291 #, php-format msgid "noindex SEO has detected that another plugin or theme is adding robots directives through the wp_robots API (%s). This may cause conflicts. Please configure the options accordingly." msgstr "" -#: noindex-seo.php:2021 -#: noindex-seo.php:2151 -#: noindex-seo.php:2202 -#: noindex-seo.php:2290 +#: noindex-seo.php:2408 +#: noindex-seo.php:2561 +#: noindex-seo.php:2612 +#: noindex-seo.php:2710 msgid "Permission denied." msgstr "" -#: noindex-seo.php:2886 -#: noindex-seo.php:3210 -#: assets/js/editor-sidebar.js:91 +#: noindex-seo.php:3402 +#: noindex-seo.php:3791 +#: assets/js/editor-sidebar.js:176 msgid "Search Engine Visibility" msgstr "" -#: noindex-seo.php:2938 -#: noindex-seo.php:3545 -#: assets/js/editor-sidebar.js:102 +#: noindex-seo.php:3463 +#: noindex-seo.php:4161 +#: assets/js/editor-sidebar.js:187 msgid "Override global settings" msgstr "" -#: noindex-seo.php:2943 +#: noindex-seo.php:3468 msgid "When enabled, these directives will override the global settings for this specific content." msgstr "" -#: noindex-seo.php:2950 +#: noindex-seo.php:3475 msgid "Prevent indexing" msgstr "" -#: noindex-seo.php:2955 +#: noindex-seo.php:3480 msgid "Prevent link following" msgstr "" -#: noindex-seo.php:2960 +#: noindex-seo.php:3485 msgid "Prevent caching" msgstr "" -#: noindex-seo.php:2965 +#: noindex-seo.php:3490 msgid "Prevent snippets" msgstr "" -#: noindex-seo.php:2970 -#: assets/js/editor-sidebar.js:203 +#: noindex-seo.php:3495 msgid "Prevent image indexing" msgstr "" -#: noindex-seo.php:2978 +#: noindex-seo.php:3500 +msgid "Prevent translation" +msgstr "" + +#: noindex-seo.php:3505 +msgid "Value directives (empty = off):" +msgstr "" + +#: noindex-seo.php:3508 +#: noindex-seo.php:3514 +#: noindex-seo.php:3523 +#: noindex-seo.php:3810 +#: noindex-seo.php:3818 +#: noindex-seo.php:4195 +#: noindex-seo.php:4200 +#: noindex-seo.php:4208 +#: noindex-seo.php:5296 +#: noindex-seo.php:5312 +#: assets/js/editor-sidebar.js:141 +msgid "Off" +msgstr "" + +#: noindex-seo.php:3509 +#: noindex-seo.php:4962 +msgid "Maximum snippet length in characters (-1 = no limit)" +msgstr "" + +#: noindex-seo.php:3515 +#: noindex-seo.php:3811 +#: noindex-seo.php:4201 +#: noindex-seo.php:5313 +#: assets/js/editor-sidebar.js:142 +msgid "none" +msgstr "" + +#: noindex-seo.php:3516 +#: noindex-seo.php:3812 +#: noindex-seo.php:4202 +#: noindex-seo.php:5314 +#: assets/js/editor-sidebar.js:143 +msgid "standard" +msgstr "" + +#: noindex-seo.php:3517 +#: noindex-seo.php:3813 +#: noindex-seo.php:4203 +#: noindex-seo.php:5315 +#: assets/js/editor-sidebar.js:144 +msgid "large" +msgstr "" + +#: noindex-seo.php:3519 +#: noindex-seo.php:4967 +msgid "Maximum image preview size" +msgstr "" + +#: noindex-seo.php:3524 +#: noindex-seo.php:4972 +msgid "Maximum video preview seconds (-1 = no limit)" +msgstr "" + +#: noindex-seo.php:3529 +msgid "Stop indexing after this date and time" +msgstr "" + +#: noindex-seo.php:3537 msgid "Effective Directives:" msgstr "" -#: noindex-seo.php:3003 +#: noindex-seo.php:3547 msgid "Override active:" msgstr "" -#: noindex-seo.php:3008 +#: noindex-seo.php:3552 msgid "Override enabled but no directives selected" msgstr "" -#: noindex-seo.php:3014 +#: noindex-seo.php:3558 msgid "Global settings:" msgstr "" -#: noindex-seo.php:3019 +#: noindex-seo.php:3563 msgid "No restrictions (indexable)" msgstr "" -#: noindex-seo.php:3214 +#: noindex-seo.php:3795 msgid "Override global settings for this term" msgstr "" -#: noindex-seo.php:3227 +#: noindex-seo.php:3826 msgid "When override is enabled, the directives checked above apply to this term's archive page and take precedence over the global category / tag / archive settings." msgstr "" -#: noindex-seo.php:3322 -#: noindex-seo.php:3328 -#: noindex-seo.php:3443 -#: noindex-seo.php:3449 +#: noindex-seo.php:3928 +#: noindex-seo.php:3934 +#: noindex-seo.php:4050 +#: noindex-seo.php:4056 msgid "Robots" msgstr "" -#: noindex-seo.php:3389 -#: noindex-seo.php:3498 +#: noindex-seo.php:3992 +#: noindex-seo.php:4111 msgid "Override (none)" msgstr "" -#: noindex-seo.php:3541 +#: noindex-seo.php:4157 msgid "Robots Directives" msgstr "" -#: noindex-seo.php:3551 -#: noindex-seo.php:4285 -#: assets/js/editor-sidebar.js:142 +#: noindex-seo.php:4167 +#: noindex-seo.php:4931 msgid "noindex" msgstr "" -#: noindex-seo.php:3556 -#: noindex-seo.php:4289 -#: assets/js/editor-sidebar.js:157 +#: noindex-seo.php:4172 +#: noindex-seo.php:4936 msgid "nofollow" msgstr "" -#: noindex-seo.php:3561 -#: noindex-seo.php:4293 -#: assets/js/editor-sidebar.js:172 +#: noindex-seo.php:4177 +#: noindex-seo.php:4941 msgid "noarchive" msgstr "" -#: noindex-seo.php:3566 -#: noindex-seo.php:4297 -#: assets/js/editor-sidebar.js:187 +#: noindex-seo.php:4182 +#: noindex-seo.php:4946 msgid "nosnippet" msgstr "" -#: noindex-seo.php:3571 -#: noindex-seo.php:4301 -#: assets/js/editor-sidebar.js:202 +#: noindex-seo.php:4187 +#: noindex-seo.php:4951 msgid "noimageindex" msgstr "" -#: noindex-seo.php:3682 +#: noindex-seo.php:4192 +#: noindex-seo.php:4956 +msgid "notranslate" +msgstr "" + +#: noindex-seo.php:4196 +#: noindex-seo.php:4961 +msgid "max-snippet" +msgstr "" + +#: noindex-seo.php:4205 +#: noindex-seo.php:4966 +msgid "max-image-preview" +msgstr "" + +#: noindex-seo.php:4209 +#: noindex-seo.php:4971 +msgid "max-video-preview" +msgstr "" + +#: noindex-seo.php:4213 +#: noindex-seo.php:4976 +msgid "unavailable_after" +msgstr "" + +#: noindex-seo.php:4326 msgid "Enable Robots Override" msgstr "" -#: noindex-seo.php:3683 +#: noindex-seo.php:4327 msgid "Disable Robots Override" msgstr "" #. translators: %d: Number of posts updated -#: noindex-seo.php:3780 +#: noindex-seo.php:4424 #, php-format msgid "Robots override enabled for %d post." msgid_plural "Robots override enabled for %d posts." @@ -220,526 +304,559 @@ msgstr[0] "" msgstr[1] "" #. translators: %d: Number of posts updated -#: noindex-seo.php:3801 +#: noindex-seo.php:4445 #, php-format msgid "Robots override disabled for %d post." msgid_plural "Robots override disabled for %d posts." msgstr[0] "" msgstr[1] "" -#: noindex-seo.php:3850 +#: noindex-seo.php:4494 msgid "All robots settings" msgstr "" -#: noindex-seo.php:3852 +#: noindex-seo.php:4496 msgid "With override" msgstr "" -#: noindex-seo.php:3855 +#: noindex-seo.php:4499 msgid "Without override" msgstr "" -#: noindex-seo.php:3974 +#: noindex-seo.php:4618 msgid "You do not have sufficient permissions to access this page." msgstr "" -#: noindex-seo.php:3975 +#: noindex-seo.php:4619 msgid "Permission Denied" msgstr "" -#: noindex-seo.php:3987 +#: noindex-seo.php:4631 msgid "General" msgstr "" -#: noindex-seo.php:3988 +#: noindex-seo.php:4632 msgid "SEO Settings" msgstr "" -#: noindex-seo.php:3989 +#: noindex-seo.php:4633 msgid "Import / Export" msgstr "" -#: noindex-seo.php:4009 +#: noindex-seo.php:4653 msgid "Main Pages" msgstr "" -#: noindex-seo.php:4012 +#: noindex-seo.php:4656 msgid "Front Page" msgstr "" -#: noindex-seo.php:4013 -#: noindex-seo.php:4020 -#: noindex-seo.php:4032 -#: noindex-seo.php:4038 -#: noindex-seo.php:4045 -#: noindex-seo.php:4051 -#: noindex-seo.php:4062 -#: noindex-seo.php:4068 -#: noindex-seo.php:4079 -#: noindex-seo.php:4085 -#: noindex-seo.php:4091 -#: noindex-seo.php:4097 -#: noindex-seo.php:4103 -#: noindex-seo.php:4114 -#: noindex-seo.php:4120 -#: noindex-seo.php:4126 -#: noindex-seo.php:4137 -#: noindex-seo.php:4148 -#: noindex-seo.php:4159 -#: noindex-seo.php:4170 -#: noindex-seo.php:4176 -#: noindex-seo.php:4187 -#: noindex-seo.php:4211 -#: noindex-seo.php:4252 -#: noindex-seo.php:4578 +#: noindex-seo.php:4657 +#: noindex-seo.php:4664 +#: noindex-seo.php:4676 +#: noindex-seo.php:4682 +#: noindex-seo.php:4689 +#: noindex-seo.php:4695 +#: noindex-seo.php:4706 +#: noindex-seo.php:4712 +#: noindex-seo.php:4723 +#: noindex-seo.php:4729 +#: noindex-seo.php:4735 +#: noindex-seo.php:4741 +#: noindex-seo.php:4747 +#: noindex-seo.php:4758 +#: noindex-seo.php:4764 +#: noindex-seo.php:4770 +#: noindex-seo.php:4781 +#: noindex-seo.php:4792 +#: noindex-seo.php:4803 +#: noindex-seo.php:4814 +#: noindex-seo.php:4820 +#: noindex-seo.php:4831 +#: noindex-seo.php:4855 +#: noindex-seo.php:4896 +#: noindex-seo.php:5254 msgid "Recommended" msgstr "" -#: noindex-seo.php:4015 +#: noindex-seo.php:4659 msgid "Block the indexing of the site's front page." msgstr "" -#: noindex-seo.php:4019 +#: noindex-seo.php:4663 msgid "Home" msgstr "" -#: noindex-seo.php:4022 +#: noindex-seo.php:4666 msgid "Block the indexing of the site's home page." msgstr "" -#: noindex-seo.php:4028 +#: noindex-seo.php:4672 msgid "Pages and Posts" msgstr "" -#: noindex-seo.php:4031 +#: noindex-seo.php:4675 msgid "Page" msgstr "" -#: noindex-seo.php:4034 +#: noindex-seo.php:4678 msgid "Block the indexing of site pages." msgstr "" -#: noindex-seo.php:4037 +#: noindex-seo.php:4681 msgid "Privacy Policy" msgstr "" -#: noindex-seo.php:4040 +#: noindex-seo.php:4684 msgid "Block the indexing of the privacy policy page." msgstr "" -#: noindex-seo.php:4044 +#: noindex-seo.php:4688 msgid "Single Post" msgstr "" -#: noindex-seo.php:4047 +#: noindex-seo.php:4691 msgid "Block the indexing of individual posts." msgstr "" -#: noindex-seo.php:4050 +#: noindex-seo.php:4694 msgid "Singular" msgstr "" -#: noindex-seo.php:4053 +#: noindex-seo.php:4697 msgid "Block the indexing of any singular content (post or page)." msgstr "" -#: noindex-seo.php:4058 +#: noindex-seo.php:4702 msgid "Taxonomies" msgstr "" -#: noindex-seo.php:4061 +#: noindex-seo.php:4705 msgid "Category" msgstr "" -#: noindex-seo.php:4064 +#: noindex-seo.php:4708 msgid "Block the indexing of category archive pages." msgstr "" -#: noindex-seo.php:4067 +#: noindex-seo.php:4711 msgid "Tag" msgstr "" -#: noindex-seo.php:4070 +#: noindex-seo.php:4714 msgid "Block the indexing of tag archive pages." msgstr "" -#: noindex-seo.php:4075 +#: noindex-seo.php:4719 msgid "Date Archives" msgstr "" -#: noindex-seo.php:4078 +#: noindex-seo.php:4722 msgid "Date" msgstr "" -#: noindex-seo.php:4081 +#: noindex-seo.php:4725 msgid "Block the indexing of any date-based archive page." msgstr "" -#: noindex-seo.php:4084 +#: noindex-seo.php:4728 msgid "Day" msgstr "" -#: noindex-seo.php:4087 +#: noindex-seo.php:4731 msgid "Block the indexing of daily archive pages." msgstr "" -#: noindex-seo.php:4090 +#: noindex-seo.php:4734 msgid "Month" msgstr "" -#: noindex-seo.php:4093 +#: noindex-seo.php:4737 msgid "Block the indexing of monthly archive pages." msgstr "" -#: noindex-seo.php:4096 +#: noindex-seo.php:4740 msgid "Time" msgstr "" -#: noindex-seo.php:4099 +#: noindex-seo.php:4743 msgid "Block the indexing of time-based archive pages." msgstr "" -#: noindex-seo.php:4102 +#: noindex-seo.php:4746 msgid "Year" msgstr "" -#: noindex-seo.php:4105 +#: noindex-seo.php:4749 msgid "Block the indexing of yearly archive pages." msgstr "" -#: noindex-seo.php:4110 +#: noindex-seo.php:4754 msgid "Archives" msgstr "" -#: noindex-seo.php:4113 +#: noindex-seo.php:4757 msgid "Archive" msgstr "" -#: noindex-seo.php:4116 +#: noindex-seo.php:4760 msgid "Block the indexing of any type of archive page." msgstr "" -#: noindex-seo.php:4119 +#: noindex-seo.php:4763 msgid "Author" msgstr "" -#: noindex-seo.php:4122 +#: noindex-seo.php:4766 msgid "Block the indexing of author archive pages." msgstr "" -#: noindex-seo.php:4125 +#: noindex-seo.php:4769 msgid "Post Type Archive" msgstr "" -#: noindex-seo.php:4128 +#: noindex-seo.php:4772 msgid "Block the indexing of post type archive pages." msgstr "" -#: noindex-seo.php:4133 +#: noindex-seo.php:4777 msgid "Pagination" msgstr "" -#: noindex-seo.php:4136 +#: noindex-seo.php:4780 msgid "Paginated Pages" msgstr "" -#: noindex-seo.php:4139 +#: noindex-seo.php:4783 msgid "Block the indexing of pagination pages (page 2, 3, etc.)." msgstr "" -#: noindex-seo.php:4144 +#: noindex-seo.php:4788 msgid "Search" msgstr "" -#: noindex-seo.php:4147 +#: noindex-seo.php:4791 msgid "Search Results" msgstr "" -#: noindex-seo.php:4150 +#: noindex-seo.php:4794 msgid "Block the indexing of search result pages." msgstr "" -#: noindex-seo.php:4155 +#: noindex-seo.php:4799 msgid "Attachments" msgstr "" -#: noindex-seo.php:4158 +#: noindex-seo.php:4802 msgid "Attachment Pages" msgstr "" -#: noindex-seo.php:4161 +#: noindex-seo.php:4805 msgid "Block the indexing of attachment pages (does not affect the file itself)." msgstr "" -#: noindex-seo.php:4166 +#: noindex-seo.php:4810 msgid "Previews" msgstr "" -#: noindex-seo.php:4169 +#: noindex-seo.php:4813 msgid "Customize Preview" msgstr "" -#: noindex-seo.php:4172 +#: noindex-seo.php:4816 msgid "Block the indexing when content is in customize preview mode." msgstr "" -#: noindex-seo.php:4175 +#: noindex-seo.php:4819 msgid "Post Preview" msgstr "" -#: noindex-seo.php:4178 +#: noindex-seo.php:4822 msgid "Block the indexing when viewing post previews." msgstr "" -#: noindex-seo.php:4183 +#: noindex-seo.php:4827 msgid "Error Pages" msgstr "" -#: noindex-seo.php:4186 +#: noindex-seo.php:4830 msgid "Error 404" msgstr "" -#: noindex-seo.php:4189 +#: noindex-seo.php:4833 msgid "Block the indexing of 404 error pages." msgstr "" #. translators: %s: post type singular name. -#: noindex-seo.php:4214 +#: noindex-seo.php:4858 #, php-format msgid "Block the indexing of individual %s." msgstr "" -#: noindex-seo.php:4218 +#: noindex-seo.php:4862 msgid "Custom Post Types" msgstr "" -#: noindex-seo.php:4231 +#: noindex-seo.php:4875 msgid "Cart" msgstr "" -#: noindex-seo.php:4232 +#: noindex-seo.php:4876 msgid "Block the indexing of the WooCommerce cart page." msgstr "" -#: noindex-seo.php:4235 +#: noindex-seo.php:4879 msgid "Checkout" msgstr "" -#: noindex-seo.php:4236 +#: noindex-seo.php:4880 msgid "Block the indexing of the WooCommerce checkout page." msgstr "" -#: noindex-seo.php:4239 +#: noindex-seo.php:4883 msgid "My Account" msgstr "" -#: noindex-seo.php:4240 +#: noindex-seo.php:4884 msgid "Block the indexing of the WooCommerce customer account pages (including order history and address endpoints)." msgstr "" -#: noindex-seo.php:4260 +#: noindex-seo.php:4904 msgid "WooCommerce" msgstr "" -#: noindex-seo.php:4286 +#: noindex-seo.php:4932 msgid "Prevent search engines from indexing this page" msgstr "" -#: noindex-seo.php:4290 +#: noindex-seo.php:4937 msgid "Prevent search engines from following links on this page" msgstr "" -#: noindex-seo.php:4294 +#: noindex-seo.php:4942 msgid "Prevent search engines from showing a cached version" msgstr "" -#: noindex-seo.php:4298 +#: noindex-seo.php:4947 msgid "Prevent search engines from showing text snippets" msgstr "" -#: noindex-seo.php:4302 +#: noindex-seo.php:4952 msgid "Prevent search engines from indexing images" msgstr "" -#: noindex-seo.php:4308 +#: noindex-seo.php:4957 +msgid "Ask search engines not to translate this page" +msgstr "" + +#: noindex-seo.php:4977 +msgid "Stop indexing this page after this date and time" +msgstr "" + +#: noindex-seo.php:4984 msgid "noindex SEO Settings" msgstr "" -#: noindex-seo.php:4309 +#: noindex-seo.php:4985 msgid "Control how search engines index and display your WordPress content using robots directives." msgstr "" -#: noindex-seo.php:4320 +#: noindex-seo.php:4996 msgid "Recommended defaults applied. Review the changes below and click \"Save Changes\" to keep them, or uncheck anything you do not want." msgstr "" -#: noindex-seo.php:4328 +#: noindex-seo.php:5004 msgid "Settings imported successfully." msgstr "" -#: noindex-seo.php:4335 +#: noindex-seo.php:5011 msgid "The settings file could not be imported: it is missing, too large, or not a valid noindex SEO export." msgstr "" -#: noindex-seo.php:4343 +#: noindex-seo.php:5019 msgid "Settings sections" msgstr "" -#: noindex-seo.php:4370 +#: noindex-seo.php:5046 msgid "General Configuration" msgstr "" -#: noindex-seo.php:4384 +#: noindex-seo.php:5060 msgid "Disable compatibility warnings with other SEO plugins" msgstr "" -#: noindex-seo.php:4391 +#: noindex-seo.php:5067 msgid "Implementation Method" msgstr "" -#: noindex-seo.php:4399 +#: noindex-seo.php:5075 msgid "HTML Meta Tags (default, easier to verify)" msgstr "" -#: noindex-seo.php:4402 +#: noindex-seo.php:5078 msgid "HTTP Headers (more robust, works with PDFs/images)" msgstr "" -#: noindex-seo.php:4405 +#: noindex-seo.php:5081 msgid "Both (maximum compatibility)" msgstr "" -#: noindex-seo.php:4409 +#: noindex-seo.php:5085 msgid "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." msgstr "" -#: noindex-seo.php:4427 +#: noindex-seo.php:5103 msgid "Enable per-post/page granular control" msgstr "" -#: noindex-seo.php:4430 +#: noindex-seo.php:5106 msgid "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." msgstr "" -#: noindex-seo.php:4448 +#: noindex-seo.php:5124 msgid "Enable per-term granular control" msgstr "" -#: noindex-seo.php:4451 +#: noindex-seo.php:5127 msgid "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." msgstr "" -#: noindex-seo.php:4469 +#: noindex-seo.php:5145 msgid "Delete all plugin data on uninstall" msgstr "" -#: noindex-seo.php:4472 +#: noindex-seo.php:5148 msgid "When enabled, all settings and per-post robots directives will be permanently deleted when the plugin is uninstalled. By default data is preserved." msgstr "" -#: noindex-seo.php:4488 +#: noindex-seo.php:5164 msgid "Recommended settings" msgstr "" -#: noindex-seo.php:4490 +#: noindex-seo.php:5166 msgid "Enables all 5 directives on the 15 contexts flagged \"Recommended\" (privacy policy, date archives, pagination, search results, attachment pages, previews, 404, WooCommerce cart / checkout / my account). Review and save." msgstr "" -#: noindex-seo.php:4497 +#: noindex-seo.php:5173 msgid "Apply Recommended Defaults" msgstr "" -#: noindex-seo.php:4502 +#: noindex-seo.php:5178 msgid "Enable all directives for the 15 contexts flagged as recommended." msgstr "" -#: noindex-seo.php:4516 +#: noindex-seo.php:5192 msgid "Overview" msgstr "" -#: noindex-seo.php:4520 +#: noindex-seo.php:5196 msgid "Total Options" msgstr "" -#: noindex-seo.php:4524 +#: noindex-seo.php:5200 msgid "Enabled" msgstr "" -#: noindex-seo.php:4528 +#: noindex-seo.php:5204 msgid "Recommended to Enable" msgstr "" -#: noindex-seo.php:4533 +#: noindex-seo.php:5209 msgid "Page contexts" msgstr "" -#: noindex-seo.php:4538 +#: noindex-seo.php:5214 msgid "Important: Enabling noindex on the wrong pages can harm your search engine rankings. Only enable options you fully understand." msgstr "" -#: noindex-seo.php:4545 +#: noindex-seo.php:5221 msgid "Search options..." msgstr "" -#: noindex-seo.php:4546 +#: noindex-seo.php:5222 msgid "Search options" msgstr "" -#: noindex-seo.php:4571 +#: noindex-seo.php:5247 msgid "This option only works with HTTP Headers implementation method" msgstr "" -#: noindex-seo.php:4580 +#: noindex-seo.php:5256 msgid "Not Recommended" msgstr "" -#: noindex-seo.php:4585 +#: noindex-seo.php:5261 msgid "View Page" msgstr "" -#: noindex-seo.php:4629 -#: noindex-seo.php:4638 +#: noindex-seo.php:5342 +#: noindex-seo.php:5350 +msgid "Conditional rules" +msgstr "" + +#: noindex-seo.php:5344 +msgid "Automatically apply noindex to any post whose custom field (for example an ACF field) exactly matches a value. Rules run below the per-post overrides and above the global context settings, and matched posts drop out of the XML sitemap." +msgstr "" + +#: noindex-seo.php:5357 +msgid "Field name" +msgstr "" + +#: noindex-seo.php:5358 +msgid "Value" +msgstr "" + +#: noindex-seo.php:5359 +msgid "Actions" +msgstr "" + +#: noindex-seo.php:5375 +msgid "custom_field_name" +msgstr "" + +#: noindex-seo.php:5376 +msgid "value that triggers noindex" +msgstr "" + +#: noindex-seo.php:5377 +msgid "Remove rule" +msgstr "" + +#: noindex-seo.php:5382 +msgid "Add rule" +msgstr "" + +#: noindex-seo.php:5383 +msgid "Up to 20 rules. Rows with an empty field or value are ignored." +msgstr "" + +#: noindex-seo.php:5397 +#: noindex-seo.php:5406 msgid "Export settings" msgstr "" -#: noindex-seo.php:4631 +#: noindex-seo.php:5399 msgid "Download the current settings as a JSON file." msgstr "" -#: noindex-seo.php:4647 -#: noindex-seo.php:4655 -#: noindex-seo.php:4665 +#: noindex-seo.php:5415 +#: noindex-seo.php:5423 +#: noindex-seo.php:5433 msgid "Import settings" msgstr "" -#: noindex-seo.php:4649 +#: noindex-seo.php:5417 msgid "Restore the global settings from a previously exported JSON file. Per-post and per-term overrides are kept." msgstr "" -#: assets/js/editor-sidebar.js:103 +#: assets/js/editor-sidebar.js:188 msgid "Enable to set custom robots directives for this content" msgstr "" -#: assets/js/editor-sidebar.js:133 +#: assets/js/editor-sidebar.js:218 msgid "Robots Directives:" msgstr "" -#: assets/js/editor-sidebar.js:143 -msgid "Prevent search engines from indexing" -msgstr "" - -#: assets/js/editor-sidebar.js:158 -msgid "Prevent search engines from following links" -msgstr "" - -#: assets/js/editor-sidebar.js:173 -msgid "Prevent cached versions in search results" -msgstr "" - -#: assets/js/editor-sidebar.js:188 -msgid "Prevent text snippets in search results" -msgstr "" - -#: assets/js/editor-sidebar.js:237 +#: assets/js/editor-sidebar.js:249 msgid "Active Directives:" msgstr "" diff --git a/noindex-seo.php b/noindex-seo.php index fadda46..e6fd197 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.5.0 + * Version: 3.6.0 * Requires at least: 7.0 * Requires PHP: 8.3 * Author: ROBOTSTXT @@ -72,8 +72,13 @@ defined( 'ABSPATH' ) || die( 'Bye bye!' ); * Account) detected through the page-ID options, and the * compatibility window narrowed to WordPress 7.0-7.2 and * PHP 8.3-8.6 (declared floors raised from 4.7 / 5.6). + * @since 3.6.0 Modern robots directives (notranslate, max-snippet, + * max-image-preview, max-video-preview, unavailable_after) on + * every surface (global grid, per-post, per-term, Quick Edit, + * block editor, REST, WP-CLI) and conditional auto-noindex + * rules driven by custom-field (ACF) matches. */ -define( 'NOINDEX_SEO_VERSION', '3.5.0' ); +define( 'NOINDEX_SEO_VERSION', '3.6.0' ); /** * Option key holding the consolidated plugin settings array. @@ -82,6 +87,152 @@ define( 'NOINDEX_SEO_VERSION', '3.5.0' ); */ define( 'NOINDEX_SEO_SETTINGS_KEY', 'noindex_seo_settings' ); +/** + * Returns the boolean robots directives supported by the plugin. + * + * Boolean directives are simple flags: present in the robots output when on + * (1), absent when off (0). + * + * @since 3.6.0 + * + * @return array Directive slugs. + */ +function noindex_seo_get_boolean_directives() { + return array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex', 'notranslate' ); +} + +/** + * Returns the value-carrying robots directives supported by the plugin. + * + * Value directives render as `name:value` in the robots output. An empty + * string ('') means the directive is off. + * + * @since 3.6.0 + * + * @return array Directive slugs. + */ +function noindex_seo_get_value_directives() { + return array( 'max-snippet', 'max-image-preview', 'max-video-preview', 'unavailable_after' ); +} + +/** + * Returns every robots directive supported by the plugin (boolean + value). + * + * @since 3.6.0 + * + * @return array Directive slugs. + */ +function noindex_seo_get_directives() { + return array_merge( noindex_seo_get_boolean_directives(), noindex_seo_get_value_directives() ); +} + +/** + * Normalizes a raw directive value to its canonical storage form. + * + * Boolean directives normalize to 0 or 1. Value directives normalize to '' + * (off) or their canonical string value: + * + * - max-snippet / max-video-preview: integer >= -1 as a string (-1 = no limit). + * - max-image-preview: 'none', 'standard' or 'large'. + * - unavailable_after: 'Y-m-d H:i' in the site timezone (anything that does + * not parse, including datetime-local 'T' separators are normalized or + * rejected to ''). + * + * Every read path (settings merge, form handling, imports, post/term meta) + * funnels through this function so the storage shape never drifts. + * + * @since 3.6.0 + * + * @param string $directive Directive slug. + * @param mixed $raw Raw value from storage or user input. + * @return int|string 0|1 for boolean directives, ''|string for value directives. + */ +function noindex_seo_normalize_directive_value( $directive, $raw ) { + if ( in_array( $directive, noindex_seo_get_boolean_directives(), true ) ) { + return ( is_scalar( $raw ) && 1 === absint( $raw ) ) ? 1 : 0; + } + + if ( ! is_scalar( $raw ) ) { + return ''; + } + + $value = trim( (string) $raw ); + + if ( in_array( $directive, array( 'max-snippet', 'max-video-preview' ), true ) ) { + if ( ! is_numeric( $value ) ) { + return ''; + } + $int = (int) $value; + return ( $int >= -1 ) ? (string) $int : ''; + } + + if ( 'max-image-preview' === $directive ) { + return in_array( $value, array( 'none', 'standard', 'large' ), true ) ? $value : ''; + } + + if ( 'unavailable_after' === $directive ) { + $value = str_replace( 'T', ' ', $value ); + $dt = date_create_from_format( 'Y-m-d H:i', $value, wp_timezone() ); + return false !== $dt ? $dt->format( 'Y-m-d H:i' ) : ''; + } + + return ''; +} + +/** + * Formats a stored value directive for robots output. + * + * Value directives render as `name:value`; `unavailable_after` additionally + * converts its stored 'Y-m-d H:i' site-time value to the RFC-style datetime + * search engines expect (e.g. `unavailable_after: Wed, 25 Jun 2025 15:00:00 +0200`). + * + * @since 3.6.0 + * + * @param string $directive Directive slug. + * @param string $value Normalized stored value (non-empty). + * @return string Formatted directive token. + */ +function noindex_seo_format_value_directive( $directive, $value ) { + if ( 'unavailable_after' === $directive ) { + $dt = date_create_from_format( 'Y-m-d H:i', $value, wp_timezone() ); + if ( false !== $dt ) { + // RFC 1123-style with a numeric UTC offset ('O'): stable across + // PHP versions, unlike the 'T' abbreviation. + return $directive . ': ' . $dt->format( 'D, d M Y H:i:s O' ); + } + return ''; + } + + return $directive . ':' . $value; +} + +/** + * Formats a directives map for flat-token output (meta tag, HTTP header). + * + * The map keys are directive names; values are `true` (boolean directive) or + * the normalized stored value (value directive). Returns the `name` / + * `name:value` tokens, e.g. `array( 'noindex', 'max-snippet:-1' )`. + * + * @since 3.6.0 + * + * @param array $directives Directive name => true or value. + * @return array Formatted tokens. + */ +function noindex_seo_format_directives( array $directives ) { + $tokens = array(); + foreach ( $directives as $name => $value ) { + if ( true === $value ) { + $tokens[] = $name; + } else { + $token = noindex_seo_format_value_directive( $name, (string) $value ); + if ( '' !== $token ) { + $tokens[] = $token; + } + } + } + return $tokens; +} + /** * Returns the full consolidated settings array, merged with defaults. * @@ -89,18 +240,27 @@ define( 'NOINDEX_SEO_SETTINGS_KEY', 'noindex_seo_settings' ); * * [ * 'version' => 3, - * 'contexts' => [ '' => [ '' => 0|1, ... ], ... ], + * 'contexts' => [ '' => [ '' => 0|1|'', ... ], ... ], + * 'rules' => [ [ 'field' => '', 'value' => '' ], ... ], * 'config' => [ 'method' => 'meta', 'granular' => 0, ... ], * ] * + * Boolean directives store 0|1 and value directives store '' (off) or their + * canonical string value — see noindex_seo_normalize_directive_value(). + * * The array is cached in a static variable per-request after the first read. * * @since 3.0.0 + * @since 3.6.0 Value directives (max-snippet, max-image-preview, + * max-video-preview, unavailable_after, notranslate) joined the + * context grid, and the conditional auto-noindex rules were + * added under the 'rules' key. * * @param bool $force_refresh Optional. Bypass the in-memory cache. Default false. * @return array{ * version: int, - * contexts: array>, + * contexts: array>, + * rules: array, * config: array{ * method: string, * granular: int, @@ -120,6 +280,7 @@ function noindex_seo_get_settings( $force_refresh = false ) { $defaults = array( 'version' => 3, 'contexts' => array(), + 'rules' => array(), 'config' => array( 'method' => 'meta', 'granular' => 0, @@ -129,15 +290,17 @@ function noindex_seo_get_settings( $force_refresh = false ) { ), ); - // Seed every context × directive combination with 0. + // Seed every context × directive combination: 0 for boolean directives, + // '' (off) for value directives. + $directive_defaults = array(); + foreach ( noindex_seo_get_boolean_directives() as $directive ) { + $directive_defaults[ $directive ] = 0; + } + foreach ( noindex_seo_get_value_directives() as $directive ) { + $directive_defaults[ $directive ] = ''; + } foreach ( noindex_seo_get_contexts() as $context ) { - $defaults['contexts'][ $context ] = array( - 'noindex' => 0, - 'nofollow' => 0, - 'noarchive' => 0, - 'nosnippet' => 0, - 'noimageindex' => 0, - ); + $defaults['contexts'][ $context ] = $directive_defaults; } $saved = get_option( NOINDEX_SEO_SETTINGS_KEY, array() ); @@ -145,18 +308,23 @@ function noindex_seo_get_settings( $force_refresh = false ) { // Merge saved contexts without reordering defaults (so iteration is stable). if ( isset( $saved['contexts'] ) && is_array( $saved['contexts'] ) ) { - foreach ( $defaults['contexts'] as $ctx => $directive_defaults ) { + foreach ( $defaults['contexts'] as $ctx => $ctx_directive_defaults ) { if ( isset( $saved['contexts'][ $ctx ] ) && is_array( $saved['contexts'][ $ctx ] ) ) { $saved_ctx = $saved['contexts'][ $ctx ]; - foreach ( $directive_defaults as $dir => $default_value ) { - $defaults['contexts'][ $ctx ][ $dir ] = isset( $saved_ctx[ $dir ] ) - ? ( is_numeric( $saved_ctx[ $dir ] ) ? (int) $saved_ctx[ $dir ] : $default_value ) + foreach ( $ctx_directive_defaults as $dir => $default_value ) { + $defaults['contexts'][ $ctx ][ $dir ] = array_key_exists( $dir, $saved_ctx ) + ? noindex_seo_normalize_directive_value( $dir, $saved_ctx[ $dir ] ) : $default_value; } } } } + // Conditional auto-noindex rules (3.6.0). + if ( isset( $saved['rules'] ) ) { + $defaults['rules'] = noindex_seo_sanitize_rules( $saved['rules'] ); + } + if ( isset( $saved['config'] ) && is_array( $saved['config'] ) ) { foreach ( $defaults['config'] as $key => $default_value ) { if ( ! isset( $saved['config'][ $key ] ) ) { @@ -185,17 +353,160 @@ function noindex_seo_get_settings( $force_refresh = false ) { * Reads a single directive value for a context from the consolidated settings. * * @since 3.0.0 + * @since 3.6.0 Value directives return their normalized string value ('' = off) + * instead of a boolean. * * @param string $context Context slug (e.g. 'single', 'attachment'). - * @param string $directive Directive slug (noindex|nofollow|noarchive|nosnippet|noimageindex). - * @return int 1 if the directive is active for the context, 0 otherwise. + * @param string $directive Directive slug. + * @return int|string 1 for an active boolean directive, 0 for an inactive one, + * or the normalized value ('' = off) of a value directive. */ function noindex_seo_get_setting( $context, $directive ) { $settings = noindex_seo_get_settings(); if ( ! isset( $settings['contexts'][ $context ][ $directive ] ) ) { - return 0; + return in_array( $directive, noindex_seo_get_value_directives(), true ) ? '' : 0; } - return $settings['contexts'][ $context ][ $directive ] ? 1 : 0; + return $settings['contexts'][ $context ][ $directive ]; +} + +/** + * Sanitizes the conditional auto-noindex rules (TODO #11). + * + * Each rule is an exact-match pair: a post meta key (ACF fields and any + * custom field store their values in post meta, so no ACF dependency is + * needed) and the value that triggers noindex. Rules with an empty field or + * value are dropped; at most 20 rules are kept; the plugin's own + * `_noindex_seo_` meta keys are not valid rule fields (they are the output + * of the plugin, not content data). + * + * @since 3.6.0 + * + * @param mixed $raw Untrusted rules array (from storage, form or import). + * @return array Sanitized rules. + */ +function noindex_seo_sanitize_rules( $raw ) { + if ( ! is_array( $raw ) ) { + return array(); + } + + $rules = array(); + foreach ( $raw as $rule ) { + if ( ! is_array( $rule ) || ! isset( $rule['field'], $rule['value'] ) ) { + continue; + } + + $field = is_scalar( $rule['field'] ) ? (string) preg_replace( '/[^A-Za-z0-9_-]/', '', (string) $rule['field'] ) : ''; + $value = is_scalar( $rule['value'] ) ? sanitize_text_field( (string) $rule['value'] ) : ''; + + if ( '' === $field || '' === $value || 0 === strpos( $field, '_noindex_seo_' ) ) { + continue; + } + + $rules[] = array( + 'field' => $field, + 'value' => $value, + ); + + if ( count( $rules ) >= 20 ) { + break; + } + } + + return $rules; +} + +/** + * Returns the first auto-noindex rule matching a post's meta, if any. + * + * A rule matches when the post's meta value for the rule field is exactly + * equal (string comparison) to the rule value. The plugin's own + * `_noindex_seo_` meta keys never match, even if a rule slipped through + * sanitization. + * + * @since 3.6.0 + * + * @param int $post_id Post ID. + * @return array{field: string, value: string}|null The matching rule, or null. + */ +function noindex_seo_matching_rule_for_post( $post_id ) { + $post_id = absint( $post_id ); + if ( ! $post_id ) { + return null; + } + + foreach ( noindex_seo_get_settings()['rules'] as $rule ) { + if ( 0 === strpos( $rule['field'], '_noindex_seo_' ) ) { + continue; + } + + $meta = get_post_meta( $post_id, $rule['field'], true ); + if ( is_scalar( $meta ) && (string) $meta === $rule['value'] ) { + return $rule; + } + } + + return null; +} + +/** + * Collects the active directive map stored in a post's granular meta. + * + * Boolean directives that are on map to `true`; value directives map to their + * normalized value (absent when off). + * + * @since 3.6.0 + * + * @param int $post_id Post ID. + * @return array Directive name => true or value. + */ +function noindex_seo_get_post_directives_map( $post_id ) { + $post_id = absint( $post_id ); + $map = array(); + if ( ! $post_id ) { + return $map; + } + + foreach ( noindex_seo_get_boolean_directives() as $directive ) { + $meta_value = get_post_meta( $post_id, '_noindex_seo_' . $directive, true ); + if ( is_scalar( $meta_value ) && 1 === absint( $meta_value ) ) { + $map[ $directive ] = true; + } + } + foreach ( noindex_seo_get_value_directives() as $directive ) { + $meta_value = get_post_meta( $post_id, '_noindex_seo_' . $directive, true ); + $value = is_scalar( $meta_value ) ? noindex_seo_normalize_directive_value( $directive, $meta_value ) : ''; + if ( '' !== $value ) { + $map[ $directive ] = $value; + } + } + + return $map; +} + +/** + * Collects the active directive map configured for a context. + * + * @since 3.6.0 + * + * @param string $context Context slug. + * @return array Directive name => true or value. + */ +function noindex_seo_get_context_directives_map( $context ) { + $map = array(); + + foreach ( noindex_seo_get_boolean_directives() as $directive ) { + if ( 1 === noindex_seo_get_setting( $context, $directive ) ) { + $map[ $directive ] = true; + } + } + foreach ( noindex_seo_get_value_directives() as $directive ) { + $value = noindex_seo_get_setting( $context, $directive ); + if ( '' !== $value ) { + $map[ $directive ] = $value; + } + } + + return $map; } /** @@ -253,32 +564,65 @@ function noindex_seo_update_settings( array $settings ) { * printed as a classic tag on wp_head when * the wp_robots API is not available, so the plugin works from * WordPress 4.0 again. + * @since 3.6.0 The $directives argument is now a map of directive name => + * true (boolean directive) or the normalized string value + * (value directive), so value-carrying directives such as + * `max-snippet` render as `max-snippet:-1`. Flat lists of + * boolean names passed by third-party code still work. * * @see https://developer.wordpress.org/reference/hooks/wp_robots/ * @see https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag * - * @param string $method Implementation method: 'meta', 'header', or 'both'. Default 'meta'. - * @param array $directives Array of directives to apply. Default array('noindex'). + * @param string $method Implementation method: 'meta', 'header', or 'both'. Default 'meta'. + * @param array $directives Directive map (name => true or value), or a flat + * list of boolean names (pre-3.6.0 convention). + * Default array('noindex' => true). * @return void */ -function noindex_seo_metarobots( $method = 'meta', array $directives = array( 'noindex' ) ) { +function noindex_seo_metarobots( $method = 'meta', array $directives = array( 'noindex' => true ) ) { // Sanitize method. $valid_methods = array( 'meta', 'header', 'both' ); $method = in_array( $method, $valid_methods, true ) ? $method : 'meta'; - // Sanitize directives. - $valid_directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); - $directives = array_intersect( $directives, $valid_directives ); + // Normalize the directives map: accept a flat list of boolean names + // (pre-3.6.0 calling convention) and drop unknown directives. + $valid_directives = noindex_seo_get_directives(); + $map = array(); + foreach ( $directives as $name => $value ) { + if ( is_int( $name ) && is_string( $value ) ) { + // Flat list: sequential names. + $name = $value; + $value = true; + } + if ( ! in_array( $name, $valid_directives, true ) ) { + continue; + } + if ( in_array( $name, noindex_seo_get_boolean_directives(), true ) ) { + // absint( true ) === 1, so a single check covers both. + if ( 1 === absint( $value ) ) { + $map[ $name ] = true; + } + } else { + $value = noindex_seo_normalize_directive_value( $name, $value ); + if ( '' !== $value ) { + $map[ $name ] = $value; + } + } + } + $directives = $map; if ( empty( $directives ) ) { return; // No valid directives to apply. } + // Flat tokens (header value and classic meta tag). + $tokens = noindex_seo_format_directives( $directives ); + // Send HTTP header if requested. $header_sent = false; if ( in_array( $method, array( 'header', 'both' ), true ) ) { if ( ! headers_sent() ) { - $header_value = implode( ', ', $directives ); + $header_value = implode( ', ', $tokens ); header( 'X-Robots-Tag: ' . $header_value, false ); $header_sent = true; } @@ -298,8 +642,8 @@ function noindex_seo_metarobots( $method = 'meta', array $directives = array( 'n add_filter( 'wp_robots', function ( array $robots ) use ( $directives ) { - foreach ( $directives as $directive ) { - $robots[ $directive ] = true; + foreach ( $directives as $name => $value ) { + $robots[ $name ] = ( true === $value ) ? true : $value; } return $robots; }, @@ -312,8 +656,8 @@ function noindex_seo_metarobots( $method = 'meta', array $directives = array( 'n // WordPress 4.0 - 5.6: classic tag on wp_head. add_action( 'wp_head', - function () use ( $directives ) { - echo '' . "\n"; + function () use ( $tokens ) { + echo '' . "\n"; }, 1 // Early, so the tag sits near the top of the head like core output. ); @@ -331,8 +675,7 @@ function noindex_seo_metarobots( $method = 'meta', array $directives = array( 'n * @return void */ function noindex_seo_clear_post_directives( $post_id ) { - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); - foreach ( $directives as $directive ) { + foreach ( noindex_seo_get_directives() as $directive ) { delete_post_meta( $post_id, '_noindex_seo_' . $directive ); } } @@ -423,17 +766,8 @@ function noindex_seo_show() { if ( $post_id ) { $override = get_post_meta( $post_id, '_noindex_seo_override', true ); if ( $override ) { - // Collect active directives from post meta. - $post_directives = array(); - $available_directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); - - foreach ( $available_directives as $directive ) { - $meta_value = get_post_meta( $post_id, '_noindex_seo_' . $directive, true ); - // Explicitly check for 1 or '1' to avoid false positives with '0' string. - if ( is_scalar( $meta_value ) && 1 === absint( $meta_value ) ) { - $post_directives[] = $directive; - } - } + // Collect active directives (booleans and values) from post meta. + $post_directives = noindex_seo_get_post_directives_map( $post_id ); // Apply post-specific directives if any are enabled. if ( ! empty( $post_directives ) ) { @@ -456,13 +790,19 @@ function noindex_seo_show() { if ( $term_id ) { $term_override = get_term_meta( $term_id, '_noindex_seo_override', true ); if ( $term_override ) { - $term_directives = array(); - $available_directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $term_directives = array(); - foreach ( $available_directives as $directive ) { + foreach ( noindex_seo_get_boolean_directives() as $directive ) { $meta_value = get_term_meta( $term_id, '_noindex_seo_' . $directive, true ); if ( is_scalar( $meta_value ) && 1 === absint( $meta_value ) ) { - $term_directives[] = $directive; + $term_directives[ $directive ] = true; + } + } + foreach ( noindex_seo_get_value_directives() as $directive ) { + $meta_value = get_term_meta( $term_id, '_noindex_seo_' . $directive, true ); + $value = is_scalar( $meta_value ) ? noindex_seo_normalize_directive_value( $directive, $meta_value ) : ''; + if ( '' !== $value ) { + $term_directives[ $directive ] = $value; } } @@ -476,6 +816,21 @@ function noindex_seo_show() { } } + // PRIORITY 1.55: Conditional auto-noindex rules (3.6.0). + // A rule match applies noindex to the singular content being viewed — + // more specific than the per-CPT and global context defaults, less + // specific than an explicit per-post override (PRIORITY 1, which already + // returned above when active). + if ( is_singular() ) { + $matched_rule = noindex_seo_matching_rule_for_post( get_queried_object_id() ); + if ( null !== $matched_rule ) { + $opt = noindex_seo_get_config( 'method', 'meta' ); + $implementation_method = is_string( $opt ) ? $opt : 'meta'; + noindex_seo_metarobots( $implementation_method, array( 'noindex' => true ) ); + return; + } + } + // PRIORITY 1.6: Per-CPT global defaults. // When the current request is a single from a public custom post type that // has at least one directive configured in its `cpt_{post_type}` context, @@ -486,15 +841,8 @@ function noindex_seo_show() { if ( is_singular() ) { $post_type = get_post_type(); if ( $post_type && 'post' !== $post_type && 'page' !== $post_type && 'attachment' !== $post_type ) { - $cpt_context = 'cpt_' . $post_type; - $cpt_directives = array(); - $cpt_directive_list = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); - - foreach ( $cpt_directive_list as $directive ) { - if ( 1 === noindex_seo_get_setting( $cpt_context, $directive ) ) { - $cpt_directives[] = $directive; - } - } + $cpt_context = 'cpt_' . $post_type; + $cpt_directives = noindex_seo_get_context_directives_map( $cpt_context ); if ( ! empty( $cpt_directives ) ) { $opt = noindex_seo_get_config( 'method', 'meta' ); @@ -509,8 +857,8 @@ function noindex_seo_show() { // Try to get the options from the transient. $options = get_transient( 'noindex_seo_options' ); - // Available directives. - $available_directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + // Available directives (booleans and value-carrying, 3.6.0). + $available_directives = noindex_seo_get_directives(); if ( false === $options || ! is_array( $options ) || empty( $options ) ) { // Transient not set; pull directive values from the consolidated settings. @@ -580,15 +928,18 @@ function noindex_seo_show() { isset( $current_conditions[ $context ] ) && $current_conditions[ $context ] ) { - // Collect all active directives for this context. + // Collect all active directives for this context: booleans map to + // true, value directives keep their cached string value. $active_directives = array(); foreach ( $available_directives as $directive ) { $directive_key = str_replace( 'noindex', $directive, (string) $option_key ); - if ( isset( $options[ $directive_key ] ) && (bool) $options[ $directive_key ] ) { - $active_directives[] = $directive; + if ( ! isset( $options[ $directive_key ] ) || '' === $options[ $directive_key ] || 0 === $options[ $directive_key ] ) { + continue; } + + $active_directives[ $directive ] = is_string( $options[ $directive_key ] ) ? $options[ $directive_key ] : true; } // Apply directives if any are active. @@ -896,8 +1247,34 @@ function noindex_seo_filter_sitemap_posts( array $args, $post_type ) { } } - // Layer 2: per-post exclusion via granular override. + // Layer 2: per-post exclusion via granular override or conditional rules. + // Rule matches (3.6.0) always mean noindex, so they join the exclusion + // query directly; the granular override only excludes when its noindex + // directive is on. + $meta_query = array( 'relation' => 'OR' ); + if ( noindex_seo_get_config( 'granular', 0 ) ) { + $meta_query[] = array( + 'relation' => 'AND', + array( + 'key' => '_noindex_seo_override', + 'value' => 1, + ), + array( + 'key' => '_noindex_seo_noindex', + 'value' => 1, + ), + ); + } + + foreach ( noindex_seo_get_settings()['rules'] as $rule ) { + $meta_query[] = array( + 'key' => $rule['field'], + 'value' => $rule['value'], + ); + } + + if ( count( $meta_query ) > 1 ) { $excluded = get_posts( array( 'post_type' => $post_type, @@ -905,17 +1282,7 @@ function noindex_seo_filter_sitemap_posts( array $args, $post_type ) { 'nopaging' => true, 'suppress_filters' => false, 'no_found_rows' => true, - 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query - 'relation' => 'AND', - array( - 'key' => '_noindex_seo_override', - 'value' => 1, - ), - array( - 'key' => '_noindex_seo_noindex', - 'value' => 1, - ), - ), + 'meta_query' => $meta_query, // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query ) ); @@ -1201,6 +1568,9 @@ function noindex_seo_rest_get_settings() { * first and fall back to the generic 'page' context when it * carries no active directives — the same precedence as the * front-end. + * @since 3.6.0 Value-carrying directives return as `name:value` tokens + * (e.g. `max-snippet:-1`), and matching conditional rules + * surface as source `auto_rule`. * * @param WP_REST_Request $request Request with `post_id` param. * @return WP_REST_Response The effective-directives payload. @@ -1221,24 +1591,29 @@ function noindex_seo_rest_get_effective( WP_REST_Request $request ) { ); } - $directives = array(); - $available = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $source = 'global_setting'; + $directive_map = array(); - // Step 1: per-post override. + // Step 1: per-post override (booleans + values from post meta). $override_raw = get_post_meta( $post_id, '_noindex_seo_override', true ); $override = ( is_scalar( $override_raw ) && 1 === absint( $override_raw ) ) ? 1 : 0; if ( $override ) { - foreach ( $available as $directive ) { - $value = get_post_meta( $post_id, '_noindex_seo_' . $directive, true ); - if ( is_scalar( $value ) && 1 === absint( $value ) ) { - $directives[] = $directive; - } + $directive_map = noindex_seo_get_post_directives_map( $post_id ); + if ( ! empty( $directive_map ) ) { + $source = 'post_meta'; } } + // Step 1.5: conditional auto-noindex rules (3.6.0) — same precedence as + // the front-end (below an explicit override, above context defaults). + if ( 'global_setting' === $source && null !== noindex_seo_matching_rule_for_post( $post_id ) ) { + $directive_map = array( 'noindex' => true ); + $source = 'auto_rule'; + } + // Step 2 + 3: fall back to per-CPT or built-in context. - if ( empty( $directives ) ) { + if ( 'global_setting' === $source ) { $post_type = $post->post_type; if ( 'page' === $post_type ) { // WooCommerce special pages (cart, checkout, my account) have @@ -1255,21 +1630,13 @@ function noindex_seo_rest_get_effective( WP_REST_Request $request ) { $context = 'cpt_' . $post_type; } - foreach ( $available as $directive ) { - if ( 1 === noindex_seo_get_setting( $context, $directive ) ) { - $directives[] = $directive; - } - } + $directive_map = noindex_seo_get_context_directives_map( $context ); // Mirror noindex_seo_show(): a WooCommerce special page whose dedicated // context carries no active directives falls back to the generic // 'page' context (the same iteration order the front-end uses). - if ( empty( $directives ) && 'page' === $post_type && 0 === strpos( $context, 'woo_' ) ) { - foreach ( $available as $directive ) { - if ( 1 === noindex_seo_get_setting( 'page', $directive ) ) { - $directives[] = $directive; - } - } + if ( empty( $directive_map ) && 'page' === $post_type && 0 === strpos( $context, 'woo_' ) ) { + $directive_map = noindex_seo_get_context_directives_map( 'page' ); } } @@ -1280,9 +1647,9 @@ function noindex_seo_rest_get_effective( WP_REST_Request $request ) { array( 'post_id' => $post_id, 'post_type' => $post->post_type, - 'directives' => $directives, + 'directives' => noindex_seo_format_directives( $directive_map ), 'method' => $method, - 'source' => $override ? 'post_meta' : 'global_setting', + 'source' => $source, ), 200 ); @@ -1343,6 +1710,7 @@ function noindex_seo_get_directive_svg_icons() { 'noarchive' => $open . '' . $badge . $close, 'nosnippet' => $open . '' . $badge . $close, 'noimageindex' => $open . '' . $badge . $close, + 'notranslate' => $open . '' . $badge . $close, ); } @@ -1800,7 +2168,7 @@ function noindex_seo_get_cpt_label( $cpt ) { function noindex_seo_register() { $contexts = noindex_seo_get_contexts(); - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $directives = noindex_seo_get_directives(); // Register each directive for each context. foreach ( $contexts as $context ) { @@ -2050,7 +2418,7 @@ function noindex_seo_process_form() { } $contexts = noindex_seo_get_contexts(); - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $directives = noindex_seo_get_directives(); // Fields that only work with HTTP headers. $header_only_contexts = array( 'attachment' ); @@ -2065,15 +2433,18 @@ function noindex_seo_process_form() { $saved_method = noindex_seo_get_config( 'method', 'meta' ); $is_header_enabled = in_array( $saved_method, array( 'header', 'both' ), true ); - // Process checkbox grid: one entry per (context, directive). + // Process directive grid: one entry per (context, directive). + // Boolean directives arrive as '1' checkboxes; value directives as + // their raw value (empty = off). Everything normalizes through + // noindex_seo_normalize_directive_value(). // phpcs:disable WordPress.Security.NonceVerification.Missing -- nonce verified above. foreach ( $contexts as $context ) { foreach ( $directives as $directive ) { $option_key = $directive . '_seo_' . $context; - // Header-only contexts are forced to 0 when headers aren't enabled. + // Header-only contexts are forced off when headers aren't enabled. if ( in_array( $context, $header_only_contexts, true ) && ! $is_header_enabled ) { - $settings['contexts'][ $context ][ $directive ] = 0; + $settings['contexts'][ $context ][ $directive ] = in_array( $directive, noindex_seo_get_value_directives(), true ) ? '' : 0; continue; } @@ -2081,10 +2452,28 @@ function noindex_seo_process_form() { ? sanitize_text_field( wp_unslash( $_POST[ $option_key ] ) ) : ''; - // Only '1' counts as checked; everything else (including invalid input) is 0. - $settings['contexts'][ $context ][ $directive ] = ( '1' === $option_value ) ? 1 : 0; + $settings['contexts'][ $context ][ $directive ] = noindex_seo_normalize_directive_value( $directive, $option_value ); } } + + // Conditional auto-noindex rules (3.6.0): parallel arrays of fields + // and values from the rules table; each element sanitized inline. + $raw_rules = array(); + if ( isset( $_POST['noindex_seo_rule_field'], $_POST['noindex_seo_rule_value'] ) + && is_array( $_POST['noindex_seo_rule_field'] ) && is_array( $_POST['noindex_seo_rule_value'] ) ) { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- array input; every element is sanitized in the loop below. + $fields = (array) wp_unslash( $_POST['noindex_seo_rule_field'] ); + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- array input; every element is sanitized in the loop below. + $values = (array) wp_unslash( $_POST['noindex_seo_rule_value'] ); + foreach ( $values as $index => $rule_value ) { + $field_raw = isset( $fields[ $index ] ) ? $fields[ $index ] : ''; + $raw_rules[] = array( + 'field' => is_scalar( $field_raw ) ? sanitize_text_field( wp_unslash( (string) $field_raw ) ) : '', + 'value' => is_scalar( $rule_value ) ? sanitize_text_field( wp_unslash( (string) $rule_value ) ) : '', + ); + } + } + $settings['rules'] = noindex_seo_sanitize_rules( $raw_rules ); // phpcs:enable WordPress.Security.NonceVerification.Missing } else { // phpcs:disable WordPress.Security.NonceVerification.Missing -- nonce verified above. @@ -2127,7 +2516,7 @@ function noindex_seo_process_form() { $is_header_enabled = in_array( $settings['config']['method'], array( 'header', 'both' ), true ); if ( ! $is_header_enabled ) { foreach ( $directives as $directive ) { - $settings['contexts']['attachment'][ $directive ] = 0; + $settings['contexts']['attachment'][ $directive ] = in_array( $directive, noindex_seo_get_value_directives(), true ) ? '' : 0; } } } @@ -2145,15 +2534,17 @@ add_action( 'admin_post_update_noindex_seo', 'noindex_seo_process_form' ); /** * Handles the "Apply recommended defaults" form action. * - * Iterates the settings page section definitions and enables every directive - * for every context flagged `'suggestion' => true`. The 15 contexts currently - * flagged are: privacy_policy, date, day, month, time, year, paged, search, - * attachment, customize_preview, preview, error, woo_cart, woo_checkout, - * woo_myaccount. + * Iterates the settings page section definitions and enables every boolean + * directive for every context flagged `'suggestion' => true`. The 15 contexts + * currently flagged are: privacy_policy, date, day, month, time, year, paged, + * search, attachment, customize_preview, preview, error, woo_cart, + * woo_checkout, woo_myaccount. * - * All five directives are enabled on each suggested context. This is the same - * shape a manual click-through would produce, so the form is fully editable - * afterwards. + * All six boolean directives (noindex, nofollow, noarchive, nosnippet, + * noimageindex, notranslate) are enabled on each suggested context — + * value-carrying directives (3.6.0) are untouched because "enabling" them + * without a value is meaningless. This is the same shape a manual + * click-through would produce, so the form is fully editable afterwards. * * Hooked to the {@see 'admin_post_noindex_seo_apply_suggestions'} action. * @@ -2169,7 +2560,7 @@ function noindex_seo_process_apply_suggestions() { } check_admin_referer( 'noindex_seo_apply_suggestions_nonce' ); - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $directives = noindex_seo_get_boolean_directives(); $settings = noindex_seo_get_settings(); foreach ( noindex_seo_get_suggested_contexts() as $context ) { @@ -2239,11 +2630,15 @@ add_action( 'admin_post_noindex_seo_export', 'noindex_seo_handle_export' ); * full default shape of noindex_seo_get_settings(). * * @since 3.2.0 + * @since 3.6.0 Value directives normalize through + * noindex_seo_normalize_directive_value() and the conditional + * rules are sanitized with noindex_seo_sanitize_rules(). * * @param mixed $raw Decoded JSON 'settings' value. * @return array{ * version: int, - * contexts: array>, + * contexts: array>, + * rules: array, * config: array{ * method: string, * granular: int, @@ -2259,19 +2654,23 @@ function noindex_seo_sanitize_imported_settings( $raw ) { } $settings = noindex_seo_get_settings(); - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $directives = noindex_seo_get_directives(); foreach ( noindex_seo_get_contexts() as $context ) { if ( ! isset( $raw['contexts'][ $context ] ) || ! is_array( $raw['contexts'][ $context ] ) ) { continue; } foreach ( $directives as $directive ) { - if ( isset( $raw['contexts'][ $context ][ $directive ] ) && is_numeric( $raw['contexts'][ $context ][ $directive ] ) ) { - $settings['contexts'][ $context ][ $directive ] = ( 1 === (int) $raw['contexts'][ $context ][ $directive ] ) ? 1 : 0; + if ( array_key_exists( $directive, $raw['contexts'][ $context ] ) && is_scalar( $raw['contexts'][ $context ][ $directive ] ) ) { + $settings['contexts'][ $context ][ $directive ] = noindex_seo_normalize_directive_value( $directive, $raw['contexts'][ $context ][ $directive ] ); } } } + if ( array_key_exists( 'rules', $raw ) ) { + $settings['rules'] = noindex_seo_sanitize_rules( $raw['rules'] ); + } + $raw_config = $raw['config']; $method = isset( $raw_config['method'] ) && is_string( $raw_config['method'] ) @@ -2357,10 +2756,17 @@ add_action( 'admin_post_noindex_seo_import', 'noindex_seo_handle_import' ); * attachment context, persists via noindex_seo_update_settings() (which * also invalidates the transient cache) and reports what changed. * + * Directive tokens are plain names for boolean directives (noindex, notranslate, + * …) and `name=value` pairs for value directives (max-snippet=-1, + * max-image-preview=large, unavailable_after=2030-01-01 09:00). Passing a + * value for a boolean directive, or an invalid or missing value for a value + * directive, is rejected with a descriptive error. + * * @since 3.4.0 + * @since 3.6.0 Value directives are supported via name=value tokens. * * @param string $context Context slug. - * @param string[] $directives Directive slugs. + * @param string[] $directives Directive tokens (names or name=value). * @param bool $enable True to enable, false to disable. * @return true|WP_Error True on success, WP_Error describing the first problem found. */ @@ -2369,11 +2775,47 @@ function noindex_seo_cli_apply_directives( $context, array $directives, $enable return new WP_Error( 'noindex_seo_cli_unknown_context', sprintf( "Unknown context '%s'. Run 'wp noindex-seo list' to see the available contexts.", $context ) ); } - $valid_directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); - foreach ( $directives as $directive ) { - if ( ! in_array( $directive, $valid_directives, true ) ) { - return new WP_Error( 'noindex_seo_cli_unknown_directive', sprintf( "Unknown directive '%s'. Valid directives: %s.", $directive, implode( ', ', $valid_directives ) ) ); + $valid_directives = noindex_seo_get_directives(); + $parsed = array(); + foreach ( $directives as $token ) { + $name = $token; + $value = null; + if ( false !== strpos( $token, '=' ) ) { + $pieces = explode( '=', $token, 2 ); + $name = $pieces[0]; + $value = $pieces[1]; } + + if ( ! in_array( $name, $valid_directives, true ) ) { + return new WP_Error( 'noindex_seo_cli_unknown_directive', sprintf( "Unknown directive '%s'. Valid directives: %s.", $name, implode( ', ', $valid_directives ) ) ); + } + + if ( in_array( $name, noindex_seo_get_boolean_directives(), true ) ) { + if ( null !== $value ) { + return new WP_Error( 'noindex_seo_cli_unexpected_value', sprintf( "Directive '%s' does not take a value; pass just the name.", $name ) ); + } + $parsed[ $name ] = $enable ? 1 : 0; + continue; + } + + // Value directive: enabling requires a valid value; disabling clears it. + if ( ! $enable ) { + $parsed[ $name ] = ''; + continue; + } + $normalized = noindex_seo_normalize_directive_value( $name, $value ); + if ( null === $value || '' === $normalized ) { + return new WP_Error( + 'noindex_seo_cli_invalid_value', + sprintf( + "Invalid or missing value for '%s'. Use %s. Example: %s.", + $name, + 'max-snippet|max-video-preview' === $name ? 'an integer >= -1' : ( 'max-image-preview' === $name ? 'none, standard or large' : 'a date and time like 2030-01-01 09:00' ), + 'max-snippet|max-video-preview' === $name ? 'max-snippet=-1' : ( 'max-image-preview' === $name ? 'max-image-preview=large' : 'unavailable_after=2030-01-01 09:00' ) + ) + ); + } + $parsed[ $name ] = $normalized; } // The attachment context only works with HTTP headers (same rule as the @@ -2391,8 +2833,8 @@ function noindex_seo_cli_apply_directives( $context, array $directives, $enable } $settings = noindex_seo_get_settings(); - foreach ( $directives as $directive ) { - $settings['contexts'][ $context ][ $directive ] = $enable ? 1 : 0; + foreach ( $parsed as $directive => $value ) { + $settings['contexts'][ $context ][ $directive ] = $value; } noindex_seo_update_settings( $settings ); @@ -2403,24 +2845,37 @@ function noindex_seo_cli_apply_directives( $context, array $directives, $enable /** * Builds the rows for the `wp noindex-seo list` command. * + * Boolean directives report on/off; value directives (3.6.0) report their + * value (e.g. `max-snippet:-1`) or off. + * * @since 3.4.0 + * @since 3.6.0 Value directives report their configured value. * * @param string $context_filter Optional context slug to filter by. Empty for all. * @return array Rows. */ function noindex_seo_cli_get_rows( $context_filter = '' ) { - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); - $rows = array(); + $rows = array(); foreach ( noindex_seo_get_contexts() as $context ) { if ( '' !== $context_filter && $context !== $context_filter ) { continue; } - foreach ( $directives as $directive ) { + foreach ( noindex_seo_get_directives() as $directive ) { + $value = noindex_seo_get_setting( $context, $directive ); + + if ( in_array( $directive, noindex_seo_get_boolean_directives(), true ) ) { + $status = $value ? 'on' : 'off'; + } elseif ( '' === $value ) { + $status = 'off'; + } else { + $status = noindex_seo_format_value_directive( $directive, (string) $value ); + } + $rows[] = array( 'context' => $context, 'directive' => $directive, - 'status' => noindex_seo_get_setting( $context, $directive ) ? 'on' : 'off', + 'status' => $status, ); } } @@ -2491,14 +2946,22 @@ function noindex_seo_cli_list( $args, $assoc_args ) { * : Context slug (see `wp noindex-seo list`). * * [...] - * : One or more directives to enable. Default: all five. + * : One or more directives to enable. Boolean directives by name + * (noindex, nofollow, noarchive, nosnippet, noimageindex, notranslate); + * value directives as name=value (e.g. max-snippet=-1, + * max-image-preview=large, unavailable_after="2030-01-01 09:00" — + * datetimes need quoting because of the space, or a T separator: + * unavailable_after=2030-01-01T09:00). Default: all six boolean directives. * * ## EXAMPLES * * wp noindex-seo set search noindex * wp noindex-seo set date noindex noarchive + * wp noindex-seo set archive max-snippet=-1 max-image-preview=large * * @since 3.4.0 + * @since 3.6.0 Value directives accepted as name=value tokens; notranslate + * joined the boolean set. * * @param array $args [context, directive...]. * @param array $assoc_args Associative arguments (unused). @@ -2511,9 +2974,11 @@ function noindex_seo_cli_set( $args, $assoc_args ) { // phpcs:ignore Generic.Cod } $context = sanitize_key( (string) array_shift( $args ) ); - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $directives = noindex_seo_get_boolean_directives(); if ( ! empty( $args ) ) { - $directives = array_values( array_map( 'sanitize_key', $args ) ); + // Not sanitize_key(): value tokens contain '=', and datetime values + // contain ':' and '-'; noindex_seo_cli_apply_directives() validates. + $directives = array_values( array_filter( array_map( 'trim', array_map( 'sanitize_text_field', $args ) ) ) ); } $result = noindex_seo_cli_apply_directives( $context, $directives, true ); @@ -2534,13 +2999,17 @@ function noindex_seo_cli_set( $args, $assoc_args ) { // phpcs:ignore Generic.Cod * : Context slug (see `wp noindex-seo list`). * * [...] - * : One or more directives to disable. Default: all five. + * : One or more directives to disable. Boolean directives by name; value + * directives by plain name (max-snippet) — passing a value is not needed + * to disable. Default: all six boolean directives. * * ## EXAMPLES * * wp noindex-seo unset search noindex + * wp noindex-seo unset archive max-snippet * * @since 3.4.0 + * @since 3.6.0 Value directives can be disabled by plain name. * * @param array $args [context, directive...]. * @param array $assoc_args Associative arguments (unused). @@ -2553,9 +3022,9 @@ function noindex_seo_cli_unset( $args, $assoc_args ) { // phpcs:ignore Generic.C } $context = sanitize_key( (string) array_shift( $args ) ); - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $directives = noindex_seo_get_boolean_directives(); if ( ! empty( $args ) ) { - $directives = array_values( array_map( 'sanitize_key', $args ) ); + $directives = array_values( array_filter( array_map( 'trim', array_map( 'sanitize_text_field', $args ) ) ) ); } $result = noindex_seo_cli_apply_directives( $context, $directives, false ); @@ -2829,19 +3298,27 @@ function noindex_seo_register_post_meta() { // Get all public post types. $post_types = get_post_types( array( 'public' => true ), 'names' ); - // Meta fields to register. - $meta_fields = array( + // Meta fields to register. Boolean directives (and the override flag) are + // integers; value directives (3.6.0) are strings normalized on write. + $boolean_meta_fields = array( '_noindex_seo_override', '_noindex_seo_noindex', '_noindex_seo_nofollow', '_noindex_seo_noarchive', '_noindex_seo_nosnippet', '_noindex_seo_noimageindex', + '_noindex_seo_notranslate', + ); + $value_meta_fields = array( + '_noindex_seo_max-snippet', + '_noindex_seo_max-image-preview', + '_noindex_seo_max-video-preview', + '_noindex_seo_unavailable_after', ); // Register each meta field for each post type. foreach ( $post_types as $post_type ) { - foreach ( $meta_fields as $meta_key ) { + foreach ( $boolean_meta_fields as $meta_key ) { register_post_meta( $post_type, $meta_key, @@ -2856,6 +3333,24 @@ function noindex_seo_register_post_meta() { ) ); } + foreach ( $value_meta_fields as $meta_key ) { + register_post_meta( + $post_type, + $meta_key, + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'default' => '', + 'sanitize_callback' => function ( $raw ) use ( $meta_key ) { + return noindex_seo_normalize_directive_value( str_replace( '_noindex_seo_', '', $meta_key ), $raw ); + }, + 'auth_callback' => function () { + return current_user_can( 'edit_posts' ); + }, + ) + ); + } } } add_action( 'init', 'noindex_seo_register_post_meta' ); @@ -2926,25 +3421,34 @@ function noindex_seo_render_meta_box( WP_Post $post ) { wp_nonce_field( 'noindex_seo_meta_box', 'noindex_seo_meta_box_nonce' ); // Get current post meta values. - $override = get_post_meta( $post->ID, '_noindex_seo_override', true ); - $noindex = get_post_meta( $post->ID, '_noindex_seo_noindex', true ); - $nofollow = get_post_meta( $post->ID, '_noindex_seo_nofollow', true ); - $noarchive = get_post_meta( $post->ID, '_noindex_seo_noarchive', true ); - $nosnippet = get_post_meta( $post->ID, '_noindex_seo_nosnippet', true ); - $noimageindex = get_post_meta( $post->ID, '_noindex_seo_noimageindex', true ); + $override = get_post_meta( $post->ID, '_noindex_seo_override', true ); + $noindex = get_post_meta( $post->ID, '_noindex_seo_noindex', true ); + $nofollow = get_post_meta( $post->ID, '_noindex_seo_nofollow', true ); + $noarchive = get_post_meta( $post->ID, '_noindex_seo_noarchive', true ); + $nosnippet = get_post_meta( $post->ID, '_noindex_seo_nosnippet', true ); + $noimageindex = get_post_meta( $post->ID, '_noindex_seo_noimageindex', true ); + $notranslate = get_post_meta( $post->ID, '_noindex_seo_notranslate', true ); + $max_snippet = get_post_meta( $post->ID, '_noindex_seo_max-snippet', true ); + $max_image_preview = get_post_meta( $post->ID, '_noindex_seo_max-image-preview', true ); + $max_video_preview = get_post_meta( $post->ID, '_noindex_seo_max-video-preview', true ); + $unavailable_after = get_post_meta( $post->ID, '_noindex_seo_unavailable_after', true ); + + // Normalize the value directives for display. + $max_snippet = noindex_seo_normalize_directive_value( 'max-snippet', $max_snippet ); + $max_image_preview = noindex_seo_normalize_directive_value( 'max-image-preview', $max_image_preview ); + $max_video_preview = noindex_seo_normalize_directive_value( 'max-video-preview', $max_video_preview ); + $unavailable_after = noindex_seo_normalize_directive_value( 'unavailable_after', $unavailable_after ); // Get global settings for reference. $global_directives = array(); - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); // Determine which context applies to this post type. $post_type = get_post_type( $post ); $context = ( 'page' === $post_type ) ? 'page' : 'single'; - foreach ( $directives as $directive ) { - if ( noindex_seo_get_setting( $context, $directive ) ) { - $global_directives[] = $directive; - } + $global_map = noindex_seo_get_context_directives_map( $context ); + foreach ( noindex_seo_format_directives( $global_map ) as $token ) { + $global_directives[] = $token; } ?> @@ -2986,6 +3490,40 @@ function noindex_seo_render_meta_box( WP_Post $post ) { > noimageindex — + + + + +

+

+ + + + + + + +
@@ -2997,23 +3535,8 @@ function noindex_seo_render_meta_box( WP_Post $post ) { ID ) ); ?>

@@ -3074,11 +3597,20 @@ function noindex_seo_save_directives_from_post( $post_id ) { update_post_meta( $post_id, '_noindex_seo_override', $override ); if ( $override ) { - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); - foreach ( $directives as $directive ) { + // Boolean directives: checkbox presence = 1. + foreach ( noindex_seo_get_boolean_directives() as $directive ) { $value = isset( $_POST[ 'noindex_seo_' . $directive ] ) ? 1 : 0; update_post_meta( $post_id, '_noindex_seo_' . $directive, $value ); } + + // Value directives (3.6.0): raw input, normalized ('' = off). + foreach ( noindex_seo_get_value_directives() as $directive ) { + $raw = ( isset( $_POST[ 'noindex_seo_' . $directive ] ) && is_string( $_POST[ 'noindex_seo_' . $directive ] ) ) + ? sanitize_text_field( wp_unslash( $_POST[ 'noindex_seo_' . $directive ] ) ) + : ''; + $value = noindex_seo_normalize_directive_value( $directive, $raw ); + update_post_meta( $post_id, '_noindex_seo_' . $directive, $value ); + } } else { noindex_seo_clear_post_directives( $post_id ); } @@ -3160,17 +3692,24 @@ function noindex_seo_register_term_meta() { $taxonomies = get_taxonomies( array( 'public' => true ), 'names' ); - $meta_keys = array( + $boolean_meta_keys = array( '_noindex_seo_override', '_noindex_seo_noindex', '_noindex_seo_nofollow', '_noindex_seo_noarchive', '_noindex_seo_nosnippet', '_noindex_seo_noimageindex', + '_noindex_seo_notranslate', + ); + $value_meta_keys = array( + '_noindex_seo_max-snippet', + '_noindex_seo_max-image-preview', + '_noindex_seo_max-video-preview', + '_noindex_seo_unavailable_after', ); foreach ( $taxonomies as $taxonomy ) { - foreach ( $meta_keys as $meta_key ) { + foreach ( $boolean_meta_keys as $meta_key ) { register_term_meta( $taxonomy, $meta_key, @@ -3185,6 +3724,24 @@ function noindex_seo_register_term_meta() { ) ); } + foreach ( $value_meta_keys as $meta_key ) { + register_term_meta( + $taxonomy, + $meta_key, + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'default' => '', + 'sanitize_callback' => function ( $raw ) use ( $meta_key ) { + return noindex_seo_normalize_directive_value( str_replace( '_noindex_seo_', '', $meta_key ), $raw ); + }, + 'auth_callback' => static function () { + return current_user_can( 'manage_categories' ); + }, + ) + ); + } // Render the form fields on the Edit Tag screen. add_action( "{$taxonomy}_edit_form_fields", 'noindex_seo_render_term_form_fields' ); @@ -3216,12 +3773,15 @@ function noindex_seo_render_term_form_fields( WP_Term $term ) { $override_raw = get_term_meta( $term->term_id, '_noindex_seo_override', true ); $override = ( is_numeric( $override_raw ) ? (int) $override_raw : 0 ) ? 1 : 0; - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); $values = array(); - foreach ( $directives as $directive ) { + foreach ( noindex_seo_get_boolean_directives() as $directive ) { $raw_value = get_term_meta( $term->term_id, '_noindex_seo_' . $directive, true ); $values[ $directive ] = ( is_numeric( $raw_value ) ? (int) $raw_value : 0 ) ? 1 : 0; } + foreach ( noindex_seo_get_value_directives() as $directive ) { + $raw_value = get_term_meta( $term->term_id, '_noindex_seo_' . $directive, true ); + $values[ $directive ] = is_scalar( $raw_value ) ? noindex_seo_normalize_directive_value( $directive, $raw_value ) : ''; + } ?> @@ -3232,12 +3792,30 @@ function noindex_seo_render_term_form_fields( WP_Term $term ) {

- + + + + +

@@ -3300,14 +3878,21 @@ function noindex_seo_save_term_meta( $term_id, $tt_id ) { // phpcs:ignore Generi $override = isset( $_POST['noindex_seo_override'] ) ? 1 : 0; update_term_meta( $term_id, '_noindex_seo_override', $override ); - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); + $all_directives = noindex_seo_get_directives(); if ( $override ) { - foreach ( $directives as $directive ) { + foreach ( noindex_seo_get_boolean_directives() as $directive ) { $value = isset( $_POST[ 'noindex_seo_' . $directive ] ) ? 1 : 0; update_term_meta( $term_id, '_noindex_seo_' . $directive, $value ); } + foreach ( noindex_seo_get_value_directives() as $directive ) { + $raw = ( isset( $_POST[ 'noindex_seo_' . $directive ] ) && is_string( $_POST[ 'noindex_seo_' . $directive ] ) ) + ? sanitize_text_field( wp_unslash( $_POST[ 'noindex_seo_' . $directive ] ) ) + : ''; + $value = noindex_seo_normalize_directive_value( $directive, $raw ); + update_term_meta( $term_id, '_noindex_seo_' . $directive, $value ); + } } else { - foreach ( $directives as $directive ) { + foreach ( $all_directives as $directive ) { delete_term_meta( $term_id, '_noindex_seo_' . $directive ); } } @@ -3364,22 +3949,29 @@ function noindex_seo_display_custom_column( $column, $post_id ) { $override = get_post_meta( $post_id, '_noindex_seo_override', true ); - // Collect directive values for Quick Edit. - $meta_noindex = get_post_meta( $post_id, '_noindex_seo_noindex', true ); - $meta_nofollow = get_post_meta( $post_id, '_noindex_seo_nofollow', true ); - $meta_noarchive = get_post_meta( $post_id, '_noindex_seo_noarchive', true ); - $meta_nosnippet = get_post_meta( $post_id, '_noindex_seo_nosnippet', true ); - $meta_noimageindex = get_post_meta( $post_id, '_noindex_seo_noimageindex', true ); - + // Collect directive values for Quick Edit: booleans as 0/1, value + // directives as their normalized string ('' = off). $directives_values = array( - 'override' => ( is_scalar( $override ) ? absint( $override ) : 0 ), - 'noindex' => ( is_scalar( $meta_noindex ) ? absint( $meta_noindex ) : 0 ), - 'nofollow' => ( is_scalar( $meta_nofollow ) ? absint( $meta_nofollow ) : 0 ), - 'noarchive' => ( is_scalar( $meta_noarchive ) ? absint( $meta_noarchive ) : 0 ), - 'nosnippet' => ( is_scalar( $meta_nosnippet ) ? absint( $meta_nosnippet ) : 0 ), - 'noimageindex' => ( is_scalar( $meta_noimageindex ) ? absint( $meta_noimageindex ) : 0 ), + 'override' => ( is_scalar( $override ) ? absint( $override ) : 0 ), ); + $directive_map = array(); + foreach ( noindex_seo_get_boolean_directives() as $directive ) { + $meta_value = get_post_meta( $post_id, '_noindex_seo_' . $directive, true ); + $directives_values[ $directive ] = ( is_scalar( $meta_value ) && 1 === absint( $meta_value ) ) ? 1 : 0; + if ( 1 === $directives_values[ $directive ] ) { + $directive_map[ $directive ] = true; + } + } + foreach ( noindex_seo_get_value_directives() as $directive ) { + $meta_value = get_post_meta( $post_id, '_noindex_seo_' . $directive, true ); + $value = is_scalar( $meta_value ) ? noindex_seo_normalize_directive_value( $directive, $meta_value ) : ''; + $directives_values[ $directive ] = $value; + if ( '' !== $value ) { + $directive_map[ $directive ] = $value; + } + } + // Output hidden data for Quick Edit to read. echo '

@@ -3608,22 +4229,24 @@ function noindex_seo_quick_edit_fields( $column_name, $post_type ) { // phpcs:ig $('#the-list').on('click', '.editinline', function() { var post_id = $(this).closest('tr').attr('id').replace('post-', ''); var $row = $('#post-' + post_id); + var $data = $row.find('.noindex-seo-override-data'); - // Get current values from the column (we'll use data attributes) - var override = $row.find('.noindex-seo-override-data').data('override'); - var noindex = $row.find('.noindex-seo-override-data').data('noindex'); - var nofollow = $row.find('.noindex-seo-override-data').data('nofollow'); - var noarchive = $row.find('.noindex-seo-override-data').data('noarchive'); - var nosnippet = $row.find('.noindex-seo-override-data').data('nosnippet'); - var noimageindex = $row.find('.noindex-seo-override-data').data('noimageindex'); + // Get current values from the column (data attributes) + var override = $data.data('override'); + var booleans = ['noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex', 'notranslate']; + var values = ['max-snippet', 'max-image-preview', 'max-video-preview', 'unavailable_after']; // Set checkbox values $('#noindex-seo-quick-edit-override').prop('checked', override == 1); - $('input[name="noindex_seo_noindex"]').prop('checked', noindex == 1); - $('input[name="noindex_seo_nofollow"]').prop('checked', nofollow == 1); - $('input[name="noindex_seo_noarchive"]').prop('checked', noarchive == 1); - $('input[name="noindex_seo_nosnippet"]').prop('checked', nosnippet == 1); - $('input[name="noindex_seo_noimageindex"]').prop('checked', noimageindex == 1); + $.each(booleans, function(i, name) { + $('input[name="noindex_seo_' + name + '"]').prop('checked', $data.data(name) == 1); + }); + + // Set value directives (empty = off; unavailable_after uses a T separator) + $.each(values, function(i, name) { + var value = String($data.data(name) || '').replace(' ', 'T'); + $('[name="noindex_seo_' + name + '"]').val(value); + }); // Show/hide directives based on override if (override == 1) { @@ -3761,14 +4384,9 @@ function noindex_seo_handle_bulk_actions( $redirect_to, $action, array $post_ids if ( 'noindex_seo_disable_override' === $action ) { // Remove the override flag entirely and clear any directive meta so the // post falls back to the global context settings. - $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); - foreach ( $post_ids as $post_id ) { delete_post_meta( $post_id, '_noindex_seo_override' ); - - foreach ( $directives as $directive ) { - delete_post_meta( $post_id, '_noindex_seo_' . $directive ); - } + noindex_seo_clear_post_directives( $post_id ); } $redirect_to = add_query_arg( 'noindex_seo_bulk_disabled', count( $post_ids ), $redirect_to ); @@ -4296,27 +4914,59 @@ function noindex_seo_admin() { $header_only_fields = array( 'attachment' ); $is_header_enabled = in_array( $option_config_method, array( 'header', 'both' ), true ); - // Define available directives with config. + // Define available directives with config. 'type' drives the grid cell: + // bool = checkbox, int = number input, preview = size select, + // datetime = datetime-local input. Empty value = off. $directives_config = array( - 'noindex' => array( + 'noindex' => array( 'label' => __( 'noindex', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from indexing this page', 'noindex-seo' ), + 'type' => 'bool', ), - 'nofollow' => array( + 'nofollow' => array( 'label' => __( 'nofollow', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from following links on this page', 'noindex-seo' ), + 'type' => 'bool', ), - 'noarchive' => array( + 'noarchive' => array( 'label' => __( 'noarchive', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from showing a cached version', 'noindex-seo' ), + 'type' => 'bool', ), - 'nosnippet' => array( + 'nosnippet' => array( 'label' => __( 'nosnippet', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from showing text snippets', 'noindex-seo' ), + 'type' => 'bool', ), - 'noimageindex' => array( + 'noimageindex' => array( 'label' => __( 'noimageindex', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from indexing images', 'noindex-seo' ), + 'type' => 'bool', + ), + 'notranslate' => array( + 'label' => __( 'notranslate', 'noindex-seo' ), + 'desc' => __( 'Ask search engines not to translate this page', 'noindex-seo' ), + 'type' => 'bool', + ), + 'max-snippet' => array( + 'label' => __( 'max-snippet', 'noindex-seo' ), + 'desc' => __( 'Maximum snippet length in characters (-1 = no limit)', 'noindex-seo' ), + 'type' => 'int', + ), + 'max-image-preview' => array( + 'label' => __( 'max-image-preview', 'noindex-seo' ), + 'desc' => __( 'Maximum image preview size', 'noindex-seo' ), + 'type' => 'preview', + ), + 'max-video-preview' => array( + 'label' => __( 'max-video-preview', 'noindex-seo' ), + 'desc' => __( 'Maximum video preview seconds (-1 = no limit)', 'noindex-seo' ), + 'type' => 'int', + ), + 'unavailable_after' => array( + 'label' => __( 'unavailable_after', 'noindex-seo' ), + 'desc' => __( 'Stop indexing this page after this date and time', 'noindex-seo' ), + 'type' => 'datetime', ), ); ?> @@ -4614,6 +5264,7 @@ function noindex_seo_admin() { $directive_option_key = $directive . '_seo_' . $field_id; $directive_value = noindex_seo_get_setting( $field_id, $directive ); ?> + - - + + + + + + + + + + +

+

+ +

+
+
+

+ + +

+ +
+
+
+
+ + + +
+
+ + + '', + 'value' => '', + ), + ); // One empty row for the first rule. + ?> + + +
+ + + +
+ +
+

+ + +

+
+
+
+ diff --git a/readme.txt b/readme.txt index d2ead4a..dd2e8a2 100644 --- a/readme.txt +++ b/readme.txt @@ -3,9 +3,9 @@ Contributors: robotstxt, javiercasares Tags: seo, noindex, nofollow, noarchive, robots Requires at least: 7.0 Tested up to: 7.2 -Stable tag: 3.5.0 +Stable tag: 3.6.0 Requires PHP: 8.3 -Version: 3.5.0 +Version: 3.6.0 License: GPL-3.0-or-later License URI: https://www.gnu.org/licenses/gpl-3.0.txt @@ -13,9 +13,9 @@ Control search engine indexing with robots directives using HTML meta tags or HT == Description == -Fine-grained control over how search engines index and display your WordPress content. Apply 5 independent robots directives to 25 different page contexts with flexible implementation methods. +Fine-grained control over how search engines index and display your WordPress content. Apply 10 robots directives to 25 different page contexts with flexible implementation methods. -**5 Robots Directives:** +**5 Boolean Robots Directives:** * **noindex**: Prevent search engines from indexing the page * **nofollow**: Prevent search engines from following links on the page @@ -23,6 +23,16 @@ Fine-grained control over how search engines index and display your WordPress co * **nosnippet**: Prevent search engines from showing text snippets in results * **noimageindex**: Prevent search engines from indexing images on the page +**5 Value Robots Directives (3.6.0):** + +* **notranslate**: Ask search engines not to translate the page +* **max-snippet**: Limit the text snippet length in characters (-1 = no limit) +* **max-image-preview**: Limit the image preview size (none / standard / large) +* **max-video-preview**: Limit the video preview length in seconds (-1 = no limit) +* **unavailable_after**: Stop indexing the page after a date and time + +**Conditional rules (3.6.0):** automatically apply noindex to any post whose custom field (for example an ACF field) exactly matches a value you define. + **Implementation Methods:** * HTML Meta Tags: Traditional method, easy to verify in page source (default) @@ -110,7 +120,7 @@ Important note: if you have any doubt about any of the following items it is bes The plugin ships a `wp noindex-seo` command namespace (WP-CLI 2.x required): * `wp noindex-seo list [--only=] [--format=]` — lists every context × directive pair and its on/off status (table, csv, json or yaml). -* `wp noindex-seo set [...]` — enables directives on a context (default: all five). Example: `wp noindex-seo set search noindex noarchive`. +* `wp noindex-seo set [...]` — enables directives on a context (default: all six boolean directives). Boolean directives go by name; value directives as `name=value`: `wp noindex-seo set search noindex noarchive`, `wp noindex-seo set archive max-snippet=-1 max-image-preview=large`. * `wp noindex-seo unset [...]` — disables directives on a context. * `wp noindex-seo export []` — prints the settings payload as JSON to STDOUT, or writes it to a file. * `wp noindex-seo import [--dry-run]` — restores settings from an export; `--dry-run` reports how many values would change without saving. @@ -127,10 +137,18 @@ The settings page includes an "Export settings" button that downloads the curren The plugin exposes two read-only endpoints under `/wp-json/noindex-seo/v1/` so headless consumers can read the configuration: * `GET /settings`: returns the consolidated settings array (contexts and directives plus config). Requires an authenticated user with the `manage_options` capability. -* `GET /effective?post_id=123`: returns the list of active directives for a specific post, computed with the same precedence used on the front-end (per-post override, then per-post-type default, then the built-in context). Public only for published, non-password-protected posts; everything else requires `edit_post` capabilities. +* `GET /effective?post_id=123`: returns the list of active directives for a specific post, computed with the same precedence used on the front-end (per-post override, then conditional rules, then per-post-type default, then the built-in context). Value directives return as `name:value` tokens (e.g. `max-snippet:-1`); `source` is `post_meta`, `auto_rule` (a conditional rule matched) or `global_setting`. Public only for published, non-password-protected posts; everything else requires `edit_post` capabilities. On WordPress versions with XML sitemaps (5.5+), URLs that are noindexed are automatically excluded from the core sitemaps. +== Multisite == + +The plugin is designed **per site** and works on WordPress Multisite when activated on each site individually (or via the Network Admin's "Add Plugin" per-site flow): + +* Directives are site-content concerns, so every site keeps its own independent settings, per-post overrides, per-term overrides and conditional rules (stored per site, no network-wide storage). +* There is no network-admin settings page and no `Network: true` header by design: activating the plugin network-wide would apply each site's own settings anyway (each site reads its own options), so per-site activation is the intended and documented mode. +* To roll out the same configuration across sites, use the built-in export/import (Tools tab, JSON) or `wp noindex-seo export` / `wp noindex-seo import` per site — for example with WP-CLI's `--url` switch. + == Installation == = Automatic download = @@ -162,6 +180,10 @@ No. By default all plugin data is preserved on uninstall. If you want a complete == Changelog == += 3.6.0 = + +Feature release: 5 modern robots directives (notranslate, max-snippet, max-image-preview, max-video-preview, unavailable_after) available on every surface — global contexts, per-post and per-term overrides, Quick Edit, the block editor sidebar, REST and WP-CLI (name=value tokens); conditional auto-noindex rules that apply noindex when a custom field (e.g. an ACF field) exactly matches a value (matched posts also drop out of the XML sitemap); Multisite behavior documented (per-site by design, with export/import-based rollout). + = 3.5.0 = WooCommerce special-page contexts: dedicated robots directives for the Cart, Checkout and My Account pages (detected through the page-ID options, no WooCommerce code needed), recommended by default and mirrored across the front-end, the REST /effective endpoint and the core XML sitemaps. Compatibility window updated to WordPress 7.0 - 7.2 and PHP 8.3 - 8.6 (tested on WordPress 7.2-beta3 and PHP 8.6.0RC3). The five directive icons now render as SVG through the WordPress Icons API on WP 7.2+ (legacy emoji fallback on WP 7.0 - 7.1), matching the SVG direction of the WordPress 7.2 admin. Fixed the `wp noindex-seo list` command, which fatalled on real WP-CLI installs (its `--context` filter collided with WP-CLI 2.11+'s reserved global flag, now `--only`, and the output call used a nonexistent API). @@ -170,10 +192,6 @@ WooCommerce special-page contexts: dedicated robots directives for the Cart, Che WP-CLI support: a `wp noindex-seo` command namespace with `list`, `set`, `unset`, `export`, `import` and bulk per-post `override` — automation-friendly and scaling past the ~200-post ceiling of the bulk UI. -= 3.3.0 = - -Settings page reorganized with the native WordPress tab navigation (General / SEO Settings / Import-Export, no custom tab code) and titled sections; saving is tab-scoped so hidden tabs never reset each other's values. - = Previous versions = If you want to see the full changelog, visit the [noindex SEO plugin page](https://www.robotstxt.software/plugins/noindex-seo/). @@ -194,6 +212,6 @@ This plugin adheres to the following security measures and review protocols for == Vulnerabilities == -* No vulnerabilities have been published up to version 3.5.0. +* No vulnerabilities have been published up to version 3.6.0. 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). diff --git a/uninstall.php b/uninstall.php index a73ff35..44abb99 100644 --- a/uninstall.php +++ b/uninstall.php @@ -137,7 +137,8 @@ $wpdb->query( ) ); -// Clean up post meta (granular control). +// Clean up post meta (granular control). The 3.6.0 value directives store +// their per-post values under the same prefix. $noindex_seo_meta_keys = array( '_noindex_seo_override', '_noindex_seo_noindex', @@ -145,6 +146,11 @@ $noindex_seo_meta_keys = array( '_noindex_seo_noarchive', '_noindex_seo_nosnippet', '_noindex_seo_noimageindex', + '_noindex_seo_notranslate', + '_noindex_seo_max-snippet', + '_noindex_seo_max-image-preview', + '_noindex_seo_max-video-preview', + '_noindex_seo_unavailable_after', ); foreach ( $noindex_seo_meta_keys as $noindex_seo_meta_key ) {