diff --git a/README.md b/README.md
deleted file mode 100644
index a11a859..0000000
--- a/README.md
+++ /dev/null
@@ -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).
diff --git a/changelog.txt b/changelog.txt
index d33c463..5735f5d 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,46 @@
== 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 `` 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] =
Audit-driven maintenance release.
diff --git a/languages/noindex-seo-ca.mo b/languages/noindex-seo-ca.mo
index 4690c04..60c5bde 100644
Binary files a/languages/noindex-seo-ca.mo and b/languages/noindex-seo-ca.mo differ
diff --git a/languages/noindex-seo-ca.po b/languages/noindex-seo-ca.po
index 4ff41b1..d13675f 100644
--- a/languages/noindex-seo-ca.po
+++ b/languages/noindex-seo-ca.po
@@ -3,10 +3,10 @@
# This file is distributed under the GPL-3.0-or-later license.
msgid ""
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"
-"POT-Creation-Date: 2026-07-18T14:48:42+00:00\n"
-"PO-Revision-Date: 2026-07-18T14:50+00:00\n"
+"POT-Creation-Date: 2026-08-17T19:24:59+00:00\n"
+"PO-Revision-Date: 2026-08-17T20:00+00:00\n"
"Last-Translator: ROBOTSTXT \n"
"Language-Team: Catalan — https://translate.wordpress.org/locale/ca/default/\n"
"Language: ca\n"
@@ -18,19 +18,25 @@ msgstr ""
"X-Domain: noindex-seo\n"
#. 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"
msgstr "noindex SEO"
#. Plugin URI of the plugin
#: noindex-seo.php
-msgid "https://wordpress.org/plugins/noindex-seo/"
-msgstr "https://wordpress.org/plugins/noindex-seo/"
+msgid "https://www.robotstxt.software/plugins/noindex-seo/"
+msgstr "https://www.robotstxt.software/plugins/noindex-seo/"
#. Description of the plugin
#: noindex-seo.php
-msgid "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."
+msgid ""
+"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
#: noindex-seo.php
@@ -39,129 +45,169 @@ msgstr "ROBOTSTXT"
#. Author URI of the plugin
#: noindex-seo.php
-msgid "https://www.robotstxt.es/"
-msgstr "https://www.robotstxt.es/"
+msgid "https://www.robotstxt.software/"
+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!"
msgstr "S'han desat els ajustaments correctament."
-#: noindex-seo.php:419
+#: noindex-seo.php:1302
msgid "Expand All"
msgstr "Expandeix-ho tot"
-#: noindex-seo.php:420
+#: noindex-seo.php:1303
msgid "Collapse All"
msgstr "Redueix-ho tot"
-#: noindex-seo.php:489
+#: noindex-seo.php:1385
msgid "Settings"
msgstr "Ajustaments"
#. translators: plugin name.
-#: noindex-seo.php:718
+#: noindex-seo.php:1627
#, php-format
-msgid "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."
+msgid ""
+"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."
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"
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"
msgstr "Sobreescriu els ajustaments globals"
-#: noindex-seo.php:972
-msgid "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:1971
+msgid ""
+"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"
msgstr "Evita la indexació"
-#: noindex-seo.php:984
+#: noindex-seo.php:1983
msgid "Prevent link following"
msgstr "Evita el seguiment d'enllaços"
-#: noindex-seo.php:989
+#: noindex-seo.php:1988
msgid "Prevent caching"
msgstr "Evita la memòria cau"
-#: noindex-seo.php:994
+#: noindex-seo.php:1993
msgid "Prevent snippets"
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"
msgstr "Evita la indexació d'imatges"
-#: noindex-seo.php:1007
+#: noindex-seo.php:2006
msgid "Effective Directives:"
msgstr "Directrius efectives:"
-#: noindex-seo.php:1032
+#: noindex-seo.php:2031
msgid "Override active:"
msgstr "Sobreescriptura activa:"
-#: noindex-seo.php:1037
+#: noindex-seo.php:2036
msgid "Override enabled but no directives selected"
msgstr "Sobreescriptura activada però sense directrius seleccionades"
-#: noindex-seo.php:1043
+#: noindex-seo.php:2042
msgid "Global settings:"
msgstr "Ajustaments globals:"
-#: noindex-seo.php:1048
+#: noindex-seo.php:2047
msgid "No restrictions (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"
msgstr "Robots"
-#: noindex-seo.php:1232
+#: noindex-seo.php:2417 noindex-seo.php:2543
msgid "Override (none)"
msgstr "Sobreescriptura (cap)"
-#: noindex-seo.php:1304
+#: noindex-seo.php:2593
msgid "Robots Directives"
msgstr "Directrius Robots"
-#: noindex-seo.php:1313
+#: noindex-seo.php:2602
msgid "🔍 noindex"
msgstr "🔍 noindex"
-#: noindex-seo.php:1317
+#: noindex-seo.php:2606
msgid "🔗 nofollow"
msgstr "🔗 nofollow"
-#: noindex-seo.php:1321
+#: noindex-seo.php:2610
msgid "💾 noarchive"
msgstr "💾 noarchive"
-#: noindex-seo.php:1325
+#: noindex-seo.php:2614
msgid "📄 nosnippet"
msgstr "📄 nosnippet"
-#: noindex-seo.php:1329
+#: noindex-seo.php:2618
msgid "🖼️ noimageindex"
msgstr "🖼️ noimageindex"
-#: noindex-seo.php:1440
+#: noindex-seo.php:2729
msgid "Enable Robots Override"
msgstr "Activa la sobreescriptura Robots"
-#: noindex-seo.php:1441
+#: noindex-seo.php:2730
msgid "Disable Robots Override"
msgstr "Desactiva la sobreescriptura Robots"
#. translators: %d: Number of posts updated
-#: noindex-seo.php:1538
+#: noindex-seo.php:2827
#, php-format
msgid "Robots override enabled for %d post."
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."
#. translators: %d: Number of posts updated
-#: noindex-seo.php:1559
+#: noindex-seo.php:2848
#, php-format
msgid "Robots override disabled for %d post."
msgid_plural "Robots override disabled for %d posts."
msgstr[0] "S'ha desactivat la sobreescriptura Robots per a %d entrada."
msgstr[1] "S'ha desactivat la sobreescriptura Robots per a %d entrades."
-#: noindex-seo.php:1608
+#: noindex-seo.php:2897
msgid "All robots settings"
msgstr "Tots els ajustaments robots"
-#: noindex-seo.php:1610
+#: noindex-seo.php:2899
msgid "With override"
msgstr "Amb sobreescriptura"
-#: noindex-seo.php:1613
+#: noindex-seo.php:2902
msgid "Without override"
msgstr "Sense sobreescriptura"
-#: noindex-seo.php:1727
+#: noindex-seo.php:3016
msgid "You do not have sufficient permissions to access this page."
msgstr "No teniu permisos suficients per a accedir a aquesta pàgina."
-#: noindex-seo.php:1728
+#: noindex-seo.php:3017
msgid "Permission Denied"
msgstr "Permís denegat"
-#: noindex-seo.php:1750
+#: noindex-seo.php:3039
msgid "Main Pages"
msgstr "Pàgines principals"
-#: noindex-seo.php:1753
+#: noindex-seo.php:3042
msgid "Front Page"
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"
msgstr "Recomanat"
-#: noindex-seo.php:1756
+#: noindex-seo.php:3045
msgid "Block the indexing of the site's front page."
msgstr "Bloqueja la indexació de la pàgina d'inici del lloc."
-#: noindex-seo.php:1760
+#: noindex-seo.php:3049
msgid "Home"
msgstr "Inici"
-#: noindex-seo.php:1763
+#: noindex-seo.php:3052
msgid "Block the indexing of the site's home page."
msgstr "Bloqueja la indexació de la pàgina principal del lloc."
-#: noindex-seo.php:1769
+#: noindex-seo.php:3058
msgid "Pages and Posts"
msgstr "Pàgines i entrades"
-#: noindex-seo.php:1772
+#: noindex-seo.php:3061
msgid "Page"
msgstr "Pàgina"
-#: noindex-seo.php:1775
+#: noindex-seo.php:3064
msgid "Block the indexing of site pages."
msgstr "Bloqueja la indexació de les pàgines del lloc."
-#: noindex-seo.php:1778
+#: noindex-seo.php:3067
msgid "Privacy Policy"
msgstr "Política de privadesa"
-#: noindex-seo.php:1781
+#: noindex-seo.php:3070
msgid "Block the indexing of the privacy policy page."
msgstr "Bloqueja la indexació de la pàgina de política de privadesa."
-#: noindex-seo.php:1785
+#: noindex-seo.php:3074
msgid "Single Post"
msgstr "Entrada individual"
-#: noindex-seo.php:1788
+#: noindex-seo.php:3077
msgid "Block the indexing of individual posts."
msgstr "Bloqueja la indexació d'entrades individuals."
-#: noindex-seo.php:1791
+#: noindex-seo.php:3080
msgid "Singular"
msgstr "Singular"
-#: noindex-seo.php:1794
+#: noindex-seo.php:3083
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"
msgstr "Taxonomies"
-#: noindex-seo.php:1802
+#: noindex-seo.php:3091
msgid "Category"
msgstr "Categoria"
-#: noindex-seo.php:1805
+#: noindex-seo.php:3094
msgid "Block the indexing of category archive pages."
msgstr "Bloqueja la indexació de les pàgines d'arxiu de categories."
-#: noindex-seo.php:1808
+#: noindex-seo.php:3097
msgid "Tag"
msgstr "Etiqueta"
-#: noindex-seo.php:1811
+#: noindex-seo.php:3100
msgid "Block the indexing of tag archive pages."
msgstr "Bloqueja la indexació de les pàgines d'arxiu d'etiquetes."
-#: noindex-seo.php:1816
+#: noindex-seo.php:3105
msgid "Date Archives"
msgstr "Arxius de data"
-#: noindex-seo.php:1819
+#: noindex-seo.php:3108
msgid "Date"
msgstr "Data"
-#: noindex-seo.php:1822
+#: noindex-seo.php:3111
msgid "Block the indexing of any date-based archive page."
msgstr "Bloqueja la indexació de qualsevol pàgina d'arxiu basada en data."
-#: noindex-seo.php:1825
+#: noindex-seo.php:3114
msgid "Day"
msgstr "Dia"
-#: noindex-seo.php:1828
+#: noindex-seo.php:3117
msgid "Block the indexing of daily archive pages."
msgstr "Bloqueja la indexació d'arxius diaris."
-#: noindex-seo.php:1831
+#: noindex-seo.php:3120
msgid "Month"
msgstr "Mes"
-#: noindex-seo.php:1834
+#: noindex-seo.php:3123
msgid "Block the indexing of monthly archive pages."
msgstr "Bloqueja la indexació d'arxius mensuals."
-#: noindex-seo.php:1837
+#: noindex-seo.php:3126
msgid "Time"
msgstr "Hora"
-#: noindex-seo.php:1840
+#: noindex-seo.php:3129
msgid "Block the indexing of time-based archive pages."
msgstr "Bloqueja la indexació d'arxius basats en hora."
-#: noindex-seo.php:1843
+#: noindex-seo.php:3132
msgid "Year"
msgstr "Any"
-#: noindex-seo.php:1846
+#: noindex-seo.php:3135
msgid "Block the indexing of yearly archive pages."
msgstr "Bloqueja la indexació d'arxius anuals."
-#: noindex-seo.php:1851
+#: noindex-seo.php:3140
msgid "Archives"
msgstr "Arxius"
-#: noindex-seo.php:1854
+#: noindex-seo.php:3143
msgid "Archive"
msgstr "Arxiu"
-#: noindex-seo.php:1857
+#: noindex-seo.php:3146
msgid "Block the indexing of any type of archive page."
msgstr "Bloqueja la indexació de qualsevol tipus de pàgina d'arxiu."
-#: noindex-seo.php:1860
+#: noindex-seo.php:3149
msgid "Author"
msgstr "Autor"
-#: noindex-seo.php:1863
+#: noindex-seo.php:3152
msgid "Block the indexing of author archive pages."
msgstr "Bloqueja la indexació de les pàgines d'arxiu d'autor."
-#: noindex-seo.php:1866
+#: noindex-seo.php:3155
msgid "Post Type Archive"
msgstr "Arxiu de tipus de contingut"
-#: noindex-seo.php:1869
+#: noindex-seo.php:3158
msgid "Block the indexing of post type archive pages."
msgstr "Bloqueja la indexació de les pàgines d'arxiu de tipus de contingut."
-#: noindex-seo.php:1874
+#: noindex-seo.php:3163
msgid "Pagination"
msgstr "Paginació"
-#: noindex-seo.php:1877
+#: noindex-seo.php:3166
msgid "Paginated Pages"
msgstr "Pàgines paginades"
-#: noindex-seo.php:1880
+#: noindex-seo.php:3169
msgid "Block the indexing of pagination pages (page 2, 3, etc.)."
msgstr "Bloqueja la indexació de les pàgines de paginació (pàgina 2, 3, etc.)."
-#: noindex-seo.php:1885
+#: noindex-seo.php:3174
msgid "Search"
msgstr "Cerca"
-#: noindex-seo.php:1888
+#: noindex-seo.php:3177
msgid "Search Results"
msgstr "Resultats de cerca"
-#: noindex-seo.php:1891
+#: noindex-seo.php:3180
msgid "Block the indexing of search result pages."
msgstr "Bloqueja la indexació de les pàgines de resultats de cerca."
-#: noindex-seo.php:1896
+#: noindex-seo.php:3185
msgid "Attachments"
msgstr "Adjunts"
-#: noindex-seo.php:1899
+#: noindex-seo.php:3188
msgid "Attachment Pages"
msgstr "Pàgines d'adjunts"
-#: noindex-seo.php:1902
-msgid "Block the indexing of attachment pages (does not affect the file itself)."
-msgstr "Bloqueja la indexació de les pàgines d'adjunts (no afecta el fitxer en si)."
+#: noindex-seo.php:3191
+msgid ""
+"Block the indexing of attachment pages (does not affect the file itself)."
+msgstr ""
+"Bloqueja la indexació de les pàgines d'adjunts (no afecta el fitxer en si)."
-#: noindex-seo.php:1907
+#: noindex-seo.php:3196
msgid "Previews"
msgstr "Previsualitzacions"
-#: noindex-seo.php:1910
+#: noindex-seo.php:3199
msgid "Customize Preview"
msgstr "Previsualització del personalitzador"
-#: noindex-seo.php:1913
+#: noindex-seo.php:3202
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"
msgstr "Previsualització de l'entrada"
-#: noindex-seo.php:1919
+#: noindex-seo.php:3208
msgid "Block the indexing when viewing post previews."
msgstr "Bloqueja la indexació en veure previsualitzacions d'entrades."
-#: noindex-seo.php:1924
+#: noindex-seo.php:3213
msgid "Error Pages"
msgstr "Pàgines d'error"
-#: noindex-seo.php:1927
+#: noindex-seo.php:3216
msgid "Error 404"
msgstr "Error 404"
-#: noindex-seo.php:1930
+#: noindex-seo.php:3219
msgid "Block the indexing of 404 error pages."
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"
msgstr "noindex"
-#: noindex-seo.php:1954
+#: noindex-seo.php:3274
msgid "Prevent search engines from indexing this page"
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"
msgstr "nofollow"
-#: noindex-seo.php:1959
+#: noindex-seo.php:3279
msgid "Prevent search engines from following links on this page"
msgstr "Evita que els cercadors segueixin els enllaços en aquesta pàgina"
-#: noindex-seo.php:1963 assets/js/editor-sidebar.js:172
+#: noindex-seo.php:3283 assets/js/editor-sidebar.js:172
msgid "noarchive"
msgstr "noarchive"
-#: noindex-seo.php:1964
+#: noindex-seo.php:3284
msgid "Prevent search engines from showing a cached version"
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"
msgstr "nosnippet"
-#: noindex-seo.php:1969
+#: noindex-seo.php:3289
msgid "Prevent search engines from showing text snippets"
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"
msgstr "noimageindex"
-#: noindex-seo.php:1974
+#: noindex-seo.php:3294
msgid "Prevent search engines from indexing images"
msgstr "Evita que els cercadors indexin imatges"
-#: noindex-seo.php:1981
+#: noindex-seo.php:3301
msgid "noindex SEO Settings"
msgstr "Ajustaments de noindex SEO"
-#: noindex-seo.php:1982
-msgid "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:3302
+msgid ""
+"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"
msgstr "Opcions totals"
-#: noindex-seo.php:1996
+#: noindex-seo.php:3356
msgid "Enabled"
msgstr "Activades"
-#: noindex-seo.php:2000
+#: noindex-seo.php:3360
msgid "Recommended to Enable"
msgstr "Recomanades per a activar"
-#: noindex-seo.php:2008
+#: noindex-seo.php:3368
msgid "General Configuration"
msgstr "Configuració general"
-#: noindex-seo.php:2022
+#: noindex-seo.php:3382
msgid "Disable compatibility warnings with other SEO plugins"
msgstr "Desactiva els avisos de compatibilitat amb altres complements de SEO"
-#: noindex-seo.php:2029
+#: noindex-seo.php:3389
msgid "Implementation Method"
msgstr "Mètode d'implementació"
-#: noindex-seo.php:2037
+#: noindex-seo.php:3397
msgid "HTML Meta Tags (default, easier to verify)"
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)"
msgstr "Capçaleres HTTP (més robust, funciona amb PDFs/imatges)"
-#: noindex-seo.php:2043
+#: noindex-seo.php:3403
msgid "Both (maximum compatibility)"
msgstr "Ambdós (màxima compatibilitat)"
-#: noindex-seo.php:2047
-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."
+#: 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."
msgstr ""
-"Trieu com s'envien les directrius noindex als cercadors. Les etiquetes meta funcionen "
-"per a pàgines HTML. Les capçaleres HTTP funcionen per a tots els tipus de contingut, "
-"incloent-hi PDFs, imatges i feeds."
+"Trieu com s'envien les directrius noindex als cercadors. Les etiquetes meta "
+"funcionen per a pàgines HTML. Les capçaleres HTTP funcionen per a tots els "
+"tipus de contingut, incloent-hi PDFs, imatges i feeds."
-#: noindex-seo.php:2065
+#: noindex-seo.php:3425
msgid "Enable per-post/page granular control"
msgstr "Activa el control granular per entrada/pàgina"
-#: noindex-seo.php:2068
-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."
+#: 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."
msgstr ""
-"En activar-se, apareixerà una meta box a l'editor d'entrades/pàgines que us permet "
-"sobreescriure els ajustaments globals per a contingut individual. Útil per a pàgines "
-"específiques que necessiten directrius robots diferents."
+"En activar-se, apareixerà una meta box a l'editor d'entrades/pàgines que us "
+"permet sobreescriure els ajustaments globals per a contingut individual. "
+"Ú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"
msgstr "Suprimeix totes les dades del complement en desinstal·lar"
-#: noindex-seo.php:2089
-msgid "When enabled, all settings and per-post robots directives will be permanently deleted when the plugin is uninstalled. By default data is preserved."
+#: noindex-seo.php: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."
msgstr ""
-"En activar-se, tots els ajustaments i les directrius robots per entrada se suprimiran "
-"de forma permanent en desinstal·lar el complement. Per defecte, les dades es conserven."
+"En activar-se, tots els ajustaments i les directrius robots per entrada se "
+"suprimiran de forma permanent en desinstal·lar el complement. Per defecte, "
+"les dades es conserven."
-#: noindex-seo.php:2098
-msgid "Important: Enabling noindex on the wrong pages can harm your search engine rankings. Only enable options you fully understand."
+#: noindex-seo.php:3479
+msgid ""
+"Important: Enabling noindex on the wrong pages can harm your search engine "
+"rankings. Only enable options you fully understand."
msgstr ""
-"Important: Activar noindex a les pàgines equivocades pot perjudicar el vostre "
-"posicionament als cercadors. Activeu només les opcions que enteneu completament."
+"Important: Activar noindex a les pàgines equivocades pot perjudicar el "
+"vostre posicionament als cercadors. Activeu només les opcions que enteneu "
+"completament."
-#: noindex-seo.php:2105
+#: noindex-seo.php:3486
msgid "Search options..."
msgstr "Cerca opcions…"
-#: noindex-seo.php:2106
+#: noindex-seo.php:3487
msgid "Search options"
msgstr "Cerca opcions"
-#: noindex-seo.php:2129
+#: noindex-seo.php:3512
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"
msgstr "No recomanat"
-#: noindex-seo.php:2143
+#: noindex-seo.php:3526
msgid "View Page"
msgstr "Mostra la pàgina"
#: assets/js/editor-sidebar.js:103
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
msgid "Robots Directives:"
diff --git a/languages/noindex-seo-es_ES.mo b/languages/noindex-seo-es_ES.mo
index af917c0..718993f 100644
Binary files a/languages/noindex-seo-es_ES.mo and b/languages/noindex-seo-es_ES.mo differ
diff --git a/languages/noindex-seo-es_ES.po b/languages/noindex-seo-es_ES.po
index 63103fc..a239e91 100644
--- a/languages/noindex-seo-es_ES.po
+++ b/languages/noindex-seo-es_ES.po
@@ -3,12 +3,13 @@
# This file is distributed under the GPL-3.0-or-later license.
msgid ""
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"
-"POT-Creation-Date: 2026-07-18T14:48:42+00:00\n"
-"PO-Revision-Date: 2026-07-18T14:50+00:00\n"
+"POT-Creation-Date: 2026-08-17T19:24:59+00:00\n"
+"PO-Revision-Date: 2026-08-17T20:00+00:00\n"
"Last-Translator: ROBOTSTXT \n"
-"Language-Team: Spanish (Spain) — https://translate.wordpress.org/locale/es/default/\n"
+"Language-Team: Spanish (Spain) — https://translate.wordpress.org/locale/es/"
+"default/\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,19 +19,25 @@ msgstr ""
"X-Domain: noindex-seo\n"
#. 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"
msgstr "noindex SEO"
#. Plugin URI of the plugin
#: noindex-seo.php
-msgid "https://wordpress.org/plugins/noindex-seo/"
-msgstr "https://wordpress.org/plugins/noindex-seo/"
+msgid "https://www.robotstxt.software/plugins/noindex-seo/"
+msgstr "https://www.robotstxt.software/plugins/noindex-seo/"
#. Description of the plugin
#: noindex-seo.php
-msgid "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."
+msgid ""
+"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
#: noindex-seo.php
@@ -39,129 +46,169 @@ msgstr "ROBOTSTXT"
#. Author URI of the plugin
#: noindex-seo.php
-msgid "https://www.robotstxt.es/"
-msgstr "https://www.robotstxt.es/"
+msgid "https://www.robotstxt.software/"
+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!"
msgstr "¡Ajustes guardados correctamente!"
-#: noindex-seo.php:419
+#: noindex-seo.php:1302
msgid "Expand All"
msgstr "Expandir todo"
-#: noindex-seo.php:420
+#: noindex-seo.php:1303
msgid "Collapse All"
msgstr "Contraer todo"
-#: noindex-seo.php:489
+#: noindex-seo.php:1385
msgid "Settings"
msgstr "Ajustes"
#. translators: plugin name.
-#: noindex-seo.php:718
+#: noindex-seo.php:1627
#, php-format
-msgid "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."
+msgid ""
+"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."
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"
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"
msgstr "Sobrescribir ajustes globales"
-#: noindex-seo.php:972
-msgid "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:1971
+msgid ""
+"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"
msgstr "Evitar indexación"
-#: noindex-seo.php:984
+#: noindex-seo.php:1983
msgid "Prevent link following"
msgstr "Evitar seguimiento de enlaces"
-#: noindex-seo.php:989
+#: noindex-seo.php:1988
msgid "Prevent caching"
msgstr "Evitar caché"
-#: noindex-seo.php:994
+#: noindex-seo.php:1993
msgid "Prevent 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"
msgstr "Evitar indexación de imágenes"
-#: noindex-seo.php:1007
+#: noindex-seo.php:2006
msgid "Effective Directives:"
msgstr "Directivas efectivas:"
-#: noindex-seo.php:1032
+#: noindex-seo.php:2031
msgid "Override active:"
msgstr "Sobrescritura activa:"
-#: noindex-seo.php:1037
+#: noindex-seo.php:2036
msgid "Override enabled but no directives selected"
msgstr "Sobrescritura activada pero sin directivas seleccionadas"
-#: noindex-seo.php:1043
+#: noindex-seo.php:2042
msgid "Global settings:"
msgstr "Ajustes globales:"
-#: noindex-seo.php:1048
+#: noindex-seo.php:2047
msgid "No restrictions (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"
msgstr "Robots"
-#: noindex-seo.php:1232
+#: noindex-seo.php:2417 noindex-seo.php:2543
msgid "Override (none)"
msgstr "Sobrescritura (ninguna)"
-#: noindex-seo.php:1304
+#: noindex-seo.php:2593
msgid "Robots Directives"
msgstr "Directivas Robots"
-#: noindex-seo.php:1313
+#: noindex-seo.php:2602
msgid "🔍 noindex"
msgstr "🔍 noindex"
-#: noindex-seo.php:1317
+#: noindex-seo.php:2606
msgid "🔗 nofollow"
msgstr "🔗 nofollow"
-#: noindex-seo.php:1321
+#: noindex-seo.php:2610
msgid "💾 noarchive"
msgstr "💾 noarchive"
-#: noindex-seo.php:1325
+#: noindex-seo.php:2614
msgid "📄 nosnippet"
msgstr "📄 nosnippet"
-#: noindex-seo.php:1329
+#: noindex-seo.php:2618
msgid "🖼️ noimageindex"
msgstr "🖼️ noimageindex"
-#: noindex-seo.php:1440
+#: noindex-seo.php:2729
msgid "Enable Robots Override"
msgstr "Activar sobrescritura Robots"
-#: noindex-seo.php:1441
+#: noindex-seo.php:2730
msgid "Disable Robots Override"
msgstr "Desactivar sobrescritura Robots"
#. translators: %d: Number of posts updated
-#: noindex-seo.php:1538
+#: noindex-seo.php:2827
#, php-format
msgid "Robots override enabled for %d post."
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."
#. translators: %d: Number of posts updated
-#: noindex-seo.php:1559
+#: noindex-seo.php:2848
#, php-format
msgid "Robots override disabled for %d post."
msgid_plural "Robots override disabled for %d posts."
msgstr[0] "Sobrescritura Robots desactivada para %d entrada."
msgstr[1] "Sobrescritura Robots desactivada para %d entradas."
-#: noindex-seo.php:1608
+#: noindex-seo.php:2897
msgid "All robots settings"
msgstr "Todos los ajustes robots"
-#: noindex-seo.php:1610
+#: noindex-seo.php:2899
msgid "With override"
msgstr "Con sobrescritura"
-#: noindex-seo.php:1613
+#: noindex-seo.php:2902
msgid "Without override"
msgstr "Sin sobrescritura"
-#: noindex-seo.php:1727
+#: noindex-seo.php:3016
msgid "You do not have sufficient permissions to access this page."
msgstr "No tienes permisos suficientes para acceder a esta página."
-#: noindex-seo.php:1728
+#: noindex-seo.php:3017
msgid "Permission Denied"
msgstr "Permiso denegado"
-#: noindex-seo.php:1750
+#: noindex-seo.php:3039
msgid "Main Pages"
msgstr "Páginas principales"
-#: noindex-seo.php:1753
+#: noindex-seo.php:3042
msgid "Front Page"
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"
msgstr "Recomendado"
-#: noindex-seo.php:1756
+#: noindex-seo.php:3045
msgid "Block the indexing of the site's front page."
msgstr "Bloquear la indexación de la página de inicio del sitio."
-#: noindex-seo.php:1760
+#: noindex-seo.php:3049
msgid "Home"
msgstr "Inicio"
-#: noindex-seo.php:1763
+#: noindex-seo.php:3052
msgid "Block the indexing of the site's home page."
msgstr "Bloquear la indexación de la página principal del sitio."
-#: noindex-seo.php:1769
+#: noindex-seo.php:3058
msgid "Pages and Posts"
msgstr "Páginas y entradas"
-#: noindex-seo.php:1772
+#: noindex-seo.php:3061
msgid "Page"
msgstr "Página"
-#: noindex-seo.php:1775
+#: noindex-seo.php:3064
msgid "Block the indexing of site pages."
msgstr "Bloquear la indexación de las páginas del sitio."
-#: noindex-seo.php:1778
+#: noindex-seo.php:3067
msgid "Privacy Policy"
msgstr "Política de privacidad"
-#: noindex-seo.php:1781
+#: noindex-seo.php:3070
msgid "Block the indexing of the privacy policy page."
msgstr "Bloquear la indexación de la página de política de privacidad."
-#: noindex-seo.php:1785
+#: noindex-seo.php:3074
msgid "Single Post"
msgstr "Entrada individual"
-#: noindex-seo.php:1788
+#: noindex-seo.php:3077
msgid "Block the indexing of individual posts."
msgstr "Bloquear la indexación de entradas individuales."
-#: noindex-seo.php:1791
+#: noindex-seo.php:3080
msgid "Singular"
msgstr "Singular"
-#: noindex-seo.php:1794
+#: noindex-seo.php:3083
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"
msgstr "Taxonomías"
-#: noindex-seo.php:1802
+#: noindex-seo.php:3091
msgid "Category"
msgstr "Categoría"
-#: noindex-seo.php:1805
+#: noindex-seo.php:3094
msgid "Block the indexing of category archive pages."
msgstr "Bloquear la indexación de las páginas de archivo de categorías."
-#: noindex-seo.php:1808
+#: noindex-seo.php:3097
msgid "Tag"
msgstr "Etiqueta"
-#: noindex-seo.php:1811
+#: noindex-seo.php:3100
msgid "Block the indexing of tag archive pages."
msgstr "Bloquear la indexación de las páginas de archivo de etiquetas."
-#: noindex-seo.php:1816
+#: noindex-seo.php:3105
msgid "Date Archives"
msgstr "Archivos de fecha"
-#: noindex-seo.php:1819
+#: noindex-seo.php:3108
msgid "Date"
msgstr "Fecha"
-#: noindex-seo.php:1822
+#: noindex-seo.php:3111
msgid "Block the indexing of any date-based archive page."
msgstr "Bloquear la indexación de cualquier página de archivo basada en fecha."
-#: noindex-seo.php:1825
+#: noindex-seo.php:3114
msgid "Day"
msgstr "Día"
-#: noindex-seo.php:1828
+#: noindex-seo.php:3117
msgid "Block the indexing of daily archive pages."
msgstr "Bloquear la indexación de archivos diarios."
-#: noindex-seo.php:1831
+#: noindex-seo.php:3120
msgid "Month"
msgstr "Mes"
-#: noindex-seo.php:1834
+#: noindex-seo.php:3123
msgid "Block the indexing of monthly archive pages."
msgstr "Bloquear la indexación de archivos mensuales."
-#: noindex-seo.php:1837
+#: noindex-seo.php:3126
msgid "Time"
msgstr "Hora"
-#: noindex-seo.php:1840
+#: noindex-seo.php:3129
msgid "Block the indexing of time-based archive pages."
msgstr "Bloquear la indexación de archivos basados en hora."
-#: noindex-seo.php:1843
+#: noindex-seo.php:3132
msgid "Year"
msgstr "Año"
-#: noindex-seo.php:1846
+#: noindex-seo.php:3135
msgid "Block the indexing of yearly archive pages."
msgstr "Bloquear la indexación de archivos anuales."
-#: noindex-seo.php:1851
+#: noindex-seo.php:3140
msgid "Archives"
msgstr "Archivos"
-#: noindex-seo.php:1854
+#: noindex-seo.php:3143
msgid "Archive"
msgstr "Archivo"
-#: noindex-seo.php:1857
+#: noindex-seo.php:3146
msgid "Block the indexing of any type of archive page."
msgstr "Bloquear la indexación de cualquier tipo de página de archivo."
-#: noindex-seo.php:1860
+#: noindex-seo.php:3149
msgid "Author"
msgstr "Autor"
-#: noindex-seo.php:1863
+#: noindex-seo.php:3152
msgid "Block the indexing of author archive pages."
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"
msgstr "Archivo de tipo de contenido"
-#: noindex-seo.php:1869
+#: noindex-seo.php:3158
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"
msgstr "Paginación"
-#: noindex-seo.php:1877
+#: noindex-seo.php:3166
msgid "Paginated Pages"
msgstr "Páginas paginadas"
-#: noindex-seo.php:1880
+#: noindex-seo.php:3169
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"
msgstr "Buscar"
-#: noindex-seo.php:1888
+#: noindex-seo.php:3177
msgid "Search Results"
msgstr "Resultados de búsqueda"
-#: noindex-seo.php:1891
+#: noindex-seo.php:3180
msgid "Block the indexing of search result pages."
msgstr "Bloquear la indexación de las páginas de resultados de búsqueda."
-#: noindex-seo.php:1896
+#: noindex-seo.php:3185
msgid "Attachments"
msgstr "Adjuntos"
-#: noindex-seo.php:1899
+#: noindex-seo.php:3188
msgid "Attachment Pages"
msgstr "Páginas de adjuntos"
-#: noindex-seo.php:1902
-msgid "Block the indexing of attachment pages (does not affect the file itself)."
-msgstr "Bloquear la indexación de las páginas de adjuntos (no afecta al archivo en sí)."
+#: noindex-seo.php:3191
+msgid ""
+"Block the indexing of attachment pages (does not affect the file itself)."
+msgstr ""
+"Bloquear la indexación de las páginas de adjuntos (no afecta al archivo en "
+"sí)."
-#: noindex-seo.php:1907
+#: noindex-seo.php:3196
msgid "Previews"
msgstr "Vistas previas"
-#: noindex-seo.php:1910
+#: noindex-seo.php:3199
msgid "Customize Preview"
msgstr "Vista previa del personalizador"
-#: noindex-seo.php:1913
+#: noindex-seo.php:3202
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"
msgstr "Vista previa de entrada"
-#: noindex-seo.php:1919
+#: noindex-seo.php:3208
msgid "Block the indexing when viewing post previews."
msgstr "Bloquear la indexación al ver vistas previas de entradas."
-#: noindex-seo.php:1924
+#: noindex-seo.php:3213
msgid "Error Pages"
msgstr "Páginas de error"
-#: noindex-seo.php:1927
+#: noindex-seo.php:3216
msgid "Error 404"
msgstr "Error 404"
-#: noindex-seo.php:1930
+#: noindex-seo.php:3219
msgid "Block the indexing of 404 error pages."
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"
msgstr "noindex"
-#: noindex-seo.php:1954
+#: noindex-seo.php:3274
msgid "Prevent search engines from indexing this page"
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"
msgstr "nofollow"
-#: noindex-seo.php:1959
+#: noindex-seo.php:3279
msgid "Prevent search engines from following links on this page"
msgstr "Evitar que los buscadores sigan los enlaces en esta página"
-#: noindex-seo.php:1963 assets/js/editor-sidebar.js:172
+#: noindex-seo.php:3283 assets/js/editor-sidebar.js:172
msgid "noarchive"
msgstr "noarchive"
-#: noindex-seo.php:1964
+#: noindex-seo.php:3284
msgid "Prevent search engines from showing a cached version"
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"
msgstr "nosnippet"
-#: noindex-seo.php:1969
+#: noindex-seo.php:3289
msgid "Prevent search engines from showing text snippets"
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"
msgstr "noimageindex"
-#: noindex-seo.php:1974
+#: noindex-seo.php:3294
msgid "Prevent search engines from indexing images"
msgstr "Evitar que los buscadores indexen imágenes"
-#: noindex-seo.php:1981
+#: noindex-seo.php:3301
msgid "noindex SEO Settings"
msgstr "Ajustes de noindex SEO"
-#: noindex-seo.php:1982
-msgid "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:3302
+msgid ""
+"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"
msgstr "Opciones totales"
-#: noindex-seo.php:1996
+#: noindex-seo.php:3356
msgid "Enabled"
msgstr "Activadas"
-#: noindex-seo.php:2000
+#: noindex-seo.php:3360
msgid "Recommended to Enable"
msgstr "Recomendadas para activar"
-#: noindex-seo.php:2008
+#: noindex-seo.php:3368
msgid "General Configuration"
msgstr "Configuración general"
-#: noindex-seo.php:2022
+#: noindex-seo.php:3382
msgid "Disable compatibility warnings with other SEO plugins"
msgstr "Desactivar avisos de compatibilidad con otros plugins de SEO"
-#: noindex-seo.php:2029
+#: noindex-seo.php:3389
msgid "Implementation Method"
msgstr "Método de implementación"
-#: noindex-seo.php:2037
+#: noindex-seo.php:3397
msgid "HTML Meta Tags (default, easier to verify)"
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)"
msgstr "Cabeceras HTTP (más robusto, funciona con PDFs/imágenes)"
-#: noindex-seo.php:2043
+#: noindex-seo.php:3403
msgid "Both (maximum compatibility)"
msgstr "Ambos (máxima compatibilidad)"
-#: noindex-seo.php:2047
-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."
+#: 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."
msgstr ""
-"Elige cómo se envían las directivas noindex a los buscadores. Las etiquetas meta "
-"funcionan para páginas HTML. Las cabeceras HTTP funcionan para todos los tipos de "
-"contenido, incluidos PDFs, imágenes y feeds."
+"Elige cómo se envían las directivas noindex a los buscadores. Las etiquetas "
+"meta funcionan para páginas HTML. Las cabeceras HTTP funcionan para todos "
+"los tipos de contenido, incluidos PDFs, imágenes y feeds."
-#: noindex-seo.php:2065
+#: noindex-seo.php:3425
msgid "Enable per-post/page granular control"
msgstr "Activar control granular por entrada/página"
-#: noindex-seo.php:2068
-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."
+#: 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."
msgstr ""
-"Al activarse, aparecerá una meta box en el editor de entradas/páginas que te permite "
-"sobrescribir los ajustes globales para contenido individual. Útil para páginas "
-"específicas que necesitan directivas robots diferentes."
+"Al activarse, aparecerá una meta box en el editor de entradas/páginas que te "
+"permite sobrescribir los ajustes globales para contenido individual. Útil "
+"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"
msgstr "Borrar todos los datos del plugin al desinstalar"
-#: noindex-seo.php:2089
-msgid "When enabled, all settings and per-post robots directives will be permanently deleted when the plugin is uninstalled. By default data is preserved."
+#: noindex-seo.php: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."
msgstr ""
-"Al activarse, todos los ajustes y las directivas robots por entrada se borrarán de "
-"forma permanente al desinstalar el plugin. Por defecto, los datos se conservan."
+"Al activarse, todos los ajustes y las directivas robots por entrada se "
+"borrarán de forma permanente al desinstalar el plugin. Por defecto, los "
+"datos se conservan."
-#: noindex-seo.php:2098
-msgid "Important: Enabling noindex on the wrong pages can harm your search engine rankings. Only enable options you fully understand."
+#: noindex-seo.php:3479
+msgid ""
+"Important: Enabling noindex on the wrong pages can harm your search engine "
+"rankings. Only enable options you fully understand."
msgstr ""
"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..."
msgstr "Buscar opciones…"
-#: noindex-seo.php:2106
+#: noindex-seo.php:3487
msgid "Search options"
msgstr "Buscar opciones"
-#: noindex-seo.php:2129
+#: noindex-seo.php:3512
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"
msgstr "No recomendado"
-#: noindex-seo.php:2143
+#: noindex-seo.php:3526
msgid "View Page"
msgstr "Ver página"
#: assets/js/editor-sidebar.js:103
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
msgid "Robots Directives:"
diff --git a/languages/noindex-seo.pot b/languages/noindex-seo.pot
index b0a5a8d..9ba7c20 100644
--- a/languages/noindex-seo.pot
+++ b/languages/noindex-seo.pot
@@ -2,28 +2,28 @@
# This file is distributed under the GPL-3.0-or-later.
msgid ""
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"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2026-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"
"X-Generator: WP-CLI 2.12.0\n"
"X-Domain: noindex-seo\n"
#. Plugin Name of the plugin
#: noindex-seo.php
-#: noindex-seo.php:509
-#: noindex-seo.php:510
+#: noindex-seo.php:1405
+#: noindex-seo.php:1406
msgid "noindex SEO"
msgstr ""
#. Plugin URI of the plugin
#: noindex-seo.php
-msgid "https://wordpress.org/plugins/noindex-seo/"
+msgid "https://www.robotstxt.software/plugins/noindex-seo/"
msgstr ""
#. Description of the plugin
@@ -38,134 +38,163 @@ msgstr ""
#. Author URI of the plugin
#: noindex-seo.php
-msgid "https://www.robotstxt.es/"
+msgid "https://www.robotstxt.software/"
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!"
msgstr ""
-#: noindex-seo.php:419
+#: noindex-seo.php:1302
msgid "Expand All"
msgstr ""
-#: noindex-seo.php:420
+#: noindex-seo.php:1303
msgid "Collapse All"
msgstr ""
-#: noindex-seo.php:489
+#: noindex-seo.php:1385
msgid "Settings"
msgstr ""
#. translators: plugin name.
-#: noindex-seo.php:718
+#: noindex-seo.php:1627
#, php-format
msgid "noindex SEO has detected that %s is active. This may cause conflicts. Please configure the options accordingly."
msgstr ""
-#: noindex-seo.php:748
+#: noindex-seo.php:1657
+#: noindex-seo.php:1756
msgid "Permission denied or invalid nonce."
msgstr ""
-#: noindex-seo.php:914
+#: noindex-seo.php:1914
+#: noindex-seo.php:2238
#: assets/js/editor-sidebar.js:91
msgid "Search Engine Visibility"
msgstr ""
-#: noindex-seo.php:967
-#: noindex-seo.php:1308
+#: noindex-seo.php:1966
+#: noindex-seo.php:2597
#: assets/js/editor-sidebar.js:102
msgid "Override global settings"
msgstr ""
-#: noindex-seo.php:972
+#: noindex-seo.php:1971
msgid "When enabled, these directives will override the global settings for this specific content."
msgstr ""
-#: noindex-seo.php:979
+#: noindex-seo.php:1978
msgid "Prevent indexing"
msgstr ""
-#: noindex-seo.php:984
+#: noindex-seo.php:1983
msgid "Prevent link following"
msgstr ""
-#: noindex-seo.php:989
+#: noindex-seo.php:1988
msgid "Prevent caching"
msgstr ""
-#: noindex-seo.php:994
+#: noindex-seo.php:1993
msgid "Prevent snippets"
msgstr ""
-#: noindex-seo.php:999
+#: noindex-seo.php:1998
#: assets/js/editor-sidebar.js:203
msgid "Prevent image indexing"
msgstr ""
-#: noindex-seo.php:1007
+#: noindex-seo.php:2006
msgid "Effective Directives:"
msgstr ""
-#: noindex-seo.php:1032
+#: noindex-seo.php:2031
msgid "Override active:"
msgstr ""
-#: noindex-seo.php:1037
+#: noindex-seo.php:2036
msgid "Override enabled but no directives selected"
msgstr ""
-#: noindex-seo.php:1043
+#: noindex-seo.php:2042
msgid "Global settings:"
msgstr ""
-#: noindex-seo.php:1048
+#: noindex-seo.php:2047
msgid "No restrictions (indexable)"
msgstr ""
-#: noindex-seo.php:1165
-#: noindex-seo.php:1171
+#: noindex-seo.php:2242
+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"
msgstr ""
-#: noindex-seo.php:1232
+#: noindex-seo.php:2417
+#: noindex-seo.php:2543
msgid "Override (none)"
msgstr ""
-#: noindex-seo.php:1304
+#: noindex-seo.php:2593
msgid "Robots Directives"
msgstr ""
-#: noindex-seo.php:1313
+#: noindex-seo.php:2602
msgid "🔍 noindex"
msgstr ""
-#: noindex-seo.php:1317
+#: noindex-seo.php:2606
msgid "🔗 nofollow"
msgstr ""
-#: noindex-seo.php:1321
+#: noindex-seo.php:2610
msgid "💾 noarchive"
msgstr ""
-#: noindex-seo.php:1325
+#: noindex-seo.php:2614
msgid "📄 nosnippet"
msgstr ""
-#: noindex-seo.php:1329
+#: noindex-seo.php:2618
msgid "🖼️ noimageindex"
msgstr ""
-#: noindex-seo.php:1440
+#: noindex-seo.php:2729
msgid "Enable Robots Override"
msgstr ""
-#: noindex-seo.php:1441
+#: noindex-seo.php:2730
msgid "Disable Robots Override"
msgstr ""
#. translators: %d: Number of posts updated
-#: noindex-seo.php:1538
+#: noindex-seo.php:2827
#, php-format
msgid "Robots override enabled for %d post."
msgid_plural "Robots override enabled for %d posts."
@@ -173,405 +202,440 @@ msgstr[0] ""
msgstr[1] ""
#. translators: %d: Number of posts updated
-#: noindex-seo.php:1559
+#: noindex-seo.php:2848
#, php-format
msgid "Robots override disabled for %d post."
msgid_plural "Robots override disabled for %d posts."
msgstr[0] ""
msgstr[1] ""
-#: noindex-seo.php:1608
+#: noindex-seo.php:2897
msgid "All robots settings"
msgstr ""
-#: noindex-seo.php:1610
+#: noindex-seo.php:2899
msgid "With override"
msgstr ""
-#: noindex-seo.php:1613
+#: noindex-seo.php:2902
msgid "Without override"
msgstr ""
-#: noindex-seo.php:1727
+#: noindex-seo.php:3016
msgid "You do not have sufficient permissions to access this page."
msgstr ""
-#: noindex-seo.php:1728
+#: noindex-seo.php:3017
msgid "Permission Denied"
msgstr ""
-#: noindex-seo.php:1750
+#: noindex-seo.php:3039
msgid "Main Pages"
msgstr ""
-#: noindex-seo.php:1753
+#: noindex-seo.php:3042
msgid "Front Page"
msgstr ""
-#: 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"
msgstr ""
-#: noindex-seo.php:1756
+#: noindex-seo.php:3045
msgid "Block the indexing of the site's front page."
msgstr ""
-#: noindex-seo.php:1760
+#: noindex-seo.php:3049
msgid "Home"
msgstr ""
-#: noindex-seo.php:1763
+#: noindex-seo.php:3052
msgid "Block the indexing of the site's home page."
msgstr ""
-#: noindex-seo.php:1769
+#: noindex-seo.php:3058
msgid "Pages and Posts"
msgstr ""
-#: noindex-seo.php:1772
+#: noindex-seo.php:3061
msgid "Page"
msgstr ""
-#: noindex-seo.php:1775
+#: noindex-seo.php:3064
msgid "Block the indexing of site pages."
msgstr ""
-#: noindex-seo.php:1778
+#: noindex-seo.php:3067
msgid "Privacy Policy"
msgstr ""
-#: noindex-seo.php:1781
+#: noindex-seo.php:3070
msgid "Block the indexing of the privacy policy page."
msgstr ""
-#: noindex-seo.php:1785
+#: noindex-seo.php:3074
msgid "Single Post"
msgstr ""
-#: noindex-seo.php:1788
+#: noindex-seo.php:3077
msgid "Block the indexing of individual posts."
msgstr ""
-#: noindex-seo.php:1791
+#: noindex-seo.php:3080
msgid "Singular"
msgstr ""
-#: noindex-seo.php:1794
+#: noindex-seo.php:3083
msgid "Block the indexing of any singular content (post or page)."
msgstr ""
-#: noindex-seo.php:1799
+#: noindex-seo.php:3088
msgid "Taxonomies"
msgstr ""
-#: noindex-seo.php:1802
+#: noindex-seo.php:3091
msgid "Category"
msgstr ""
-#: noindex-seo.php:1805
+#: noindex-seo.php:3094
msgid "Block the indexing of category archive pages."
msgstr ""
-#: noindex-seo.php:1808
+#: noindex-seo.php:3097
msgid "Tag"
msgstr ""
-#: noindex-seo.php:1811
+#: noindex-seo.php:3100
msgid "Block the indexing of tag archive pages."
msgstr ""
-#: noindex-seo.php:1816
+#: noindex-seo.php:3105
msgid "Date Archives"
msgstr ""
-#: noindex-seo.php:1819
+#: noindex-seo.php:3108
msgid "Date"
msgstr ""
-#: noindex-seo.php:1822
+#: noindex-seo.php:3111
msgid "Block the indexing of any date-based archive page."
msgstr ""
-#: noindex-seo.php:1825
+#: noindex-seo.php:3114
msgid "Day"
msgstr ""
-#: noindex-seo.php:1828
+#: noindex-seo.php:3117
msgid "Block the indexing of daily archive pages."
msgstr ""
-#: noindex-seo.php:1831
+#: noindex-seo.php:3120
msgid "Month"
msgstr ""
-#: noindex-seo.php:1834
+#: noindex-seo.php:3123
msgid "Block the indexing of monthly archive pages."
msgstr ""
-#: noindex-seo.php:1837
+#: noindex-seo.php:3126
msgid "Time"
msgstr ""
-#: noindex-seo.php:1840
+#: noindex-seo.php:3129
msgid "Block the indexing of time-based archive pages."
msgstr ""
-#: noindex-seo.php:1843
+#: noindex-seo.php:3132
msgid "Year"
msgstr ""
-#: noindex-seo.php:1846
+#: noindex-seo.php:3135
msgid "Block the indexing of yearly archive pages."
msgstr ""
-#: noindex-seo.php:1851
+#: noindex-seo.php:3140
msgid "Archives"
msgstr ""
-#: noindex-seo.php:1854
+#: noindex-seo.php:3143
msgid "Archive"
msgstr ""
-#: noindex-seo.php:1857
+#: noindex-seo.php:3146
msgid "Block the indexing of any type of archive page."
msgstr ""
-#: noindex-seo.php:1860
+#: noindex-seo.php:3149
msgid "Author"
msgstr ""
-#: noindex-seo.php:1863
+#: noindex-seo.php:3152
msgid "Block the indexing of author archive pages."
msgstr ""
-#: noindex-seo.php:1866
+#: noindex-seo.php:3155
msgid "Post Type Archive"
msgstr ""
-#: noindex-seo.php:1869
+#: noindex-seo.php:3158
msgid "Block the indexing of post type archive pages."
msgstr ""
-#: noindex-seo.php:1874
+#: noindex-seo.php:3163
msgid "Pagination"
msgstr ""
-#: noindex-seo.php:1877
+#: noindex-seo.php:3166
msgid "Paginated Pages"
msgstr ""
-#: noindex-seo.php:1880
+#: noindex-seo.php:3169
msgid "Block the indexing of pagination pages (page 2, 3, etc.)."
msgstr ""
-#: noindex-seo.php:1885
+#: noindex-seo.php:3174
msgid "Search"
msgstr ""
-#: noindex-seo.php:1888
+#: noindex-seo.php:3177
msgid "Search Results"
msgstr ""
-#: noindex-seo.php:1891
+#: noindex-seo.php:3180
msgid "Block the indexing of search result pages."
msgstr ""
-#: noindex-seo.php:1896
+#: noindex-seo.php:3185
msgid "Attachments"
msgstr ""
-#: noindex-seo.php:1899
+#: noindex-seo.php:3188
msgid "Attachment Pages"
msgstr ""
-#: noindex-seo.php:1902
+#: noindex-seo.php:3191
msgid "Block the indexing of attachment pages (does not affect the file itself)."
msgstr ""
-#: noindex-seo.php:1907
+#: noindex-seo.php:3196
msgid "Previews"
msgstr ""
-#: noindex-seo.php:1910
+#: noindex-seo.php:3199
msgid "Customize Preview"
msgstr ""
-#: noindex-seo.php:1913
+#: noindex-seo.php:3202
msgid "Block the indexing when content is in customize preview mode."
msgstr ""
-#: noindex-seo.php:1916
+#: noindex-seo.php:3205
msgid "Post Preview"
msgstr ""
-#: noindex-seo.php:1919
+#: noindex-seo.php:3208
msgid "Block the indexing when viewing post previews."
msgstr ""
-#: noindex-seo.php:1924
+#: noindex-seo.php:3213
msgid "Error Pages"
msgstr ""
-#: noindex-seo.php:1927
+#: noindex-seo.php:3216
msgid "Error 404"
msgstr ""
-#: noindex-seo.php:1930
+#: noindex-seo.php:3219
msgid "Block the indexing of 404 error pages."
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
msgid "noindex"
msgstr ""
-#: noindex-seo.php:1954
+#: noindex-seo.php:3274
msgid "Prevent search engines from indexing this page"
msgstr ""
-#: noindex-seo.php:1958
+#: noindex-seo.php:3278
#: assets/js/editor-sidebar.js:157
msgid "nofollow"
msgstr ""
-#: noindex-seo.php:1959
+#: noindex-seo.php:3279
msgid "Prevent search engines from following links on this page"
msgstr ""
-#: noindex-seo.php:1963
+#: noindex-seo.php:3283
#: assets/js/editor-sidebar.js:172
msgid "noarchive"
msgstr ""
-#: noindex-seo.php:1964
+#: noindex-seo.php:3284
msgid "Prevent search engines from showing a cached version"
msgstr ""
-#: noindex-seo.php:1968
+#: noindex-seo.php:3288
#: assets/js/editor-sidebar.js:187
msgid "nosnippet"
msgstr ""
-#: noindex-seo.php:1969
+#: noindex-seo.php:3289
msgid "Prevent search engines from showing text snippets"
msgstr ""
-#: noindex-seo.php:1973
+#: noindex-seo.php:3293
#: assets/js/editor-sidebar.js:202
msgid "noimageindex"
msgstr ""
-#: noindex-seo.php:1974
+#: noindex-seo.php:3294
msgid "Prevent search engines from indexing images"
msgstr ""
-#: noindex-seo.php:1981
+#: noindex-seo.php:3301
msgid "noindex SEO Settings"
msgstr ""
-#: noindex-seo.php:1982
+#: noindex-seo.php:3302
msgid "Control how search engines index and display your WordPress content using robots directives."
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"
msgstr ""
-#: noindex-seo.php:1996
+#: noindex-seo.php:3356
msgid "Enabled"
msgstr ""
-#: noindex-seo.php:2000
+#: noindex-seo.php:3360
msgid "Recommended to Enable"
msgstr ""
-#: noindex-seo.php:2008
+#: noindex-seo.php:3368
msgid "General Configuration"
msgstr ""
-#: noindex-seo.php:2022
+#: noindex-seo.php:3382
msgid "Disable compatibility warnings with other SEO plugins"
msgstr ""
-#: noindex-seo.php:2029
+#: noindex-seo.php:3389
msgid "Implementation Method"
msgstr ""
-#: noindex-seo.php:2037
+#: noindex-seo.php:3397
msgid "HTML Meta Tags (default, easier to verify)"
msgstr ""
-#: noindex-seo.php:2040
+#: noindex-seo.php:3400
msgid "HTTP Headers (more robust, works with PDFs/images)"
msgstr ""
-#: noindex-seo.php:2043
+#: noindex-seo.php:3403
msgid "Both (maximum compatibility)"
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."
msgstr ""
-#: noindex-seo.php:2065
+#: noindex-seo.php:3425
msgid "Enable per-post/page granular control"
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."
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"
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."
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."
msgstr ""
-#: noindex-seo.php:2105
+#: noindex-seo.php:3486
msgid "Search options..."
msgstr ""
-#: noindex-seo.php:2106
+#: noindex-seo.php:3487
msgid "Search options"
msgstr ""
-#: noindex-seo.php:2129
+#: noindex-seo.php:3512
msgid "This option only works with HTTP Headers implementation method"
msgstr ""
-#: noindex-seo.php:2138
+#: noindex-seo.php:3521
msgid "Not Recommended"
msgstr ""
-#: noindex-seo.php:2143
+#: noindex-seo.php:3526
msgid "View Page"
msgstr ""
diff --git a/noindex-seo.php b/noindex-seo.php
index 8da13de..b5df218 100644
--- a/noindex-seo.php
+++ b/noindex-seo.php
@@ -1,13 +1,13 @@
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.
@@ -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;
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).
* @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();
if ( ! isset( $settings['contexts'][ $context ][ $directive ] ) ) {
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.
* @return mixed
*/
-function noindex_seo_get_config( string $key, $fallback = null ) {
+function noindex_seo_get_config( $key, $fallback = null ) {
$settings = noindex_seo_get_settings();
if ( ! isset( $settings['config'][ $key ] ) ) {
return $fallback;
@@ -206,7 +210,7 @@ function noindex_seo_get_config( string $key, $fallback = null ) {
* @param array $settings Settings array (same shape as noindex_seo_get_settings()).
* @return void
*/
-function noindex_seo_update_settings( array $settings ): void {
+function noindex_seo_update_settings( array $settings ) {
// Keep the version tag current.
$settings['version'] = 3;
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.
*
* @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 multiple directives (noindex, nofollow, noarchive, nosnippet, noimageindex).
+ * @since 3.1.3 Restored the fallback for WordPress < 5.7: directives are
+ * printed as a classic tag on wp_head when
+ * the wp_robots API is not available, so the plugin works from
+ * WordPress 4.0 again.
*
* @see https://developer.wordpress.org/reference/hooks/wp_robots/
* @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 $directives Array of directives to apply. Default array('noindex').
* @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.
$valid_methods = array( 'meta', 'header', 'both' );
$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 );
$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(
'wp_robots',
- function ( array $robots ) use ( $directives ): array {
+ function ( array $robots ) use ( $directives ) {
foreach ( $directives as $directive ) {
$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.
);
+
+ return;
}
+
+ // WordPress 4.0 - 5.6: classic tag on wp_head.
+ add_action(
+ 'wp_head',
+ function () use ( $directives ) {
+ echo '' . "\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.
* @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' );
foreach ( $directives as $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
*/
-function noindex_seo_show(): void {
+function noindex_seo_show() {
/**
* 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.
// 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.
- 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();
if ( $term_id ) {
$term_override = get_term_meta( $term_id, '_noindex_seo_override', true );
@@ -499,7 +525,7 @@ function noindex_seo_show(): void {
'single' => is_single(),
'page' => is_page(),
'attachment' => is_attachment(),
- 'privacy_policy' => is_privacy_policy(),
+ 'privacy_policy' => function_exists( 'is_privacy_policy' ) && is_privacy_policy(),
'category' => is_category(),
'tag' => is_tag(),
'author' => is_author(),
@@ -517,7 +543,7 @@ function noindex_seo_show(): void {
'singular' => is_singular() && ! ( is_single() || is_page() || is_attachment() ),
'paged' => is_paged() && ! is_front_page() && ! is_home(),
'preview' => is_preview(),
- 'customize_preview' => is_customize_preview(),
+ 'customize_preview' => function_exists( 'is_customize_preview' ) && is_customize_preview(),
);
// Get implementation method configuration.
@@ -575,7 +601,7 @@ function noindex_seo_show(): void {
*
* @return void
*/
-function noindex_seo_check_migration(): void {
+function noindex_seo_check_migration() {
$current_config_version = get_option( 'noindex_seo_config_version', 0 );
// Check if we need to migrate to version 2.
@@ -612,7 +638,7 @@ function noindex_seo_check_migration(): void {
*
* @return void
*/
-function noindex_seo_migrate_to_v2(): void {
+function noindex_seo_migrate_to_v2() {
$contexts = noindex_seo_get_contexts();
$new_directives = array( 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
@@ -664,7 +690,7 @@ function noindex_seo_migrate_to_v2(): void {
*
* @return void
*/
-function noindex_seo_migrate_to_v3(): void {
+function noindex_seo_migrate_to_v3() {
$contexts = noindex_seo_get_contexts();
$directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
@@ -765,7 +791,7 @@ add_action( 'init', 'noindex_seo_load_textdomain' );
*
* @return void
*/
-function noindex_seo_load_textdomain(): void {
+function noindex_seo_load_textdomain() {
load_plugin_textdomain(
'noindex-seo',
false,
@@ -798,7 +824,7 @@ function noindex_seo_load_textdomain(): void {
* @param string $post_type Post type being listed.
* @return array 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.
// 'singular' is the catch-all — if it is noindexed, hide everything.
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;
}
+// 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 );
/**
@@ -875,7 +903,7 @@ add_filter( 'wp_sitemaps_posts_query_args', 'noindex_seo_filter_sitemap_posts',
* @param string $taxonomy Taxonomy being listed.
* @return array 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.
$context_for_tax = '';
if ( 'category' === $taxonomy ) {
@@ -919,6 +947,8 @@ function noindex_seo_filter_sitemap_taxonomies( array $args, string $taxonomy ):
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 );
/**
@@ -937,12 +967,14 @@ add_filter( 'wp_sitemaps_taxonomies_query_args', 'noindex_seo_filter_sitemap_tax
* @param array $args WP_User_Query arguments for the sitemap user query.
* @return array 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' ) ) {
$args['include'] = array( 0 );
}
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' );
/**
@@ -964,10 +996,18 @@ add_filter( 'wp_sitemaps_users_query_args', 'noindex_seo_filter_sitemap_users' )
* Hooked to the {@see 'rest_api_init'} action.
*
* @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
*/
-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(
'noindex-seo/v1',
'/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' );
/**
@@ -1017,10 +1059,11 @@ add_action( 'rest_api_init', 'noindex_seo_register_rest_routes' );
*/
function noindex_seo_rest_settings_permission_check() {
if ( ! current_user_can( 'manage_options' ) ) {
+ $status = function_exists( 'rest_authorization_required_code' ) ? rest_authorization_required_code() : 401;
return new WP_Error(
'noindex_seo_rest_forbidden',
__( 'You do not have permission to read the noindex SEO settings.', 'noindex-seo' ),
- array( 'status' => rest_authorization_required_code() )
+ array( 'status' => $status )
);
}
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.
*/
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' );
$post_id = is_numeric( $raw_post_id ) ? (int) $raw_post_id : 0;
$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.
if ( ! current_user_can( 'edit_post', $post->ID ) ) {
+ $status = function_exists( 'rest_authorization_required_code' ) ? rest_authorization_required_code() : 401;
return new WP_Error(
'noindex_seo_rest_forbidden',
__( 'You do not have permission to read directives for this post.', 'noindex-seo' ),
- array( 'status' => 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.
*/
-function noindex_seo_rest_get_settings(): WP_REST_Response {
+function noindex_seo_rest_get_settings() {
$settings = noindex_seo_get_settings();
unset( $settings['version'] );
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.
* @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' );
$post_id = is_numeric( $raw_post_id ) ? (int) $raw_post_id : 0;
$post = get_post( $post_id );
@@ -1204,7 +1252,7 @@ function noindex_seo_rest_get_effective( WP_REST_Request $request ): WP_REST_Res
*
* @return void
*/
-function noindex_seo_invalidate_cache_on_settings_update(): void {
+function noindex_seo_invalidate_cache_on_settings_update() {
delete_transient( 'noindex_seo_options' );
}
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.
* @return void
*/
-function noindex_seo_enqueue_admin_assets( string $hook ): void {
+function noindex_seo_enqueue_admin_assets( $hook ) {
// Only load on our settings page..
if ( 'settings_page_noindex_seo' !== $hook ) {
return;
@@ -1267,7 +1315,7 @@ function noindex_seo_enqueue_admin_assets( string $hook ): void {
*
* @return void
*/
-function noindex_seo_enqueue_editor_assets(): void {
+function noindex_seo_enqueue_editor_assets() {
// Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) {
@@ -1278,7 +1326,15 @@ function noindex_seo_enqueue_editor_assets(): void {
$screen = get_current_screen();
// 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;
}
@@ -1298,12 +1354,17 @@ function noindex_seo_enqueue_editor_assets(): void {
true
);
- // Set up translations for the script.
- wp_set_script_translations(
- 'noindex-seo-editor-sidebar',
- 'noindex-seo'
- );
+ // 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(
+ 'noindex-seo-editor-sidebar',
+ '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' );
/**
@@ -1320,7 +1381,7 @@ add_action( 'enqueue_block_editor_assets', 'noindex_seo_enqueue_editor_assets' )
* @param array $links Array of existing action links for the plugin.
* @return array Modified array including the "Settings" link.
*/
-function noindex_seo_settings_link( array $links ): array {
+function noindex_seo_settings_link( array $links ) {
$settings_link = '' . esc_html__( 'Settings', 'noindex-seo' ) . '';
$links[] = $settings_link;
return $links;
@@ -1339,7 +1400,7 @@ function noindex_seo_settings_link( array $links ): array {
*
* @return void
*/
-function noindex_seo_menu(): void {
+function noindex_seo_menu() {
add_options_page(
__( 'noindex SEO', 'noindex-seo' ),
__( 'noindex SEO', 'noindex-seo' ),
@@ -1372,7 +1433,7 @@ function noindex_seo_menu(): void {
*
* @return array List of context slugs.
*/
-function noindex_seo_get_contexts(): array {
+function noindex_seo_get_contexts() {
$base = array(
'archive',
'attachment',
@@ -1416,6 +1477,29 @@ function noindex_seo_get_contexts(): array {
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.
*
@@ -1435,10 +1519,13 @@ function noindex_seo_get_contexts(): array {
* @since 1.0.0
* @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 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
*/
-function noindex_seo_register(): void {
+function noindex_seo_register() {
$contexts = noindex_seo_get_contexts();
$directives = array( 'noindex', 'nofollow', 'noarchive', 'nosnippet', 'noimageindex' );
@@ -1446,55 +1533,14 @@ function noindex_seo_register(): void {
// Register each directive for each context.
foreach ( $contexts as $context ) {
foreach ( $directives as $directive ) {
- register_setting(
- 'noindexseo',
- $directive . '_seo_' . $context,
- array(
- 'type' => 'integer',
- 'default' => 0,
- )
- );
+ register_setting( 'noindexseo', $directive . '_seo_' . $context );
}
}
- register_setting(
- 'noindexseo',
- 'noindex_seo_config_seoplugins',
- array(
- '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,
- )
- );
+ register_setting( 'noindexseo', 'noindex_seo_config_seoplugins' );
+ register_setting( 'noindexseo', 'noindex_seo_config_method' );
+ register_setting( 'noindexseo', 'noindex_seo_config_granular' );
+ register_setting( 'noindexseo', 'noindex_seo_config_delete_on_uninstall' );
// NOTE: 'noindexseo' is the Settings API *group* name, not an option name.
// update_option_noindexseo would never fire; the transient is cleared explicitly
@@ -1519,7 +1565,7 @@ function noindex_seo_register(): 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\' )' );
delete_transient( 'noindex_seo_options' );
}
@@ -1541,7 +1587,7 @@ function noindex_seo_clear_transient(): void {
*
* @return void
*/
-function noindex_seo_detect_conflicts(): void {
+function noindex_seo_detect_conflicts() {
$option_config_seoplugins = noindex_seo_get_config( 'seoplugins', 0 );
@@ -1606,7 +1652,7 @@ add_action( 'admin_init', 'noindex_seo_detect_conflicts' );
*
* @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' ) ) {
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
*/
-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' ) ) {
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.
*/
-function noindex_seo_get_suggested_contexts(): array {
+function noindex_seo_get_suggested_contexts() {
/**
* 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.
*
* @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
*/
-function noindex_seo_register_post_meta(): void {
+function noindex_seo_register_post_meta() {
// Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) {
return;
}
+ if ( ! function_exists( 'register_post_meta' ) ) {
+ return;
+ }
+
// Get all public post types.
$post_types = get_post_types( array( 'public' => true ), 'names' );
@@ -1828,7 +1881,7 @@ add_action( 'init', 'noindex_seo_register_post_meta' );
*
* @return void
*/
-function noindex_seo_add_meta_boxes(): void {
+function noindex_seo_add_meta_boxes() {
// Check if granular control is enabled.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
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
// classic mode.
$screen = get_current_screen();
- if ( $screen && $screen->is_block_editor ) {
+ if ( $screen && version_compare( get_bloginfo( 'version' ), '5.0', '>=' ) && $screen->is_block_editor ) {
return;
}
@@ -1879,7 +1932,7 @@ add_action( 'add_meta_boxes', 'noindex_seo_add_meta_boxes' );
* @param WP_Post $post The current post object.
* @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.
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.
* @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
// Nonce verification and capability checks are performed by the callers:
// 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.
* @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.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) {
@@ -2101,14 +2154,21 @@ add_action( 'save_post', 'noindex_seo_save_post_meta' );
* Hooked to the {@see 'init'} action.
*
* @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
*/
-function noindex_seo_register_term_meta(): void {
+function noindex_seo_register_term_meta() {
if ( ! noindex_seo_get_config( 'taxonomies_granular', 0 ) ) {
return;
}
+ if ( ! function_exists( 'register_term_meta' ) || ! function_exists( 'get_term_meta' ) ) {
+ return;
+ }
+
$taxonomies = get_taxonomies( array( 'public' => true ), 'names' );
$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.
*
* @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.
* @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' );
$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.
*
* @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 $tt_id Term taxonomy ID (unused; required by the edited_{$taxonomy} hook signature).
* @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 ) ) {
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'] ) ) {
return;
}
@@ -2265,7 +2335,7 @@ function noindex_seo_save_term_meta( int $term_id, int $tt_id ): void { // phpcs
* @param array $columns Existing columns.
* @return array 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.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) {
@@ -2298,7 +2368,7 @@ function noindex_seo_add_custom_column( array $columns ): array {
* @param int $post_id Post ID.
* @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 ) {
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).
add_action(
'admin_init',
- function (): void {
+ function () {
$post_types = get_post_types( array( 'public' => true ), 'names' );
foreach ( $post_types as $post_type ) {
add_filter( "manage_{$post_type}_posts_columns", 'noindex_seo_add_custom_column' );
@@ -2409,7 +2479,7 @@ add_action(
* @param array $columns Existing columns.
* @return array Modified columns.
*/
-function noindex_seo_add_term_custom_column( array $columns ): array {
+function noindex_seo_add_term_custom_column( array $columns ) {
$new_columns = array();
foreach ( $columns as $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.
* @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 ) {
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 = ( 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).
* @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.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
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.
* @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.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) {
@@ -2644,7 +2719,7 @@ add_action( 'save_post', 'noindex_seo_save_quick_edit' );
* @param array $bulk_actions Existing bulk actions.
* @return array 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.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) {
@@ -2667,7 +2742,7 @@ function noindex_seo_register_bulk_actions( array $bulk_actions ): array {
* @param array $post_ids Array of post IDs.
* @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.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
if ( ! $granular_enabled ) {
@@ -2739,7 +2814,7 @@ function noindex_seo_handle_bulk_actions( string $redirect_to, string $action, a
*
* @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.
if ( ! empty( $_REQUEST['noindex_seo_bulk_enabled'] ) ) {
// 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.
add_action(
'admin_init',
- function (): void {
+ function () {
$post_types = get_post_types( array( 'public' => true ), 'names' );
foreach ( $post_types as $post_type ) {
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).
* @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.
$granular_enabled = noindex_seo_get_config( 'granular', 0 );
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.
* @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.
if ( ! is_admin() || ! $query->is_main_query() ) {
return;
@@ -2901,12 +2976,12 @@ add_action( 'pre_get_posts', 'noindex_seo_filter_posts_by_override' );
// Register filter dropdown after all CPTs are registered.
add_action(
'admin_init',
- function (): void {
+ function () {
$post_types = get_post_types( array( 'public' => true ), 'names' );
foreach ( $post_types as $post_type ) {
add_action(
'restrict_manage_posts',
- function () use ( $post_type ): void {
+ function () use ( $post_type ) {
global $typenow;
if ( $typenow === $post_type ) {
noindex_seo_add_list_filter( $post_type );
@@ -2934,7 +3009,7 @@ add_action(
*
* @return void
*/
-function noindex_seo_admin(): void {
+function noindex_seo_admin() {
// Verify user capabilities for defense in depth..
if ( ! current_user_can( 'manage_options' ) ) {
wp_die(
@@ -2993,7 +3068,7 @@ function noindex_seo_admin(): void {
'recommended' => __( 'Recommended', 'noindex-seo' ),
'suggestion' => true,
'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(
'label' => __( 'Single Post', 'noindex-seo' ),
@@ -3162,11 +3237,11 @@ function noindex_seo_admin(): void {
$cpt_fields = array();
foreach ( $public_cpts as $cpt ) {
$cpt_fields[ 'cpt_' . $cpt->name ] = array(
- 'label' => $cpt->labels->name ?? $cpt->name,
+ 'label' => noindex_seo_get_cpt_label( $cpt ),
'recommended' => __( 'Recommended', 'noindex-seo' ),
'suggestion' => false,
/* 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(
@@ -3418,7 +3493,7 @@ function noindex_seo_admin(): void {