This commit is contained in:
Javier Casares 2026-11-03 17:06:29 +00:00
commit 1086e369e3
10 changed files with 1299 additions and 848 deletions

View file

@ -202,6 +202,22 @@
text-align: center; text-align: center;
} }
/* SVG directive icons (WP 7.1+ via the core Icons API; emoji fallback
inherits the surrounding text metrics instead). */
svg.noindex-seo-directive-icon {
vertical-align: text-bottom;
flex-shrink: 0;
}
.directive-icon .noindex-seo-directive-icon {
display: block;
margin: 0 auto;
}
.noindex-seo-badge-item .noindex-seo-directive-icon {
margin-inline-end: 2px;
}
.directive-label { .directive-label {
font-family: 'Courier New', monospace; font-family: 'Courier New', monospace;
font-size: 13px; font-size: 13px;

View file

@ -1,8 +1,54 @@
== Changelog == == Changelog ==
= 3.5.0 =
_Release date: 2026-11-03_
**Highlights**
* WooCommerce special-page contexts (TODO #8): dedicated directives for the WooCommerce 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 narrowed to WordPress 7.0 - 7.2 and PHP 8.3 - 8.6: `Requires at least` raised from 4.7 to 7.0, `Requires PHP` raised from 5.6 to 8.3, `Tested up to` set to WordPress 7.2 (verified on 7.2-beta3) and PHP support documented through 8.6 (verified on 8.6.0RC3).
* Fixed `wp noindex-seo list`, which fatalled on every real WP-CLI invocation since 3.4.0 (nonexistent static API call; `--context` filter renamed to `--only` to avoid WP-CLI 2.11+'s reserved global flag).
* Directive icons modernized for the SVG era: on WordPress 7.2+ the five directive icons render through the core Icons API — the same system WordPress 7.2 uses for its own admin chrome — while WordPress 7.0 - 7.1 keep the legacy emoji glyphs as a retrocompatible fallback.
**Added**
* **WooCommerce contexts** (`woo_cart`, `woo_checkout`, `woo_myaccount`): the Cart, Checkout and My Account pages are regular pages that conventionally deserve noindex but previously fell into the generic `page` bucket. Each now has its own context with all five directives, a "WooCommerce" section on the SEO Settings tab (rendered only when the store pages are configured), and Recommended badges — the three contexts also joined the "Apply Recommended Defaults" set (now 15 contexts).
* Detection is option-driven (`woocommerce_cart_page_id`, `woocommerce_checkout_page_id`, `woocommerce_myaccount_page_id`): no WooCommerce class or function dependency; without WooCommerce the contexts are inert. My Account endpoints (order history, addresses) and the checkout order-pay / order-received endpoints share their parent page's ID, so they are covered automatically.
* Precedence: the dedicated contexts run before the generic `page` context on the front-end and in `/wp-json/noindex-seo/v1/effective`, so a Woo page with directives gets them instead of the page-level ones; with no dedicated directives the page context still applies.
* Sitemap: special pages whose context has `noindex=1` drop out of the pages sitemap even when the `page` context is not noindexed.
* **SVG directive icons (retrocompatible).** The five robots-directive icons render as color-adaptive 16px SVGs through the WordPress Icons API (`wp_register_icon()` / `wp_get_icon()`), registered in a private `noindex-seo` icon collection — everywhere they appear: the settings grid, the post meta box, Quick Edit, and the post and taxonomy list-table Robots columns. The SVG path is gated to WordPress 7.2+, whose icon sanitizer understands the stroke-based designs (rect/circle, `stroke*` attributes) and whose registry supports private collections; on WordPress 7.0 - 7.1 the legacy emoji glyphs remain (7.1's narrower sanitizer would strip the SVGs to unstyled fragments), so rendering stays correct on every supported version — and consistent on every OS, unlike the emoji (which each platform draws differently). Follows the core direction of replacing admin dashicons with SVG (wordpress-develop#12270, landed in WP 7.2's admin chrome). The Quick Edit label strings dropped their emoji prefix; the plain directive names were already in the translation catalogs, so no translations were lost.
**Changed**
* Compatibility window: WordPress 7.0 - 7.2 (was 4.7 - 7.2), PHP 8.3 - 8.6 (was 5.6 - 8.5). The full-range PHPCompatibility scan (PHP 5.6 - 8.6) still passes clean — the code keeps its PHP 5.6-parseable syntax — but the declared and supported window is now 7.0 / 8.3 and up, per the product support policy. The runtime guards for WordPress APIs older than 7.0 remain in place as harmless no-ops and may be removed in 4.0.
* Tooling aligned with the new window: `phpcs.xml` `testVersion` 8.3-8.6 and `minimum_supported_wp_version` 7.0, `phpstan.neon` `phpVersion` 80300, `bin/preflight.sh` gates scanning the declared range, `composer.json` PHP constraint `>=8.3`, and the obsolete `WPCompat.*` PHPStan ignores removed (every guarded hook exists since 7.0).
* Development dependencies refreshed via `composer update`: PHPUnit 9.6.38, PHPStan 2.3.5, wordpress-stubs 7.1.2 (no CVEs; `composer audit` clean).
* The "Apply Recommended Defaults" set grew from 12 to 15 contexts (button title and description updated; existing configurations are untouched — the button is opt-in).
**Fixed**
* `wp noindex-seo list` was broken on real WP-CLI installs since 3.4.0: the output call went to `WP_CLI\Utils::format_items()` (a static method that does not exist — the real API is the namespaced `WP_CLI\Utils\format_items()` function), and the `--context` filter parameter collided with the `--context` global flag reserved by WP-CLI 2.11+, so the value never reached the handler. The filter is now `--only=<context>` and the command renders through the real function API. The unit-test stub was aligned with the real WP-CLI surface (namespaced function, not a Utils class), and every `wp noindex-seo` command was smoke-tested against the real WP-CLI 2.12 phar.
**Security**
* No security changes; the new contexts reuse the consolidated settings storage and existing sanitization paths, and PHPCS/PHPStan/composer audit stay clean.
**Compatibility**
* WordPress: 7.0 - 7.2
* PHP: 8.3 - 8.6
**Tests**
* PHPUnit: 9.6.38 (198 tests, 817 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 icon registration, SVG rendering, emoji fallback and admin-markup tests.
* PHPCompatibility: 0 errors on the declared range 8.3-8.6 and on the full review range 5.6-8.6.
* PHPCS (WordPress-Core, WordPress-Docs, WordPress-Extra) and PHPStan level 9: 0 errors.
= 3.4.0 = = 3.4.0 =
_Release date: 2026-09-19_ _Release date: 2026-09-19_
**Highlights** **Highlights**
* WP-CLI support (TODO #7): a `wp noindex-seo` command namespace with list, set, unset, export, import and bulk per-post overrides — automation-friendly and scaling past the ~200-post ceiling of the bulk UI. * WP-CLI support (TODO #7): a `wp noindex-seo` command namespace with list, set, unset, export, import and bulk per-post overrides — automation-friendly and scaling past the ~200-post ceiling of the bulk UI.

Binary file not shown.

View file

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: noindex SEO 3.1.3\n" "Project-Id-Version: noindex SEO 3.1.3\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/noindex-seo\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/noindex-seo\n"
"POT-Creation-Date: 2026-08-17T19:24:59+00:00\n" "POT-Creation-Date: 2026-11-03T15:21:45+00:00\n"
"PO-Revision-Date: 2026-08-17T20:00+00:00\n" "PO-Revision-Date: 2026-08-17T20:00+00:00\n"
"Last-Translator: ROBOTSTXT <https://www.robotstxt.es/>\n" "Last-Translator: ROBOTSTXT <https://www.robotstxt.es/>\n"
"Language-Team: Catalan — https://translate.wordpress.org/locale/ca/default/\n" "Language-Team: Catalan — https://translate.wordpress.org/locale/ca/default/\n"
@ -18,7 +18,7 @@ msgstr ""
"X-Domain: noindex-seo\n" "X-Domain: noindex-seo\n"
#. Plugin Name of the plugin #. Plugin Name of the plugin
#: noindex-seo.php noindex-seo.php:1405 noindex-seo.php:1406 #: noindex-seo.php noindex-seo.php:1657 noindex-seo.php:1658
msgid "noindex SEO" msgid "noindex SEO"
msgstr "noindex SEO" msgstr "noindex SEO"
@ -48,40 +48,40 @@ msgstr "ROBOTSTXT"
msgid "https://www.robotstxt.software/" msgid "https://www.robotstxt.software/"
msgstr "https://www.robotstxt.software/" msgstr "https://www.robotstxt.software/"
#: noindex-seo.php:1036 #: noindex-seo.php:1080
msgid "Post ID to compute effective directives for." msgid "Post ID to compute effective directives for."
msgstr "ID de l'entrada per a calcular les directives efectives." msgstr "ID de l'entrada per a calcular les directives efectives."
#: noindex-seo.php:1065 #: noindex-seo.php:1107
msgid "You do not have permission to read the noindex SEO settings." 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." msgstr "No teniu permís per a llegir els ajustaments de noindex SEO."
#: noindex-seo.php:1118 #: noindex-seo.php:1157
msgid "You do not have permission to read directives for this post." 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." msgstr "No teniu permís per a llegir les directives d'aquesta entrada."
#: noindex-seo.php:1176 #: noindex-seo.php:1217
msgid "No post exists with that post_id." msgid "No post exists with that post_id."
msgstr "No existeix cap entrada amb aquest post_id." msgstr "No existeix cap entrada amb aquest post_id."
#: noindex-seo.php:1301 #: noindex-seo.php:1508
msgid "Settings saved successfully!" msgid "Settings saved successfully!"
msgstr "S'han desat els ajustaments correctament." msgstr "S'han desat els ajustaments correctament."
#: noindex-seo.php:1302 #: noindex-seo.php:1509
msgid "Expand All" msgid "Expand All"
msgstr "Expandeix-ho tot" msgstr "Expandeix-ho tot"
#: noindex-seo.php:1303 #: noindex-seo.php:1510
msgid "Collapse All" msgid "Collapse All"
msgstr "Redueix-ho tot" msgstr "Redueix-ho tot"
#: noindex-seo.php:1385 #: noindex-seo.php:1590
msgid "Settings" msgid "Settings"
msgstr "Ajustaments" msgstr "Ajustaments"
#. translators: plugin name. #. translators: plugin name.
#: noindex-seo.php:1627 #: noindex-seo.php:1883
#, php-format #, php-format
msgid "" msgid ""
"noindex SEO has detected that %s is active. This may cause conflicts. Please " "noindex SEO has detected that %s is active. This may cause conflicts. Please "
@ -90,19 +90,32 @@ msgstr ""
"noindex SEO ha detectat que %s és actiu. Això pot causar conflictes. " "noindex SEO ha detectat que %s és actiu. Això pot causar conflictes. "
"Configureu les opcions en conseqüència." "Configureu les opcions en conseqüència."
#: noindex-seo.php:1659 noindex-seo.php:1760 #. translators: %s: comma-separated list of wp_robots callbacks.
#: noindex-seo.php:1904
#, 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 ha detectat que un altre complement o tema està afegint "
"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
msgid "Permission denied." msgid "Permission denied."
msgstr "S'ha denegat el permís." msgstr "S'ha denegat el permís."
#: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91 #: noindex-seo.php:2886 noindex-seo.php:3210 assets/js/editor-sidebar.js:91
msgid "Search Engine Visibility" msgid "Search Engine Visibility"
msgstr "Visibilitat als cercadors" msgstr "Visibilitat als cercadors"
#: noindex-seo.php:1966 noindex-seo.php:2597 assets/js/editor-sidebar.js:102 #: noindex-seo.php:2938 noindex-seo.php:3545 assets/js/editor-sidebar.js:102
msgid "Override global settings" msgid "Override global settings"
msgstr "Sobreescriu els ajustaments globals" msgstr "Sobreescriu els ajustaments globals"
#: noindex-seo.php:1971 #: noindex-seo.php:2943
msgid "" msgid ""
"When enabled, these directives will override the global settings for this " "When enabled, these directives will override the global settings for this "
"specific content." "specific content."
@ -110,104 +123,103 @@ msgstr ""
"En activar-se, aquestes directrius sobreescriuran els ajustaments globals " "En activar-se, aquestes directrius sobreescriuran els ajustaments globals "
"per a aquest contingut específic." "per a aquest contingut específic."
#: noindex-seo.php:1978 #: noindex-seo.php:2950
msgid "Prevent indexing" msgid "Prevent indexing"
msgstr "Evita la indexació" msgstr "Evita la indexació"
#: noindex-seo.php:1983 #: noindex-seo.php:2955
msgid "Prevent link following" msgid "Prevent link following"
msgstr "Evita el seguiment d'enllaços" msgstr "Evita el seguiment d'enllaços"
#: noindex-seo.php:1988 #: noindex-seo.php:2960
msgid "Prevent caching" msgid "Prevent caching"
msgstr "Evita la memòria cau" msgstr "Evita la memòria cau"
#: noindex-seo.php:1993 #: noindex-seo.php:2965
msgid "Prevent snippets" msgid "Prevent snippets"
msgstr "Evita els fragments" msgstr "Evita els fragments"
#: noindex-seo.php:1998 assets/js/editor-sidebar.js:203 #: noindex-seo.php:2970 assets/js/editor-sidebar.js:203
msgid "Prevent image indexing" msgid "Prevent image indexing"
msgstr "Evita la indexació d'imatges" msgstr "Evita la indexació d'imatges"
#: noindex-seo.php:2006 #: noindex-seo.php:2978
msgid "Effective Directives:" msgid "Effective Directives:"
msgstr "Directrius efectives:" msgstr "Directrius efectives:"
#: noindex-seo.php:2031 #: noindex-seo.php:3003
msgid "Override active:" msgid "Override active:"
msgstr "Sobreescriptura activa:" msgstr "Sobreescriptura activa:"
#: noindex-seo.php:2036 #: noindex-seo.php:3008
msgid "Override enabled but no directives selected" msgid "Override enabled but no directives selected"
msgstr "Sobreescriptura activada però sense directrius seleccionades" msgstr "Sobreescriptura activada però sense directrius seleccionades"
#: noindex-seo.php:2042 #: noindex-seo.php:3014
msgid "Global settings:" msgid "Global settings:"
msgstr "Ajustaments globals:" msgstr "Ajustaments globals:"
#: noindex-seo.php:2047 #: noindex-seo.php:3019
msgid "No restrictions (indexable)" msgid "No restrictions (indexable)"
msgstr "Sense restriccions (indexable)" msgstr "Sense restriccions (indexable)"
#: noindex-seo.php:2242 #: noindex-seo.php:3214
msgid "Override global settings for this term" msgid "Override global settings for this term"
msgstr "Sobreescriu els ajustaments globals d'aquest terme" msgstr "Sobreescriu els ajustaments globals d'aquest terme"
#: noindex-seo.php:2255 #: noindex-seo.php:3227
msgid "" msgid ""
"When override is enabled, the directives checked above apply to this term's " "When override is enabled, the directives checked above apply to this term's "
"archive page and take precedence over the global category / tag / archive " "archive page and take precedence over the global category / tag / archive "
"settings." "settings."
msgstr "" msgstr ""
"Quan l'opció de sobreescriptura està activada, les directives marcades a" "Quan l'opció de sobreescriptura està activada, les directives marcades "
"sobre s'apliquen a la pàgina d'arxiu d'aquest terme i prevalen sobre els" "asobre s'apliquen a la pàgina d'arxiu d'aquest terme i prevalen sobre "
"ajustaments globals de categories, etiquetes i arxius." "elsajustaments globals de categories, etiquetes i arxius."
#: noindex-seo.php:3322 noindex-seo.php:3328 noindex-seo.php:3443
#: noindex-seo.php:2350 noindex-seo.php:2356 noindex-seo.php:2488 #: noindex-seo.php:3449
#: noindex-seo.php:2494
msgid "Robots" msgid "Robots"
msgstr "Robots" msgstr "Robots"
#: noindex-seo.php:2417 noindex-seo.php:2543 #: noindex-seo.php:3389 noindex-seo.php:3498
msgid "Override (none)" msgid "Override (none)"
msgstr "Sobreescriptura (cap)" msgstr "Sobreescriptura (cap)"
#: noindex-seo.php:2593 #: noindex-seo.php:3541
msgid "Robots Directives" msgid "Robots Directives"
msgstr "Directrius Robots" msgstr "Directrius Robots"
#: noindex-seo.php:2602 #: noindex-seo.php:3551 noindex-seo.php:4285 assets/js/editor-sidebar.js:142
msgid "🔍 noindex" msgid "noindex"
msgstr "🔍 noindex" msgstr "noindex"
#: noindex-seo.php:2606 #: noindex-seo.php:3556 noindex-seo.php:4289 assets/js/editor-sidebar.js:157
msgid "🔗 nofollow" msgid "nofollow"
msgstr "🔗 nofollow" msgstr "nofollow"
#: noindex-seo.php:2610 #: noindex-seo.php:3561 noindex-seo.php:4293 assets/js/editor-sidebar.js:172
msgid "💾 noarchive" msgid "noarchive"
msgstr "💾 noarchive" msgstr "noarchive"
#: noindex-seo.php:2614 #: noindex-seo.php:3566 noindex-seo.php:4297 assets/js/editor-sidebar.js:187
msgid "📄 nosnippet" msgid "nosnippet"
msgstr "📄 nosnippet" msgstr "nosnippet"
#: noindex-seo.php:2618 #: noindex-seo.php:3571 noindex-seo.php:4301 assets/js/editor-sidebar.js:202
msgid "🖼️ noimageindex" msgid "noimageindex"
msgstr "🖼️ noimageindex" msgstr "noimageindex"
#: noindex-seo.php:2729 #: noindex-seo.php:3682
msgid "Enable Robots Override" msgid "Enable Robots Override"
msgstr "Activa la sobreescriptura Robots" msgstr "Activa la sobreescriptura Robots"
#: noindex-seo.php:2730 #: noindex-seo.php:3683
msgid "Disable Robots Override" msgid "Disable Robots Override"
msgstr "Desactiva la sobreescriptura Robots" msgstr "Desactiva la sobreescriptura Robots"
#. translators: %d: Number of posts updated #. translators: %d: Number of posts updated
#: noindex-seo.php:2827 #: noindex-seo.php:3780
#, php-format #, php-format
msgid "Robots override enabled for %d post." msgid "Robots override enabled for %d post."
msgid_plural "Robots override enabled for %d posts." msgid_plural "Robots override enabled for %d posts."
@ -215,320 +227,345 @@ msgstr[0] "S'ha activat la sobreescriptura Robots per a %d entrada."
msgstr[1] "S'ha activat la sobreescriptura Robots per a %d entrades." msgstr[1] "S'ha activat la sobreescriptura Robots per a %d entrades."
#. translators: %d: Number of posts updated #. translators: %d: Number of posts updated
#: noindex-seo.php:2848 #: noindex-seo.php:3801
#, php-format #, php-format
msgid "Robots override disabled for %d post." msgid "Robots override disabled for %d post."
msgid_plural "Robots override disabled for %d posts." msgid_plural "Robots override disabled for %d posts."
msgstr[0] "S'ha desactivat la sobreescriptura Robots per a %d entrada." msgstr[0] "S'ha desactivat la sobreescriptura Robots per a %d entrada."
msgstr[1] "S'ha desactivat la sobreescriptura Robots per a %d entrades." msgstr[1] "S'ha desactivat la sobreescriptura Robots per a %d entrades."
#: noindex-seo.php:2897 #: noindex-seo.php:3850
msgid "All robots settings" msgid "All robots settings"
msgstr "Tots els ajustaments robots" msgstr "Tots els ajustaments robots"
#: noindex-seo.php:2899 #: noindex-seo.php:3852
msgid "With override" msgid "With override"
msgstr "Amb sobreescriptura" msgstr "Amb sobreescriptura"
#: noindex-seo.php:2902 #: noindex-seo.php:3855
msgid "Without override" msgid "Without override"
msgstr "Sense sobreescriptura" msgstr "Sense sobreescriptura"
#: noindex-seo.php:3016 #: noindex-seo.php:3974
msgid "You do not have sufficient permissions to access this page." msgid "You do not have sufficient permissions to access this page."
msgstr "No teniu permisos suficients per a accedir a aquesta pàgina." msgstr "No teniu permisos suficients per a accedir a aquesta pàgina."
#: noindex-seo.php:3017 #: noindex-seo.php:3975
msgid "Permission Denied" msgid "Permission Denied"
msgstr "Permís denegat" msgstr "Permís denegat"
#: noindex-seo.php:3039 #: noindex-seo.php:3987
msgid "General"
msgstr "General"
#: noindex-seo.php:3988
msgid "SEO Settings"
msgstr "Ajustaments SEO"
#: noindex-seo.php:3989
msgid "Import / Export"
msgstr "Importació i exportació"
#: noindex-seo.php:4009
msgid "Main Pages" msgid "Main Pages"
msgstr "Pàgines principals" msgstr "Pàgines principals"
#: noindex-seo.php:3042 #: noindex-seo.php:4012
msgid "Front Page" msgid "Front Page"
msgstr "Pàgina d'inici" msgstr "Pàgina d'inici"
#: noindex-seo.php:3043 noindex-seo.php:3050 noindex-seo.php:3062 #: noindex-seo.php:4013 noindex-seo.php:4020 noindex-seo.php:4032
#: noindex-seo.php:3068 noindex-seo.php:3075 noindex-seo.php:3081 #: noindex-seo.php:4038 noindex-seo.php:4045 noindex-seo.php:4051
#: noindex-seo.php:3092 noindex-seo.php:3098 noindex-seo.php:3109 #: noindex-seo.php:4062 noindex-seo.php:4068 noindex-seo.php:4079
#: noindex-seo.php:3115 noindex-seo.php:3121 noindex-seo.php:3127 #: noindex-seo.php:4085 noindex-seo.php:4091 noindex-seo.php:4097
#: noindex-seo.php:3133 noindex-seo.php:3144 noindex-seo.php:3150 #: noindex-seo.php:4103 noindex-seo.php:4114 noindex-seo.php:4120
#: noindex-seo.php:3156 noindex-seo.php:3167 noindex-seo.php:3178 #: noindex-seo.php:4126 noindex-seo.php:4137 noindex-seo.php:4148
#: noindex-seo.php:3189 noindex-seo.php:3200 noindex-seo.php:3206 #: noindex-seo.php:4159 noindex-seo.php:4170 noindex-seo.php:4176
#: noindex-seo.php:3217 noindex-seo.php:3241 noindex-seo.php:3519 #: noindex-seo.php:4187 noindex-seo.php:4211 noindex-seo.php:4252
#: noindex-seo.php:4578
msgid "Recommended" msgid "Recommended"
msgstr "Recomanat" msgstr "Recomanat"
#: noindex-seo.php:3045 #: noindex-seo.php:4015
msgid "Block the indexing of the site's front page." msgid "Block the indexing of the site's front page."
msgstr "Bloqueja la indexació de la pàgina d'inici del lloc." msgstr "Bloqueja la indexació de la pàgina d'inici del lloc."
#: noindex-seo.php:3049 #: noindex-seo.php:4019
msgid "Home" msgid "Home"
msgstr "Inici" msgstr "Inici"
#: noindex-seo.php:3052 #: noindex-seo.php:4022
msgid "Block the indexing of the site's home page." msgid "Block the indexing of the site's home page."
msgstr "Bloqueja la indexació de la pàgina principal del lloc." msgstr "Bloqueja la indexació de la pàgina principal del lloc."
#: noindex-seo.php:3058 #: noindex-seo.php:4028
msgid "Pages and Posts" msgid "Pages and Posts"
msgstr "Pàgines i entrades" msgstr "Pàgines i entrades"
#: noindex-seo.php:3061 #: noindex-seo.php:4031
msgid "Page" msgid "Page"
msgstr "Pàgina" msgstr "Pàgina"
#: noindex-seo.php:3064 #: noindex-seo.php:4034
msgid "Block the indexing of site pages." msgid "Block the indexing of site pages."
msgstr "Bloqueja la indexació de les pàgines del lloc." msgstr "Bloqueja la indexació de les pàgines del lloc."
#: noindex-seo.php:3067 #: noindex-seo.php:4037
msgid "Privacy Policy" msgid "Privacy Policy"
msgstr "Política de privadesa" msgstr "Política de privadesa"
#: noindex-seo.php:3070 #: noindex-seo.php:4040
msgid "Block the indexing of the privacy policy page." msgid "Block the indexing of the privacy policy page."
msgstr "Bloqueja la indexació de la pàgina de política de privadesa." msgstr "Bloqueja la indexació de la pàgina de política de privadesa."
#: noindex-seo.php:3074 #: noindex-seo.php:4044
msgid "Single Post" msgid "Single Post"
msgstr "Entrada individual" msgstr "Entrada individual"
#: noindex-seo.php:3077 #: noindex-seo.php:4047
msgid "Block the indexing of individual posts." msgid "Block the indexing of individual posts."
msgstr "Bloqueja la indexació d'entrades individuals." msgstr "Bloqueja la indexació d'entrades individuals."
#: noindex-seo.php:3080 #: noindex-seo.php:4050
msgid "Singular" msgid "Singular"
msgstr "Singular" msgstr "Singular"
#: noindex-seo.php:3083 #: noindex-seo.php:4053
msgid "Block the indexing of any singular content (post or page)." 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:3088 #: noindex-seo.php:4058
msgid "Taxonomies" msgid "Taxonomies"
msgstr "Taxonomies" msgstr "Taxonomies"
#: noindex-seo.php:3091 #: noindex-seo.php:4061
msgid "Category" msgid "Category"
msgstr "Categoria" msgstr "Categoria"
#: noindex-seo.php:3094 #: noindex-seo.php:4064
msgid "Block the indexing of category archive pages." msgid "Block the indexing of category archive pages."
msgstr "Bloqueja la indexació de les pàgines d'arxiu de categories." msgstr "Bloqueja la indexació de les pàgines d'arxiu de categories."
#: noindex-seo.php:3097 #: noindex-seo.php:4067
msgid "Tag" msgid "Tag"
msgstr "Etiqueta" msgstr "Etiqueta"
#: noindex-seo.php:3100 #: noindex-seo.php:4070
msgid "Block the indexing of tag archive pages." msgid "Block the indexing of tag archive pages."
msgstr "Bloqueja la indexació de les pàgines d'arxiu d'etiquetes." msgstr "Bloqueja la indexació de les pàgines d'arxiu d'etiquetes."
#: noindex-seo.php:3105 #: noindex-seo.php:4075
msgid "Date Archives" msgid "Date Archives"
msgstr "Arxius de data" msgstr "Arxius de data"
#: noindex-seo.php:3108 #: noindex-seo.php:4078
msgid "Date" msgid "Date"
msgstr "Data" msgstr "Data"
#: noindex-seo.php:3111 #: noindex-seo.php:4081
msgid "Block the indexing of any date-based archive page." msgid "Block the indexing of any date-based archive page."
msgstr "Bloqueja la indexació de qualsevol pàgina d'arxiu basada en data." msgstr "Bloqueja la indexació de qualsevol pàgina d'arxiu basada en data."
#: noindex-seo.php:3114 #: noindex-seo.php:4084
msgid "Day" msgid "Day"
msgstr "Dia" msgstr "Dia"
#: noindex-seo.php:3117 #: noindex-seo.php:4087
msgid "Block the indexing of daily archive pages." msgid "Block the indexing of daily archive pages."
msgstr "Bloqueja la indexació d'arxius diaris." msgstr "Bloqueja la indexació d'arxius diaris."
#: noindex-seo.php:3120 #: noindex-seo.php:4090
msgid "Month" msgid "Month"
msgstr "Mes" msgstr "Mes"
#: noindex-seo.php:3123 #: noindex-seo.php:4093
msgid "Block the indexing of monthly archive pages." msgid "Block the indexing of monthly archive pages."
msgstr "Bloqueja la indexació d'arxius mensuals." msgstr "Bloqueja la indexació d'arxius mensuals."
#: noindex-seo.php:3126 #: noindex-seo.php:4096
msgid "Time" msgid "Time"
msgstr "Hora" msgstr "Hora"
#: noindex-seo.php:3129 #: noindex-seo.php:4099
msgid "Block the indexing of time-based archive pages." msgid "Block the indexing of time-based archive pages."
msgstr "Bloqueja la indexació d'arxius basats en hora." msgstr "Bloqueja la indexació d'arxius basats en hora."
#: noindex-seo.php:3132 #: noindex-seo.php:4102
msgid "Year" msgid "Year"
msgstr "Any" msgstr "Any"
#: noindex-seo.php:3135 #: noindex-seo.php:4105
msgid "Block the indexing of yearly archive pages." msgid "Block the indexing of yearly archive pages."
msgstr "Bloqueja la indexació d'arxius anuals." msgstr "Bloqueja la indexació d'arxius anuals."
#: noindex-seo.php:3140 #: noindex-seo.php:4110
msgid "Archives" msgid "Archives"
msgstr "Arxius" msgstr "Arxius"
#: noindex-seo.php:3143 #: noindex-seo.php:4113
msgid "Archive" msgid "Archive"
msgstr "Arxiu" msgstr "Arxiu"
#: noindex-seo.php:3146 #: noindex-seo.php:4116
msgid "Block the indexing of any type of archive page." msgid "Block the indexing of any type of archive page."
msgstr "Bloqueja la indexació de qualsevol tipus de pàgina d'arxiu." msgstr "Bloqueja la indexació de qualsevol tipus de pàgina d'arxiu."
#: noindex-seo.php:3149 #: noindex-seo.php:4119
msgid "Author" msgid "Author"
msgstr "Autor" msgstr "Autor"
#: noindex-seo.php:3152 #: noindex-seo.php:4122
msgid "Block the indexing of author archive pages." msgid "Block the indexing of author archive pages."
msgstr "Bloqueja la indexació de les pàgines d'arxiu d'autor." msgstr "Bloqueja la indexació de les pàgines d'arxiu d'autor."
#: noindex-seo.php:3155 #: noindex-seo.php:4125
msgid "Post Type Archive" msgid "Post Type Archive"
msgstr "Arxiu de tipus de contingut" msgstr "Arxiu de tipus de contingut"
#: noindex-seo.php:3158 #: noindex-seo.php:4128
msgid "Block the indexing of post type archive pages." msgid "Block the indexing of post type archive pages."
msgstr "Bloqueja la indexació de les pàgines d'arxiu de tipus de contingut." msgstr "Bloqueja la indexació de les pàgines d'arxiu de tipus de contingut."
#: noindex-seo.php:3163 #: noindex-seo.php:4133
msgid "Pagination" msgid "Pagination"
msgstr "Paginació" msgstr "Paginació"
#: noindex-seo.php:3166 #: noindex-seo.php:4136
msgid "Paginated Pages" msgid "Paginated Pages"
msgstr "Pàgines paginades" msgstr "Pàgines paginades"
#: noindex-seo.php:3169 #: noindex-seo.php:4139
msgid "Block the indexing of pagination pages (page 2, 3, etc.)." 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.)." msgstr "Bloqueja la indexació de les pàgines de paginació (pàgina 2, 3, etc.)."
#: noindex-seo.php:3174 #: noindex-seo.php:4144
msgid "Search" msgid "Search"
msgstr "Cerca" msgstr "Cerca"
#: noindex-seo.php:3177 #: noindex-seo.php:4147
msgid "Search Results" msgid "Search Results"
msgstr "Resultats de cerca" msgstr "Resultats de cerca"
#: noindex-seo.php:3180 #: noindex-seo.php:4150
msgid "Block the indexing of search result pages." msgid "Block the indexing of search result pages."
msgstr "Bloqueja la indexació de les pàgines de resultats de cerca." msgstr "Bloqueja la indexació de les pàgines de resultats de cerca."
#: noindex-seo.php:3185 #: noindex-seo.php:4155
msgid "Attachments" msgid "Attachments"
msgstr "Adjunts" msgstr "Adjunts"
#: noindex-seo.php:3188 #: noindex-seo.php:4158
msgid "Attachment Pages" msgid "Attachment Pages"
msgstr "Pàgines d'adjunts" msgstr "Pàgines d'adjunts"
#: noindex-seo.php:3191 #: noindex-seo.php:4161
msgid "" msgid ""
"Block the indexing of attachment pages (does not affect the file itself)." "Block the indexing of attachment pages (does not affect the file itself)."
msgstr "" msgstr ""
"Bloqueja la indexació de les pàgines d'adjunts (no afecta el fitxer en si)." "Bloqueja la indexació de les pàgines d'adjunts (no afecta el fitxer en si)."
#: noindex-seo.php:3196 #: noindex-seo.php:4166
msgid "Previews" msgid "Previews"
msgstr "Previsualitzacions" msgstr "Previsualitzacions"
#: noindex-seo.php:3199 #: noindex-seo.php:4169
msgid "Customize Preview" msgid "Customize Preview"
msgstr "Previsualització del personalitzador" msgstr "Previsualització del personalitzador"
#: noindex-seo.php:3202 #: noindex-seo.php:4172
msgid "Block the indexing when content is in customize preview mode." msgid "Block the indexing when content is in customize preview mode."
msgstr "" msgstr ""
"Bloqueja la indexació quan el contingut és en mode de previsualització del " "Bloqueja la indexació quan el contingut és en mode de previsualització del "
"personalitzador." "personalitzador."
#: noindex-seo.php:3205 #: noindex-seo.php:4175
msgid "Post Preview" msgid "Post Preview"
msgstr "Previsualització de l'entrada" msgstr "Previsualització de l'entrada"
#: noindex-seo.php:3208 #: noindex-seo.php:4178
msgid "Block the indexing when viewing post previews." msgid "Block the indexing when viewing post previews."
msgstr "Bloqueja la indexació en veure previsualitzacions d'entrades." msgstr "Bloqueja la indexació en veure previsualitzacions d'entrades."
#: noindex-seo.php:3213 #: noindex-seo.php:4183
msgid "Error Pages" msgid "Error Pages"
msgstr "Pàgines d'error" msgstr "Pàgines d'error"
#: noindex-seo.php:3216 #: noindex-seo.php:4186
msgid "Error 404" msgid "Error 404"
msgstr "Error 404" msgstr "Error 404"
#: noindex-seo.php:3219 #: noindex-seo.php:4189
msgid "Block the indexing of 404 error pages." msgid "Block the indexing of 404 error pages."
msgstr "Bloqueja la indexació de les pàgines d'error 404." msgstr "Bloqueja la indexació de les pàgines d'error 404."
#. translators: %s: post type singular name. #. translators: %s: post type singular name.
#: noindex-seo.php:3244 #: noindex-seo.php:4214
#, php-format #, php-format
msgid "Block the indexing of individual %s." msgid "Block the indexing of individual %s."
msgstr "Bloqueja la indexació de %s individuals." msgstr "Bloqueja la indexació de %s individuals."
#: noindex-seo.php:3248 #: noindex-seo.php:4218
msgid "Custom Post Types" msgid "Custom Post Types"
msgstr "Tipus de contingut personalitzats" msgstr "Tipus de contingut personalitzats"
#: noindex-seo.php:3273 assets/js/editor-sidebar.js:142 #: noindex-seo.php:4231
msgid "noindex" msgid "Cart"
msgstr "noindex" msgstr "Cistella"
#: noindex-seo.php:3274 #: noindex-seo.php:4232
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
msgid "Checkout"
msgstr "Pagament"
#: noindex-seo.php:4236
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
msgid "My Account"
msgstr "El meu compte"
#: noindex-seo.php:4240
msgid ""
"Block the indexing of the WooCommerce customer account pages (including "
"order history and address endpoints)."
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
msgid "WooCommerce"
msgstr "WooCommerce"
#: noindex-seo.php:4286
msgid "Prevent search engines from indexing this page" msgid "Prevent search engines from indexing this page"
msgstr "Evita que els cercadors indexin aquesta pàgina" msgstr "Evita que els cercadors indexin aquesta pàgina"
#: noindex-seo.php:3278 assets/js/editor-sidebar.js:157 #: noindex-seo.php:4290
msgid "nofollow"
msgstr "nofollow"
#: noindex-seo.php:3279
msgid "Prevent search engines from following links on this page" msgid "Prevent search engines from following links on this page"
msgstr "Evita que els cercadors segueixin els enllaços en aquesta pàgina" msgstr "Evita que els cercadors segueixin els enllaços en aquesta pàgina"
#: noindex-seo.php:3283 assets/js/editor-sidebar.js:172 #: noindex-seo.php:4294
msgid "noarchive"
msgstr "noarchive"
#: noindex-seo.php:3284
msgid "Prevent search engines from showing a cached version" msgid "Prevent search engines from showing a cached version"
msgstr "Evita que els cercadors mostrin una versió en memòria cau" msgstr "Evita que els cercadors mostrin una versió en memòria cau"
#: noindex-seo.php:3288 assets/js/editor-sidebar.js:187 #: noindex-seo.php:4298
msgid "nosnippet"
msgstr "nosnippet"
#: noindex-seo.php:3289
msgid "Prevent search engines from showing text snippets" msgid "Prevent search engines from showing text snippets"
msgstr "Evita que els cercadors mostrin fragments de text" msgstr "Evita que els cercadors mostrin fragments de text"
#: noindex-seo.php:3293 assets/js/editor-sidebar.js:202 #: noindex-seo.php:4302
msgid "noimageindex"
msgstr "noimageindex"
#: noindex-seo.php:3294
msgid "Prevent search engines from indexing images" msgid "Prevent search engines from indexing images"
msgstr "Evita que els cercadors indexin imatges" msgstr "Evita que els cercadors indexin imatges"
#: noindex-seo.php:3301 #: noindex-seo.php:4308
msgid "noindex SEO Settings" msgid "noindex SEO Settings"
msgstr "Ajustaments de noindex SEO" msgstr "Ajustaments de noindex SEO"
#: noindex-seo.php:3302 #: noindex-seo.php:4309
msgid "" msgid ""
"Control how search engines index and display your WordPress content using " "Control how search engines index and display your WordPress content using "
"robots directives." "robots directives."
@ -536,71 +573,55 @@ msgstr ""
"Controla com els cercadors indexen i mostren el vostre contingut de " "Controla com els cercadors indexen i mostren el vostre contingut de "
"WordPress fent servir directrius robots." "WordPress fent servir directrius robots."
#: noindex-seo.php:3313 #: noindex-seo.php:4320
msgid "" msgid ""
"Recommended defaults applied. Review the changes below and click \"Save " "Recommended defaults applied. Review the changes below and click \"Save "
"Changes\" to keep them, or uncheck anything you do not want." "Changes\" to keep them, or uncheck anything you do not want."
msgstr "" msgstr ""
"Valors recomanats aplicats. Reviseu els canvis de baix i feu clic a «Desa" "Valors recomanats aplicats. Reviseu els canvis de baix i feu clic a «Desaels "
"els canvis» per a conservar-los, o desmarqueu el que no vulgueu." "canvis» per a conservar-los, o desmarqueu el que no vulgueu."
#: noindex-seo.php:4328
msgid "Settings imported successfully."
msgstr "S'han importat els ajustaments correctament."
#: noindex-seo.php:3329 #: noindex-seo.php:4335
msgid "Apply Recommended Defaults"
msgstr "Aplica els valors recomanats"
#: noindex-seo.php:3334
msgid "Enable all directives for the 12 contexts flagged as recommended."
msgstr "Activa totes les directives en els 12 contextos marcats com a recomanats."
#: noindex-seo.php:3339
msgid "" msgid ""
"Enables all 5 directives on the 12 contexts flagged \"Recommended\" (privacy " "The settings file could not be imported: it is missing, too large, or not a "
"policy, date archives, pagination, search results, attachment pages, " "valid noindex SEO export."
"previews, 404). Review and save."
msgstr "" msgstr ""
"Activa les 5 directives en els 12 contextes marcats com a «Recomanat»" "No s'ha pogut importar el fitxer d'ajustaments: no existeix, és massa gran o "
"(política de privadesa, arxius de data, paginació, resultats de cerca," "no és una exportació vàlida de noindex SEO."
"pàgines d'adjunts, previsualitzacions i 404). Reviseu i deseu."
#: noindex-seo.php:4343
msgid "Settings sections"
msgstr "Seccions dels ajustaments"
#: noindex-seo.php:3352 #: noindex-seo.php:4370
msgid "Total Options"
msgstr "Opcions totals"
#: noindex-seo.php:3356
msgid "Enabled"
msgstr "Activades"
#: noindex-seo.php:3360
msgid "Recommended to Enable"
msgstr "Recomanades per a activar"
#: noindex-seo.php:3368
msgid "General Configuration" msgid "General Configuration"
msgstr "Configuració general" msgstr "Configuració general"
#: noindex-seo.php:3382 #: noindex-seo.php:4384
msgid "Disable compatibility warnings with other SEO plugins" msgid "Disable compatibility warnings with other SEO plugins"
msgstr "Desactiva els avisos de compatibilitat amb altres complements de SEO" msgstr "Desactiva els avisos de compatibilitat amb altres complements de SEO"
#: noindex-seo.php:3389 #: noindex-seo.php:4391
msgid "Implementation Method" msgid "Implementation Method"
msgstr "Mètode d'implementació" msgstr "Mètode d'implementació"
#: noindex-seo.php:3397 #: noindex-seo.php:4399
msgid "HTML Meta Tags (default, easier to verify)" msgid "HTML Meta Tags (default, easier to verify)"
msgstr "Etiquetes meta HTML (per defecte, més fàcil de comprovar)" msgstr "Etiquetes meta HTML (per defecte, més fàcil de comprovar)"
#: noindex-seo.php:3400 #: noindex-seo.php:4402
msgid "HTTP Headers (more robust, works with PDFs/images)" msgid "HTTP Headers (more robust, works with PDFs/images)"
msgstr "Capçaleres HTTP (més robust, funciona amb PDFs/imatges)" msgstr "Capçaleres HTTP (més robust, funciona amb PDFs/imatges)"
#: noindex-seo.php:3403 #: noindex-seo.php:4405
msgid "Both (maximum compatibility)" msgid "Both (maximum compatibility)"
msgstr "Ambdós (màxima compatibilitat)" msgstr "Ambdós (màxima compatibilitat)"
#: noindex-seo.php:3407 #: noindex-seo.php:4409
msgid "" msgid ""
"Choose how noindex directives are sent to search engines. Meta tags work for " "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, " "HTML pages. HTTP headers work for all content types including PDFs, images, "
@ -610,11 +631,11 @@ msgstr ""
"funcionen per a pàgines HTML. Les capçaleres HTTP funcionen per a tots els " "funcionen per a pàgines HTML. Les capçaleres HTTP funcionen per a tots els "
"tipus de contingut, incloent-hi PDFs, imatges i feeds." "tipus de contingut, incloent-hi PDFs, imatges i feeds."
#: noindex-seo.php:3425 #: noindex-seo.php:4427
msgid "Enable per-post/page granular control" msgid "Enable per-post/page granular control"
msgstr "Activa el control granular per entrada/pàgina" msgstr "Activa el control granular per entrada/pàgina"
#: noindex-seo.php:3428 #: noindex-seo.php:4430
msgid "" msgid ""
"When enabled, a meta box will appear in the post/page editor allowing you to " "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 " "override global settings for individual content. Useful for specific pages "
@ -624,29 +645,28 @@ msgstr ""
"permet sobreescriure els ajustaments globals per a contingut individual. " "permet sobreescriure els ajustaments globals per a contingut individual. "
"Útil per a pàgines específiques que necessiten directrius robots diferents." "Útil per a pàgines específiques que necessiten directrius robots diferents."
#: noindex-seo.php:3446 #: noindex-seo.php:4448
msgid "Enable per-term granular control" msgid "Enable per-term granular control"
msgstr "Activa el control granular per terme" msgstr "Activa el control granular per terme"
#: noindex-seo.php:3449 #: noindex-seo.php:4451
msgid "" msgid ""
"When enabled, a \"Search Engine Visibility\" panel will appear on the Edit " "When enabled, a \"Search Engine Visibility\" panel will appear on the Edit "
"screen for every public taxonomy (categories, tags, and custom taxonomies " "screen for every public taxonomy (categories, tags, and custom taxonomies "
"like WooCommerce product categories). Useful for noindexing a specific " "like WooCommerce product categories). Useful for noindexing a specific "
"category or tag without affecting the others." "category or tag without affecting the others."
msgstr "" msgstr ""
"Quan s'activa, un panell «Visibilitat als cercadors» apareixerà a la" "Quan s'activa, un panell «Visibilitat als cercadors» apareixerà a lapantalla "
"pantalla d'edició de totes les taxonomies públiques (categories, etiquetes i" "d'edició de totes les taxonomies públiques (categories, etiquetes "
"taxonomies personalitzades com les categories de producte del WooCommerce)." "itaxonomies personalitzades com les categories de producte del WooCommerce)."
"És útil per a aplicar noindex a una categoria o etiqueta concreta sense" "És útil per a aplicar noindex a una categoria o etiqueta concreta "
"afectar les altres." "senseafectar les altres."
#: noindex-seo.php:4469
#: noindex-seo.php:3467
msgid "Delete all plugin data on uninstall" msgid "Delete all plugin data on uninstall"
msgstr "Suprimeix totes les dades del complement en desinstal·lar" msgstr "Suprimeix totes les dades del complement en desinstal·lar"
#: noindex-seo.php:3470 #: noindex-seo.php:4472
msgid "" msgid ""
"When enabled, all settings and per-post robots directives will be " "When enabled, all settings and per-post robots directives will be "
"permanently deleted when the plugin is uninstalled. By default data is " "permanently deleted when the plugin is uninstalled. By default data is "
@ -656,7 +676,51 @@ msgstr ""
"suprimiran de forma permanent en desinstal·lar el complement. Per defecte, " "suprimiran de forma permanent en desinstal·lar el complement. Per defecte, "
"les dades es conserven." "les dades es conserven."
#: noindex-seo.php:3479 #: noindex-seo.php:4488
msgid "Recommended settings"
msgstr "Ajustaments recomanats"
#: noindex-seo.php:4490
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 ""
"Activa les 5 directives en els 15 contextes marcats com a "
"«Recomanat»(política de privadesa, arxius de data, paginació, resultats de "
"cerca,pàgines d'adjunts, previsualitzacions, 404 i cistella, pagament i "
"compte del WooCommerce). Reviseu i deseu."
#: noindex-seo.php:4497
msgid "Apply Recommended Defaults"
msgstr "Aplica els valors recomanats"
#: noindex-seo.php:4502
msgid "Enable all directives for the 15 contexts flagged as recommended."
msgstr ""
"Activa totes les directives en els 15 contextos marcats com a recomanats."
#: noindex-seo.php:4516
msgid "Overview"
msgstr "Resum"
#: noindex-seo.php:4520
msgid "Total Options"
msgstr "Opcions totals"
#: noindex-seo.php:4524
msgid "Enabled"
msgstr "Activades"
#: noindex-seo.php:4528
msgid "Recommended to Enable"
msgstr "Recomanades per a activar"
#: noindex-seo.php:4533
msgid "Page contexts"
msgstr "Contextos de pàgina"
#: noindex-seo.php:4538
msgid "" msgid ""
"Important: Enabling noindex on the wrong pages can harm your search engine " "Important: Enabling noindex on the wrong pages can harm your search engine "
"rankings. Only enable options you fully understand." "rankings. Only enable options you fully understand."
@ -665,27 +729,47 @@ msgstr ""
"vostre posicionament als cercadors. Activeu només les opcions que enteneu " "vostre posicionament als cercadors. Activeu només les opcions que enteneu "
"completament." "completament."
#: noindex-seo.php:3486 #: noindex-seo.php:4545
msgid "Search options..." msgid "Search options..."
msgstr "Cerca opcions…" msgstr "Cerca opcions…"
#: noindex-seo.php:3487 #: noindex-seo.php:4546
msgid "Search options" msgid "Search options"
msgstr "Cerca opcions" msgstr "Cerca opcions"
#: noindex-seo.php:3512 #: noindex-seo.php:4571
msgid "This option only works with HTTP Headers implementation method" 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:3521 #: noindex-seo.php:4580
msgid "Not Recommended" msgid "Not Recommended"
msgstr "No recomanat" msgstr "No recomanat"
#: noindex-seo.php:3526 #: noindex-seo.php:4585
msgid "View Page" msgid "View Page"
msgstr "Mostra la pàgina" msgstr "Mostra la pàgina"
#: noindex-seo.php:4629 noindex-seo.php:4638
msgid "Export settings"
msgstr "Exporta els ajustaments"
#: noindex-seo.php:4631
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
msgid "Import settings"
msgstr "Importa els ajustaments"
#: noindex-seo.php:4649
msgid ""
"Restore the global settings from a previously exported JSON file. Per-post "
"and per-term overrides are kept."
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:103
msgid "Enable to set custom robots directives for this content" msgid "Enable to set custom robots directives for this content"
msgstr "" msgstr ""
@ -716,59 +800,17 @@ msgstr "Evita fragments de text als resultats de cerca"
msgid "Active Directives:" msgid "Active Directives:"
msgstr "Directrius actives:" msgstr "Directrius actives:"
#: noindex-seo.php #~ msgid "🔍 noindex"
msgid "Export settings" #~ msgstr "🔍 noindex"
msgstr "Exporta els ajustaments"
#: noindex-seo.php #~ msgid "🔗 nofollow"
msgid "Download the current settings as a JSON file." #~ msgstr "🔗 nofollow"
msgstr "Baixa els ajustaments actuals en un fitxer JSON."
#: noindex-seo.php #~ msgid "💾 noarchive"
msgid "Import settings" #~ msgstr "💾 noarchive"
msgstr "Importa els ajustaments"
#: noindex-seo.php #~ msgid "📄 nosnippet"
msgid "Restore the global settings from a previously exported JSON file. Per-post and per-term overrides are kept." #~ msgstr "📄 nosnippet"
msgstr "Restaura els ajustaments globals des d'un fitxer JSON exportat anteriorment. Les sobreescriptures per entrada i per terme es conserven."
#: noindex-seo.php #~ msgid "🖼️ noimageindex"
msgid "Settings imported successfully." #~ msgstr "🖼️ noimageindex"
msgstr "S'han importat els ajustaments correctament."
#: noindex-seo.php
msgid "The settings file could not be imported: it is missing, too large, or not a valid noindex SEO export."
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."
#, php-format
#: noindex-seo.php
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 ha detectat que un altre complement o tema està afegint 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
msgid "Recommended settings"
msgstr "Ajustaments recomanats"
#: noindex-seo.php
msgid "Overview"
msgstr "Resum"
#: noindex-seo.php
msgid "Page contexts"
msgstr "Contextos de pàgina"
#: noindex-seo.php
msgid "General"
msgstr "General"
#: noindex-seo.php
msgid "SEO Settings"
msgstr "Ajustaments SEO"
#: noindex-seo.php
msgid "Import / Export"
msgstr "Importació i exportació"
#: noindex-seo.php
msgid "Settings sections"
msgstr "Seccions dels ajustaments"

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -2,22 +2,22 @@
# This file is distributed under the GPL-3.0-or-later. # This file is distributed under the GPL-3.0-or-later.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: noindex SEO 3.1.3\n" "Project-Id-Version: noindex SEO 3.5.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/noindex-seo\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/noindex-seo\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2026-08-17T19:24:59+00:00\n" "POT-Creation-Date: 2026-11-03T15:21:45+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.12.0\n" "X-Generator: WP-CLI 2.12.0\n"
"X-Domain: noindex-seo\n" "X-Domain: noindex-seo\n"
#. Plugin Name of the plugin #. Plugin Name of the plugin
#: noindex-seo.php #: noindex-seo.php
#: noindex-seo.php:1405 #: noindex-seo.php:1657
#: noindex-seo.php:1406 #: noindex-seo.php:1658
msgid "noindex SEO" msgid "noindex SEO"
msgstr "" msgstr ""
@ -41,159 +41,178 @@ msgstr ""
msgid "https://www.robotstxt.software/" msgid "https://www.robotstxt.software/"
msgstr "" msgstr ""
#: noindex-seo.php:1036 #: noindex-seo.php:1080
msgid "Post ID to compute effective directives for." msgid "Post ID to compute effective directives for."
msgstr "" msgstr ""
#: noindex-seo.php:1065 #: noindex-seo.php:1107
msgid "You do not have permission to read the noindex SEO settings." msgid "You do not have permission to read the noindex SEO settings."
msgstr "" msgstr ""
#: noindex-seo.php:1118 #: noindex-seo.php:1157
msgid "You do not have permission to read directives for this post." msgid "You do not have permission to read directives for this post."
msgstr "" msgstr ""
#: noindex-seo.php:1176 #: noindex-seo.php:1217
msgid "No post exists with that post_id." msgid "No post exists with that post_id."
msgstr "" msgstr ""
#: noindex-seo.php:1301 #: noindex-seo.php:1508
msgid "Settings saved successfully!" msgid "Settings saved successfully!"
msgstr "" msgstr ""
#: noindex-seo.php:1302 #: noindex-seo.php:1509
msgid "Expand All" msgid "Expand All"
msgstr "" msgstr ""
#: noindex-seo.php:1303 #: noindex-seo.php:1510
msgid "Collapse All" msgid "Collapse All"
msgstr "" msgstr ""
#: noindex-seo.php:1385 #: noindex-seo.php:1590
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
#. translators: plugin name. #. translators: plugin name.
#: noindex-seo.php:1627 #: noindex-seo.php:1883
#, php-format #, php-format
msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly." msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly."
msgstr "" msgstr ""
#: noindex-seo.php:1659 noindex-seo.php:1760 #. translators: %s: comma-separated list of wp_robots callbacks.
#: noindex-seo.php:1904
#, 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
msgid "Permission denied." msgid "Permission denied."
msgstr "" msgstr ""
#: noindex-seo.php:1914 #: noindex-seo.php:2886
#: noindex-seo.php:2238 #: noindex-seo.php:3210
#: assets/js/editor-sidebar.js:91 #: assets/js/editor-sidebar.js:91
msgid "Search Engine Visibility" msgid "Search Engine Visibility"
msgstr "" msgstr ""
#: noindex-seo.php:1966 #: noindex-seo.php:2938
#: noindex-seo.php:2597 #: noindex-seo.php:3545
#: assets/js/editor-sidebar.js:102 #: assets/js/editor-sidebar.js:102
msgid "Override global settings" msgid "Override global settings"
msgstr "" msgstr ""
#: noindex-seo.php:1971 #: noindex-seo.php:2943
msgid "When enabled, these directives will override the global settings for this specific content." msgid "When enabled, these directives will override the global settings for this specific content."
msgstr "" msgstr ""
#: noindex-seo.php:1978 #: noindex-seo.php:2950
msgid "Prevent indexing" msgid "Prevent indexing"
msgstr "" msgstr ""
#: noindex-seo.php:1983 #: noindex-seo.php:2955
msgid "Prevent link following" msgid "Prevent link following"
msgstr "" msgstr ""
#: noindex-seo.php:1988 #: noindex-seo.php:2960
msgid "Prevent caching" msgid "Prevent caching"
msgstr "" msgstr ""
#: noindex-seo.php:1993 #: noindex-seo.php:2965
msgid "Prevent snippets" msgid "Prevent snippets"
msgstr "" msgstr ""
#: noindex-seo.php:1998 #: noindex-seo.php:2970
#: assets/js/editor-sidebar.js:203 #: assets/js/editor-sidebar.js:203
msgid "Prevent image indexing" msgid "Prevent image indexing"
msgstr "" msgstr ""
#: noindex-seo.php:2006 #: noindex-seo.php:2978
msgid "Effective Directives:" msgid "Effective Directives:"
msgstr "" msgstr ""
#: noindex-seo.php:2031 #: noindex-seo.php:3003
msgid "Override active:" msgid "Override active:"
msgstr "" msgstr ""
#: noindex-seo.php:2036 #: noindex-seo.php:3008
msgid "Override enabled but no directives selected" msgid "Override enabled but no directives selected"
msgstr "" msgstr ""
#: noindex-seo.php:2042 #: noindex-seo.php:3014
msgid "Global settings:" msgid "Global settings:"
msgstr "" msgstr ""
#: noindex-seo.php:2047 #: noindex-seo.php:3019
msgid "No restrictions (indexable)" msgid "No restrictions (indexable)"
msgstr "" msgstr ""
#: noindex-seo.php:2242 #: noindex-seo.php:3214
msgid "Override global settings for this term" msgid "Override global settings for this term"
msgstr "" msgstr ""
#: noindex-seo.php:2255 #: noindex-seo.php:3227
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." 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 "" msgstr ""
#: noindex-seo.php:2350 #: noindex-seo.php:3322
#: noindex-seo.php:2356 #: noindex-seo.php:3328
#: noindex-seo.php:2488 #: noindex-seo.php:3443
#: noindex-seo.php:2494 #: noindex-seo.php:3449
msgid "Robots" msgid "Robots"
msgstr "" msgstr ""
#: noindex-seo.php:2417 #: noindex-seo.php:3389
#: noindex-seo.php:2543 #: noindex-seo.php:3498
msgid "Override (none)" msgid "Override (none)"
msgstr "" msgstr ""
#: noindex-seo.php:2593 #: noindex-seo.php:3541
msgid "Robots Directives" msgid "Robots Directives"
msgstr "" msgstr ""
#: noindex-seo.php:2602 #: noindex-seo.php:3551
msgid "🔍 noindex" #: noindex-seo.php:4285
#: assets/js/editor-sidebar.js:142
msgid "noindex"
msgstr "" msgstr ""
#: noindex-seo.php:2606 #: noindex-seo.php:3556
msgid "🔗 nofollow" #: noindex-seo.php:4289
#: assets/js/editor-sidebar.js:157
msgid "nofollow"
msgstr "" msgstr ""
#: noindex-seo.php:2610 #: noindex-seo.php:3561
msgid "💾 noarchive" #: noindex-seo.php:4293
#: assets/js/editor-sidebar.js:172
msgid "noarchive"
msgstr "" msgstr ""
#: noindex-seo.php:2614 #: noindex-seo.php:3566
msgid "📄 nosnippet" #: noindex-seo.php:4297
#: assets/js/editor-sidebar.js:187
msgid "nosnippet"
msgstr "" msgstr ""
#: noindex-seo.php:2618 #: noindex-seo.php:3571
msgid "🖼️ noimageindex" #: noindex-seo.php:4301
#: assets/js/editor-sidebar.js:202
msgid "noimageindex"
msgstr "" msgstr ""
#: noindex-seo.php:2729 #: noindex-seo.php:3682
msgid "Enable Robots Override" msgid "Enable Robots Override"
msgstr "" msgstr ""
#: noindex-seo.php:2730 #: noindex-seo.php:3683
msgid "Disable Robots Override" msgid "Disable Robots Override"
msgstr "" msgstr ""
#. translators: %d: Number of posts updated #. translators: %d: Number of posts updated
#: noindex-seo.php:2827 #: noindex-seo.php:3780
#, php-format #, php-format
msgid "Robots override enabled for %d post." msgid "Robots override enabled for %d post."
msgid_plural "Robots override enabled for %d posts." msgid_plural "Robots override enabled for %d posts."
@ -201,443 +220,502 @@ msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#. translators: %d: Number of posts updated #. translators: %d: Number of posts updated
#: noindex-seo.php:2848 #: noindex-seo.php:3801
#, php-format #, php-format
msgid "Robots override disabled for %d post." msgid "Robots override disabled for %d post."
msgid_plural "Robots override disabled for %d posts." msgid_plural "Robots override disabled for %d posts."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: noindex-seo.php:2897 #: noindex-seo.php:3850
msgid "All robots settings" msgid "All robots settings"
msgstr "" msgstr ""
#: noindex-seo.php:2899 #: noindex-seo.php:3852
msgid "With override" msgid "With override"
msgstr "" msgstr ""
#: noindex-seo.php:2902 #: noindex-seo.php:3855
msgid "Without override" msgid "Without override"
msgstr "" msgstr ""
#: noindex-seo.php:3016 #: noindex-seo.php:3974
msgid "You do not have sufficient permissions to access this page." msgid "You do not have sufficient permissions to access this page."
msgstr "" msgstr ""
#: noindex-seo.php:3017 #: noindex-seo.php:3975
msgid "Permission Denied" msgid "Permission Denied"
msgstr "" msgstr ""
#: noindex-seo.php:3039 #: noindex-seo.php:3987
msgid "General"
msgstr ""
#: noindex-seo.php:3988
msgid "SEO Settings"
msgstr ""
#: noindex-seo.php:3989
msgid "Import / Export"
msgstr ""
#: noindex-seo.php:4009
msgid "Main Pages" msgid "Main Pages"
msgstr "" msgstr ""
#: noindex-seo.php:3042 #: noindex-seo.php:4012
msgid "Front Page" msgid "Front Page"
msgstr "" msgstr ""
#: noindex-seo.php:3043 #: noindex-seo.php:4013
#: noindex-seo.php:3050 #: noindex-seo.php:4020
#: noindex-seo.php:3062 #: noindex-seo.php:4032
#: noindex-seo.php:3068 #: noindex-seo.php:4038
#: noindex-seo.php:3075 #: noindex-seo.php:4045
#: noindex-seo.php:3081 #: noindex-seo.php:4051
#: noindex-seo.php:3092 #: noindex-seo.php:4062
#: noindex-seo.php:3098 #: noindex-seo.php:4068
#: noindex-seo.php:3109 #: noindex-seo.php:4079
#: noindex-seo.php:3115 #: noindex-seo.php:4085
#: noindex-seo.php:3121 #: noindex-seo.php:4091
#: noindex-seo.php:3127 #: noindex-seo.php:4097
#: noindex-seo.php:3133 #: noindex-seo.php:4103
#: noindex-seo.php:3144 #: noindex-seo.php:4114
#: noindex-seo.php:3150 #: noindex-seo.php:4120
#: noindex-seo.php:3156 #: noindex-seo.php:4126
#: noindex-seo.php:3167 #: noindex-seo.php:4137
#: noindex-seo.php:3178 #: noindex-seo.php:4148
#: noindex-seo.php:3189 #: noindex-seo.php:4159
#: noindex-seo.php:3200 #: noindex-seo.php:4170
#: noindex-seo.php:3206 #: noindex-seo.php:4176
#: noindex-seo.php:3217 #: noindex-seo.php:4187
#: noindex-seo.php:3241 #: noindex-seo.php:4211
#: noindex-seo.php:3519 #: noindex-seo.php:4252
#: noindex-seo.php:4578
msgid "Recommended" msgid "Recommended"
msgstr "" msgstr ""
#: noindex-seo.php:3045 #: noindex-seo.php:4015
msgid "Block the indexing of the site's front page." msgid "Block the indexing of the site's front page."
msgstr "" msgstr ""
#: noindex-seo.php:3049 #: noindex-seo.php:4019
msgid "Home" msgid "Home"
msgstr "" msgstr ""
#: noindex-seo.php:3052 #: noindex-seo.php:4022
msgid "Block the indexing of the site's home page." msgid "Block the indexing of the site's home page."
msgstr "" msgstr ""
#: noindex-seo.php:3058 #: noindex-seo.php:4028
msgid "Pages and Posts" msgid "Pages and Posts"
msgstr "" msgstr ""
#: noindex-seo.php:3061 #: noindex-seo.php:4031
msgid "Page" msgid "Page"
msgstr "" msgstr ""
#: noindex-seo.php:3064 #: noindex-seo.php:4034
msgid "Block the indexing of site pages." msgid "Block the indexing of site pages."
msgstr "" msgstr ""
#: noindex-seo.php:3067 #: noindex-seo.php:4037
msgid "Privacy Policy" msgid "Privacy Policy"
msgstr "" msgstr ""
#: noindex-seo.php:3070 #: noindex-seo.php:4040
msgid "Block the indexing of the privacy policy page." msgid "Block the indexing of the privacy policy page."
msgstr "" msgstr ""
#: noindex-seo.php:3074 #: noindex-seo.php:4044
msgid "Single Post" msgid "Single Post"
msgstr "" msgstr ""
#: noindex-seo.php:3077 #: noindex-seo.php:4047
msgid "Block the indexing of individual posts." msgid "Block the indexing of individual posts."
msgstr "" msgstr ""
#: noindex-seo.php:3080 #: noindex-seo.php:4050
msgid "Singular" msgid "Singular"
msgstr "" msgstr ""
#: noindex-seo.php:3083 #: noindex-seo.php:4053
msgid "Block the indexing of any singular content (post or page)." msgid "Block the indexing of any singular content (post or page)."
msgstr "" msgstr ""
#: noindex-seo.php:3088 #: noindex-seo.php:4058
msgid "Taxonomies" msgid "Taxonomies"
msgstr "" msgstr ""
#: noindex-seo.php:3091 #: noindex-seo.php:4061
msgid "Category" msgid "Category"
msgstr "" msgstr ""
#: noindex-seo.php:3094 #: noindex-seo.php:4064
msgid "Block the indexing of category archive pages." msgid "Block the indexing of category archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:3097 #: noindex-seo.php:4067
msgid "Tag" msgid "Tag"
msgstr "" msgstr ""
#: noindex-seo.php:3100 #: noindex-seo.php:4070
msgid "Block the indexing of tag archive pages." msgid "Block the indexing of tag archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:3105 #: noindex-seo.php:4075
msgid "Date Archives" msgid "Date Archives"
msgstr "" msgstr ""
#: noindex-seo.php:3108 #: noindex-seo.php:4078
msgid "Date" msgid "Date"
msgstr "" msgstr ""
#: noindex-seo.php:3111 #: noindex-seo.php:4081
msgid "Block the indexing of any date-based archive page." msgid "Block the indexing of any date-based archive page."
msgstr "" msgstr ""
#: noindex-seo.php:3114 #: noindex-seo.php:4084
msgid "Day" msgid "Day"
msgstr "" msgstr ""
#: noindex-seo.php:3117 #: noindex-seo.php:4087
msgid "Block the indexing of daily archive pages." msgid "Block the indexing of daily archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:3120 #: noindex-seo.php:4090
msgid "Month" msgid "Month"
msgstr "" msgstr ""
#: noindex-seo.php:3123 #: noindex-seo.php:4093
msgid "Block the indexing of monthly archive pages." msgid "Block the indexing of monthly archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:3126 #: noindex-seo.php:4096
msgid "Time" msgid "Time"
msgstr "" msgstr ""
#: noindex-seo.php:3129 #: noindex-seo.php:4099
msgid "Block the indexing of time-based archive pages." msgid "Block the indexing of time-based archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:3132 #: noindex-seo.php:4102
msgid "Year" msgid "Year"
msgstr "" msgstr ""
#: noindex-seo.php:3135 #: noindex-seo.php:4105
msgid "Block the indexing of yearly archive pages." msgid "Block the indexing of yearly archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:3140 #: noindex-seo.php:4110
msgid "Archives" msgid "Archives"
msgstr "" msgstr ""
#: noindex-seo.php:3143 #: noindex-seo.php:4113
msgid "Archive" msgid "Archive"
msgstr "" msgstr ""
#: noindex-seo.php:3146 #: noindex-seo.php:4116
msgid "Block the indexing of any type of archive page." msgid "Block the indexing of any type of archive page."
msgstr "" msgstr ""
#: noindex-seo.php:3149 #: noindex-seo.php:4119
msgid "Author" msgid "Author"
msgstr "" msgstr ""
#: noindex-seo.php:3152 #: noindex-seo.php:4122
msgid "Block the indexing of author archive pages." msgid "Block the indexing of author archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:3155 #: noindex-seo.php:4125
msgid "Post Type Archive" msgid "Post Type Archive"
msgstr "" msgstr ""
#: noindex-seo.php:3158 #: noindex-seo.php:4128
msgid "Block the indexing of post type archive pages." msgid "Block the indexing of post type archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:3163 #: noindex-seo.php:4133
msgid "Pagination" msgid "Pagination"
msgstr "" msgstr ""
#: noindex-seo.php:3166 #: noindex-seo.php:4136
msgid "Paginated Pages" msgid "Paginated Pages"
msgstr "" msgstr ""
#: noindex-seo.php:3169 #: noindex-seo.php:4139
msgid "Block the indexing of pagination pages (page 2, 3, etc.)." msgid "Block the indexing of pagination pages (page 2, 3, etc.)."
msgstr "" msgstr ""
#: noindex-seo.php:3174 #: noindex-seo.php:4144
msgid "Search" msgid "Search"
msgstr "" msgstr ""
#: noindex-seo.php:3177 #: noindex-seo.php:4147
msgid "Search Results" msgid "Search Results"
msgstr "" msgstr ""
#: noindex-seo.php:3180 #: noindex-seo.php:4150
msgid "Block the indexing of search result pages." msgid "Block the indexing of search result pages."
msgstr "" msgstr ""
#: noindex-seo.php:3185 #: noindex-seo.php:4155
msgid "Attachments" msgid "Attachments"
msgstr "" msgstr ""
#: noindex-seo.php:3188 #: noindex-seo.php:4158
msgid "Attachment Pages" msgid "Attachment Pages"
msgstr "" msgstr ""
#: noindex-seo.php:3191 #: noindex-seo.php:4161
msgid "Block the indexing of attachment pages (does not affect the file itself)." msgid "Block the indexing of attachment pages (does not affect the file itself)."
msgstr "" msgstr ""
#: noindex-seo.php:3196 #: noindex-seo.php:4166
msgid "Previews" msgid "Previews"
msgstr "" msgstr ""
#: noindex-seo.php:3199 #: noindex-seo.php:4169
msgid "Customize Preview" msgid "Customize Preview"
msgstr "" msgstr ""
#: noindex-seo.php:3202 #: noindex-seo.php:4172
msgid "Block the indexing when content is in customize preview mode." msgid "Block the indexing when content is in customize preview mode."
msgstr "" msgstr ""
#: noindex-seo.php:3205 #: noindex-seo.php:4175
msgid "Post Preview" msgid "Post Preview"
msgstr "" msgstr ""
#: noindex-seo.php:3208 #: noindex-seo.php:4178
msgid "Block the indexing when viewing post previews." msgid "Block the indexing when viewing post previews."
msgstr "" msgstr ""
#: noindex-seo.php:3213 #: noindex-seo.php:4183
msgid "Error Pages" msgid "Error Pages"
msgstr "" msgstr ""
#: noindex-seo.php:3216 #: noindex-seo.php:4186
msgid "Error 404" msgid "Error 404"
msgstr "" msgstr ""
#: noindex-seo.php:3219 #: noindex-seo.php:4189
msgid "Block the indexing of 404 error pages." msgid "Block the indexing of 404 error pages."
msgstr "" msgstr ""
#. translators: %s: post type singular name. #. translators: %s: post type singular name.
#: noindex-seo.php:3244 #: noindex-seo.php:4214
#, php-format #, php-format
msgid "Block the indexing of individual %s." msgid "Block the indexing of individual %s."
msgstr "" msgstr ""
#: noindex-seo.php:3248 #: noindex-seo.php:4218
msgid "Custom Post Types" msgid "Custom Post Types"
msgstr "" msgstr ""
#: noindex-seo.php:3273 #: noindex-seo.php:4231
#: assets/js/editor-sidebar.js:142 msgid "Cart"
msgid "noindex"
msgstr "" msgstr ""
#: noindex-seo.php:3274 #: noindex-seo.php:4232
msgid "Block the indexing of the WooCommerce cart page."
msgstr ""
#: noindex-seo.php:4235
msgid "Checkout"
msgstr ""
#: noindex-seo.php:4236
msgid "Block the indexing of the WooCommerce checkout page."
msgstr ""
#: noindex-seo.php:4239
msgid "My Account"
msgstr ""
#: noindex-seo.php:4240
msgid "Block the indexing of the WooCommerce customer account pages (including order history and address endpoints)."
msgstr ""
#: noindex-seo.php:4260
msgid "WooCommerce"
msgstr ""
#: noindex-seo.php:4286
msgid "Prevent search engines from indexing this page" msgid "Prevent search engines from indexing this page"
msgstr "" msgstr ""
#: noindex-seo.php:3278 #: noindex-seo.php:4290
#: assets/js/editor-sidebar.js:157
msgid "nofollow"
msgstr ""
#: noindex-seo.php:3279
msgid "Prevent search engines from following links on this page" msgid "Prevent search engines from following links on this page"
msgstr "" msgstr ""
#: noindex-seo.php:3283 #: noindex-seo.php:4294
#: assets/js/editor-sidebar.js:172
msgid "noarchive"
msgstr ""
#: noindex-seo.php:3284
msgid "Prevent search engines from showing a cached version" msgid "Prevent search engines from showing a cached version"
msgstr "" msgstr ""
#: noindex-seo.php:3288 #: noindex-seo.php:4298
#: assets/js/editor-sidebar.js:187
msgid "nosnippet"
msgstr ""
#: noindex-seo.php:3289
msgid "Prevent search engines from showing text snippets" msgid "Prevent search engines from showing text snippets"
msgstr "" msgstr ""
#: noindex-seo.php:3293 #: noindex-seo.php:4302
#: assets/js/editor-sidebar.js:202
msgid "noimageindex"
msgstr ""
#: noindex-seo.php:3294
msgid "Prevent search engines from indexing images" msgid "Prevent search engines from indexing images"
msgstr "" msgstr ""
#: noindex-seo.php:3301 #: noindex-seo.php:4308
msgid "noindex SEO Settings" msgid "noindex SEO Settings"
msgstr "" msgstr ""
#: noindex-seo.php:3302 #: noindex-seo.php:4309
msgid "Control how search engines index and display your WordPress content using robots directives." msgid "Control how search engines index and display your WordPress content using robots directives."
msgstr "" msgstr ""
#: noindex-seo.php:3313 #: noindex-seo.php:4320
msgid "Recommended defaults applied. Review the changes below and click \"Save Changes\" to keep them, or uncheck anything you do not want." msgid "Recommended defaults applied. Review the changes below and click \"Save Changes\" to keep them, or uncheck anything you do not want."
msgstr "" msgstr ""
#: noindex-seo.php:3329 #: noindex-seo.php:4328
msgid "Apply Recommended Defaults" msgid "Settings imported successfully."
msgstr "" msgstr ""
#: noindex-seo.php:3334 #: noindex-seo.php:4335
msgid "Enable all directives for the 12 contexts flagged as recommended." msgid "The settings file could not be imported: it is missing, too large, or not a valid noindex SEO export."
msgstr "" msgstr ""
#: noindex-seo.php:3339 #: noindex-seo.php:4343
msgid "Enables all 5 directives on the 12 contexts flagged \"Recommended\" (privacy policy, date archives, pagination, search results, attachment pages, previews, 404). Review and save." msgid "Settings sections"
msgstr "" msgstr ""
#: noindex-seo.php:3352 #: noindex-seo.php:4370
msgid "Total Options"
msgstr ""
#: noindex-seo.php:3356
msgid "Enabled"
msgstr ""
#: noindex-seo.php:3360
msgid "Recommended to Enable"
msgstr ""
#: noindex-seo.php:3368
msgid "General Configuration" msgid "General Configuration"
msgstr "" msgstr ""
#: noindex-seo.php:3382 #: noindex-seo.php:4384
msgid "Disable compatibility warnings with other SEO plugins" msgid "Disable compatibility warnings with other SEO plugins"
msgstr "" msgstr ""
#: noindex-seo.php:3389 #: noindex-seo.php:4391
msgid "Implementation Method" msgid "Implementation Method"
msgstr "" msgstr ""
#: noindex-seo.php:3397 #: noindex-seo.php:4399
msgid "HTML Meta Tags (default, easier to verify)" msgid "HTML Meta Tags (default, easier to verify)"
msgstr "" msgstr ""
#: noindex-seo.php:3400 #: noindex-seo.php:4402
msgid "HTTP Headers (more robust, works with PDFs/images)" msgid "HTTP Headers (more robust, works with PDFs/images)"
msgstr "" msgstr ""
#: noindex-seo.php:3403 #: noindex-seo.php:4405
msgid "Both (maximum compatibility)" msgid "Both (maximum compatibility)"
msgstr "" msgstr ""
#: noindex-seo.php:3407 #: noindex-seo.php:4409
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." 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 "" msgstr ""
#: noindex-seo.php:3425 #: noindex-seo.php:4427
msgid "Enable per-post/page granular control" msgid "Enable per-post/page granular control"
msgstr "" msgstr ""
#: noindex-seo.php:3428 #: noindex-seo.php:4430
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." 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 "" msgstr ""
#: noindex-seo.php:3446 #: noindex-seo.php:4448
msgid "Enable per-term granular control" msgid "Enable per-term granular control"
msgstr "" msgstr ""
#: noindex-seo.php:3449 #: noindex-seo.php:4451
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." 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 "" msgstr ""
#: noindex-seo.php:3467 #: noindex-seo.php:4469
msgid "Delete all plugin data on uninstall" msgid "Delete all plugin data on uninstall"
msgstr "" msgstr ""
#: noindex-seo.php:3470 #: noindex-seo.php:4472
msgid "When enabled, all settings and per-post robots directives will be permanently deleted when the plugin is uninstalled. By default data is preserved." 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 "" msgstr ""
#: noindex-seo.php:3479 #: noindex-seo.php:4488
msgid "Recommended settings"
msgstr ""
#: noindex-seo.php:4490
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
msgid "Apply Recommended Defaults"
msgstr ""
#: noindex-seo.php:4502
msgid "Enable all directives for the 15 contexts flagged as recommended."
msgstr ""
#: noindex-seo.php:4516
msgid "Overview"
msgstr ""
#: noindex-seo.php:4520
msgid "Total Options"
msgstr ""
#: noindex-seo.php:4524
msgid "Enabled"
msgstr ""
#: noindex-seo.php:4528
msgid "Recommended to Enable"
msgstr ""
#: noindex-seo.php:4533
msgid "Page contexts"
msgstr ""
#: noindex-seo.php:4538
msgid "Important: Enabling noindex on the wrong pages can harm your search engine rankings. Only enable options you fully understand." msgid "Important: Enabling noindex on the wrong pages can harm your search engine rankings. Only enable options you fully understand."
msgstr "" msgstr ""
#: noindex-seo.php:3486 #: noindex-seo.php:4545
msgid "Search options..." msgid "Search options..."
msgstr "" msgstr ""
#: noindex-seo.php:3487 #: noindex-seo.php:4546
msgid "Search options" msgid "Search options"
msgstr "" msgstr ""
#: noindex-seo.php:3512 #: noindex-seo.php:4571
msgid "This option only works with HTTP Headers implementation method" msgid "This option only works with HTTP Headers implementation method"
msgstr "" msgstr ""
#: noindex-seo.php:3521 #: noindex-seo.php:4580
msgid "Not Recommended" msgid "Not Recommended"
msgstr "" msgstr ""
#: noindex-seo.php:3526 #: noindex-seo.php:4585
msgid "View Page" msgid "View Page"
msgstr "" msgstr ""
#: noindex-seo.php:4629
#: noindex-seo.php:4638
msgid "Export settings"
msgstr ""
#: noindex-seo.php:4631
msgid "Download the current settings as a JSON file."
msgstr ""
#: noindex-seo.php:4647
#: noindex-seo.php:4655
#: noindex-seo.php:4665
msgid "Import settings"
msgstr ""
#: noindex-seo.php:4649
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:103
msgid "Enable to set custom robots directives for this content" msgid "Enable to set custom robots directives for this content"
msgstr "" msgstr ""
@ -665,60 +743,3 @@ msgstr ""
#: assets/js/editor-sidebar.js:237 #: assets/js/editor-sidebar.js:237
msgid "Active Directives:" msgid "Active Directives:"
msgstr "" msgstr ""
#: noindex-seo.php
msgid "Export settings"
msgstr ""
#: noindex-seo.php
msgid "Download the current settings as a JSON file."
msgstr ""
#: noindex-seo.php
msgid "Import settings"
msgstr ""
#: noindex-seo.php
msgid "Restore the global settings from a previously exported JSON file. Per-post and per-term overrides are kept."
msgstr ""
#: noindex-seo.php
msgid "Settings imported successfully."
msgstr ""
#: noindex-seo.php
msgid "The settings file could not be imported: it is missing, too large, or not a valid noindex SEO export."
msgstr ""
#, php-format
#: noindex-seo.php
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
msgid "Recommended settings"
msgstr ""
#: noindex-seo.php
msgid "Overview"
msgstr ""
#: noindex-seo.php
msgid "Page contexts"
msgstr ""
#: noindex-seo.php
msgid "General"
msgstr ""
#: noindex-seo.php
msgid "SEO Settings"
msgstr ""
#: noindex-seo.php
msgid "Import / Export"
msgstr ""
#: noindex-seo.php
msgid "Settings sections"
msgstr ""

View file

@ -3,9 +3,9 @@
* Plugin Name: noindex SEO * Plugin Name: noindex SEO
* Plugin URI: https://www.robotstxt.software/plugins/noindex-seo/ * Plugin URI: https://www.robotstxt.software/plugins/noindex-seo/
* Description: Control search engine indexing with robots directives (noindex, nofollow, noarchive, nosnippet, noimageindex) for specific parts of your WordPress site. * Description: Control search engine indexing with robots directives (noindex, nofollow, noarchive, nosnippet, noimageindex) for specific parts of your WordPress site.
* Version: 3.4.0 * Version: 3.5.0
* Requires at least: 4.7 * Requires at least: 7.0
* Requires PHP: 5.6 * Requires PHP: 8.3
* Author: ROBOTSTXT * Author: ROBOTSTXT
* Author URI: https://www.robotstxt.software/ * Author URI: https://www.robotstxt.software/
* License: GPL-3.0-or-later * License: GPL-3.0-or-later
@ -68,8 +68,12 @@ defined( 'ABSPATH' ) || die( 'Bye bye!' );
* color-scheme-aware, RTL-ready classes (audit M7); stale * color-scheme-aware, RTL-ready classes (audit M7); stale
* form-handler wp_die() message corrected (I2); unreachable * form-handler wp_die() message corrected (I2); unreachable
* REST fallbacks removed (I5). * REST fallbacks removed (I5).
* @since 3.5.0 WooCommerce special-page contexts (Cart, Checkout, My
* 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).
*/ */
define( 'NOINDEX_SEO_VERSION', '3.4.0' ); define( 'NOINDEX_SEO_VERSION', '3.5.0' );
/** /**
* Option key holding the consolidated plugin settings array. * Option key holding the consolidated plugin settings array.
@ -291,7 +295,6 @@ function noindex_seo_metarobots( $method = 'meta', array $directives = array( 'n
if ( function_exists( 'wp_robots' ) ) { if ( function_exists( 'wp_robots' ) ) {
// WordPress 5.7+: inject the directives into the core robots API. // WordPress 5.7+: inject the directives into the core robots API.
// On WordPress older than 5.7 the wp_robots filter does not exist and the classic wp_head output below is used instead. // On WordPress older than 5.7 the wp_robots filter does not exist and the classic wp_head output below is used instead.
/* @phpstan-ignore WPCompat.filterNotAvailable.wprobots */
add_filter( add_filter(
'wp_robots', 'wp_robots',
function ( array $robots ) use ( $directives ) { function ( array $robots ) use ( $directives ) {
@ -372,6 +375,9 @@ function noindex_seo_show() {
'noindex_seo_contexts', 'noindex_seo_contexts',
array( array(
'single' => 'noindex_seo_single', 'single' => 'noindex_seo_single',
'woo_cart' => 'noindex_seo_woo_cart',
'woo_checkout' => 'noindex_seo_woo_checkout',
'woo_myaccount' => 'noindex_seo_woo_myaccount',
'page' => 'noindex_seo_page', 'page' => 'noindex_seo_page',
'privacy_policy' => 'noindex_seo_privacy_policy', 'privacy_policy' => 'noindex_seo_privacy_policy',
'attachment' => 'noindex_seo_attachment', 'attachment' => 'noindex_seo_attachment',
@ -530,8 +536,16 @@ function noindex_seo_show() {
// However, this catch-all condition is kept for edge cases, custom implementations, or future // However, this catch-all condition is kept for edge cases, custom implementations, or future
// WordPress versions that might introduce new date archive types not covered by the specific functions. // WordPress versions that might introduce new date archive types not covered by the specific functions.
// While this condition may rarely (or never) be true in practice, it provides defensive coverage. // While this condition may rarely (or never) be true in practice, it provides defensive coverage.
// WooCommerce special pages (Cart, Checkout, My Account) are regular
// pages; resolve them once so their dedicated contexts can run before
// the generic 'page' context.
$woo_context = is_page() ? noindex_seo_get_woo_context_for_page( get_queried_object_id() ) : '';
$current_conditions = array( $current_conditions = array(
'single' => is_single(), 'single' => is_single(),
'woo_cart' => 'woo_cart' === $woo_context,
'woo_checkout' => 'woo_checkout' === $woo_context,
'woo_myaccount' => 'woo_myaccount' === $woo_context,
'page' => is_page(), 'page' => is_page(),
'attachment' => is_attachment(), 'attachment' => is_attachment(),
'privacy_policy' => function_exists( 'is_privacy_policy' ) && is_privacy_policy(), 'privacy_policy' => function_exists( 'is_privacy_policy' ) && is_privacy_policy(),
@ -821,6 +835,10 @@ function noindex_seo_load_textdomain() {
* - 'page' → applies to the built-in `page` post type. * - 'page' → applies to the built-in `page` post type.
* - 'attachment'→ applies to the built-in `attachment` post type. * - 'attachment'→ applies to the built-in `attachment` post type.
* - 'cpt_{type}'→ applies to that custom post type (3.1.0+). * - 'cpt_{type}'→ applies to that custom post type (3.1.0+).
* 1.5. WooCommerce special pages (cart / checkout / my account, 3.5.0+):
* when their dedicated contexts have `noindex=1`, the specific page IDs
* are dropped from the pages sitemap even if the 'page' context is not
* noindexed.
* 2. Per-post exclusion: if granular control is on, individual posts that * 2. Per-post exclusion: if granular control is on, individual posts that
* have `_noindex_seo_override=1` AND `_noindex_seo_noindex=1` in postmeta * have `_noindex_seo_override=1` AND `_noindex_seo_noindex=1` in postmeta
* are added to `post__not_in`. * are added to `post__not_in`.
@ -858,6 +876,26 @@ function noindex_seo_filter_sitemap_posts( array $args, $post_type ) {
return $args; return $args;
} }
// Layer 1.5: WooCommerce special pages. They belong to the 'page' post
// type but can carry their own dedicated contexts, so drop them from
// the pages sitemap when those contexts are noindexed (WP 3.5.0+).
if ( 'page' === $post_type ) {
$woo_excluded = array();
foreach ( noindex_seo_get_woo_context_options() as $woo_context => $woo_option ) {
if ( 1 !== noindex_seo_get_setting( $woo_context, 'noindex' ) ) {
continue;
}
$woo_page_id = get_option( $woo_option, 0 );
if ( is_numeric( $woo_page_id ) && (int) $woo_page_id > 0 ) {
$woo_excluded[] = (int) $woo_page_id;
}
}
if ( ! empty( $woo_excluded ) ) {
$existing = isset( $args['post__not_in'] ) && is_array( $args['post__not_in'] ) ? $args['post__not_in'] : array();
$args['post__not_in'] = array_merge( $existing, $woo_excluded );
}
}
// Layer 2: per-post exclusion via granular override. // Layer 2: per-post exclusion via granular override.
if ( noindex_seo_get_config( 'granular', 0 ) ) { if ( noindex_seo_get_config( 'granular', 0 ) ) {
$excluded = get_posts( $excluded = get_posts(
@ -890,7 +928,6 @@ function noindex_seo_filter_sitemap_posts( array $args, $post_type ) {
return $args; return $args;
} }
// The hook only exists on WP 5.5+; on older versions the filter simply never fires. // The hook only exists on WP 5.5+; on older versions the filter simply never fires.
/* @phpstan-ignore WPCompat.filterNotAvailable.wpsitemapspostsqueryargs */
add_filter( 'wp_sitemaps_posts_query_args', 'noindex_seo_filter_sitemap_posts', 10, 2 ); add_filter( 'wp_sitemaps_posts_query_args', 'noindex_seo_filter_sitemap_posts', 10, 2 );
/** /**
@ -957,7 +994,6 @@ function noindex_seo_filter_sitemap_taxonomies( array $args, $taxonomy ) {
return $args; return $args;
} }
// The hook only exists on WP 5.5+; on older versions the filter simply never fires. // The hook only exists on WP 5.5+; on older versions the filter simply never fires.
/* @phpstan-ignore WPCompat.filterNotAvailable.wpsitemapstaxonomiesqueryargs */
add_filter( 'wp_sitemaps_taxonomies_query_args', 'noindex_seo_filter_sitemap_taxonomies', 10, 2 ); add_filter( 'wp_sitemaps_taxonomies_query_args', 'noindex_seo_filter_sitemap_taxonomies', 10, 2 );
/** /**
@ -983,7 +1019,6 @@ function noindex_seo_filter_sitemap_users( array $args ) {
return $args; return $args;
} }
// The hook only exists on WP 5.5+; on older versions the filter simply never fires. // The hook only exists on WP 5.5+; on older versions the filter simply never fires.
/* @phpstan-ignore WPCompat.filterNotAvailable.wpsitemapsusersqueryargs */
add_filter( 'wp_sitemaps_users_query_args', 'noindex_seo_filter_sitemap_users' ); add_filter( 'wp_sitemaps_users_query_args', 'noindex_seo_filter_sitemap_users' );
/** /**
@ -1162,6 +1197,10 @@ function noindex_seo_rest_get_settings() {
* both. * both.
* *
* @since 3.1.0 * @since 3.1.0
* @since 3.5.0 WooCommerce special pages resolve their dedicated context
* first and fall back to the generic 'page' context when it
* carries no active directives — the same precedence as the
* front-end.
* *
* @param WP_REST_Request $request Request with `post_id` param. * @param WP_REST_Request $request Request with `post_id` param.
* @return WP_REST_Response The effective-directives payload. * @return WP_REST_Response The effective-directives payload.
@ -1201,11 +1240,17 @@ function noindex_seo_rest_get_effective( WP_REST_Request $request ) {
// Step 2 + 3: fall back to per-CPT or built-in context. // Step 2 + 3: fall back to per-CPT or built-in context.
if ( empty( $directives ) ) { if ( empty( $directives ) ) {
$post_type = $post->post_type; $post_type = $post->post_type;
if ( in_array( $post_type, array( 'post', 'page', 'attachment' ), true ) ) { if ( 'page' === $post_type ) {
$context = $post_type; // single / page / attachment contexts are not name-aligned, but the storage context for built-in posts is 'single'. // WooCommerce special pages (cart, checkout, my account) have
if ( 'post' === $post_type ) { // their own contexts; mirror the front-end precedence.
$context = 'single'; $context = noindex_seo_get_woo_context_for_page( $post->ID );
if ( '' === $context ) {
$context = 'page';
} }
} elseif ( 'post' === $post_type ) {
$context = 'single'; // The storage context for built-in posts is 'single'.
} elseif ( 'attachment' === $post_type ) {
$context = 'attachment';
} else { } else {
$context = 'cpt_' . $post_type; $context = 'cpt_' . $post_type;
} }
@ -1215,6 +1260,17 @@ function noindex_seo_rest_get_effective( WP_REST_Request $request ) {
$directives[] = $directive; $directives[] = $directive;
} }
} }
// 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;
}
}
}
} }
$method_raw = noindex_seo_get_config( 'method', 'meta' ); $method_raw = noindex_seo_get_config( 'method', 'meta' );
@ -1260,6 +1316,146 @@ function noindex_seo_invalidate_cache_on_settings_update() {
add_action( 'update_option_' . NOINDEX_SEO_SETTINGS_KEY, 'noindex_seo_invalidate_cache_on_settings_update' ); add_action( 'update_option_' . NOINDEX_SEO_SETTINGS_KEY, 'noindex_seo_invalidate_cache_on_settings_update' );
add_action( 'add_option_' . NOINDEX_SEO_SETTINGS_KEY, 'noindex_seo_invalidate_cache_on_settings_update' ); add_action( 'add_option_' . NOINDEX_SEO_SETTINGS_KEY, 'noindex_seo_invalidate_cache_on_settings_update' );
/**
* Returns the plugin's directive icons as SVG markup, keyed by directive.
*
* The icons follow the WordPress admin icon style (24x24 viewBox, 2px
* currentColor strokes): the directive's concept in the upper-left corner
* plus a "no" minus badge in the lower-right corner.
*
* Registered with the WordPress Icons API (WP 7.1+) by
* {@see noindex_seo_register_icons()}; on older versions the emoji fallback
* of {@see noindex_seo_get_directive_icon_html()} is used instead.
*
* @since 3.5.0
*
* @return array<string, string> Directive slug => SVG markup.
*/
function noindex_seo_get_directive_svg_icons() {
$badge = '<circle cx="17.5" cy="17.5" r="4"/><path d="M15.7 17.5h3.6"/>';
$open = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">';
$close = '</svg>';
return array(
'noindex' => $open . '<circle cx="8" cy="8" r="5"/><path d="M11.8 11.8 14 14"/>' . $badge . $close,
'nofollow' => $open . '<rect x="3" y="6" width="9" height="6" rx="3" transform="rotate(-45 7.5 9)"/>' . $badge . $close,
'noarchive' => $open . '<path d="M3.5 5.5h10v9h-10z"/><path d="M3.5 8.5h10"/>' . $badge . $close,
'nosnippet' => $open . '<path d="M5 3.5h5.5l3 3V14H5z"/><path d="M10.5 3.5v3h3"/>' . $badge . $close,
'noimageindex' => $open . '<rect x="3" y="4.5" width="10.5" height="9.5" rx="1"/><circle cx="6.8" cy="7.8" r="1.3"/><path d="M4.8 13l3-3 2 2 1.6-1.6 1.6 1.6"/>' . $badge . $close,
);
}
/**
* Registers the plugin's directive icons with the WordPress Icons API.
*
* WordPress 7.2 renders its own admin chrome through the icon registry
* ({@see wp_register_icon()} / {@see wp_get_icon()}, introduced in 7.1) —
* core replaced the admin bar and menu dashicons with SVG. Registering our
* directive icons there lets the plugin use the same crisp, color-adaptive
* rendering on WP 7.2+ while the emoji fallback keeps WordPress 7.0 and 7.1
* fully working.
*
* The SVG path is gated to WP 7.2+ on purpose: 7.1's icon sanitizer does not
* allow `rect`/`circle` or the `stroke*` attributes (the stroke-based icons
* would be stripped to unstyled fragments), and 7.1 rejects the `public`
* collection property with a doing-it-wrong notice on every request.
*
* The collection is private (not exposed via REST or the editor icon picker):
* the icons are only consumed by this plugin's admin UI.
*
* Hooked to the {@see 'init'} action; every consumer of the icons renders
* later than init.
*
* @since 3.5.0
*
* @return void
*/
function noindex_seo_register_icons() {
// The Icons API exists since WordPress 7.1; without it (WP 7.0) this is
// a no-op and noindex_seo_get_directive_icon_html() returns the emoji
// fallback.
if ( ! function_exists( 'wp_register_icon_collection' ) || ! function_exists( 'wp_register_icon' ) ) {
return;
}
// WP 7.2 extended the icon sanitizer (rect/circle, stroke attributes) and
// added the 'public' collection property; '7.2-alpha1' (not '7.2') so beta
// and RC builds of 7.2 qualify for the SVG path.
if ( version_compare( (string) get_bloginfo( 'version' ), '7.2-alpha1', '<' ) ) {
return;
}
// Guarded above: the API exists since WP 7.1 while the plugin floor is 7.0.
wp_register_icon_collection(
'noindex-seo',
array(
'label' => 'noindex SEO',
'description' => 'Robots directive icons for the noindex SEO admin UI.',
'public' => false,
)
);
foreach ( noindex_seo_get_directive_svg_icons() as $directive => $svg ) {
// Guarded above: the API exists since WP 7.1 while the plugin floor is 7.0.
wp_register_icon(
'noindex-seo/' . $directive,
array(
'label' => 'noindex SEO: ' . $directive,
'content' => $svg,
)
);
}
}
add_action( 'init', 'noindex_seo_register_icons' );
/**
* Returns the rendered icon markup for a robots directive.
*
* Dual-path rendering for backwards compatibility:
*
* - WordPress 7.2+: the SVG icon registered by {@see noindex_seo_register_icons()}
* through the core Icons API ({@see wp_get_icon()}) — 16px, aria-hidden,
* color-adaptive via currentColor. Rendering is consistent on every OS,
* unlike emoji.
* - WordPress 7.0 - 7.1 (and any state where the icon is not registered):
* the legacy emoji glyph, escaped and hidden from assistive technology.
*
* @since 3.5.0
*
* @param string $directive Directive slug (noindex|nofollow|noarchive|nosnippet|noimageindex).
* @return string Safe-to-embed icon markup (SVG from the plugin's own registry, or the escaped emoji fallback).
*/
function noindex_seo_get_directive_icon_html( $directive ) {
if ( function_exists( 'wp_get_icon' ) ) {
// Guarded: the API exists since WP 7.1 while the plugin floor is 7.0.
$svg = wp_get_icon(
'noindex-seo/' . $directive,
array(
'size' => 16,
'class' => 'noindex-seo-directive-icon',
)
);
if ( '' !== $svg ) {
return $svg;
}
}
$emoji = array(
'noindex' => '🔍',
'nofollow' => '🔗',
'noarchive' => '💾',
'nosnippet' => '📄',
'noimageindex' => '🖼️',
);
// The emoji is decorative (the directive name is always rendered next to
// it), so hide it from assistive technology like the SVG path does.
return isset( $emoji[ $directive ] )
? '<span aria-hidden="true">' . esc_html( $emoji[ $directive ] ) . '</span>'
: '';
}
/** /**
* Enqueues admin CSS and JavaScript assets. * Enqueues admin CSS and JavaScript assets.
* *
@ -1361,7 +1557,6 @@ function noindex_seo_enqueue_editor_assets() {
} }
// is_block_editor() exists since WP 5.0; this callback only runs on WP 5.0+ because the hook only fires there. // is_block_editor() exists since WP 5.0; this callback only runs on WP 5.0+ because the hook only fires there.
/* @phpstan-ignore WPCompat.methodNotAvailable */
if ( ! $screen->is_block_editor() ) { if ( ! $screen->is_block_editor() ) {
return; return;
} }
@ -1392,7 +1587,6 @@ function noindex_seo_enqueue_editor_assets() {
} }
} }
// The action only exists on WP 5.0+; on older versions it simply never fires. // The action only exists on WP 5.0+; on older versions it simply never fires.
/* @phpstan-ignore WPCompat.actionNotAvailable.enqueueblockeditorassets */
add_action( 'enqueue_block_editor_assets', 'noindex_seo_enqueue_editor_assets' ); add_action( 'enqueue_block_editor_assets', 'noindex_seo_enqueue_editor_assets' );
/** /**
@ -1415,6 +1609,53 @@ function noindex_seo_settings_link( array $links ) {
return $links; return $links;
} }
/**
* Returns the WooCommerce context slugs mapped to the wp_options that hold
* each special page's ID.
*
* WooCommerce stores the Cart, Checkout and My Account page IDs in plain
* options, so detection needs no WooCommerce code — the plugin works from
* the option values alone. Without WooCommerce the options do not exist
* and every lookup returns an empty context.
*
* @since 3.5.0
*
* @return array<string, string> context slug => option name.
*/
function noindex_seo_get_woo_context_options() {
return array(
'woo_cart' => 'woocommerce_cart_page_id',
'woo_checkout' => 'woocommerce_checkout_page_id',
'woo_myaccount' => 'woocommerce_myaccount_page_id',
);
}
/**
* Returns the WooCommerce context matching a page ID, if any.
*
* My Account endpoints (e.g. /my-account/orders/) and the checkout
* order-pay / order-received endpoints share their parent page's ID, so
* they are covered by the same lookup.
*
* @since 3.5.0
*
* @param int|string $page_id Page ID to look up.
* @return string Context slug ('woo_cart', 'woo_checkout', 'woo_myaccount') or ''.
*/
function noindex_seo_get_woo_context_for_page( $page_id ) {
// No static cache: get_option() is served from the options cache, and a
// cached map would go stale when the page options change mid-request
// (or between tests).
foreach ( noindex_seo_get_woo_context_options() as $context => $option_name ) {
$page_option = get_option( $option_name, 0 );
if ( is_numeric( $page_option ) && (int) $page_option === (int) $page_id && (int) $page_id > 0 ) {
return $context;
}
}
return '';
}
/** /**
* Registers the "noindex SEO" settings page in the WordPress admin menu. * Registers the "noindex SEO" settings page in the WordPress admin menu.
* *
@ -1483,6 +1724,9 @@ function noindex_seo_get_contexts() {
'singular', 'singular',
'tag', 'tag',
'time', 'time',
'woo_cart',
'woo_checkout',
'woo_myaccount',
'year', 'year',
'error', 'error',
); );
@ -1902,9 +2146,10 @@ add_action( 'admin_post_update_noindex_seo', 'noindex_seo_process_form' );
* Handles the "Apply recommended defaults" form action. * Handles the "Apply recommended defaults" form action.
* *
* Iterates the settings page section definitions and enables every directive * Iterates the settings page section definitions and enables every directive
* for every context flagged `'suggestion' => true`. The 12 contexts currently * for every context flagged `'suggestion' => true`. The 15 contexts currently
* flagged are: privacy_policy, date, day, month, time, year, paged, search, * flagged are: privacy_policy, date, day, month, time, year, paged, search,
* attachment, customize_preview, preview, error. * attachment, customize_preview, preview, error, woo_cart, woo_checkout,
* woo_myaccount.
* *
* All five directives are enabled on each suggested context. This is the same * 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 * shape a manual click-through would produce, so the form is fully editable
@ -2188,8 +2433,8 @@ function noindex_seo_cli_get_rows( $context_filter = '' ) {
* *
* ## OPTIONS * ## OPTIONS
* *
* [--context=<context>] * [--only=<context>]
* : Filter by a single context slug. * : Only list the given context slug.
* *
* [--format=<format>] * [--format=<format>]
* : Render output in a particular format. * : Render output in a particular format.
@ -2205,9 +2450,15 @@ function noindex_seo_cli_get_rows( $context_filter = '' ) {
* ## EXAMPLES * ## EXAMPLES
* *
* wp noindex-seo list * wp noindex-seo list
* wp noindex-seo list --context=search --format=json * wp noindex-seo list --only=search --format=json
* *
* @since 3.4.0 * @since 3.4.0
* @since 3.5.0 The filter parameter is `--only`: WP-CLI 2.11+ reserves the
* global `--context` flag for its own context switching, so a
* command parameter of that name never reaches the handler.
* Output now goes through the namespaced format_items()
* function — the real WP-CLI API (the static WP_CLI\Utils::
* format_items() call fatalled on every invocation).
* *
* @param array<int, string> $args Positional arguments (unused). * @param array<int, string> $args Positional arguments (unused).
* @param array<string, mixed> $assoc_args Associative arguments. * @param array<string, mixed> $assoc_args Associative arguments.
@ -2215,20 +2466,20 @@ function noindex_seo_cli_get_rows( $context_filter = '' ) {
*/ */
function noindex_seo_cli_list( $args, $assoc_args ) { function noindex_seo_cli_list( $args, $assoc_args ) {
$context_filter = ''; $context_filter = '';
if ( isset( $assoc_args['context'] ) && is_string( $assoc_args['context'] ) && '' !== $assoc_args['context'] ) { if ( isset( $assoc_args['only'] ) && is_string( $assoc_args['only'] ) && '' !== $assoc_args['only'] ) {
// Validate the raw value against the known contexts: sanitize_key() // Validate the raw value against the known contexts: sanitize_key()
// alone would silently turn an invalid value into '' and list everything. // alone would silently turn an invalid value into '' and list everything.
if ( ! in_array( $assoc_args['context'], noindex_seo_get_contexts(), true ) ) { if ( ! in_array( $assoc_args['only'], noindex_seo_get_contexts(), true ) ) {
WP_CLI::error( sprintf( "Unknown context '%s'. Run 'wp noindex-seo list' to see the available contexts.", $assoc_args['context'] ) ); WP_CLI::error( sprintf( "Unknown context '%s'. Run 'wp noindex-seo list' to see the available contexts.", $assoc_args['only'] ) );
return; return;
} }
$context_filter = $assoc_args['context']; $context_filter = $assoc_args['only'];
} }
$rows = noindex_seo_cli_get_rows( $context_filter ); $rows = noindex_seo_cli_get_rows( $context_filter );
$format = isset( $assoc_args['format'] ) && is_string( $assoc_args['format'] ) ? $assoc_args['format'] : 'table'; $format = isset( $assoc_args['format'] ) && is_string( $assoc_args['format'] ) ? $assoc_args['format'] : 'table';
WP_CLI\Utils::format_items( $format, $rows, array( 'context', 'directive', 'status' ) ); WP_CLI\Utils\format_items( $format, $rows, array( 'context', 'directive', 'status' ) );
} }
/** /**
@ -2512,6 +2763,8 @@ if ( defined( 'WP_CLI' ) && WP_CLI && class_exists( 'WP_CLI' ) ) {
* WP-CLI command share the same definition of "recommended". * WP-CLI command share the same definition of "recommended".
* *
* @since 3.0.0 * @since 3.0.0
* @since 3.5.0 Added the WooCommerce contexts (woo_cart, woo_checkout,
* woo_myaccount); the suggested set grew from 12 to 15 contexts.
* *
* @return string[] List of context slugs. * @return string[] List of context slugs.
*/ */
@ -2542,6 +2795,9 @@ function noindex_seo_get_suggested_contexts() {
'customize_preview', 'customize_preview',
'preview', 'preview',
'error', 'error',
'woo_cart',
'woo_checkout',
'woo_myaccount',
) )
); );
} }
@ -2708,27 +2964,27 @@ function noindex_seo_render_meta_box( WP_Post $post ) {
<div class="noindex-seo-directive-list"> <div class="noindex-seo-directive-list">
<label class="noindex-seo-directive-row"> <label class="noindex-seo-directive-row">
<input type="checkbox" name="noindex_seo_noindex" value="1" <?php checked( 1, $noindex ); ?>> <input type="checkbox" name="noindex_seo_noindex" value="1" <?php checked( 1, $noindex ); ?>>
<span><strong>🔍 noindex</strong> — <?php esc_html_e( 'Prevent indexing', 'noindex-seo' ); ?></span> <span><strong><?php echo noindex_seo_get_directive_icon_html( 'noindex' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?> noindex</strong> — <?php esc_html_e( 'Prevent indexing', 'noindex-seo' ); ?></span>
</label> </label>
<label class="noindex-seo-directive-row"> <label class="noindex-seo-directive-row">
<input type="checkbox" name="noindex_seo_nofollow" value="1" <?php checked( 1, $nofollow ); ?>> <input type="checkbox" name="noindex_seo_nofollow" value="1" <?php checked( 1, $nofollow ); ?>>
<span><strong>🔗 nofollow</strong> — <?php esc_html_e( 'Prevent link following', 'noindex-seo' ); ?></span> <span><strong><?php echo noindex_seo_get_directive_icon_html( 'nofollow' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?> nofollow</strong> — <?php esc_html_e( 'Prevent link following', 'noindex-seo' ); ?></span>
</label> </label>
<label class="noindex-seo-directive-row"> <label class="noindex-seo-directive-row">
<input type="checkbox" name="noindex_seo_noarchive" value="1" <?php checked( 1, $noarchive ); ?>> <input type="checkbox" name="noindex_seo_noarchive" value="1" <?php checked( 1, $noarchive ); ?>>
<span><strong>💾 noarchive</strong> — <?php esc_html_e( 'Prevent caching', 'noindex-seo' ); ?></span> <span><strong><?php echo noindex_seo_get_directive_icon_html( 'noarchive' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?> noarchive</strong> — <?php esc_html_e( 'Prevent caching', 'noindex-seo' ); ?></span>
</label> </label>
<label class="noindex-seo-directive-row"> <label class="noindex-seo-directive-row">
<input type="checkbox" name="noindex_seo_nosnippet" value="1" <?php checked( 1, $nosnippet ); ?>> <input type="checkbox" name="noindex_seo_nosnippet" value="1" <?php checked( 1, $nosnippet ); ?>>
<span><strong>📄 nosnippet</strong> — <?php esc_html_e( 'Prevent snippets', 'noindex-seo' ); ?></span> <span><strong><?php echo noindex_seo_get_directive_icon_html( 'nosnippet' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?> nosnippet</strong> — <?php esc_html_e( 'Prevent snippets', 'noindex-seo' ); ?></span>
</label> </label>
<label class="noindex-seo-directive-row"> <label class="noindex-seo-directive-row">
<input type="checkbox" name="noindex_seo_noimageindex" value="1" <?php checked( 1, $noimageindex ); ?>> <input type="checkbox" name="noindex_seo_noimageindex" value="1" <?php checked( 1, $noimageindex ); ?>>
<span><strong>🖼️ noimageindex</strong> — <?php esc_html_e( 'Prevent image indexing', 'noindex-seo' ); ?></span> <span><strong><?php echo noindex_seo_get_directive_icon_html( 'noimageindex' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?> noimageindex</strong> — <?php esc_html_e( 'Prevent image indexing', 'noindex-seo' ); ?></span>
</label> </label>
</div> </div>
</div> </div>
@ -3154,26 +3410,9 @@ function noindex_seo_display_custom_column( $column, $post_id ) {
// Display active directives as badges. // Display active directives as badges.
echo '<div class="noindex-seo-badges">'; echo '<div class="noindex-seo-badges">';
foreach ( $active as $directive ) { foreach ( $active as $directive ) {
$emoji = '';
switch ( $directive ) {
case 'noindex':
$emoji = '🔍';
break;
case 'nofollow':
$emoji = '🔗';
break;
case 'noarchive':
$emoji = '💾';
break;
case 'nosnippet':
$emoji = '📄';
break;
case 'noimageindex':
$emoji = '🖼️';
break;
}
echo '<span class="noindex-seo-badge-item">'; echo '<span class="noindex-seo-badge-item">';
echo esc_html( $emoji . ' ' . $directive ); echo noindex_seo_get_directive_icon_html( $directive ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback.
echo ' ' . esc_html( $directive );
echo '</span>'; echo '</span>';
} }
echo '</div>'; echo '</div>';
@ -3276,18 +3515,11 @@ function noindex_seo_display_term_custom_column( $content, $column, $term_id ) {
return '<span class="noindex-seo-col-empty">' . esc_html__( 'Override (none)', 'noindex-seo' ) . '</span>'; return '<span class="noindex-seo-col-empty">' . esc_html__( 'Override (none)', 'noindex-seo' ) . '</span>';
} }
$emojis = array(
'noindex' => '🔍',
'nofollow' => '🔗',
'noarchive' => '💾',
'nosnippet' => '📄',
'noimageindex' => '🖼️',
);
$out = '<div class="noindex-seo-badges">'; $out = '<div class="noindex-seo-badges">';
foreach ( $active as $directive ) { foreach ( $active as $directive ) {
$out .= '<span class="noindex-seo-badge-item">'; $out .= '<span class="noindex-seo-badge-item">';
$out .= esc_html( $emojis[ $directive ] . ' ' . $directive ); $out .= noindex_seo_get_directive_icon_html( $directive ); // SVG from the plugin's own icon registry, or the escaped emoji fallback.
$out .= ' ' . esc_html( $directive );
$out .= '</span>'; $out .= '</span>';
} }
$out .= '</div>'; $out .= '</div>';
@ -3332,23 +3564,28 @@ function noindex_seo_quick_edit_fields( $column_name, $post_type ) { // phpcs:ig
<div id="noindex-seo-quick-edit-directives" class="noindex-seo-quick-edit-nested hidden"> <div id="noindex-seo-quick-edit-directives" class="noindex-seo-quick-edit-nested hidden">
<label class="noindex-seo-quick-edit-option"> <label class="noindex-seo-quick-edit-option">
<input type="checkbox" name="noindex_seo_noindex" value="1"> <input type="checkbox" name="noindex_seo_noindex" value="1">
<?php esc_html_e( '🔍 noindex', 'noindex-seo' ); ?> <?php echo noindex_seo_get_directive_icon_html( 'noindex' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?>
<?php esc_html_e( 'noindex', 'noindex-seo' ); ?>
</label> </label>
<label class="noindex-seo-quick-edit-option"> <label class="noindex-seo-quick-edit-option">
<input type="checkbox" name="noindex_seo_nofollow" value="1"> <input type="checkbox" name="noindex_seo_nofollow" value="1">
<?php esc_html_e( '🔗 nofollow', 'noindex-seo' ); ?> <?php echo noindex_seo_get_directive_icon_html( 'nofollow' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?>
<?php esc_html_e( 'nofollow', 'noindex-seo' ); ?>
</label> </label>
<label class="noindex-seo-quick-edit-option"> <label class="noindex-seo-quick-edit-option">
<input type="checkbox" name="noindex_seo_noarchive" value="1"> <input type="checkbox" name="noindex_seo_noarchive" value="1">
<?php esc_html_e( '💾 noarchive', 'noindex-seo' ); ?> <?php echo noindex_seo_get_directive_icon_html( 'noarchive' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?>
<?php esc_html_e( 'noarchive', 'noindex-seo' ); ?>
</label> </label>
<label class="noindex-seo-quick-edit-option"> <label class="noindex-seo-quick-edit-option">
<input type="checkbox" name="noindex_seo_nosnippet" value="1"> <input type="checkbox" name="noindex_seo_nosnippet" value="1">
<?php esc_html_e( '📄 nosnippet', 'noindex-seo' ); ?> <?php echo noindex_seo_get_directive_icon_html( 'nosnippet' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?>
<?php esc_html_e( 'nosnippet', 'noindex-seo' ); ?>
</label> </label>
<label class="noindex-seo-quick-edit-option"> <label class="noindex-seo-quick-edit-option">
<input type="checkbox" name="noindex_seo_noimageindex" value="1"> <input type="checkbox" name="noindex_seo_noimageindex" value="1">
<?php esc_html_e( '🖼️ noimageindex', 'noindex-seo' ); ?> <?php echo noindex_seo_get_directive_icon_html( 'noimageindex' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?>
<?php esc_html_e( 'noimageindex', 'noindex-seo' ); ?>
</label> </label>
</div> </div>
</div> </div>
@ -4001,6 +4238,48 @@ function noindex_seo_admin() {
$section_icons['custom_post_types'] = 'dashicons-admin-post'; $section_icons['custom_post_types'] = 'dashicons-admin-post';
} }
// Append a WooCommerce section when the store's special pages are
// configured (the page-ID options only exist when WooCommerce set them).
// Cart / Checkout / My Account are regular pages that conventionally
// deserve noindex but would otherwise fall into the generic 'page' bucket.
// Built once, outside the loop: the three label sets cover every context.
$woo_labels = array(
'woo_cart' => array(
'label' => __( 'Cart', 'noindex-seo' ),
'description' => __( 'Block the indexing of the WooCommerce cart page.', 'noindex-seo' ),
),
'woo_checkout' => array(
'label' => __( 'Checkout', 'noindex-seo' ),
'description' => __( 'Block the indexing of the WooCommerce checkout page.', 'noindex-seo' ),
),
'woo_myaccount' => array(
'label' => __( 'My Account', 'noindex-seo' ),
'description' => __( 'Block the indexing of the WooCommerce customer account pages (including order history and address endpoints).', 'noindex-seo' ),
),
);
$woo_fields = array();
foreach ( noindex_seo_get_woo_context_options() as $woo_context => $woo_option ) {
$woo_page_id = get_option( $woo_option, 0 );
if ( ! is_numeric( $woo_page_id ) || (int) $woo_page_id < 1 ) {
continue;
}
$woo_fields[ $woo_context ] = array(
'label' => $woo_labels[ $woo_context ]['label'],
'recommended' => __( 'Recommended', 'noindex-seo' ),
'suggestion' => true,
'description' => $woo_labels[ $woo_context ]['description'],
'view_url' => get_permalink( (int) $woo_page_id ),
);
}
if ( ! empty( $woo_fields ) ) {
$sections['woocommerce'] = array(
'title' => __( 'WooCommerce', 'noindex-seo' ),
'fields' => $woo_fields,
);
$section_icons['woocommerce'] = 'dashicons-cart';
}
// Get config options with explicit type narrowing. // Get config options with explicit type narrowing.
$opt_seoplugins = noindex_seo_get_config( 'seoplugins', 0 ); $opt_seoplugins = noindex_seo_get_config( 'seoplugins', 0 );
$option_config_seoplugins = is_scalar( $opt_seoplugins ) ? absint( $opt_seoplugins ) : 0; $option_config_seoplugins = is_scalar( $opt_seoplugins ) ? absint( $opt_seoplugins ) : 0;
@ -4022,27 +4301,22 @@ function noindex_seo_admin() {
'noindex' => array( 'noindex' => array(
'label' => __( 'noindex', 'noindex-seo' ), 'label' => __( 'noindex', 'noindex-seo' ),
'desc' => __( 'Prevent search engines from indexing this page', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from indexing this page', 'noindex-seo' ),
'icon' => '🔍',
), ),
'nofollow' => array( 'nofollow' => array(
'label' => __( 'nofollow', 'noindex-seo' ), 'label' => __( 'nofollow', 'noindex-seo' ),
'desc' => __( 'Prevent search engines from following links on this page', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from following links on this page', 'noindex-seo' ),
'icon' => '🔗',
), ),
'noarchive' => array( 'noarchive' => array(
'label' => __( 'noarchive', 'noindex-seo' ), 'label' => __( 'noarchive', 'noindex-seo' ),
'desc' => __( 'Prevent search engines from showing a cached version', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from showing a cached version', 'noindex-seo' ),
'icon' => '💾',
), ),
'nosnippet' => array( 'nosnippet' => array(
'label' => __( 'nosnippet', 'noindex-seo' ), 'label' => __( 'nosnippet', 'noindex-seo' ),
'desc' => __( 'Prevent search engines from showing text snippets', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from showing text snippets', 'noindex-seo' ),
'icon' => '📄',
), ),
'noimageindex' => array( 'noimageindex' => array(
'label' => __( 'noimageindex', 'noindex-seo' ), 'label' => __( 'noimageindex', 'noindex-seo' ),
'desc' => __( 'Prevent search engines from indexing images', 'noindex-seo' ), 'desc' => __( 'Prevent search engines from indexing images', 'noindex-seo' ),
'icon' => '🖼️',
), ),
); );
?> ?>
@ -4230,7 +4504,7 @@ function noindex_seo_admin() {
nested <form> elements). --> nested <form> elements). -->
<h2 class="noindex-seo-section-title"><?php esc_html_e( 'Recommended settings', 'noindex-seo' ); ?></h2> <h2 class="noindex-seo-section-title"><?php esc_html_e( 'Recommended settings', 'noindex-seo' ); ?></h2>
<p class="description"> <p class="description">
<?php esc_html_e( 'Enables all 5 directives on the 12 contexts flagged "Recommended" (privacy policy, date archives, pagination, search results, attachment pages, previews, 404). Review and save.', 'noindex-seo' ); ?> <?php esc_html_e( 'Enables all 5 directives on the 15 contexts flagged "Recommended" (privacy policy, date archives, pagination, search results, attachment pages, previews, 404, WooCommerce cart / checkout / my account). Review and save.', 'noindex-seo' ); ?>
</p> </p>
<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" class="noindex-seo-apply-form"> <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" class="noindex-seo-apply-form">
<input type="hidden" name="action" value="noindex_seo_apply_suggestions"> <input type="hidden" name="action" value="noindex_seo_apply_suggestions">
@ -4242,7 +4516,7 @@ function noindex_seo_admin() {
'noindex-seo-apply-suggestions', 'noindex-seo-apply-suggestions',
false, false,
array( array(
'title' => __( 'Enable all directives for the 12 contexts flagged as recommended.', 'noindex-seo' ), 'title' => __( 'Enable all directives for the 15 contexts flagged as recommended.', 'noindex-seo' ),
) )
); );
?> ?>
@ -4349,7 +4623,7 @@ function noindex_seo_admin() {
<?php checked( 1, $directive_value ); ?> <?php checked( 1, $directive_value ); ?>
<?php disabled( $should_disable ); ?> <?php disabled( $should_disable ); ?>
> >
<span class="directive-icon"><?php echo esc_html( $config['icon'] ); ?></span> <span class="directive-icon"><?php echo noindex_seo_get_directive_icon_html( $directive ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG from the plugin's own icon registry, or the escaped emoji fallback. ?></span>
<span class="directive-label"><?php echo esc_html( $config['label'] ); ?></span> <span class="directive-label"><?php echo esc_html( $config['label'] ); ?></span>
<span class="directive-description"><?php echo esc_html( $config['desc'] ); ?></span> <span class="directive-description"><?php echo esc_html( $config['desc'] ); ?></span>
</label> </label>

View file

@ -1,11 +1,11 @@
=== noindex SEO === === noindex SEO ===
Contributors: robotstxt, javiercasares Contributors: robotstxt, javiercasares
Tags: seo, noindex, nofollow, noarchive, robots Tags: seo, noindex, nofollow, noarchive, robots
Requires at least: 4.7 Requires at least: 7.0
Tested up to: 7.2 Tested up to: 7.2
Stable tag: 3.4.0 Stable tag: 3.5.0
Requires PHP: 5.6 Requires PHP: 8.3
Version: 3.4.0 Version: 3.5.0
License: GPL-3.0-or-later License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.txt License URI: https://www.gnu.org/licenses/gpl-3.0.txt
@ -13,7 +13,7 @@ Control search engine indexing with robots directives using HTML meta tags or HT
== Description == == Description ==
Fine-grained control over how search engines index and display your WordPress content. Apply 5 independent robots directives to 22 different page contexts with flexible implementation methods. 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.
**5 Robots Directives:** **5 Robots Directives:**
@ -31,7 +31,7 @@ Fine-grained control over how search engines index and display your WordPress co
**Control Levels:** **Control Levels:**
* Global Settings: Apply directives to 22 different page contexts (posts, pages, archives, etc.) * Global Settings: Apply directives to 25 different page contexts (posts, pages, archives, etc.)
* Granular Control (Optional): Override global settings for individual posts, pages, and custom post types via meta boxes in the editor * Granular Control (Optional): Override global settings for individual posts, pages, and custom post types via meta boxes in the editor
**Perfect for:** **Perfect for:**
@ -68,6 +68,12 @@ Fine-grained control over how search engines index and display your WordPress co
* Time: Block the indexing when an hourly, "minutely", or "secondly" archive of the site. The lists where the posts appear. * Time: Block the indexing when an hourly, "minutely", or "secondly" archive of the site. The lists where the posts appear.
* Year: Block the indexing when a yearly archive of the site. The lists where the posts appear. * Year: Block the indexing when a yearly archive of the site. The lists where the posts appear.
**WooCommerce**
* Cart: Block the indexing of the WooCommerce cart page.
* Checkout: Block the indexing of the WooCommerce checkout page.
* My Account: Block the indexing of the WooCommerce customer account pages (including order history and address endpoints).
**Archives** **Archives**
* Archive: Block the indexing of any type of Archive page. Category, Tag, Author and Date based pages are all types of Archives. The lists where the posts appear. * Archive: Block the indexing of any type of Archive page. Category, Tag, Author and Date based pages are all types of Archives. The lists where the posts appear.
@ -103,7 +109,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): The plugin ships a `wp noindex-seo` command namespace (WP-CLI 2.x required):
* `wp noindex-seo list [--context=<context>] [--format=<format>]` — lists every context × directive pair and its on/off status (table, csv, json or yaml). * `wp noindex-seo list [--only=<context>] [--format=<format>]` — lists every context × directive pair and its on/off status (table, csv, json or yaml).
* `wp noindex-seo set <context> [<directive>...]` — enables directives on a context (default: all five). Example: `wp noindex-seo set search noindex noarchive`. * `wp noindex-seo set <context> [<directive>...]` — enables directives on a context (default: all five). Example: `wp noindex-seo set search noindex noarchive`.
* `wp noindex-seo unset <context> [<directive>...]` — disables directives on a context. * `wp noindex-seo unset <context> [<directive>...]` — disables directives on a context.
* `wp noindex-seo export [<file>]` — prints the settings payload as JSON to STDOUT, or writes it to a file. * `wp noindex-seo export [<file>]` — prints the settings payload as JSON to STDOUT, or writes it to a file.
@ -151,11 +157,15 @@ No. By default all plugin data is preserved on uninstall. If you want a complete
== Compatibility == == Compatibility ==
* WordPress: 4.7 - 7.2 * WordPress: 7.0 - 7.2
* PHP: 5.6 - 8.5 * PHP: 8.3 - 8.6
== Changelog == == Changelog ==
= 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).
= 3.4.0 = = 3.4.0 =
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. 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.
@ -164,10 +174,6 @@ WP-CLI support: a `wp noindex-seo` command namespace with `list`, `set`, `unset`
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. 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.
= 3.2.0 =
Feature release: JSON export/import of the settings (validated, sanitized, per-post and per-term overrides untouched) and runtime conflict verification against the `wp_robots` API (foreign callbacks named in a dismissible notice).
= Previous versions = = Previous versions =
If you want to see the full changelog, visit the [noindex SEO plugin page](https://www.robotstxt.software/plugins/noindex-seo/). If you want to see the full changelog, visit the [noindex SEO plugin page](https://www.robotstxt.software/plugins/noindex-seo/).
@ -188,6 +194,6 @@ This plugin adheres to the following security measures and review protocols for
== Vulnerabilities == == Vulnerabilities ==
* No vulnerabilities have been published up to version 3.4.0. * No vulnerabilities have been published up to version 3.5.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). 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).

View file

@ -70,6 +70,9 @@ $noindex_seo_contexts = array(
'singular', 'singular',
'tag', 'tag',
'time', 'time',
'woo_cart',
'woo_checkout',
'woo_myaccount',
'year', 'year',
'error', 'error',
); );