This commit is contained in:
Javier Casares 2026-08-17 20:04:07 +00:00
commit 80b8db8289
10 changed files with 1088 additions and 950 deletions

View file

@ -1,36 +0,0 @@
# noindex SEO
Control search engine indexing with robots directives (`noindex`, `nofollow`, `noarchive`, `nosnippet`, `noimageindex`) for specific parts of your WordPress site.
## For end users
See [`readme.txt`](readme.txt) for installation, usage, and the WordPress.org-format changelog.
## For developers / contributors
- **[`CLAUDE.md`](CLAUDE.md)** — project-specific architecture, data model, tooling setup, and deliberate exceptions to the AGENTS defaults. Read this first.
- **[`AGENTS.md`](AGENTS.md)** — index to the contribution guidelines (security, compatibility, tooling, testing, deployment). Topic-specific rules live in the `AGENTS-*.md` files.
## Common commands
```bash
composer install # Install dev dependencies
vendor/bin/phpcs # WordPress Coding Standards
vendor/bin/phpstan analyse --memory-limit=1G # Static analysis (level 9)
vendor/bin/phpunit # Test suite (71 tests)
bash bin/preflight.sh # Full pre-deploy verification
```
## Test setup
Copy the sample config and fill in your local DB credentials:
```bash
cp tests/wp-tests-config.sample.php tests/wp-tests-config.php
```
The WordPress test library must be installed at `/tmp/wordpress-tests-lib` (or set `WP_TESTS_DIR`).
## License
GPL-3.0-or-later. See [LICENSE](LICENSE).

View file

@ -1,5 +1,46 @@
== Changelog == == Changelog ==
= 3.1.3 =
_Release date: 2026-08-17_
**Highlights**
* Compatibility release: WordPress 4.0+ and PHP 5.6+ supported again (declared floors now match the real compatibility of the code), and branding moved to robotstxt.software.
**Added**
* Classic `<meta name="robots">` output on `wp_head` for WordPress versions older than 5.7, restoring the pre-`wp_robots` fallback so the declared WordPress 4.0 floor is real. On WordPress 5.7+ the directives keep flowing through the core `wp_robots` API.
* `noindex_seo_get_cpt_label()` helper returning a safe display label for custom post types on the settings page.
**Changed**
* Minimum requirements lowered back to WordPress 4.0 and PHP 5.6 in the plugin header, `readme.txt`, `composer.json` and `phpcs.xml`, verified with a full-range PHPCompatibility 5.6-8.5 scan (clean) and the WP-Compat report.
* Plugin URI and Author URI now point to robotstxt.software.
* `register_setting()` calls use the two-argument form: the `$args` array parameter requires WordPress 4.7+, and all sanitization already happens in the admin-post form handler.
**Fixed**
* Potential fatal errors on older WordPress versions: `is_privacy_policy()` (WP 5.2+), `is_customize_preview()`, `get_term_meta()` (WP 4.4+), `register_post_meta()`, `register_term_meta()`, `wp_set_script_translations()` (WP 5.0+) and `WP_Screen::is_block_editor` (WP 5.0+) are now guarded; the features that depend on them degrade gracefully instead of crashing.
* Removed PHP 7-only syntax (strict types, scalar type hints, return type declarations, null coalescing operator) so the code parses and runs on PHP 5.6 as declared.
* Restored the repository governance files (`CLAUDE.md`, `.claude/settings.json`) that were accidentally dropped from the repository during the 3.1.2 release cleanup.
* Bundled translations (Catalan and Spanish) regenerated against the current source: 9 strings added in 3.0.2–3.1.0 are now translated, 7 fuzzy entries reviewed, 149 messages complete per locale with 0 untranslated and 0 fuzzy.
**Security**
* No security changes; the 5.6-8.5 PHPCompatibility scan, the dependency audit and the WordPress Coding Standards security sniffs are clean.
**Compatibility**
* WordPress: 4.0 - 7.1
* PHP: 5.6 - 8.5
**Tests**
* PHP Coding Standards: 3.13.6
* WordPress Coding Standards: 3.4.1
* PHPUnit: 9.6.36 (71 tests, 385 assertions)
= 3.1.2 [2026-08-10] = = 3.1.2 [2026-08-10] =
Audit-driven maintenance release. Audit-driven maintenance release.

Binary file not shown.

View file

@ -3,10 +3,10 @@
# This file is distributed under the GPL-3.0-or-later license. # This file is distributed under the GPL-3.0-or-later license.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: noindex SEO 2.0.2\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-07-18T14:48:42+00:00\n" "POT-Creation-Date: 2026-08-17T19:24:59+00:00\n"
"PO-Revision-Date: 2026-07-18T14:50+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"
"Language: ca\n" "Language: ca\n"
@ -18,19 +18,25 @@ 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:509 noindex-seo.php:510 #: noindex-seo.php noindex-seo.php:1405 noindex-seo.php:1406
msgid "noindex SEO" msgid "noindex SEO"
msgstr "noindex SEO" msgstr "noindex SEO"
#. Plugin URI of the plugin #. Plugin URI of the plugin
#: noindex-seo.php #: noindex-seo.php
msgid "https://wordpress.org/plugins/noindex-seo/" msgid "https://www.robotstxt.software/plugins/noindex-seo/"
msgstr "https://wordpress.org/plugins/noindex-seo/" msgstr "https://www.robotstxt.software/plugins/noindex-seo/"
#. Description of the plugin #. Description of the plugin
#: noindex-seo.php #: noindex-seo.php
msgid "Control search engine indexing with robots directives (noindex, nofollow, noarchive, nosnippet, noimageindex) for specific parts of your WordPress site." msgid ""
msgstr "Controla la indexació als cercadors amb directrius robots (noindex, nofollow, noarchive, nosnippet, noimageindex) per a parts específiques del vostre lloc WordPress." "Control search engine indexing with robots directives (noindex, nofollow, "
"noarchive, nosnippet, noimageindex) for specific parts of your WordPress "
"site."
msgstr ""
"Controla la indexació als cercadors amb directrius robots (noindex, "
"nofollow, noarchive, nosnippet, noimageindex) per a parts específiques del "
"vostre lloc WordPress."
#. Author of the plugin #. Author of the plugin
#: noindex-seo.php #: noindex-seo.php
@ -39,129 +45,169 @@ msgstr "ROBOTSTXT"
#. Author URI of the plugin #. Author URI of the plugin
#: noindex-seo.php #: noindex-seo.php
msgid "https://www.robotstxt.es/" msgid "https://www.robotstxt.software/"
msgstr "https://www.robotstxt.es/" msgstr "https://www.robotstxt.software/"
#: noindex-seo.php:418 #: noindex-seo.php:1036
msgid "Post ID to compute effective directives for."
msgstr "ID de l'entrada per a calcular les directives efectives."
#: noindex-seo.php:1065
msgid "You do not have permission to read the noindex SEO settings."
msgstr "No teniu permís per a llegir els ajustaments de noindex SEO."
#: noindex-seo.php:1118
msgid "You do not have permission to read directives for this post."
msgstr "No teniu permís per a llegir les directives d'aquesta entrada."
#: noindex-seo.php:1176
msgid "No post exists with that post_id."
msgstr "No existeix cap entrada amb aquest post_id."
#: noindex-seo.php:1301
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:419 #: noindex-seo.php:1302
msgid "Expand All" msgid "Expand All"
msgstr "Expandeix-ho tot" msgstr "Expandeix-ho tot"
#: noindex-seo.php:420 #: noindex-seo.php:1303
msgid "Collapse All" msgid "Collapse All"
msgstr "Redueix-ho tot" msgstr "Redueix-ho tot"
#: noindex-seo.php:489 #: noindex-seo.php:1385
msgid "Settings" msgid "Settings"
msgstr "Ajustaments" msgstr "Ajustaments"
#. translators: plugin name. #. translators: plugin name.
#: noindex-seo.php:718 #: noindex-seo.php:1627
#, php-format #, php-format
msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly." msgid ""
msgstr "noindex SEO ha detectat que %s és actiu. Això pot causar conflictes. Configureu les opcions en conseqüència." "noindex SEO has detected that %s is active. This may cause conflicts. Please "
"configure the options accordingly."
msgstr ""
"noindex SEO ha detectat que %s és actiu. Això pot causar conflictes. "
"Configureu les opcions en conseqüència."
#: noindex-seo.php:748 #: noindex-seo.php:1657 noindex-seo.php:1756
msgid "Permission denied or invalid nonce." msgid "Permission denied or invalid nonce."
msgstr "S'ha denegat el permís o el nonce no és vàlid." msgstr "S'ha denegat el permís o el nonce no és vàlid."
#: noindex-seo.php:914 assets/js/editor-sidebar.js:91 #: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91
msgid "Search Engine Visibility" msgid "Search Engine Visibility"
msgstr "Visibilitat als cercadors" msgstr "Visibilitat als cercadors"
#: noindex-seo.php:967 noindex-seo.php:1308 assets/js/editor-sidebar.js:102 #: noindex-seo.php:1966 noindex-seo.php:2597 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:972 #: noindex-seo.php:1971
msgid "When enabled, these directives will override the global settings for this specific content." msgid ""
msgstr "En activar-se, aquestes directrius sobreescriuran els ajustaments globals per a aquest contingut específic." "When enabled, these directives will override the global settings for this "
"specific content."
msgstr ""
"En activar-se, aquestes directrius sobreescriuran els ajustaments globals "
"per a aquest contingut específic."
#: noindex-seo.php:979 #: noindex-seo.php:1978
msgid "Prevent indexing" msgid "Prevent indexing"
msgstr "Evita la indexació" msgstr "Evita la indexació"
#: noindex-seo.php:984 #: noindex-seo.php:1983
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:989 #: noindex-seo.php:1988
msgid "Prevent caching" msgid "Prevent caching"
msgstr "Evita la memòria cau" msgstr "Evita la memòria cau"
#: noindex-seo.php:994 #: noindex-seo.php:1993
msgid "Prevent snippets" msgid "Prevent snippets"
msgstr "Evita els fragments" msgstr "Evita els fragments"
#: noindex-seo.php:999 assets/js/editor-sidebar.js:203 #: noindex-seo.php:1998 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:1007 #: noindex-seo.php:2006
msgid "Effective Directives:" msgid "Effective Directives:"
msgstr "Directrius efectives:" msgstr "Directrius efectives:"
#: noindex-seo.php:1032 #: noindex-seo.php:2031
msgid "Override active:" msgid "Override active:"
msgstr "Sobreescriptura activa:" msgstr "Sobreescriptura activa:"
#: noindex-seo.php:1037 #: noindex-seo.php:2036
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:1043 #: noindex-seo.php:2042
msgid "Global settings:" msgid "Global settings:"
msgstr "Ajustaments globals:" msgstr "Ajustaments globals:"
#: noindex-seo.php:1048 #: noindex-seo.php:2047
msgid "No restrictions (indexable)" msgid "No restrictions (indexable)"
msgstr "Sense restriccions (indexable)" msgstr "Sense restriccions (indexable)"
#: noindex-seo.php:1165 noindex-seo.php:1171 #: noindex-seo.php:2242
msgid "Override global settings for this term"
msgstr "Sobreescriu els ajustaments globals d'aquest terme"
#: noindex-seo.php:2255
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 ""
"Quan l'opció de sobreescriptura està activada, les directives marcades a"
"sobre s'apliquen a la pàgina d'arxiu d'aquest terme i prevalen sobre els"
"ajustaments globals de categories, etiquetes i arxius."
#: noindex-seo.php:2350 noindex-seo.php:2356 noindex-seo.php:2488
#: noindex-seo.php:2494
msgid "Robots" msgid "Robots"
msgstr "Robots" msgstr "Robots"
#: noindex-seo.php:1232 #: noindex-seo.php:2417 noindex-seo.php:2543
msgid "Override (none)" msgid "Override (none)"
msgstr "Sobreescriptura (cap)" msgstr "Sobreescriptura (cap)"
#: noindex-seo.php:1304 #: noindex-seo.php:2593
msgid "Robots Directives" msgid "Robots Directives"
msgstr "Directrius Robots" msgstr "Directrius Robots"
#: noindex-seo.php:1313 #: noindex-seo.php:2602
msgid "🔍 noindex" msgid "🔍 noindex"
msgstr "🔍 noindex" msgstr "🔍 noindex"
#: noindex-seo.php:1317 #: noindex-seo.php:2606
msgid "🔗 nofollow" msgid "🔗 nofollow"
msgstr "🔗 nofollow" msgstr "🔗 nofollow"
#: noindex-seo.php:1321 #: noindex-seo.php:2610
msgid "💾 noarchive" msgid "💾 noarchive"
msgstr "💾 noarchive" msgstr "💾 noarchive"
#: noindex-seo.php:1325 #: noindex-seo.php:2614
msgid "📄 nosnippet" msgid "📄 nosnippet"
msgstr "📄 nosnippet" msgstr "📄 nosnippet"
#: noindex-seo.php:1329 #: noindex-seo.php:2618
msgid "🖼️ noimageindex" msgid "🖼️ noimageindex"
msgstr "🖼️ noimageindex" msgstr "🖼️ noimageindex"
#: noindex-seo.php:1440 #: noindex-seo.php:2729
msgid "Enable Robots Override" msgid "Enable Robots Override"
msgstr "Activa la sobreescriptura Robots" msgstr "Activa la sobreescriptura Robots"
#: noindex-seo.php:1441 #: noindex-seo.php:2730
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:1538 #: noindex-seo.php:2827
#, 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."
@ -169,394 +215,482 @@ 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:1559 #: noindex-seo.php:2848
#, 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:1608 #: noindex-seo.php:2897
msgid "All robots settings" msgid "All robots settings"
msgstr "Tots els ajustaments robots" msgstr "Tots els ajustaments robots"
#: noindex-seo.php:1610 #: noindex-seo.php:2899
msgid "With override" msgid "With override"
msgstr "Amb sobreescriptura" msgstr "Amb sobreescriptura"
#: noindex-seo.php:1613 #: noindex-seo.php:2902
msgid "Without override" msgid "Without override"
msgstr "Sense sobreescriptura" msgstr "Sense sobreescriptura"
#: noindex-seo.php:1727 #: noindex-seo.php:3016
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:1728 #: noindex-seo.php:3017
msgid "Permission Denied" msgid "Permission Denied"
msgstr "Permís denegat" msgstr "Permís denegat"
#: noindex-seo.php:1750 #: noindex-seo.php:3039
msgid "Main Pages" msgid "Main Pages"
msgstr "Pàgines principals" msgstr "Pàgines principals"
#: noindex-seo.php:1753 #: noindex-seo.php:3042
msgid "Front Page" msgid "Front Page"
msgstr "Pàgina d'inici" msgstr "Pàgina d'inici"
#: noindex-seo.php:1754 noindex-seo.php:1761 noindex-seo.php:1773 noindex-seo.php:1779 noindex-seo.php:1786 noindex-seo.php:1792 noindex-seo.php:1803 noindex-seo.php:1809 noindex-seo.php:1820 noindex-seo.php:1826 noindex-seo.php:1832 noindex-seo.php:1838 noindex-seo.php:1844 noindex-seo.php:1855 noindex-seo.php:1861 noindex-seo.php:1867 noindex-seo.php:1878 noindex-seo.php:1889 noindex-seo.php:1900 noindex-seo.php:1911 noindex-seo.php:1917 noindex-seo.php:1928 noindex-seo.php:2136 #: noindex-seo.php:3043 noindex-seo.php:3050 noindex-seo.php:3062
#: noindex-seo.php:3068 noindex-seo.php:3075 noindex-seo.php:3081
#: noindex-seo.php:3092 noindex-seo.php:3098 noindex-seo.php:3109
#: noindex-seo.php:3115 noindex-seo.php:3121 noindex-seo.php:3127
#: noindex-seo.php:3133 noindex-seo.php:3144 noindex-seo.php:3150
#: noindex-seo.php:3156 noindex-seo.php:3167 noindex-seo.php:3178
#: noindex-seo.php:3189 noindex-seo.php:3200 noindex-seo.php:3206
#: noindex-seo.php:3217 noindex-seo.php:3241 noindex-seo.php:3519
msgid "Recommended" msgid "Recommended"
msgstr "Recomanat" msgstr "Recomanat"
#: noindex-seo.php:1756 #: noindex-seo.php:3045
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:1760 #: noindex-seo.php:3049
msgid "Home" msgid "Home"
msgstr "Inici" msgstr "Inici"
#: noindex-seo.php:1763 #: noindex-seo.php:3052
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:1769 #: noindex-seo.php:3058
msgid "Pages and Posts" msgid "Pages and Posts"
msgstr "Pàgines i entrades" msgstr "Pàgines i entrades"
#: noindex-seo.php:1772 #: noindex-seo.php:3061
msgid "Page" msgid "Page"
msgstr "Pàgina" msgstr "Pàgina"
#: noindex-seo.php:1775 #: noindex-seo.php:3064
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:1778 #: noindex-seo.php:3067
msgid "Privacy Policy" msgid "Privacy Policy"
msgstr "Política de privadesa" msgstr "Política de privadesa"
#: noindex-seo.php:1781 #: noindex-seo.php:3070
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:1785 #: noindex-seo.php:3074
msgid "Single Post" msgid "Single Post"
msgstr "Entrada individual" msgstr "Entrada individual"
#: noindex-seo.php:1788 #: noindex-seo.php:3077
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:1791 #: noindex-seo.php:3080
msgid "Singular" msgid "Singular"
msgstr "Singular" msgstr "Singular"
#: noindex-seo.php:1794 #: noindex-seo.php:3083
msgid "Block the indexing of any singular content (post or page)." msgid "Block the indexing of any singular content (post or page)."
msgstr "Bloqueja la indexació de qualsevol contingut singular (entrada o pàgina)." msgstr ""
"Bloqueja la indexació de qualsevol contingut singular (entrada o pàgina)."
#: noindex-seo.php:1799 #: noindex-seo.php:3088
msgid "Taxonomies" msgid "Taxonomies"
msgstr "Taxonomies" msgstr "Taxonomies"
#: noindex-seo.php:1802 #: noindex-seo.php:3091
msgid "Category" msgid "Category"
msgstr "Categoria" msgstr "Categoria"
#: noindex-seo.php:1805 #: noindex-seo.php:3094
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:1808 #: noindex-seo.php:3097
msgid "Tag" msgid "Tag"
msgstr "Etiqueta" msgstr "Etiqueta"
#: noindex-seo.php:1811 #: noindex-seo.php:3100
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:1816 #: noindex-seo.php:3105
msgid "Date Archives" msgid "Date Archives"
msgstr "Arxius de data" msgstr "Arxius de data"
#: noindex-seo.php:1819 #: noindex-seo.php:3108
msgid "Date" msgid "Date"
msgstr "Data" msgstr "Data"
#: noindex-seo.php:1822 #: noindex-seo.php:3111
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:1825 #: noindex-seo.php:3114
msgid "Day" msgid "Day"
msgstr "Dia" msgstr "Dia"
#: noindex-seo.php:1828 #: noindex-seo.php:3117
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:1831 #: noindex-seo.php:3120
msgid "Month" msgid "Month"
msgstr "Mes" msgstr "Mes"
#: noindex-seo.php:1834 #: noindex-seo.php:3123
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:1837 #: noindex-seo.php:3126
msgid "Time" msgid "Time"
msgstr "Hora" msgstr "Hora"
#: noindex-seo.php:1840 #: noindex-seo.php:3129
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:1843 #: noindex-seo.php:3132
msgid "Year" msgid "Year"
msgstr "Any" msgstr "Any"
#: noindex-seo.php:1846 #: noindex-seo.php:3135
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:1851 #: noindex-seo.php:3140
msgid "Archives" msgid "Archives"
msgstr "Arxius" msgstr "Arxius"
#: noindex-seo.php:1854 #: noindex-seo.php:3143
msgid "Archive" msgid "Archive"
msgstr "Arxiu" msgstr "Arxiu"
#: noindex-seo.php:1857 #: noindex-seo.php:3146
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:1860 #: noindex-seo.php:3149
msgid "Author" msgid "Author"
msgstr "Autor" msgstr "Autor"
#: noindex-seo.php:1863 #: noindex-seo.php:3152
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:1866 #: noindex-seo.php:3155
msgid "Post Type Archive" msgid "Post Type Archive"
msgstr "Arxiu de tipus de contingut" msgstr "Arxiu de tipus de contingut"
#: noindex-seo.php:1869 #: noindex-seo.php:3158
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:1874 #: noindex-seo.php:3163
msgid "Pagination" msgid "Pagination"
msgstr "Paginació" msgstr "Paginació"
#: noindex-seo.php:1877 #: noindex-seo.php:3166
msgid "Paginated Pages" msgid "Paginated Pages"
msgstr "Pàgines paginades" msgstr "Pàgines paginades"
#: noindex-seo.php:1880 #: noindex-seo.php:3169
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:1885 #: noindex-seo.php:3174
msgid "Search" msgid "Search"
msgstr "Cerca" msgstr "Cerca"
#: noindex-seo.php:1888 #: noindex-seo.php:3177
msgid "Search Results" msgid "Search Results"
msgstr "Resultats de cerca" msgstr "Resultats de cerca"
#: noindex-seo.php:1891 #: noindex-seo.php:3180
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:1896 #: noindex-seo.php:3185
msgid "Attachments" msgid "Attachments"
msgstr "Adjunts" msgstr "Adjunts"
#: noindex-seo.php:1899 #: noindex-seo.php:3188
msgid "Attachment Pages" msgid "Attachment Pages"
msgstr "Pàgines d'adjunts" msgstr "Pàgines d'adjunts"
#: noindex-seo.php:1902 #: noindex-seo.php:3191
msgid "Block the indexing of attachment pages (does not affect the file itself)." msgid ""
msgstr "Bloqueja la indexació de les pàgines d'adjunts (no afecta el fitxer en si)." "Block the indexing of attachment pages (does not affect the file itself)."
msgstr ""
"Bloqueja la indexació de les pàgines d'adjunts (no afecta el fitxer en si)."
#: noindex-seo.php:1907 #: noindex-seo.php:3196
msgid "Previews" msgid "Previews"
msgstr "Previsualitzacions" msgstr "Previsualitzacions"
#: noindex-seo.php:1910 #: noindex-seo.php:3199
msgid "Customize Preview" msgid "Customize Preview"
msgstr "Previsualització del personalitzador" msgstr "Previsualització del personalitzador"
#: noindex-seo.php:1913 #: noindex-seo.php:3202
msgid "Block the indexing when content is in customize preview mode." msgid "Block the indexing when content is in customize preview mode."
msgstr "Bloqueja la indexació quan el contingut és en mode de previsualització del personalitzador." msgstr ""
"Bloqueja la indexació quan el contingut és en mode de previsualització del "
"personalitzador."
#: noindex-seo.php:1916 #: noindex-seo.php:3205
msgid "Post Preview" msgid "Post Preview"
msgstr "Previsualització de l'entrada" msgstr "Previsualització de l'entrada"
#: noindex-seo.php:1919 #: noindex-seo.php:3208
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:1924 #: noindex-seo.php:3213
msgid "Error Pages" msgid "Error Pages"
msgstr "Pàgines d'error" msgstr "Pàgines d'error"
#: noindex-seo.php:1927 #: noindex-seo.php:3216
msgid "Error 404" msgid "Error 404"
msgstr "Error 404" msgstr "Error 404"
#: noindex-seo.php:1930 #: noindex-seo.php:3219
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."
#: noindex-seo.php:1953 assets/js/editor-sidebar.js:142 #. translators: %s: post type singular name.
#: noindex-seo.php:3244
#, php-format
msgid "Block the indexing of individual %s."
msgstr "Bloqueja la indexació de %s individuals."
#: noindex-seo.php:3248
msgid "Custom Post Types"
msgstr "Tipus de contingut personalitzats"
#: noindex-seo.php:3273 assets/js/editor-sidebar.js:142
msgid "noindex" msgid "noindex"
msgstr "noindex" msgstr "noindex"
#: noindex-seo.php:1954 #: noindex-seo.php:3274
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:1958 assets/js/editor-sidebar.js:157 #: noindex-seo.php:3278 assets/js/editor-sidebar.js:157
msgid "nofollow" msgid "nofollow"
msgstr "nofollow" msgstr "nofollow"
#: noindex-seo.php:1959 #: 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:1963 assets/js/editor-sidebar.js:172 #: noindex-seo.php:3283 assets/js/editor-sidebar.js:172
msgid "noarchive" msgid "noarchive"
msgstr "noarchive" msgstr "noarchive"
#: noindex-seo.php:1964 #: 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:1968 assets/js/editor-sidebar.js:187 #: noindex-seo.php:3288 assets/js/editor-sidebar.js:187
msgid "nosnippet" msgid "nosnippet"
msgstr "nosnippet" msgstr "nosnippet"
#: noindex-seo.php:1969 #: 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:1973 assets/js/editor-sidebar.js:202 #: noindex-seo.php:3293 assets/js/editor-sidebar.js:202
msgid "noimageindex" msgid "noimageindex"
msgstr "noimageindex" msgstr "noimageindex"
#: noindex-seo.php:1974 #: 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:1981 #: noindex-seo.php:3301
msgid "noindex SEO Settings" msgid "noindex SEO Settings"
msgstr "Ajustaments de noindex SEO" msgstr "Ajustaments de noindex SEO"
#: noindex-seo.php:1982 #: noindex-seo.php:3302
msgid "Control how search engines index and display your WordPress content using robots directives." msgid ""
msgstr "Controla com els cercadors indexen i mostren el vostre contingut de WordPress fent servir directrius robots." "Control how search engines index and display your WordPress content using "
"robots directives."
msgstr ""
"Controla com els cercadors indexen i mostren el vostre contingut de "
"WordPress fent servir directrius robots."
#: noindex-seo.php:1992 #: noindex-seo.php:3313
msgid ""
"Recommended defaults applied. Review the changes below and click \"Save "
"Changes\" to keep them, or uncheck anything you do not want."
msgstr ""
"Valors recomanats aplicats. Reviseu els canvis de baix i feu clic a «Desa"
"els canvis» per a conservar-los, o desmarqueu el que no vulgueu."
#: noindex-seo.php:3329
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 ""
"Enables all 5 directives on the 12 contexts flagged \"Recommended\" (privacy "
"policy, date archives, pagination, search results, attachment pages, "
"previews, 404). Review and save."
msgstr ""
"Activa les 5 directives en els 12 contextes marcats com a «Recomanat»"
"(política de privadesa, arxius de data, paginació, resultats de cerca,"
"pàgines d'adjunts, previsualitzacions i 404). Reviseu i deseu."
#: noindex-seo.php:3352
msgid "Total Options" msgid "Total Options"
msgstr "Opcions totals" msgstr "Opcions totals"
#: noindex-seo.php:1996 #: noindex-seo.php:3356
msgid "Enabled" msgid "Enabled"
msgstr "Activades" msgstr "Activades"
#: noindex-seo.php:2000 #: noindex-seo.php:3360
msgid "Recommended to Enable" msgid "Recommended to Enable"
msgstr "Recomanades per a activar" msgstr "Recomanades per a activar"
#: noindex-seo.php:2008 #: noindex-seo.php:3368
msgid "General Configuration" msgid "General Configuration"
msgstr "Configuració general" msgstr "Configuració general"
#: noindex-seo.php:2022 #: noindex-seo.php:3382
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:2029 #: noindex-seo.php:3389
msgid "Implementation Method" msgid "Implementation Method"
msgstr "Mètode d'implementació" msgstr "Mètode d'implementació"
#: noindex-seo.php:2037 #: noindex-seo.php:3397
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:2040 #: noindex-seo.php:3400
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:2043 #: noindex-seo.php:3403
msgid "Both (maximum compatibility)" msgid "Both (maximum compatibility)"
msgstr "Ambdós (màxima compatibilitat)" msgstr "Ambdós (màxima compatibilitat)"
#: noindex-seo.php:2047 #: noindex-seo.php:3407
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 ""
"Trieu com s'envien les directrius noindex als cercadors. Les etiquetes meta funcionen " "Trieu com s'envien les directrius noindex als cercadors. Les etiquetes meta "
"per a pàgines HTML. Les capçaleres HTTP funcionen per a tots els tipus de contingut, " "funcionen per a pàgines HTML. Les capçaleres HTTP funcionen per a tots els "
"incloent-hi PDFs, imatges i feeds." "tipus de contingut, incloent-hi PDFs, imatges i feeds."
#: noindex-seo.php:2065 #: noindex-seo.php:3425
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:2068 #: noindex-seo.php:3428
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 ""
"En activar-se, apareixerà una meta box a l'editor d'entrades/pàgines que us permet " "En activar-se, apareixerà una meta box a l'editor d'entrades/pàgines que us "
"sobreescriure els ajustaments globals per a contingut individual. Útil per a pàgines " "permet sobreescriure els ajustaments globals per a contingut individual. "
"específiques que necessiten directrius robots diferents." "Útil per a pàgines específiques que necessiten directrius robots diferents."
#: noindex-seo.php:2086 #: noindex-seo.php:3446
msgid "Enable per-term granular control"
msgstr "Activa el control granular per terme"
#: noindex-seo.php:3449
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 ""
"Quan s'activa, un panell «Visibilitat als cercadors» apareixerà a la"
"pantalla d'edició de totes les taxonomies públiques (categories, etiquetes i"
"taxonomies personalitzades com les categories de producte del WooCommerce)."
"És útil per a aplicar noindex a una categoria o etiqueta concreta sense"
"afectar les altres."
#: 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:2089 #: noindex-seo.php:3470
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 ""
"En activar-se, tots els ajustaments i les directrius robots per entrada se suprimiran " "En activar-se, tots els ajustaments i les directrius robots per entrada se "
"de forma permanent en desinstal·lar el complement. Per defecte, les dades es conserven." "suprimiran de forma permanent en desinstal·lar el complement. Per defecte, "
"les dades es conserven."
#: noindex-seo.php:2098 #: noindex-seo.php:3479
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 ""
"Important: Activar noindex a les pàgines equivocades pot perjudicar el vostre " "Important: Activar noindex a les pàgines equivocades pot perjudicar el "
"posicionament als cercadors. Activeu només les opcions que enteneu completament." "vostre posicionament als cercadors. Activeu només les opcions que enteneu "
"completament."
#: noindex-seo.php:2105 #: noindex-seo.php:3486
msgid "Search options..." msgid "Search options..."
msgstr "Cerca opcions…" msgstr "Cerca opcions…"
#: noindex-seo.php:2106 #: noindex-seo.php:3487
msgid "Search options" msgid "Search options"
msgstr "Cerca opcions" msgstr "Cerca opcions"
#: noindex-seo.php:2129 #: noindex-seo.php:3512
msgid "This option only works with HTTP Headers implementation method" msgid "This option only works with HTTP Headers implementation method"
msgstr "Aquesta opció només funciona amb el mètode d'implementació de capçaleres HTTP" msgstr ""
"Aquesta opció només funciona amb el mètode d'implementació de capçaleres HTTP"
#: noindex-seo.php:2138 #: noindex-seo.php:3521
msgid "Not Recommended" msgid "Not Recommended"
msgstr "No recomanat" msgstr "No recomanat"
#: noindex-seo.php:2143 #: noindex-seo.php:3526
msgid "View Page" msgid "View Page"
msgstr "Mostra la pàgina" msgstr "Mostra la pàgina"
#: 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 "Activeu per a establir directrius robots personalitzades per a aquest contingut" msgstr ""
"Activeu per a establir directrius robots personalitzades per a aquest "
"contingut"
#: assets/js/editor-sidebar.js:133 #: assets/js/editor-sidebar.js:133
msgid "Robots Directives:" msgid "Robots Directives:"

Binary file not shown.

View file

@ -3,12 +3,13 @@
# This file is distributed under the GPL-3.0-or-later license. # This file is distributed under the GPL-3.0-or-later license.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: noindex SEO 2.0.2\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-07-18T14:48:42+00:00\n" "POT-Creation-Date: 2026-08-17T19:24:59+00:00\n"
"PO-Revision-Date: 2026-07-18T14:50+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: Spanish (Spain) — https://translate.wordpress.org/locale/es/default/\n" "Language-Team: Spanish (Spain) — https://translate.wordpress.org/locale/es/"
"default/\n"
"Language: es_ES\n" "Language: es_ES\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"
@ -18,19 +19,25 @@ 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:509 noindex-seo.php:510 #: noindex-seo.php noindex-seo.php:1405 noindex-seo.php:1406
msgid "noindex SEO" msgid "noindex SEO"
msgstr "noindex SEO" msgstr "noindex SEO"
#. Plugin URI of the plugin #. Plugin URI of the plugin
#: noindex-seo.php #: noindex-seo.php
msgid "https://wordpress.org/plugins/noindex-seo/" msgid "https://www.robotstxt.software/plugins/noindex-seo/"
msgstr "https://wordpress.org/plugins/noindex-seo/" msgstr "https://www.robotstxt.software/plugins/noindex-seo/"
#. Description of the plugin #. Description of the plugin
#: noindex-seo.php #: noindex-seo.php
msgid "Control search engine indexing with robots directives (noindex, nofollow, noarchive, nosnippet, noimageindex) for specific parts of your WordPress site." msgid ""
msgstr "Controla la indexación en buscadores con directivas robots (noindex, nofollow, noarchive, nosnippet, noimageindex) para partes específicas de tu sitio WordPress." "Control search engine indexing with robots directives (noindex, nofollow, "
"noarchive, nosnippet, noimageindex) for specific parts of your WordPress "
"site."
msgstr ""
"Controla la indexación en buscadores con directivas robots (noindex, "
"nofollow, noarchive, nosnippet, noimageindex) para partes específicas de tu "
"sitio WordPress."
#. Author of the plugin #. Author of the plugin
#: noindex-seo.php #: noindex-seo.php
@ -39,129 +46,169 @@ msgstr "ROBOTSTXT"
#. Author URI of the plugin #. Author URI of the plugin
#: noindex-seo.php #: noindex-seo.php
msgid "https://www.robotstxt.es/" msgid "https://www.robotstxt.software/"
msgstr "https://www.robotstxt.es/" msgstr "https://www.robotstxt.software/"
#: noindex-seo.php:418 #: noindex-seo.php:1036
msgid "Post ID to compute effective directives for."
msgstr "ID de la entrada para calcular las directivas efectivas."
#: noindex-seo.php:1065
msgid "You do not have permission to read the noindex SEO settings."
msgstr "No tienes permiso para leer los ajustes de noindex SEO."
#: noindex-seo.php:1118
msgid "You do not have permission to read directives for this post."
msgstr "No tienes permiso para leer las directivas de esta entrada."
#: noindex-seo.php:1176
msgid "No post exists with that post_id."
msgstr "No existe ninguna entrada con ese post_id."
#: noindex-seo.php:1301
msgid "Settings saved successfully!" msgid "Settings saved successfully!"
msgstr "¡Ajustes guardados correctamente!" msgstr "¡Ajustes guardados correctamente!"
#: noindex-seo.php:419 #: noindex-seo.php:1302
msgid "Expand All" msgid "Expand All"
msgstr "Expandir todo" msgstr "Expandir todo"
#: noindex-seo.php:420 #: noindex-seo.php:1303
msgid "Collapse All" msgid "Collapse All"
msgstr "Contraer todo" msgstr "Contraer todo"
#: noindex-seo.php:489 #: noindex-seo.php:1385
msgid "Settings" msgid "Settings"
msgstr "Ajustes" msgstr "Ajustes"
#. translators: plugin name. #. translators: plugin name.
#: noindex-seo.php:718 #: noindex-seo.php:1627
#, php-format #, php-format
msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly." msgid ""
msgstr "noindex SEO ha detectado que %s está activo. Esto puede causar conflictos. Configura las opciones en consecuencia." "noindex SEO has detected that %s is active. This may cause conflicts. Please "
"configure the options accordingly."
msgstr ""
"noindex SEO ha detectado que %s está activo. Esto puede causar conflictos. "
"Configura las opciones en consecuencia."
#: noindex-seo.php:748 #: noindex-seo.php:1657 noindex-seo.php:1756
msgid "Permission denied or invalid nonce." msgid "Permission denied or invalid nonce."
msgstr "Permiso denegado o nonce no válido." msgstr "Permiso denegado o nonce no válido."
#: noindex-seo.php:914 assets/js/editor-sidebar.js:91 #: noindex-seo.php:1914 noindex-seo.php:2238 assets/js/editor-sidebar.js:91
msgid "Search Engine Visibility" msgid "Search Engine Visibility"
msgstr "Visibilidad en buscadores" msgstr "Visibilidad en buscadores"
#: noindex-seo.php:967 noindex-seo.php:1308 assets/js/editor-sidebar.js:102 #: noindex-seo.php:1966 noindex-seo.php:2597 assets/js/editor-sidebar.js:102
msgid "Override global settings" msgid "Override global settings"
msgstr "Sobrescribir ajustes globales" msgstr "Sobrescribir ajustes globales"
#: noindex-seo.php:972 #: noindex-seo.php:1971
msgid "When enabled, these directives will override the global settings for this specific content." msgid ""
msgstr "Al activarse, estas directivas sobrescribirán los ajustes globales para este contenido específico." "When enabled, these directives will override the global settings for this "
"specific content."
msgstr ""
"Al activarse, estas directivas sobrescribirán los ajustes globales para este "
"contenido específico."
#: noindex-seo.php:979 #: noindex-seo.php:1978
msgid "Prevent indexing" msgid "Prevent indexing"
msgstr "Evitar indexación" msgstr "Evitar indexación"
#: noindex-seo.php:984 #: noindex-seo.php:1983
msgid "Prevent link following" msgid "Prevent link following"
msgstr "Evitar seguimiento de enlaces" msgstr "Evitar seguimiento de enlaces"
#: noindex-seo.php:989 #: noindex-seo.php:1988
msgid "Prevent caching" msgid "Prevent caching"
msgstr "Evitar caché" msgstr "Evitar caché"
#: noindex-seo.php:994 #: noindex-seo.php:1993
msgid "Prevent snippets" msgid "Prevent snippets"
msgstr "Evitar snippets" msgstr "Evitar snippets"
#: noindex-seo.php:999 assets/js/editor-sidebar.js:203 #: noindex-seo.php:1998 assets/js/editor-sidebar.js:203
msgid "Prevent image indexing" msgid "Prevent image indexing"
msgstr "Evitar indexación de imágenes" msgstr "Evitar indexación de imágenes"
#: noindex-seo.php:1007 #: noindex-seo.php:2006
msgid "Effective Directives:" msgid "Effective Directives:"
msgstr "Directivas efectivas:" msgstr "Directivas efectivas:"
#: noindex-seo.php:1032 #: noindex-seo.php:2031
msgid "Override active:" msgid "Override active:"
msgstr "Sobrescritura activa:" msgstr "Sobrescritura activa:"
#: noindex-seo.php:1037 #: noindex-seo.php:2036
msgid "Override enabled but no directives selected" msgid "Override enabled but no directives selected"
msgstr "Sobrescritura activada pero sin directivas seleccionadas" msgstr "Sobrescritura activada pero sin directivas seleccionadas"
#: noindex-seo.php:1043 #: noindex-seo.php:2042
msgid "Global settings:" msgid "Global settings:"
msgstr "Ajustes globales:" msgstr "Ajustes globales:"
#: noindex-seo.php:1048 #: noindex-seo.php:2047
msgid "No restrictions (indexable)" msgid "No restrictions (indexable)"
msgstr "Sin restricciones (indexable)" msgstr "Sin restricciones (indexable)"
#: noindex-seo.php:1165 noindex-seo.php:1171 #: noindex-seo.php:2242
msgid "Override global settings for this term"
msgstr "Sobrescribir los ajustes globales para este término"
#: noindex-seo.php:2255
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 ""
"Cuando está activada la opción de sobrescribir, las directivas marcadas"
"arriba se aplican a la página de archivo de este término y prevalecen sobre"
"los ajustes globales de categorías, etiquetas y archivos."
#: noindex-seo.php:2350 noindex-seo.php:2356 noindex-seo.php:2488
#: noindex-seo.php:2494
msgid "Robots" msgid "Robots"
msgstr "Robots" msgstr "Robots"
#: noindex-seo.php:1232 #: noindex-seo.php:2417 noindex-seo.php:2543
msgid "Override (none)" msgid "Override (none)"
msgstr "Sobrescritura (ninguna)" msgstr "Sobrescritura (ninguna)"
#: noindex-seo.php:1304 #: noindex-seo.php:2593
msgid "Robots Directives" msgid "Robots Directives"
msgstr "Directivas Robots" msgstr "Directivas Robots"
#: noindex-seo.php:1313 #: noindex-seo.php:2602
msgid "🔍 noindex" msgid "🔍 noindex"
msgstr "🔍 noindex" msgstr "🔍 noindex"
#: noindex-seo.php:1317 #: noindex-seo.php:2606
msgid "🔗 nofollow" msgid "🔗 nofollow"
msgstr "🔗 nofollow" msgstr "🔗 nofollow"
#: noindex-seo.php:1321 #: noindex-seo.php:2610
msgid "💾 noarchive" msgid "💾 noarchive"
msgstr "💾 noarchive" msgstr "💾 noarchive"
#: noindex-seo.php:1325 #: noindex-seo.php:2614
msgid "📄 nosnippet" msgid "📄 nosnippet"
msgstr "📄 nosnippet" msgstr "📄 nosnippet"
#: noindex-seo.php:1329 #: noindex-seo.php:2618
msgid "🖼️ noimageindex" msgid "🖼️ noimageindex"
msgstr "🖼️ noimageindex" msgstr "🖼️ noimageindex"
#: noindex-seo.php:1440 #: noindex-seo.php:2729
msgid "Enable Robots Override" msgid "Enable Robots Override"
msgstr "Activar sobrescritura Robots" msgstr "Activar sobrescritura Robots"
#: noindex-seo.php:1441 #: noindex-seo.php:2730
msgid "Disable Robots Override" msgid "Disable Robots Override"
msgstr "Desactivar sobrescritura Robots" msgstr "Desactivar sobrescritura Robots"
#. translators: %d: Number of posts updated #. translators: %d: Number of posts updated
#: noindex-seo.php:1538 #: noindex-seo.php:2827
#, 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."
@ -169,394 +216,484 @@ msgstr[0] "Sobrescritura Robots activada para %d entrada."
msgstr[1] "Sobrescritura Robots activada para %d entradas." msgstr[1] "Sobrescritura Robots activada para %d entradas."
#. translators: %d: Number of posts updated #. translators: %d: Number of posts updated
#: noindex-seo.php:1559 #: noindex-seo.php:2848
#, 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] "Sobrescritura Robots desactivada para %d entrada." msgstr[0] "Sobrescritura Robots desactivada para %d entrada."
msgstr[1] "Sobrescritura Robots desactivada para %d entradas." msgstr[1] "Sobrescritura Robots desactivada para %d entradas."
#: noindex-seo.php:1608 #: noindex-seo.php:2897
msgid "All robots settings" msgid "All robots settings"
msgstr "Todos los ajustes robots" msgstr "Todos los ajustes robots"
#: noindex-seo.php:1610 #: noindex-seo.php:2899
msgid "With override" msgid "With override"
msgstr "Con sobrescritura" msgstr "Con sobrescritura"
#: noindex-seo.php:1613 #: noindex-seo.php:2902
msgid "Without override" msgid "Without override"
msgstr "Sin sobrescritura" msgstr "Sin sobrescritura"
#: noindex-seo.php:1727 #: noindex-seo.php:3016
msgid "You do not have sufficient permissions to access this page." msgid "You do not have sufficient permissions to access this page."
msgstr "No tienes permisos suficientes para acceder a esta página." msgstr "No tienes permisos suficientes para acceder a esta página."
#: noindex-seo.php:1728 #: noindex-seo.php:3017
msgid "Permission Denied" msgid "Permission Denied"
msgstr "Permiso denegado" msgstr "Permiso denegado"
#: noindex-seo.php:1750 #: noindex-seo.php:3039
msgid "Main Pages" msgid "Main Pages"
msgstr "Páginas principales" msgstr "Páginas principales"
#: noindex-seo.php:1753 #: noindex-seo.php:3042
msgid "Front Page" msgid "Front Page"
msgstr "Página de inicio" msgstr "Página de inicio"
#: noindex-seo.php:1754 noindex-seo.php:1761 noindex-seo.php:1773 noindex-seo.php:1779 noindex-seo.php:1786 noindex-seo.php:1792 noindex-seo.php:1803 noindex-seo.php:1809 noindex-seo.php:1820 noindex-seo.php:1826 noindex-seo.php:1832 noindex-seo.php:1838 noindex-seo.php:1844 noindex-seo.php:1855 noindex-seo.php:1861 noindex-seo.php:1867 noindex-seo.php:1878 noindex-seo.php:1889 noindex-seo.php:1900 noindex-seo.php:1911 noindex-seo.php:1917 noindex-seo.php:1928 noindex-seo.php:2136 #: noindex-seo.php:3043 noindex-seo.php:3050 noindex-seo.php:3062
#: noindex-seo.php:3068 noindex-seo.php:3075 noindex-seo.php:3081
#: noindex-seo.php:3092 noindex-seo.php:3098 noindex-seo.php:3109
#: noindex-seo.php:3115 noindex-seo.php:3121 noindex-seo.php:3127
#: noindex-seo.php:3133 noindex-seo.php:3144 noindex-seo.php:3150
#: noindex-seo.php:3156 noindex-seo.php:3167 noindex-seo.php:3178
#: noindex-seo.php:3189 noindex-seo.php:3200 noindex-seo.php:3206
#: noindex-seo.php:3217 noindex-seo.php:3241 noindex-seo.php:3519
msgid "Recommended" msgid "Recommended"
msgstr "Recomendado" msgstr "Recomendado"
#: noindex-seo.php:1756 #: noindex-seo.php:3045
msgid "Block the indexing of the site's front page." msgid "Block the indexing of the site's front page."
msgstr "Bloquear la indexación de la página de inicio del sitio." msgstr "Bloquear la indexación de la página de inicio del sitio."
#: noindex-seo.php:1760 #: noindex-seo.php:3049
msgid "Home" msgid "Home"
msgstr "Inicio" msgstr "Inicio"
#: noindex-seo.php:1763 #: noindex-seo.php:3052
msgid "Block the indexing of the site's home page." msgid "Block the indexing of the site's home page."
msgstr "Bloquear la indexación de la página principal del sitio." msgstr "Bloquear la indexación de la página principal del sitio."
#: noindex-seo.php:1769 #: noindex-seo.php:3058
msgid "Pages and Posts" msgid "Pages and Posts"
msgstr "Páginas y entradas" msgstr "Páginas y entradas"
#: noindex-seo.php:1772 #: noindex-seo.php:3061
msgid "Page" msgid "Page"
msgstr "Página" msgstr "Página"
#: noindex-seo.php:1775 #: noindex-seo.php:3064
msgid "Block the indexing of site pages." msgid "Block the indexing of site pages."
msgstr "Bloquear la indexación de las páginas del sitio." msgstr "Bloquear la indexación de las páginas del sitio."
#: noindex-seo.php:1778 #: noindex-seo.php:3067
msgid "Privacy Policy" msgid "Privacy Policy"
msgstr "Política de privacidad" msgstr "Política de privacidad"
#: noindex-seo.php:1781 #: noindex-seo.php:3070
msgid "Block the indexing of the privacy policy page." msgid "Block the indexing of the privacy policy page."
msgstr "Bloquear la indexación de la página de política de privacidad." msgstr "Bloquear la indexación de la página de política de privacidad."
#: noindex-seo.php:1785 #: noindex-seo.php:3074
msgid "Single Post" msgid "Single Post"
msgstr "Entrada individual" msgstr "Entrada individual"
#: noindex-seo.php:1788 #: noindex-seo.php:3077
msgid "Block the indexing of individual posts." msgid "Block the indexing of individual posts."
msgstr "Bloquear la indexación de entradas individuales." msgstr "Bloquear la indexación de entradas individuales."
#: noindex-seo.php:1791 #: noindex-seo.php:3080
msgid "Singular" msgid "Singular"
msgstr "Singular" msgstr "Singular"
#: noindex-seo.php:1794 #: noindex-seo.php:3083
msgid "Block the indexing of any singular content (post or page)." msgid "Block the indexing of any singular content (post or page)."
msgstr "Bloquear la indexación de cualquier contenido singular (entrada o página)." msgstr ""
"Bloquear la indexación de cualquier contenido singular (entrada o página)."
#: noindex-seo.php:1799 #: noindex-seo.php:3088
msgid "Taxonomies" msgid "Taxonomies"
msgstr "Taxonomías" msgstr "Taxonomías"
#: noindex-seo.php:1802 #: noindex-seo.php:3091
msgid "Category" msgid "Category"
msgstr "Categoría" msgstr "Categoría"
#: noindex-seo.php:1805 #: noindex-seo.php:3094
msgid "Block the indexing of category archive pages." msgid "Block the indexing of category archive pages."
msgstr "Bloquear la indexación de las páginas de archivo de categorías." msgstr "Bloquear la indexación de las páginas de archivo de categorías."
#: noindex-seo.php:1808 #: noindex-seo.php:3097
msgid "Tag" msgid "Tag"
msgstr "Etiqueta" msgstr "Etiqueta"
#: noindex-seo.php:1811 #: noindex-seo.php:3100
msgid "Block the indexing of tag archive pages." msgid "Block the indexing of tag archive pages."
msgstr "Bloquear la indexación de las páginas de archivo de etiquetas." msgstr "Bloquear la indexación de las páginas de archivo de etiquetas."
#: noindex-seo.php:1816 #: noindex-seo.php:3105
msgid "Date Archives" msgid "Date Archives"
msgstr "Archivos de fecha" msgstr "Archivos de fecha"
#: noindex-seo.php:1819 #: noindex-seo.php:3108
msgid "Date" msgid "Date"
msgstr "Fecha" msgstr "Fecha"
#: noindex-seo.php:1822 #: noindex-seo.php:3111
msgid "Block the indexing of any date-based archive page." msgid "Block the indexing of any date-based archive page."
msgstr "Bloquear la indexación de cualquier página de archivo basada en fecha." msgstr "Bloquear la indexación de cualquier página de archivo basada en fecha."
#: noindex-seo.php:1825 #: noindex-seo.php:3114
msgid "Day" msgid "Day"
msgstr "Día" msgstr "Día"
#: noindex-seo.php:1828 #: noindex-seo.php:3117
msgid "Block the indexing of daily archive pages." msgid "Block the indexing of daily archive pages."
msgstr "Bloquear la indexación de archivos diarios." msgstr "Bloquear la indexación de archivos diarios."
#: noindex-seo.php:1831 #: noindex-seo.php:3120
msgid "Month" msgid "Month"
msgstr "Mes" msgstr "Mes"
#: noindex-seo.php:1834 #: noindex-seo.php:3123
msgid "Block the indexing of monthly archive pages." msgid "Block the indexing of monthly archive pages."
msgstr "Bloquear la indexación de archivos mensuales." msgstr "Bloquear la indexación de archivos mensuales."
#: noindex-seo.php:1837 #: noindex-seo.php:3126
msgid "Time" msgid "Time"
msgstr "Hora" msgstr "Hora"
#: noindex-seo.php:1840 #: noindex-seo.php:3129
msgid "Block the indexing of time-based archive pages." msgid "Block the indexing of time-based archive pages."
msgstr "Bloquear la indexación de archivos basados en hora." msgstr "Bloquear la indexación de archivos basados en hora."
#: noindex-seo.php:1843 #: noindex-seo.php:3132
msgid "Year" msgid "Year"
msgstr "Año" msgstr "Año"
#: noindex-seo.php:1846 #: noindex-seo.php:3135
msgid "Block the indexing of yearly archive pages." msgid "Block the indexing of yearly archive pages."
msgstr "Bloquear la indexación de archivos anuales." msgstr "Bloquear la indexación de archivos anuales."
#: noindex-seo.php:1851 #: noindex-seo.php:3140
msgid "Archives" msgid "Archives"
msgstr "Archivos" msgstr "Archivos"
#: noindex-seo.php:1854 #: noindex-seo.php:3143
msgid "Archive" msgid "Archive"
msgstr "Archivo" msgstr "Archivo"
#: noindex-seo.php:1857 #: noindex-seo.php:3146
msgid "Block the indexing of any type of archive page." msgid "Block the indexing of any type of archive page."
msgstr "Bloquear la indexación de cualquier tipo de página de archivo." msgstr "Bloquear la indexación de cualquier tipo de página de archivo."
#: noindex-seo.php:1860 #: noindex-seo.php:3149
msgid "Author" msgid "Author"
msgstr "Autor" msgstr "Autor"
#: noindex-seo.php:1863 #: noindex-seo.php:3152
msgid "Block the indexing of author archive pages." msgid "Block the indexing of author archive pages."
msgstr "Bloquear la indexación de las páginas de archivo de autor." msgstr "Bloquear la indexación de las páginas de archivo de autor."
#: noindex-seo.php:1866 #: noindex-seo.php:3155
msgid "Post Type Archive" msgid "Post Type Archive"
msgstr "Archivo de tipo de contenido" msgstr "Archivo de tipo de contenido"
#: noindex-seo.php:1869 #: noindex-seo.php:3158
msgid "Block the indexing of post type archive pages." msgid "Block the indexing of post type archive pages."
msgstr "Bloquear la indexación de las páginas de archivo de tipos de contenido." msgstr ""
"Bloquear la indexación de las páginas de archivo de tipos de contenido."
#: noindex-seo.php:1874 #: noindex-seo.php:3163
msgid "Pagination" msgid "Pagination"
msgstr "Paginación" msgstr "Paginación"
#: noindex-seo.php:1877 #: noindex-seo.php:3166
msgid "Paginated Pages" msgid "Paginated Pages"
msgstr "Páginas paginadas" msgstr "Páginas paginadas"
#: noindex-seo.php:1880 #: noindex-seo.php:3169
msgid "Block the indexing of pagination pages (page 2, 3, etc.)." msgid "Block the indexing of pagination pages (page 2, 3, etc.)."
msgstr "Bloquear la indexación de las páginas de paginación (página 2, 3, etc.)." msgstr ""
"Bloquear la indexación de las páginas de paginación (página 2, 3, etc.)."
#: noindex-seo.php:1885 #: noindex-seo.php:3174
msgid "Search" msgid "Search"
msgstr "Buscar" msgstr "Buscar"
#: noindex-seo.php:1888 #: noindex-seo.php:3177
msgid "Search Results" msgid "Search Results"
msgstr "Resultados de búsqueda" msgstr "Resultados de búsqueda"
#: noindex-seo.php:1891 #: noindex-seo.php:3180
msgid "Block the indexing of search result pages." msgid "Block the indexing of search result pages."
msgstr "Bloquear la indexación de las páginas de resultados de búsqueda." msgstr "Bloquear la indexación de las páginas de resultados de búsqueda."
#: noindex-seo.php:1896 #: noindex-seo.php:3185
msgid "Attachments" msgid "Attachments"
msgstr "Adjuntos" msgstr "Adjuntos"
#: noindex-seo.php:1899 #: noindex-seo.php:3188
msgid "Attachment Pages" msgid "Attachment Pages"
msgstr "Páginas de adjuntos" msgstr "Páginas de adjuntos"
#: noindex-seo.php:1902 #: noindex-seo.php:3191
msgid "Block the indexing of attachment pages (does not affect the file itself)." msgid ""
msgstr "Bloquear la indexación de las páginas de adjuntos (no afecta al archivo en sí)." "Block the indexing of attachment pages (does not affect the file itself)."
msgstr ""
"Bloquear la indexación de las páginas de adjuntos (no afecta al archivo en "
"sí)."
#: noindex-seo.php:1907 #: noindex-seo.php:3196
msgid "Previews" msgid "Previews"
msgstr "Vistas previas" msgstr "Vistas previas"
#: noindex-seo.php:1910 #: noindex-seo.php:3199
msgid "Customize Preview" msgid "Customize Preview"
msgstr "Vista previa del personalizador" msgstr "Vista previa del personalizador"
#: noindex-seo.php:1913 #: noindex-seo.php:3202
msgid "Block the indexing when content is in customize preview mode." msgid "Block the indexing when content is in customize preview mode."
msgstr "Bloquear la indexación cuando el contenido está en modo de vista previa del personalizador." msgstr ""
"Bloquear la indexación cuando el contenido está en modo de vista previa del "
"personalizador."
#: noindex-seo.php:1916 #: noindex-seo.php:3205
msgid "Post Preview" msgid "Post Preview"
msgstr "Vista previa de entrada" msgstr "Vista previa de entrada"
#: noindex-seo.php:1919 #: noindex-seo.php:3208
msgid "Block the indexing when viewing post previews." msgid "Block the indexing when viewing post previews."
msgstr "Bloquear la indexación al ver vistas previas de entradas." msgstr "Bloquear la indexación al ver vistas previas de entradas."
#: noindex-seo.php:1924 #: noindex-seo.php:3213
msgid "Error Pages" msgid "Error Pages"
msgstr "Páginas de error" msgstr "Páginas de error"
#: noindex-seo.php:1927 #: noindex-seo.php:3216
msgid "Error 404" msgid "Error 404"
msgstr "Error 404" msgstr "Error 404"
#: noindex-seo.php:1930 #: noindex-seo.php:3219
msgid "Block the indexing of 404 error pages." msgid "Block the indexing of 404 error pages."
msgstr "Bloquear la indexación de las páginas de error 404." msgstr "Bloquear la indexación de las páginas de error 404."
#: noindex-seo.php:1953 assets/js/editor-sidebar.js:142 #. translators: %s: post type singular name.
#: noindex-seo.php:3244
#, php-format
msgid "Block the indexing of individual %s."
msgstr "Bloquear la indexación de %s individuales."
#: noindex-seo.php:3248
msgid "Custom Post Types"
msgstr "Tipos de contenido personalizados"
#: noindex-seo.php:3273 assets/js/editor-sidebar.js:142
msgid "noindex" msgid "noindex"
msgstr "noindex" msgstr "noindex"
#: noindex-seo.php:1954 #: noindex-seo.php:3274
msgid "Prevent search engines from indexing this page" msgid "Prevent search engines from indexing this page"
msgstr "Evitar que los buscadores indexen esta página" msgstr "Evitar que los buscadores indexen esta página"
#: noindex-seo.php:1958 assets/js/editor-sidebar.js:157 #: noindex-seo.php:3278 assets/js/editor-sidebar.js:157
msgid "nofollow" msgid "nofollow"
msgstr "nofollow" msgstr "nofollow"
#: noindex-seo.php:1959 #: 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 "Evitar que los buscadores sigan los enlaces en esta página" msgstr "Evitar que los buscadores sigan los enlaces en esta página"
#: noindex-seo.php:1963 assets/js/editor-sidebar.js:172 #: noindex-seo.php:3283 assets/js/editor-sidebar.js:172
msgid "noarchive" msgid "noarchive"
msgstr "noarchive" msgstr "noarchive"
#: noindex-seo.php:1964 #: noindex-seo.php:3284
msgid "Prevent search engines from showing a cached version" msgid "Prevent search engines from showing a cached version"
msgstr "Evitar que los buscadores muestren una versión en caché" msgstr "Evitar que los buscadores muestren una versión en caché"
#: noindex-seo.php:1968 assets/js/editor-sidebar.js:187 #: noindex-seo.php:3288 assets/js/editor-sidebar.js:187
msgid "nosnippet" msgid "nosnippet"
msgstr "nosnippet" msgstr "nosnippet"
#: noindex-seo.php:1969 #: noindex-seo.php:3289
msgid "Prevent search engines from showing text snippets" msgid "Prevent search engines from showing text snippets"
msgstr "Evitar que los buscadores muestren fragmentos de texto" msgstr "Evitar que los buscadores muestren fragmentos de texto"
#: noindex-seo.php:1973 assets/js/editor-sidebar.js:202 #: noindex-seo.php:3293 assets/js/editor-sidebar.js:202
msgid "noimageindex" msgid "noimageindex"
msgstr "noimageindex" msgstr "noimageindex"
#: noindex-seo.php:1974 #: noindex-seo.php:3294
msgid "Prevent search engines from indexing images" msgid "Prevent search engines from indexing images"
msgstr "Evitar que los buscadores indexen imágenes" msgstr "Evitar que los buscadores indexen imágenes"
#: noindex-seo.php:1981 #: noindex-seo.php:3301
msgid "noindex SEO Settings" msgid "noindex SEO Settings"
msgstr "Ajustes de noindex SEO" msgstr "Ajustes de noindex SEO"
#: noindex-seo.php:1982 #: noindex-seo.php:3302
msgid "Control how search engines index and display your WordPress content using robots directives." msgid ""
msgstr "Controla cómo los buscadores indexan y muestran tu contenido de WordPress usando directivas robots." "Control how search engines index and display your WordPress content using "
"robots directives."
msgstr ""
"Controla cómo los buscadores indexan y muestran tu contenido de WordPress "
"usando directivas robots."
#: noindex-seo.php:1992 #: noindex-seo.php:3313
msgid ""
"Recommended defaults applied. Review the changes below and click \"Save "
"Changes\" to keep them, or uncheck anything you do not want."
msgstr ""
"Valores recomendados aplicados. Revisa los cambios de abajo y haz clic en"
"«Guardar cambios» para conservarlos, o desmarca lo que no quieras."
#: noindex-seo.php:3329
msgid "Apply Recommended Defaults"
msgstr "Aplicar los valores recomendados"
#: noindex-seo.php:3334
msgid "Enable all directives for the 12 contexts flagged as recommended."
msgstr "Activa todas las directivas en los 12 contextos marcados como recomendados."
#: noindex-seo.php:3339
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."
msgstr ""
"Activa las 5 directivas en los 12 contextos marcados como «Recomendado»"
"(política de privacidad, archivos de fecha, paginación, resultados de"
"búsqueda, páginas de adjuntos, vistas previas y 404). Revisa y guarda."
#: noindex-seo.php:3352
msgid "Total Options" msgid "Total Options"
msgstr "Opciones totales" msgstr "Opciones totales"
#: noindex-seo.php:1996 #: noindex-seo.php:3356
msgid "Enabled" msgid "Enabled"
msgstr "Activadas" msgstr "Activadas"
#: noindex-seo.php:2000 #: noindex-seo.php:3360
msgid "Recommended to Enable" msgid "Recommended to Enable"
msgstr "Recomendadas para activar" msgstr "Recomendadas para activar"
#: noindex-seo.php:2008 #: noindex-seo.php:3368
msgid "General Configuration" msgid "General Configuration"
msgstr "Configuración general" msgstr "Configuración general"
#: noindex-seo.php:2022 #: noindex-seo.php:3382
msgid "Disable compatibility warnings with other SEO plugins" msgid "Disable compatibility warnings with other SEO plugins"
msgstr "Desactivar avisos de compatibilidad con otros plugins de SEO" msgstr "Desactivar avisos de compatibilidad con otros plugins de SEO"
#: noindex-seo.php:2029 #: noindex-seo.php:3389
msgid "Implementation Method" msgid "Implementation Method"
msgstr "Método de implementación" msgstr "Método de implementación"
#: noindex-seo.php:2037 #: noindex-seo.php:3397
msgid "HTML Meta Tags (default, easier to verify)" msgid "HTML Meta Tags (default, easier to verify)"
msgstr "Etiquetas meta HTML (predeterminado, más fácil de verificar)" msgstr "Etiquetas meta HTML (predeterminado, más fácil de verificar)"
#: noindex-seo.php:2040 #: noindex-seo.php:3400
msgid "HTTP Headers (more robust, works with PDFs/images)" msgid "HTTP Headers (more robust, works with PDFs/images)"
msgstr "Cabeceras HTTP (más robusto, funciona con PDFs/imágenes)" msgstr "Cabeceras HTTP (más robusto, funciona con PDFs/imágenes)"
#: noindex-seo.php:2043 #: noindex-seo.php:3403
msgid "Both (maximum compatibility)" msgid "Both (maximum compatibility)"
msgstr "Ambos (máxima compatibilidad)" msgstr "Ambos (máxima compatibilidad)"
#: noindex-seo.php:2047 #: noindex-seo.php:3407
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 ""
"Elige cómo se envían las directivas noindex a los buscadores. Las etiquetas meta " "Elige cómo se envían las directivas noindex a los buscadores. Las etiquetas "
"funcionan para páginas HTML. Las cabeceras HTTP funcionan para todos los tipos de " "meta funcionan para páginas HTML. Las cabeceras HTTP funcionan para todos "
"contenido, incluidos PDFs, imágenes y feeds." "los tipos de contenido, incluidos PDFs, imágenes y feeds."
#: noindex-seo.php:2065 #: noindex-seo.php:3425
msgid "Enable per-post/page granular control" msgid "Enable per-post/page granular control"
msgstr "Activar control granular por entrada/página" msgstr "Activar control granular por entrada/página"
#: noindex-seo.php:2068 #: noindex-seo.php:3428
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 ""
"Al activarse, aparecerá una meta box en el editor de entradas/páginas que te permite " "Al activarse, aparecerá una meta box en el editor de entradas/páginas que te "
"sobrescribir los ajustes globales para contenido individual. Útil para páginas " "permite sobrescribir los ajustes globales para contenido individual. Útil "
"específicas que necesitan directivas robots diferentes." "para páginas específicas que necesitan directivas robots diferentes."
#: noindex-seo.php:2086 #: noindex-seo.php:3446
msgid "Enable per-term granular control"
msgstr "Activar el control granular por término"
#: noindex-seo.php:3449
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 ""
"Cuando se activa, un panel «Visibilidad en buscadores» aparecerá en la"
"pantalla de edición de todas las taxonomías públicas (categorías, etiquetas"
"y taxonomías personalizadas como las categorías de producto de WooCommerce)."
"Resulta útil para aplicar noindex a una categoría o etiqueta concreta sin"
"afectar a las demás."
#: noindex-seo.php:3467
msgid "Delete all plugin data on uninstall" msgid "Delete all plugin data on uninstall"
msgstr "Borrar todos los datos del plugin al desinstalar" msgstr "Borrar todos los datos del plugin al desinstalar"
#: noindex-seo.php:2089 #: noindex-seo.php:3470
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 ""
"Al activarse, todos los ajustes y las directivas robots por entrada se borrarán de " "Al activarse, todos los ajustes y las directivas robots por entrada se "
"forma permanente al desinstalar el plugin. Por defecto, los datos se conservan." "borrarán de forma permanente al desinstalar el plugin. Por defecto, los "
"datos se conservan."
#: noindex-seo.php:2098 #: noindex-seo.php:3479
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 ""
"Importante: Activar noindex en las páginas equivocadas puede perjudicar tu " "Importante: Activar noindex en las páginas equivocadas puede perjudicar tu "
"posicionamiento en buscadores. Activa solo las opciones que entiendas completamente." "posicionamiento en buscadores. Activa solo las opciones que entiendas "
"completamente."
#: noindex-seo.php:2105 #: noindex-seo.php:3486
msgid "Search options..." msgid "Search options..."
msgstr "Buscar opciones…" msgstr "Buscar opciones…"
#: noindex-seo.php:2106 #: noindex-seo.php:3487
msgid "Search options" msgid "Search options"
msgstr "Buscar opciones" msgstr "Buscar opciones"
#: noindex-seo.php:2129 #: noindex-seo.php:3512
msgid "This option only works with HTTP Headers implementation method" msgid "This option only works with HTTP Headers implementation method"
msgstr "Esta opción solo funciona con el método de implementación de cabeceras HTTP" msgstr ""
"Esta opción solo funciona con el método de implementación de cabeceras HTTP"
#: noindex-seo.php:2138 #: noindex-seo.php:3521
msgid "Not Recommended" msgid "Not Recommended"
msgstr "No recomendado" msgstr "No recomendado"
#: noindex-seo.php:2143 #: noindex-seo.php:3526
msgid "View Page" msgid "View Page"
msgstr "Ver página" msgstr "Ver página"
#: 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 "Activa para establecer directivas robots personalizadas para este contenido" msgstr ""
"Activa para establecer directivas robots personalizadas para este contenido"
#: assets/js/editor-sidebar.js:133 #: assets/js/editor-sidebar.js:133
msgid "Robots Directives:" msgid "Robots Directives:"

View file

@ -2,28 +2,28 @@
# 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 2.0.2\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"
"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-07-18T14:48:42+00:00\n" "POT-Creation-Date: 2026-08-17T19:24:59+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:509 #: noindex-seo.php:1405
#: noindex-seo.php:510 #: noindex-seo.php:1406
msgid "noindex SEO" msgid "noindex SEO"
msgstr "" msgstr ""
#. Plugin URI of the plugin #. Plugin URI of the plugin
#: noindex-seo.php #: noindex-seo.php
msgid "https://wordpress.org/plugins/noindex-seo/" msgid "https://www.robotstxt.software/plugins/noindex-seo/"
msgstr "" msgstr ""
#. Description of the plugin #. Description of the plugin
@ -38,134 +38,163 @@ msgstr ""
#. Author URI of the plugin #. Author URI of the plugin
#: noindex-seo.php #: noindex-seo.php
msgid "https://www.robotstxt.es/" msgid "https://www.robotstxt.software/"
msgstr "" msgstr ""
#: noindex-seo.php:418 #: noindex-seo.php:1036
msgid "Post ID to compute effective directives for."
msgstr ""
#: noindex-seo.php:1065
msgid "You do not have permission to read the noindex SEO settings."
msgstr ""
#: noindex-seo.php:1118
msgid "You do not have permission to read directives for this post."
msgstr ""
#: noindex-seo.php:1176
msgid "No post exists with that post_id."
msgstr ""
#: noindex-seo.php:1301
msgid "Settings saved successfully!" msgid "Settings saved successfully!"
msgstr "" msgstr ""
#: noindex-seo.php:419 #: noindex-seo.php:1302
msgid "Expand All" msgid "Expand All"
msgstr "" msgstr ""
#: noindex-seo.php:420 #: noindex-seo.php:1303
msgid "Collapse All" msgid "Collapse All"
msgstr "" msgstr ""
#: noindex-seo.php:489 #: noindex-seo.php:1385
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
#. translators: plugin name. #. translators: plugin name.
#: noindex-seo.php:718 #: noindex-seo.php:1627
#, 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:748 #: noindex-seo.php:1657
#: noindex-seo.php:1756
msgid "Permission denied or invalid nonce." msgid "Permission denied or invalid nonce."
msgstr "" msgstr ""
#: noindex-seo.php:914 #: noindex-seo.php:1914
#: noindex-seo.php:2238
#: 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:967 #: noindex-seo.php:1966
#: noindex-seo.php:1308 #: noindex-seo.php:2597
#: 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:972 #: noindex-seo.php:1971
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:979 #: noindex-seo.php:1978
msgid "Prevent indexing" msgid "Prevent indexing"
msgstr "" msgstr ""
#: noindex-seo.php:984 #: noindex-seo.php:1983
msgid "Prevent link following" msgid "Prevent link following"
msgstr "" msgstr ""
#: noindex-seo.php:989 #: noindex-seo.php:1988
msgid "Prevent caching" msgid "Prevent caching"
msgstr "" msgstr ""
#: noindex-seo.php:994 #: noindex-seo.php:1993
msgid "Prevent snippets" msgid "Prevent snippets"
msgstr "" msgstr ""
#: noindex-seo.php:999 #: noindex-seo.php:1998
#: 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:1007 #: noindex-seo.php:2006
msgid "Effective Directives:" msgid "Effective Directives:"
msgstr "" msgstr ""
#: noindex-seo.php:1032 #: noindex-seo.php:2031
msgid "Override active:" msgid "Override active:"
msgstr "" msgstr ""
#: noindex-seo.php:1037 #: noindex-seo.php:2036
msgid "Override enabled but no directives selected" msgid "Override enabled but no directives selected"
msgstr "" msgstr ""
#: noindex-seo.php:1043 #: noindex-seo.php:2042
msgid "Global settings:" msgid "Global settings:"
msgstr "" msgstr ""
#: noindex-seo.php:1048 #: noindex-seo.php:2047
msgid "No restrictions (indexable)" msgid "No restrictions (indexable)"
msgstr "" msgstr ""
#: noindex-seo.php:1165 #: noindex-seo.php:2242
#: noindex-seo.php:1171 msgid "Override global settings for this term"
msgstr ""
#: noindex-seo.php:2255
msgid "When override is enabled, the directives checked above apply to this term's archive page and take precedence over the global category / tag / archive settings."
msgstr ""
#: noindex-seo.php:2350
#: noindex-seo.php:2356
#: noindex-seo.php:2488
#: noindex-seo.php:2494
msgid "Robots" msgid "Robots"
msgstr "" msgstr ""
#: noindex-seo.php:1232 #: noindex-seo.php:2417
#: noindex-seo.php:2543
msgid "Override (none)" msgid "Override (none)"
msgstr "" msgstr ""
#: noindex-seo.php:1304 #: noindex-seo.php:2593
msgid "Robots Directives" msgid "Robots Directives"
msgstr "" msgstr ""
#: noindex-seo.php:1313 #: noindex-seo.php:2602
msgid "🔍 noindex" msgid "🔍 noindex"
msgstr "" msgstr ""
#: noindex-seo.php:1317 #: noindex-seo.php:2606
msgid "🔗 nofollow" msgid "🔗 nofollow"
msgstr "" msgstr ""
#: noindex-seo.php:1321 #: noindex-seo.php:2610
msgid "💾 noarchive" msgid "💾 noarchive"
msgstr "" msgstr ""
#: noindex-seo.php:1325 #: noindex-seo.php:2614
msgid "📄 nosnippet" msgid "📄 nosnippet"
msgstr "" msgstr ""
#: noindex-seo.php:1329 #: noindex-seo.php:2618
msgid "🖼️ noimageindex" msgid "🖼️ noimageindex"
msgstr "" msgstr ""
#: noindex-seo.php:1440 #: noindex-seo.php:2729
msgid "Enable Robots Override" msgid "Enable Robots Override"
msgstr "" msgstr ""
#: noindex-seo.php:1441 #: noindex-seo.php:2730
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:1538 #: noindex-seo.php:2827
#, 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."
@ -173,405 +202,440 @@ msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#. translators: %d: Number of posts updated #. translators: %d: Number of posts updated
#: noindex-seo.php:1559 #: noindex-seo.php:2848
#, 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:1608 #: noindex-seo.php:2897
msgid "All robots settings" msgid "All robots settings"
msgstr "" msgstr ""
#: noindex-seo.php:1610 #: noindex-seo.php:2899
msgid "With override" msgid "With override"
msgstr "" msgstr ""
#: noindex-seo.php:1613 #: noindex-seo.php:2902
msgid "Without override" msgid "Without override"
msgstr "" msgstr ""
#: noindex-seo.php:1727 #: noindex-seo.php:3016
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:1728 #: noindex-seo.php:3017
msgid "Permission Denied" msgid "Permission Denied"
msgstr "" msgstr ""
#: noindex-seo.php:1750 #: noindex-seo.php:3039
msgid "Main Pages" msgid "Main Pages"
msgstr "" msgstr ""
#: noindex-seo.php:1753 #: noindex-seo.php:3042
msgid "Front Page" msgid "Front Page"
msgstr "" msgstr ""
#: noindex-seo.php:1754 #: noindex-seo.php:3043
#: noindex-seo.php:1761 #: noindex-seo.php:3050
#: noindex-seo.php:1773 #: noindex-seo.php:3062
#: noindex-seo.php:1779 #: noindex-seo.php:3068
#: noindex-seo.php:1786 #: noindex-seo.php:3075
#: noindex-seo.php:1792 #: noindex-seo.php:3081
#: noindex-seo.php:1803 #: noindex-seo.php:3092
#: noindex-seo.php:1809 #: noindex-seo.php:3098
#: noindex-seo.php:1820 #: noindex-seo.php:3109
#: noindex-seo.php:1826 #: noindex-seo.php:3115
#: noindex-seo.php:1832 #: noindex-seo.php:3121
#: noindex-seo.php:1838 #: noindex-seo.php:3127
#: noindex-seo.php:1844 #: noindex-seo.php:3133
#: noindex-seo.php:1855 #: noindex-seo.php:3144
#: noindex-seo.php:1861 #: noindex-seo.php:3150
#: noindex-seo.php:1867 #: noindex-seo.php:3156
#: noindex-seo.php:1878 #: noindex-seo.php:3167
#: noindex-seo.php:1889 #: noindex-seo.php:3178
#: noindex-seo.php:1900 #: noindex-seo.php:3189
#: noindex-seo.php:1911 #: noindex-seo.php:3200
#: noindex-seo.php:1917 #: noindex-seo.php:3206
#: noindex-seo.php:1928 #: noindex-seo.php:3217
#: noindex-seo.php:2136 #: noindex-seo.php:3241
#: noindex-seo.php:3519
msgid "Recommended" msgid "Recommended"
msgstr "" msgstr ""
#: noindex-seo.php:1756 #: noindex-seo.php:3045
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:1760 #: noindex-seo.php:3049
msgid "Home" msgid "Home"
msgstr "" msgstr ""
#: noindex-seo.php:1763 #: noindex-seo.php:3052
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:1769 #: noindex-seo.php:3058
msgid "Pages and Posts" msgid "Pages and Posts"
msgstr "" msgstr ""
#: noindex-seo.php:1772 #: noindex-seo.php:3061
msgid "Page" msgid "Page"
msgstr "" msgstr ""
#: noindex-seo.php:1775 #: noindex-seo.php:3064
msgid "Block the indexing of site pages." msgid "Block the indexing of site pages."
msgstr "" msgstr ""
#: noindex-seo.php:1778 #: noindex-seo.php:3067
msgid "Privacy Policy" msgid "Privacy Policy"
msgstr "" msgstr ""
#: noindex-seo.php:1781 #: noindex-seo.php:3070
msgid "Block the indexing of the privacy policy page." msgid "Block the indexing of the privacy policy page."
msgstr "" msgstr ""
#: noindex-seo.php:1785 #: noindex-seo.php:3074
msgid "Single Post" msgid "Single Post"
msgstr "" msgstr ""
#: noindex-seo.php:1788 #: noindex-seo.php:3077
msgid "Block the indexing of individual posts." msgid "Block the indexing of individual posts."
msgstr "" msgstr ""
#: noindex-seo.php:1791 #: noindex-seo.php:3080
msgid "Singular" msgid "Singular"
msgstr "" msgstr ""
#: noindex-seo.php:1794 #: noindex-seo.php:3083
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:1799 #: noindex-seo.php:3088
msgid "Taxonomies" msgid "Taxonomies"
msgstr "" msgstr ""
#: noindex-seo.php:1802 #: noindex-seo.php:3091
msgid "Category" msgid "Category"
msgstr "" msgstr ""
#: noindex-seo.php:1805 #: noindex-seo.php:3094
msgid "Block the indexing of category archive pages." msgid "Block the indexing of category archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:1808 #: noindex-seo.php:3097
msgid "Tag" msgid "Tag"
msgstr "" msgstr ""
#: noindex-seo.php:1811 #: noindex-seo.php:3100
msgid "Block the indexing of tag archive pages." msgid "Block the indexing of tag archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:1816 #: noindex-seo.php:3105
msgid "Date Archives" msgid "Date Archives"
msgstr "" msgstr ""
#: noindex-seo.php:1819 #: noindex-seo.php:3108
msgid "Date" msgid "Date"
msgstr "" msgstr ""
#: noindex-seo.php:1822 #: noindex-seo.php:3111
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:1825 #: noindex-seo.php:3114
msgid "Day" msgid "Day"
msgstr "" msgstr ""
#: noindex-seo.php:1828 #: noindex-seo.php:3117
msgid "Block the indexing of daily archive pages." msgid "Block the indexing of daily archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:1831 #: noindex-seo.php:3120
msgid "Month" msgid "Month"
msgstr "" msgstr ""
#: noindex-seo.php:1834 #: noindex-seo.php:3123
msgid "Block the indexing of monthly archive pages." msgid "Block the indexing of monthly archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:1837 #: noindex-seo.php:3126
msgid "Time" msgid "Time"
msgstr "" msgstr ""
#: noindex-seo.php:1840 #: noindex-seo.php:3129
msgid "Block the indexing of time-based archive pages." msgid "Block the indexing of time-based archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:1843 #: noindex-seo.php:3132
msgid "Year" msgid "Year"
msgstr "" msgstr ""
#: noindex-seo.php:1846 #: noindex-seo.php:3135
msgid "Block the indexing of yearly archive pages." msgid "Block the indexing of yearly archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:1851 #: noindex-seo.php:3140
msgid "Archives" msgid "Archives"
msgstr "" msgstr ""
#: noindex-seo.php:1854 #: noindex-seo.php:3143
msgid "Archive" msgid "Archive"
msgstr "" msgstr ""
#: noindex-seo.php:1857 #: noindex-seo.php:3146
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:1860 #: noindex-seo.php:3149
msgid "Author" msgid "Author"
msgstr "" msgstr ""
#: noindex-seo.php:1863 #: noindex-seo.php:3152
msgid "Block the indexing of author archive pages." msgid "Block the indexing of author archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:1866 #: noindex-seo.php:3155
msgid "Post Type Archive" msgid "Post Type Archive"
msgstr "" msgstr ""
#: noindex-seo.php:1869 #: noindex-seo.php:3158
msgid "Block the indexing of post type archive pages." msgid "Block the indexing of post type archive pages."
msgstr "" msgstr ""
#: noindex-seo.php:1874 #: noindex-seo.php:3163
msgid "Pagination" msgid "Pagination"
msgstr "" msgstr ""
#: noindex-seo.php:1877 #: noindex-seo.php:3166
msgid "Paginated Pages" msgid "Paginated Pages"
msgstr "" msgstr ""
#: noindex-seo.php:1880 #: noindex-seo.php:3169
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:1885 #: noindex-seo.php:3174
msgid "Search" msgid "Search"
msgstr "" msgstr ""
#: noindex-seo.php:1888 #: noindex-seo.php:3177
msgid "Search Results" msgid "Search Results"
msgstr "" msgstr ""
#: noindex-seo.php:1891 #: noindex-seo.php:3180
msgid "Block the indexing of search result pages." msgid "Block the indexing of search result pages."
msgstr "" msgstr ""
#: noindex-seo.php:1896 #: noindex-seo.php:3185
msgid "Attachments" msgid "Attachments"
msgstr "" msgstr ""
#: noindex-seo.php:1899 #: noindex-seo.php:3188
msgid "Attachment Pages" msgid "Attachment Pages"
msgstr "" msgstr ""
#: noindex-seo.php:1902 #: noindex-seo.php:3191
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:1907 #: noindex-seo.php:3196
msgid "Previews" msgid "Previews"
msgstr "" msgstr ""
#: noindex-seo.php:1910 #: noindex-seo.php:3199
msgid "Customize Preview" msgid "Customize Preview"
msgstr "" msgstr ""
#: noindex-seo.php:1913 #: noindex-seo.php:3202
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:1916 #: noindex-seo.php:3205
msgid "Post Preview" msgid "Post Preview"
msgstr "" msgstr ""
#: noindex-seo.php:1919 #: noindex-seo.php:3208
msgid "Block the indexing when viewing post previews." msgid "Block the indexing when viewing post previews."
msgstr "" msgstr ""
#: noindex-seo.php:1924 #: noindex-seo.php:3213
msgid "Error Pages" msgid "Error Pages"
msgstr "" msgstr ""
#: noindex-seo.php:1927 #: noindex-seo.php:3216
msgid "Error 404" msgid "Error 404"
msgstr "" msgstr ""
#: noindex-seo.php:1930 #: noindex-seo.php:3219
msgid "Block the indexing of 404 error pages." msgid "Block the indexing of 404 error pages."
msgstr "" msgstr ""
#: noindex-seo.php:1953 #. translators: %s: post type singular name.
#: noindex-seo.php:3244
#, php-format
msgid "Block the indexing of individual %s."
msgstr ""
#: noindex-seo.php:3248
msgid "Custom Post Types"
msgstr ""
#: noindex-seo.php:3273
#: assets/js/editor-sidebar.js:142 #: assets/js/editor-sidebar.js:142
msgid "noindex" msgid "noindex"
msgstr "" msgstr ""
#: noindex-seo.php:1954 #: noindex-seo.php:3274
msgid "Prevent search engines from indexing this page" msgid "Prevent search engines from indexing this page"
msgstr "" msgstr ""
#: noindex-seo.php:1958 #: noindex-seo.php:3278
#: assets/js/editor-sidebar.js:157 #: assets/js/editor-sidebar.js:157
msgid "nofollow" msgid "nofollow"
msgstr "" msgstr ""
#: noindex-seo.php:1959 #: 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:1963 #: noindex-seo.php:3283
#: assets/js/editor-sidebar.js:172 #: assets/js/editor-sidebar.js:172
msgid "noarchive" msgid "noarchive"
msgstr "" msgstr ""
#: noindex-seo.php:1964 #: 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:1968 #: noindex-seo.php:3288
#: assets/js/editor-sidebar.js:187 #: assets/js/editor-sidebar.js:187
msgid "nosnippet" msgid "nosnippet"
msgstr "" msgstr ""
#: noindex-seo.php:1969 #: 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:1973 #: noindex-seo.php:3293
#: assets/js/editor-sidebar.js:202 #: assets/js/editor-sidebar.js:202
msgid "noimageindex" msgid "noimageindex"
msgstr "" msgstr ""
#: noindex-seo.php:1974 #: noindex-seo.php:3294
msgid "Prevent search engines from indexing images" msgid "Prevent search engines from indexing images"
msgstr "" msgstr ""
#: noindex-seo.php:1981 #: noindex-seo.php:3301
msgid "noindex SEO Settings" msgid "noindex SEO Settings"
msgstr "" msgstr ""
#: noindex-seo.php:1982 #: noindex-seo.php:3302
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:1992 #: noindex-seo.php:3313
msgid "Recommended defaults applied. Review the changes below and click \"Save Changes\" to keep them, or uncheck anything you do not want."
msgstr ""
#: noindex-seo.php:3329
msgid "Apply Recommended Defaults"
msgstr ""
#: noindex-seo.php:3334
msgid "Enable all directives for the 12 contexts flagged as recommended."
msgstr ""
#: noindex-seo.php:3339
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."
msgstr ""
#: noindex-seo.php:3352
msgid "Total Options" msgid "Total Options"
msgstr "" msgstr ""
#: noindex-seo.php:1996 #: noindex-seo.php:3356
msgid "Enabled" msgid "Enabled"
msgstr "" msgstr ""
#: noindex-seo.php:2000 #: noindex-seo.php:3360
msgid "Recommended to Enable" msgid "Recommended to Enable"
msgstr "" msgstr ""
#: noindex-seo.php:2008 #: noindex-seo.php:3368
msgid "General Configuration" msgid "General Configuration"
msgstr "" msgstr ""
#: noindex-seo.php:2022 #: noindex-seo.php:3382
msgid "Disable compatibility warnings with other SEO plugins" msgid "Disable compatibility warnings with other SEO plugins"
msgstr "" msgstr ""
#: noindex-seo.php:2029 #: noindex-seo.php:3389
msgid "Implementation Method" msgid "Implementation Method"
msgstr "" msgstr ""
#: noindex-seo.php:2037 #: noindex-seo.php:3397
msgid "HTML Meta Tags (default, easier to verify)" msgid "HTML Meta Tags (default, easier to verify)"
msgstr "" msgstr ""
#: noindex-seo.php:2040 #: noindex-seo.php:3400
msgid "HTTP Headers (more robust, works with PDFs/images)" msgid "HTTP Headers (more robust, works with PDFs/images)"
msgstr "" msgstr ""
#: noindex-seo.php:2043 #: noindex-seo.php:3403
msgid "Both (maximum compatibility)" msgid "Both (maximum compatibility)"
msgstr "" msgstr ""
#: noindex-seo.php:2047 #: noindex-seo.php:3407
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:2065 #: noindex-seo.php:3425
msgid "Enable per-post/page granular control" msgid "Enable per-post/page granular control"
msgstr "" msgstr ""
#: noindex-seo.php:2068 #: noindex-seo.php:3428
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:2086 #: noindex-seo.php:3446
msgid "Enable per-term granular control"
msgstr ""
#: noindex-seo.php:3449
msgid "When enabled, a \"Search Engine Visibility\" panel will appear on the Edit screen for every public taxonomy (categories, tags, and custom taxonomies like WooCommerce product categories). Useful for noindexing a specific category or tag without affecting the others."
msgstr ""
#: noindex-seo.php:3467
msgid "Delete all plugin data on uninstall" msgid "Delete all plugin data on uninstall"
msgstr "" msgstr ""
#: noindex-seo.php:2089 #: noindex-seo.php:3470
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:2098 #: noindex-seo.php:3479
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:2105 #: noindex-seo.php:3486
msgid "Search options..." msgid "Search options..."
msgstr "" msgstr ""
#: noindex-seo.php:2106 #: noindex-seo.php:3487
msgid "Search options" msgid "Search options"
msgstr "" msgstr ""
#: noindex-seo.php:2129 #: noindex-seo.php:3512
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:2138 #: noindex-seo.php:3521
msgid "Not Recommended" msgid "Not Recommended"
msgstr "" msgstr ""
#: noindex-seo.php:2143 #: noindex-seo.php:3526
msgid "View Page" msgid "View Page"
msgstr "" msgstr ""

View file

@ -1,13 +1,13 @@
<?php <?php
/** /**
* Plugin Name: noindex SEO * Plugin Name: noindex SEO
* Plugin URI: https://wordpress.org/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.
* Requires at least: 5.7 * Version: 3.1.3
* Requires PHP: 7.2 * Requires at least: 4.0
* Version: 3.1.2 * Requires PHP: 5.6
* Author: ROBOTSTXT * Author: ROBOTSTXT
* Author URI: https://www.robotstxt.es/ * Author URI: https://www.robotstxt.software/
* 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
* Text Domain: noindex-seo * Text Domain: noindex-seo
@ -16,8 +16,6 @@
* @package noindex-seo * @package noindex-seo
*/ */
declare(strict_types=1);
defined( 'ABSPATH' ) || die( 'Bye bye!' ); defined( 'ABSPATH' ) || die( 'Bye bye!' );
/** /**
@ -56,8 +54,14 @@ defined( 'ABSPATH' ) || die( 'Bye bye!' );
* compliance), added load_plugin_textdomain() for bundled * compliance), added load_plugin_textdomain() for bundled
* translations, pinned all dev dependencies, wired up coverage * translations, pinned all dev dependencies, wired up coverage
* measurement, refreshed project docs. * measurement, refreshed project docs.
* @since 3.1.3 Compatibility release: PHP 5.6-8.5 and WordPress 4.0-7.1
* supported (declared floors now match reality — the pre-5.7
* <meta name="robots"> fallback covers WordPress versions
* without the wp_robots API, and every newer-API integration
* degrades gracefully). Branding moved to robotstxt.software
* (Plugin URI / Author URI).
*/ */
define( 'NOINDEX_SEO_VERSION', '3.1.2' ); define( 'NOINDEX_SEO_VERSION', '3.1.3' );
/** /**
* Option key holding the consolidated plugin settings array. * Option key holding the consolidated plugin settings array.
@ -93,7 +97,7 @@ define( 'NOINDEX_SEO_SETTINGS_KEY', 'noindex_seo_settings' );
* } * }
* } * }
*/ */
function noindex_seo_get_settings( bool $force_refresh = false ): array { function noindex_seo_get_settings( $force_refresh = false ) {
static $cached = null; static $cached = null;
if ( null !== $cached && ! $force_refresh ) { if ( null !== $cached && ! $force_refresh ) {
@ -173,7 +177,7 @@ function noindex_seo_get_settings( bool $force_refresh = false ): array {
* @param string $directive Directive slug (noindex|nofollow|noarchive|nosnippet|noimageindex). * @param string $directive Directive slug (noindex|nofollow|noarchive|nosnippet|noimageindex).
* @return int 1 if the directive is active for the context, 0 otherwise. * @return int 1 if the directive is active for the context, 0 otherwise.
*/ */
function noindex_seo_get_setting( string $context, string $directive ): int { function noindex_seo_get_setting( $context, $directive ) {
$settings = noindex_seo_get_settings(); $settings = noindex_seo_get_settings();
if ( ! isset( $settings['contexts'][ $context ][ $directive ] ) ) { if ( ! isset( $settings['contexts'][ $context ][ $directive ] ) ) {
return 0; return 0;
@ -190,7 +194,7 @@ function noindex_seo_get_setting( string $context, string $directive ): int {
* @param mixed $fallback Default if the key is missing. * @param mixed $fallback Default if the key is missing.
* @return mixed * @return mixed
*/ */
function noindex_seo_get_config( string $key, $fallback = null ) { function noindex_seo_get_config( $key, $fallback = null ) {
$settings = noindex_seo_get_settings(); $settings = noindex_seo_get_settings();
if ( ! isset( $settings['config'][ $key ] ) ) { if ( ! isset( $settings['config'][ $key ] ) ) {
return $fallback; return $fallback;
@ -206,7 +210,7 @@ function noindex_seo_get_config( string $key, $fallback = null ) {
* @param array<string, mixed> $settings Settings array (same shape as noindex_seo_get_settings()). * @param array<string, mixed> $settings Settings array (same shape as noindex_seo_get_settings()).
* @return void * @return void
*/ */
function noindex_seo_update_settings( array $settings ): void { function noindex_seo_update_settings( array $settings ) {
// Keep the version tag current. // Keep the version tag current.
$settings['version'] = 3; $settings['version'] = 3;
update_option( NOINDEX_SEO_SETTINGS_KEY, $settings ); update_option( NOINDEX_SEO_SETTINGS_KEY, $settings );
@ -230,9 +234,12 @@ function noindex_seo_update_settings( array $settings ): void {
* The meta tag method is more visible and easier for users to verify. * The meta tag method is more visible and easier for users to verify.
* *
* @since 1.1.0 * @since 1.1.0
* @since 2.0.0 Removed fallback for WordPress < 5.7. Requires WP 5.7+ (the 6.6 minimum in the 2.0.0 header was overly conservative; corrected in 2.0.1).
* @since 2.0.0 Added support for HTTP X-Robots-Tag headers and multiple implementation methods. * @since 2.0.0 Added support for HTTP X-Robots-Tag headers and multiple implementation methods.
* @since 2.0.0 Added support for multiple directives (noindex, nofollow, noarchive, nosnippet, noimageindex). * @since 2.0.0 Added support for multiple directives (noindex, nofollow, noarchive, nosnippet, noimageindex).
* @since 3.1.3 Restored the fallback for WordPress < 5.7: directives are
* printed as a classic <meta name="robots"> tag on wp_head when
* the wp_robots API is not available, so the plugin works from
* WordPress 4.0 again.
* *
* @see https://developer.wordpress.org/reference/hooks/wp_robots/ * @see https://developer.wordpress.org/reference/hooks/wp_robots/
* @see https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag * @see https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag
@ -241,7 +248,7 @@ function noindex_seo_update_settings( array $settings ): void {
* @param array<int, string> $directives Array of directives to apply. Default array('noindex'). * @param array<int, string> $directives Array of directives to apply. Default array('noindex').
* @return void * @return void
*/ */
function noindex_seo_metarobots( string $method = 'meta', array $directives = array( 'noindex' ) ): void { function noindex_seo_metarobots( $method = 'meta', array $directives = array( 'noindex' ) ) {
// Sanitize method. // Sanitize method.
$valid_methods = array( 'meta', 'header', 'both' ); $valid_methods = array( 'meta', 'header', 'both' );
$method = in_array( $method, $valid_methods, true ) ? $method : 'meta'; $method = in_array( $method, $valid_methods, true ) ? $method : 'meta';
@ -268,10 +275,17 @@ function noindex_seo_metarobots( string $method = 'meta', array $directives = ar
$use_meta = in_array( $method, array( 'meta', 'both' ), true ); $use_meta = in_array( $method, array( 'meta', 'both' ), true );
$fallback_needed = in_array( $method, array( 'header', 'both' ), true ) && ! $header_sent; $fallback_needed = in_array( $method, array( 'header', 'both' ), true ) && ! $header_sent;
if ( $use_meta || $fallback_needed ) { if ( ! ( $use_meta || $fallback_needed ) ) {
return;
}
if ( function_exists( 'wp_robots' ) ) {
// 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.
/* @phpstan-ignore WPCompat.filterNotAvailable.wprobots */
add_filter( add_filter(
'wp_robots', 'wp_robots',
function ( array $robots ) use ( $directives ): array { function ( array $robots ) use ( $directives ) {
foreach ( $directives as $directive ) { foreach ( $directives as $directive ) {
$robots[ $directive ] = true; $robots[ $directive ] = true;
} }
@ -279,7 +293,18 @@ function noindex_seo_metarobots( string $method = 'meta', array $directives = ar
}, },
99 // High priority to ensure our directives take precedence over other plugins. 99 // High priority to ensure our directives take precedence over other plugins.
); );
return;
} }
// WordPress 4.0 - 5.6: classic <meta name="robots"> tag on wp_head.
add_action(
'wp_head',
function () use ( $directives ) {
echo '<meta name="robots" content="' . esc_attr( implode( ', ', $directives ) ) . '">' . "\n";
},
1 // Early, so the tag sits near the top of the head like core output.
);
} }
/** /**
@ -293,7 +318,7 @@ function noindex_seo_metarobots( string $method = 'meta', array $directives = ar
* @param int $post_id The post ID to clear directives for. * @param int $post_id The post ID to clear directives for.
* @return void * @return void
*/ */
function noindex_seo_clear_post_directives( int $post_id ): void { function noindex_seo_clear_post_directives( $post_id ) {
$directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
foreach ( $directives as $directive ) { foreach ( $directives as $directive ) {
delete_post_meta( $post_id, '_noindex_seo_' . $directive ); delete_post_meta( $post_id, '_noindex_seo_' . $directive );
@ -320,7 +345,7 @@ function noindex_seo_clear_post_directives( int $post_id ): void {
* *
* @return void * @return void
*/ */
function noindex_seo_show(): void { function noindex_seo_show() {
/** /**
* Filter the contexts and corresponding option keys used for robots directives. * Filter the contexts and corresponding option keys used for robots directives.
* *
@ -410,7 +435,8 @@ function noindex_seo_show(): void {
// Runs after per-post (more specific) but before the global context settings. // Runs after per-post (more specific) but before the global context settings.
// Triggered on is_category() / is_tag() / is_tax() when 'taxonomies_granular' // Triggered on is_category() / is_tag() / is_tax() when 'taxonomies_granular'
// is on AND the queried term has the override flag set in term meta. // is on AND the queried term has the override flag set in term meta.
if ( noindex_seo_get_config( 'taxonomies_granular', 0 ) && ( is_category() || is_tag() || is_tax() ) ) { // Term meta requires WordPress 4.4+; on older versions this branch is skipped.
if ( function_exists( 'get_term_meta' ) && noindex_seo_get_config( 'taxonomies_granular', 0 ) && ( is_category() || is_tag() || is_tax() ) ) {
$term_id = get_queried_object_id(); $term_id = get_queried_object_id();
if ( $term_id ) { if ( $term_id ) {
$term_override = get_term_meta( $term_id, '_noindex_seo_override', true ); $term_override = get_term_meta( $term_id, '_noindex_seo_override', true );
@ -499,7 +525,7 @@ function noindex_seo_show(): void {
'single' => is_single(), 'single' => is_single(),
'page' => is_page(), 'page' => is_page(),
'attachment' => is_attachment(), 'attachment' => is_attachment(),
'privacy_policy' => is_privacy_policy(), 'privacy_policy' => function_exists( 'is_privacy_policy' ) && is_privacy_policy(),
'category' => is_category(), 'category' => is_category(),
'tag' => is_tag(), 'tag' => is_tag(),
'author' => is_author(), 'author' => is_author(),
@ -517,7 +543,7 @@ function noindex_seo_show(): void {
'singular' => is_singular() && ! ( is_single() || is_page() || is_attachment() ), 'singular' => is_singular() && ! ( is_single() || is_page() || is_attachment() ),
'paged' => is_paged() && ! is_front_page() && ! is_home(), 'paged' => is_paged() && ! is_front_page() && ! is_home(),
'preview' => is_preview(), 'preview' => is_preview(),
'customize_preview' => is_customize_preview(), 'customize_preview' => function_exists( 'is_customize_preview' ) && is_customize_preview(),
); );
// Get implementation method configuration. // Get implementation method configuration.
@ -575,7 +601,7 @@ function noindex_seo_show(): void {
* *
* @return void * @return void
*/ */
function noindex_seo_check_migration(): void { function noindex_seo_check_migration() {
$current_config_version = get_option( 'noindex_seo_config_version', 0 ); $current_config_version = get_option( 'noindex_seo_config_version', 0 );
// Check if we need to migrate to version 2. // Check if we need to migrate to version 2.
@ -612,7 +638,7 @@ function noindex_seo_check_migration(): void {
* *
* @return void * @return void
*/ */
function noindex_seo_migrate_to_v2(): void { function noindex_seo_migrate_to_v2() {
$contexts = noindex_seo_get_contexts(); $contexts = noindex_seo_get_contexts();
$new_directives = array( 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); $new_directives = array( 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
@ -664,7 +690,7 @@ function noindex_seo_migrate_to_v2(): void {
* *
* @return void * @return void
*/ */
function noindex_seo_migrate_to_v3(): void { function noindex_seo_migrate_to_v3() {
$contexts = noindex_seo_get_contexts(); $contexts = noindex_seo_get_contexts();
$directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
@ -765,7 +791,7 @@ add_action( 'init', 'noindex_seo_load_textdomain' );
* *
* @return void * @return void
*/ */
function noindex_seo_load_textdomain(): void { function noindex_seo_load_textdomain() {
load_plugin_textdomain( load_plugin_textdomain(
'noindex-seo', 'noindex-seo',
false, false,
@ -798,7 +824,7 @@ function noindex_seo_load_textdomain(): void {
* @param string $post_type Post type being listed. * @param string $post_type Post type being listed.
* @return array<string, mixed> Filtered arguments. * @return array<string, mixed> Filtered arguments.
*/ */
function noindex_seo_filter_sitemap_posts( array $args, string $post_type ): array { function noindex_seo_filter_sitemap_posts( array $args, $post_type ) {
// Layer 1: whole-post-type exclusion via global context settings. // Layer 1: whole-post-type exclusion via global context settings.
// 'singular' is the catch-all — if it is noindexed, hide everything. // 'singular' is the catch-all — if it is noindexed, hide everything.
if ( 1 === noindex_seo_get_setting( 'singular', 'noindex' ) ) { if ( 1 === noindex_seo_get_setting( 'singular', 'noindex' ) ) {
@ -854,6 +880,8 @@ function noindex_seo_filter_sitemap_posts( array $args, string $post_type ): arr
return $args; return $args;
} }
// 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 );
/** /**
@ -875,7 +903,7 @@ add_filter( 'wp_sitemaps_posts_query_args', 'noindex_seo_filter_sitemap_posts',
* @param string $taxonomy Taxonomy being listed. * @param string $taxonomy Taxonomy being listed.
* @return array<string, mixed> Filtered arguments. * @return array<string, mixed> Filtered arguments.
*/ */
function noindex_seo_filter_sitemap_taxonomies( array $args, string $taxonomy ): array { function noindex_seo_filter_sitemap_taxonomies( array $args, $taxonomy ) {
// Layer 1: whole-taxonomy exclusion via global context settings. // Layer 1: whole-taxonomy exclusion via global context settings.
$context_for_tax = ''; $context_for_tax = '';
if ( 'category' === $taxonomy ) { if ( 'category' === $taxonomy ) {
@ -919,6 +947,8 @@ function noindex_seo_filter_sitemap_taxonomies( array $args, string $taxonomy ):
return $args; return $args;
} }
// 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 );
/** /**
@ -937,12 +967,14 @@ add_filter( 'wp_sitemaps_taxonomies_query_args', 'noindex_seo_filter_sitemap_tax
* @param array<string, mixed> $args WP_User_Query arguments for the sitemap user query. * @param array<string, mixed> $args WP_User_Query arguments for the sitemap user query.
* @return array<string, mixed> Filtered arguments. * @return array<string, mixed> Filtered arguments.
*/ */
function noindex_seo_filter_sitemap_users( array $args ): array { function noindex_seo_filter_sitemap_users( array $args ) {
if ( 1 === noindex_seo_get_setting( 'author', 'noindex' ) ) { if ( 1 === noindex_seo_get_setting( 'author', 'noindex' ) ) {
$args['include'] = array( 0 ); $args['include'] = array( 0 );
} }
return $args; return $args;
} }
// 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' );
/** /**
@ -964,10 +996,18 @@ add_filter( 'wp_sitemaps_users_query_args', 'noindex_seo_filter_sitemap_users' )
* Hooked to the {@see 'rest_api_init'} action. * Hooked to the {@see 'rest_api_init'} action.
* *
* @since 3.1.0 * @since 3.1.0
* @since 3.1.3 No-ops on WordPress versions without the complete REST API
* (pre-4.7): the routes are simply not registered there.
* *
* @return void * @return void
*/ */
function noindex_seo_register_rest_routes(): void { function noindex_seo_register_rest_routes() {
// The complete REST API (including rest_authorization_required_code(),
// used by both permission callbacks) exists since WordPress 4.7.
if ( ! function_exists( 'register_rest_route' ) || ! function_exists( 'rest_authorization_required_code' ) ) {
return;
}
register_rest_route( register_rest_route(
'noindex-seo/v1', 'noindex-seo/v1',
'/settings', '/settings',
@ -1000,6 +1040,8 @@ function noindex_seo_register_rest_routes(): void {
) )
); );
} }
// The action only exists on WP 4.4+; on older versions it simply never fires.
/* @phpstan-ignore WPCompat.actionNotAvailable.restapiinit */
add_action( 'rest_api_init', 'noindex_seo_register_rest_routes' ); add_action( 'rest_api_init', 'noindex_seo_register_rest_routes' );
/** /**
@ -1017,10 +1059,11 @@ add_action( 'rest_api_init', 'noindex_seo_register_rest_routes' );
*/ */
function noindex_seo_rest_settings_permission_check() { function noindex_seo_rest_settings_permission_check() {
if ( ! current_user_can( 'manage_options' ) ) { if ( ! current_user_can( 'manage_options' ) ) {
$status = function_exists( 'rest_authorization_required_code' ) ? rest_authorization_required_code() : 401;
return new WP_Error( return new WP_Error(
'noindex_seo_rest_forbidden', 'noindex_seo_rest_forbidden',
__( 'You do not have permission to read the noindex SEO settings.', 'noindex-seo' ), __( 'You do not have permission to read the noindex SEO settings.', 'noindex-seo' ),
array( 'status' => rest_authorization_required_code() ) array( 'status' => $status )
); );
} }
return true; return true;
@ -1050,6 +1093,8 @@ function noindex_seo_rest_settings_permission_check() {
* @return true|WP_Error True if access is allowed, WP_Error otherwise. * @return true|WP_Error True if access is allowed, WP_Error otherwise.
*/ */
function noindex_seo_rest_effective_permission_check( WP_REST_Request $request ) { function noindex_seo_rest_effective_permission_check( WP_REST_Request $request ) {
// get_param() exists since WP 4.4 and this callback is only registered on WP 4.7+ (see route registration guard).
/* @phpstan-ignore WPCompat.methodNotAvailable */
$raw_post_id = $request->get_param( 'post_id' ); $raw_post_id = $request->get_param( 'post_id' );
$post_id = is_numeric( $raw_post_id ) ? (int) $raw_post_id : 0; $post_id = is_numeric( $raw_post_id ) ? (int) $raw_post_id : 0;
$post = get_post( $post_id ); $post = get_post( $post_id );
@ -1067,10 +1112,11 @@ function noindex_seo_rest_effective_permission_check( WP_REST_Request $request )
// Everything else requires edit permission for the specific post. // Everything else requires edit permission for the specific post.
if ( ! current_user_can( 'edit_post', $post->ID ) ) { if ( ! current_user_can( 'edit_post', $post->ID ) ) {
$status = function_exists( 'rest_authorization_required_code' ) ? rest_authorization_required_code() : 401;
return new WP_Error( return new WP_Error(
'noindex_seo_rest_forbidden', 'noindex_seo_rest_forbidden',
__( 'You do not have permission to read directives for this post.', 'noindex-seo' ), __( 'You do not have permission to read directives for this post.', 'noindex-seo' ),
array( 'status' => rest_authorization_required_code() ) array( 'status' => $status )
); );
} }
@ -1089,7 +1135,7 @@ function noindex_seo_rest_effective_permission_check( WP_REST_Request $request )
* *
* @return WP_REST_Response The settings payload. * @return WP_REST_Response The settings payload.
*/ */
function noindex_seo_rest_get_settings(): WP_REST_Response { function noindex_seo_rest_get_settings() {
$settings = noindex_seo_get_settings(); $settings = noindex_seo_get_settings();
unset( $settings['version'] ); unset( $settings['version'] );
return new WP_REST_Response( $settings, 200 ); return new WP_REST_Response( $settings, 200 );
@ -1116,7 +1162,9 @@ function noindex_seo_rest_get_settings(): WP_REST_Response {
* @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.
*/ */
function noindex_seo_rest_get_effective( WP_REST_Request $request ): WP_REST_Response { function noindex_seo_rest_get_effective( WP_REST_Request $request ) {
// get_param() exists since WP 4.4 and this callback is only registered on WP 4.7+ (see route registration guard).
/* @phpstan-ignore WPCompat.methodNotAvailable */
$raw_post_id = $request->get_param( 'post_id' ); $raw_post_id = $request->get_param( 'post_id' );
$post_id = is_numeric( $raw_post_id ) ? (int) $raw_post_id : 0; $post_id = is_numeric( $raw_post_id ) ? (int) $raw_post_id : 0;
$post = get_post( $post_id ); $post = get_post( $post_id );
@ -1204,7 +1252,7 @@ function noindex_seo_rest_get_effective( WP_REST_Request $request ): WP_REST_Res
* *
* @return void * @return void
*/ */
function noindex_seo_invalidate_cache_on_settings_update(): void { function noindex_seo_invalidate_cache_on_settings_update() {
delete_transient( 'noindex_seo_options' ); delete_transient( 'noindex_seo_options' );
} }
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' );
@ -1221,7 +1269,7 @@ add_action( 'add_option_' . NOINDEX_SEO_SETTINGS_KEY, 'noindex_seo_invalidate_ca
* @param string $hook The current admin page hook. * @param string $hook The current admin page hook.
* @return void * @return void
*/ */
function noindex_seo_enqueue_admin_assets( string $hook ): void { function noindex_seo_enqueue_admin_assets( $hook ) {
// Only load on our settings page.. // Only load on our settings page..
if ( 'settings_page_noindex_seo' !== $hook ) { if ( 'settings_page_noindex_seo' !== $hook ) {
return; return;
@ -1267,7 +1315,7 @@ function noindex_seo_enqueue_admin_assets( string $hook ): void {
* *
* @return void * @return void
*/ */
function noindex_seo_enqueue_editor_assets(): void { function noindex_seo_enqueue_editor_assets() {
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -1278,7 +1326,15 @@ function noindex_seo_enqueue_editor_assets(): void {
$screen = get_current_screen(); $screen = get_current_screen();
// Only load in block editor for supported post types. // Only load in block editor for supported post types.
if ( ! $screen || ! $screen->is_block_editor() ) { // WP_Screen::is_block_editor() exists since WordPress 5.0; older versions
// never use the block editor, so the script is not loaded there.
if ( ! $screen || version_compare( get_bloginfo( 'version' ), '5.0', '<' ) ) {
return;
}
// 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() ) {
return; return;
} }
@ -1298,12 +1354,17 @@ function noindex_seo_enqueue_editor_assets(): void {
true true
); );
// Set up translations for the script. // Set up translations for the script (wp_set_script_translations exists
// since WordPress 5.0; on older versions the block editor is never used).
if ( function_exists( 'wp_set_script_translations' ) ) {
wp_set_script_translations( wp_set_script_translations(
'noindex-seo-editor-sidebar', 'noindex-seo-editor-sidebar',
'noindex-seo' 'noindex-seo'
); );
} }
}
// 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' );
/** /**
@ -1320,7 +1381,7 @@ add_action( 'enqueue_block_editor_assets', 'noindex_seo_enqueue_editor_assets' )
* @param array<string|int, string> $links Array of existing action links for the plugin. * @param array<string|int, string> $links Array of existing action links for the plugin.
* @return array<string|int, string> Modified array including the "Settings" link. * @return array<string|int, string> Modified array including the "Settings" link.
*/ */
function noindex_seo_settings_link( array $links ): array { function noindex_seo_settings_link( array $links ) {
$settings_link = '<a href="' . esc_url( admin_url( 'options-general.php?page=noindex_seo' ) ) . '">' . esc_html__( 'Settings', 'noindex-seo' ) . '</a>'; $settings_link = '<a href="' . esc_url( admin_url( 'options-general.php?page=noindex_seo' ) ) . '">' . esc_html__( 'Settings', 'noindex-seo' ) . '</a>';
$links[] = $settings_link; $links[] = $settings_link;
return $links; return $links;
@ -1339,7 +1400,7 @@ function noindex_seo_settings_link( array $links ): array {
* *
* @return void * @return void
*/ */
function noindex_seo_menu(): void { function noindex_seo_menu() {
add_options_page( add_options_page(
__( 'noindex SEO', 'noindex-seo' ), __( 'noindex SEO', 'noindex-seo' ),
__( 'noindex SEO', 'noindex-seo' ), __( 'noindex SEO', 'noindex-seo' ),
@ -1372,7 +1433,7 @@ function noindex_seo_menu(): void {
* *
* @return array<int, string> List of context slugs. * @return array<int, string> List of context slugs.
*/ */
function noindex_seo_get_contexts(): array { function noindex_seo_get_contexts() {
$base = array( $base = array(
'archive', 'archive',
'attachment', 'attachment',
@ -1416,6 +1477,29 @@ function noindex_seo_get_contexts(): array {
return $base; return $base;
} }
/**
* Returns a safe display label for a custom post type object.
*
* Helper for the settings page: prefers the plural labels->name and falls
* back to the raw post type slug when the labels object is incomplete.
*
* @since 3.1.3
*
* @param object $cpt A WP_Post_Type object (or anything exposing ->name).
* @return string The label to display.
*/
function noindex_seo_get_cpt_label( $cpt ) {
if ( isset( $cpt->labels->name ) && '' !== (string) $cpt->labels->name ) {
return (string) $cpt->labels->name;
}
if ( isset( $cpt->name ) ) {
return (string) $cpt->name;
}
return '';
}
/** /**
* Registers all settings used by the 'noindex SEO' plugin. * Registers all settings used by the 'noindex SEO' plugin.
* *
@ -1435,10 +1519,13 @@ function noindex_seo_get_contexts(): array {
* @since 1.0.0 * @since 1.0.0
* @since 2.0.0 Added support for multiple directives per context. * @since 2.0.0 Added support for multiple directives per context.
* @since 2.0.2 Removed dead `update_option_noindexseo` reference (the hook never fired). * @since 2.0.2 Removed dead `update_option_noindexseo` reference (the hook never fired).
* @since 3.1.3 Uses the two-argument register_setting() form: the third
* $args array is only supported since WordPress 4.7, and all
* sanitization already happens in the admin-post form handler.
* *
* @return void * @return void
*/ */
function noindex_seo_register(): void { function noindex_seo_register() {
$contexts = noindex_seo_get_contexts(); $contexts = noindex_seo_get_contexts();
$directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' ); $directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
@ -1446,55 +1533,14 @@ function noindex_seo_register(): void {
// Register each directive for each context. // Register each directive for each context.
foreach ( $contexts as $context ) { foreach ( $contexts as $context ) {
foreach ( $directives as $directive ) { foreach ( $directives as $directive ) {
register_setting( register_setting( 'noindexseo', $directive . '_seo_' . $context );
'noindexseo',
$directive . '_seo_' . $context,
array(
'type' => 'integer',
'default' => 0,
)
);
} }
} }
register_setting( register_setting( 'noindexseo', 'noindex_seo_config_seoplugins' );
'noindexseo', register_setting( 'noindexseo', 'noindex_seo_config_method' );
'noindex_seo_config_seoplugins', register_setting( 'noindexseo', 'noindex_seo_config_granular' );
array( register_setting( 'noindexseo', 'noindex_seo_config_delete_on_uninstall' );
'type' => 'integer',
'default' => 0,
)
);
register_setting(
'noindexseo',
'noindex_seo_config_method',
array(
'type' => 'string',
'default' => 'meta',
'sanitize_callback' => function ( $value ): string {
return in_array( $value, array( 'meta', 'header', 'both' ), true ) ? $value : 'meta';
},
)
);
register_setting(
'noindexseo',
'noindex_seo_config_granular',
array(
'type' => 'integer',
'default' => 0,
)
);
register_setting(
'noindexseo',
'noindex_seo_config_delete_on_uninstall',
array(
'type' => 'integer',
'default' => 0,
)
);
// NOTE: 'noindexseo' is the Settings API *group* name, not an option name. // NOTE: 'noindexseo' is the Settings API *group* name, not an option name.
// update_option_noindexseo would never fire; the transient is cleared explicitly // update_option_noindexseo would never fire; the transient is cleared explicitly
@ -1519,7 +1565,7 @@ function noindex_seo_register(): void {
* *
* @return void * @return void
*/ */
function noindex_seo_clear_transient(): void { function noindex_seo_clear_transient() {
_deprecated_function( __FUNCTION__, '2.0.2', 'delete_transient( \'noindex_seo_options\' )' ); _deprecated_function( __FUNCTION__, '2.0.2', 'delete_transient( \'noindex_seo_options\' )' );
delete_transient( 'noindex_seo_options' ); delete_transient( 'noindex_seo_options' );
} }
@ -1541,7 +1587,7 @@ function noindex_seo_clear_transient(): void {
* *
* @return void * @return void
*/ */
function noindex_seo_detect_conflicts(): void { function noindex_seo_detect_conflicts() {
$option_config_seoplugins = noindex_seo_get_config( 'seoplugins', 0 ); $option_config_seoplugins = noindex_seo_get_config( 'seoplugins', 0 );
@ -1606,7 +1652,7 @@ add_action( 'admin_init', 'noindex_seo_detect_conflicts' );
* *
* @return void * @return void
*/ */
function noindex_seo_process_form(): void { function noindex_seo_process_form() {
if ( ! current_user_can( 'manage_options' ) || ! check_admin_referer( 'update_noindex_seo_nonce' ) ) { if ( ! current_user_can( 'manage_options' ) || ! check_admin_referer( 'update_noindex_seo_nonce' ) ) {
wp_die( esc_html__( 'Permission denied or invalid nonce.', 'noindex-seo' ) ); wp_die( esc_html__( 'Permission denied or invalid nonce.', 'noindex-seo' ) );
} }
@ -1705,7 +1751,7 @@ add_action( 'admin_post_update_noindex_seo', 'noindex_seo_process_form' );
* *
* @return void * @return void
*/ */
function noindex_seo_process_apply_suggestions(): void { function noindex_seo_process_apply_suggestions() {
if ( ! current_user_can( 'manage_options' ) || ! check_admin_referer( 'noindex_seo_apply_suggestions_nonce' ) ) { if ( ! current_user_can( 'manage_options' ) || ! check_admin_referer( 'noindex_seo_apply_suggestions_nonce' ) ) {
wp_die( esc_html__( 'Permission denied or invalid nonce.', 'noindex-seo' ) ); wp_die( esc_html__( 'Permission denied or invalid nonce.', 'noindex-seo' ) );
} }
@ -1736,7 +1782,7 @@ add_action( 'admin_post_noindex_seo_apply_suggestions', 'noindex_seo_process_app
* *
* @return string[] List of context slugs. * @return string[] List of context slugs.
*/ */
function noindex_seo_get_suggested_contexts(): array { function noindex_seo_get_suggested_contexts() {
/** /**
* Filter the contexts that the "Apply recommended defaults" button enables. * Filter the contexts that the "Apply recommended defaults" button enables.
* *
@ -1774,16 +1820,23 @@ function noindex_seo_get_suggested_contexts(): array {
* to enable Gutenberg sidebar panel to read and write values. * to enable Gutenberg sidebar panel to read and write values.
* *
* @since 2.0.0 * @since 2.0.0
* @since 3.1.3 Skipped on WordPress versions without register_post_meta()
* (pre-4.9.6): granular control still works there through the
* classic meta box, Quick Edit and bulk actions.
* *
* @return void * @return void
*/ */
function noindex_seo_register_post_meta(): void { function noindex_seo_register_post_meta() {
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
return; return;
} }
if ( ! function_exists( 'register_post_meta' ) ) {
return;
}
// Get all public post types. // Get all public post types.
$post_types = get_post_types( array( 'public' => true ), 'names' ); $post_types = get_post_types( array( 'public' => true ), 'names' );
@ -1828,7 +1881,7 @@ add_action( 'init', 'noindex_seo_register_post_meta' );
* *
* @return void * @return void
*/ */
function noindex_seo_add_meta_boxes(): void { function noindex_seo_add_meta_boxes() {
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -1847,7 +1900,7 @@ function noindex_seo_add_meta_boxes(): void {
// the classic meta box when the user opens a block-editor post type in // the classic meta box when the user opens a block-editor post type in
// classic mode. // classic mode.
$screen = get_current_screen(); $screen = get_current_screen();
if ( $screen && $screen->is_block_editor ) { if ( $screen && version_compare( get_bloginfo( 'version' ), '5.0', '>=' ) && $screen->is_block_editor ) {
return; return;
} }
@ -1879,7 +1932,7 @@ add_action( 'add_meta_boxes', 'noindex_seo_add_meta_boxes' );
* @param WP_Post $post The current post object. * @param WP_Post $post The current post object.
* @return void * @return void
*/ */
function noindex_seo_render_meta_box( WP_Post $post ): void { function noindex_seo_render_meta_box( WP_Post $post ) {
// Add nonce for security. // Add nonce for security.
wp_nonce_field( 'noindex_seo_meta_box', 'noindex_seo_meta_box_nonce' ); wp_nonce_field( 'noindex_seo_meta_box', 'noindex_seo_meta_box_nonce' );
@ -2024,7 +2077,7 @@ function noindex_seo_render_meta_box( WP_Post $post ): void {
* @param int $post_id The post ID to update. * @param int $post_id The post ID to update.
* @return void * @return void
*/ */
function noindex_seo_save_directives_from_post( int $post_id ): void { function noindex_seo_save_directives_from_post( $post_id ) {
// phpcs:disable WordPress.Security.NonceVerification.Missing // phpcs:disable WordPress.Security.NonceVerification.Missing
// Nonce verification and capability checks are performed by the callers: // Nonce verification and capability checks are performed by the callers:
// noindex_seo_save_post_meta() and noindex_seo_save_quick_edit(). // noindex_seo_save_post_meta() and noindex_seo_save_quick_edit().
@ -2054,7 +2107,7 @@ function noindex_seo_save_directives_from_post( int $post_id ): void {
* @param int $post_id The post ID being saved. * @param int $post_id The post ID being saved.
* @return void * @return void
*/ */
function noindex_seo_save_post_meta( int $post_id ): void { function noindex_seo_save_post_meta( $post_id ) {
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -2101,14 +2154,21 @@ add_action( 'save_post', 'noindex_seo_save_post_meta' );
* Hooked to the {@see 'init'} action. * Hooked to the {@see 'init'} action.
* *
* @since 3.0.2 * @since 3.0.2
* @since 3.1.3 Skipped on WordPress versions without register_term_meta()
* (pre-4.9.6) or term meta (pre-4.4): per-term control requires
* the termmeta table and its API.
* *
* @return void * @return void
*/ */
function noindex_seo_register_term_meta(): void { function noindex_seo_register_term_meta() {
if ( ! noindex_seo_get_config( 'taxonomies_granular', 0 ) ) { if ( ! noindex_seo_get_config( 'taxonomies_granular', 0 ) ) {
return; return;
} }
if ( ! function_exists( 'register_term_meta' ) || ! function_exists( 'get_term_meta' ) ) {
return;
}
$taxonomies = get_taxonomies( array( 'public' => true ), 'names' ); $taxonomies = get_taxonomies( array( 'public' => true ), 'names' );
$meta_keys = array( $meta_keys = array(
@ -2153,11 +2213,16 @@ add_action( 'init', 'noindex_seo_register_term_meta' );
* the post meta box: one override checkbox and five directive checkboxes. * the post meta box: one override checkbox and five directive checkboxes.
* *
* @since 3.0.2 * @since 3.0.2
* @since 3.1.3 No-ops on WordPress versions without term meta (pre-4.4).
* *
* @param WP_Term $term The term being edited. * @param WP_Term $term The term being edited.
* @return void * @return void
*/ */
function noindex_seo_render_term_form_fields( WP_Term $term ): void { function noindex_seo_render_term_form_fields( WP_Term $term ) {
if ( ! function_exists( 'get_term_meta' ) ) {
return;
}
wp_nonce_field( 'noindex_seo_term_meta', 'noindex_seo_term_meta_nonce' ); wp_nonce_field( 'noindex_seo_term_meta', 'noindex_seo_term_meta_nonce' );
$override_raw = get_term_meta( $term->term_id, '_noindex_seo_override', true ); $override_raw = get_term_meta( $term->term_id, '_noindex_seo_override', true );
@ -2215,16 +2280,21 @@ function noindex_seo_render_term_form_fields( WP_Term $term ): void {
* cleared so the term falls back to the global context settings. * cleared so the term falls back to the global context settings.
* *
* @since 3.0.2 * @since 3.0.2
* @since 3.1.3 No-ops on WordPress versions without term meta (pre-4.4).
* *
* @param int $term_id Term ID. * @param int $term_id Term ID.
* @param int $tt_id Term taxonomy ID (unused; required by the edited_{$taxonomy} hook signature). * @param int $tt_id Term taxonomy ID (unused; required by the edited_{$taxonomy} hook signature).
* @return void * @return void
*/ */
function noindex_seo_save_term_meta( int $term_id, int $tt_id ): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed function noindex_seo_save_term_meta( $term_id, $tt_id ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
if ( ! noindex_seo_get_config( 'taxonomies_granular', 0 ) ) { if ( ! noindex_seo_get_config( 'taxonomies_granular', 0 ) ) {
return; return;
} }
if ( ! function_exists( 'update_term_meta' ) || ! function_exists( 'delete_term_meta' ) ) {
return;
}
if ( ! isset( $_POST['noindex_seo_term_meta_nonce'] ) || ! is_string( $_POST['noindex_seo_term_meta_nonce'] ) ) { if ( ! isset( $_POST['noindex_seo_term_meta_nonce'] ) || ! is_string( $_POST['noindex_seo_term_meta_nonce'] ) ) {
return; return;
} }
@ -2265,7 +2335,7 @@ function noindex_seo_save_term_meta( int $term_id, int $tt_id ): void { // phpcs
* @param array<string, string> $columns Existing columns. * @param array<string, string> $columns Existing columns.
* @return array<string, string> Modified columns. * @return array<string, string> Modified columns.
*/ */
function noindex_seo_add_custom_column( array $columns ): array { function noindex_seo_add_custom_column( array $columns ) {
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -2298,7 +2368,7 @@ function noindex_seo_add_custom_column( array $columns ): array {
* @param int $post_id Post ID. * @param int $post_id Post ID.
* @return void * @return void
*/ */
function noindex_seo_display_custom_column( string $column, int $post_id ): void { function noindex_seo_display_custom_column( $column, $post_id ) {
if ( 'noindex_seo_directives' !== $column ) { if ( 'noindex_seo_directives' !== $column ) {
return; return;
} }
@ -2379,7 +2449,7 @@ function noindex_seo_display_custom_column( string $column, int $post_id ): void
// Register column hooks after all CPTs are registered (admin_init fires after init). // Register column hooks after all CPTs are registered (admin_init fires after init).
add_action( add_action(
'admin_init', 'admin_init',
function (): void { function () {
$post_types = get_post_types( array( 'public' => true ), 'names' ); $post_types = get_post_types( array( 'public' => true ), 'names' );
foreach ( $post_types as $post_type ) { foreach ( $post_types as $post_type ) {
add_filter( "manage_{$post_type}_posts_columns", 'noindex_seo_add_custom_column' ); add_filter( "manage_{$post_type}_posts_columns", 'noindex_seo_add_custom_column' );
@ -2409,7 +2479,7 @@ add_action(
* @param array<string, string> $columns Existing columns. * @param array<string, string> $columns Existing columns.
* @return array<string, string> Modified columns. * @return array<string, string> Modified columns.
*/ */
function noindex_seo_add_term_custom_column( array $columns ): array { function noindex_seo_add_term_custom_column( array $columns ) {
$new_columns = array(); $new_columns = array();
foreach ( $columns as $key => $value ) { foreach ( $columns as $key => $value ) {
$new_columns[ $key ] = $value; $new_columns[ $key ] = $value;
@ -2443,11 +2513,16 @@ function noindex_seo_add_term_custom_column( array $columns ): array {
* @param int $term_id Term ID. * @param int $term_id Term ID.
* @return string Filtered content. * @return string Filtered content.
*/ */
function noindex_seo_display_term_custom_column( string $content, string $column, int $term_id ): string { function noindex_seo_display_term_custom_column( $content, $column, $term_id ) {
if ( 'noindex_seo_directives' !== $column ) { if ( 'noindex_seo_directives' !== $column ) {
return $content; return $content;
} }
// Term meta requires WordPress 4.4+.
if ( ! function_exists( 'get_term_meta' ) ) {
return $content;
}
$override_raw = get_term_meta( $term_id, '_noindex_seo_override', true ); $override_raw = get_term_meta( $term_id, '_noindex_seo_override', true );
$override = ( is_scalar( $override_raw ) && 1 === absint( $override_raw ) ) ? 1 : 0; $override = ( is_scalar( $override_raw ) && 1 === absint( $override_raw ) ) ? 1 : 0;
@ -2498,7 +2573,7 @@ function noindex_seo_display_term_custom_column( string $content, string $column
* @param string $post_type Post type (unused but required by hook). * @param string $post_type Post type (unused but required by hook).
* @return void * @return void
*/ */
function noindex_seo_quick_edit_fields( string $column_name, string $post_type ): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed function noindex_seo_quick_edit_fields( $column_name, $post_type ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -2602,7 +2677,7 @@ add_action( 'bulk_edit_custom_box', 'noindex_seo_quick_edit_fields', 10, 2 );
* @param int $post_id Post ID being saved. * @param int $post_id Post ID being saved.
* @return void * @return void
*/ */
function noindex_seo_save_quick_edit( int $post_id ): void { function noindex_seo_save_quick_edit( $post_id ) {
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -2644,7 +2719,7 @@ add_action( 'save_post', 'noindex_seo_save_quick_edit' );
* @param array<string, string> $bulk_actions Existing bulk actions. * @param array<string, string> $bulk_actions Existing bulk actions.
* @return array<string, string> Modified bulk actions. * @return array<string, string> Modified bulk actions.
*/ */
function noindex_seo_register_bulk_actions( array $bulk_actions ): array { function noindex_seo_register_bulk_actions( array $bulk_actions ) {
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -2667,7 +2742,7 @@ function noindex_seo_register_bulk_actions( array $bulk_actions ): array {
* @param array<int, string> $post_ids Array of post IDs. * @param array<int, string> $post_ids Array of post IDs.
* @return string Modified redirect URL. * @return string Modified redirect URL.
*/ */
function noindex_seo_handle_bulk_actions( string $redirect_to, string $action, array $post_ids ): string { function noindex_seo_handle_bulk_actions( $redirect_to, $action, array $post_ids ) {
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -2739,7 +2814,7 @@ function noindex_seo_handle_bulk_actions( string $redirect_to, string $action, a
* *
* @return void * @return void
*/ */
function noindex_seo_bulk_actions_admin_notice(): void { function noindex_seo_bulk_actions_admin_notice() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- URL parameter from redirect after bulk action, not form data. // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- URL parameter from redirect after bulk action, not form data.
if ( ! empty( $_REQUEST['noindex_seo_bulk_enabled'] ) ) { if ( ! empty( $_REQUEST['noindex_seo_bulk_enabled'] ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- URL parameter from redirect after bulk action, not form data. // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- URL parameter from redirect after bulk action, not form data.
@ -2787,7 +2862,7 @@ add_action( 'admin_notices', 'noindex_seo_bulk_actions_admin_notice' );
// Register bulk action hooks after all CPTs are registered. // Register bulk action hooks after all CPTs are registered.
add_action( add_action(
'admin_init', 'admin_init',
function (): void { function () {
$post_types = get_post_types( array( 'public' => true ), 'names' ); $post_types = get_post_types( array( 'public' => true ), 'names' );
foreach ( $post_types as $post_type ) { foreach ( $post_types as $post_type ) {
add_filter( "bulk_actions-edit-{$post_type}", 'noindex_seo_register_bulk_actions' ); add_filter( "bulk_actions-edit-{$post_type}", 'noindex_seo_register_bulk_actions' );
@ -2806,7 +2881,7 @@ add_action(
* @param string $post_type Current post type (unused but required by hook). * @param string $post_type Current post type (unused but required by hook).
* @return void * @return void
*/ */
function noindex_seo_add_list_filter( string $post_type ): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found function noindex_seo_add_list_filter( $post_type ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
// Check if granular control is enabled. // Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 ); $granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) { if ( ! $granular_enabled ) {
@ -2841,7 +2916,7 @@ function noindex_seo_add_list_filter( string $post_type ): void { // phpcs:ignor
* @param WP_Query $query Current query object. * @param WP_Query $query Current query object.
* @return void * @return void
*/ */
function noindex_seo_filter_posts_by_override( WP_Query $query ): void { function noindex_seo_filter_posts_by_override( WP_Query $query ) {
// Only in admin list view. // Only in admin list view.
if ( ! is_admin() || ! $query->is_main_query() ) { if ( ! is_admin() || ! $query->is_main_query() ) {
return; return;
@ -2901,12 +2976,12 @@ add_action( 'pre_get_posts', 'noindex_seo_filter_posts_by_override' );
// Register filter dropdown after all CPTs are registered. // Register filter dropdown after all CPTs are registered.
add_action( add_action(
'admin_init', 'admin_init',
function (): void { function () {
$post_types = get_post_types( array( 'public' => true ), 'names' ); $post_types = get_post_types( array( 'public' => true ), 'names' );
foreach ( $post_types as $post_type ) { foreach ( $post_types as $post_type ) {
add_action( add_action(
'restrict_manage_posts', 'restrict_manage_posts',
function () use ( $post_type ): void { function () use ( $post_type ) {
global $typenow; global $typenow;
if ( $typenow === $post_type ) { if ( $typenow === $post_type ) {
noindex_seo_add_list_filter( $post_type ); noindex_seo_add_list_filter( $post_type );
@ -2934,7 +3009,7 @@ add_action(
* *
* @return void * @return void
*/ */
function noindex_seo_admin(): void { function noindex_seo_admin() {
// Verify user capabilities for defense in depth.. // Verify user capabilities for defense in depth..
if ( ! current_user_can( 'manage_options' ) ) { if ( ! current_user_can( 'manage_options' ) ) {
wp_die( wp_die(
@ -2993,7 +3068,7 @@ function noindex_seo_admin(): void {
'recommended' => __( 'Recommended', 'noindex-seo' ), 'recommended' => __( 'Recommended', 'noindex-seo' ),
'suggestion' => true, 'suggestion' => true,
'description' => __( 'Block the indexing of the privacy policy page.', 'noindex-seo' ), 'description' => __( 'Block the indexing of the privacy policy page.', 'noindex-seo' ),
'view_url' => get_privacy_policy_url(), 'view_url' => function_exists( 'get_privacy_policy_url' ) ? get_privacy_policy_url() : '',
), ),
'single' => array( 'single' => array(
'label' => __( 'Single Post', 'noindex-seo' ), 'label' => __( 'Single Post', 'noindex-seo' ),
@ -3162,11 +3237,11 @@ function noindex_seo_admin(): void {
$cpt_fields = array(); $cpt_fields = array();
foreach ( $public_cpts as $cpt ) { foreach ( $public_cpts as $cpt ) {
$cpt_fields[ 'cpt_' . $cpt->name ] = array( $cpt_fields[ 'cpt_' . $cpt->name ] = array(
'label' => $cpt->labels->name ?? $cpt->name, 'label' => noindex_seo_get_cpt_label( $cpt ),
'recommended' => __( 'Recommended', 'noindex-seo' ), 'recommended' => __( 'Recommended', 'noindex-seo' ),
'suggestion' => false, 'suggestion' => false,
/* translators: %s: post type singular name. */ /* translators: %s: post type singular name. */
'description' => sprintf( __( 'Block the indexing of individual %s.', 'noindex-seo' ), $cpt->labels->name ?? $cpt->name ), 'description' => sprintf( __( 'Block the indexing of individual %s.', 'noindex-seo' ), noindex_seo_get_cpt_label( $cpt ) ),
); );
} }
$sections['custom_post_types'] = array( $sections['custom_post_types'] = array(
@ -3418,7 +3493,7 @@ function noindex_seo_admin(): void {
<?php <?php
// Default icon when a dynamically-added section (e.g. 'custom_post_types' // Default icon when a dynamically-added section (e.g. 'custom_post_types'
// added in 3.1.0) doesn't have an entry in the static $section_icons map. // added in 3.1.0) doesn't have an entry in the static $section_icons map.
$icon = $section_icons[ $section_id ] ?? 'dashicons-admin-generic'; $icon = isset( $section_icons[ $section_id ] ) ? $section_icons[ $section_id ] : 'dashicons-admin-generic';
?> ?>
<div class="noindex-seo-card" id="noindex-seo-card-<?php echo esc_attr( $section_id ); ?>"> <div class="noindex-seo-card" id="noindex-seo-card-<?php echo esc_attr( $section_id ); ?>">
<div class="noindex-seo-card-header"> <div class="noindex-seo-card-header">

View file

@ -1,11 +1,11 @@
=== noindex SEO === === noindex SEO ===
Contributors: javiercasares Contributors: robotstxt, javiercasares
Tags: seo, noindex, nofollow, noarchive, robots Tags: seo, noindex, nofollow, noarchive, robots
Requires at least: 5.7 Requires at least: 4.0
Tested up to: 7.1 Tested up to: 7.1
Stable tag: 3.1.2 Stable tag: 3.1.3
Requires PHP: 7.2 Requires PHP: 5.6
Version: 3.1.2 Version: 3.1.3
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
@ -97,6 +97,17 @@ Fine-grained control over how search engines index and display your WordPress co
Important note: if you have any doubt about any of the following items it is best not to activate the option as you could lose results in the search engines. Important note: if you have any doubt about any of the following items it is best not to activate the option as you could lose results in the search engines.
== Using the plugin ==
= REST API =
The plugin exposes two read-only endpoints under `/wp-json/noindex-seo/v1/` so headless consumers can read the configuration:
* `GET /settings`: returns the consolidated settings array (contexts and directives plus config). Requires an authenticated user with the `manage_options` capability.
* `GET /effective?post_id=123`: returns the list of active directives for a specific post, computed with the same precedence used on the front-end (per-post override, then per-post-type default, then the built-in context). Public only for published, non-password-protected posts; everything else requires `edit_post` capabilities.
On WordPress versions with XML sitemaps (5.5+), URLs that are noindexed are automatically excluded from the core sitemaps.
== Installation == == Installation ==
= Automatic download = = Automatic download =
@ -107,329 +118,44 @@ Visit the plugin section in your WordPress, search for [noindex-seo]; download a
Extract the contents of the ZIP and upload the contents to the `/wp-content/plugins/noindex-seo/` directory. Once uploaded, it will appear in your plugin list. Extract the contents of the ZIP and upload the contents to the `/wp-content/plugins/noindex-seo/` directory. Once uploaded, it will appear in your plugin list.
== Frequently Asked Questions ==
= Does the noindex directive remove the URL from the XML sitemap? =
Yes. On WordPress 5.5 or newer, any URL that receives a noindex directive from the plugin is excluded from the core XML sitemaps (`/wp-sitemap.xml`), both through the global context settings and through the granular per-post / per-term overrides.
= What is the difference between the HTML meta tags and the HTTP headers implementation methods? =
Both send the same robots directives to search engines. The meta tag method outputs a `<meta name="robots">` tag in the HTML head and is easy to verify in the page source. The HTTP header method sends an `X-Robots-Tag` header, which also works for non-HTML content such as PDFs, images and feeds. The "Both" method sends the two signals at the same time.
= Will I lose my settings when I uninstall the plugin? =
No. By default all plugin data is preserved on uninstall. If you want a complete cleanup, enable the "Delete all plugin data on uninstall" option in the settings page before removing the plugin.
== Compatibility == == Compatibility ==
* WordPress: 5.7 - 7.1 * WordPress: 4.0 - 7.1
* PHP: 7.2 - 8.5 * PHP: 5.6 - 8.5
== Changelog == == Changelog ==
= 3.1.2 [2026-08-10] = = 3.1.3 =
Audit-driven maintenance release. Compatibility release: WordPress 4.0+ and PHP 5.6+ supported again (the classic `<meta name="robots">` output covers WordPress versions without the `wp_robots` API, and every newer-API integration degrades gracefully). Branding moved to robotstxt.software.
**Security** = 3.1.2 =
* Fixed the composer-audit gate in `bin/preflight.sh`. The previous version grepped for "security vulnerability advisory" (singular), which never matched Composer's actual output "security vulnerability advisories" (plural) — the y→i pluralization change silently disabled CVE detection, green-lighting every release regardless of known vulnerabilities. The gate now uses Composer's bitmask exit code (bit 0 = security), which is immune to wording changes. Audit-driven maintenance release: fixed the composer-audit gate in the preflight script, un-nested the settings page forms, added `load_plugin_textdomain()` for the bundled translations, pinned all dev dependencies, wired up coverage measurement.
* Bumped `squizlabs/php_codesniffer` to ^3.13.6 and `wp-coding-standards/wpcs` to ^3.4.1, fixing CVE-2026-67434 (OS command injection) and CVE-2026-45293 (arbitrary code execution) in the development tooling. These are dev-only dependencies and were never shipped in the release ZIP.
**Fixed** = 3.1.1 =
* Nested `<form>` elements on the settings page. The "Apply Recommended Defaults" form was physically nested inside the main settings form — HTML5 forbids this, and the stray `</form>` could close the main form early, orphaning the "Save Changes" button and all directive checkboxes. The apply-suggestions form is now a standalone sibling rendered before the main form. Security: tightened the ACL on the REST endpoints. `/settings` now requires `manage_options`; `/effective` is public only for published, non-password-protected posts and requires `edit_post` for everything else.
* Meta-box "Effective Directives" reference panel now reads from the consolidated `noindex_seo_settings` option via `noindex_seo_get_setting()` instead of the stale legacy individual options that may diverge after a settings save.
**Added** = Previous versions =
* `load_plugin_textdomain('noindex-seo')` hooked on `init`. The plugin ships `.mo` files for Catalan and Spanish (es_ES) in `languages/`, but without this call WordPress only loaded translations from `wp-content/languages/plugins/` — the bundled translations were effectively dead code. If you want to see the full changelog, visit the [noindex SEO plugin page](https://www.robotstxt.software/plugins/noindex-seo/).
* PHPUnit coverage measurement in `bin/preflight.sh` (requires Xdebug). Enforces a 25% regression floor against the current 26.64% baseline; the AGENTS target remains 80%.
* `<coverage>` configuration in `phpunit.xml` so `--coverage-text` produces a report.
* `README.md` for developer and contributor onboarding.
* `tests/wp-tests-config.sample.php` template. The real `tests/wp-tests-config.php` is now gitignored and reads from environment variables.
**Changed** == Compliance ==
* Pinned all remaining wildcard `"*"` dev dependencies to caret constraints in `composer.json` (`phpcsutils` ^1.2, `php-compatibility` ^9.3, `dealerdirect/phpcodesniffer-composer-installer` ^1.2). Unpinned ranges were how the CVE-affected versions were resolved.
* Lowered `phpstan.neon` `phpVersion` from 80500 (PHP 8.5) to 80200 (PHP 8.2) so PHPStan flags any accidental use of PHP 8.3+ syntax that would break on the development floor.
* Refreshed `CLAUDE.md` to reflect 3.1.x reality (version, line count, v3 consolidated storage model, four-priority output logic, current 8-file test suite). Documented the uninstall direct-DB exception.
* Updated `TODO.md` to mark shipped items (#1–#4).
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* 71 tests, 385 assertions — all passing. Coverage measured at 26.64% (471/1768 lines).
= 3.1.1 [2026-07-18] =
**Security**
* Tightened the ACL on the two REST endpoints introduced in 3.1.0. The original release used `__return_true` for both `permission_callback`s, which would have leaked the full noindex configuration to anyone hitting `/wp-json/noindex-seo/v1/settings`. Fixed callbacks:
- `/settings` now requires `manage_options`. The consolidated array reveals the site's full SEO strategy in a single response, so it is admin-only.
- `/effective?post_id=N` is public only for posts with `post_status=publish` and no password (the directives for those would appear in the HTML `<meta>` tag of the rendered page anyway). Drafts, private posts, scheduled posts, password-protected posts, and trashed posts require `edit_post` capability for the specific post.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* Added 4 tests covering the new permission model: unauthenticated rejected on `/settings`, editor rejected on `/settings`, unauthenticated/subscriber rejected on `/effective` for drafts, public access preserved on `/effective` for published posts.
= 3.1.0 [2026-07-18] =
Closes the three remaining HIGH-priority items from the original gap audit.
**Added**
* **WP core XML sitemap integration.** Hooks `wp_sitemaps_posts_query_args`, `wp_sitemaps_taxonomies_query_args`, and `wp_sitemaps_users_query_args` so URLs that should not be indexed drop out of `/wp-sitemap.xml`. Two layers of exclusion: (1) whole-type exclusion — if `singular.noindex=1` hides every post type; `single.noindex=1` hides all posts; `page.noindex=1` hides all pages; `attachment.noindex=1` hides all attachments; `cpt_{type}.noindex=1` hides that CPT; `category.noindex=1` / `tag.noindex=1` hide those taxonomies; `author.noindex=1` hides the entire users sitemap. (2) per-item exclusion — posts/terms with the granular `_noindex_seo_override=1` + `_noindex_seo_noindex=1` flag are excluded from their type's sitemap. Closes the biggest SEO-quality gap (Google Search Console flags noindexed URLs in sitemaps as a coverage warning).
* **Per-CPT global defaults.** Every public custom post type (anything public + non-built-in: WooCommerce `product`, EDD `download`, LMS lesson/course, etc.) now gets its own context `cpt_{post_type}` and a "Custom Post Types" section in the settings page. Previously every CPT single fell into the generic `single` bucket; now each CPT can have its own noindex / nofollow / noarchive / nosnippet / noimageindex defaults that apply globally to all of its items.
* **REST API exposure.** Two new read-only endpoints under `/wp-json/noindex-seo/v1/`:
- `GET /settings` — returns the consolidated settings array (contexts × directives + config), so headless consumers (Next.js, Gatsby, mobile apps) can read the global configuration.
- `GET /effective?post_id=123` — returns the active directive list for a specific post, computed by the same precedence used on the front-end (per-post override → per-CPT default → built-in `single`/`page`/`attachment` context). Includes the implementation `method` so consumers know whether to render a `<meta>` tag, an `X-Robots-Tag` header, or both.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* Added `tests/test-sitemap.php` (per-post + global-context exclusion for posts/terms/users sitemaps).
* Added `tests/test-rest-api.php` (settings endpoint, effective endpoint for post-meta and CPT-default sources, 404 for unknown post).
* Added `tests/test-cpt-contexts.php` (dynamic context registration, per-CPT settings application).
= 3.0.4 [2026-07-18] =
**Changed**
* Moved the "Apply Recommended Defaults" button from above the Search Results section to immediately above the "Search options…" input box. The previous position pushed the button below the fold on smaller screens; the new position sits it next to the search field where users naturally look for global actions.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
= 3.0.3 [2026-07-18] =
**Added**
* **"Robots" column on taxonomy list tables.** When per-term granular control is on, the Categories / Tags / custom taxonomy list pages now show a "Robots" column with the same directive badges (🔍 noindex, 🔗 nofollow, 💾 noarchive, 📄 nosnippet, 🖼️ noimageindex) used on the post list. Makes it possible to scan at a glance which terms have an override and which directives are active — parity with the existing post-list UX.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* Added 3 tests covering the term column renderer (no override, with override, passthrough for other columns).
= 3.0.2 [2026-07-18] =
**Fixed**
* Duplicate "Search Engine Visibility" panel in the block editor. The plugin previously registered both a classic PHP meta box (`add_meta_box`) AND a native Gutenberg sidebar panel (`PluginDocumentSettingPanel` via `assets/js/editor-sidebar.js`) with the same title — both showed up in the block editor sidebar as two panels with the same name. The classic meta box is now suppressed on block-editor screens (detected via `get_current_screen()->is_block_editor`, which respects the Classic Editor plugin's per-request override). Classic editor users still get the meta box.
**Added**
* **Per-term granular control for taxonomies.** Mirrors the existing per-post granular pattern: when "Enable per-term granular control" is on, every public taxonomy (`category`, `post_tag`, and any custom public taxonomy like WooCommerce's `product_cat` / `product_tag`) gets a "Search Engine Visibility" panel on the Edit Tag screen with an override checkbox and the five directive checkboxes. Term-level directives take precedence over the global `category` / `tag` / `post_type_archive` settings when the term has the override enabled. Backed by `register_term_meta()` with `show_in_rest=true` so headless consumers can read them.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* Added `tests/test-term-meta.php` covering registration, save handler, front-end override precedence, and uninstall cleanup.
= 3.0.1 [2026-07-18] =
**Fixed**
* Self-healing v3 migration. If `noindex_seo_config_version` claims migration completed (version >= 3) but the consolidated `noindex_seo_settings` option is somehow missing, `noindex_seo_check_migration()` now re-runs the migration automatically. This recovers silently from partial failures: object-cache staleness after the write, request interrupted mid-migration, a third-party plugin clearing options, or DB write errors that did not raise a PHP error. Without this guard, the front-end would fall back to all-zero defaults (site fully indexable) until someone re-saved the settings page.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* Added test for the self-healing migration path.
= 3.0.0 [2026-07-18] =
**Major release — storage consolidation.** Settings are now stored in a single autoloaded option (`noindex_seo_settings`) instead of ~110 individual options. Reduces `wp_options` autoload weight on every page load. Legacy options are preserved (marked non-autoloaded) for one major version to allow safe rollback to 2.x; they will be removed in 4.0.
**Added**
* **"Apply recommended defaults" button** on the settings page. One click enables all 12 contexts flagged as "Recommended" in the UI (privacy policy, date archives, pagination, search results, attachment pages, preview/customize-preview, and 404). Previously required ~60 individual checkbox toggles.
* **Filterable conflict-detection list.** The list of plugins that may conflict with noindex SEO is now passed through `apply_filters('noindex_seo_conflicting_plugins', ...)`. Third-party code can extend or replace the list without editing the plugin.
**Changed**
* **Storage consolidated**: 110 directive options (`{directive}_seo_{context}`) + 5 config options (`noindex_seo_config_*`) merged into one `noindex_seo_settings` array. Reads go through new accessors (`noindex_seo_get_settings()`, `noindex_seo_get_setting()`, `noindex_seo_get_config()`). The hourly transient cache is preserved on top.
* **Transient invalidation is now automatic**: any update to `noindex_seo_settings` clears the `noindex_seo_options` transient via the `update_option_noindex_seo_settings` hook. Previously only the admin form save cleared it, leaving WP-CLI / REST / programmatic edits stale for up to one hour.
* **Migration**: existing 2.x installs are migrated automatically on `plugins_loaded` (idempotent, version-gated by `noindex_seo_config_version`). Legacy options are kept and marked non-autoloaded so a rollback to 2.x restores the pre-3.0 state.
* **Uninstall retrocompatibility**: `uninstall.php` deletes both the new consolidated option and all legacy individual options (via wildcard SQL). Sites that upgrade from 2.x and later uninstall will be cleaned up completely regardless of whether migration ran.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* Added PHPUnit test suite (previously the project shipped only a plugin-header smoke test). Coverage: contexts helper, settings accessors, v2→v3 migration, form save, bulk actions, meta box save, conflict-detection filter.
= 2.0.2 [2026-07-18] =
**Fixed**
* Bulk action "Enable Robots Override" no longer creates duplicate `postmeta` rows. The previous implementation used `INSERT ... ON DUPLICATE KEY UPDATE`, but WordPress's `postmeta` table has no unique key on `(post_id, meta_key)`, so the `ON DUPLICATE KEY UPDATE` branch never fired and every bulk run on a post that already had the meta inserted a duplicate row. The bulk handler now uses `update_post_meta()` and `delete_post_meta()` exclusively.
* Bulk action "Disable Robots Override" now removes the override meta entirely (previously set its value to `0`, leaving a redundant row).
**Changed**
* Removed three dead contexts (`feed`, `comment_feed`, `robots`) that were registered, migrated, and cleaned up but never evaluated at runtime and never exposed in the admin UI. The plugin now consistently registers and evaluates 22 page contexts (down from a nominal 25). Existing orphan options from earlier installs are cleaned by the uninstall routine's wildcard delete.
* Extracted `noindex_seo_get_contexts()` as the single source of truth for the context list shared by settings registration, v2 migration, form processing. `uninstall.php` retains its own copy (technical constraint: the main plugin file is not loaded during uninstall) with a sync warning comment.
* Corrected `phpcs.xml` `minimum_supported_wp_version` from `6.6` to `5.7` to match the plugin header. This setting was stale from before the 2.0.1 minimum-WP correction.
* Updated `readme.txt` description counts from 25 to 22 page contexts.
* **Bulk action performance characteristic changed**: the rewrite from a single batched SQL statement to per-post `update_post_meta()` / `delete_post_meta()` calls trades O(1) queries for O(N) queries on bulk selections, in exchange for correctness (no more duplicate rows) and proper WP meta-cache invalidation. Typical admin bulk selections (≤200 posts) are unaffected; very large selections (thousands of posts) may take noticeably longer.
**Deprecated**
* `noindex_seo_clear_transient()`: was hooked to `update_option_noindexseo`, a hook that never fires because `noindexseo` is the Settings API group name, not an option name. The function now emits a deprecation notice via `_deprecated_function()` and continues to clear the `noindex_seo_options` transient if called directly. The transient is cleared correctly inside `noindex_seo_process_form()` after every successful save. The function will be removed in a future release.
**Code Quality**
* `bin/preflight.sh`: hardened temp-file handling (mktemp moved to script top, `trap … EXIT` cleanup, no more predictable `/tmp/composer-audit.*` paths that were vulnerable to symlink overwrite on shared hosting); fixed `2>/null` typo; added rsync / `.distignore` / build-tree-non-empty guards so the forbidden-artefact scan cannot pass vacuously; replaced npm-audit subshell with `pushd`/`popd` so gate counters are not lost.
* Added `bin/preflight.sh`: automated pre-deploy verification covering PHPCS, PHPStan level 9, PHPCompatibility, PHPUnit, dependency audit, and candidate-ZIP artefact inspection. Prints a PASS/FAIL report per section and exits non-zero on any failure.
* Added `.claude/settings.json` deny rules for `deploy.sh`, `git push`, `git tag`, and `git merge`, enforcing the agent operating boundaries mandated by AGENTS.md mechanically rather than only in prose.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* PHP Coding Standards: 3.13.5
* WordPress Coding Standards: 3.3.0
* PHPStan: 2.1.55
* PHPUnit: 9.6.34
= 2.0.1 [2026-05-25] =
**Added**
* New option "Delete all plugin data on uninstall" (Settings → noindex SEO → General Configuration). By default, all data is preserved when the plugin is uninstalled. Enable this option to remove all settings and per-post directives on uninstall.
**Changed**
* Lowered minimum WordPress requirement from 6.6 to 5.7.
* Custom post types registered by plugins or themes on the `init` hook now correctly receive the Robots column, bulk actions, and list filter in granular control mode.
**Code Quality**
* Added `NOINDEX_SEO_VERSION` constant for asset cache-busting.
* PHP type safety improvements; passes PHPStan level 9 on PHP 8.5 with zero errors.
* Extracted `noindex_seo_save_directives_from_post()` helper to eliminate duplicated save logic.
* Removed dead code and dead hook registration.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* PHP Coding Standards: 3.13.5
* WordPress Coding Standards: 3.3.0
* PHPStan: 2.1.55
* PHPUnit: 9.6.34
= 2.0.0 [2026-01-20] =
**New Features**
* 5 independent robots directives: noindex, nofollow, noarchive, nosnippet, noimageindex
* Each directive can be enabled independently for any page context (125 total options)
* HTTP Headers support: Choose between HTML meta tags, HTTP headers, or both
* Granular per-post/page control (optional):
- Override global settings for individual posts/pages
- Meta boxes for Classic Editor
- Native Gutenberg sidebar panel for Block Editor
- Quick Edit support for fast inline editing
- Bulk actions to enable/disable overrides
- Custom "Robots" column in post lists
- Filter posts by override status
* Modern checkbox-based interface with emoji icons and tooltips
**Security & Code Quality**
* Modernized code with PHP 7.2+ strict types and type declarations
**Compatibility & Migration**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
* Automatic migration from v1.x (your existing settings are preserved)
* No manual configuration needed - just update and go
* Fully backward compatible
= 1.2.0 [2025-04-08] =
**Changes**
* Improved functions documentation.
**Fixes**
* The way the options are saved.
**Compatibility**
* WordPress: 4.1 - 6.8
* PHP: 5.6 - 8.4
**Tests**
* PHP Coding Standards: 3.12.1
* WordPress Coding Standards: 3.1.0
* Plugin Check (PCP): 1.4.0
= 1.1.1 [2024-11-04] =
**Added**
* Configuration option to dismiss other SEO plugin incompatibilities.
**Compatibility**
* WordPress: 4.1 - 6.7
* PHP: 5.6 - 8.4
= 1.1.0 [2024-11-02] =
**Added**
* Detects other WordPress SEO plugins, and creates a notice about it, to avoid conflicts.
* Has filters, so other plugins can hack.
**Changed**
* Uses native wp_robots functions (since WP 5.7+)
* Big refactory.
* Less size, improved code quality.
**Compatibility**
* WordPress: 4.1 - 6.7
* PHP: 5.6 - 8.4
**Tests**
* PHP Coding Standards: 3.10.3
* WordPress Coding Standards: 3.1.0
* Plugin Check (PCP): 1.1.0
== Security ==
This plugin adheres to the following security measures and review protocols for each version: This plugin adheres to the following security measures and review protocols for each version:
@ -445,7 +171,6 @@ This plugin adheres to the following security measures and review protocols for
== Vulnerabilities == == Vulnerabilities ==
* No vulnerabilities have been published up to version 2.0.1. * No vulnerabilities have been published up to version 3.1.3.
* Version 2.0.0 includes proactive security hardening based on comprehensive security audit (see docs/SECURITY-2026-01-20.md).
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

@ -18,8 +18,6 @@
* until they explicitly uninstall. * until they explicitly uninstall.
*/ */
declare(strict_types=1);
// Exit if uninstall not called from WordPress. // Exit if uninstall not called from WordPress.
if ( ! defined( 'ABSPATH' ) || ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { if ( ! defined( 'ABSPATH' ) || ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit; exit;
@ -32,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) || ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
$noindex_seo_delete = 0; $noindex_seo_delete = 0;
$noindex_seo_consolidated = get_option( 'noindex_seo_settings', array() ); $noindex_seo_consolidated = get_option( 'noindex_seo_settings', array() );
$noindex_seo_consolidated = is_array( $noindex_seo_consolidated ) ? $noindex_seo_consolidated : array(); $noindex_seo_consolidated = is_array( $noindex_seo_consolidated ) ? $noindex_seo_consolidated : array();
$noindex_seo_consolidated_cfg = $noindex_seo_consolidated['config'] ?? array(); $noindex_seo_consolidated_cfg = isset( $noindex_seo_consolidated['config'] ) ? $noindex_seo_consolidated['config'] : array();
$noindex_seo_consolidated_cfg = is_array( $noindex_seo_consolidated_cfg ) ? $noindex_seo_consolidated_cfg : array(); $noindex_seo_consolidated_cfg = is_array( $noindex_seo_consolidated_cfg ) ? $noindex_seo_consolidated_cfg : array();
if ( isset( $noindex_seo_consolidated_cfg['delete_on_uninstall'] ) ) { if ( isset( $noindex_seo_consolidated_cfg['delete_on_uninstall'] ) ) {
$noindex_seo_delete = $noindex_seo_consolidated_cfg['delete_on_uninstall'] ? 1 : 0; $noindex_seo_delete = $noindex_seo_consolidated_cfg['delete_on_uninstall'] ? 1 : 0;