From 95d5a49f622616868e889f2bff5dfe85773dcb57 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Mon, 12 Oct 2026 09:09:57 -0600 Subject: [PATCH] =?UTF-8?q?Version=20en=20ingles=20y=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/xmartica.sql | 987 +++-- .../duplicate-page/css/dp_gutenberg.css | 23 + .../duplicate-page/css/duplicate_page.css | 90 + .../plugins/duplicate-page/duplicatepage.php | 439 ++ .../duplicate-page/inc/admin-settings.php | 90 + .../duplicate-page/js/duplicate_page.js | 28 + .../duplicate-page/js/editor-script.js | 28 + .../languages/duplicate-page-cs_CZ.mo | Bin 0 -> 3859 bytes .../languages/duplicate-page-cs_CZ.po | 142 + .../languages/duplicate-page-de_DE_formal.mo | Bin 0 -> 4062 bytes .../languages/duplicate-page-de_DE_formal.po | 182 + .../languages/duplicate-page-fr_FR.mo | Bin 0 -> 3844 bytes .../languages/duplicate-page-fr_FR.po | 144 + .../languages/duplicate-page-hi_IN.mo | Bin 0 -> 4652 bytes .../languages/duplicate-page-hi_IN.po | 124 + .../languages/duplicate-page.mo | Bin 0 -> 292 bytes .../languages/duplicate-page.po | 121 + .../languages/duplicate-page.pot | 125 + wp-content/plugins/duplicate-page/readme.txt | 253 ++ wp-content/plugins/polylang-pro/LICENSE | 674 +++ wp-content/plugins/polylang-pro/changelog.txt | 2510 ++++++++++++ .../plugins/polylang-pro/css/build/admin.css | 475 +++ .../polylang-pro/css/build/admin.min.css | 1 + .../polylang-pro/css/build/bulk-translate.css | 57 + .../css/build/bulk-translate.min.css | 1 + .../plugins/polylang-pro/css/build/dialog.css | 85 + .../polylang-pro/css/build/dialog.min.css | 1 + .../build/machine-translation-settings.css | 102 + .../machine-translation-settings.min.css | 1 + .../polylang-pro/css/build/metabox-button.css | 25 + .../css/build/metabox-button.min.css | 1 + ...igation-language-switcher-editor-style.css | 3 + ...ion-language-switcher-editor-style.min.css | 1 + .../polylang-pro/css/build/selectmenu.css | 239 ++ .../polylang-pro/css/build/selectmenu.min.css | 1 + .../plugins/polylang-pro/css/build/style.css | 1 + .../polylang-pro/css/build/style.min.css | 1 + .../css/build/translations-dashboard.css | 63 + .../css/build/translations-dashboard.min.css | 1 + .../plugins/polylang-pro/css/build/wizard.css | 952 +++++ .../polylang-pro/css/build/wizard.min.css | 1 + .../wpsyntex/updater/css/build/license.css | 34 + .../updater/css/build/license.min.css | 1 + .../wpsyntex/updater/js/build/license.js | 89 + .../wpsyntex/updater/js/build/license.min.js | 1 + .../wpsyntex/updater/src/Common_Trait.php | 123 + .../updater/src/EDD_SL_Plugin_Updater.php | 737 ++++ .../wpsyntex/updater/src/License.php | 393 ++ .../wpsyntex/updater/src/Settings.php | 198 + .../wpsyntex/updater/src/Translations.php | 250 ++ .../wpsyntex/updater/src/Updater.php | 83 + .../updater/src/Wizard_Licenses_Step.php | 177 + .../updater/src/views/view-field-row.php | 51 + .../src/views/view-settings-licenses.php | 18 + .../src/views/view-wizard-step-licenses.php | 37 + .../wpsyntex/updater/uninstall.php | 15 + .../dependencies/wpsyntex/updater/version.php | 8 + .../plugins/polylang-pro/js/build/admin.js | 58 + .../polylang-pro/js/build/admin.min.js | 1 + .../polylang-pro/js/build/block-editor.js | 460 +++ .../polylang-pro/js/build/block-editor.min.js | 1 + .../plugins/polylang-pro/js/build/blocks.js | 1010 +++++ .../polylang-pro/js/build/blocks.min.js | 1 + .../polylang-pro/js/build/bulk-translate.js | 91 + .../js/build/bulk-translate.min.js | 1 + .../polylang-pro/js/build/classic-editor.js | 466 +++ .../js/build/classic-editor.min.js | 1 + .../polylang-pro/js/build/editors/post.js | 3641 +++++++++++++++++ .../polylang-pro/js/build/editors/post.min.js | 1 + .../polylang-pro/js/build/editors/site.js | 3614 ++++++++++++++++ .../polylang-pro/js/build/editors/site.min.js | 1 + .../polylang-pro/js/build/editors/widget.js | 1171 ++++++ .../js/build/editors/widget.min.js | 1 + .../polylang-pro/js/build/integrations/acf.js | 309 ++ .../js/build/integrations/acf.min.js | 1 + .../polylang-pro/js/build/languages-step.js | 303 ++ .../js/build/languages-step.min.js | 1 + .../js/build/machine-translation-settings.js | 436 ++ .../build/machine-translation-settings.min.js | 1 + .../plugins/polylang-pro/js/build/media.js | 20 + .../polylang-pro/js/build/media.min.js | 1 + .../polylang-pro/js/build/metabox-button.js | 46 + .../js/build/metabox-button.min.js | 1 + .../plugins/polylang-pro/js/build/nav-menu.js | 220 + .../polylang-pro/js/build/nav-menu.min.js | 1 + .../plugins/polylang-pro/js/build/post.js | 178 + .../plugins/polylang-pro/js/build/post.min.js | 1 + .../plugins/polylang-pro/js/build/settings.js | 395 ++ .../polylang-pro/js/build/settings.min.js | 1 + .../plugins/polylang-pro/js/build/term.js | 250 ++ .../plugins/polylang-pro/js/build/term.min.js | 1 + .../plugins/polylang-pro/js/build/user.js | 34 + .../plugins/polylang-pro/js/build/user.min.js | 1 + .../plugins/polylang-pro/js/build/widgets.js | 152 + .../polylang-pro/js/build/widgets.min.js | 1 + wp-content/plugins/polylang-pro/polylang.php | 96 + wp-content/plugins/polylang-pro/readme.txt | 171 + .../Business/Machine_Translation_Enabled.php | 41 + .../Business/Machine_Translation_Services.php | 167 + .../src/Options/Business/Media.php | 107 + .../polylang-pro/src/Options/Registry.php | 23 + .../src/integrations/ACF/Deactivate.php | 29 + .../src/integrations/ACF/Dispatcher.php | 431 ++ .../ACF/Entity/Abstract_Object.php | 485 +++ .../src/integrations/ACF/Entity/Blocks.php | 279 ++ .../src/integrations/ACF/Entity/Media.php | 67 + .../src/integrations/ACF/Entity/Post.php | 207 + .../src/integrations/ACF/Entity/Term.php | 147 + .../Entity/Translatable_Entity_Interface.php | 25 + .../src/integrations/ACF/Field_Settings.php | 127 + .../src/integrations/ACF/Fields/Repeater.php | 130 + .../ACF/Labels/Abstract_Object_Type.php | 137 + .../integrations/ACF/Labels/Field_Groups.php | 474 +++ .../src/integrations/ACF/Labels/Post_Type.php | 70 + .../src/integrations/ACF/Labels/Taxonomy.php | 70 + .../integrations/ACF/Location_Language.php | 115 + .../src/integrations/ACF/Main.php | 131 + .../src/integrations/ACF/README.md | 42 + .../ACF/Strategy/Abstract_Collect_Ids.php | 86 + .../ACF/Strategy/Abstract_Strategy.php | 386 ++ .../ACF/Strategy/Collect_Post_Ids.php | 43 + .../ACF/Strategy/Collect_Term_Ids.php | 41 + .../src/integrations/ACF/Strategy/Copy.php | 285 ++ .../integrations/ACF/Strategy/Copy_All.php | 28 + .../src/integrations/ACF/Strategy/Export.php | 103 + .../src/integrations/ACF/Strategy/Import.php | 119 + .../integrations/ACF/Strategy/Synchronize.php | 206 + .../ACF/Translation_Instructions.php | 179 + .../src/integrations/ACF/load.php | 34 + .../src/integrations/admin-columns/cpac.php | 72 + .../src/integrations/admin-columns/load.php | 25 + .../integrations/beaver-builder/flbuilder.php | 41 + .../src/integrations/beaver-builder/load.php | 23 + .../content-blocks/content-blocks.php | 40 + .../src/integrations/content-blocks/load.php | 19 + .../src/integrations/cptui/cptui.php | 105 + .../src/integrations/cptui/load.php | 19 + .../src/integrations/divi/divi-builder.php | 74 + .../src/integrations/divi/load.php | 23 + .../src/integrations/events-calendar/load.php | 19 + .../src/integrations/events-calendar/tec.php | 1302 ++++++ .../src/integrations/integration-build.php | 14 + .../src/modules/CLI/Command/Language.php | 478 +++ .../src/modules/CLI/Command/Setting.php | 563 +++ .../modules/CLI/Command/Setting_Adapter.php | 83 + .../polylang-pro/src/modules/CLI/Commands.php | 56 + .../src/modules/CLI/Formatter.php | 69 + .../polylang-pro/src/modules/CLI/load.php | 15 + .../Capabilities/Advanced_Capabilities.php | 138 + .../src/modules/Capabilities/Create/Post.php | 81 + .../src/modules/Capabilities/Create/Term.php | 81 + .../modules/Capabilities/Languages_Proxy.php | 50 + .../Capabilities/Mapper/Abstract_Mapper.php | 57 + .../Capabilities/Mapper/Do_Not_Allow.php | 14 + .../modules/Capabilities/Mapper/Internal.php | 60 + .../Mapper/Machine_Translation.php | 53 + .../src/modules/Capabilities/Mapper/Post.php | 218 + .../src/modules/Capabilities/Mapper/Term.php | 133 + .../src/modules/Capabilities/User/Creator.php | 52 + .../modules/Capabilities/User/Translator.php | 182 + .../src/modules/Capabilities/load.php | 15 + .../modules/Editors/Filter_Preload_Paths.php | 118 + .../Editors/Screens/Abstract_Screen.php | 212 + .../src/modules/Editors/Screens/Post.php | 130 + .../src/modules/Editors/Screens/Site.php | 121 + .../src/modules/Editors/Screens/Widget.php | 99 + .../polylang-pro/src/modules/Editors/load.php | 29 + .../Clients/Client_Interface.php | 45 + .../Machine_Translation/Clients/Deepl.php | 495 +++ .../src/modules/Machine_Translation/Data.php | 93 + .../modules/Machine_Translation/Factory.php | 141 + .../Machine_Translation/Module_Settings.php | 150 + .../Machine_Translation/Posts/Action.php | 214 + .../Machine_Translation/Posts/Button.php | 72 + .../Machine_Translation/Posts/Button_REST.php | 96 + .../modules/Machine_Translation/Processor.php | 151 + .../Machine_Translation/Services/Deepl.php | 254 ++ .../Services/Service_Interface.php | 113 + .../Machine_Translation/Settings/Deepl.php | 522 +++ .../Settings/Settings_Interface.php | 62 + .../Machine_Translation/Strings/Action.php | 131 + .../Machine_Translation/Strings/Metabox.php | 95 + .../Views/characters-consumption-row.php | 22 + .../Views/deepl-formality-row.php | 80 + .../Views/deepl-glossary-row.php | 44 + .../Views/inner-notice.php | 23 + .../Views/inner-notices-row.php | 28 + .../Views/progress-bar.php | 16 + .../Views/service-authentication-row.php | 96 + .../Machine_Translation/Views/string-form.php | 58 + .../src/modules/Machine_Translation/load.php | 52 + .../modules/Machine_Translation/uninstall.php | 8 + .../src/modules/Site_Health/Info.php | 42 + .../src/modules/Site_Health/load.php | 14 + .../Widget_Blocks/Frontend_Filters.php | 50 + .../Widget_Blocks/Language_Attribute.php | 70 + .../src/modules/Widget_Blocks/load.php | 24 + .../active-languages/Languages_Proxy.php | 59 + .../active-languages/active-languages.php | 388 ++ .../src/modules/active-languages/load.php | 12 + .../bulk-translate/bulk-translate-option.php | 213 + .../modules/bulk-translate/bulk-translate.php | 384 ++ .../src/modules/bulk-translate/load.php | 13 + .../view-bulk-translate-option.php | 18 + .../bulk-translate/view-bulk-translate.php | 60 + .../modules/duplicate/duplicate-action.php | 198 + .../src/modules/duplicate/duplicate-rest.php | 71 + .../src/modules/duplicate/duplicate.php | 39 + .../src/modules/duplicate/load.php | 17 + .../src/modules/duplicate/uninstall.php | 8 + .../abstract-filter-template.php | 91 + .../filter-template-core-taxonomy.php | 67 + .../filter-template-custom-taxonomy.php | 26 + .../filter-template-page.php | 65 + .../filter-template-single.php | 26 + .../filter-templates.php | 59 + .../modules/frontend-filter-template/load.php | 23 + ...stract-bulk-edit-template-slugs-module.php | 163 + .../full-site-editing/fse-abstract-module.php | 52 + .../fse-default-language-change.php | 70 + .../fse-filter-block-types.php | 109 + .../fse-language-slug-change.php | 79 + .../full-site-editing/fse-language.php | 146 + .../full-site-editing/fse-post-deletion.php | 75 + .../full-site-editing/fse-post-types.php | 71 + .../full-site-editing/fse-query-filters.php | 245 ++ .../fse-recreate-language.php | 344 ++ .../fse-rest-duplicate-template.php | 159 + .../fse-rest-enforce-default-template.php | 153 + .../full-site-editing/fse-rest-route.php | 203 + .../full-site-editing/fse-template-model.php | 160 + .../fse-template-slug-sync.php | 402 ++ .../full-site-editing/fse-template-slug.php | 190 + .../modules/full-site-editing/fse-tools.php | 231 ++ .../src/modules/full-site-editing/load.php | 51 + .../export/export-bulk-option.php | 339 ++ .../import-export/export/export-download.php | 149 + .../import-export/export/export-file.php | 46 + .../export/export-strings-action.php | 160 + .../export/strings-form-trait.php | 56 + .../export/view-export-file-format.php | 29 + .../export/view-tab-export-strings.php | 65 + .../file-format/file-format-factory.php | 153 + .../import-export/file-format/file-format.php | 53 + .../modules/import-export/import-export.php | 169 + .../import-export/import/import-action.php | 332 ++ .../import/import-file-interface.php | 69 + .../import/import-object-interface.php | 76 + .../import-export/import/import-posts.php | 213 + .../import-export/import/import-strings.php | 134 + .../import-export/import/import-terms.php | 141 + .../import/view-tab-import-translations.php | 36 + .../src/modules/import-export/load.php | 18 + .../modules/import-export/po/po-export.php | 145 + .../modules/import-export/po/po-format.php | 59 + .../modules/import-export/po/po-import.php | 175 + .../xliff/export/xliff-export-12.php | 165 + .../xliff/export/xliff-export-20.php | 24 + .../xliff/export/xliff-export-21.php | 173 + .../xliff/export/xliff-export-base.php | 325 ++ .../import-export/xliff/xliff-format.php | 74 + .../xliff/xliff-import-parser-12.php | 243 ++ .../xliff/xliff-import-parser-21.php | 198 + .../xliff/xliff-import-parser-base.php | 338 ++ .../import-export/xliff/xliff-import.php | 195 + .../src/modules/locale-fallback/load.php | 11 + .../locale-fallback/locale-fallback.php | 246 ++ .../locale-fallback/view-locale-fallback.php | 16 + .../modules/media/admin-advanced-media.php | 131 + .../polylang-pro/src/modules/media/load.php | 37 + .../src/modules/media/media-bulk-option.php | 37 + .../modules/media/settings-advanced-media.php | 77 + .../polylang-pro/src/modules/module-build.php | 28 + .../src/modules/module-interface.php | 32 + .../modules/rest/Filtered/Abstract_Object.php | 71 + .../src/modules/rest/Filtered/Comment.php | 45 + .../src/modules/rest/Filtered/Post.php | 74 + .../src/modules/rest/Filtered/Template.php | 189 + .../src/modules/rest/Filtered/Term.php | 52 + .../rest/Translatable/Abstract_object.php | 201 + .../rest/Translated/Abstract_Object.php | 118 + .../modules/rest/Translated/Attachment.php | 52 + .../src/modules/rest/Translated/Post.php | 194 + .../src/modules/rest/Translated/Template.php | 87 + .../src/modules/rest/Translated/Term.php | 138 + .../src/modules/rest/V1/Translation.php | 249 ++ .../modules/rest/V1/Untranslated_Posts.php | 265 ++ .../polylang-pro/src/modules/rest/load.php | 19 + .../src/modules/rest/rest-api.php | 186 + .../src/modules/share-slug/load.php | 27 + .../share-slug/settings-share-slug.php | 81 + .../modules/share-slug/share-post-slug.php | 365 ++ .../modules/share-slug/share-term-slug.php | 229 ++ .../src/modules/sync-post/load.php | 26 + .../sync-post/sync-post-bulk-option.php | 82 + .../modules/sync-post/sync-post-button.php | 148 + .../src/modules/sync-post/sync-post-model.php | 457 +++ .../src/modules/sync-post/sync-post-rest.php | 146 + .../src/modules/sync-post/sync-post.php | 284 ++ .../polylang-pro/src/modules/sync/load.php | 13 + .../modules/sync/sync-block-parsing-rules.php | 170 + .../src/modules/sync/sync-blocks.php | 472 +++ .../src/modules/sync/sync-content.php | 243 ++ .../src/modules/sync/sync-html.php | 165 + .../src/modules/sync/sync-ids.php | 116 + .../src/modules/sync/sync-navigation.php | 242 ++ .../src/modules/sync/sync-shortcodes.php | 159 + .../frontend-translate-slugs.php | 223 + .../src/modules/translate-slugs/load.php | 33 + .../settings-translate-slugs.php | 44 + .../translate-slugs/translate-slugs-model.php | 611 +++ .../translate-slugs/translate-slugs.php | 125 + .../src/modules/translate-slugs/uninstall.php | 10 + .../polylang-pro/src/modules/wizard/load.php | 18 + .../src/modules/wizard/wizard-pro.php | 74 + .../polylang-pro/src/modules/xdata/load.php | 15 + .../src/modules/xdata/xdata-base.php | 390 ++ .../src/modules/xdata/xdata-domain.php | 174 + .../modules/xdata/xdata-session-manager.php | 65 + .../src/modules/xdata/xdata-subdomain.php | 142 + wp-content/plugins/polylang-pro/src/pro.php | 158 + .../src/services/Encoding/Base64_Encoding.php | 70 + .../Encoding/Data_Encoder_Interface.php | 35 + .../src/services/Encoding/Data_Encoding.php | 207 + .../src/services/Encoding/Json_Encoding.php | 74 + .../services/Encoding/Serialize_Encoding.php | 59 + .../src/services/Encoding/Url_Encoding.php | 57 + .../services/admin-loader/admin-loader.php | 112 + .../collect-linked-posts.php | 307 ++ .../collect-linked-terms.php | 333 ++ .../polylang-pro/src/services/context.php | 114 + .../src/services/dom/dom-content.php | 250 ++ .../src/services/dom/dom-document.php | 208 + .../src/services/dom/dom-nodes-iterator.php | 136 + .../services/exporter/export-container.php | 93 + .../exporter/export-data-from-posts.php | 175 + .../exporter/export-data-from-strings.php | 67 + .../src/services/exporter/export-data.php | 127 + .../src/services/exporter/export-metas.php | 379 ++ .../services/exporter/export-post-metas.php | 52 + .../src/services/exporter/export-posts.php | 159 + .../src/services/exporter/export-strings.php | 121 + .../services/exporter/export-term-metas.php | 22 + .../src/services/exporter/export-terms.php | 110 + .../exporter/export-translated-objects.php | 119 + .../src/services/manage-user-capabilities.php | 66 + .../metabox-button/metabox-button.php | 254 ++ .../metabox-button/metabox-user-button.php | 40 + .../toggle-user-button-rest.php | 85 + .../metabox-button/toggle-user-meta.php | 102 + .../translation-block-parsing-rules.php | 529 +++ .../translation/translation-content.php | 89 + .../translation-data-model-interface.php | 32 + .../translation/translation-metas.php | 431 ++ .../translation-object-model-trait.php | 31 + .../translation/translation-post-metas.php | 35 + .../translation/translation-post-model.php | 422 ++ .../translation/translation-strings-model.php | 119 + .../translation/translation-term-metas.php | 35 + .../translation/translation-term-model.php | 240 ++ .../translation/translation-walker-blocks.php | 410 ++ .../translation-walker-classic.php | 109 + .../translation-walker-factory.php | 30 + .../translation-walker-interface.php | 23 + .../plugins/polylang-pro/src/upgrade.php | 104 + wp-content/plugins/polylang-pro/uninstall.php | 26 + .../plugins/polylang-pro/vendor/autoload.php | 22 + .../vendor/composer/ClassLoader.php | 579 +++ .../vendor/composer/InstalledVersions.php | 396 ++ .../polylang-pro/vendor/composer/LICENSE | 21 + .../vendor/composer/autoload_classmap.php | 420 ++ .../vendor/composer/autoload_namespaces.php | 9 + .../vendor/composer/autoload_psr4.php | 11 + .../vendor/composer/autoload_real.php | 38 + .../vendor/composer/autoload_static.php | 452 ++ .../vendor/composer/installed.json | 148 + .../vendor/composer/installed.php | 41 + .../vendor/composer/platform_check.php | 26 + .../vendor/wpsyntex/polylang/LICENSE | 674 +++ .../vendor/wpsyntex/polylang/changelog.txt | 2510 ++++++++++++ .../vendor/wpsyntex/polylang/flags/ad.png | Bin 0 -> 378 bytes .../vendor/wpsyntex/polylang/flags/ae.png | Bin 0 -> 228 bytes .../vendor/wpsyntex/polylang/flags/af.png | Bin 0 -> 365 bytes .../vendor/wpsyntex/polylang/flags/ag.png | Bin 0 -> 379 bytes .../vendor/wpsyntex/polylang/flags/ai.png | Bin 0 -> 392 bytes .../vendor/wpsyntex/polylang/flags/al.png | Bin 0 -> 365 bytes .../vendor/wpsyntex/polylang/flags/am.png | Bin 0 -> 254 bytes .../vendor/wpsyntex/polylang/flags/an.png | Bin 0 -> 242 bytes .../vendor/wpsyntex/polylang/flags/ao.png | Bin 0 -> 255 bytes .../vendor/wpsyntex/polylang/flags/ar.png | Bin 0 -> 260 bytes .../vendor/wpsyntex/polylang/flags/arab.png | Bin 0 -> 184 bytes .../vendor/wpsyntex/polylang/flags/as.png | Bin 0 -> 428 bytes .../vendor/wpsyntex/polylang/flags/at.png | Bin 0 -> 212 bytes .../vendor/wpsyntex/polylang/flags/au.png | Bin 0 -> 402 bytes .../vendor/wpsyntex/polylang/flags/aw.png | Bin 0 -> 264 bytes .../vendor/wpsyntex/polylang/flags/ax.png | Bin 0 -> 384 bytes .../vendor/wpsyntex/polylang/flags/az.png | Bin 0 -> 319 bytes .../vendor/wpsyntex/polylang/flags/ba.png | Bin 0 -> 340 bytes .../vendor/wpsyntex/polylang/flags/basque.png | Bin 0 -> 215 bytes .../vendor/wpsyntex/polylang/flags/bb.png | Bin 0 -> 316 bytes .../vendor/wpsyntex/polylang/flags/bd.png | Bin 0 -> 251 bytes .../vendor/wpsyntex/polylang/flags/be.png | Bin 0 -> 272 bytes .../vendor/wpsyntex/polylang/flags/bf.png | Bin 0 -> 289 bytes .../vendor/wpsyntex/polylang/flags/bg.png | Bin 0 -> 255 bytes .../vendor/wpsyntex/polylang/flags/bh.png | Bin 0 -> 230 bytes .../vendor/wpsyntex/polylang/flags/bi.png | Bin 0 -> 400 bytes .../vendor/wpsyntex/polylang/flags/bj.png | Bin 0 -> 248 bytes .../vendor/wpsyntex/polylang/flags/bm.png | Bin 0 -> 371 bytes .../vendor/wpsyntex/polylang/flags/bn.png | Bin 0 -> 360 bytes .../vendor/wpsyntex/polylang/flags/bo.png | Bin 0 -> 297 bytes .../vendor/wpsyntex/polylang/flags/br.png | Bin 0 -> 353 bytes .../vendor/wpsyntex/polylang/flags/bs.png | Bin 0 -> 335 bytes .../vendor/wpsyntex/polylang/flags/bt.png | Bin 0 -> 368 bytes .../vendor/wpsyntex/polylang/flags/bw.png | Bin 0 -> 238 bytes .../vendor/wpsyntex/polylang/flags/by.png | Bin 0 -> 280 bytes .../vendor/wpsyntex/polylang/flags/bz.png | Bin 0 -> 399 bytes .../vendor/wpsyntex/polylang/flags/ca.png | Bin 0 -> 340 bytes .../wpsyntex/polylang/flags/catalonia.png | Bin 0 -> 233 bytes .../vendor/wpsyntex/polylang/flags/cc.png | Bin 0 -> 359 bytes .../vendor/wpsyntex/polylang/flags/cd.png | Bin 0 -> 301 bytes .../vendor/wpsyntex/polylang/flags/cf.png | Bin 0 -> 355 bytes .../vendor/wpsyntex/polylang/flags/cg.png | Bin 0 -> 259 bytes .../vendor/wpsyntex/polylang/flags/ch.png | Bin 0 -> 167 bytes .../vendor/wpsyntex/polylang/flags/ci.png | Bin 0 -> 226 bytes .../vendor/wpsyntex/polylang/flags/ck.png | Bin 0 -> 347 bytes .../vendor/wpsyntex/polylang/flags/cl.png | Bin 0 -> 240 bytes .../vendor/wpsyntex/polylang/flags/cm.png | Bin 0 -> 310 bytes .../vendor/wpsyntex/polylang/flags/cn.png | Bin 0 -> 252 bytes .../vendor/wpsyntex/polylang/flags/co.png | Bin 0 -> 253 bytes .../vendor/wpsyntex/polylang/flags/cr.png | Bin 0 -> 270 bytes .../vendor/wpsyntex/polylang/flags/cu.png | Bin 0 -> 317 bytes .../vendor/wpsyntex/polylang/flags/cv.png | Bin 0 -> 294 bytes .../vendor/wpsyntex/polylang/flags/cx.png | Bin 0 -> 385 bytes .../vendor/wpsyntex/polylang/flags/cy.png | Bin 0 -> 232 bytes .../vendor/wpsyntex/polylang/flags/cz.png | Bin 0 -> 260 bytes .../vendor/wpsyntex/polylang/flags/de.png | Bin 0 -> 357 bytes .../vendor/wpsyntex/polylang/flags/dj.png | Bin 0 -> 315 bytes .../vendor/wpsyntex/polylang/flags/dk.png | Bin 0 -> 219 bytes .../vendor/wpsyntex/polylang/flags/dm.png | Bin 0 -> 386 bytes .../vendor/wpsyntex/polylang/flags/do.png | Bin 0 -> 264 bytes .../vendor/wpsyntex/polylang/flags/dz.png | Bin 0 -> 323 bytes .../vendor/wpsyntex/polylang/flags/ec.png | Bin 0 -> 306 bytes .../vendor/wpsyntex/polylang/flags/ee.png | Bin 0 -> 213 bytes .../vendor/wpsyntex/polylang/flags/eg.png | Bin 0 -> 266 bytes .../vendor/wpsyntex/polylang/flags/eh.png | Bin 0 -> 292 bytes .../wpsyntex/polylang/flags/england.png | Bin 0 -> 248 bytes .../vendor/wpsyntex/polylang/flags/er.png | Bin 0 -> 440 bytes .../vendor/wpsyntex/polylang/flags/es.png | Bin 0 -> 290 bytes .../wpsyntex/polylang/flags/esperanto.png | Bin 0 -> 156 bytes .../vendor/wpsyntex/polylang/flags/et.png | Bin 0 -> 353 bytes .../vendor/wpsyntex/polylang/flags/fi.png | Bin 0 -> 206 bytes .../vendor/wpsyntex/polylang/flags/fj.png | Bin 0 -> 411 bytes .../vendor/wpsyntex/polylang/flags/fk.png | Bin 0 -> 416 bytes .../vendor/wpsyntex/polylang/flags/fm.png | Bin 0 -> 225 bytes .../vendor/wpsyntex/polylang/flags/fo.png | Bin 0 -> 243 bytes .../vendor/wpsyntex/polylang/flags/fr.png | Bin 0 -> 271 bytes .../vendor/wpsyntex/polylang/flags/ga.png | Bin 0 -> 292 bytes .../wpsyntex/polylang/flags/galicia.png | Bin 0 -> 254 bytes .../vendor/wpsyntex/polylang/flags/gb.png | Bin 0 -> 394 bytes .../vendor/wpsyntex/polylang/flags/gd.png | Bin 0 -> 415 bytes .../vendor/wpsyntex/polylang/flags/ge.png | Bin 0 -> 294 bytes .../vendor/wpsyntex/polylang/flags/gh.png | Bin 0 -> 269 bytes .../vendor/wpsyntex/polylang/flags/gi.png | Bin 0 -> 269 bytes .../vendor/wpsyntex/polylang/flags/gl.png | Bin 0 -> 259 bytes .../vendor/wpsyntex/polylang/flags/gm.png | Bin 0 -> 302 bytes .../vendor/wpsyntex/polylang/flags/gn.png | Bin 0 -> 293 bytes .../vendor/wpsyntex/polylang/flags/gp.png | Bin 0 -> 264 bytes .../vendor/wpsyntex/polylang/flags/gq.png | Bin 0 -> 316 bytes .../vendor/wpsyntex/polylang/flags/gr.png | Bin 0 -> 267 bytes .../vendor/wpsyntex/polylang/flags/gs.png | Bin 0 -> 392 bytes .../vendor/wpsyntex/polylang/flags/gt.png | Bin 0 -> 220 bytes .../vendor/wpsyntex/polylang/flags/gu.png | Bin 0 -> 257 bytes .../vendor/wpsyntex/polylang/flags/gw.png | Bin 0 -> 297 bytes .../vendor/wpsyntex/polylang/flags/gy.png | Bin 0 -> 429 bytes .../vendor/wpsyntex/polylang/flags/hk.png | Bin 0 -> 240 bytes .../vendor/wpsyntex/polylang/flags/hm.png | Bin 0 -> 402 bytes .../vendor/wpsyntex/polylang/flags/hn.png | Bin 0 -> 279 bytes .../vendor/wpsyntex/polylang/flags/hr.png | Bin 0 -> 269 bytes .../vendor/wpsyntex/polylang/flags/ht.png | Bin 0 -> 278 bytes .../vendor/wpsyntex/polylang/flags/hu.png | Bin 0 -> 212 bytes .../vendor/wpsyntex/polylang/flags/id.png | Bin 0 -> 209 bytes .../vendor/wpsyntex/polylang/flags/ie.png | Bin 0 -> 243 bytes .../vendor/wpsyntex/polylang/flags/il.png | Bin 0 -> 218 bytes .../vendor/wpsyntex/polylang/flags/in.png | Bin 0 -> 294 bytes .../vendor/wpsyntex/polylang/flags/io.png | Bin 0 -> 438 bytes .../vendor/wpsyntex/polylang/flags/iq.png | Bin 0 -> 293 bytes .../vendor/wpsyntex/polylang/flags/ir.png | Bin 0 -> 311 bytes .../vendor/wpsyntex/polylang/flags/is.png | Bin 0 -> 245 bytes .../vendor/wpsyntex/polylang/flags/it.png | Bin 0 -> 234 bytes .../vendor/wpsyntex/polylang/flags/jm.png | Bin 0 -> 435 bytes .../vendor/wpsyntex/polylang/flags/jo.png | Bin 0 -> 272 bytes .../vendor/wpsyntex/polylang/flags/jp.png | Bin 0 -> 214 bytes .../vendor/wpsyntex/polylang/flags/ke.png | Bin 0 -> 343 bytes .../vendor/wpsyntex/polylang/flags/kg.png | Bin 0 -> 245 bytes .../vendor/wpsyntex/polylang/flags/kh.png | Bin 0 -> 300 bytes .../vendor/wpsyntex/polylang/flags/ki.png | Bin 0 -> 391 bytes .../vendor/wpsyntex/polylang/flags/km.png | Bin 0 -> 344 bytes .../vendor/wpsyntex/polylang/flags/kn.png | Bin 0 -> 377 bytes .../vendor/wpsyntex/polylang/flags/kp.png | Bin 0 -> 299 bytes .../vendor/wpsyntex/polylang/flags/kr.png | Bin 0 -> 339 bytes .../wpsyntex/polylang/flags/kurdistan.png | Bin 0 -> 239 bytes .../vendor/wpsyntex/polylang/flags/kw.png | Bin 0 -> 298 bytes .../vendor/wpsyntex/polylang/flags/ky.png | Bin 0 -> 386 bytes .../vendor/wpsyntex/polylang/flags/kz.png | Bin 0 -> 350 bytes .../vendor/wpsyntex/polylang/flags/la.png | Bin 0 -> 276 bytes .../vendor/wpsyntex/polylang/flags/lb.png | Bin 0 -> 247 bytes .../vendor/wpsyntex/polylang/flags/lc.png | Bin 0 -> 331 bytes .../vendor/wpsyntex/polylang/flags/li.png | Bin 0 -> 328 bytes .../vendor/wpsyntex/polylang/flags/lk.png | Bin 0 -> 357 bytes .../vendor/wpsyntex/polylang/flags/lr.png | Bin 0 -> 237 bytes .../vendor/wpsyntex/polylang/flags/ls.png | Bin 0 -> 343 bytes .../vendor/wpsyntex/polylang/flags/lt.png | Bin 0 -> 313 bytes .../vendor/wpsyntex/polylang/flags/lu.png | Bin 0 -> 262 bytes .../vendor/wpsyntex/polylang/flags/lv.png | Bin 0 -> 248 bytes .../vendor/wpsyntex/polylang/flags/ly.png | Bin 0 -> 181 bytes .../vendor/wpsyntex/polylang/flags/ma.png | Bin 0 -> 220 bytes .../vendor/wpsyntex/polylang/flags/mc.png | Bin 0 -> 198 bytes .../vendor/wpsyntex/polylang/flags/md.png | Bin 0 -> 310 bytes .../vendor/wpsyntex/polylang/flags/me.png | Bin 0 -> 270 bytes .../vendor/wpsyntex/polylang/flags/mg.png | Bin 0 -> 267 bytes .../vendor/wpsyntex/polylang/flags/mh.png | Bin 0 -> 376 bytes .../vendor/wpsyntex/polylang/flags/mk.png | Bin 0 -> 430 bytes .../vendor/wpsyntex/polylang/flags/ml.png | Bin 0 -> 299 bytes .../vendor/wpsyntex/polylang/flags/mm.png | Bin 0 -> 178 bytes .../vendor/wpsyntex/polylang/flags/mn.png | Bin 0 -> 323 bytes .../vendor/wpsyntex/polylang/flags/mo.png | Bin 0 -> 294 bytes .../vendor/wpsyntex/polylang/flags/mp.png | Bin 0 -> 367 bytes .../vendor/wpsyntex/polylang/flags/mq.png | Bin 0 -> 295 bytes .../vendor/wpsyntex/polylang/flags/mr.png | Bin 0 -> 315 bytes .../vendor/wpsyntex/polylang/flags/ms.png | Bin 0 -> 400 bytes .../vendor/wpsyntex/polylang/flags/mt.png | Bin 0 -> 219 bytes .../vendor/wpsyntex/polylang/flags/mu.png | Bin 0 -> 354 bytes .../vendor/wpsyntex/polylang/flags/mv.png | Bin 0 -> 269 bytes .../vendor/wpsyntex/polylang/flags/mw.png | Bin 0 -> 342 bytes .../vendor/wpsyntex/polylang/flags/mx.png | Bin 0 -> 301 bytes .../vendor/wpsyntex/polylang/flags/my.png | Bin 0 -> 323 bytes .../vendor/wpsyntex/polylang/flags/mz.png | Bin 0 -> 378 bytes .../vendor/wpsyntex/polylang/flags/na.png | Bin 0 -> 403 bytes .../vendor/wpsyntex/polylang/flags/nc.png | Bin 0 -> 375 bytes .../vendor/wpsyntex/polylang/flags/ne.png | Bin 0 -> 278 bytes .../vendor/wpsyntex/polylang/flags/nf.png | Bin 0 -> 281 bytes .../vendor/wpsyntex/polylang/flags/ng.png | Bin 0 -> 234 bytes .../vendor/wpsyntex/polylang/flags/ni.png | Bin 0 -> 270 bytes .../vendor/wpsyntex/polylang/flags/nl.png | Bin 0 -> 243 bytes .../vendor/wpsyntex/polylang/flags/no.png | Bin 0 -> 239 bytes .../vendor/wpsyntex/polylang/flags/np.png | Bin 0 -> 255 bytes .../vendor/wpsyntex/polylang/flags/nr.png | Bin 0 -> 261 bytes .../vendor/wpsyntex/polylang/flags/nu.png | Bin 0 -> 352 bytes .../vendor/wpsyntex/polylang/flags/nz.png | Bin 0 -> 391 bytes .../wpsyntex/polylang/flags/occitania.png | Bin 0 -> 157 bytes .../vendor/wpsyntex/polylang/flags/om.png | Bin 0 -> 255 bytes .../vendor/wpsyntex/polylang/flags/pa.png | Bin 0 -> 292 bytes .../vendor/wpsyntex/polylang/flags/pe.png | Bin 0 -> 208 bytes .../vendor/wpsyntex/polylang/flags/pf.png | Bin 0 -> 269 bytes .../vendor/wpsyntex/polylang/flags/pg.png | Bin 0 -> 364 bytes .../vendor/wpsyntex/polylang/flags/ph.png | Bin 0 -> 342 bytes .../vendor/wpsyntex/polylang/flags/pk.png | Bin 0 -> 270 bytes .../vendor/wpsyntex/polylang/flags/pl.png | Bin 0 -> 194 bytes .../vendor/wpsyntex/polylang/flags/pm.png | Bin 0 -> 439 bytes .../vendor/wpsyntex/polylang/flags/pn.png | Bin 0 -> 440 bytes .../vendor/wpsyntex/polylang/flags/pr.png | Bin 0 -> 333 bytes .../vendor/wpsyntex/polylang/flags/ps.png | Bin 0 -> 266 bytes .../vendor/wpsyntex/polylang/flags/pt.png | Bin 0 -> 360 bytes .../vendor/wpsyntex/polylang/flags/pw.png | Bin 0 -> 290 bytes .../vendor/wpsyntex/polylang/flags/py.png | Bin 0 -> 270 bytes .../vendor/wpsyntex/polylang/flags/qa.png | Bin 0 -> 204 bytes .../vendor/wpsyntex/polylang/flags/quebec.png | Bin 0 -> 157 bytes .../vendor/wpsyntex/polylang/flags/ro.png | Bin 0 -> 272 bytes .../vendor/wpsyntex/polylang/flags/rs.png | Bin 0 -> 263 bytes .../vendor/wpsyntex/polylang/flags/ru.png | Bin 0 -> 265 bytes .../vendor/wpsyntex/polylang/flags/rw.png | Bin 0 -> 315 bytes .../vendor/wpsyntex/polylang/flags/sa.png | Bin 0 -> 233 bytes .../vendor/wpsyntex/polylang/flags/sb.png | Bin 0 -> 361 bytes .../vendor/wpsyntex/polylang/flags/sc.png | Bin 0 -> 375 bytes .../wpsyntex/polylang/flags/scotland.png | Bin 0 -> 354 bytes .../vendor/wpsyntex/polylang/flags/sd.png | Bin 0 -> 280 bytes .../vendor/wpsyntex/polylang/flags/se.png | Bin 0 -> 248 bytes .../vendor/wpsyntex/polylang/flags/sg.png | Bin 0 -> 238 bytes .../vendor/wpsyntex/polylang/flags/sh.png | Bin 0 -> 389 bytes .../vendor/wpsyntex/polylang/flags/si.png | Bin 0 -> 312 bytes .../vendor/wpsyntex/polylang/flags/sk.png | Bin 0 -> 349 bytes .../vendor/wpsyntex/polylang/flags/sl.png | Bin 0 -> 272 bytes .../vendor/wpsyntex/polylang/flags/sm.png | Bin 0 -> 311 bytes .../vendor/wpsyntex/polylang/flags/sn.png | Bin 0 -> 284 bytes .../vendor/wpsyntex/polylang/flags/so.png | Bin 0 -> 238 bytes .../vendor/wpsyntex/polylang/flags/sr.png | Bin 0 -> 297 bytes .../vendor/wpsyntex/polylang/flags/ss.png | Bin 0 -> 194 bytes .../vendor/wpsyntex/polylang/flags/st.png | Bin 0 -> 375 bytes .../vendor/wpsyntex/polylang/flags/sv.png | Bin 0 -> 257 bytes .../vendor/wpsyntex/polylang/flags/sy.png | Bin 0 -> 239 bytes .../vendor/wpsyntex/polylang/flags/sz.png | Bin 0 -> 402 bytes .../vendor/wpsyntex/polylang/flags/tc.png | Bin 0 -> 413 bytes .../vendor/wpsyntex/polylang/flags/td.png | Bin 0 -> 291 bytes .../vendor/wpsyntex/polylang/flags/tf.png | Bin 0 -> 249 bytes .../vendor/wpsyntex/polylang/flags/tg.png | Bin 0 -> 355 bytes .../vendor/wpsyntex/polylang/flags/th.png | Bin 0 -> 252 bytes .../vendor/wpsyntex/polylang/flags/tibet.png | Bin 0 -> 381 bytes .../vendor/wpsyntex/polylang/flags/tj.png | Bin 0 -> 250 bytes .../vendor/wpsyntex/polylang/flags/tk.png | Bin 0 -> 397 bytes .../vendor/wpsyntex/polylang/flags/tl.png | Bin 0 -> 342 bytes .../vendor/wpsyntex/polylang/flags/tm.png | Bin 0 -> 309 bytes .../vendor/wpsyntex/polylang/flags/tn.png | Bin 0 -> 245 bytes .../vendor/wpsyntex/polylang/flags/to.png | Bin 0 -> 200 bytes .../vendor/wpsyntex/polylang/flags/tr.png | Bin 0 -> 236 bytes .../vendor/wpsyntex/polylang/flags/tt.png | Bin 0 -> 337 bytes .../vendor/wpsyntex/polylang/flags/tv.png | Bin 0 -> 331 bytes .../vendor/wpsyntex/polylang/flags/tw.png | Bin 0 -> 236 bytes .../vendor/wpsyntex/polylang/flags/tz.png | Bin 0 -> 388 bytes .../vendor/wpsyntex/polylang/flags/ua.png | Bin 0 -> 252 bytes .../vendor/wpsyntex/polylang/flags/ug.png | Bin 0 -> 353 bytes .../vendor/wpsyntex/polylang/flags/us.png | Bin 0 -> 350 bytes .../vendor/wpsyntex/polylang/flags/uy.png | Bin 0 -> 305 bytes .../vendor/wpsyntex/polylang/flags/uz.png | Bin 0 -> 313 bytes .../vendor/wpsyntex/polylang/flags/va.png | Bin 0 -> 305 bytes .../vendor/wpsyntex/polylang/flags/vc.png | Bin 0 -> 359 bytes .../vendor/wpsyntex/polylang/flags/ve.png | Bin 0 -> 332 bytes .../vendor/wpsyntex/polylang/flags/veneto.png | Bin 0 -> 350 bytes .../vendor/wpsyntex/polylang/flags/vg.png | Bin 0 -> 394 bytes .../vendor/wpsyntex/polylang/flags/vi.png | Bin 0 -> 415 bytes .../vendor/wpsyntex/polylang/flags/vn.png | Bin 0 -> 238 bytes .../vendor/wpsyntex/polylang/flags/vu.png | Bin 0 -> 369 bytes .../vendor/wpsyntex/polylang/flags/wales.png | Bin 0 -> 431 bytes .../vendor/wpsyntex/polylang/flags/wf.png | Bin 0 -> 265 bytes .../vendor/wpsyntex/polylang/flags/ws.png | Bin 0 -> 248 bytes .../vendor/wpsyntex/polylang/flags/ye.png | Bin 0 -> 246 bytes .../vendor/wpsyntex/polylang/flags/yt.png | Bin 0 -> 278 bytes .../vendor/wpsyntex/polylang/flags/za.png | Bin 0 -> 407 bytes .../vendor/wpsyntex/polylang/flags/zm.png | Bin 0 -> 261 bytes .../vendor/wpsyntex/polylang/flags/zw.png | Bin 0 -> 374 bytes .../vendor/wpsyntex/polylang/polylang.php | 94 + .../vendor/wpsyntex/polylang/readme.md | 29 + .../vendor/wpsyntex/polylang/readme.txt | 171 + .../src/Capabilities/Capabilities.php | 86 + .../Capabilities/Create/Abstract_Object.php | 64 + .../polylang/src/Capabilities/Create/Post.php | 70 + .../polylang/src/Capabilities/Create/Term.php | 77 + .../src/Capabilities/User/Creator.php | 41 + .../Capabilities/User/Creator_Interface.php | 26 + .../polylang/src/Capabilities/User/NOOP.php | 125 + .../src/Capabilities/User/User_Interface.php | 89 + .../polylang/src/Model/Hide_Default.php | 39 + .../polylang/src/Model/Hide_Empty.php | 39 + .../wpsyntex/polylang/src/Model/Languages.php | 1396 +++++++ .../polylang/src/Model/Languages_Proxies.php | 88 + .../src/Model/Languages_Proxy_Interface.php | 38 + .../polylang/src/Model/Post_Types.php | 69 + .../polylang/src/Model/Taxonomies.php | 135 + .../polylang/src/Options/Abstract_Option.php | 338 ++ .../Business/Abstract_Object_Types.php | 54 + .../polylang/src/Options/Business/Browser.php | 90 + .../src/Options/Business/Default_Lang.php | 86 + .../polylang/src/Options/Business/Domains.php | 210 + .../src/Options/Business/First_Activation.php | 86 + .../src/Options/Business/Force_Lang.php | 99 + .../src/Options/Business/Hide_Default.php | 98 + .../src/Options/Business/Media_Support.php | 67 + .../src/Options/Business/Nav_Menus.php | 188 + .../src/Options/Business/Post_Types.php | 53 + .../src/Options/Business/Previous_Version.php | 57 + .../src/Options/Business/Redirect_Lang.php | 67 + .../polylang/src/Options/Business/Rewrite.php | 86 + .../polylang/src/Options/Business/Sync.php | 89 + .../src/Options/Business/Taxonomies.php | 54 + .../polylang/src/Options/Business/Version.php | 54 + .../polylang/src/Options/Inactive_Option.php | 139 + .../wpsyntex/polylang/src/Options/Options.php | 740 ++++ .../Options/Primitive/Abstract_Boolean.php | 44 + .../src/Options/Primitive/Abstract_List.php | 129 + .../src/Options/Primitive/Abstract_Map.php | 105 + .../src/Options/Primitive/Abstract_String.php | 57 + .../polylang/src/Options/Registry.php | 52 + .../polylang/src/admin/admin-base.php | 707 ++++ .../polylang/src/admin/admin-block-editor.php | 88 + .../src/admin/admin-classic-editor.php | 385 ++ .../polylang/src/admin/admin-default-term.php | 48 + .../src/admin/admin-filters-columns.php | 418 ++ .../src/admin/admin-filters-media.php | 151 + .../src/admin/admin-filters-post-base.php | 65 + .../polylang/src/admin/admin-filters-post.php | 261 ++ .../polylang/src/admin/admin-filters-term.php | 734 ++++ .../admin/admin-filters-widgets-options.php | 36 + .../polylang/src/admin/admin-filters.php | 127 + .../polylang/src/admin/admin-links.php | 438 ++ .../polylang/src/admin/admin-model.php | 11 + .../polylang/src/admin/admin-nav-menu.php | 315 ++ .../polylang/src/admin/admin-notices.php | 295 ++ .../polylang/src/admin/admin-static-pages.php | 158 + .../polylang/src/admin/admin-strings.php | 152 + .../wpsyntex/polylang/src/admin/admin.php | 180 + .../src/admin/view-translations-media.php | 51 + .../src/admin/view-translations-post.php | 79 + .../src/admin/view-translations-term.php | 102 + .../vendor/wpsyntex/polylang/src/api.php | 676 +++ .../vendor/wpsyntex/polylang/src/base.php | 237 ++ .../vendor/wpsyntex/polylang/src/cache.php | 121 + .../wpsyntex/polylang/src/class-polylang.php | 293 ++ .../polylang/src/constant-functions.php | 66 + .../vendor/wpsyntex/polylang/src/cookie.php | 102 + .../wpsyntex/polylang/src/crud-posts.php | 445 ++ .../wpsyntex/polylang/src/crud-terms.php | 333 ++ .../wpsyntex/polylang/src/default-term.php | 231 ++ .../polylang/src/filter-rest-routes.php | 185 + .../wpsyntex/polylang/src/filters-links.php | 203 + .../polylang/src/filters-sanitization.php | 106 + .../polylang/src/filters-widgets-options.php | 94 + .../vendor/wpsyntex/polylang/src/filters.php | 400 ++ .../wpsyntex/polylang/src/format-util.php | 107 + .../polylang/src/frontend/accept-language.php | 112 + .../frontend/accept-languages-collection.php | 143 + .../polylang/src/frontend/canonical.php | 275 ++ .../src/frontend/choose-lang-content.php | 160 + .../src/frontend/choose-lang-domain.php | 45 + .../polylang/src/frontend/choose-lang-url.php | 125 + .../polylang/src/frontend/choose-lang.php | 377 ++ .../src/frontend/frontend-auto-translate.php | 346 ++ .../src/frontend/frontend-filters-links.php | 369 ++ .../src/frontend/frontend-filters-search.php | 183 + .../src/frontend/frontend-filters-widgets.php | 153 + .../src/frontend/frontend-filters.php | 216 + .../polylang/src/frontend/frontend-links.php | 228 ++ .../src/frontend/frontend-nav-menu.php | 341 ++ .../src/frontend/frontend-static-pages.php | 320 ++ .../polylang/src/frontend/frontend.php | 319 ++ .../wpsyntex/polylang/src/functions.php | 174 + .../src/install/abstract-activable.php | 73 + .../src/install/abstract-activate.php | 43 + .../src/install/abstract-deactivate.php | 36 + .../polylang/src/install/activate.php | 72 + .../polylang/src/install/deactivate.php | 27 + .../polylang/src/install/plugin-updater.php | 729 ++++ .../wpsyntex/polylang/src/install/t15s.php | 237 ++ .../wpsyntex/polylang/src/install/upgrade.php | 387 ++ .../wpsyntex/polylang/src/install/usable.php | 123 + .../aqua-resizer/aqua-resizer.php | 32 + .../src/integrations/aqua-resizer/load.php | 13 + .../src/integrations/cache/cache-compat.php | 108 + .../polylang/src/integrations/cache/load.php | 20 + .../custom-field-template/cft.php | 35 + .../custom-field-template/load.php | 21 + .../domain-mapping/domain-mapping.php | 81 + .../src/integrations/domain-mapping/load.php | 12 + .../duplicate-post/duplicate-post.php | 37 + .../src/integrations/duplicate-post/load.php | 21 + .../src/integrations/integration-build.php | 20 + .../src/integrations/integrations.php | 61 + .../integrations/jetpack/featured-content.php | 121 + .../src/integrations/jetpack/jetpack.php | 137 + .../src/integrations/jetpack/load.php | 14 + .../integrations/no-category-base/load.php | 13 + .../no-category-base/no-category-base.php | 36 + .../integrations/twenty-seventeen/load.php | 12 + .../twenty-seventeen/twenty-seven-teen.php | 30 + .../src/integrations/wp-importer/load.php | 12 + .../wp-importer/wordpress-importer.php | 70 + .../integrations/wp-importer/wp-import.php | 231 ++ .../integrations/wp-offload-media/as3cf.php | 72 + .../integrations/wp-offload-media/load.php | 20 + .../src/integrations/wp-sweep/load.php | 21 + .../src/integrations/wp-sweep/wp-sweep.php | 62 + .../polylang/src/integrations/wpseo/load.php | 20 + .../src/integrations/wpseo/wpseo-ogp.php | 54 + .../polylang/src/integrations/wpseo/wpseo.php | 517 +++ .../polylang/src/integrations/yarpp/load.php | 20 + .../polylang/src/integrations/yarpp/yarpp.php | 20 + .../polylang/src/language-deprecated.php | 255 ++ .../polylang/src/language-factory.php | 341 ++ .../vendor/wpsyntex/polylang/src/language.php | 670 +++ .../vendor/wpsyntex/polylang/src/license.php | 366 ++ .../polylang/src/links-abstract-domain.php | 114 + .../wpsyntex/polylang/src/links-default.php | 116 + .../wpsyntex/polylang/src/links-directory.php | 292 ++ .../wpsyntex/polylang/src/links-domain.php | 117 + .../wpsyntex/polylang/src/links-model.php | 264 ++ .../polylang/src/links-permalinks.php | 219 + .../wpsyntex/polylang/src/links-subdomain.php | 89 + .../vendor/wpsyntex/polylang/src/links.php | 72 + .../vendor/wpsyntex/polylang/src/mo.php | 131 + .../vendor/wpsyntex/polylang/src/model.php | 616 +++ .../Language_Switcher/Abstract_Block.php | 241 ++ .../Language_Switcher/Navigation/Block.php | 304 ++ .../Language_Switcher/Navigation/block.json | 65 + .../Language_Switcher/Standard/Block.php | 85 + .../Language_Switcher/Standard/block.json | 42 + .../polylang/src/modules/Blocks/load.php | 23 + .../polylang/src/modules/REST/API.php | 62 + .../src/modules/REST/Abstract_Controller.php | 32 + .../polylang/src/modules/REST/Request.php | 266 ++ .../src/modules/REST/V1/Languages.php | 706 ++++ .../polylang/src/modules/REST/V1/Settings.php | 204 + .../polylang/src/modules/REST/load.php | 16 + .../src/modules/machine-translation/load.php | 18 + .../settings-preview-machine-translation.php | 46 + .../polylang/src/modules/module-build.php | 17 + .../polylang/src/modules/share-slug/load.php | 20 + .../settings-preview-share-slug.php | 56 + .../modules/site-health/admin-site-health.php | 387 ++ .../polylang/src/modules/site-health/load.php | 14 + .../modules/sitemaps/abstract-sitemaps.php | 37 + .../polylang/src/modules/sitemaps/load.php | 17 + .../multilingual-sitemaps-provider.php | 218 + .../src/modules/sitemaps/sitemaps-domain.php | 71 + .../src/modules/sitemaps/sitemaps.php | 126 + .../polylang/src/modules/sync/admin-sync.php | 248 ++ .../polylang/src/modules/sync/load.php | 26 + .../src/modules/sync/settings-sync.php | 116 + .../polylang/src/modules/sync/sync-metas.php | 406 ++ .../src/modules/sync/sync-post-metas.php | 99 + .../polylang/src/modules/sync/sync-tax.php | 310 ++ .../src/modules/sync/sync-term-metas.php | 25 + .../polylang/src/modules/sync/sync.php | 279 ++ .../src/modules/translate-slugs/load.php | 20 + .../settings-preview-translate-slugs.php | 56 + .../src/modules/wizard/html-wizard-notice.php | 49 + .../wizard/images/media-screen-rtl.png | Bin 0 -> 21885 bytes .../modules/wizard/images/media-screen.png | Bin 0 -> 27311 bytes .../modules/wizard/images/polylang-logo.png | Bin 0 -> 980 bytes .../polylang/src/modules/wizard/load.php | 14 + .../src/modules/wizard/view-wizard-page.php | 122 + .../wizard/view-wizard-step-home-page.php | 125 + .../wizard/view-wizard-step-languages.php | 136 + .../modules/wizard/view-wizard-step-last.php | 112 + .../wizard/view-wizard-step-licenses.php | 42 + .../modules/wizard/view-wizard-step-media.php | 58 + ...view-wizard-step-untranslated-contents.php | 37 + .../polylang/src/modules/wizard/wizard.php | 888 ++++ .../polylang/src/modules/wpml/load.php | 17 + .../polylang/src/modules/wpml/wpml-api.php | 500 +++ .../polylang/src/modules/wpml/wpml-compat.php | 193 + .../polylang/src/modules/wpml/wpml-config.php | 1075 +++++ .../src/modules/wpml/wpml-legacy-api.php | 437 ++ .../vendor/wpsyntex/polylang/src/nav-menu.php | 178 + .../wpsyntex/polylang/src/olt-manager.php | 107 + .../vendor/wpsyntex/polylang/src/query.php | 283 ++ .../wpsyntex/polylang/src/rest-request.php | 164 + .../wpsyntex/polylang/src/settings/flags.php | 276 ++ .../polylang/src/settings/languages.php | 1550 +++++++ .../src/settings/settings-browser.php | 107 + .../polylang/src/settings/settings-cpt.php | 178 + .../src/settings/settings-licenses.php | 147 + .../polylang/src/settings/settings-media.php | 37 + .../polylang/src/settings/settings-module.php | 375 ++ .../polylang/src/settings/settings-url.php | 279 ++ .../polylang/src/settings/settings.php | 417 ++ .../polylang/src/settings/table-languages.php | 277 ++ .../polylang/src/settings/table-settings.php | 194 + .../polylang/src/settings/table-string.php | 473 +++ .../polylang/src/settings/view-about.php | 29 + .../polylang/src/settings/view-languages.php | 35 + .../polylang/src/settings/view-tab-lang.php | 178 + .../src/settings/view-tab-settings.php | 19 + .../src/settings/view-tab-strings.php | 37 + .../wpsyntex/polylang/src/static-pages.php | 230 ++ .../vendor/wpsyntex/polylang/src/switcher.php | 295 ++ .../wpsyntex/polylang/src/term-slug.php | 190 + ...anslatable-object-with-types-interface.php | 43 + .../translatable-object-with-types-trait.php | 74 + .../polylang/src/translatable-object.php | 689 ++++ .../polylang/src/translatable-objects.php | 138 + .../polylang/src/translate-option.php | 438 ++ .../polylang/src/translated-object.php | 654 +++ .../wpsyntex/polylang/src/translated-post.php | 572 +++ .../wpsyntex/polylang/src/translated-term.php | 485 +++ .../wpsyntex/polylang/src/walker-dropdown.php | 105 + .../wpsyntex/polylang/src/walker-list.php | 90 + .../vendor/wpsyntex/polylang/src/walker.php | 78 + .../wpsyntex/polylang/src/widget-calendar.php | 355 ++ .../polylang/src/widget-languages.php | 174 + .../vendor/wpsyntex/polylang/uninstall.php | 193 + wp-content/themes/xmartica/footer-es.php | 178 + wp-content/themes/xmartica/footer.php | 63 +- wp-content/themes/xmartica/front-page-es.php | 373 ++ wp-content/themes/xmartica/front-page.php | 125 +- wp-content/themes/xmartica/header-es.php | 143 + wp-content/themes/xmartica/header.php | 64 +- wp-content/themes/xmartica/js/scripts.js | 2 + .../xmartica/page-ai-strategy-consulting.php | 314 ++ ...age-business-transformation-consulting.php | 389 ++ .../page-change-management-consulting.php | 319 ++ .../page-customer-experience-strategy.php | 324 ++ .../page-data-analytics-consulting.php | 319 ++ ...page-digital-transformation-consulting.php | 440 ++ .../page-process-improvement-consulting.php | 319 ++ .../spotlight-cursor/spotlight-cursor.css | 34 +- .../spotlight-cursor/spotlight-cursor.js | 3 +- wp-content/themes/xmartica/style.css | 12 +- 885 files changed, 112343 insertions(+), 404 deletions(-) create mode 100644 wp-content/plugins/duplicate-page/css/dp_gutenberg.css create mode 100644 wp-content/plugins/duplicate-page/css/duplicate_page.css create mode 100644 wp-content/plugins/duplicate-page/duplicatepage.php create mode 100644 wp-content/plugins/duplicate-page/inc/admin-settings.php create mode 100644 wp-content/plugins/duplicate-page/js/duplicate_page.js create mode 100644 wp-content/plugins/duplicate-page/js/editor-script.js create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page-cs_CZ.mo create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page-cs_CZ.po create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page-de_DE_formal.mo create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page-de_DE_formal.po create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page-fr_FR.mo create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page-fr_FR.po create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page-hi_IN.mo create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page-hi_IN.po create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page.mo create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page.po create mode 100644 wp-content/plugins/duplicate-page/languages/duplicate-page.pot create mode 100644 wp-content/plugins/duplicate-page/readme.txt create mode 100644 wp-content/plugins/polylang-pro/LICENSE create mode 100644 wp-content/plugins/polylang-pro/changelog.txt create mode 100644 wp-content/plugins/polylang-pro/css/build/admin.css create mode 100644 wp-content/plugins/polylang-pro/css/build/admin.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/bulk-translate.css create mode 100644 wp-content/plugins/polylang-pro/css/build/bulk-translate.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/dialog.css create mode 100644 wp-content/plugins/polylang-pro/css/build/dialog.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/machine-translation-settings.css create mode 100644 wp-content/plugins/polylang-pro/css/build/machine-translation-settings.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/metabox-button.css create mode 100644 wp-content/plugins/polylang-pro/css/build/metabox-button.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/navigation-language-switcher-editor-style.css create mode 100644 wp-content/plugins/polylang-pro/css/build/navigation-language-switcher-editor-style.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/selectmenu.css create mode 100644 wp-content/plugins/polylang-pro/css/build/selectmenu.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/style.css create mode 100644 wp-content/plugins/polylang-pro/css/build/style.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/translations-dashboard.css create mode 100644 wp-content/plugins/polylang-pro/css/build/translations-dashboard.min.css create mode 100644 wp-content/plugins/polylang-pro/css/build/wizard.css create mode 100644 wp-content/plugins/polylang-pro/css/build/wizard.min.css create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/css/build/license.css create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/css/build/license.min.css create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/js/build/license.js create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/js/build/license.min.js create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Common_Trait.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/EDD_SL_Plugin_Updater.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/License.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Settings.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Translations.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Updater.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Wizard_Licenses_Step.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-field-row.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-settings-licenses.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-wizard-step-licenses.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/uninstall.php create mode 100644 wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/version.php create mode 100644 wp-content/plugins/polylang-pro/js/build/admin.js create mode 100644 wp-content/plugins/polylang-pro/js/build/admin.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/block-editor.js create mode 100644 wp-content/plugins/polylang-pro/js/build/block-editor.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/blocks.js create mode 100644 wp-content/plugins/polylang-pro/js/build/blocks.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/bulk-translate.js create mode 100644 wp-content/plugins/polylang-pro/js/build/bulk-translate.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/classic-editor.js create mode 100644 wp-content/plugins/polylang-pro/js/build/classic-editor.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/editors/post.js create mode 100644 wp-content/plugins/polylang-pro/js/build/editors/post.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/editors/site.js create mode 100644 wp-content/plugins/polylang-pro/js/build/editors/site.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/editors/widget.js create mode 100644 wp-content/plugins/polylang-pro/js/build/editors/widget.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/integrations/acf.js create mode 100644 wp-content/plugins/polylang-pro/js/build/integrations/acf.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/languages-step.js create mode 100644 wp-content/plugins/polylang-pro/js/build/languages-step.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/machine-translation-settings.js create mode 100644 wp-content/plugins/polylang-pro/js/build/machine-translation-settings.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/media.js create mode 100644 wp-content/plugins/polylang-pro/js/build/media.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/metabox-button.js create mode 100644 wp-content/plugins/polylang-pro/js/build/metabox-button.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/nav-menu.js create mode 100644 wp-content/plugins/polylang-pro/js/build/nav-menu.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/post.js create mode 100644 wp-content/plugins/polylang-pro/js/build/post.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/settings.js create mode 100644 wp-content/plugins/polylang-pro/js/build/settings.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/term.js create mode 100644 wp-content/plugins/polylang-pro/js/build/term.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/user.js create mode 100644 wp-content/plugins/polylang-pro/js/build/user.min.js create mode 100644 wp-content/plugins/polylang-pro/js/build/widgets.js create mode 100644 wp-content/plugins/polylang-pro/js/build/widgets.min.js create mode 100644 wp-content/plugins/polylang-pro/polylang.php create mode 100644 wp-content/plugins/polylang-pro/readme.txt create mode 100644 wp-content/plugins/polylang-pro/src/Options/Business/Machine_Translation_Enabled.php create mode 100644 wp-content/plugins/polylang-pro/src/Options/Business/Machine_Translation_Services.php create mode 100644 wp-content/plugins/polylang-pro/src/Options/Business/Media.php create mode 100644 wp-content/plugins/polylang-pro/src/Options/Registry.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Deactivate.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Dispatcher.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Abstract_Object.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Blocks.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Media.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Post.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Term.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Translatable_Entity_Interface.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Field_Settings.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Fields/Repeater.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Abstract_Object_Type.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Field_Groups.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Post_Type.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Taxonomy.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Location_Language.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Main.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/README.md create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Abstract_Collect_Ids.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Abstract_Strategy.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Collect_Post_Ids.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Collect_Term_Ids.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Copy.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Copy_All.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Export.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Import.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Synchronize.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/Translation_Instructions.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/ACF/load.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/admin-columns/cpac.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/admin-columns/load.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/beaver-builder/flbuilder.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/beaver-builder/load.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/content-blocks/content-blocks.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/content-blocks/load.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/cptui/cptui.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/cptui/load.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/divi/divi-builder.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/divi/load.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/events-calendar/load.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/events-calendar/tec.php create mode 100644 wp-content/plugins/polylang-pro/src/integrations/integration-build.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/CLI/Command/Language.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/CLI/Command/Setting.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/CLI/Command/Setting_Adapter.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/CLI/Commands.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/CLI/Formatter.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/CLI/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Advanced_Capabilities.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Create/Post.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Create/Term.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Languages_Proxy.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Abstract_Mapper.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Do_Not_Allow.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Internal.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Machine_Translation.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Post.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Term.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/User/Creator.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/User/Translator.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Capabilities/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Editors/Filter_Preload_Paths.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Abstract_Screen.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Post.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Site.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Widget.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Editors/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Clients/Client_Interface.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Clients/Deepl.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Data.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Factory.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Module_Settings.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Action.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Button.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Button_REST.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Processor.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Services/Deepl.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Services/Service_Interface.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Settings/Deepl.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Settings/Settings_Interface.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Strings/Action.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Strings/Metabox.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/characters-consumption-row.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/deepl-formality-row.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/deepl-glossary-row.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/inner-notice.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/inner-notices-row.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/progress-bar.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/service-authentication-row.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/string-form.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Machine_Translation/uninstall.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Site_Health/Info.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Site_Health/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/Frontend_Filters.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/Language_Attribute.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/active-languages/Languages_Proxy.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/active-languages/active-languages.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/active-languages/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/bulk-translate/bulk-translate-option.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/bulk-translate/bulk-translate.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/bulk-translate/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/bulk-translate/view-bulk-translate-option.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/bulk-translate/view-bulk-translate.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate-action.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate-rest.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/duplicate/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/duplicate/uninstall.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/abstract-filter-template.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-core-taxonomy.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-custom-taxonomy.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-page.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-single.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-templates.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-abstract-bulk-edit-template-slugs-module.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-abstract-module.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-default-language-change.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-filter-block-types.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-language-slug-change.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-language.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-post-deletion.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-post-types.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-query-filters.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-recreate-language.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-duplicate-template.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-enforce-default-template.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-route.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-model.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-slug-sync.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-slug.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-tools.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/full-site-editing/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/export/export-bulk-option.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/export/export-download.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/export/export-file.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/export/export-strings-action.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/export/strings-form-trait.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/export/view-export-file-format.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/export/view-tab-export-strings.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/file-format/file-format-factory.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/file-format/file-format.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/import-export.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/import/import-action.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/import/import-file-interface.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/import/import-object-interface.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/import/import-posts.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/import/import-strings.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/import/import-terms.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/import/view-tab-import-translations.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/po/po-export.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/po/po-format.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/po/po-import.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-12.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-20.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-21.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-base.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-format.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-12.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-21.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-base.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/locale-fallback/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/locale-fallback/locale-fallback.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/locale-fallback/view-locale-fallback.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/media/admin-advanced-media.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/media/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/media/media-bulk-option.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/media/settings-advanced-media.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/module-build.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/module-interface.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Abstract_Object.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Comment.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Post.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Template.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Term.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Translatable/Abstract_object.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Translated/Abstract_Object.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Translated/Attachment.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Translated/Post.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Translated/Template.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/Translated/Term.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/V1/Translation.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/V1/Untranslated_Posts.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/rest/rest-api.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/share-slug/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/share-slug/settings-share-slug.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/share-slug/share-post-slug.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/share-slug/share-term-slug.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync-post/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-bulk-option.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-button.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-model.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-rest.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync/sync-block-parsing-rules.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync/sync-blocks.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync/sync-content.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync/sync-html.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync/sync-ids.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync/sync-navigation.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/sync/sync-shortcodes.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/translate-slugs/frontend-translate-slugs.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/translate-slugs/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/translate-slugs/settings-translate-slugs.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/translate-slugs/translate-slugs-model.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/translate-slugs/translate-slugs.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/translate-slugs/uninstall.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/wizard/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/wizard/wizard-pro.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/xdata/load.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/xdata/xdata-base.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/xdata/xdata-domain.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/xdata/xdata-session-manager.php create mode 100644 wp-content/plugins/polylang-pro/src/modules/xdata/xdata-subdomain.php create mode 100644 wp-content/plugins/polylang-pro/src/pro.php create mode 100644 wp-content/plugins/polylang-pro/src/services/Encoding/Base64_Encoding.php create mode 100644 wp-content/plugins/polylang-pro/src/services/Encoding/Data_Encoder_Interface.php create mode 100644 wp-content/plugins/polylang-pro/src/services/Encoding/Data_Encoding.php create mode 100644 wp-content/plugins/polylang-pro/src/services/Encoding/Json_Encoding.php create mode 100644 wp-content/plugins/polylang-pro/src/services/Encoding/Serialize_Encoding.php create mode 100644 wp-content/plugins/polylang-pro/src/services/Encoding/Url_Encoding.php create mode 100644 wp-content/plugins/polylang-pro/src/services/admin-loader/admin-loader.php create mode 100644 wp-content/plugins/polylang-pro/src/services/collect-linked-objects/collect-linked-posts.php create mode 100644 wp-content/plugins/polylang-pro/src/services/collect-linked-objects/collect-linked-terms.php create mode 100644 wp-content/plugins/polylang-pro/src/services/context.php create mode 100644 wp-content/plugins/polylang-pro/src/services/dom/dom-content.php create mode 100644 wp-content/plugins/polylang-pro/src/services/dom/dom-document.php create mode 100644 wp-content/plugins/polylang-pro/src/services/dom/dom-nodes-iterator.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-container.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-data-from-posts.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-data-from-strings.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-data.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-metas.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-post-metas.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-posts.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-strings.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-term-metas.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-terms.php create mode 100644 wp-content/plugins/polylang-pro/src/services/exporter/export-translated-objects.php create mode 100644 wp-content/plugins/polylang-pro/src/services/manage-user-capabilities.php create mode 100644 wp-content/plugins/polylang-pro/src/services/metabox-button/metabox-button.php create mode 100644 wp-content/plugins/polylang-pro/src/services/metabox-button/metabox-user-button.php create mode 100644 wp-content/plugins/polylang-pro/src/services/metabox-button/toggle-user-button-rest.php create mode 100644 wp-content/plugins/polylang-pro/src/services/metabox-button/toggle-user-meta.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-block-parsing-rules.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-content.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-data-model-interface.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-metas.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-object-model-trait.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-post-metas.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-post-model.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-strings-model.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-term-metas.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-term-model.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-walker-blocks.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-walker-classic.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-walker-factory.php create mode 100644 wp-content/plugins/polylang-pro/src/services/translation/translation-walker-interface.php create mode 100644 wp-content/plugins/polylang-pro/src/upgrade.php create mode 100644 wp-content/plugins/polylang-pro/uninstall.php create mode 100644 wp-content/plugins/polylang-pro/vendor/autoload.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/ClassLoader.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/InstalledVersions.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/LICENSE create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/autoload_classmap.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/autoload_namespaces.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/autoload_psr4.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/autoload_real.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/autoload_static.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/installed.json create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/installed.php create mode 100644 wp-content/plugins/polylang-pro/vendor/composer/platform_check.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/LICENSE create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/changelog.txt create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ad.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ae.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/af.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ag.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ai.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/al.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/am.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/an.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ao.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ar.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/arab.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/as.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/at.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/au.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/aw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ax.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/az.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ba.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/basque.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bb.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bd.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/be.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bf.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bh.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bi.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bj.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bo.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/br.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bs.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bt.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/by.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ca.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/catalonia.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cc.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cd.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cf.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ch.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ci.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ck.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cl.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/co.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cu.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cv.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cx.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cy.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/de.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dj.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dk.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/do.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ec.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ee.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/eg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/eh.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/england.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/er.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/es.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/esperanto.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/et.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fi.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fj.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fk.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fo.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ga.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/galicia.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gb.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gd.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ge.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gh.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gi.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gl.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gp.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gq.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gs.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gt.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gu.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gy.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hk.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ht.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hu.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/id.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ie.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/il.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/in.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/io.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/iq.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ir.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/is.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/it.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/jm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/jo.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/jp.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ke.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kh.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ki.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/km.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kp.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kurdistan.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ky.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/la.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lb.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lc.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/li.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lk.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ls.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lt.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lu.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lv.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ly.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ma.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mc.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/md.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/me.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mh.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mk.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ml.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mo.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mp.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mq.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ms.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mt.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mu.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mv.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mx.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/my.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/na.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nc.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ne.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nf.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ng.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ni.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nl.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/no.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/np.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nu.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/occitania.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/om.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pa.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pe.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pf.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ph.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pk.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pl.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ps.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pt.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/py.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/qa.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/quebec.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ro.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/rs.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ru.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/rw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sa.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sb.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sc.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/scotland.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sd.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/se.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sh.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/si.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sk.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sl.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/so.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ss.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/st.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sv.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sy.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tc.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/td.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tf.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/th.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tibet.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tj.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tk.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tl.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/to.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tr.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tt.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tv.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ua.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ug.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/us.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/uy.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/uz.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/va.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vc.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ve.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/veneto.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vg.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vi.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vn.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vu.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/wales.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/wf.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ws.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ye.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/yt.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/za.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/zm.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/zw.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/polylang.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/readme.md create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/readme.txt create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Capabilities.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Abstract_Object.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Post.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Term.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/Creator.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/Creator_Interface.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/NOOP.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/User_Interface.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Hide_Default.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Hide_Empty.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages_Proxies.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages_Proxy_Interface.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Post_Types.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Taxonomies.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Abstract_Option.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Abstract_Object_Types.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Browser.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Default_Lang.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Domains.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/First_Activation.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Force_Lang.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Hide_Default.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Media_Support.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Nav_Menus.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Post_Types.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Previous_Version.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Redirect_Lang.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Rewrite.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Sync.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Taxonomies.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Version.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Inactive_Option.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Options.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_Boolean.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_List.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_Map.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_String.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Registry.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-base.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-block-editor.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-classic-editor.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-default-term.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-columns.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-media.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-post-base.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-post.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-term.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-widgets-options.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-links.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-model.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-nav-menu.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-notices.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-static-pages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-strings.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-media.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-post.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-term.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/api.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/base.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/cache.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/class-polylang.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/constant-functions.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/cookie.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/crud-posts.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/crud-terms.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/default-term.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filter-rest-routes.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-links.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-sanitization.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-widgets-options.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/format-util.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/accept-language.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/accept-languages-collection.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/canonical.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-content.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-domain.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-url.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-auto-translate.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-links.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-search.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-widgets.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-links.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-nav-menu.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-static-pages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/functions.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-activable.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-activate.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-deactivate.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/activate.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/deactivate.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/plugin-updater.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/t15s.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/upgrade.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/usable.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/aqua-resizer/aqua-resizer.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/aqua-resizer/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/cache/cache-compat.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/cache/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/custom-field-template/cft.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/custom-field-template/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/domain-mapping/domain-mapping.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/domain-mapping/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/duplicate-post/duplicate-post.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/duplicate-post/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/integration-build.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/integrations.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/featured-content.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/jetpack.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/no-category-base/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/no-category-base/no-category-base.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/twenty-seventeen/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/twenty-seventeen/twenty-seven-teen.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/wordpress-importer.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/wp-import.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-offload-media/as3cf.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-offload-media/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-sweep/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-sweep/wp-sweep.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/wpseo-ogp.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/wpseo.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/yarpp/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/yarpp/yarpp.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language-deprecated.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language-factory.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/license.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-abstract-domain.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-default.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-directory.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-domain.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-model.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-permalinks.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-subdomain.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/mo.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/model.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Abstract_Block.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/Block.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/block.json create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/Block.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/block.json create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/API.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/Abstract_Controller.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/Request.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/V1/Languages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/V1/Settings.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/machine-translation/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/machine-translation/settings-preview-machine-translation.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/module-build.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/share-slug/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/share-slug/settings-preview-share-slug.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/site-health/admin-site-health.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/site-health/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/abstract-sitemaps.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/multilingual-sitemaps-provider.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/sitemaps-domain.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/sitemaps.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/admin-sync.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/settings-sync.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-metas.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-post-metas.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-tax.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-term-metas.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/translate-slugs/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/translate-slugs/settings-preview-translate-slugs.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/html-wizard-notice.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/images/media-screen-rtl.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/images/media-screen.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/images/polylang-logo.png create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-page.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-home-page.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-languages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-last.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-licenses.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-media.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-untranslated-contents.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/wizard.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/load.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-api.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-compat.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-config.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-legacy-api.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/nav-menu.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/olt-manager.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/query.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/rest-request.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/flags.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/languages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-browser.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-cpt.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-licenses.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-media.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-module.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-url.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-languages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-settings.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-string.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-about.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-languages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-lang.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-settings.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-strings.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/static-pages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/switcher.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/term-slug.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/translatable-object-with-types-interface.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/translatable-object-with-types-trait.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/translatable-object.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/translatable-objects.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/translate-option.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/translated-object.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/translated-post.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/translated-term.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker-dropdown.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker-list.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/widget-calendar.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/widget-languages.php create mode 100644 wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/uninstall.php create mode 100644 wp-content/themes/xmartica/footer-es.php create mode 100644 wp-content/themes/xmartica/front-page-es.php create mode 100644 wp-content/themes/xmartica/header-es.php create mode 100644 wp-content/themes/xmartica/page-ai-strategy-consulting.php create mode 100644 wp-content/themes/xmartica/page-business-transformation-consulting.php create mode 100644 wp-content/themes/xmartica/page-change-management-consulting.php create mode 100644 wp-content/themes/xmartica/page-customer-experience-strategy.php create mode 100644 wp-content/themes/xmartica/page-data-analytics-consulting.php create mode 100644 wp-content/themes/xmartica/page-digital-transformation-consulting.php create mode 100644 wp-content/themes/xmartica/page-process-improvement-consulting.php diff --git a/db/xmartica.sql b/db/xmartica.sql index 4ed5c3b..8df6e84 100644 --- a/db/xmartica.sql +++ b/db/xmartica.sql @@ -3,7 +3,7 @@ -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:8889 --- Tiempo de generación: 08-10-2026 a las 16:40:16 +-- Tiempo de generación: 12-10-2026 a las 15:07:09 -- Versión del servidor: 8.0.44 -- Versión de PHP: 8.3.30 @@ -24,10 +24,10 @@ SET time_zone = "+00:00"; -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_actionscheduler_actions` +-- Estructura de tabla para la tabla `xm_aca_actionscheduler_actions` -- -CREATE TABLE `wp_actionscheduler_actions` ( +CREATE TABLE `xm_aca_actionscheduler_actions` ( `action_id` bigint UNSIGNED NOT NULL, `hook` varchar(191) COLLATE utf8mb4_unicode_520_ci NOT NULL, `status` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL, @@ -45,10 +45,10 @@ CREATE TABLE `wp_actionscheduler_actions` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_actionscheduler_actions` +-- Volcado de datos para la tabla `xm_aca_actionscheduler_actions` -- -INSERT INTO `wp_actionscheduler_actions` (`action_id`, `hook`, `status`, `scheduled_date_gmt`, `scheduled_date_local`, `priority`, `args`, `schedule`, `group_id`, `attempts`, `last_attempt_gmt`, `last_attempt_local`, `claim_id`, `extended_args`) VALUES +INSERT INTO `xm_aca_actionscheduler_actions` (`action_id`, `hook`, `status`, `scheduled_date_gmt`, `scheduled_date_local`, `priority`, `args`, `schedule`, `group_id`, `attempts`, `last_attempt_gmt`, `last_attempt_local`, `claim_id`, `extended_args`) VALUES (7, 'action_scheduler_run_recurring_actions_schedule_hook', 'complete', '2026-09-30 23:11:32', '2026-09-30 17:11:32', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1790809892;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1790809892;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 1, '2026-09-30 23:11:33', '2026-09-30 17:11:33', 1, NULL), (8, 'action_scheduler/migration_hook', 'complete', '2026-09-30 23:12:33', '2026-09-30 17:12:33', 10, '[]', 'O:30:\"ActionScheduler_SimpleSchedule\":2:{s:22:\"\0*\0scheduled_timestamp\";i:1790809953;s:41:\"\0ActionScheduler_SimpleSchedule\0timestamp\";i:1790809953;}', 2, 1, '2026-09-30 23:12:33', '2026-09-30 17:12:33', 4, NULL), (9, 'action_scheduler_run_recurring_actions_schedule_hook', 'complete', '2026-10-01 23:11:33', '2026-10-01 17:11:33', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1790896293;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1790896293;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 1, '2026-10-02 03:48:43', '2026-10-01 21:48:43', 169, NULL), @@ -57,16 +57,22 @@ INSERT INTO `wp_actionscheduler_actions` (`action_id`, `hook`, `status`, `schedu (15, 'action_scheduler_run_recurring_actions_schedule_hook', 'complete', '2026-10-06 14:16:58', '2026-10-06 08:16:58', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1791296218;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1791296218;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 1, '2026-10-06 14:17:27', '2026-10-06 08:17:27', 735, NULL), (17, 'action_scheduler_run_recurring_actions_schedule_hook', 'complete', '2026-10-07 14:17:27', '2026-10-07 08:17:27', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1791382647;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1791382647;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 1, '2026-10-07 15:20:04', '2026-10-07 09:20:04', 996, NULL), (19, 'action_scheduler_run_recurring_actions_schedule_hook', 'complete', '2026-10-08 15:20:04', '2026-10-08 09:20:04', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1791472804;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1791472804;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 1, '2026-10-08 15:32:01', '2026-10-08 09:32:01', 1200, NULL), -(20, 'aioseo_table_of_contents_admin_notifications_update', 'complete', '2026-10-07 16:16:37', '2026-10-07 16:16:37', 10, '[]', 'O:28:\"ActionScheduler_NullSchedule\":0:{}', 3, 1, '2026-10-07 16:16:38', '2026-10-07 10:16:38', 1007, NULL), -(21, 'action_scheduler_run_recurring_actions_schedule_hook', 'pending', '2026-10-09 15:32:01', '2026-10-09 09:32:01', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1791559921;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1791559921;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, NULL); +(21, 'action_scheduler_run_recurring_actions_schedule_hook', 'complete', '2026-10-09 15:32:01', '2026-10-09 09:32:01', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1791559921;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1791559921;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 1, '2026-10-09 15:32:24', '2026-10-09 09:32:24', 1326, NULL), +(23, 'action_scheduler/migration_hook', 'complete', '2026-10-09 15:26:49', '2026-10-09 09:26:49', 10, '[]', 'O:30:\"ActionScheduler_SimpleSchedule\":2:{s:22:\"\0*\0scheduled_timestamp\";i:1791559609;s:41:\"\0ActionScheduler_SimpleSchedule\0timestamp\";i:1791559609;}', 2, 1, '2026-10-09 15:27:35', '2026-10-09 09:27:35', 1320, NULL), +(24, 'action_scheduler_run_recurring_actions_schedule_hook', 'complete', '2026-10-10 15:32:24', '2026-10-10 09:32:24', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1791646344;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1791646344;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 1, '2026-10-10 15:37:12', '2026-10-10 09:37:12', 1642, NULL), +(25, 'action_scheduler/migration_hook', 'complete', '2026-10-09 16:33:42', '2026-10-09 10:33:42', 10, '[]', 'O:30:\"ActionScheduler_SimpleSchedule\":2:{s:22:\"\0*\0scheduled_timestamp\";i:1791563622;s:41:\"\0ActionScheduler_SimpleSchedule\0timestamp\";i:1791563622;}', 2, 1, '2026-10-09 16:33:44', '2026-10-09 10:33:44', 1339, NULL), +(27, 'action_scheduler_run_recurring_actions_schedule_hook', 'complete', '2026-10-11 15:37:12', '2026-10-11 09:37:12', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1791733032;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1791733032;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 1, '2026-10-11 16:06:41', '2026-10-11 10:06:41', 1720, NULL), +(29, 'action_scheduler_run_recurring_actions_schedule_hook', 'pending', '2026-10-12 16:06:41', '2026-10-12 10:06:41', 20, '[]', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1791821201;s:18:\"\0*\0first_timestamp\";i:1790809892;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1791821201;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 1, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, NULL), +(30, 'aioseo_table_of_contents_admin_notifications_update', 'complete', '2026-10-12 15:06:35', '2026-10-12 15:06:35', 10, '[]', 'O:28:\"ActionScheduler_NullSchedule\":0:{}', 3, 1, '2026-10-12 15:06:36', '2026-10-12 09:06:36', 1781, NULL), +(31, 'action_scheduler/migration_hook', 'pending', '2026-10-12 15:07:39', '2026-10-12 09:07:39', 10, '[]', 'O:30:\"ActionScheduler_SimpleSchedule\":2:{s:22:\"\0*\0scheduled_timestamp\";i:1791817659;s:41:\"\0ActionScheduler_SimpleSchedule\0timestamp\";i:1791817659;}', 2, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, NULL); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_actionscheduler_claims` +-- Estructura de tabla para la tabla `xm_aca_actionscheduler_claims` -- -CREATE TABLE `wp_actionscheduler_claims` ( +CREATE TABLE `xm_aca_actionscheduler_claims` ( `claim_id` bigint UNSIGNED NOT NULL, `date_created_gmt` datetime DEFAULT '0000-00-00 00:00:00' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; @@ -74,19 +80,19 @@ CREATE TABLE `wp_actionscheduler_claims` ( -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_actionscheduler_groups` +-- Estructura de tabla para la tabla `xm_aca_actionscheduler_groups` -- -CREATE TABLE `wp_actionscheduler_groups` ( +CREATE TABLE `xm_aca_actionscheduler_groups` ( `group_id` bigint UNSIGNED NOT NULL, `slug` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_actionscheduler_groups` +-- Volcado de datos para la tabla `xm_aca_actionscheduler_groups` -- -INSERT INTO `wp_actionscheduler_groups` (`group_id`, `slug`) VALUES +INSERT INTO `xm_aca_actionscheduler_groups` (`group_id`, `slug`) VALUES (1, 'ActionScheduler'), (2, 'action-scheduler-migration'), (3, 'aioseo_table_of_contents'); @@ -94,10 +100,10 @@ INSERT INTO `wp_actionscheduler_groups` (`group_id`, `slug`) VALUES -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_actionscheduler_logs` +-- Estructura de tabla para la tabla `xm_aca_actionscheduler_logs` -- -CREATE TABLE `wp_actionscheduler_logs` ( +CREATE TABLE `xm_aca_actionscheduler_logs` ( `log_id` bigint UNSIGNED NOT NULL, `action_id` bigint UNSIGNED NOT NULL, `message` text COLLATE utf8mb4_unicode_520_ci NOT NULL, @@ -106,10 +112,10 @@ CREATE TABLE `wp_actionscheduler_logs` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_actionscheduler_logs` +-- Volcado de datos para la tabla `xm_aca_actionscheduler_logs` -- -INSERT INTO `wp_actionscheduler_logs` (`log_id`, `action_id`, `message`, `log_date_gmt`, `log_date_local`) VALUES +INSERT INTO `xm_aca_actionscheduler_logs` (`log_id`, `action_id`, `message`, `log_date_gmt`, `log_date_local`) VALUES (1, 7, 'action created', '2026-09-30 23:11:32', '2026-09-30 17:11:32'), (2, 8, 'action created', '2026-09-30 23:11:33', '2026-09-30 17:11:33'), (3, 7, 'action started via WP Cron', '2026-09-30 23:11:33', '2026-09-30 17:11:33'), @@ -132,20 +138,36 @@ INSERT INTO `wp_actionscheduler_logs` (`log_id`, `action_id`, `message`, `log_da (35, 17, 'action started via WP Cron', '2026-10-07 15:20:04', '2026-10-07 09:20:04'), (36, 17, 'action complete via WP Cron', '2026-10-07 15:20:04', '2026-10-07 09:20:04'), (37, 19, 'action created', '2026-10-07 15:20:04', '2026-10-07 09:20:04'), -(38, 20, 'action created', '2026-10-07 16:16:37', '2026-10-07 10:16:37'), -(39, 20, 'action started via Async Request', '2026-10-07 16:16:38', '2026-10-07 10:16:38'), -(40, 20, 'action complete via Async Request', '2026-10-07 16:16:38', '2026-10-07 10:16:38'), (41, 19, 'action started via WP Cron', '2026-10-08 15:32:01', '2026-10-08 09:32:01'), (42, 19, 'action complete via WP Cron', '2026-10-08 15:32:01', '2026-10-08 09:32:01'), -(43, 21, 'action created', '2026-10-08 15:32:01', '2026-10-08 09:32:01'); +(43, 21, 'action created', '2026-10-08 15:32:01', '2026-10-08 09:32:01'), +(47, 23, 'action created', '2026-10-09 15:25:49', '2026-10-09 09:25:49'), +(48, 23, 'action started via WP Cron', '2026-10-09 15:27:35', '2026-10-09 09:27:35'), +(49, 23, 'action complete via WP Cron', '2026-10-09 15:27:35', '2026-10-09 09:27:35'), +(50, 21, 'action started via Async Request', '2026-10-09 15:32:24', '2026-10-09 09:32:24'), +(51, 21, 'action complete via Async Request', '2026-10-09 15:32:24', '2026-10-09 09:32:24'), +(52, 24, 'action created', '2026-10-09 15:32:24', '2026-10-09 09:32:24'), +(53, 25, 'action created', '2026-10-09 16:32:42', '2026-10-09 10:32:42'), +(54, 25, 'action started via Async Request', '2026-10-09 16:33:44', '2026-10-09 10:33:44'), +(55, 25, 'action complete via Async Request', '2026-10-09 16:33:44', '2026-10-09 10:33:44'), +(59, 24, 'action started via WP Cron', '2026-10-10 15:37:12', '2026-10-10 09:37:12'), +(60, 24, 'action complete via WP Cron', '2026-10-10 15:37:12', '2026-10-10 09:37:12'), +(61, 27, 'action created', '2026-10-10 15:37:12', '2026-10-10 09:37:12'), +(65, 27, 'action started via Async Request', '2026-10-11 16:06:41', '2026-10-11 10:06:41'), +(66, 27, 'action complete via Async Request', '2026-10-11 16:06:41', '2026-10-11 10:06:41'), +(67, 29, 'action created', '2026-10-11 16:06:41', '2026-10-11 10:06:41'), +(68, 30, 'action created', '2026-10-12 15:06:35', '2026-10-12 09:06:35'), +(69, 30, 'action started via Async Request', '2026-10-12 15:06:35', '2026-10-12 09:06:35'), +(70, 30, 'action complete via Async Request', '2026-10-12 15:06:36', '2026-10-12 09:06:36'), +(71, 31, 'action created', '2026-10-12 15:06:39', '2026-10-12 09:06:39'); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_aioseo_table_of_contents_cache` +-- Estructura de tabla para la tabla `xm_aca_aioseo_table_of_contents_cache` -- -CREATE TABLE `wp_aioseo_table_of_contents_cache` ( +CREATE TABLE `xm_aca_aioseo_table_of_contents_cache` ( `id` bigint UNSIGNED NOT NULL, `name` varchar(80) COLLATE utf8mb4_unicode_520_ci NOT NULL, `value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, @@ -156,20 +178,20 @@ CREATE TABLE `wp_aioseo_table_of_contents_cache` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_aioseo_table_of_contents_cache` +-- Volcado de datos para la tabla `xm_aca_aioseo_table_of_contents_cache` -- -INSERT INTO `wp_aioseo_table_of_contents_cache` (`id`, `name`, `value`, `is_object`, `expiration`, `created`, `updated`) VALUES -(3, 'aioseo_table_of_contents_db_schema', '{\"wp_actionscheduler_actions\":[\"action_id\",\"args\",\"attempts\",\"claim_id\",\"extended_args\",\"group_id\",\"hook\",\"last_attempt_gmt\",\"last_attempt_local\",\"priority\",\"schedule\",\"scheduled_date_gmt\",\"scheduled_date_local\",\"status\"],\"wp_actionscheduler_claims\":[\"claim_id\",\"date_created_gmt\"],\"wp_actionscheduler_groups\":[\"group_id\",\"slug\"],\"wp_actionscheduler_logs\":[\"action_id\",\"log_date_gmt\",\"log_date_local\",\"log_id\",\"message\"],\"wp_aioseo_table_of_contents_cache\":[\"created\",\"expiration\",\"id\",\"is_object\",\"name\",\"updated\",\"value\"],\"wp_aioseo_table_of_contents_notifications\":[\"button1_action\",\"button1_label\",\"button2_action\",\"button2_label\",\"content\",\"created\",\"dismissed\",\"end\",\"id\",\"level\",\"new\",\"notification_id\",\"notification_name\",\"slug\",\"start\",\"title\",\"type\",\"updated\"]}', 0, '2026-10-09 15:32:01', '2026-09-30 23:11:33', '2026-10-08 15:32:01'), -(4, 'aioseo_table_of_contents_admin_notifications_update', '1791476197', 0, '2026-10-08 16:16:37', '2026-09-30 23:11:33', '2026-10-07 16:16:37'); +INSERT INTO `xm_aca_aioseo_table_of_contents_cache` (`id`, `name`, `value`, `is_object`, `expiration`, `created`, `updated`) VALUES +(22, 'aioseo_table_of_contents_db_schema', '{\"xm_aca_actionscheduler_actions\":[\"action_id\",\"args\",\"attempts\",\"claim_id\",\"extended_args\",\"group_id\",\"hook\",\"last_attempt_gmt\",\"last_attempt_local\",\"priority\",\"schedule\",\"scheduled_date_gmt\",\"scheduled_date_local\",\"status\"],\"xm_aca_actionscheduler_claims\":[\"claim_id\",\"date_created_gmt\"],\"xm_aca_actionscheduler_groups\":[\"group_id\",\"slug\"],\"xm_aca_actionscheduler_logs\":[\"action_id\",\"log_date_gmt\",\"log_date_local\",\"log_id\",\"message\"],\"xm_aca_aioseo_table_of_contents_cache\":[\"created\",\"expiration\",\"id\",\"is_object\",\"name\",\"updated\",\"value\"],\"xm_aca_aioseo_table_of_contents_notifications\":[\"button1_action\",\"button1_label\",\"button2_action\",\"button2_label\",\"content\",\"created\",\"dismissed\",\"end\",\"id\",\"level\",\"new\",\"notification_id\",\"notification_name\",\"slug\",\"start\",\"title\",\"type\",\"updated\"]}', 0, '2026-10-13 15:06:27', '2026-10-12 15:06:27', '2026-10-12 15:06:27'), +(23, 'aioseo_table_of_contents_admin_notifications_update', '1791903995', 0, '2026-10-13 15:06:35', '2026-10-12 15:06:35', '2026-10-12 15:06:35'); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_aioseo_table_of_contents_notifications` +-- Estructura de tabla para la tabla `xm_aca_aioseo_table_of_contents_notifications` -- -CREATE TABLE `wp_aioseo_table_of_contents_notifications` ( +CREATE TABLE `xm_aca_aioseo_table_of_contents_notifications` ( `id` bigint UNSIGNED NOT NULL, `notification_id` bigint UNSIGNED DEFAULT NULL, `notification_name` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, @@ -193,10 +215,10 @@ CREATE TABLE `wp_aioseo_table_of_contents_notifications` ( -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_commentmeta` +-- Estructura de tabla para la tabla `xm_aca_commentmeta` -- -CREATE TABLE `wp_commentmeta` ( +CREATE TABLE `xm_aca_commentmeta` ( `meta_id` bigint UNSIGNED NOT NULL, `comment_id` bigint UNSIGNED NOT NULL DEFAULT '0', `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, @@ -206,10 +228,10 @@ CREATE TABLE `wp_commentmeta` ( -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_comments` +-- Estructura de tabla para la tabla `xm_aca_comments` -- -CREATE TABLE `wp_comments` ( +CREATE TABLE `xm_aca_comments` ( `comment_ID` bigint UNSIGNED NOT NULL, `comment_post_ID` bigint UNSIGNED NOT NULL DEFAULT '0', `comment_author` tinytext COLLATE utf8mb4_unicode_520_ci NOT NULL, @@ -228,19 +250,19 @@ CREATE TABLE `wp_comments` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_comments` +-- Volcado de datos para la tabla `xm_aca_comments` -- -INSERT INTO `wp_comments` (`comment_ID`, `comment_post_ID`, `comment_author`, `comment_author_email`, `comment_author_url`, `comment_author_IP`, `comment_date`, `comment_date_gmt`, `comment_content`, `comment_karma`, `comment_approved`, `comment_agent`, `comment_type`, `comment_parent`, `user_id`) VALUES +INSERT INTO `xm_aca_comments` (`comment_ID`, `comment_post_ID`, `comment_author`, `comment_author_email`, `comment_author_url`, `comment_author_IP`, `comment_date`, `comment_date_gmt`, `comment_content`, `comment_karma`, `comment_approved`, `comment_agent`, `comment_type`, `comment_parent`, `user_id`) VALUES (1, 1, 'Un comentarista de WordPress', 'wapuu@wordpress.example', 'https://es-mx.wordpress.org/', '', '2026-09-30 21:21:04', '2026-09-30 21:21:04', 'Hola, esto es un comentario.\nPara empezar a moderar, editar y borrar comentarios, por favor, visita en el escritorio la pantalla de comentarios.\nLos avatares de los comentaristas provienen de Gravatar.', 0, '1', '', 'comment', 0, 0); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_compressx_images_meta` +-- Estructura de tabla para la tabla `xm_aca_compressx_images_meta` -- -CREATE TABLE `wp_compressx_images_meta` ( +CREATE TABLE `xm_aca_compressx_images_meta` ( `id` bigint UNSIGNED NOT NULL, `blog_id` bigint UNSIGNED NOT NULL DEFAULT '0', `attachment_id` bigint UNSIGNED NOT NULL, @@ -262,10 +284,10 @@ CREATE TABLE `wp_compressx_images_meta` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_compressx_images_meta` +-- Volcado de datos para la tabla `xm_aca_compressx_images_meta` -- -INSERT INTO `wp_compressx_images_meta` (`id`, `blog_id`, `attachment_id`, `mime_type`, `status`, `webp_converted`, `avif_converted`, `og_file_size`, `webp_converted_size`, `avif_converted_size`, `sum_size`, `webp_sum_converted_size`, `avif_sum_converted_size`, `resize_status`, `details`, `updated_at`, `created_at`, `data_version`) VALUES +INSERT INTO `xm_aca_compressx_images_meta` (`id`, `blog_id`, `attachment_id`, `mime_type`, `status`, `webp_converted`, `avif_converted`, `og_file_size`, `webp_converted_size`, `avif_converted_size`, `sum_size`, `webp_sum_converted_size`, `avif_sum_converted_size`, `resize_status`, `details`, `updated_at`, `created_at`, `data_version`) VALUES (1, 1, 17, 'image/png', 'optimized', 1, 0, 22173, 7032, 0, 99811, 21938, 0, 1, '{\"mime_type\":\"image\\/png\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":22173,\"webp_converted_size\":7032,\"avif_converted_size\":0,\"sum_size\":99811,\"webp_sum_converted_size\":21938,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/xmartica-ets-header-bg.png\",\"webp_converted_size\":7032,\"file_size\":22173},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":5834,\"webp_converted_size\":498,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-ets-header-bg-250x21.png\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":15843,\"webp_converted_size\":2512,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-ets-header-bg-700x58.png\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":14525,\"webp_converted_size\":2340,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-ets-header-bg-150x85.png\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":19750,\"webp_converted_size\":3624,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-ets-header-bg-768x64.png\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":944,\"webp_converted_size\":234,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-ets-header-bg-120x10.png\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":20742,\"webp_converted_size\":5698,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-ets-header-bg-700x85.png\"}}}', '2026-10-01 10:09:05', '2026-10-01 10:09:05', 1), (2, 1, 27, 'image/png', 'optimized', 1, 0, 1747027, 166122, 0, 4092913, 356286, 0, 1, '{\"mime_type\":\"image\\/png\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":1747027,\"webp_converted_size\":166122,\"avif_converted_size\":0,\"sum_size\":4092913,\"webp_sum_converted_size\":356286,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/bg-fondo-home.png\",\"webp_converted_size\":166122,\"file_size\":1747027},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":38746,\"webp_converted_size\":3264,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"bg-fondo-home-250x133.png\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":300685,\"webp_converted_size\":24170,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"bg-fondo-home-700x371.png\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":26200,\"webp_converted_size\":2262,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"bg-fondo-home-150x150.png\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":365448,\"webp_converted_size\":29982,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"bg-fondo-home-768x407.png\"},\"1536x1536\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":1459394,\"webp_converted_size\":117536,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"bg-fondo-home-1536x814.png\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":9097,\"webp_converted_size\":764,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"bg-fondo-home-120x64.png\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":146316,\"webp_converted_size\":12186,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"bg-fondo-home-700x200.png\"}}}', '2026-10-01 12:52:33', '2026-10-01 12:52:23', 1), (3, 1, 28, 'image/jpeg', 'optimized', 1, 0, 193957, 78142, 0, 530199, 234720, 0, 1, '{\"mime_type\":\"image\\/jpeg\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":193957,\"webp_converted_size\":78142,\"avif_converted_size\":0,\"sum_size\":530199,\"webp_sum_converted_size\":234720,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/xmartica-service-01-scaled.jpg\",\"webp_converted_size\":78142,\"file_size\":193957},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":8266,\"webp_converted_size\":5102,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-service-01-250x139.jpg\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":31351,\"webp_converted_size\":16176,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-service-01-700x389.jpg\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":5788,\"webp_converted_size\":3598,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-service-01-150x150.jpg\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":35409,\"webp_converted_size\":18112,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-service-01-768x427.jpg\"},\"1536x1536\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":91870,\"webp_converted_size\":41200,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-service-01-1536x853.jpg\"},\"2048x2048\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":139951,\"webp_converted_size\":58966,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-service-01-2048x1138.jpg\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":3314,\"webp_converted_size\":2228,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-service-01-120x67.jpg\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":20293,\"webp_converted_size\":11196,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-service-01-700x200.jpg\"}}}', '2026-10-01 15:34:20', '2026-10-01 15:34:09', 1), @@ -289,7 +311,7 @@ INSERT INTO `wp_compressx_images_meta` (`id`, `blog_id`, `attachment_id`, `mime_ (23, 1, 62, 'image/jpeg', 'optimized', 1, 0, 393638, 186670, 0, 1060589, 558398, 0, 1, '{\"mime_type\":\"image\\/jpeg\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":393638,\"webp_converted_size\":186670,\"avif_converted_size\":0,\"sum_size\":1060589,\"webp_sum_converted_size\":558398,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/xmartica-consulting-strategy-scaled.jpg\",\"webp_converted_size\":186670,\"file_size\":393638},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":13706,\"webp_converted_size\":10108,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-strategy-250x167.jpg\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":62452,\"webp_converted_size\":39880,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-strategy-700x467.jpg\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":8462,\"webp_converted_size\":6352,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-strategy-150x150.jpg\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":70444,\"webp_converted_size\":44898,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-strategy-768x512.jpg\"},\"1536x1536\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":190759,\"webp_converted_size\":102640,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-strategy-1536x1024.jpg\"},\"2048x2048\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":287509,\"webp_converted_size\":145672,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-strategy-2048x1366.jpg\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":4524,\"webp_converted_size\":3392,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-strategy-120x80.jpg\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":29095,\"webp_converted_size\":18786,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-strategy-700x200.jpg\"}}}', '2026-10-05 13:46:09', '2026-10-05 13:45:57', 1), (24, 1, 63, 'image/jpeg', 'optimized', 1, 0, 415640, 184954, 0, 1086286, 532946, 0, 1, '{\"mime_type\":\"image\\/jpeg\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":415640,\"webp_converted_size\":184954,\"avif_converted_size\":0,\"sum_size\":1086286,\"webp_sum_converted_size\":532946,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/xmartica-consulting-operating-model-scaled.jpg\",\"webp_converted_size\":184954,\"file_size\":415640},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":13337,\"webp_converted_size\":9328,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-operating-model-250x167.jpg\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":60349,\"webp_converted_size\":35788,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-operating-model-700x467.jpg\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":7863,\"webp_converted_size\":5588,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-operating-model-150x150.jpg\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":69405,\"webp_converted_size\":40532,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-operating-model-768x513.jpg\"},\"1536x1536\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":191030,\"webp_converted_size\":96166,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-operating-model-1536x1025.jpg\"},\"2048x2048\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":299293,\"webp_converted_size\":142972,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-operating-model-2048x1367.jpg\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":4332,\"webp_converted_size\":3224,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-operating-model-120x80.jpg\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":25037,\"webp_converted_size\":14394,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-consulting-operating-model-700x200.jpg\"}}}', '2026-10-05 13:46:24', '2026-10-05 13:46:12', 1), (25, 1, 74, 'image/jpeg', 'optimized', 1, 0, 615375, 15436, 0, 698636, 40452, 0, 1, '{\"mime_type\":\"image\\/jpeg\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":615375,\"webp_converted_size\":15436,\"avif_converted_size\":0,\"sum_size\":698636,\"webp_sum_converted_size\":40452,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/wrapper-internas-01.jpg\",\"webp_converted_size\":15436,\"file_size\":615375},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":3178,\"webp_converted_size\":1098,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"wrapper-internas-01-250x156.jpg\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":12885,\"webp_converted_size\":4152,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"wrapper-internas-01-700x438.jpg\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":2064,\"webp_converted_size\":622,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"wrapper-internas-01-150x150.jpg\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":14529,\"webp_converted_size\":4628,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"wrapper-internas-01-768x480.jpg\"},\"1536x1536\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":43231,\"webp_converted_size\":12194,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"wrapper-internas-01-1536x960.jpg\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":1462,\"webp_converted_size\":432,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"wrapper-internas-01-120x75.jpg\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":5912,\"webp_converted_size\":1890,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"wrapper-internas-01-700x200.jpg\"}}}', '2026-10-05 17:32:21', '2026-10-05 17:32:13', 1); -INSERT INTO `wp_compressx_images_meta` (`id`, `blog_id`, `attachment_id`, `mime_type`, `status`, `webp_converted`, `avif_converted`, `og_file_size`, `webp_converted_size`, `avif_converted_size`, `sum_size`, `webp_sum_converted_size`, `avif_sum_converted_size`, `resize_status`, `details`, `updated_at`, `created_at`, `data_version`) VALUES +INSERT INTO `xm_aca_compressx_images_meta` (`id`, `blog_id`, `attachment_id`, `mime_type`, `status`, `webp_converted`, `avif_converted`, `og_file_size`, `webp_converted_size`, `avif_converted_size`, `sum_size`, `webp_sum_converted_size`, `avif_sum_converted_size`, `resize_status`, `details`, `updated_at`, `created_at`, `data_version`) VALUES (26, 1, 77, 'image/jpeg', 'optimized', 1, 0, 300261, 128174, 0, 792524, 372208, 0, 1, '{\"mime_type\":\"image\\/jpeg\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":300261,\"webp_converted_size\":128174,\"avif_converted_size\":0,\"sum_size\":792524,\"webp_sum_converted_size\":372208,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/xmartica-digital-strategy-scaled.jpg\",\"webp_converted_size\":128174,\"file_size\":300261},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":10681,\"webp_converted_size\":6980,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-digital-strategy-250x167.jpg\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":44872,\"webp_converted_size\":24918,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-digital-strategy-700x467.jpg\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":6810,\"webp_converted_size\":4540,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-digital-strategy-150x150.jpg\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":50506,\"webp_converted_size\":27416,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-digital-strategy-768x512.jpg\"},\"1536x1536\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":137999,\"webp_converted_size\":66100,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-digital-strategy-1536x1024.jpg\"},\"2048x2048\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":214720,\"webp_converted_size\":97456,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-digital-strategy-2048x1366.jpg\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":3732,\"webp_converted_size\":2582,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-digital-strategy-120x80.jpg\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":22943,\"webp_converted_size\":14042,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-digital-strategy-700x200.jpg\"}}}', '2026-10-05 21:38:12', '2026-10-05 21:38:01', 1), (27, 1, 80, 'image/jpeg', 'optimized', 1, 0, 588880, 351086, 0, 1637221, 1007730, 0, 1, '{\"mime_type\":\"image\\/jpeg\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":588880,\"webp_converted_size\":351086,\"avif_converted_size\":0,\"sum_size\":1637221,\"webp_sum_converted_size\":1007730,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/xmartica-process-improvement-01-scaled.jpg\",\"webp_converted_size\":351086,\"file_size\":588880},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":28641,\"webp_converted_size\":21010,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-01-250x375.jpg\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":142044,\"webp_converted_size\":90420,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-01-700x1050.jpg\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":8607,\"webp_converted_size\":6494,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-01-150x150.jpg\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":162555,\"webp_converted_size\":103146,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-01-768x1152.jpg\"},\"1536x1536\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":256775,\"webp_converted_size\":158524,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-01-1024x1536.jpg\"},\"2048x2048\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":414335,\"webp_converted_size\":253742,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-01-1366x2048.jpg\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":8789,\"webp_converted_size\":6856,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-01-120x180.jpg\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":26595,\"webp_converted_size\":16452,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-01-700x200.jpg\"}}}', '2026-10-05 22:32:15', '2026-10-05 22:32:01', 1), (28, 1, 81, 'image/jpeg', 'optimized', 1, 0, 488565, 229532, 0, 1273373, 665390, 0, 1, '{\"mime_type\":\"image\\/jpeg\",\"status\":\"optimized\",\"webp_converted\":1,\"avif_converted\":0,\"resize_status\":1,\"compress_status\":0,\"og_file_size\":488565,\"webp_converted_size\":229532,\"avif_converted_size\":0,\"sum_size\":1273373,\"webp_sum_converted_size\":665390,\"avif_sum_converted_size\":0,\"size\":{\"og\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"2026\\/10\\/xmartica-process-improvement-02-scaled.jpg\",\"webp_converted_size\":229532,\"file_size\":488565},\"medium\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":13997,\"webp_converted_size\":10608,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-02-250x167.jpg\"},\"large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":70064,\"webp_converted_size\":45010,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-02-700x467.jpg\"},\"thumbnail\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":8379,\"webp_converted_size\":6398,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-02-150x150.jpg\"},\"medium_large\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":80378,\"webp_converted_size\":51050,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-02-768x513.jpg\"},\"1536x1536\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":224997,\"webp_converted_size\":120748,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-02-1536x1025.jpg\"},\"2048x2048\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":352836,\"webp_converted_size\":179694,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-02-2048x1367.jpg\"},\"small\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":4446,\"webp_converted_size\":3442,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-02-120x80.jpg\"},\"custom-size\":{\"convert_webp_status\":1,\"convert_avif_status\":0,\"file_size\":29711,\"webp_converted_size\":18908,\"avif_converted_size\":0,\"status\":\"optimized\",\"error\":\"\",\"file\":\"xmartica-process-improvement-02-700x200.jpg\"}}}', '2026-10-05 22:33:06', '2026-10-05 22:32:51', 1), @@ -311,10 +333,10 @@ INSERT INTO `wp_compressx_images_meta` (`id`, `blog_id`, `attachment_id`, `mime_ -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_jooosi_fon_fonts` +-- Estructura de tabla para la tabla `xm_aca_jooosi_fon_fonts` -- -CREATE TABLE `wp_jooosi_fon_fonts` ( +CREATE TABLE `xm_aca_jooosi_fon_fonts` ( `id` bigint UNSIGNED NOT NULL, `type` varchar(50) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'custom', `status` int NOT NULL DEFAULT '0', @@ -329,30 +351,30 @@ CREATE TABLE `wp_jooosi_fon_fonts` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_jooosi_fon_fonts` +-- Volcado de datos para la tabla `xm_aca_jooosi_fon_fonts` -- -INSERT INTO `wp_jooosi_fon_fonts` (`id`, `type`, `status`, `title`, `slug`, `family`, `metadata`, `font_faces`, `created_at`, `updated_at`, `deleted_at`) VALUES +INSERT INTO `xm_aca_jooosi_fon_fonts` (`id`, `type`, `status`, `title`, `slug`, `family`, `metadata`, `font_faces`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 'google-fonts', 1, 'Geist', 'tSUBuwtvvf', 'Geist', 'eNrdm2lzskoWx79KircTEnYk79z3NS7RyS2rRcRWNllUfCrffRowRgzlxZnEvjV50S1NN/w4/T+n4QT+EJataCaYEy8LoDnKI+EomiK7pk28EMQjMYeOpQEfbTg7YKEG1TRVTZkuTMN1iJc/xBbYEMw05TR+Ydo6CPb9m9iZiwVD/BW0Ge50DlwQjHA0T0XHUxXouOiAYD5X5lkXtTAUw5E0RVJ00LxXgmP8IVwQ9N6py6CzDg3ihaYo9AvsiRcp+DVXFsDT3CHQPETBUdQHOqMMXEU17QD8FRjOw6tiw0VwPYoDVUOxQ76sMbffPYpSJOchZ0MVGC5EfZporPkwATZQzQNADWUPappi6+ZDD3jyErUUt1BDG7MZDKhqphMdBjWpJmooAdkz5uYDOrULDBCY4GjIFtARpOFpGrIK0KEWEJaPptDNOVzAL2sIJMWTNIv2ON7MUSKjyr6NaKCMWj9/kso+GK4BF5nnWB/btlBxDXRORwkgwskyouMgK6L9TFiyYcmFJR+WQliKYZkJSyks0SgYDYPROBgNhNFIGA2F0VgYDYbRaBgQeBaSQewKJXSFfYp7oTIvLP9ESfQEdbdMy9MQrIvMQzNokrdoyqCJJp/Y8mg/dF49yzJtNOuf8nNtT/mIWSqyx6f8FlA7KipSaCCqUJ+PxE6BgbwiYTmuHxyOMIJeGpF8RM/WUJel61rOy/vz+3PoDk+q46IO8pNs6u/PzvtzKPH35y2Pfvq55XI32FfnGbVZHneb9R5rHRZgVJ32jHa1qlsGePrk8SByR2LB+Cuh5uSNDPHxeEH9j4GWn444ETPdFXnFWDNqPc7suv8c5MVTRBMRt5p8lod9plX4buVzbTB4mCvtZpI27OmmfJg3GjP9qjbwQl9oI/PWyhX0JpvrXdMGXuS4NqZsV52Wjc7Kuq4NFg/zzkvWhrQeaKuVaAbLdRD1gkU32lWiX1cFiq7Uh8EK67pAXuoKio3BTinWcgm614GNEMHT3j+8P+8sUkbkqOP7s2cFtw+IemWapgNJdEnH60L04c0CGW6R4VWRW56M1idkNDKyFUmLEpURJJERTpeCVi/FOEb8zzYdBmtnGM0RwrExuMCpAw9oD80yTOaRMMIllrj53MTHNVfCO8cXruRN5Vdr6rhq+Zor4UWOu5K+1A+QndfQia+6EodraUh0pbJTHlYkfyBMvrnSRq2uVm7LquS/uxJN3dmXuJ/3JUbihVS+xN3uS3gn+cKXtn6pWwOcrINrvoQXOe5Ldpc+2KpvvtnXfYnHw2wnL0u5/Li/6otFfnj1lgUv9IU21uNxlTbgaGlf0wZe5Lg2Zo1Jp9ifs+2/ibMCHuau103SRktjFY+l/Y3wLc7Wx/6GLuhDnk6Is/Sd46yQEOvE//GehRWZVHE28dzX4yzeSb7wpda+a+qs/aYXr/kSXuS4Ly3dkm8w9qTQv+5LIh5mhUz0pUpmuun0szWd/+ZLfG5bEHxhV+on+BJzZ18Sf8OXBC6VL4m3+xLeSb7wpZ5YYw+Ql9HN5xVfwosc96UhbWkLD/Ij9rovZXA9/if6ElnYKWJzujLzV+9Z8EJfaGOSLyr+cDjiG9e0gRc5rg1SznCz/LBwUK9rQ8LD3FIStWH2pl59YCy83FVt4IW+0MYwk9OXmr7x9GvawIsc10a+WWsoYF5e765rI5ZShi6I/kHyU8yrE3NxN8lq3vag7bOSuSoO64UuKxhjjs5eyIMlJ/UBV+9Otumz9zi4x3GFLJdaVc8otRGZOoGPg3oQE8l8aWb7DbNTL9+Qw78ndq7LbpJE0jZ7Rqk1A2+59Gl8HNwXIqHzJVtcG/YrSJ3Jx0EdF8mMW6n5La+vZjck8++JnW8ni4TfjbuWJoh2hUidoMbBfSGSkjsgN31arA1T56hxUMdFUvMX5htv9DryDWnqOwfARJGwr5R/aG9Xm+q3pz6bVK1BL8dWGglPfSyGTHVkr5976uNYJnWm+tu5b8hU45jnC6fqj8tgMW2o3VLqZDUO6gunMh0XZnTaaNyQr74rNkx2qlGLlZVWx9u10qescXBfiMRTRbbWnNlvMHXWGgd1XCTSblcd0o2R4N6QuL4ndrbNgCSRKEJHrFYEs+UTqXOxOLgvRLKiyju7oAoqSJ2OxUEdF4nQ6Yq57rrH+DdkZO+KzSaL5KBULWc0zZezROokIw7uC5HsRGqca2+spZg6z4iDOi6STA7QE+fQywxuSDXe9/kkWSStnFst1xtAy6XPNuLgvhDJ2p3q3rrWAJ3UCUcc1HGRLBkoyS2OaVRuyDneFZtPFoltNoW1IizLcvq0Iw7uC5Goucpqy+o6OKTOPOKgjovE63S56mJJ9f4mZfCb6VL/DFoul0atjtmXJ2PuSxYGlM250gOGGgAM/kWhP5KiSqXHB7RBs3RU8wyJCjbcYHI5EhX5aCMvRHUhe6yjdpbijnUmqhkpqJng8AwllKKNbNiZoRkmqiX6WIdnYtCOY80HdakYYZVKpcLJzFYflGuLdmkopTbzj2sjc66NekmpdITZpDcW+WH3/8jSEhzkFm+vLkSWPr0XD+Tje/Fhl/3BW3lidpkJ3h5dK8HnCdGXArHc7w7O3WX0hcg35UOnaASv5H99UvL1EQlx+X0Jmo0g8xBtxD9FCbQQZUkro/xkn68W+BMSE0Ni7o40Efb2jMxPDr0TEhtDYm9ACr5c+G+JPtM3ynwa+8rh/C3gv07YHHArA2lmmfMTNhfD5nBjn71x+YVdLK5epWVLqrVP2HwMm7+7AMaey5J7RzJqJyQhhiTgtuTZO1Vfluxs9dqiQU6kyQlbjGGLuLHPXl/5wq4cpv23QxEy6xN2JoadubsAzH6Rkw2D9qYnJCmGJN0diZ826ju+ZS/c89ANU8Tu03L640xoAfXAqKlVhuexG6YI3r/HVFsyVJXfvjFv58Ebpojev8fE7GW7LayLh/V5ZIYpQnMS06945tm/GL48k5a9A6/p9FY9D80wRWz+PVtOJOfQBG5ZMs9jM0wRnH+PaTezKgO/YGT988ALU0Te32Mqd8VKT3V3Of88qsIUYfX3mIqFrqQUuUwYIU9hFaaIqz/P9NfHx38AuEfuXQ==', 'eNrFlF1r2zAUhv+LYHdRbfkzyWWWdgnpSsjWjlEXIxzZlidLjqXEcUv/++S4g4wa6rE2uTGc97ycDz343D8BugZjIFe+/WXh/MimYAAqQpNUgbFtmjqga5VqBzLNTzonVc2IDrkoc8y0sKayYLjWUpMljERKlG0UiTwnXLXBltNIrMkK84S0SlESJrDuHmMmyQDElBEJxvdPYHuY6Qp9y6Ymmi3utBkrhaO0KRc2ydFfyrZk2p8qVchxYATGPselohG+2NePgVEVMBJcaWNgbIumpQyMTAghKYwFDwz9UVpKhEgYgYcIJoRKBXcuZFhRDvVTwHZliPyROfRGvuVdVCKOLT0c2evqkgqup/ij5TRv9myq6RFexGbFUNJHnUG2ZQ0HgOOD7Z97g+eH58ELvDK98VfhnG/mR/Cc88LbJPMsUzfF7PNreMg8MT3n/elZI9frRc95i96QoNt68utytz+i552X3uJnvUHT/M5FHfTQiel5HS/o/+e/Z/tWL3qdvY/pVcuvl9J0l+H1ET3/vPTcyW7q1V519b2DnnViev5H0POcXvT8t+gtQzYP6U5YTs/LSRVmNPpQeiVMitvVxJ5dd9Czz3A5253fj55jW70v56veDb2H3wH81kU=', '2026-10-01 09:48:47', '2026-10-01 09:48:47', NULL), (2, 'google-fonts', 1, 'JetBrains Mono', 'hjypVACdHZ', 'JetBrains Mono', 'eNrdWllzqsoa/Su7eL0hAQSVvDnhGOcxN7ssZNBWZpog7sp/Pw0YI8ZD4T37bLtuHrpDNw1rda/vs1nVvwjLUTRTlIlnVdRc5YFwFU2RoOkQzwTxQMjAtTQxQBeuL1qoYW2aa01ZqqYBXeL5F/EuOkBcacppvGo6uhj2/ZfwTVVliJ9hmwGXsgjFcISreWv0vK0CV44IDJfUTcNETxZlWZFLEHUxFEORNE3SxbB5r4QP+0VAMRzmrzcQterAIJ5pikL/iXviuRj+Jyuq6GlwKmoegsNS1Ad6tSRCZW06IYMX9B7XEiUl5KW4YG0oToSzpcByBAV19DdAA5b1o+s5nqahtzwQbdNwoWhAYPwoe5pi7Mz3kNRxarqijt5moJsRT1EHWviq0xN/vMTkdFMGKvjix5EUjyiiHtdbuUo8X1LgAPROCbV+/ksq+5Du2lGUHao1EUaQovrY9w4UaCAQrhKiitbDiJ+H5gf1M1GZi0o2KrmozEdlISqLUYnuB/EAEI8A8RAQjwHxIBCPAvEwEL7Us9DifpHLR+RyY4p9porPOe6R4tlXdLtlWp6G8EE0RRyDsKL5ByZaSOKdYVE/cEeeZZkOWsJPUUHHUz4SkxRPwaeoVKAd5RHrLlRIpLoHwldAqJVYJS4MwscRRniXRlx/oudo6JYNhJb7/Pb09hSJ/HGNFh8C6VEy9bcn9+3pJNxQt29PCPrbE6yuFoxJqlqtZgSU8Lpx1bbHzSbswcnVluU51TfGxWG1GLTpcU/rTR8/QXpADpU5l5oHsV82hsTHwwUVvJmMH48YYyLmKgj4vK/UpSQRCDHnMXiMIcY01AZVDOaTzbLzfT3OpcVgRGTU3l+TlsuXut0WHM60VGlhyORCWhY9HIHKTK5206SFIY+ktALWd/cMyVeW6dLKYUREs69Kqyl78+m7NxhXU6WFIZMLaTVflofBwmqsqDRpYcgjKa08qdqMtN2J/XRpsVil36vSUt1Zp1k1p2q4LQh/48ON47FLJIeU8ZLTS+HmEEJR2ugK2gmEnTSbaIrhvz35Fikh5Kjp7cmzwt1uiNo0TReQiNKR19tTvLcloysyuT8lESsy3nWh6SPjWSPpAk8V0V6oyJ/woz2ZYhx3NZ9tOgi3iNGGBYE5Noasli44oB6GpvPFB8KIdpLEP0BBfKQFIobrfhGIykwdo+TovLppgYghj4vtAxOo0HaaDJ8eiBxGRMjrOb4lAI8aB44nfAvE3Exoc74qKIMrgcj9gUDkvocAT/3DQCzmmBsD8SqK9EDEcN0vArHKwjFpiD1tkRaIGPJIBmJ/LXmvB1vZwfRAzGNERLDh1U9EbT2s93J+jk3dbGHI5EJaHb3lcf521wvSpIUhj6S0JkEdoeG64jxdWgWMiHTyV6VVdWazRWcDJpVUaWHI5EJakzatUUatNE11HzDkkZQW12L7o/3O3Qbp0ipi9a17PWsFzIEMNk7fTpUWhkwusxb6bt+Pdx0+1X3AkEdSWqMxadOObfPldGklHDoAxdiU/u1ExKtE9lWyOSD73murNd+rVqlHdlSmN9fF5oW6OMip/dGMdCbZbVNsyAySAqO2Oun3pA7cZXZOsaEiJTRW1VSKq1fmzeUN5unduRQ7qn5NY4OKvw7qRu+ll90/xYbMhcZ0fV47eJPdzs9soWJDJamxLjjYZakbMPYNLurduSyn1zXmqQIn2ICd29mNVGzIXGisDTqw7zf5np7ZS8WGSlJjAknLjUK30sndYKfikJOvaiyvMKNuYd8Qlt+MHKbkVWW7wZPiFSMn/4cc1XjifpuRg/7+F0f1G4obHFVslv4iIg82tbDLtY5Wz2yqYkMlGZF2Xh4FxiIojm/wVe/Phbseke255B7qlfG8RmQ2C7Ehc6Exlt+u6QZnvniZ/UJsqCQ1NtKLfL2tiSvhBsvw7lz4qTK7prGFMBwOB0vtxcjuGmJD5kJju448KpctqZHPbBxiQyWpscpYo/yZ3u+aN3iH9+fiXtfYyF8t6So7W7nZ7UNsyFxorDaozazJ3g7amR1EbKhcfIWP1wW1t23W6jeYiBh87V3XWL8/agvyuj9ysvuI2JC50FipZwRua1V+nWW2ErGhktQY05s2+Jccs12la+yPmKLTv2FS6Pm1LzUZQDJlZSga6xDN5D8U+iMpShAefqALOkfHNceQqMhFF0y5TKKiEl9U8nFdLR3ruD1Hsce6GNcMH9ZM+HiGygvxRSm6maEZJq55+lhHb2JQx7HmwlqoxbAEQah+HZFYVltLEr7mncxz/u+pZ/536qn4PWNU+j+adn37OpyN2vvBiPg4nT0WpePZ4+iWpc5Cq6mwYnhQe6eEx8DjA9gJ89YHMtzEZ+u/xQRwa0Z47PnrMP7X8Xvi8mQ+Wprwkzy+uDzEH3+yK/IycUj6Z6iYCCusbXOtUr012p+wMgmsDD5YDwX02N1wMAcnrLkE1hw+WPOzpm8WvEaQP2FlE1jZG7CGZ99/N9Tzk3VfsCVtEhirZmDwJ9hcAjZ3b9hn55C+YNeYlUUvFtNV5wQ7n4Cdx0cZBbuXs3foF3V+wlpIYC3gg/WVHDAVprwQ6iesxQTWIj5YaTCYKGrVhPvzrAsypN3Tz+KfA9vv9dqHtSs3+PO0CzLk3TuALcj+BrpwvGLP8y7IkHjvAHbUmpLVgdKsdc8TL8iQea+B/VdS2JkDf5bC+sDp10aU+X6eeUGG1HuHSe5KC7V76G07ynm+BRkS7h3A+vkNP3kv0F3mPOGCDBn3DmB3BkUzWmdOv5xnXJAh5f5BsD8/Pv4Cr9b7TA==', 'eNrFk01PwkAQhv/LJt5Y2ZbyUW4kikbDAWL8CBCyttuyuN2B7lYEwn93SjGRwEFFsYcm88505p0+mf6KyJA0CXO9q1B2XnyPlMhcyHhsSdNjDAMZ2jFWOIydYc7YhRIYakgTrlAIpZkqvkApzwolAgtpEQWQJELbIsi0DCAUPa5jUSjTVCjgOD3iyogSiaQShjT7K5JtPEWc9pjuVJIWFnNreTDO243ypOPtSFmq8INBeT6lAWiL0qCcTfPuZlCeAICRNAI9KOPLohQDxErQTUQnwj6nXGpDE9BAX12PKm6lprg/LfakTt1njTpjDf98DlHkoiPxhnOMBI2TP7REJvlyeV80sxXzvUZGLjHjOk6tUSKab8qOcEHWw3Vpy651CdkEer3l0yd21f9lV3lo31bnUVt0D7CrnoBddf+v+exIdo2K+012B13ssFPdx5mgdzf3X7w7abmSwZ+yc1vZRTi79ik/wK52orsr9vw1dvj85O72XOTshu/ADbBk', '2026-10-01 09:54:50', '2026-10-01 09:55:18', NULL); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_jooosi_fon_migrations` +-- Estructura de tabla para la tabla `xm_aca_jooosi_fon_migrations` -- -CREATE TABLE `wp_jooosi_fon_migrations` ( +CREATE TABLE `xm_aca_jooosi_fon_migrations` ( `version` varchar(191) COLLATE utf8mb4_unicode_520_ci NOT NULL, `executed_at` datetime DEFAULT NULL, `execution_time` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_jooosi_fon_migrations` +-- Volcado de datos para la tabla `xm_aca_jooosi_fon_migrations` -- -INSERT INTO `wp_jooosi_fon_migrations` (`version`, `executed_at`, `execution_time`) VALUES +INSERT INTO `xm_aca_jooosi_fon_migrations` (`version`, `executed_at`, `execution_time`) VALUES ('JooosiFon\\Migrations\\Version20221121114557', '2026-09-30 17:11:32', 7), ('JooosiFon\\Migrations\\Version20260817000000', '2026-09-30 17:11:32', 4), ('JooosiFon\\Migrations\\Version20260818000000', '2026-09-30 17:11:32', 70), @@ -361,10 +383,10 @@ INSERT INTO `wp_jooosi_fon_migrations` (`version`, `executed_at`, `execution_tim -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_links` +-- Estructura de tabla para la tabla `xm_aca_links` -- -CREATE TABLE `wp_links` ( +CREATE TABLE `xm_aca_links` ( `link_id` bigint UNSIGNED NOT NULL, `link_url` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', `link_name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', @@ -383,10 +405,10 @@ CREATE TABLE `wp_links` ( -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_options` +-- Estructura de tabla para la tabla `xm_aca_options` -- -CREATE TABLE `wp_options` ( +CREATE TABLE `xm_aca_options` ( `option_id` bigint UNSIGNED NOT NULL, `option_name` varchar(191) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', `option_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL, @@ -394,11 +416,11 @@ CREATE TABLE `wp_options` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_options` +-- Volcado de datos para la tabla `xm_aca_options` -- -INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES -(1, 'cron', 'a:13:{i:1791473552;a:1:{s:26:\"action_scheduler_run_queue\";a:1:{s:32:\"0d04ed39571b55704c122d726248bbac\";a:3:{s:8:\"schedule\";s:12:\"every_minute\";s:4:\"args\";a:1:{i:0;s:7:\"WP Cron\";}s:8:\"interval\";i:60;}}}i:1791476466;a:1:{s:34:\"wp_privacy_delete_old_export_files\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1791494466;a:3:{s:30:\"wp_site_health_scheduled_check\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"weekly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:604800;}}s:32:\"recovery_mode_clean_expired_keys\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:41:\"wp_privacy_personal_data_cleanup_requests\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1791494469;a:3:{s:19:\"wp_scheduled_delete\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:25:\"delete_expired_transients\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:21:\"wp_update_user_counts\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1791494471;a:1:{s:30:\"wp_scheduled_auto_draft_delete\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1791498064;a:1:{s:16:\"wp_version_check\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1791499864;a:1:{s:17:\"wp_update_plugins\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1791501664;a:1:{s:16:\"wp_update_themes\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1791504000;a:2:{s:35:\"rank_math/redirection/clean_trashed\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:30:\"rank_math/links/internal_links\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1791513238;a:1:{s:35:\"rank_math/content-ai/update_prompts\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1791874833;a:1:{s:26:\"wpcode_usage_tracking_cron\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"weekly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:604800;}}}i:1792017847;a:1:{s:30:\"wp_delete_temp_updater_backups\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"weekly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:604800;}}}s:7:\"version\";i:2;}', 'on'), +INSERT INTO `xm_aca_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES +(1, 'cron', 'a:15:{i:1791817652;a:1:{s:26:\"action_scheduler_run_queue\";a:1:{s:32:\"0d04ed39571b55704c122d726248bbac\";a:3:{s:8:\"schedule\";s:12:\"every_minute\";s:4:\"args\";a:1:{i:0;s:7:\"WP Cron\";}s:8:\"interval\";i:60;}}}i:1791818466;a:1:{s:34:\"wp_privacy_delete_old_export_files\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1791840066;a:2:{s:32:\"recovery_mode_clean_expired_keys\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:41:\"wp_privacy_personal_data_cleanup_requests\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1791840069;a:3:{s:19:\"wp_scheduled_delete\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:25:\"delete_expired_transients\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:21:\"wp_update_user_counts\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1791840071;a:1:{s:30:\"wp_scheduled_auto_draft_delete\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1791843664;a:1:{s:16:\"wp_version_check\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1791845464;a:1:{s:17:\"wp_update_plugins\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1791847264;a:1:{s:16:\"wp_update_themes\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1791849600;a:2:{s:35:\"rank_math/redirection/clean_trashed\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:30:\"rank_math/links/internal_links\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1791858838;a:1:{s:35:\"rank_math/content-ai/update_prompts\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1791874833;a:1:{s:26:\"wpcode_usage_tracking_cron\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"weekly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:604800;}}}i:1792017847;a:1:{s:30:\"wp_delete_temp_updater_backups\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"weekly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:604800;}}}i:1792099266;a:1:{s:30:\"wp_site_health_scheduled_check\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"weekly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:604800;}}}i:1792164348;a:1:{s:23:\"polylang_check_licenses\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"weekly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:604800;}}}s:7:\"version\";i:2;}', 'on'), (2, 'siteurl', 'https://xmartica.xyz', 'on'), (3, 'home', 'https://xmartica.xyz', 'on'), (4, 'blogname', 'Xmartica', 'on'), @@ -416,7 +438,7 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (16, 'mailserver_login', 'login@example.com', 'on'), (17, 'mailserver_pass', '', 'on'), (18, 'mailserver_port', '110', 'on'), -(19, 'default_category', '1', 'on'), +(19, 'default_category', '17', 'on'), (20, 'default_comment_status', 'closed', 'on'), (21, 'default_ping_status', 'closed', 'on'), (22, 'default_pingback_flag', '1', 'on'), @@ -427,11 +449,10 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (27, 'comment_moderation', '1', 'on'), (28, 'moderation_notify', '1', 'on'), (29, 'permalink_structure', '/%postname%', 'on'), -(30, 'rewrite_rules', 'a:137:{s:19:\"sitemap_index\\.xml$\";s:19:\"index.php?sitemap=1\";s:31:\"([^/]+?)-sitemap([0-9]+)?\\.xml$\";s:51:\"index.php?sitemap=$matches[1]&sitemap_n=$matches[2]\";s:24:\"([a-z]+)?-?sitemap\\.xsl$\";s:25:\"index.php?xsl=$matches[1]\";s:11:\"^wp-json/?$\";s:22:\"index.php?rest_route=/\";s:14:\"^wp-json/(.*)?\";s:33:\"index.php?rest_route=/$matches[1]\";s:21:\"^index.php/wp-json/?$\";s:22:\"index.php?rest_route=/\";s:24:\"^index.php/wp-json/(.*)?\";s:33:\"index.php?rest_route=/$matches[1]\";s:17:\"^wp-sitemap\\.xml$\";s:23:\"index.php?sitemap=index\";s:17:\"^wp-sitemap\\.xsl$\";s:36:\"index.php?sitemap-stylesheet=sitemap\";s:23:\"^wp-sitemap-index\\.xsl$\";s:34:\"index.php?sitemap-stylesheet=index\";s:48:\"^wp-sitemap-([a-z]+?)-([a-z\\d_-]+?)-(\\d+?)\\.xml$\";s:75:\"index.php?sitemap=$matches[1]&sitemap-subtype=$matches[2]&paged=$matches[3]\";s:34:\"^wp-sitemap-([a-z]+?)-(\\d+?)\\.xml$\";s:47:\"index.php?sitemap=$matches[1]&paged=$matches[2]\";s:17:\"^oauth/authorize$\";s:38:\"index.php?mcp_oauth_endpoint=authorize\";s:26:\"^oauth/authorize-callback$\";s:47:\"index.php?mcp_oauth_endpoint=authorize-callback\";s:13:\"^oauth/token$\";s:34:\"index.php?mcp_oauth_endpoint=token\";s:15:\"^oauth/consent$\";s:36:\"index.php?mcp_oauth_endpoint=consent\";s:14:\"^oauth/revoke$\";s:35:\"index.php?mcp_oauth_endpoint=revoke\";s:39:\"^\\.well-known/oauth-protected-resource$\";s:48:\"index.php?mcp_oauth_discovery=protected-resource\";s:41:\"^\\.well-known/oauth-authorization-server$\";s:50:\"index.php?mcp_oauth_discovery=authorization-server\";s:34:\"wpcode/[^/]+/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:44:\"wpcode/[^/]+/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:64:\"wpcode/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:59:\"wpcode/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:59:\"wpcode/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:40:\"wpcode/[^/]+/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:23:\"wpcode/([^/]+)/embed/?$\";s:39:\"index.php?wpcode=$matches[1]&embed=true\";s:27:\"wpcode/([^/]+)/trackback/?$\";s:33:\"index.php?wpcode=$matches[1]&tb=1\";s:35:\"wpcode/([^/]+)/page/?([0-9]{1,})/?$\";s:46:\"index.php?wpcode=$matches[1]&paged=$matches[2]\";s:42:\"wpcode/([^/]+)/comment-page-([0-9]{1,})/?$\";s:46:\"index.php?wpcode=$matches[1]&cpage=$matches[2]\";s:31:\"wpcode/([^/]+)(?:/([0-9]+))?/?$\";s:45:\"index.php?wpcode=$matches[1]&page=$matches[2]\";s:23:\"wpcode/[^/]+/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:33:\"wpcode/[^/]+/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:53:\"wpcode/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:48:\"wpcode/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:48:\"wpcode/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:29:\"wpcode/[^/]+/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:52:\"wpcode_type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?wpcode_type=$matches[1]&feed=$matches[2]\";s:47:\"wpcode_type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?wpcode_type=$matches[1]&feed=$matches[2]\";s:28:\"wpcode_type/([^/]+)/embed/?$\";s:44:\"index.php?wpcode_type=$matches[1]&embed=true\";s:40:\"wpcode_type/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?wpcode_type=$matches[1]&paged=$matches[2]\";s:22:\"wpcode_type/([^/]+)/?$\";s:33:\"index.php?wpcode_type=$matches[1]\";s:56:\"wpcode_location/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:54:\"index.php?wpcode_location=$matches[1]&feed=$matches[2]\";s:51:\"wpcode_location/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:54:\"index.php?wpcode_location=$matches[1]&feed=$matches[2]\";s:32:\"wpcode_location/([^/]+)/embed/?$\";s:48:\"index.php?wpcode_location=$matches[1]&embed=true\";s:44:\"wpcode_location/([^/]+)/page/?([0-9]{1,})/?$\";s:55:\"index.php?wpcode_location=$matches[1]&paged=$matches[2]\";s:26:\"wpcode_location/([^/]+)/?$\";s:37:\"index.php?wpcode_location=$matches[1]\";s:52:\"wpcode_tags/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?wpcode_tags=$matches[1]&feed=$matches[2]\";s:47:\"wpcode_tags/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?wpcode_tags=$matches[1]&feed=$matches[2]\";s:28:\"wpcode_tags/([^/]+)/embed/?$\";s:44:\"index.php?wpcode_tags=$matches[1]&embed=true\";s:40:\"wpcode_tags/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?wpcode_tags=$matches[1]&paged=$matches[2]\";s:22:\"wpcode_tags/([^/]+)/?$\";s:33:\"index.php?wpcode_tags=$matches[1]\";s:47:\"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:42:\"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:23:\"category/(.+?)/embed/?$\";s:46:\"index.php?category_name=$matches[1]&embed=true\";s:35:\"category/(.+?)/page/?([0-9]{1,})/?$\";s:53:\"index.php?category_name=$matches[1]&paged=$matches[2]\";s:17:\"category/(.+?)/?$\";s:35:\"index.php?category_name=$matches[1]\";s:44:\"tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:39:\"tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:20:\"tag/([^/]+)/embed/?$\";s:36:\"index.php?tag=$matches[1]&embed=true\";s:32:\"tag/([^/]+)/page/?([0-9]{1,})/?$\";s:43:\"index.php?tag=$matches[1]&paged=$matches[2]\";s:14:\"tag/([^/]+)/?$\";s:25:\"index.php?tag=$matches[1]\";s:45:\"type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?post_format=$matches[1]&feed=$matches[2]\";s:40:\"type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?post_format=$matches[1]&feed=$matches[2]\";s:21:\"type/([^/]+)/embed/?$\";s:44:\"index.php?post_format=$matches[1]&embed=true\";s:33:\"type/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?post_format=$matches[1]&paged=$matches[2]\";s:15:\"type/([^/]+)/?$\";s:33:\"index.php?post_format=$matches[1]\";s:12:\"robots\\.txt$\";s:18:\"index.php?robots=1\";s:13:\"favicon\\.ico$\";s:19:\"index.php?favicon=1\";s:12:\"sitemap\\.xml\";s:23:\"index.php?sitemap=index\";s:48:\".*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\\.php$\";s:18:\"index.php?feed=old\";s:20:\".*wp-app\\.php(/.*)?$\";s:19:\"index.php?error=403\";s:18:\".*wp-register.php$\";s:23:\"index.php?register=true\";s:32:\"feed/(feed|rdf|rss|rss2|atom)/?$\";s:27:\"index.php?&feed=$matches[1]\";s:27:\"(feed|rdf|rss|rss2|atom)/?$\";s:27:\"index.php?&feed=$matches[1]\";s:8:\"embed/?$\";s:21:\"index.php?&embed=true\";s:20:\"page/?([0-9]{1,})/?$\";s:28:\"index.php?&paged=$matches[1]\";s:27:\"comment-page-([0-9]{1,})/?$\";s:38:\"index.php?&page_id=2&cpage=$matches[1]\";s:41:\"comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?&feed=$matches[1]&withcomments=1\";s:36:\"comments/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?&feed=$matches[1]&withcomments=1\";s:17:\"comments/embed/?$\";s:21:\"index.php?&embed=true\";s:44:\"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:40:\"index.php?s=$matches[1]&feed=$matches[2]\";s:39:\"search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:40:\"index.php?s=$matches[1]&feed=$matches[2]\";s:20:\"search/(.+)/embed/?$\";s:34:\"index.php?s=$matches[1]&embed=true\";s:32:\"search/(.+)/page/?([0-9]{1,})/?$\";s:41:\"index.php?s=$matches[1]&paged=$matches[2]\";s:14:\"search/(.+)/?$\";s:23:\"index.php?s=$matches[1]\";s:47:\"author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?author_name=$matches[1]&feed=$matches[2]\";s:42:\"author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?author_name=$matches[1]&feed=$matches[2]\";s:23:\"author/([^/]+)/embed/?$\";s:44:\"index.php?author_name=$matches[1]&embed=true\";s:35:\"author/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?author_name=$matches[1]&paged=$matches[2]\";s:17:\"author/([^/]+)/?$\";s:33:\"index.php?author_name=$matches[1]\";s:69:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:80:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:64:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:80:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:45:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$\";s:74:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&embed=true\";s:57:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:81:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]\";s:39:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:63:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]\";s:56:\"([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:51:\"([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:32:\"([0-9]{4})/([0-9]{1,2})/embed/?$\";s:58:\"index.php?year=$matches[1]&monthnum=$matches[2]&embed=true\";s:44:\"([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:65:\"index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]\";s:26:\"([0-9]{4})/([0-9]{1,2})/?$\";s:47:\"index.php?year=$matches[1]&monthnum=$matches[2]\";s:43:\"([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?year=$matches[1]&feed=$matches[2]\";s:38:\"([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?year=$matches[1]&feed=$matches[2]\";s:19:\"([0-9]{4})/embed/?$\";s:37:\"index.php?year=$matches[1]&embed=true\";s:31:\"([0-9]{4})/page/?([0-9]{1,})/?$\";s:44:\"index.php?year=$matches[1]&paged=$matches[2]\";s:13:\"([0-9]{4})/?$\";s:26:\"index.php?year=$matches[1]\";s:27:\".?.+?/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:37:\".?.+?/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:57:\".?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:52:\".?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:52:\".?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:33:\".?.+?/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:16:\"(.?.+?)/embed/?$\";s:41:\"index.php?pagename=$matches[1]&embed=true\";s:20:\"(.?.+?)/trackback/?$\";s:35:\"index.php?pagename=$matches[1]&tb=1\";s:40:\"(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:35:\"(.?.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:28:\"(.?.+?)/page/?([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&paged=$matches[2]\";s:35:\"(.?.+?)/comment-page-([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&cpage=$matches[2]\";s:24:\"(.?.+?)(?:/([0-9]+))?/?$\";s:47:\"index.php?pagename=$matches[1]&page=$matches[2]\";s:27:\"[^/]+/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:37:\"[^/]+/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:57:\"[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:52:\"[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:52:\"[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:33:\"[^/]+/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:16:\"([^/]+)/embed/?$\";s:37:\"index.php?name=$matches[1]&embed=true\";s:20:\"([^/]+)/trackback/?$\";s:31:\"index.php?name=$matches[1]&tb=1\";s:40:\"([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:35:\"([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:28:\"([^/]+)/page/?([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&paged=$matches[2]\";s:35:\"([^/]+)/comment-page-([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&cpage=$matches[2]\";s:24:\"([^/]+)(?:/([0-9]+))?/?$\";s:43:\"index.php?name=$matches[1]&page=$matches[2]\";s:16:\"[^/]+/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:26:\"[^/]+/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:46:\"[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:41:\"[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:41:\"[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:22:\"[^/]+/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";}', 'on'), (31, 'hack_file', '0', 'on'), (32, 'blog_charset', 'UTF-8', 'on'), (33, 'moderation_keys', '', 'off'), -(34, 'active_plugins', 'a:10:{i:0;s:44:\"centro-de-funciones/alcastromol-function.php\";i:1;s:23:\"compressx/compressx.php\";i:2;s:36:\"contact-form-7/wp-contact-form-7.php\";i:3;s:43:\"disable-media-pages/disable-media-pages.php\";i:4;s:47:\"disable-post-revision/disable-post-revision.php\";i:5;s:48:\"faq-schema-for-pages-and-posts/wp-faq-schema.php\";i:6;s:35:\"insert-headers-and-footers/ihaf.php\";i:7;s:30:\"seo-by-rank-math/rank-math.php\";i:8;s:30:\"table-of-contents-plus/toc.php\";i:9;s:27:\"yabe-webfont/jooosi-fon.php\";}', 'on'), +(34, 'active_plugins', 'a:12:{i:0;s:25:\"polylang-pro/polylang.php\";i:2;s:44:\"centro-de-funciones/alcastromol-function.php\";i:3;s:23:\"compressx/compressx.php\";i:4;s:36:\"contact-form-7/wp-contact-form-7.php\";i:5;s:43:\"disable-media-pages/disable-media-pages.php\";i:6;s:47:\"disable-post-revision/disable-post-revision.php\";i:7;s:32:\"duplicate-page/duplicatepage.php\";i:8;s:48:\"faq-schema-for-pages-and-posts/wp-faq-schema.php\";i:9;s:35:\"insert-headers-and-footers/ihaf.php\";i:10;s:30:\"seo-by-rank-math/rank-math.php\";i:11;s:30:\"table-of-contents-plus/toc.php\";i:12;s:27:\"yabe-webfont/jooosi-fon.php\";}', 'on'), (35, 'category_base', '', 'on'), (36, 'ping_sites', 'https://rpc.pingomatic.com/', 'on'), (37, 'comment_max_links', '2', 'on'), @@ -477,7 +498,7 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (77, 'widget_categories', 'a:2:{i:1;a:0:{}s:12:\"_multiwidget\";i:1;}', 'auto'), (78, 'widget_text', 'a:2:{i:1;a:0:{}s:12:\"_multiwidget\";i:1;}', 'auto'), (79, 'widget_rss', 'a:2:{i:1;a:0:{}s:12:\"_multiwidget\";i:1;}', 'auto'), -(80, 'uninstall_plugins', 'a:0:{}', 'off'), +(80, 'uninstall_plugins', 'a:1:{s:38:\"brozzme-db-prefix-change/uninstall.php\";s:34:\"brozzme_db_prefix_plugin_uninstall\";}', 'off'), (81, 'timezone_string', 'America/Mexico_City', 'on'), (82, 'page_for_posts', '0', 'on'), (83, 'page_on_front', '2', 'on'), @@ -500,7 +521,7 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (100, 'wp_attachment_pages_enabled', '0', 'on'), (101, 'wp_notes_notify', '1', 'on'), (102, 'initial_db_version', '61833', 'on'), -(103, 'wp_user_roles', 'a:5:{s:13:\"administrator\";a:2:{s:4:\"name\";s:13:\"Administrator\";s:12:\"capabilities\";a:81:{s:13:\"switch_themes\";b:1;s:11:\"edit_themes\";b:1;s:16:\"activate_plugins\";b:1;s:12:\"edit_plugins\";b:1;s:10:\"edit_users\";b:1;s:10:\"edit_files\";b:1;s:14:\"manage_options\";b:1;s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:6:\"import\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:8:\"level_10\";b:1;s:7:\"level_9\";b:1;s:7:\"level_8\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;s:12:\"delete_users\";b:1;s:12:\"create_users\";b:1;s:17:\"unfiltered_upload\";b:1;s:14:\"edit_dashboard\";b:1;s:14:\"update_plugins\";b:1;s:14:\"delete_plugins\";b:1;s:15:\"install_plugins\";b:1;s:13:\"update_themes\";b:1;s:14:\"install_themes\";b:1;s:11:\"update_core\";b:1;s:10:\"list_users\";b:1;s:12:\"remove_users\";b:1;s:13:\"promote_users\";b:1;s:18:\"edit_theme_options\";b:1;s:13:\"delete_themes\";b:1;s:6:\"export\";b:1;s:23:\"rank_math_edit_htaccess\";b:1;s:16:\"rank_math_titles\";b:1;s:17:\"rank_math_general\";b:1;s:17:\"rank_math_sitemap\";b:1;s:21:\"rank_math_404_monitor\";b:1;s:22:\"rank_math_link_builder\";b:1;s:22:\"rank_math_redirections\";b:1;s:22:\"rank_math_role_manager\";b:1;s:19:\"rank_math_analytics\";b:1;s:23:\"rank_math_site_analysis\";b:1;s:25:\"rank_math_onpage_analysis\";b:1;s:24:\"rank_math_onpage_general\";b:1;s:25:\"rank_math_onpage_advanced\";b:1;s:24:\"rank_math_onpage_snippet\";b:1;s:23:\"rank_math_onpage_social\";b:1;s:20:\"rank_math_content_ai\";b:1;s:19:\"rank_math_admin_bar\";b:1;s:38:\"aioseo_table_of_contents_about_us_page\";b:1;s:20:\"wpcode_edit_snippets\";b:1;s:24:\"wpcode_activate_snippets\";b:1;}}s:6:\"editor\";a:2:{s:4:\"name\";s:6:\"Editor\";s:12:\"capabilities\";a:39:{s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;s:23:\"rank_math_site_analysis\";b:1;s:25:\"rank_math_onpage_analysis\";b:1;s:24:\"rank_math_onpage_general\";b:1;s:24:\"rank_math_onpage_snippet\";b:1;s:23:\"rank_math_onpage_social\";b:1;}}s:6:\"author\";a:2:{s:4:\"name\";s:6:\"Author\";s:12:\"capabilities\";a:14:{s:12:\"upload_files\";b:1;s:10:\"edit_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:25:\"rank_math_onpage_analysis\";b:1;s:24:\"rank_math_onpage_general\";b:1;s:24:\"rank_math_onpage_snippet\";b:1;s:23:\"rank_math_onpage_social\";b:1;}}s:11:\"contributor\";a:2:{s:4:\"name\";s:11:\"Contributor\";s:12:\"capabilities\";a:5:{s:10:\"edit_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;}}s:10:\"subscriber\";a:2:{s:4:\"name\";s:10:\"Subscriber\";s:12:\"capabilities\";a:2:{s:4:\"read\";b:1;s:7:\"level_0\";b:1;}}}', 'on'), +(103, 'xm_aca_user_roles', 'a:5:{s:13:\"administrator\";a:2:{s:4:\"name\";s:13:\"Administrator\";s:12:\"capabilities\";a:81:{s:13:\"switch_themes\";b:1;s:11:\"edit_themes\";b:1;s:16:\"activate_plugins\";b:1;s:12:\"edit_plugins\";b:1;s:10:\"edit_users\";b:1;s:10:\"edit_files\";b:1;s:14:\"manage_options\";b:1;s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:6:\"import\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:8:\"level_10\";b:1;s:7:\"level_9\";b:1;s:7:\"level_8\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;s:12:\"delete_users\";b:1;s:12:\"create_users\";b:1;s:17:\"unfiltered_upload\";b:1;s:14:\"edit_dashboard\";b:1;s:14:\"update_plugins\";b:1;s:14:\"delete_plugins\";b:1;s:15:\"install_plugins\";b:1;s:13:\"update_themes\";b:1;s:14:\"install_themes\";b:1;s:11:\"update_core\";b:1;s:10:\"list_users\";b:1;s:12:\"remove_users\";b:1;s:13:\"promote_users\";b:1;s:18:\"edit_theme_options\";b:1;s:13:\"delete_themes\";b:1;s:6:\"export\";b:1;s:23:\"rank_math_edit_htaccess\";b:1;s:16:\"rank_math_titles\";b:1;s:17:\"rank_math_general\";b:1;s:17:\"rank_math_sitemap\";b:1;s:21:\"rank_math_404_monitor\";b:1;s:22:\"rank_math_link_builder\";b:1;s:22:\"rank_math_redirections\";b:1;s:22:\"rank_math_role_manager\";b:1;s:19:\"rank_math_analytics\";b:1;s:23:\"rank_math_site_analysis\";b:1;s:25:\"rank_math_onpage_analysis\";b:1;s:24:\"rank_math_onpage_general\";b:1;s:25:\"rank_math_onpage_advanced\";b:1;s:24:\"rank_math_onpage_snippet\";b:1;s:23:\"rank_math_onpage_social\";b:1;s:20:\"rank_math_content_ai\";b:1;s:19:\"rank_math_admin_bar\";b:1;s:38:\"aioseo_table_of_contents_about_us_page\";b:1;s:20:\"wpcode_edit_snippets\";b:1;s:24:\"wpcode_activate_snippets\";b:1;}}s:6:\"editor\";a:2:{s:4:\"name\";s:6:\"Editor\";s:12:\"capabilities\";a:39:{s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;s:23:\"rank_math_site_analysis\";b:1;s:25:\"rank_math_onpage_analysis\";b:1;s:24:\"rank_math_onpage_general\";b:1;s:24:\"rank_math_onpage_snippet\";b:1;s:23:\"rank_math_onpage_social\";b:1;}}s:6:\"author\";a:2:{s:4:\"name\";s:6:\"Author\";s:12:\"capabilities\";a:14:{s:12:\"upload_files\";b:1;s:10:\"edit_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:25:\"rank_math_onpage_analysis\";b:1;s:24:\"rank_math_onpage_general\";b:1;s:24:\"rank_math_onpage_snippet\";b:1;s:23:\"rank_math_onpage_social\";b:1;}}s:11:\"contributor\";a:2:{s:4:\"name\";s:11:\"Contributor\";s:12:\"capabilities\";a:5:{s:10:\"edit_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;}}s:10:\"subscriber\";a:2:{s:4:\"name\";s:10:\"Subscriber\";s:12:\"capabilities\";a:2:{s:4:\"read\";b:1;s:7:\"level_0\";b:1;}}}', 'on'), (104, 'fresh_site', '0', 'off'), (105, 'WPLANG', 'es_MX', 'auto'), (106, 'user_count', '1', 'off'), @@ -519,8 +540,7 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (119, 'widget_recent-comments', 'a:1:{s:12:\"_multiwidget\";i:1;}', 'auto'), (120, 'widget_tag_cloud', 'a:1:{s:12:\"_multiwidget\";i:1;}', 'auto'), (121, 'widget_nav_menu', 'a:1:{s:12:\"_multiwidget\";i:1;}', 'auto'), -(122, 'widget_custom_html', 'a:1:{s:12:\"_multiwidget\";i:1;}', 'auto'); -INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES +(122, 'widget_custom_html', 'a:1:{s:12:\"_multiwidget\";i:1;}', 'auto'), (123, '_transient_wp_core_block_css_files', 'a:2:{s:7:\"version\";s:5:\"7.1.2\";s:5:\"files\";a:624:{i:0;s:31:\"accordion-heading/style-rtl.css\";i:1;s:35:\"accordion-heading/style-rtl.min.css\";i:2;s:27:\"accordion-heading/style.css\";i:3;s:31:\"accordion-heading/style.min.css\";i:4;s:28:\"accordion-item/style-rtl.css\";i:5;s:32:\"accordion-item/style-rtl.min.css\";i:6;s:24:\"accordion-item/style.css\";i:7;s:28:\"accordion-item/style.min.css\";i:8;s:29:\"accordion-panel/style-rtl.css\";i:9;s:33:\"accordion-panel/style-rtl.min.css\";i:10;s:25:\"accordion-panel/style.css\";i:11;s:29:\"accordion-panel/style.min.css\";i:12;s:23:\"accordion/style-rtl.css\";i:13;s:27:\"accordion/style-rtl.min.css\";i:14;s:19:\"accordion/style.css\";i:15;s:23:\"accordion/style.min.css\";i:16;s:22:\"archives/style-rtl.css\";i:17;s:26:\"archives/style-rtl.min.css\";i:18;s:18:\"archives/style.css\";i:19;s:22:\"archives/style.min.css\";i:20;s:20:\"audio/editor-rtl.css\";i:21;s:24:\"audio/editor-rtl.min.css\";i:22;s:16:\"audio/editor.css\";i:23;s:20:\"audio/editor.min.css\";i:24;s:19:\"audio/style-rtl.css\";i:25;s:23:\"audio/style-rtl.min.css\";i:26;s:15:\"audio/style.css\";i:27;s:19:\"audio/style.min.css\";i:28;s:19:\"audio/theme-rtl.css\";i:29;s:23:\"audio/theme-rtl.min.css\";i:30;s:15:\"audio/theme.css\";i:31;s:19:\"audio/theme.min.css\";i:32;s:21:\"avatar/editor-rtl.css\";i:33;s:25:\"avatar/editor-rtl.min.css\";i:34;s:17:\"avatar/editor.css\";i:35;s:21:\"avatar/editor.min.css\";i:36;s:20:\"avatar/style-rtl.css\";i:37;s:24:\"avatar/style-rtl.min.css\";i:38;s:16:\"avatar/style.css\";i:39;s:20:\"avatar/style.min.css\";i:40;s:25:\"breadcrumbs/style-rtl.css\";i:41;s:29:\"breadcrumbs/style-rtl.min.css\";i:42;s:21:\"breadcrumbs/style.css\";i:43;s:25:\"breadcrumbs/style.min.css\";i:44;s:21:\"button/editor-rtl.css\";i:45;s:25:\"button/editor-rtl.min.css\";i:46;s:17:\"button/editor.css\";i:47;s:21:\"button/editor.min.css\";i:48;s:20:\"button/style-rtl.css\";i:49;s:24:\"button/style-rtl.min.css\";i:50;s:16:\"button/style.css\";i:51;s:20:\"button/style.min.css\";i:52;s:22:\"buttons/editor-rtl.css\";i:53;s:26:\"buttons/editor-rtl.min.css\";i:54;s:18:\"buttons/editor.css\";i:55;s:22:\"buttons/editor.min.css\";i:56;s:21:\"buttons/style-rtl.css\";i:57;s:25:\"buttons/style-rtl.min.css\";i:58;s:17:\"buttons/style.css\";i:59;s:21:\"buttons/style.min.css\";i:60;s:22:\"calendar/style-rtl.css\";i:61;s:26:\"calendar/style-rtl.min.css\";i:62;s:18:\"calendar/style.css\";i:63;s:22:\"calendar/style.min.css\";i:64;s:25:\"categories/editor-rtl.css\";i:65;s:29:\"categories/editor-rtl.min.css\";i:66;s:21:\"categories/editor.css\";i:67;s:25:\"categories/editor.min.css\";i:68;s:24:\"categories/style-rtl.css\";i:69;s:28:\"categories/style-rtl.min.css\";i:70;s:20:\"categories/style.css\";i:71;s:24:\"categories/style.min.css\";i:72;s:19:\"code/editor-rtl.css\";i:73;s:23:\"code/editor-rtl.min.css\";i:74;s:15:\"code/editor.css\";i:75;s:19:\"code/editor.min.css\";i:76;s:18:\"code/style-rtl.css\";i:77;s:22:\"code/style-rtl.min.css\";i:78;s:14:\"code/style.css\";i:79;s:18:\"code/style.min.css\";i:80;s:18:\"code/theme-rtl.css\";i:81;s:22:\"code/theme-rtl.min.css\";i:82;s:14:\"code/theme.css\";i:83;s:18:\"code/theme.min.css\";i:84;s:22:\"columns/editor-rtl.css\";i:85;s:26:\"columns/editor-rtl.min.css\";i:86;s:18:\"columns/editor.css\";i:87;s:22:\"columns/editor.min.css\";i:88;s:21:\"columns/style-rtl.css\";i:89;s:25:\"columns/style-rtl.min.css\";i:90;s:17:\"columns/style.css\";i:91;s:21:\"columns/style.min.css\";i:92;s:33:\"comment-author-name/style-rtl.css\";i:93;s:37:\"comment-author-name/style-rtl.min.css\";i:94;s:29:\"comment-author-name/style.css\";i:95;s:33:\"comment-author-name/style.min.css\";i:96;s:29:\"comment-content/style-rtl.css\";i:97;s:33:\"comment-content/style-rtl.min.css\";i:98;s:25:\"comment-content/style.css\";i:99;s:29:\"comment-content/style.min.css\";i:100;s:26:\"comment-date/style-rtl.css\";i:101;s:30:\"comment-date/style-rtl.min.css\";i:102;s:22:\"comment-date/style.css\";i:103;s:26:\"comment-date/style.min.css\";i:104;s:31:\"comment-edit-link/style-rtl.css\";i:105;s:35:\"comment-edit-link/style-rtl.min.css\";i:106;s:27:\"comment-edit-link/style.css\";i:107;s:31:\"comment-edit-link/style.min.css\";i:108;s:32:\"comment-reply-link/style-rtl.css\";i:109;s:36:\"comment-reply-link/style-rtl.min.css\";i:110;s:28:\"comment-reply-link/style.css\";i:111;s:32:\"comment-reply-link/style.min.css\";i:112;s:30:\"comment-template/style-rtl.css\";i:113;s:34:\"comment-template/style-rtl.min.css\";i:114;s:26:\"comment-template/style.css\";i:115;s:30:\"comment-template/style.min.css\";i:116;s:42:\"comments-pagination-numbers/editor-rtl.css\";i:117;s:46:\"comments-pagination-numbers/editor-rtl.min.css\";i:118;s:38:\"comments-pagination-numbers/editor.css\";i:119;s:42:\"comments-pagination-numbers/editor.min.css\";i:120;s:34:\"comments-pagination/editor-rtl.css\";i:121;s:38:\"comments-pagination/editor-rtl.min.css\";i:122;s:30:\"comments-pagination/editor.css\";i:123;s:34:\"comments-pagination/editor.min.css\";i:124;s:33:\"comments-pagination/style-rtl.css\";i:125;s:37:\"comments-pagination/style-rtl.min.css\";i:126;s:29:\"comments-pagination/style.css\";i:127;s:33:\"comments-pagination/style.min.css\";i:128;s:29:\"comments-title/editor-rtl.css\";i:129;s:33:\"comments-title/editor-rtl.min.css\";i:130;s:25:\"comments-title/editor.css\";i:131;s:29:\"comments-title/editor.min.css\";i:132;s:23:\"comments/editor-rtl.css\";i:133;s:27:\"comments/editor-rtl.min.css\";i:134;s:19:\"comments/editor.css\";i:135;s:23:\"comments/editor.min.css\";i:136;s:22:\"comments/style-rtl.css\";i:137;s:26:\"comments/style-rtl.min.css\";i:138;s:18:\"comments/style.css\";i:139;s:22:\"comments/style.min.css\";i:140;s:20:\"cover/editor-rtl.css\";i:141;s:24:\"cover/editor-rtl.min.css\";i:142;s:16:\"cover/editor.css\";i:143;s:20:\"cover/editor.min.css\";i:144;s:19:\"cover/style-rtl.css\";i:145;s:23:\"cover/style-rtl.min.css\";i:146;s:15:\"cover/style.css\";i:147;s:19:\"cover/style.min.css\";i:148;s:22:\"details/editor-rtl.css\";i:149;s:26:\"details/editor-rtl.min.css\";i:150;s:18:\"details/editor.css\";i:151;s:22:\"details/editor.min.css\";i:152;s:21:\"details/style-rtl.css\";i:153;s:25:\"details/style-rtl.min.css\";i:154;s:17:\"details/style.css\";i:155;s:21:\"details/style.min.css\";i:156;s:20:\"embed/editor-rtl.css\";i:157;s:24:\"embed/editor-rtl.min.css\";i:158;s:16:\"embed/editor.css\";i:159;s:20:\"embed/editor.min.css\";i:160;s:19:\"embed/style-rtl.css\";i:161;s:23:\"embed/style-rtl.min.css\";i:162;s:15:\"embed/style.css\";i:163;s:19:\"embed/style.min.css\";i:164;s:19:\"embed/theme-rtl.css\";i:165;s:23:\"embed/theme-rtl.min.css\";i:166;s:15:\"embed/theme.css\";i:167;s:19:\"embed/theme.min.css\";i:168;s:19:\"file/editor-rtl.css\";i:169;s:23:\"file/editor-rtl.min.css\";i:170;s:15:\"file/editor.css\";i:171;s:19:\"file/editor.min.css\";i:172;s:18:\"file/style-rtl.css\";i:173;s:22:\"file/style-rtl.min.css\";i:174;s:14:\"file/style.css\";i:175;s:18:\"file/style.min.css\";i:176;s:23:\"footnotes/style-rtl.css\";i:177;s:27:\"footnotes/style-rtl.min.css\";i:178;s:19:\"footnotes/style.css\";i:179;s:23:\"footnotes/style.min.css\";i:180;s:23:\"freeform/editor-rtl.css\";i:181;s:27:\"freeform/editor-rtl.min.css\";i:182;s:19:\"freeform/editor.css\";i:183;s:23:\"freeform/editor.min.css\";i:184;s:22:\"gallery/editor-rtl.css\";i:185;s:26:\"gallery/editor-rtl.min.css\";i:186;s:18:\"gallery/editor.css\";i:187;s:22:\"gallery/editor.min.css\";i:188;s:21:\"gallery/style-rtl.css\";i:189;s:25:\"gallery/style-rtl.min.css\";i:190;s:17:\"gallery/style.css\";i:191;s:21:\"gallery/style.min.css\";i:192;s:21:\"gallery/theme-rtl.css\";i:193;s:25:\"gallery/theme-rtl.min.css\";i:194;s:17:\"gallery/theme.css\";i:195;s:21:\"gallery/theme.min.css\";i:196;s:20:\"group/editor-rtl.css\";i:197;s:24:\"group/editor-rtl.min.css\";i:198;s:16:\"group/editor.css\";i:199;s:20:\"group/editor.min.css\";i:200;s:19:\"group/style-rtl.css\";i:201;s:23:\"group/style-rtl.min.css\";i:202;s:15:\"group/style.css\";i:203;s:19:\"group/style.min.css\";i:204;s:19:\"group/theme-rtl.css\";i:205;s:23:\"group/theme-rtl.min.css\";i:206;s:15:\"group/theme.css\";i:207;s:19:\"group/theme.min.css\";i:208;s:21:\"heading/style-rtl.css\";i:209;s:25:\"heading/style-rtl.min.css\";i:210;s:17:\"heading/style.css\";i:211;s:21:\"heading/style.min.css\";i:212;s:19:\"html/editor-rtl.css\";i:213;s:23:\"html/editor-rtl.min.css\";i:214;s:15:\"html/editor.css\";i:215;s:19:\"html/editor.min.css\";i:216;s:19:\"icon/editor-rtl.css\";i:217;s:23:\"icon/editor-rtl.min.css\";i:218;s:15:\"icon/editor.css\";i:219;s:19:\"icon/editor.min.css\";i:220;s:18:\"icon/style-rtl.css\";i:221;s:22:\"icon/style-rtl.min.css\";i:222;s:14:\"icon/style.css\";i:223;s:18:\"icon/style.min.css\";i:224;s:20:\"image/editor-rtl.css\";i:225;s:24:\"image/editor-rtl.min.css\";i:226;s:16:\"image/editor.css\";i:227;s:20:\"image/editor.min.css\";i:228;s:19:\"image/style-rtl.css\";i:229;s:23:\"image/style-rtl.min.css\";i:230;s:15:\"image/style.css\";i:231;s:19:\"image/style.min.css\";i:232;s:19:\"image/theme-rtl.css\";i:233;s:23:\"image/theme-rtl.min.css\";i:234;s:15:\"image/theme.css\";i:235;s:19:\"image/theme.min.css\";i:236;s:29:\"latest-comments/style-rtl.css\";i:237;s:33:\"latest-comments/style-rtl.min.css\";i:238;s:25:\"latest-comments/style.css\";i:239;s:29:\"latest-comments/style.min.css\";i:240;s:27:\"latest-posts/editor-rtl.css\";i:241;s:31:\"latest-posts/editor-rtl.min.css\";i:242;s:23:\"latest-posts/editor.css\";i:243;s:27:\"latest-posts/editor.min.css\";i:244;s:26:\"latest-posts/style-rtl.css\";i:245;s:30:\"latest-posts/style-rtl.min.css\";i:246;s:22:\"latest-posts/style.css\";i:247;s:26:\"latest-posts/style.min.css\";i:248;s:18:\"list/style-rtl.css\";i:249;s:22:\"list/style-rtl.min.css\";i:250;s:14:\"list/style.css\";i:251;s:18:\"list/style.min.css\";i:252;s:22:\"loginout/style-rtl.css\";i:253;s:26:\"loginout/style-rtl.min.css\";i:254;s:18:\"loginout/style.css\";i:255;s:22:\"loginout/style.min.css\";i:256;s:19:\"math/editor-rtl.css\";i:257;s:23:\"math/editor-rtl.min.css\";i:258;s:15:\"math/editor.css\";i:259;s:19:\"math/editor.min.css\";i:260;s:18:\"math/style-rtl.css\";i:261;s:22:\"math/style-rtl.min.css\";i:262;s:14:\"math/style.css\";i:263;s:18:\"math/style.min.css\";i:264;s:25:\"media-text/editor-rtl.css\";i:265;s:29:\"media-text/editor-rtl.min.css\";i:266;s:21:\"media-text/editor.css\";i:267;s:25:\"media-text/editor.min.css\";i:268;s:24:\"media-text/style-rtl.css\";i:269;s:28:\"media-text/style-rtl.min.css\";i:270;s:20:\"media-text/style.css\";i:271;s:24:\"media-text/style.min.css\";i:272;s:19:\"more/editor-rtl.css\";i:273;s:23:\"more/editor-rtl.min.css\";i:274;s:15:\"more/editor.css\";i:275;s:19:\"more/editor.min.css\";i:276;s:30:\"navigation-link/editor-rtl.css\";i:277;s:34:\"navigation-link/editor-rtl.min.css\";i:278;s:26:\"navigation-link/editor.css\";i:279;s:30:\"navigation-link/editor.min.css\";i:280;s:29:\"navigation-link/style-rtl.css\";i:281;s:33:\"navigation-link/style-rtl.min.css\";i:282;s:25:\"navigation-link/style.css\";i:283;s:29:\"navigation-link/style.min.css\";i:284;s:38:\"navigation-overlay-close/style-rtl.css\";i:285;s:42:\"navigation-overlay-close/style-rtl.min.css\";i:286;s:34:\"navigation-overlay-close/style.css\";i:287;s:38:\"navigation-overlay-close/style.min.css\";i:288;s:33:\"navigation-submenu/editor-rtl.css\";i:289;s:37:\"navigation-submenu/editor-rtl.min.css\";i:290;s:29:\"navigation-submenu/editor.css\";i:291;s:33:\"navigation-submenu/editor.min.css\";i:292;s:25:\"navigation/editor-rtl.css\";i:293;s:29:\"navigation/editor-rtl.min.css\";i:294;s:21:\"navigation/editor.css\";i:295;s:25:\"navigation/editor.min.css\";i:296;s:24:\"navigation/style-rtl.css\";i:297;s:28:\"navigation/style-rtl.min.css\";i:298;s:20:\"navigation/style.css\";i:299;s:24:\"navigation/style.min.css\";i:300;s:23:\"nextpage/editor-rtl.css\";i:301;s:27:\"nextpage/editor-rtl.min.css\";i:302;s:19:\"nextpage/editor.css\";i:303;s:23:\"nextpage/editor.min.css\";i:304;s:24:\"page-list/editor-rtl.css\";i:305;s:28:\"page-list/editor-rtl.min.css\";i:306;s:20:\"page-list/editor.css\";i:307;s:24:\"page-list/editor.min.css\";i:308;s:23:\"page-list/style-rtl.css\";i:309;s:27:\"page-list/style-rtl.min.css\";i:310;s:19:\"page-list/style.css\";i:311;s:23:\"page-list/style.min.css\";i:312;s:24:\"paragraph/editor-rtl.css\";i:313;s:28:\"paragraph/editor-rtl.min.css\";i:314;s:20:\"paragraph/editor.css\";i:315;s:24:\"paragraph/editor.min.css\";i:316;s:23:\"paragraph/style-rtl.css\";i:317;s:27:\"paragraph/style-rtl.min.css\";i:318;s:19:\"paragraph/style.css\";i:319;s:23:\"paragraph/style.min.css\";i:320;s:28:\"playlist-track/style-rtl.css\";i:321;s:32:\"playlist-track/style-rtl.min.css\";i:322;s:24:\"playlist-track/style.css\";i:323;s:28:\"playlist-track/style.min.css\";i:324;s:23:\"playlist/editor-rtl.css\";i:325;s:27:\"playlist/editor-rtl.min.css\";i:326;s:19:\"playlist/editor.css\";i:327;s:23:\"playlist/editor.min.css\";i:328;s:22:\"playlist/style-rtl.css\";i:329;s:26:\"playlist/style-rtl.min.css\";i:330;s:18:\"playlist/style.css\";i:331;s:22:\"playlist/style.min.css\";i:332;s:35:\"post-author-biography/style-rtl.css\";i:333;s:39:\"post-author-biography/style-rtl.min.css\";i:334;s:31:\"post-author-biography/style.css\";i:335;s:35:\"post-author-biography/style.min.css\";i:336;s:30:\"post-author-name/style-rtl.css\";i:337;s:34:\"post-author-name/style-rtl.min.css\";i:338;s:26:\"post-author-name/style.css\";i:339;s:30:\"post-author-name/style.min.css\";i:340;s:26:\"post-author/editor-rtl.css\";i:341;s:30:\"post-author/editor-rtl.min.css\";i:342;s:22:\"post-author/editor.css\";i:343;s:26:\"post-author/editor.min.css\";i:344;s:25:\"post-author/style-rtl.css\";i:345;s:29:\"post-author/style-rtl.min.css\";i:346;s:21:\"post-author/style.css\";i:347;s:25:\"post-author/style.min.css\";i:348;s:33:\"post-comments-count/style-rtl.css\";i:349;s:37:\"post-comments-count/style-rtl.min.css\";i:350;s:29:\"post-comments-count/style.css\";i:351;s:33:\"post-comments-count/style.min.css\";i:352;s:33:\"post-comments-form/editor-rtl.css\";i:353;s:37:\"post-comments-form/editor-rtl.min.css\";i:354;s:29:\"post-comments-form/editor.css\";i:355;s:33:\"post-comments-form/editor.min.css\";i:356;s:32:\"post-comments-form/style-rtl.css\";i:357;s:36:\"post-comments-form/style-rtl.min.css\";i:358;s:28:\"post-comments-form/style.css\";i:359;s:32:\"post-comments-form/style.min.css\";i:360;s:32:\"post-comments-link/style-rtl.css\";i:361;s:36:\"post-comments-link/style-rtl.min.css\";i:362;s:28:\"post-comments-link/style.css\";i:363;s:32:\"post-comments-link/style.min.css\";i:364;s:26:\"post-content/style-rtl.css\";i:365;s:30:\"post-content/style-rtl.min.css\";i:366;s:22:\"post-content/style.css\";i:367;s:26:\"post-content/style.min.css\";i:368;s:23:\"post-date/style-rtl.css\";i:369;s:27:\"post-date/style-rtl.min.css\";i:370;s:19:\"post-date/style.css\";i:371;s:23:\"post-date/style.min.css\";i:372;s:27:\"post-excerpt/editor-rtl.css\";i:373;s:31:\"post-excerpt/editor-rtl.min.css\";i:374;s:23:\"post-excerpt/editor.css\";i:375;s:27:\"post-excerpt/editor.min.css\";i:376;s:26:\"post-excerpt/style-rtl.css\";i:377;s:30:\"post-excerpt/style-rtl.min.css\";i:378;s:22:\"post-excerpt/style.css\";i:379;s:26:\"post-excerpt/style.min.css\";i:380;s:34:\"post-featured-image/editor-rtl.css\";i:381;s:38:\"post-featured-image/editor-rtl.min.css\";i:382;s:30:\"post-featured-image/editor.css\";i:383;s:34:\"post-featured-image/editor.min.css\";i:384;s:33:\"post-featured-image/style-rtl.css\";i:385;s:37:\"post-featured-image/style-rtl.min.css\";i:386;s:29:\"post-featured-image/style.css\";i:387;s:33:\"post-featured-image/style.min.css\";i:388;s:34:\"post-navigation-link/style-rtl.css\";i:389;s:38:\"post-navigation-link/style-rtl.min.css\";i:390;s:30:\"post-navigation-link/style.css\";i:391;s:34:\"post-navigation-link/style.min.css\";i:392;s:27:\"post-template/style-rtl.css\";i:393;s:31:\"post-template/style-rtl.min.css\";i:394;s:23:\"post-template/style.css\";i:395;s:27:\"post-template/style.min.css\";i:396;s:24:\"post-terms/style-rtl.css\";i:397;s:28:\"post-terms/style-rtl.min.css\";i:398;s:20:\"post-terms/style.css\";i:399;s:24:\"post-terms/style.min.css\";i:400;s:31:\"post-time-to-read/style-rtl.css\";i:401;s:35:\"post-time-to-read/style-rtl.min.css\";i:402;s:27:\"post-time-to-read/style.css\";i:403;s:31:\"post-time-to-read/style.min.css\";i:404;s:24:\"post-title/style-rtl.css\";i:405;s:28:\"post-title/style-rtl.min.css\";i:406;s:20:\"post-title/style.css\";i:407;s:24:\"post-title/style.min.css\";i:408;s:26:\"preformatted/style-rtl.css\";i:409;s:30:\"preformatted/style-rtl.min.css\";i:410;s:22:\"preformatted/style.css\";i:411;s:26:\"preformatted/style.min.css\";i:412;s:24:\"pullquote/editor-rtl.css\";i:413;s:28:\"pullquote/editor-rtl.min.css\";i:414;s:20:\"pullquote/editor.css\";i:415;s:24:\"pullquote/editor.min.css\";i:416;s:23:\"pullquote/style-rtl.css\";i:417;s:27:\"pullquote/style-rtl.min.css\";i:418;s:19:\"pullquote/style.css\";i:419;s:23:\"pullquote/style.min.css\";i:420;s:23:\"pullquote/theme-rtl.css\";i:421;s:27:\"pullquote/theme-rtl.min.css\";i:422;s:19:\"pullquote/theme.css\";i:423;s:23:\"pullquote/theme.min.css\";i:424;s:39:\"query-pagination-numbers/editor-rtl.css\";i:425;s:43:\"query-pagination-numbers/editor-rtl.min.css\";i:426;s:35:\"query-pagination-numbers/editor.css\";i:427;s:39:\"query-pagination-numbers/editor.min.css\";i:428;s:31:\"query-pagination/editor-rtl.css\";i:429;s:35:\"query-pagination/editor-rtl.min.css\";i:430;s:27:\"query-pagination/editor.css\";i:431;s:31:\"query-pagination/editor.min.css\";i:432;s:30:\"query-pagination/style-rtl.css\";i:433;s:34:\"query-pagination/style-rtl.min.css\";i:434;s:26:\"query-pagination/style.css\";i:435;s:30:\"query-pagination/style.min.css\";i:436;s:25:\"query-title/style-rtl.css\";i:437;s:29:\"query-title/style-rtl.min.css\";i:438;s:21:\"query-title/style.css\";i:439;s:25:\"query-title/style.min.css\";i:440;s:25:\"query-total/style-rtl.css\";i:441;s:29:\"query-total/style-rtl.min.css\";i:442;s:21:\"query-total/style.css\";i:443;s:25:\"query-total/style.min.css\";i:444;s:20:\"query/editor-rtl.css\";i:445;s:24:\"query/editor-rtl.min.css\";i:446;s:16:\"query/editor.css\";i:447;s:20:\"query/editor.min.css\";i:448;s:19:\"quote/style-rtl.css\";i:449;s:23:\"quote/style-rtl.min.css\";i:450;s:15:\"quote/style.css\";i:451;s:19:\"quote/style.min.css\";i:452;s:19:\"quote/theme-rtl.css\";i:453;s:23:\"quote/theme-rtl.min.css\";i:454;s:15:\"quote/theme.css\";i:455;s:19:\"quote/theme.min.css\";i:456;s:23:\"read-more/style-rtl.css\";i:457;s:27:\"read-more/style-rtl.min.css\";i:458;s:19:\"read-more/style.css\";i:459;s:23:\"read-more/style.min.css\";i:460;s:18:\"rss/editor-rtl.css\";i:461;s:22:\"rss/editor-rtl.min.css\";i:462;s:14:\"rss/editor.css\";i:463;s:18:\"rss/editor.min.css\";i:464;s:17:\"rss/style-rtl.css\";i:465;s:21:\"rss/style-rtl.min.css\";i:466;s:13:\"rss/style.css\";i:467;s:17:\"rss/style.min.css\";i:468;s:21:\"search/editor-rtl.css\";i:469;s:25:\"search/editor-rtl.min.css\";i:470;s:17:\"search/editor.css\";i:471;s:21:\"search/editor.min.css\";i:472;s:20:\"search/style-rtl.css\";i:473;s:24:\"search/style-rtl.min.css\";i:474;s:16:\"search/style.css\";i:475;s:20:\"search/style.min.css\";i:476;s:20:\"search/theme-rtl.css\";i:477;s:24:\"search/theme-rtl.min.css\";i:478;s:16:\"search/theme.css\";i:479;s:20:\"search/theme.min.css\";i:480;s:24:\"separator/editor-rtl.css\";i:481;s:28:\"separator/editor-rtl.min.css\";i:482;s:20:\"separator/editor.css\";i:483;s:24:\"separator/editor.min.css\";i:484;s:23:\"separator/style-rtl.css\";i:485;s:27:\"separator/style-rtl.min.css\";i:486;s:19:\"separator/style.css\";i:487;s:23:\"separator/style.min.css\";i:488;s:23:\"separator/theme-rtl.css\";i:489;s:27:\"separator/theme-rtl.min.css\";i:490;s:19:\"separator/theme.css\";i:491;s:23:\"separator/theme.min.css\";i:492;s:24:\"shortcode/editor-rtl.css\";i:493;s:28:\"shortcode/editor-rtl.min.css\";i:494;s:20:\"shortcode/editor.css\";i:495;s:24:\"shortcode/editor.min.css\";i:496;s:24:\"site-logo/editor-rtl.css\";i:497;s:28:\"site-logo/editor-rtl.min.css\";i:498;s:20:\"site-logo/editor.css\";i:499;s:24:\"site-logo/editor.min.css\";i:500;s:23:\"site-logo/style-rtl.css\";i:501;s:27:\"site-logo/style-rtl.min.css\";i:502;s:19:\"site-logo/style.css\";i:503;s:23:\"site-logo/style.min.css\";i:504;s:27:\"site-tagline/editor-rtl.css\";i:505;s:31:\"site-tagline/editor-rtl.min.css\";i:506;s:23:\"site-tagline/editor.css\";i:507;s:27:\"site-tagline/editor.min.css\";i:508;s:26:\"site-tagline/style-rtl.css\";i:509;s:30:\"site-tagline/style-rtl.min.css\";i:510;s:22:\"site-tagline/style.css\";i:511;s:26:\"site-tagline/style.min.css\";i:512;s:25:\"site-title/editor-rtl.css\";i:513;s:29:\"site-title/editor-rtl.min.css\";i:514;s:21:\"site-title/editor.css\";i:515;s:25:\"site-title/editor.min.css\";i:516;s:24:\"site-title/style-rtl.css\";i:517;s:28:\"site-title/style-rtl.min.css\";i:518;s:20:\"site-title/style.css\";i:519;s:24:\"site-title/style.min.css\";i:520;s:26:\"social-link/editor-rtl.css\";i:521;s:30:\"social-link/editor-rtl.min.css\";i:522;s:22:\"social-link/editor.css\";i:523;s:26:\"social-link/editor.min.css\";i:524;s:27:\"social-links/editor-rtl.css\";i:525;s:31:\"social-links/editor-rtl.min.css\";i:526;s:23:\"social-links/editor.css\";i:527;s:27:\"social-links/editor.min.css\";i:528;s:26:\"social-links/style-rtl.css\";i:529;s:30:\"social-links/style-rtl.min.css\";i:530;s:22:\"social-links/style.css\";i:531;s:26:\"social-links/style.min.css\";i:532;s:21:\"spacer/editor-rtl.css\";i:533;s:25:\"spacer/editor-rtl.min.css\";i:534;s:17:\"spacer/editor.css\";i:535;s:21:\"spacer/editor.min.css\";i:536;s:20:\"spacer/style-rtl.css\";i:537;s:24:\"spacer/style-rtl.min.css\";i:538;s:16:\"spacer/style.css\";i:539;s:20:\"spacer/style.min.css\";i:540;s:23:\"tab-list/editor-rtl.css\";i:541;s:27:\"tab-list/editor-rtl.min.css\";i:542;s:19:\"tab-list/editor.css\";i:543;s:23:\"tab-list/editor.min.css\";i:544;s:22:\"tab-list/style-rtl.css\";i:545;s:26:\"tab-list/style-rtl.min.css\";i:546;s:18:\"tab-list/style.css\";i:547;s:22:\"tab-list/style.min.css\";i:548;s:23:\"tab-panel/style-rtl.css\";i:549;s:27:\"tab-panel/style-rtl.min.css\";i:550;s:19:\"tab-panel/style.css\";i:551;s:23:\"tab-panel/style.min.css\";i:552;s:20:\"table/editor-rtl.css\";i:553;s:24:\"table/editor-rtl.min.css\";i:554;s:16:\"table/editor.css\";i:555;s:20:\"table/editor.min.css\";i:556;s:19:\"table/style-rtl.css\";i:557;s:23:\"table/style-rtl.min.css\";i:558;s:15:\"table/style.css\";i:559;s:19:\"table/style.min.css\";i:560;s:19:\"table/theme-rtl.css\";i:561;s:23:\"table/theme-rtl.min.css\";i:562;s:15:\"table/theme.css\";i:563;s:19:\"table/theme.min.css\";i:564;s:18:\"tabs/style-rtl.css\";i:565;s:22:\"tabs/style-rtl.min.css\";i:566;s:14:\"tabs/style.css\";i:567;s:18:\"tabs/style.min.css\";i:568;s:23:\"tag-cloud/style-rtl.css\";i:569;s:27:\"tag-cloud/style-rtl.min.css\";i:570;s:19:\"tag-cloud/style.css\";i:571;s:23:\"tag-cloud/style.min.css\";i:572;s:28:\"template-part/editor-rtl.css\";i:573;s:32:\"template-part/editor-rtl.min.css\";i:574;s:24:\"template-part/editor.css\";i:575;s:28:\"template-part/editor.min.css\";i:576;s:27:\"template-part/theme-rtl.css\";i:577;s:31:\"template-part/theme-rtl.min.css\";i:578;s:23:\"template-part/theme.css\";i:579;s:27:\"template-part/theme.min.css\";i:580;s:24:\"term-count/style-rtl.css\";i:581;s:28:\"term-count/style-rtl.min.css\";i:582;s:20:\"term-count/style.css\";i:583;s:24:\"term-count/style.min.css\";i:584;s:30:\"term-description/style-rtl.css\";i:585;s:34:\"term-description/style-rtl.min.css\";i:586;s:26:\"term-description/style.css\";i:587;s:30:\"term-description/style.min.css\";i:588;s:23:\"term-name/style-rtl.css\";i:589;s:27:\"term-name/style-rtl.min.css\";i:590;s:19:\"term-name/style.css\";i:591;s:23:\"term-name/style.min.css\";i:592;s:28:\"term-template/editor-rtl.css\";i:593;s:32:\"term-template/editor-rtl.min.css\";i:594;s:24:\"term-template/editor.css\";i:595;s:28:\"term-template/editor.min.css\";i:596;s:27:\"term-template/style-rtl.css\";i:597;s:31:\"term-template/style-rtl.min.css\";i:598;s:23:\"term-template/style.css\";i:599;s:27:\"term-template/style.min.css\";i:600;s:27:\"text-columns/editor-rtl.css\";i:601;s:31:\"text-columns/editor-rtl.min.css\";i:602;s:23:\"text-columns/editor.css\";i:603;s:27:\"text-columns/editor.min.css\";i:604;s:26:\"text-columns/style-rtl.css\";i:605;s:30:\"text-columns/style-rtl.min.css\";i:606;s:22:\"text-columns/style.css\";i:607;s:26:\"text-columns/style.min.css\";i:608;s:19:\"verse/style-rtl.css\";i:609;s:23:\"verse/style-rtl.min.css\";i:610;s:15:\"verse/style.css\";i:611;s:19:\"verse/style.min.css\";i:612;s:20:\"video/editor-rtl.css\";i:613;s:24:\"video/editor-rtl.min.css\";i:614;s:16:\"video/editor.css\";i:615;s:20:\"video/editor.min.css\";i:616;s:19:\"video/style-rtl.css\";i:617;s:23:\"video/style-rtl.min.css\";i:618;s:15:\"video/style.css\";i:619;s:19:\"video/style.min.css\";i:620;s:19:\"video/theme-rtl.css\";i:621;s:23:\"video/theme-rtl.min.css\";i:622;s:15:\"video/theme.css\";i:623;s:19:\"video/theme.min.css\";}}', 'on'), (126, 'nonce_key', 'OlU&GZfR d~k93.*fa$CHsw7_c*5+^*KERjU!*}j2UPGAsH< :)C`DSHd{fcHF}$', 'off'), (127, 'nonce_salt', 'Z-0Ya0&RL->fFyr/IxL(A$@zJ~1_s1gj>%AuPv&0, 1d:@,ftA>$VOq), M[%(n!', 'off'), @@ -538,7 +558,7 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (176, 'theme_switched', '', 'auto'), (180, 'theme_mods_xmartica', 'a:3:{i:0;b:0;s:18:\"nav_menu_locations\";a:1:{s:7:\"primary\";i:10;}s:18:\"custom_css_post_id\";i:-1;}', 'on'), (185, '_site_transient_wp_plugin_dependencies_plugin_data', 'a:0:{}', 'off'), -(186, 'recently_activated', 'a:0:{}', 'off'), +(186, 'recently_activated', 'a:2:{s:46:\"brozzme-db-prefix-change/brozzme_db_prefix.php\";i:1791817598;s:21:\"polylang/polylang.php\";i:1791559548;}', 'off'), (193, 'alcastromol_comments_done', '1', 'auto'), (194, 'alcastromol_general_done', '1', 'auto'), (202, 'jooosi_fon_legacy_migration_history_upgraded', '1.1.4', 'off'), @@ -549,7 +569,8 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (209, 'schema-ActionScheduler_LoggerSchema', '3.0.1790809892', 'auto'), (210, 'rank_math_known_post_types', 'a:3:{s:4:\"post\";s:4:\"post\";s:4:\"page\";s:4:\"page\";s:10:\"attachment\";s:10:\"attachment\";}', 'auto'), (211, 'rank_math_modules', 'a:13:{i:0;s:12:\"link-counter\";i:1;s:9:\"analytics\";i:2;s:12:\"seo-analysis\";i:3;s:7:\"sitemap\";i:4;s:12:\"rich-snippet\";i:5;s:11:\"woocommerce\";i:6;s:10:\"buddypress\";i:7;s:7:\"bbpress\";i:8;s:3:\"acf\";i:9;s:11:\"web-stories\";i:10;s:10:\"content-ai\";i:11;s:16:\"instant-indexing\";i:12;s:13:\"ai-visibility\";}', 'auto'), -(212, 'rank-math-options-general', 'a:47:{s:19:\"strip_category_base\";s:3:\"off\";s:24:\"attachment_redirect_urls\";s:2:\"on\";s:27:\"attachment_redirect_default\";s:20:\"https://xmartica.xyz\";s:23:\"nofollow_external_links\";s:3:\"off\";s:20:\"nofollow_image_links\";s:3:\"off\";s:25:\"new_window_external_links\";s:2:\"on\";s:11:\"add_img_alt\";s:3:\"off\";s:14:\"img_alt_format\";s:11:\" %filename%\";s:13:\"add_img_title\";s:3:\"off\";s:16:\"img_title_format\";s:22:\"%title% %count(title)%\";s:11:\"breadcrumbs\";s:3:\"off\";s:21:\"breadcrumbs_separator\";s:1:\"-\";s:16:\"breadcrumbs_home\";s:2:\"on\";s:22:\"breadcrumbs_home_label\";s:4:\"Home\";s:26:\"breadcrumbs_archive_format\";s:15:\"Archives for %s\";s:25:\"breadcrumbs_search_format\";s:14:\"Results for %s\";s:21:\"breadcrumbs_404_label\";s:25:\"404 Error: page not found\";s:31:\"breadcrumbs_ancestor_categories\";s:3:\"off\";s:21:\"breadcrumbs_blog_page\";s:3:\"off\";s:16:\"404_monitor_mode\";s:6:\"simple\";s:17:\"404_monitor_limit\";i:100;s:35:\"404_monitor_ignore_query_parameters\";s:2:\"on\";s:24:\"redirections_header_code\";s:3:\"301\";s:18:\"redirections_debug\";s:3:\"off\";s:23:\"console_caching_control\";s:2:\"90\";s:21:\"console_email_reports\";s:2:\"on\";s:23:\"console_email_frequency\";s:7:\"monthly\";s:22:\"wc_remove_product_base\";s:3:\"off\";s:23:\"wc_remove_category_base\";s:3:\"off\";s:31:\"wc_remove_category_parent_slugs\";s:3:\"off\";s:18:\"rss_before_content\";s:0:\"\";s:17:\"rss_after_content\";s:0:\"\";s:19:\"wc_remove_generator\";s:2:\"on\";s:24:\"remove_shop_snippet_data\";s:2:\"on\";s:18:\"frontend_seo_score\";s:3:\"off\";s:29:\"frontend_seo_score_post_types\";a:1:{i:0;s:4:\"post\";}s:27:\"frontend_seo_score_position\";s:3:\"top\";s:10:\"setup_mode\";s:8:\"advanced\";s:21:\"content_ai_post_types\";a:2:{i:0;s:4:\"post\";i:1;s:4:\"page\";}s:18:\"content_ai_country\";s:3:\"all\";s:15:\"content_ai_tone\";s:6:\"Formal\";s:19:\"content_ai_audience\";s:16:\"General Audience\";s:19:\"content_ai_language\";s:7:\"Spanish\";s:15:\"analytics_stats\";s:2:\"on\";s:15:\"toc_block_title\";s:17:\"Table of Contents\";s:20:\"toc_block_list_style\";s:2:\"ul\";s:15:\"llms_post_types\";a:2:{i:0;s:4:\"post\";i:1;s:4:\"page\";}}', 'auto'), +(212, 'rank-math-options-general', 'a:47:{s:19:\"strip_category_base\";s:3:\"off\";s:24:\"attachment_redirect_urls\";s:2:\"on\";s:27:\"attachment_redirect_default\";s:20:\"https://xmartica.xyz\";s:23:\"nofollow_external_links\";s:3:\"off\";s:20:\"nofollow_image_links\";s:3:\"off\";s:25:\"new_window_external_links\";s:2:\"on\";s:11:\"add_img_alt\";s:3:\"off\";s:14:\"img_alt_format\";s:11:\" %filename%\";s:13:\"add_img_title\";s:3:\"off\";s:16:\"img_title_format\";s:22:\"%title% %count(title)%\";s:11:\"breadcrumbs\";s:3:\"off\";s:21:\"breadcrumbs_separator\";s:1:\"-\";s:16:\"breadcrumbs_home\";s:2:\"on\";s:22:\"breadcrumbs_home_label\";s:4:\"Home\";s:26:\"breadcrumbs_archive_format\";s:15:\"Archives for %s\";s:25:\"breadcrumbs_search_format\";s:14:\"Results for %s\";s:21:\"breadcrumbs_404_label\";s:25:\"404 Error: page not found\";s:31:\"breadcrumbs_ancestor_categories\";s:3:\"off\";s:21:\"breadcrumbs_blog_page\";s:3:\"off\";s:16:\"404_monitor_mode\";s:6:\"simple\";s:17:\"404_monitor_limit\";i:100;s:35:\"404_monitor_ignore_query_parameters\";s:2:\"on\";s:24:\"redirections_header_code\";s:3:\"301\";s:18:\"redirections_debug\";s:3:\"off\";s:23:\"console_caching_control\";s:2:\"90\";s:21:\"console_email_reports\";s:2:\"on\";s:23:\"console_email_frequency\";s:7:\"monthly\";s:22:\"wc_remove_product_base\";s:3:\"off\";s:23:\"wc_remove_category_base\";s:3:\"off\";s:31:\"wc_remove_category_parent_slugs\";s:3:\"off\";s:18:\"rss_before_content\";s:0:\"\";s:17:\"rss_after_content\";s:0:\"\";s:19:\"wc_remove_generator\";s:2:\"on\";s:24:\"remove_shop_snippet_data\";s:2:\"on\";s:18:\"frontend_seo_score\";s:3:\"off\";s:29:\"frontend_seo_score_post_types\";a:1:{i:0;s:4:\"post\";}s:27:\"frontend_seo_score_position\";s:3:\"top\";s:10:\"setup_mode\";s:8:\"advanced\";s:21:\"content_ai_post_types\";a:2:{i:0;s:4:\"post\";i:1;s:4:\"page\";}s:18:\"content_ai_country\";s:3:\"all\";s:15:\"content_ai_tone\";s:6:\"Formal\";s:19:\"content_ai_audience\";s:16:\"General Audience\";s:19:\"content_ai_language\";s:7:\"Spanish\";s:15:\"analytics_stats\";s:2:\"on\";s:15:\"toc_block_title\";s:17:\"Table of Contents\";s:20:\"toc_block_list_style\";s:2:\"ul\";s:15:\"llms_post_types\";a:2:{i:0;s:4:\"post\";i:1;s:4:\"page\";}}', 'auto'); +INSERT INTO `xm_aca_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES (213, 'rank-math-options-titles', 'a:107:{s:24:\"noindex_empty_taxonomies\";s:2:\"on\";s:15:\"title_separator\";s:1:\"-\";s:17:\"capitalize_titles\";s:3:\"off\";s:17:\"twitter_card_type\";s:19:\"summary_large_image\";s:19:\"knowledgegraph_type\";s:6:\"person\";s:19:\"knowledgegraph_name\";s:8:\"Xmartica\";s:12:\"website_name\";s:8:\"Xmartica\";s:19:\"local_business_type\";s:12:\"Organization\";s:20:\"local_address_format\";s:43:\"{address} {locality}, {region} {postalcode}\";s:13:\"opening_hours\";a:7:{i:0;a:2:{s:3:\"day\";s:6:\"Monday\";s:4:\"time\";s:11:\"09:00-17:00\";}i:1;a:2:{s:3:\"day\";s:7:\"Tuesday\";s:4:\"time\";s:11:\"09:00-17:00\";}i:2;a:2:{s:3:\"day\";s:9:\"Wednesday\";s:4:\"time\";s:11:\"09:00-17:00\";}i:3;a:2:{s:3:\"day\";s:8:\"Thursday\";s:4:\"time\";s:11:\"09:00-17:00\";}i:4;a:2:{s:3:\"day\";s:6:\"Friday\";s:4:\"time\";s:11:\"09:00-17:00\";}i:5;a:2:{s:3:\"day\";s:8:\"Saturday\";s:4:\"time\";s:11:\"09:00-17:00\";}i:6;a:2:{s:3:\"day\";s:6:\"Sunday\";s:4:\"time\";s:11:\"09:00-17:00\";}}s:20:\"opening_hours_format\";s:3:\"off\";s:14:\"homepage_title\";s:34:\"%sitename% %page% %sep% %sitedesc%\";s:20:\"homepage_description\";s:0:\"\";s:22:\"homepage_custom_robots\";s:3:\"off\";s:23:\"disable_author_archives\";s:3:\"off\";s:15:\"url_author_base\";s:6:\"author\";s:20:\"author_custom_robots\";s:2:\"on\";s:13:\"author_robots\";a:1:{i:0;s:7:\"noindex\";}s:20:\"author_archive_title\";s:30:\"%name% %sep% %sitename% %page%\";s:19:\"author_add_meta_box\";s:2:\"on\";s:21:\"disable_date_archives\";s:2:\"on\";s:18:\"date_archive_title\";s:30:\"%date% %page% %sep% %sitename%\";s:12:\"search_title\";s:38:\"%search_query% %page% %sep% %sitename%\";s:9:\"404_title\";s:31:\"Page Not Found %sep% %sitename%\";s:19:\"date_archive_robots\";a:1:{i:0;s:7:\"noindex\";}s:14:\"noindex_search\";s:2:\"on\";s:24:\"noindex_archive_subpages\";s:3:\"off\";s:26:\"noindex_password_protected\";s:3:\"off\";s:32:\"pt_download_default_rich_snippet\";s:7:\"product\";s:29:\"author_slack_enhanced_sharing\";s:2:\"on\";s:13:\"pt_post_title\";s:24:\"%title% %sep% %sitename%\";s:19:\"pt_post_description\";s:9:\"%excerpt%\";s:14:\"pt_post_robots\";a:1:{i:0;s:5:\"index\";}s:21:\"pt_post_custom_robots\";s:3:\"off\";s:28:\"pt_post_default_rich_snippet\";s:7:\"article\";s:28:\"pt_post_default_article_type\";s:11:\"BlogPosting\";s:28:\"pt_post_default_snippet_name\";s:11:\"%seo_title%\";s:28:\"pt_post_default_snippet_desc\";s:17:\"%seo_description%\";s:30:\"pt_post_slack_enhanced_sharing\";s:2:\"on\";s:17:\"pt_post_ls_use_fk\";s:6:\"titles\";s:20:\"pt_post_add_meta_box\";s:2:\"on\";s:20:\"pt_post_bulk_editing\";s:7:\"editing\";s:24:\"pt_post_link_suggestions\";s:2:\"on\";s:24:\"pt_post_primary_taxonomy\";s:8:\"category\";s:13:\"pt_page_title\";s:24:\"%title% %sep% %sitename%\";s:19:\"pt_page_description\";s:9:\"%excerpt%\";s:14:\"pt_page_robots\";a:1:{i:0;s:5:\"index\";}s:21:\"pt_page_custom_robots\";s:3:\"off\";s:28:\"pt_page_default_rich_snippet\";s:7:\"article\";s:28:\"pt_page_default_article_type\";s:7:\"Article\";s:28:\"pt_page_default_snippet_name\";s:11:\"%seo_title%\";s:28:\"pt_page_default_snippet_desc\";s:17:\"%seo_description%\";s:30:\"pt_page_slack_enhanced_sharing\";s:2:\"on\";s:17:\"pt_page_ls_use_fk\";s:6:\"titles\";s:20:\"pt_page_add_meta_box\";s:2:\"on\";s:20:\"pt_page_bulk_editing\";s:7:\"editing\";s:24:\"pt_page_link_suggestions\";s:2:\"on\";s:19:\"pt_attachment_title\";s:24:\"%title% %sep% %sitename%\";s:25:\"pt_attachment_description\";s:9:\"%excerpt%\";s:20:\"pt_attachment_robots\";a:1:{i:0;s:7:\"noindex\";}s:27:\"pt_attachment_custom_robots\";s:2:\"on\";s:34:\"pt_attachment_default_rich_snippet\";s:3:\"off\";s:34:\"pt_attachment_default_article_type\";s:7:\"Article\";s:34:\"pt_attachment_default_snippet_name\";s:11:\"%seo_title%\";s:34:\"pt_attachment_default_snippet_desc\";s:17:\"%seo_description%\";s:36:\"pt_attachment_slack_enhanced_sharing\";s:3:\"off\";s:26:\"pt_attachment_add_meta_box\";s:3:\"off\";s:16:\"pt_product_title\";s:24:\"%title% %sep% %sitename%\";s:22:\"pt_product_description\";s:9:\"%excerpt%\";s:17:\"pt_product_robots\";a:1:{i:0;s:5:\"index\";}s:24:\"pt_product_custom_robots\";s:3:\"off\";s:31:\"pt_product_default_rich_snippet\";s:7:\"product\";s:31:\"pt_product_default_article_type\";s:7:\"Article\";s:31:\"pt_product_default_snippet_name\";s:11:\"%seo_title%\";s:31:\"pt_product_default_snippet_desc\";s:17:\"%seo_description%\";s:33:\"pt_product_slack_enhanced_sharing\";s:2:\"on\";s:20:\"pt_product_ls_use_fk\";s:6:\"titles\";s:23:\"pt_product_add_meta_box\";s:2:\"on\";s:23:\"pt_product_bulk_editing\";s:7:\"editing\";s:27:\"pt_product_link_suggestions\";s:2:\"on\";s:27:\"pt_product_primary_taxonomy\";s:11:\"product_cat\";s:18:\"pt_web-story_title\";s:24:\"%title% %sep% %sitename%\";s:24:\"pt_web-story_description\";s:9:\"%excerpt%\";s:19:\"pt_web-story_robots\";a:1:{i:0;s:5:\"index\";}s:26:\"pt_web-story_custom_robots\";s:3:\"off\";s:33:\"pt_web-story_default_rich_snippet\";s:7:\"article\";s:33:\"pt_web-story_default_article_type\";s:7:\"Article\";s:33:\"pt_web-story_default_snippet_name\";s:11:\"%seo_title%\";s:33:\"pt_web-story_default_snippet_desc\";s:17:\"%seo_description%\";s:35:\"pt_web-story_slack_enhanced_sharing\";s:3:\"off\";s:25:\"pt_web-story_add_meta_box\";s:3:\"off\";s:18:\"tax_category_title\";s:23:\"%term% %sep% %sitename%\";s:19:\"tax_category_robots\";a:1:{i:0;s:5:\"index\";}s:25:\"tax_category_add_meta_box\";s:2:\"on\";s:26:\"tax_category_custom_robots\";s:3:\"off\";s:24:\"tax_category_description\";s:18:\"%term_description%\";s:35:\"tax_category_slack_enhanced_sharing\";s:2:\"on\";s:25:\"tax_category_bulk_editing\";i:0;s:18:\"tax_post_tag_title\";s:23:\"%term% %sep% %sitename%\";s:19:\"tax_post_tag_robots\";a:1:{i:0;s:7:\"noindex\";}s:25:\"tax_post_tag_add_meta_box\";s:3:\"off\";s:26:\"tax_post_tag_custom_robots\";s:2:\"on\";s:24:\"tax_post_tag_description\";s:18:\"%term_description%\";s:35:\"tax_post_tag_slack_enhanced_sharing\";s:2:\"on\";s:25:\"tax_post_tag_bulk_editing\";i:0;s:31:\"remove_product_cat_snippet_data\";s:2:\"on\";s:31:\"remove_product_tag_snippet_data\";s:2:\"on\";}', 'auto'), (214, 'rank-math-options-sitemap', 'a:16:{s:14:\"items_per_page\";i:200;s:14:\"include_images\";s:2:\"on\";s:22:\"include_featured_image\";s:3:\"off\";s:13:\"exclude_roles\";a:2:{i:0;s:11:\"contributor\";i:1;s:10:\"subscriber\";}s:12:\"html_sitemap\";s:2:\"on\";s:20:\"html_sitemap_display\";s:9:\"shortcode\";s:17:\"html_sitemap_sort\";s:9:\"published\";s:23:\"html_sitemap_seo_titles\";s:6:\"titles\";s:15:\"authors_sitemap\";s:2:\"on\";s:15:\"pt_post_sitemap\";s:2:\"on\";s:15:\"pt_page_sitemap\";s:2:\"on\";s:21:\"pt_attachment_sitemap\";s:3:\"off\";s:18:\"pt_product_sitemap\";s:2:\"on\";s:20:\"pt_web-story_sitemap\";s:3:\"off\";s:20:\"tax_category_sitemap\";s:2:\"on\";s:20:\"tax_post_tag_sitemap\";s:3:\"off\";}', 'auto'), (215, 'rank-math-options-instant-indexing', 'a:2:{s:15:\"bing_post_types\";a:2:{i:0;s:4:\"post\";i:1;s:4:\"page\";}s:16:\"indexnow_api_key\";s:32:\"7059b7899e5544bcaf871b65364d1f88\";}', 'auto'), @@ -560,12 +581,10 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (228, 'wpcode_usage_tracking_config', 'a:6:{s:3:\"day\";i:2;s:4:\"hour\";i:7;s:6:\"minute\";i:0;s:6:\"second\";i:33;s:6:\"offset\";i:198033;s:8:\"initsend\";i:1791270033;}', 'off'), (229, 'mcp_jwt_secret', '5389d11ebfa05c75a9c6c91507f6b45c10f5b027294bf4af8d6af5f222e1372c', 'off'), (232, 'wpmedia_mcp_oauth_rewrite_version', '1', 'off'), -(233, 'rank_math_notifications', 'a:1:{i:0;a:2:{s:7:\"message\";s:215:\"SEO Notice: Your site is set to No Index and will not appear in search engines. You can change the Search engine visibility from here.\";s:7:\"options\";a:5:{s:2:\"id\";s:24:\"search_engine_visibility\";s:7:\"classes\";s:31:\"is-dismissible rank-math-notice\";s:4:\"type\";s:7:\"warning\";s:6:\"screen\";s:3:\"any\";s:10:\"capability\";s:0:\"\";}}}', 'auto'), +(233, 'rank_math_notifications', 'a:2:{i:0;a:2:{s:7:\"message\";s:215:\"SEO Notice: Your site is set to No Index and will not appear in search engines. You can change the Search engine visibility from here.\";s:7:\"options\";a:5:{s:2:\"id\";s:24:\"search_engine_visibility\";s:7:\"classes\";s:31:\"is-dismissible rank-math-notice\";s:4:\"type\";s:7:\"warning\";s:6:\"screen\";s:3:\"any\";s:10:\"capability\";s:0:\"\";}}i:1;a:2:{s:7:\"message\";s:917:\"

Posiciona tu contenido con el poder de PRO y A.I.

\n Sí, quiero un mejor SEONo, quizás más tardeYa lo compré\n

\";s:7:\"options\";a:5:{s:2:\"id\";s:20:\"rank_math_pro_notice\";s:7:\"classes\";s:16:\"rank-math-notice\";s:4:\"type\";s:4:\"info\";s:6:\"screen\";s:3:\"any\";s:10:\"capability\";s:15:\"install_plugins\";}}}', 'auto'), (234, 'aioseo_table_of_contents_options_internal', '{\"internal\":{\"firstActivated\":1790809893,\"lastActiveVersion\":\"202609.1\",\"lastSchemaVersion\":\"0.0\",\"migratedAppearanceDefaults\":true}}', 'auto'), (235, 'aioseo_table_of_contents_options', '{\"general\":[]}', 'auto'), -(236, 'action_scheduler_lock_async-request-runner', '6ac7249cea5626.79008089|1791435992', 'no'), -(239, '_transient_timeout_aioseo_plugin_cache_table_exists', '1792078321', 'off'), -(240, '_transient_aioseo_plugin_cache_table_exists', '1', 'off'), +(236, 'action_scheduler_lock_async-request-runner', '6accf77baa9853.08856254|1791817655', 'no'), (241, 'dpr_disabled_types', 'a:0:{}', 'auto'), (242, 'ihaf_activated', 'a:2:{s:6:\"wpcode\";i:1790809893;s:7:\"version\";s:5:\"2.3.9\";}', 'auto'), (244, 'wpcode_snippets', 'a:0:{}', 'auto'), @@ -577,12 +596,10 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (250, 'rank_math_review_posts_converted', '1', 'auto'), (251, '_transient_rank_math_first_submenu_id', 'rank-math', 'on'), (252, 'jooosi_fon_notices', 'a:0:{}', 'auto'), -(260, 'action_scheduler_migration_status', 'complete', 'auto'), (261, 'as_has_wp_comment_logs', 'no', 'on'), (266, 'alcastromol_tailwind_mode', 'developer', 'auto'), (267, 'alcastromol_tailwind_css_output', 'file', 'auto'), (268, 'alcastromol_oxygen_enabled', '0', 'auto'), -(269, 'category_children', 'a:0:{}', 'auto'), (325, 'compressx_global_stats_ex', 'a:1:{s:17:\"converted_percent\";i:0;}', 'off'), (326, 'compressx_hide_big_update', '1', 'off'), (327, 'compressx_converter_method', 'gd', 'off'), @@ -596,54 +613,78 @@ INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload` (336, 'jooosi_fon_cache_build_status', 'a:8:{s:5:\"state\";s:9:\"succeeded\";s:12:\"requested_at\";i:1790870118;s:7:\"changed\";b:1;s:8:\"warnings\";a:2:{i:0;s:48:\"Font #2 face #3 references a missing attachment.\";i:1;s:59:\"Font #2 face #3 was skipped because it has no usable files.\";}s:5:\"error\";s:0:\"\";s:10:\"started_at\";i:1790870170;s:12:\"completed_at\";i:1790870170;s:4:\"hash\";s:64:\"2f67ad15d22578b02e37552152f0c6032bc5625316eff7f4183326cac6dab1c1\";}', 'off'), (363, 'compressx_latest_bulk_image', '176', 'off'), (364, 'alcastromol_tailwind_settings', 'a:3:{s:7:\"content\";a:2:{i:0;s:23:\"./cache/*.{php,html,js}\";i:1;s:80:\"/Applications/MAMP/htdocs/xmartica/wp-content/themes/xmartica/**/*.{php,html,js}\";}s:5:\"theme\";a:3:{s:7:\"screens\";a:8:{s:5:\"xxxxl\";a:1:{s:3:\"max\";s:6:\"1701px\";}s:4:\"xxxl\";a:1:{s:3:\"max\";s:6:\"1550px\";}s:3:\"xxl\";a:1:{s:3:\"max\";s:6:\"1439px\";}s:2:\"xl\";a:1:{s:3:\"max\";s:6:\"1119px\";}s:2:\"lg\";a:1:{s:3:\"max\";s:6:\"1024px\";}s:2:\"md\";a:1:{s:3:\"max\";s:5:\"767px\";}s:2:\"sm\";a:1:{s:3:\"max\";s:5:\"479px\";}s:3:\"ssm\";a:1:{s:3:\"max\";s:5:\"380px\";}}s:9:\"container\";a:3:{s:6:\"center\";b:1;s:7:\"padding\";s:4:\"1rem\";s:7:\"screens\";a:1:{s:7:\"DEFAULT\";s:6:\"1702px\";}}s:6:\"extend\";a:1:{s:6:\"colors\";a:1:{s:5:\"color\";a:3:{i:1;s:7:\"#ffffff\";i:2;s:7:\"#4FABD9\";i:3;s:7:\"#00ACFF\";}}}}s:7:\"plugins\";a:0:{}}', 'auto'), -(469, '_transient_health-check-site-status-result', '{\"good\":20,\"recommended\":6,\"critical\":1}', 'on'), -(540, 'rank_math_sitemap_cache_files', 'a:0:{}', 'auto'), +(469, '_transient_health-check-site-status-result', '{\"good\":18,\"recommended\":7,\"critical\":2}', 'on'), (547, 'rank_math_content_ai_viewed', '1', 'off'), -(568, 'rank_math_indexnow_log', 'a:9:{i:0;a:5:{s:3:\"url\";s:35:\"https://xmartica.xyz/pagina-ejemplo\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1790953677;}i:1;a:5:{s:3:\"url\";s:21:\"https://xmartica.xyz/\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791068666;}i:2;a:5:{s:3:\"url\";s:62:\"https://xmartica.xyz/consultoria-de-transformacion-empresarial\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791216404;}i:3;a:5:{s:3:\"url\";s:58:\"https://xmartica.xyz/consultoria-de-transformacion-digital\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791256457;}i:4;a:5:{s:3:\"url\";s:54:\"https://xmartica.xyz/consultoria-de-mejora-de-procesos\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791260062;}i:5;a:5:{s:3:\"url\";s:53:\"https://xmartica.xyz/consultoria-de-datos-y-analitica\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791294246;}i:6;a:5:{s:3:\"url\";s:52:\"https://xmartica.xyz/consultoria-de-estrategia-de-ia\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791296258;}i:7;a:5:{s:3:\"url\";s:54:\"https://xmartica.xyz/consultoria-de-gestion-del-cambio\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791297469;}i:8;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/estrategia-de-experiencia-de-cliente\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791298117;}}', 'off'), -(615, '_site_transient_timeout_browser_8f5941452f094a396667f79f445c8177', '1791586630', 'off'), -(616, '_site_transient_browser_8f5941452f094a396667f79f445c8177', 'a:10:{s:4:\"name\";s:7:\"Firefox\";s:7:\"version\";s:5:\"157.0\";s:8:\"platform\";s:9:\"Macintosh\";s:10:\"update_url\";s:32:\"https://www.mozilla.org/firefox/\";s:7:\"img_src\";s:44:\"http://s.w.org/images/browsers/firefox.png?1\";s:11:\"img_src_ssl\";s:45:\"https://s.w.org/images/browsers/firefox.png?1\";s:15:\"current_version\";s:2:\"56\";s:7:\"upgrade\";b:0;s:8:\"insecure\";b:0;s:6:\"mobile\";b:0;}', 'off'), -(711, '_site_transient_update_core', 'O:8:\"stdClass\":4:{s:7:\"updates\";a:3:{i:0;O:8:\"stdClass\":10:{s:8:\"response\";s:7:\"upgrade\";s:8:\"download\";s:65:\"https://downloads.wordpress.org/release/es_MX/wordpress-7.1.3.zip\";s:6:\"locale\";s:5:\"es_MX\";s:8:\"packages\";O:8:\"stdClass\":5:{s:4:\"full\";s:65:\"https://downloads.wordpress.org/release/es_MX/wordpress-7.1.3.zip\";s:10:\"no_content\";s:0:\"\";s:11:\"new_bundled\";s:0:\"\";s:7:\"partial\";s:0:\"\";s:8:\"rollback\";s:0:\"\";}s:7:\"current\";s:5:\"7.1.3\";s:7:\"version\";s:5:\"7.1.3\";s:11:\"php_version\";s:3:\"7.4\";s:13:\"mysql_version\";s:5:\"5.5.5\";s:11:\"new_bundled\";s:3:\"6.7\";s:15:\"partial_version\";s:0:\"\";}i:1;O:8:\"stdClass\":10:{s:8:\"response\";s:7:\"upgrade\";s:8:\"download\";s:59:\"https://downloads.wordpress.org/release/wordpress-7.1.3.zip\";s:6:\"locale\";s:5:\"en_US\";s:8:\"packages\";O:8:\"stdClass\":5:{s:4:\"full\";s:59:\"https://downloads.wordpress.org/release/wordpress-7.1.3.zip\";s:10:\"no_content\";s:70:\"https://downloads.wordpress.org/release/wordpress-7.1.3-no-content.zip\";s:11:\"new_bundled\";s:71:\"https://downloads.wordpress.org/release/wordpress-7.1.3-new-bundled.zip\";s:7:\"partial\";s:69:\"https://downloads.wordpress.org/release/wordpress-7.1.3-partial-2.zip\";s:8:\"rollback\";s:0:\"\";}s:7:\"current\";s:5:\"7.1.3\";s:7:\"version\";s:5:\"7.1.3\";s:11:\"php_version\";s:3:\"7.4\";s:13:\"mysql_version\";s:5:\"5.5.5\";s:11:\"new_bundled\";s:3:\"6.7\";s:15:\"partial_version\";s:5:\"7.1.2\";}i:2;O:8:\"stdClass\":11:{s:8:\"response\";s:10:\"autoupdate\";s:8:\"download\";s:65:\"https://downloads.wordpress.org/release/es_MX/wordpress-7.1.3.zip\";s:6:\"locale\";s:5:\"es_MX\";s:8:\"packages\";O:8:\"stdClass\":5:{s:4:\"full\";s:65:\"https://downloads.wordpress.org/release/es_MX/wordpress-7.1.3.zip\";s:10:\"no_content\";s:0:\"\";s:11:\"new_bundled\";s:0:\"\";s:7:\"partial\";s:0:\"\";s:8:\"rollback\";s:0:\"\";}s:7:\"current\";s:5:\"7.1.3\";s:7:\"version\";s:5:\"7.1.3\";s:11:\"php_version\";s:3:\"7.4\";s:13:\"mysql_version\";s:5:\"5.5.5\";s:11:\"new_bundled\";s:3:\"6.7\";s:15:\"partial_version\";s:0:\"\";s:9:\"new_files\";s:1:\"1\";}}s:12:\"last_checked\";i:1791467006;s:15:\"version_checked\";s:5:\"7.1.2\";s:12:\"translations\";a:0:{}}', 'off'), -(713, '_site_transient_update_themes', 'O:8:\"stdClass\":5:{s:12:\"last_checked\";i:1791467007;s:7:\"checked\";a:1:{s:8:\"xmartica\";s:5:\"1.5.1\";}s:8:\"response\";a:0:{}s:9:\"no_update\";a:0:{}s:12:\"translations\";a:0:{}}', 'off'), +(568, 'rank_math_indexnow_log', 'a:54:{i:0;a:5:{s:3:\"url\";s:35:\"https://xmartica.xyz/pagina-ejemplo\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1790953677;}i:1;a:5:{s:3:\"url\";s:21:\"https://xmartica.xyz/\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791068666;}i:2;a:5:{s:3:\"url\";s:62:\"https://xmartica.xyz/consultoria-de-transformacion-empresarial\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791216404;}i:3;a:5:{s:3:\"url\";s:58:\"https://xmartica.xyz/consultoria-de-transformacion-digital\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791256457;}i:4;a:5:{s:3:\"url\";s:54:\"https://xmartica.xyz/consultoria-de-mejora-de-procesos\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791260062;}i:5;a:5:{s:3:\"url\";s:53:\"https://xmartica.xyz/consultoria-de-datos-y-analitica\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791294246;}i:6;a:5:{s:3:\"url\";s:52:\"https://xmartica.xyz/consultoria-de-estrategia-de-ia\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791296258;}i:7;a:5:{s:3:\"url\";s:54:\"https://xmartica.xyz/consultoria-de-gestion-del-cambio\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791297469;}i:8;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/estrategia-de-experiencia-de-cliente\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791298117;}i:9;a:5:{s:3:\"url\";s:25:\"https://xmartica.xyz/home\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791559735;}i:10;a:5:{s:3:\"url\";s:27:\"https://xmartica.xyz/home01\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791559854;}i:11;a:5:{s:3:\"url\";s:28:\"https://xmartica.xyz/en/home\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791570026;}i:12;a:5:{s:3:\"url\";s:27:\"https://xmartica.xyz/home01\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791570471;}i:13;a:5:{s:3:\"url\";s:28:\"https://xmartica.xyz/en/home\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791570471;}i:14;a:5:{s:3:\"url\";s:21:\"https://xmartica.xyz/\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791570613;}i:15;a:5:{s:3:\"url\";s:30:\"https://xmartica.xyz/es/inicio\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791570660;}i:16;a:5:{s:3:\"url\";s:30:\"https://xmartica.xyz/es/inicio\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791588826;}i:17;a:5:{s:3:\"url\";s:58:\"https://xmartica.xyz/es/business-transformation-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791590705;}i:18;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/es/digital-transformation-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791590746;}i:19;a:5:{s:3:\"url\";s:65:\"https://xmartica.xyz/es/consultoria-de-transformacion-empresarial\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791590904;}i:20;a:5:{s:3:\"url\";s:61:\"https://xmartica.xyz/es/consultoria-de-transformacion-digital\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791590920;}i:21;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/es/consultoria-de-mejora-de-procesos\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591001;}i:22;a:5:{s:3:\"url\";s:56:\"https://xmartica.xyz/es/consultoria-de-datos-y-analitica\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591028;}i:23;a:5:{s:3:\"url\";s:55:\"https://xmartica.xyz/es/consultoria-de-estrategia-de-ia\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591061;}i:24;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/es/consultoria-de-gestion-del-cambio\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591104;}i:25;a:5:{s:3:\"url\";s:60:\"https://xmartica.xyz/es/estrategia-de-experiencia-de-cliente\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591124;}i:26;a:5:{s:3:\"url\";s:62:\"https://xmartica.xyz/consultoria-de-transformacion-empresarial\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591215;}i:27;a:5:{s:3:\"url\";s:58:\"https://xmartica.xyz/consultoria-de-transformacion-digital\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591227;}i:28;a:5:{s:3:\"url\";s:54:\"https://xmartica.xyz/consultoria-de-mejora-de-procesos\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591237;}i:29;a:5:{s:3:\"url\";s:53:\"https://xmartica.xyz/consultoria-de-datos-y-analitica\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591247;}i:30;a:5:{s:3:\"url\";s:52:\"https://xmartica.xyz/consultoria-de-estrategia-de-ia\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591258;}i:31;a:5:{s:3:\"url\";s:54:\"https://xmartica.xyz/consultoria-de-gestion-del-cambio\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591267;}i:32;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/estrategia-de-experiencia-de-cliente\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591278;}i:33;a:5:{s:3:\"url\";s:55:\"https://xmartica.xyz/business-transformation-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791591376;}i:34;a:5:{s:3:\"url\";s:54:\"https://xmartica.xyz/digital-transformation-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791598940;}i:35;a:5:{s:3:\"url\";s:54:\"https://xmartica.xyz/digital-transformation-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791598987;}i:36;a:5:{s:3:\"url\";s:61:\"https://xmartica.xyz/es/consultoria-de-transformacion-digital\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791601569;}i:37;a:5:{s:3:\"url\";s:51:\"https://xmartica.xyz/process-improvement-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791643977;}i:38;a:5:{s:3:\"url\";s:51:\"https://xmartica.xyz/process-improvement-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791644778;}i:39;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/es/consultoria-de-mejora-de-procesos\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791645858;}i:40;a:5:{s:3:\"url\";s:46:\"https://xmartica.xyz/data-analytics-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791646886;}i:41;a:5:{s:3:\"url\";s:46:\"https://xmartica.xyz/data-analytics-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791646959;}i:42;a:5:{s:3:\"url\";s:56:\"https://xmartica.xyz/es/consultoria-de-datos-y-analitica\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791647954;}i:43;a:5:{s:3:\"url\";s:65:\"https://xmartica.xyz/es/consultoria-de-transformacion-empresarial\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791648487;}i:44;a:5:{s:3:\"url\";s:61:\"https://xmartica.xyz/es/consultoria-de-transformacion-digital\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791648594;}i:45;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/es/consultoria-de-mejora-de-procesos\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791649175;}i:46;a:5:{s:3:\"url\";s:55:\"https://xmartica.xyz/es/consultoria-de-estrategia-de-ia\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791649521;}i:47;a:5:{s:3:\"url\";s:43:\"https://xmartica.xyz/ai-strategy-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791649587;}i:48;a:5:{s:3:\"url\";s:43:\"https://xmartica.xyz/ai-strategy-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791649659;}i:49;a:5:{s:3:\"url\";s:49:\"https://xmartica.xyz/change-management-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791651957;}i:50;a:5:{s:3:\"url\";s:49:\"https://xmartica.xyz/change-management-consulting\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791652143;}i:51;a:5:{s:3:\"url\";s:49:\"https://xmartica.xyz/customer-experience-strategy\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791652540;}i:52;a:5:{s:3:\"url\";s:60:\"https://xmartica.xyz/es/estrategia-de-experiencia-de-cliente\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791653222;}i:53;a:5:{s:3:\"url\";s:57:\"https://xmartica.xyz/es/consultoria-de-gestion-del-cambio\";s:6:\"status\";i:202;s:17:\"manual_submission\";b:0;s:7:\"message\";s:2:\"OK\";s:4:\"time\";i:1791653391;}}', 'off'), +(711, '_site_transient_update_core', 'O:8:\"stdClass\":4:{s:7:\"updates\";a:3:{i:0;O:8:\"stdClass\":10:{s:8:\"response\";s:7:\"upgrade\";s:8:\"download\";s:65:\"https://downloads.wordpress.org/release/es_MX/wordpress-7.1.3.zip\";s:6:\"locale\";s:5:\"es_MX\";s:8:\"packages\";O:8:\"stdClass\":5:{s:4:\"full\";s:65:\"https://downloads.wordpress.org/release/es_MX/wordpress-7.1.3.zip\";s:10:\"no_content\";s:0:\"\";s:11:\"new_bundled\";s:0:\"\";s:7:\"partial\";s:0:\"\";s:8:\"rollback\";s:0:\"\";}s:7:\"current\";s:5:\"7.1.3\";s:7:\"version\";s:5:\"7.1.3\";s:11:\"php_version\";s:3:\"7.4\";s:13:\"mysql_version\";s:5:\"5.5.5\";s:11:\"new_bundled\";s:3:\"6.7\";s:15:\"partial_version\";s:0:\"\";}i:1;O:8:\"stdClass\":10:{s:8:\"response\";s:7:\"upgrade\";s:8:\"download\";s:59:\"https://downloads.wordpress.org/release/wordpress-7.1.3.zip\";s:6:\"locale\";s:5:\"en_US\";s:8:\"packages\";O:8:\"stdClass\":5:{s:4:\"full\";s:59:\"https://downloads.wordpress.org/release/wordpress-7.1.3.zip\";s:10:\"no_content\";s:70:\"https://downloads.wordpress.org/release/wordpress-7.1.3-no-content.zip\";s:11:\"new_bundled\";s:71:\"https://downloads.wordpress.org/release/wordpress-7.1.3-new-bundled.zip\";s:7:\"partial\";s:69:\"https://downloads.wordpress.org/release/wordpress-7.1.3-partial-2.zip\";s:8:\"rollback\";s:0:\"\";}s:7:\"current\";s:5:\"7.1.3\";s:7:\"version\";s:5:\"7.1.3\";s:11:\"php_version\";s:3:\"7.4\";s:13:\"mysql_version\";s:5:\"5.5.5\";s:11:\"new_bundled\";s:3:\"6.7\";s:15:\"partial_version\";s:5:\"7.1.2\";}i:2;O:8:\"stdClass\":11:{s:8:\"response\";s:10:\"autoupdate\";s:8:\"download\";s:65:\"https://downloads.wordpress.org/release/es_MX/wordpress-7.1.3.zip\";s:6:\"locale\";s:5:\"es_MX\";s:8:\"packages\";O:8:\"stdClass\":5:{s:4:\"full\";s:65:\"https://downloads.wordpress.org/release/es_MX/wordpress-7.1.3.zip\";s:10:\"no_content\";s:0:\"\";s:11:\"new_bundled\";s:0:\"\";s:7:\"partial\";s:0:\"\";s:8:\"rollback\";s:0:\"\";}s:7:\"current\";s:5:\"7.1.3\";s:7:\"version\";s:5:\"7.1.3\";s:11:\"php_version\";s:3:\"7.4\";s:13:\"mysql_version\";s:5:\"5.5.5\";s:11:\"new_bundled\";s:3:\"6.7\";s:15:\"partial_version\";s:0:\"\";s:9:\"new_files\";s:1:\"1\";}}s:12:\"last_checked\";i:1791817484;s:15:\"version_checked\";s:5:\"7.1.2\";s:12:\"translations\";a:0:{}}', 'off'), (714, 'wpcf7', 'a:2:{s:7:\"version\";s:3:\"6.2\";s:13:\"bulk_validate\";a:4:{s:9:\"timestamp\";i:1791004891;s:7:\"version\";s:5:\"6.1.7\";s:11:\"count_valid\";i:1;s:13:\"count_invalid\";i:0;}}', 'auto'), (767, 'secret_key', ';Xh@l6|RjhS@$1ydbW,mwMbV]z~S%W`P^:32,791`?do;VKas5U6,DM=B[F&9e:I', 'off'), (858, 'auth_key', '_cBcKe*)Y9sxgR@C^W~^R_/&?dpL[XX*vOnLs- _=/9Q8U2.|D%Cv;*$a%~fR_Y2', 'off'), (859, 'auth_salt', 'ZG[s#9-7vbL.bhChIo]DW6@=E,GRJ%t)KU/#J>1&zPOQaBII>ZBL[&bK,Zm;<91H', 'off'), -(936, '_site_transient_timeout_feed_mod_203ddaeab844647ccdc6525a1073e4d6', '1791440311', 'off'), -(937, '_site_transient_feed_mod_203ddaeab844647ccdc6525a1073e4d6', '1791397111', 'off'), -(940, '_site_transient_timeout_feed_mod_d117b5738fbd35bd8c0391cda1f2b5d9', '1791440311', 'off'), -(941, '_site_transient_feed_mod_d117b5738fbd35bd8c0391cda1f2b5d9', '1791397111', 'off'), -(1599, '_site_transient_timeout_community-events-1aecf33ab8525ff212ebdffbb438372e', '1791440309', 'off'), -(1600, '_site_transient_community-events-1aecf33ab8525ff212ebdffbb438372e', 'a:4:{s:9:\"sandboxed\";b:0;s:5:\"error\";N;s:8:\"location\";a:1:{s:2:\"ip\";s:9:\"127.0.0.0\";}s:6:\"events\";a:0:{}}', 'off'), -(1601, '_transient_timeout_rank_math_feed_posts_v2', '1791440309', 'off'); -INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES -(1602, '_transient_rank_math_feed_posts_v2', 'a:4:{i:0;a:5:{s:5:\"title\";a:1:{s:8:\"rendered\";s:51:\"Content AI 2.0: Introducing AI SEO Inside WordPress\";}s:4:\"date\";s:19:\"2026-10-07 16:57:25\";s:4:\"link\";s:62:\"https://rankmath.com/blog/introducing-supercharged-content-ai/\";s:12:\"custom_label\";s:0:\"\";s:9:\"condition\";s:0:\"\";}i:1;a:3:{s:5:\"title\";a:1:{s:8:\"rendered\";s:57:\"Free vs Paid WordPress Plugins: Which Should You Choose?\";}s:4:\"date\";s:19:\"2026-09-28 07:13:30\";s:4:\"link\";s:57:\"https://rankmath.com/blog/free-vs-paid-wordpress-plugins/\";}i:2;a:3:{s:5:\"title\";a:1:{s:8:\"rendered\";s:40:\"7 Best WordPress Site Management Plugins\";}s:4:\"date\";s:19:\"2026-09-15 04:05:37\";s:4:\"link\";s:60:\"https://rankmath.com/blog/wordpress-site-management-plugins/\";}i:3;a:3:{s:5:\"title\";a:1:{s:8:\"rendered\";s:64:\"The Best White Label SEO Tools to Save Time and Win More Clients\";}s:4:\"date\";s:19:\"2026-09-08 06:03:07\";s:4:\"link\";s:48:\"https://rankmath.com/blog/white-label-seo-tools/\";}}', 'off'), -(1603, '_site_transient_timeout_feed_203ddaeab844647ccdc6525a1073e4d6', '1791440310', 'off'); -INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES -(1604, '_site_transient_feed_203ddaeab844647ccdc6525a1073e4d6', 'a:6:{s:5:\"child\";a:1:{s:0:\"\";a:1:{s:3:\"rss\";a:1:{i:0;a:6:{s:4:\"data\";s:3:\"\n\n\n\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:7:\"version\";s:3:\"2.0\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:1:{s:7:\"channel\";a:1:{i:0;a:6:{s:4:\"data\";s:52:\"\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:4:{s:0:\"\";a:8:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:41:\"Blog – WordPress.org Español (México)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:27:\"https://es-mx.wordpress.org\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"WordPress en Español de México\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:13:\"lastBuildDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 18 Jul 2024 14:05:49 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"language\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"es\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:9:\"generator\";a:1:{i:0;a:5:{s:4:\"data\";s:40:\"https://wordpress.org/?v=7.2-alpha-64231\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:5:\"image\";a:1:{i:0;a:6:{s:4:\"data\";s:11:\"\n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:5:{s:3:\"url\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"https://s.w.org/favicon.ico?2\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:41:\"Blog – WordPress.org Español (México)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:27:\"https://es-mx.wordpress.org\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:5:\"width\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"32\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:6:\"height\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"32\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}s:4:\"item\";a:10:{i:0;a:6:{s:4:\"data\";s:73:\"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:26:\"WordPress 6.6 “Dorsey”\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"https://es-mx.wordpress.org/2024/07/18/wordpress-6-6-dorsey/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"https://es-mx.wordpress.org/2024/07/18/wordpress-6-6-dorsey/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 18 Jul 2024 14:05:42 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Uncategorized\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1037\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:339:\"Saluda a WordPress 6.6 “Dorsey”, que lleva el nombre del legendario líder de la Big Band estadounidense, Tommy Dorsey. Famoso por su trombón de tono suave y sus composiciones, la música de Dorsey cautivó al público con su profundidad emocional y su energía vibrante. Deja que tu corazón se balancee y cante al ritmo de […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:61799:\"\n
\"\"
\n\n\n\n

Saluda a WordPress 6.6 “Dorsey”, que lleva el nombre del legendario líder de la Big Band estadounidense, Tommy Dorsey. Famoso por su trombón de tono suave y sus composiciones, la música de Dorsey cautivó al público con su profundidad emocional y su energía vibrante.

\n\n\n\n

Deja que tu corazón se balancee y cante al ritmo de las profundas notas de metal del sonido de la Big Band de Dorsey mientras exploras las nuevas características y mejoras de WordPress 6.6.

\n\n\n\n\n\n\n\n

¡Hola, 6.6!

\n\n\n\n

WordPress 6.6 cumple con la promesa de una mejor web al incorporar estilo, delicadeza y un conjunto de posibilidades creativas a la experiencia de creación de sitios. Esta versión te ayuda a hacer más con facilidad, poniendo herramientas mejoradas a tu alcance y dándote un poder sin precedentes detrás de escena. Encontrarás más formas de crear elementos de diseño hermosos y coherentes en todo tu sitio, un nuevo diseño para vistas previas rápidas de páginas en el Editor del sitio y la seguridad de las reversiones automáticas para actualizaciones automáticas de complementos fallidas, entre muchas otras características destacadas.

\n\n\n\n

Además de las nuevas características, “Dorsey” continúa brindando las mejoras de rendimiento y accesibilidad que puedes esperar de cada versión de WordPress. Explora lo que WordPress 6.6 tiene para ofrecer y prepárate para dejar que sus características lleven tus sitios a nuevas alturas.

\n\n\n\n
\n\n
\n\n\n\n

¿Qué hay dentro?

\n\n\n\n

Agrega más opciones de diseño a los temas de bloques

\n\n\n\n

Crea conjuntos de colores o fuentes para multiplicar las combinaciones de diseño en un tema. Estos conjuntos ofrecen posibilidades de diseño más contenidas, lo que permite una variedad visual dentro de las pautas de estilo más amplias del sitio.

\n\n\n\n
\"\"
\n\n\n\n

Simplifica tu flujo de trabajo con un nuevo diseño para las páginas en el Editor del sitio

\n\n\n\n

Ve todas tus páginas y una vista previa de cualquier página seleccionada con el nuevo diseño en paralelo en el Editor del sitio.

\n\n\n\n
\"\"
\n\n\n\n

Actualiza automáticamente tus plugins con tranquilidad

\n\n\n\n

Disfruta de la comodidad de las actualizaciones automáticas de plugins con la seguridad de poder revertirlas si algo sale mal, lo que le ofrece a tu sitio un nuevo nivel de seguridad, una funcionalidad mejorada a medida que esté disponible y casi sin tiempo ni ancho de banda para que esto suceda.

\n\n\n\n
\"\"
\n\n\n\n

Personaliza el contenido en patrones sincronizados

\n\n\n\n

Realiza cambios en el contenido en cada instancia de un patrón sincronizado manteniendo un estilo uniforme en todos ellos. Establece estas modificaciones para los bloques de encabezado, párrafo, botón e imagen cuando se colocan en un patrón sincronizado.

\n\n\n\n
\"\"
\n\n\n\n

Rendimiento

\n\n\n\n

WordPress 6.6 incluye actualizaciones importantes, como la eliminación de llamadas WP_Theme_JSON redundantes, la desactivación de la carga automática para opciones grandes y la eliminación de dependencias polyfill innecesarias. Otras novedades incluyen la carga diferida de incrustaciones de entrads, una nueva directiva data-wp-on-async y plantillas en el editor que se cargan aproximadamente un 35 % más rápido en general.

\n\n\n\n

Accesibilidad

\n\n\n\n

Esta versión incluye 58 correcciones y mejoras de accesibilidad. Estas se centran en aspectos fundamentales de la experiencia de WordPress, en particular el componente de vistas de datos que impulsa la nueva experiencia de edición del sitio y áreas como el Insertador, que proporciona una forma clave de interactuar con bloques y patrones.

\n\n\n\n

Y mucho más

\n\n\n\n

Visita la presentación de características para obtener una descripción general completa de todas las nuevas características y mejoras en WordPress 6.6.

\n\n\n\n
\n\n
\n\n\n\n

Más información sobre WordPress 6.6

\n\n\n\n

Explora Learn WordPress para obtener videos instructivos rápidos, talleres en línea y otros recursos gratuitos para mejorar tus conocimientos y habilidades sobre WordPress.

\n\n\n\n

La Guía práctica de WordPress 6.6 contiene información técnica detallada y notas para desarrolladores que te ayudarán a desarrollar con WordPress y aprovechar al máximo esta versión. No olvides suscribirte al Blog para desarrolladores para obtener actualizaciones, tutoriales y otro contenido útil de WordPress para desarrolladores.

\n\n\n\n

Para obtener información sobre la instalación, los cambios de archivos, las correcciones y otras actualizaciones, lee las notas de la versión 6.6.

\n\n\n\n

El equipo de la versión 6.6

\n\n\n\n

Cada versión llega a ti de la mano de un equipo dedicado de colaboradores entusiastas que ayudan a mantener las cosas encaminadas y avanzando sin problemas. El equipo que ha liderado la versión 6.6 es un grupo multifuncional de colaboradores que siempre están listos para defender ideas, eliminar obstáculos y resolver problemas.

\n\n\n\n\n\n\n\n

Gracias a los colaboradores

\n\n\n\n

La misión de WordPress es democratizar la publicación y encarnar las libertades que ofrece el código abierto. Una comunidad global y diversa de personas que colaboran para fortalecer el software respalda este esfuerzo.

\n\n\n\n

WordPress 6.6 refleja los esfuerzos incansables y la pasión de más de 630 colaboradores en al menos 51 países. ¡Esta versión también dio la bienvenida a más de 150 colaboradores primerizos!

\n\n\n\n

Su colaboración generó más de 1,900 mejoras y correcciones, lo que garantizó una versión estable para todos, un testimonio del poder y la capacidad de la comunidad de código abierto de WordPress.

\n\n\n\n

!Benni · 1naveengiri · Aaron Jorbin · Aaron Robertshaw · aatanasov · abditsori · Abha Thakor · abhi3315 · Abhijit Rakas · abitofmind · Adam Harley (Kawauso) · Adam Silverstein · Adel Tahri · adrianduffell · Aezaz Shekh · Ahmed Kabir Chaion · ajfleming · Ajit Bohra · Akash Dhawade · Aki Hamano · Akira Tachibana · akmelias · Alan Fuller · Albert Juhé Lluveras · alesflex · Alex Concha · Alex Kozack · Alex Lende · Alex Stine · Alexandre Buffet · alexminza · allilevine · Alvaro Gómez · amanias1977 · Amber Hinds · Amir Abbas · amisiewicz · Amit Raj · Anamarija Papić · Anders Norén · Andre Ribeiro · Andrea Fercia · Andrea Roenning · Andrei Draganescu · Andrei Lupu · Andrew Hayward · Andrew Hutchings · Andrew Nacin · Andrew Ozz · Andrew Serong · André Maneiro · Andy Fragen · Aneesh Devasthale · Angela Jin · Anil Vaza · Ankit K Gupta · Ankit Panchal · Anne McCarthy · Anthony Burchell · Anton Vlasenko · Ari Stathopoulos · Artemio Morales · Arthur Chu · Artur Piszek · Arun Sharma · Arunas Liuiza · Ashesh Magar · Asiqur Rahman · Asish Chandra Mohon · Aslam Doctor · asmittle · Aurooba Ahmed · Ayesh Karunaratne · Balu B · bangank36 · Bart Kalisz · Beatriz Fialho · Beau Lebens · Ben Dwyer · Ben Keith · Ben Ritner – Kadence WP · Benjamin Pick · Benjamin Zekavica · benjpw · bernhard-reiter · Birgit Pauli-Haack · bissy · Bjarne Oldrup · Blackbam · Blockify · bnewboldbsky · Brad Jorsch · Brennan Goewert · Brian Alexander · Brian Coords · Brian Gardner · Brian Gosnell · Brian Haas · Bridget Willard · Brooke · Bruno Freiberger Garcia · burnuser · Caleb Burks · Candy · Carlos Bravo · Carlos G. P. · Carolina Nymark · cbirdsong · Chad Chadbourne · Charlie Merland · Chloe Bringmann · Chouby · Chris Reynolds · chrisdotdotdot · Christopher · Colin Stewart · ColinD · colle · comecaramelos · Constantine Vasilyev · CookiesForDevo · Corey McKrill · Craig Francis · crazytonyli · Cullen Whitmore · Curdin Krummenacher · cyrus11 · Dale du Preez · Damon Cook · Damon Cook · Dan Soschin · Dani Guardiola · Daniel Richards · darerodz · Darren Ethier (nerrad) · Darshit Rajyaguru · dav4 · Dave Page · David · David A. Kennedy · David Baumwald · David Biňovec · David Bowman · David Calhoun · David Herrera · David Jensen · David Levine · David Rozando · David Smith · davideferre · De’Yonté W. · Dean Sas · Deep Patel · Deepak Vijayan · Denis Žoljom · Dennis Snell · Derek Blank · Devin Curtis · Dharmesh Patel · Dhrumil Kumbhani · Dhruval Shah · dhruvang21 · dhruvkb · DiedeExterkate · Dilip Bheda · Dion Hulse · DJ · DjZoNe · Dominik Schilling · Drew Jaynes · drrxbracho · Earle Davies · Elena Brescacin · Ella van Durpe · Emmanuel Hesry · Enej Bajgorić · Eneko Garrido · enodekciw · Enrico Battocchi · Enrico Sorcinelli · Erik · Estela Rueda · evanltd · Fabian Kägy · Fabian Todt · Faisal Alvi · Fanly · Farhan Ahmed · Felix Arntz · Flavia Bernárdez Rodríguez · Florian TIAR · Franz Josef Kaiser · Gabor Lippert · Gal Baras · Garth Mortensen · Gary Jones · George Mamadashvili · George Stephanis · Gerardo Pacheco · Glen Davies · Glenn Ansley · Grant M. Kinney · Greg Ziółkowski · Guido Scialfa · Héctor Prieto · hakre · hanneslsm · Hans-Gerd Gerhards · Harit Panchal · Harsh Gajipara · Haz · heinvv · HelgaTheViking · Hinnerk Altenburg · Hit Bhalodia · Hitendra Chopda · humanify · huubl · Huzaifa Al Mesbah · Ian Belanger · ignatiusjeroe · Imran · inwerpsel · Ipstenu (Mika Epstein) · Isabel Brison · IT Path Solutions · ivanottinger · Jaap Weijland · Jack Stevens · jaclync · James Koster · James Wesley Goedert · Jamie Speller · Jan Boddez · Jansen Tolle · janthiel · Jarda Snajdr · Jarek Mazurczak · Jaroslav “Dero” Polakovic · Jason Adams · Jason Crist · Jason Johnston · Jason LeMahieu (MadtownLems) · Javier Casares · jayanthparthsarathy · jdekhtiar · Jean-Baptiste Audras · Jeff Chi · Jeff Ong · Jeffrey Paul · jeflopo · Jenny Dupuy · Jeremy Felt · Jeremy Herve · Jeremy Pry · Jerry Jones · Jesús Amieiro · Jess · Jessica Lyschik · jhned · Jigar Bhanushali · Jip Moors · JiveDig · Joe Dolson · Joe McGill · Joen Asmussen · Johannes Jülg · John Blackbourn · John Espiritu · John Godley · John Hooks · John James Jacoby · Jon Surrell · jon092 · Jonathan · Jonathan Bossenger · Jonathan Desrosiers · Joni Erkkilä · Jonny Harris · jordesign · Jorge Costa · Jose Varghese · Josep Morán · Joseph Scott · Joshua Goode · Jossnaz · Juan Aldasoro · JuanMa Garrido · jules · Julie Moynat · Juliette Reinders Folmer · Julio Potier · Justin Tadlock · justnorris · Jyolsna J E · K. Adam White · KafleG · Kai Hao · Kajal Gohel · kamran8176 · Kapil Paul · Karlijn Bok · Karol Manijak · Karthik Thayyil · Kathryn Presner · Kellen Mace · Kelly Choyce-Dwan · keoshi · Kevin Hoffman · Khokan Sardar · killua99 · Kira Schroder · kitchin · Kite · Kjell Reigstad · kkmuffme · kmvan · Konstantin Kovshenin · kristastevens · kristenfisher427 · Krupa Nanda · Krupal Panchal · Kushang Tailor · kyleak · Lae · Lanre Smith · Lars Gersmann · Laura Byrne · laurelfulford · Lauren · Lauren Stein · Laurent Naudier · leemon · Lena Morita · Leonidas Milosis · Linkon Miyan · liviopv · Louis Wolmarans · Lovekesh Kumar · luboslives · Luigi Teschio · Luis · Luis Molina (interdevel) · luisherranz · Lyon Müller · Márcio Duarte · Madhu Dollu · Maggie Cabrera · Mai · Makdia Hussain · manfcarlo · Manoj Maharrshi · Marc · Marc Armengou · Marcelo de Moraes Serpa · Marco Ciampini · Marco Pereirinha · marherumr · Marie Comet · Marin Atanasov · Mario Santos · Marius L. J. · Mark Howells-Mead · Mark Jaquith · Mark Szymanski · Mark Uraine · Martijn van der Klis · Mary Baum · Mat Lipe · Mathieu Viet · Matias Benedetto · Matias Ventura · Matt Cromwell · Matt Medeiros · Matt Mullenweg · Matt Sherman · Md Abul Bashar · Md Sahadat Husain · Md Tofajjal Hossen · MD.NESAR MRIDHA · Meet Makadia · Meet Mehta · megane9988 · Meher Bala · Michael James Ilett · Michal Czaplinski · Miguel Fonseca · miguelsansegundo · Mihai Joldis · Miikka · Mikael Korpela · Mike Henderson · Mike McAlister · Mikey Binns · Minal Diwan · Miriam Schwab · miya · mkismy · Mohit Dadhich · Monzur Alam · Morais Junior · mrwweb · Muhibul Haque · mujuonly · Mukesh Panchal · Musannif Zahir · Mustaque Ahmed · myhro · mykolashlyakhtun · Mykyta Synelnikov · Nadir Seghir · Naeem Haque · Namith Jawahar · Narendra Sishodiya · Naresh Bheda · Nate Gay · Nazmul Hasan Robin · Nazmul Hosen · Nick Diego · nicmare · Nico · Nicolas Tatarchenko · Nicole Furlan · Nicole Paschen Caylor · nicomollet · nidhidhandhukiya · Niels Lange · Nihar Ranjan Das · Nik Tsekouras · Nilo Velez · Nirav Sherasiya · Nithin John · Nithin SreeRaj · nkeller15 · nosilver4u · obliviousharmony · Ohia ᚛ᚈᚐᚂᚐᚋᚆ᚜ · okat · Old account · Olga Gleckler · Oliver Campion · Oliver Schmid · OllieJones · Omar Alshaker · Paal Joachim Romdahl · Pablo Honey · Paolo L. Scala · Pascal Birchler · Patricia BT · Paul Bearne · Paul de Wouters · Paul Kevan · Paul Wilde · Pavan Patil · pavelevap · Pedro Mendonça · peiche · Per Søderlind · perryrylance · Peter Rubin · Peter Wilson · petitphp · Phi Phan · Pieterjan Deneys · Pinar · Pitam Dey · pkuliga · Pooja N Muchandikar · Povilas Staškus · Praful Patel · Pranit Dugad · Prasad Karmalkar · Prashant Baldha · Pratik Londhe · Prem Tiwari · Presskopp · presstoke · printsachen1 · Priyanshii Vijayvargiya · Prottoy Sarkar Argho · QuietNoise · Rachel Baker · Rafael Galani · Rafał Całka · Rajan Lama · Rajin Sharwar · Ramon Ahnert · Ramon Corrales · Ramon James · Ravikumar Patel · Ravinder Kumar · Rejaul Alom Khan · Remkus de Vries · Remy Perona · renishsurani · retrofox · Riad Benguella · Rich Collier · Rich Tabor · Richard Korthuis · richardevs · Rishi Mehta · Robert Anderson · Robert Ghetau · Robin Cornett · rodionov201 · Rodrigo Arias · Rodrigo Primo · Roger · Rolf Siebers · Roy Tanck · Ryan McCue · Ryan Urban · Ryan Welcher · Sébastien SERRE · Sérgio Gomes · Sören Wünsch · s0what · Sagar Prajapati · sahilthakur02 · Sakib Mohammed · Sal Ferrarello · Sam Berry · Sam Brockway · samiamnot · Sampat Viral · Samuel Rüegger · Samuel Sidler · Sanne van der Meulen · Sarah Norris · Sarkar Ripon · Sascha Metz · Saulius Vikerta · Saxon Fletcher · Saxon Fletcher · scribu · script2see · Sean Fisher · Sergey Biryukov · Seth Miller · Seth Rubenstein · Shail Mehta · Shalin Shah · Shannon Smith · shaunandrews · sheulyshila · Shital Marakana · Shiva Poudel · Shiva Shanker Bhatta · Shreyash Srivastava · Shubham Kumar Bansal · Shuvo Mohajan · Siddharth Thevaril · siliconforks · Simone Maranzana · Siobhan · sirzooro · SJNBham · Sneha Patil · Spencer Finnell · Stefano Minoia · Stephen Bernhardt · Stephen Brook · Stephen Edgar · stephenmiracle · Steve Jones · steveblum · strangehill · strarsis · Sudip Dadhaniya · Sumit Bagthariya · Sumit Singh · SunilPrajapati · Suwash · syamraj24 · Sybre Waaijer · Syed Balkhi · Tahmid ul Karim · Takashi Irie · Takashi Kitajima · Tammie Lister · Taylor Gorman · Terence Eden · Teresa Gobble · Thakor Darshil · thelmachido a11n · Thijs · Thirumani Guhan · Thomas Kräftner · Till Krüss · Tim Brathärig · Tim Nicholson · Tim Nolte · Timo Tijhof · Timothy Jacobs · tmatsuur · TobiasBg · tobifjellner (Tor-Bjorn Fjellner) · Tom Cafferkey · Tomek · tomepajk · Tomoki Shimomura · tomxygen · Toni Viemerö · Tony G · Tonya Mork · Toro_Unit (Hiroshi Urabe) · Torsten Landsiedel · Trupti Kanzariya · tunetheweb · twstokes · tybor · Ugyen Dorji · Umesh Gupta · up1512001 · Vicente Canales · Viktor Szépe · Vinit · Vinita Tandulkar · Vipul Gupta · Vishal Kothari · vivekawsm · WebMan Design | Oliver Juhas · websitegenii · wesatintellitonic · Weston Ruter · whaze · Will Skora · William Earnhardt · WilliamG · Wojtek Naruniec · Yagnik Sangani · yankiara · Yann · Yannis Guyon · Yui · Yukinobu Asakawa · Yuvrajsinh Sisodiya · Zack Krida · Zafar Kamal · zieladam · zkarj · Zunaid Amin

\n\n\n\n

Más de 60 regiones han traducido el 90 por ciento o más de WordPress 6.5 a su idioma. Los traductores de la comunidad están trabajando arduamente para garantizar que haya más traducciones en camino. Gracias a todos los que ayudan a que WordPress esté disponible en 200 idiomas.

\n\n\n\n

Por último, pero no menos importante, gracias a los voluntarios que contribuyen a los foros de soporte respondiendo preguntas de los usuarios de WordPress de todo el mundo.

\n\n\n\n

Involúcrate y contribuye

\n\n\n\n

La participación en WordPress no se limita a la codificación. Si le atrae contribuir, aprender más e involucrarse es fácil. Descubre los equipos que se unen en Make WordPress y utiliza esta herramienta interactiva para ayudarte a decidir cuál es la adecuada para ti.

\n\n\n\n

6.6 haiku

\n\n\n\n

Ya está aquí Seis-punto-seis.
Haz que todo sea hermoso, manténlo
con tu marca y relájate.

\n\n\n\n

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:65:\"https://es-mx.wordpress.org/2024/07/18/wordpress-6-6-dorsey/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1037\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:1;a:6:{s:4:\"data\";s:76:\"\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:15:\"WordPress 6.5.5\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:55:\"https://es-mx.wordpress.org/2024/06/25/wordpress-6-5-5/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:63:\"https://es-mx.wordpress.org/2024/06/25/wordpress-6-5-5/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 25 Jun 2024 14:22:53 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:2:{i:0;a:5:{s:4:\"data\";s:15:\"Actualizaciones\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:3:\"6.5\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1032\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:378:\"¡WordPress 6.5.5 ya está disponible! Esta versión presenta tres correcciones de seguridad. Debido a que se trata de una versión de seguridad, se recomienda que actualices tus sitios de inmediato. Esta versión menor también incluye 3 correcciones de errores en Core. Puedes descargar WordPress 6.5.5 desde WordPress.org o visitar tu Panel de WordPress, hacer clic […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:5768:\"\n

¡WordPress 6.5.5 ya está disponible!

\n\n\n\n

Esta versión presenta tres correcciones de seguridad. Debido a que se trata de una versión de seguridad, se recomienda que actualices tus sitios de inmediato. Esta versión menor también incluye 3 correcciones de errores en Core.

\n\n\n\n

Puedes descargar WordPress 6.5.5 desde WordPress.org o visitar tu Panel de WordPress, hacer clic en “Actualizaciones” y luego hacer clic en “Actualizar ahora”. Si tienes sitios que admiten actualizaciones automáticas en segundo plano, el proceso de actualización comenzará automáticamente.

\n\n\n\n

WordPress 6.5.5 es una versión de ciclo corto. El próximo lanzamiento importante será la versión 6.6, que está programada para el 16 de julio de 2024.

\n\n\n\n

Para obtener más información sobre WordPress 6.5.5, visita el sitio HelpHub.

\n\n\n\n

Actualizaciones de seguridad incluidas en esta versión

\n\n\n\n

El equipo de seguridad desea agradecer a las siguientes personas por informar responsablemente las vulnerabilidades y permitir que se corrijan en esta versión:

\n\n\n\n\n\n\n\n

Gracias a estos contribuyentes de WordPress

\n\n\n\n

Este lanzamiento fue dirigido por Aaron Jorbin.

\n\n\n\n

WordPress 6.5.5 no habría sido posible sin las contribuciones de las siguientes personas. Su coordinación asincrónica para ofrecer correcciones de mantenimiento y seguridad en una versión estable es un testimonio del poder y la capacidad de la comunidad de WordPress.

\n\n\n\n

Aaron Jorbin, Alex Concha, Andrew Ozz, bernhard-reiter, Colin Stewart, David Baumwald, Dennis Snell, Grant M. Kinney, Greg Ziółkowski, Jb Audras, Jonathan Desrosiers, Matias Ventura, Miguel Fonseca, Peter Wilson, Rajin Sharwar, Scott Reilly, Tonya Mork

\n\n\n\n

Cómo contribuir

\n\n\n\n

Para participar en el desarrollo central de WordPress, ve a Trac, elige un ticket y únete a la conversación en el canal #core de Slack. ¿Necesitas ayuda? Consulta el Manual del colaborador principal.

\n\n\n\n

¿Ya estás probando WordPress 6.6? La cuarta versión beta ya está disponible y contiene estas correcciones de seguridad. Para obtener más información sobre 6.6, consulta la entrada del anuncio de la beta 3. Obtén más información sobre cómo probar WordPress 6.6 aquí.

\n\n\n\n

Felicitaciones a Paul Kevan, Ehtisham Siddiqui, Alex Concha, Tonya Mork, y Angela Jin por su revisión.

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"https://es-mx.wordpress.org/2024/06/25/wordpress-6-5-5/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1032\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:2;a:6:{s:4:\"data\";s:79:\"\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:26:\"WordPress 6.5 “Regina”\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"https://es-mx.wordpress.org/2024/04/03/wordpress-6-5-regina/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"https://es-mx.wordpress.org/2024/04/03/wordpress-6-5-regina/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 03 Apr 2024 15:37:19 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:3:{i:0;a:5:{s:4:\"data\";s:15:\"Actualizaciones\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:12:\"Lanzamientos\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:2;a:5:{s:4:\"data\";s:3:\"6.5\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1021\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:369:\"Saluda a WordPress 6.5 “Regina”, inspirado en la versatilidad dinámica de la reconocida violinista de jazz Regina Carter. Artista galardonada y educadora de jazz reconocida por trascender el género, los fundamentos técnicos de Regina en la música clásica y su profundo conocimiento del jazz le han valido la reputación de ir audazmente más allá de […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:73321:\"\n
\"\"
\n\n\n\n

Saluda a WordPress 6.5 “Regina”, inspirado en la versatilidad dinámica de la reconocida violinista de jazz Regina Carter. Artista galardonada y educadora de jazz reconocida por trascender el género, los fundamentos técnicos de Regina en la música clásica y su profundo conocimiento del jazz le han valido la reputación de ir audazmente más allá de lo que es posible con el violín.

\n\n\n\n\n\n\n\n

Deja que los impresionantes giros y cambios sutiles del sonido innovador de Regina te sorprendan mientras exploras todo lo que ofrece 6.5.

\n\n\n\n

Esta última versión de WordPress pone más poder en los detalles. Ofrece formas nuevas y mejoradas de ajustar y mejorar su experiencia de creación de sitios, permitiéndote tomar el control de manera que lo hagas tuyo. Encontrarás nuevas formas de administrar la tipografía de tu sitio, revisiones más completas disponibles en más lugares y una colección de actualizaciones del Editor del sitio junto con impresionantes mejoras de rendimiento para ayudarlo a hacer las cosas de manera más fluida y rápida.

\n\n\n\n

“Regina” también marca la introducción de algunas herramientas innovadoras para desarrolladores que comenzarán a transformar la forma en que usas y amplías los bloques para crear experiencias atractivas. La API Interactivity abre un mundo de posibilidades creativas de interfaz, mientras que la API Block Bindings hace que las conexiones dinámicas entre bloques y datos sean perfectas. Estas, entre otras mejoras y actualizaciones centradas en los desarrolladores, están listas para ayudarle a evolucionar la forma en que construye con WordPress.

\n\n\n\n
\n\n
\n\n\n\n

¿Qué hay dentro de 6.5?

\n\n\n\n

Agrega y administra fuentes en tu sitio

\n\n\n\n

La nueva Biblioteca de fuentes te permite controlar una pieza esencial del diseño de tu sitio: la tipografía, sin codificación ni pasos adicionales. Instala, elimina y activa fácilmente fuentes locales y de Google en tu sitio para cualquier tema de Block. La capacidad de incluir colecciones de tipografía personalizadas brinda a los creadores y editores de sitios más opciones cuando se trata de diseñar contenido.

\n\n\n\n
\"\"
\n\n\n\n

Obtén más de tus revisiones, incluidas revisiones de plantillas y partes de plantillas

\n\n\n\n

Trabaja en proyectos creativos con una imagen más completa de lo que se ha hecho y a qué puede recurrir. Obtén detalles como marcas de tiempo, resúmenes rápidos y una lista paginada de todas las revisiones. Ve las revisiones del Libro de estilos para ver cómo los cambios afectan a cada bloque. Las revisiones ahora también están disponibles para plantillas y piezas de plantilla.

\n\n\n\n
\"\"
\n\n\n\n

Juega con herramientas mejoradas de fondo y sombra

\n\n\n\n\n\n\n\n
\"\"
\n\n\n\n

Descubre nuevas vistas de datos

\n\n\n\n

Cada parte de tu sitio viene con una biblioteca de información y datos; ahora puedes encontrar lo que necesitas rápidamente y organizarlo como desees. Las vistas de datos para páginas, plantillas, patrones y partes de plantillas te permiten ver datos en una vista de tabla o cuadrícula, con la opción de alternar campos y realizar cambios masivos.

\n\n\n\n
\"\"
\n\n\n\n

Arrastrar y soltar más suave

\n\n\n\n

Siente la diferencia cuando mueves cosas, con útiles señales visuales como elementos desplazados en la Vista de lista o arrastrándolos sin fricción a cualquier lugar de tu espacio de trabajo, de principio a fin.

\n\n\n\n
\"\"
\n\n\n\n

Controles de enlace mejorados

\n\n\n\n

Crea y administra enlaces fácilmente con una experiencia de creación de enlaces más intuitiva, como una interfaz de usuario optimizada y un acceso directo para copiar enlaces.

\n\n\n\n
\"\"
\n\n\n\n

Novedades para los desarrolladores en 6.5

\n\n\n\n

Lleva interacciones a bloques con la API de interactividad

\n\n\n\n

La API de interactividad ofrece a los desarrolladores un método estandarizado para crear experiencias de interfaz de usuario interactivas con bloques. Simplifica el proceso, con menos dependencia de herramientas externas, manteniendo al mismo tiempo un rendimiento óptimo. Úsalo para crear experiencias de usuario memorables, como obtener resultados de búsqueda al instante o permitir que los visitantes interactúen con el contenido en tiempo real.

\n\n\n\n

Conecta bloques a campos personalizados u otro contenido dinámico

\n\n\n\n

Vincula atributos de bloques principales a campos personalizados y utiliza el valor de los campos personalizados sin crear bloques personalizados. Con la tecnología de Block Bindings API, los desarrolladores pueden ampliar aún más esta capacidad para conectar bloques a cualquier contenido dinámico, incluso más allá de los campos personalizados. Si hay datos almacenados en otro lugar, apunta fácilmente los bloques a esa nueva fuente con solo unas pocas líneas de código.

\n\n\n\n

Agregar herramientas de apariencia a los temas clásicos

\n\n\n\n

Ofrece a los diseñadores y creadores que utilizan temas clásicos acceso a una experiencia de diseño mejorada. Opta por admitir opciones de espaciado, borde, tipografía y color, incluso sin utilizar theme.json. Una vez que se habilite el soporte, se agregarán automáticamente más herramientas a medida que estén disponibles.

\n\n\n\n

Explora mejoras en la experiencia del complemento

\n\n\n\n

Ahora existe una forma más sencilla de gestionar las dependencias de los plugins. Los autores de plugins pueden proporcionar un nuevo encabezado Requires Plugins con una lista separada por comas de los plugins requeridos, presentando a los usuarios enlaces para instalar y activar esos plugins primero.

\n\n\n\n

De rápido a más rápido: actualizaciones de rendimiento

\n\n\n\n

Esta versión incluye más de 110 actualizaciones de rendimiento, lo que da como resultado un aumento impresionante en la velocidad y la eficiencia en el Editor de publicaciones y el Editor del sitio. La carga es dos veces más rápida que en 6.4, con una velocidad de procesamiento de entrada hasta cinco veces más rápida que en la versión anterior.

\n\n\n\n

Los sitios traducidos ven una mejora de hasta un 25% en el tiempo de carga para esta versión, cortesía de Performant Translations. Otros aspectos destacados del rendimiento incluyen compatibilidad con imágenes AVIF y mejoras para registrar variaciones de bloques con devoluciones de llamada.

\n\n\n\n

Una tradición de inclusión

\n\n\n\n

Esta versión incluye más de 65 mejoras de accesibilidad en toda la plataforma, haciéndola más accesible que nunca. Contiene una solución importante que desbloquea el acceso a los submenús de administración para los usuarios de lectores de pantalla y otras personas que navegan con el teclado. Esta versión también agrega correcciones al contraste de color en los estados de enfoque del administrador, posicionamiento de elementos y enfoque del cursor, entre muchos otros, que ayudan a mejorar la experiencia de WordPress para todos.

\n\n\n\n

Obtén más información sobre WordPress 6.5

\n\n\n\n

Consulta la nueva página de WordPress 6.5 para obtener más información sobre las numerosas mejoras y funciones de esta versión, incluidas breves demostraciones de algunas de las funciones destacadas.

\n\n\n\n

Explora Learn WordPress para ver videos instructivos rápidos, talleres en línea y otros recursos gratuitos para mejorar tus conocimientos y habilidades de WordPress.

\n\n\n\n

Consulta la Guía de campo de WordPress 6.5 para obtener información técnica detallada y notas para desarrolladores que te ayudarán a crear con WordPress y aprovechar al máximo esta versión. No olvides suscribirte al Blog para desarrolladores para obtener actualizaciones para desarrolladores, tutoriales de funciones y otro contenido útil de WordPress desde la perspectiva del desarrollador.

\n\n\n\n

Para obtener más información sobre la instalación, cambios de archivos, correcciones y otras actualizaciones, lee las notas de la versión 6.5.

\n\n\n\n

El equipo de lanzamiento 6.5

\n\n\n\n

Cada lanzamiento tiene muchas partes móviles con sus propios triunfos y desafíos. Se necesita un equipo dedicado de colaboradores entusiastas para ayudar a mantener las cosas encaminadas y avanzando sin problemas. 6.5 es posible gracias a un grupo multifuncional de contribuyentes, siempre listos para defender ideas, eliminar obstáculos y resolver problemas.

\n\n\n\n\n\n\n\n

Gracias contribuyentes.

\n\n\n\n

WordPress cree en democratizar la publicación y las libertades que conlleva el código abierto. Apoyando esta idea hay una comunidad global y diversa de personas que colaboran para fortalecer el software.

\n\n\n\n

WordPress 6.5 refleja los innumerables esfuerzos y la pasión de alrededor de 700 colaboradores en al menos 57 países. ¡Este lanzamiento también dio la bienvenida a más de 150 contribuyentes nuevos!

\n\n\n\n

Su colaboración generó más de 2,500 mejoras y correcciones, lo que garantizó una versión estable para todos, un testimonio del poder y la capacidad de la comunidad de código abierto de WordPress.

\n\n\n\n

!Benni · _ck_ · Aaron Jorbin · Aaron Robertshaw · Abha Thakor · abletec · acosmin · Adam Silverstein · Adarsh Akshat · admcfajn · Ahmed Chaion · Ahmed Saeed · Akash Muchandikar · Aki Hamano · Akira Tachibana · akmelias · Akramul Hasan · Akshaya Rane · Alain Schlesser · Alan Fuller · Alex · Alex Concha · Alex King · Alex Kirk · Alex Lende · Alex Mills · Alex Stine · Alexander · Alexandre Buffet · Amber Hinds · Amy Hendrix (sabreuse) · Amy Kamala · Anand Upadhyay · Anders Norén · Andrea Fercia · Andrei Draganescu · Andrei Lupu · Andrew Hayward · Andrew Hutchings · Andrew Nacin · Andrew Norcross · Andrew Ozz · Andrew Serong · andrewleap · Andrii Balashov · André Maneiro · Andy Fragen · Andy Peatling · Aneesh Devasthale · Ankit K Gupta · Ankit Panchal · Anne McCarthy · Anthony Burchell · Antoine · Anton Lukin · Anton Timmermans · Anton Vlasenko · Antonella · Antonio D. · Antonis Lilis · arena94 · Ari Stathopoulos · Arslan Kalwar · Artemio Morales · Arthur Chu · Arun Chaitanya Jami · Arun Sharma · Arunas Liuiza · Asad Polash · Ashish Kumar (Ashfame) · Asish Chandra Mohon · audunmb · Aurooba Ahmed · Austin Matzko · axwax · Ayesh Karunaratne · Béryl de La Grandière · bahia0019 · Balu B · bangank36 · Barry · Barry · Bart Kalisz · bartkleinreesink · Beatriz Fialho · Beau Lebens · Beda · ben · Ben Dwyer · Ben Hansen · Ben Huson · Ben Lobaugh (blobaugh) · Ben Ritner – Kadence WP · Ben Word · Benjamin Zekavica · benjaminknox · Benoit Chantre · Bernhard Reiter · bernhard-reiter · billseymour · Biplav · Birgit Pauli-Haack · bobbingwide · Boone Gorges · born2webdesign · Brad Jorsch · Brad Parbs · Brad Williams · Brandon Kraft · Brandon Lavigne · Brian Coords · Brian Fischer · Brian Gardner · Brian Haas · Brian Henry · Brooke · burnuser · camya · Carlo Cannas · Carlos Bravo · Carlos G. P. · Carolina Nymark · cenkdemir · cfinnberg · Chad Chadbourne · chased@si.edu · chiilog (Chiaki Okamoto) · Chouby · Chris David Miles · Chris Reynolds · chriscct7 · christian-dale · Christopher · Chrystl · codepo8 · Colin Devroe · Colin Stewart · Corey Worrell · Cory Birdsong · Courtney Robertson · Creative Slice · crstauf · Cullen Whitmore · Cupid Chakma · cvorko · cybeardjm · Cyberchicken · Damon Cook · Dan Soschin · Daniel Bachhuber · Daniel Dvorkin · Daniel Käfer · Daniel Richards · Daniel Schutzsmith · danieldudzic · Daniele Scasciafratte · danieltj · darerodz · Darren Ethier (nerrad) · Darshit Rajyaguru · darssen · David Artiss · David Baumwald · David Biňovec · David Calhoun · David Herrera · David Levine · David Lingren · David Perez · David Smith · Dean Sas · Denis de Bernardy · Denis Žoljom · Dennis Hipp · Dennis Snell · Dennys Dionigi · Derek Blank · Derek Herman · Derek Springer · designsimply · Desrosj Bot · Devin Curtis · Devin Walker · Dharmesh Patel · Dhrumil Kumbhani · Dhruvi Shah · Dilip Bheda · Dion Hulse · Dominik Schilling · Dougal Campbell · Drew Jaynes · Dustin Falgout · Earle Davies · Ehtisham Siddiqui · Ella van Durpe · Emerson Maningo · emirpprime · Emmanuel Hesry · Endymion00 · Eric Andrew Lewis · Erick Hitter · Erik · Estela Rueda · Fabian Kägy · Fabian Todt · Fabio Rubioglio · Faisal Ahammad · Faisal Ahmed · Faisal Alvi · Fanly · Feast Design Co. · Felipe Elia · Felix Arntz · fgiannar · Florent Hernandez · Francesca Marano · FrancescoCarlucci · Frank Jäger · Frank Laszlo · Frank Wazeter · fushar · Gajendra Singh · Gan Eng Chin · Garbiñe · Gary Pendergast · gavande1 · Gennady Kovshenin · George Mamadashvili · George Stephanis · Gerard Reches · Gerardo Pacheco · Girish Panchal · Giuseppe Mazzapica · Glen Davies · goldenapples · Grant M. Kinney · Greg Ziółkowski · gregbenz · Guido Scialfa · gvgvgvijayan · H.M. Mushfiqur Rahman · hanneslsm · Hardik Raval · Hareesh S · Harsh Gajipara · Harsh Patel · Hasanuzzaman Shamim · Heather Lounsbury · Heiko Lübbe · Helen Hou-Sandi · HelgaTheViking · Hemant Tejwani · Hidekazu Ishikawa · Himani Panchal · Hit Bhalodia · Hitesh Talpada · Hossein · Howdy_McGee · Hridoy Mozumder · Hrithik Dalal · Hugh Lashbrooke · Hugo Chinchilla · hugod · huubl · Huzaifa Al Mesbah · Héctor Prieto · Ian Belanger · Ian Dunn · idad5 · Ignacio Cruz Moreno · ignatiusjeroe · Ihtisham Zahoor · Ilya Zolotov · ironprogrammer · Isabel Brison · iseulde · IT Path Solutions · itecrs · Ivan Zhuck · Jacob Cassidy · jadpm · James Collins · James Koster · James Roberts · Jamie Blomerus · Jamie Perrelet · Jan Thiel · jane · Janis Elsts · jansan · Japh · Jarda Snajdr · jarednova · Jason Adams · Jason Crist · Jason Crouse · Jason Johnston · Jason LeMahieu (MadtownLems) · Javier Casares · Jayadevan k · jbobich · Jean-Baptiste Audras · Jeff Ong · Jeffrey de Wit · Jeffrey Paul · Jenny Dupuy · Jeremy Felt · Jeremy Herve · jeryj · Jesús Amieiro · Jessica Lyschik · jghazally · Jip Moors · jivygraphics · jltallon · Joan · Joe · Joe Dolson · Joe Hoyle · Joe McGill · Joel James · Joen A. · John Blackbourn · John James Jacoby · johnciacia · Jon Brown · Jon Cave · Jon Surrell · Jonathan Bossenger · Jonathan Brinley · Jonathan Desrosiers · Jonny Harris · joppuyo · jordesign · Jorge Costa · Jorge Vilchez · jornp · Joseph Fusco · Josepha · joshcanhelp · joshuatf · Joy · JR Tashjian · JS Morisset · Juan Aldasoro · JuanMa Garrido · Juhi Saxena · Juliette Reinders Folmer · Justin Tadlock · K M Ashikur Rahman · K. Adam White · KafleG · Kai Hao · Kamrul Hasan · Kari Anderson · Karlijn Bok · Karol Manijak · Karthik Thayyil · Katka · kawsaralameven · Kelly Choyce-Dwan · Kevin Batdorf · Kevin Coleman · Kevin Taron · Kharis Sulistiyono · Kira Schroder · Kishan Jasani · kitchin · Kjell Reigstad · kkmuffme · Knut Sparhell · Koen Reus · Koesper · Konstantin Obenland · Krupa Nanda · Krupal Panchal · Kurt Payne · Kushang Tailor · Kylen Downs · lau@mindproducts.com.au · Laura Adamonis · Lauren Stein · Laurent MILLET · Lax Mariappan · Lena Morita · Leo Muniz · Leonardus Nugraha · Liam Gladdy · LiamMcArthur · Linkon Miyan · liviopv · lkraav · logikal16 · Lovekesh Kumar · luboslives · lucasbustamante · Luis Felipe Zaguini · Luis Herranz · Lukas Pawlik · Lukasz · Luke Cavanagh · Maarten · Madhu Dollu · Madhu Dollu · Maggie Cabrera · Mahbub Hasan Imon · mahnewr · Mahrokh · Malae · manfcarlo · manyourisms · Marc_J · Marcelo de Moraes Serpa · Marco Ciampini · Marcoevich · margolisj · Marie Comet · Marin Atanasov · Mario Santos · Marius L. J. · Mark Howells-Mead · Mark Jaquith · Marko Heijnen · Markus · martin.krcho · Mary Baum · mathewemoore · Matias Benedetto · Matias Ventura · matiasrecondo77 · Matt Mullenweg · Matteo Enna · Max Lyuchin · Maxime Pertici · Mayur Prajapati · Md Hossain Shohel · Md HR Shahin · Meg Phillips · megane9988 · Mel Choyce-Dwan · melcarthus · meta4 · metropolis_john · mevolkan · Micah Wood · Michael Showes · Michal Czaplinski · Michalooki · Miguel Fonseca · miguelsansegundo · Miikka · Mike Bijon · Mike Jolley (a11n) · Mike Schinkel · Mike Schroder · Mikin Chauhan · Milen Petrinski – Gonzo · mimi · mkismy · mnydigital · Mohammad Jangda · Monique Dubbelman · Monzur Alam · Morteza Geransayeh · mreishus · mrwweb · Muhammad Usman Iqbal · Muhibul Haque · mujuonly · Mukesh Panchal · Mumtahina Faguni · Musarrat Anjum Chowdhury · Naoki Ohashi · Naresh Bheda · Nate Allen · Navjot Singh · neffff · Neil Hainsworth · nendeb · NerdPress · Nick Diego · Nick Halsey · Nick Martianov · nickpagz · Nico · Nicole Furlan · Nicole Paschen Caylor · nidhidhandhukiya · Niels Lange · Nihar Ranjan Das · Nik Tsekouras · Nikita · nikmeyer · Nilambar Sharma · Nilo Velez · Niluthpal Purkayastha · Nirav Sherasiya · Nithin John · Nithin SreeRaj · Noah Allen · nosilver4u · Nowell VanHoesen · Nudge Themes · nwjames · obliviousharmony · ockham · oguzkocer · okat · Old account · olegfuture · Olga Gleckler · Paal Joachim Romdahl · Pacicio · pannelars · partyfrikadelle · Pascal Birchler · Patricia BT · Patrick Lumumba · Paul Bearne · Paul Biron · Paul de Wouters · Paul Kevan · Paul Wong-Gibbs · pavelevap · Peter Baylies · Peter Rubin · Peter Westwood · Peter Wilson · petitphp · Philipp Bammes · Philipp15b · Phill · Pieterjan Deneys · Pippin Williamson · Pitam Dey · pmeenan · Pooja Derashri · Pooja N Muchandikar · pooja9712 · pouicpouic · Prashant Baldha · Pratik Kumar · Prem Tiwari · Presskopp · presstoke · prionkor · Rafiq · Rajin Sharwar · Ramon Ahnert · Ramon Corrales · Ramon James · Rashi Gupta · rawrly · rcain · rebasaurus · Remy Perona · Renatho (a11n) · Rene Hermenau · retrofox · Riad Benguella · Rich Collier · Rich Tabor · Rishi Mehta · Rishi Shah · Robert Anderson · Rolf Allard van Hagen · room34 · Ryan Boren · Ryan McCue · Ryan Welcher · Ryann Micua · Ryo · Sé Reed · Sébastien SERRE · Sabbir Hasan · Sachyya · Sadi Mohammad Zaman · sadpencil · Sahil · Saiduzzaman Tohin · Sakib MD Nazmush · Sal Ferrarello · samba45 · Sampat Viral · Samuel Rüegger · Samuel Sidler · Samuel Wood (Otto) · Santiago Cerro López · Sarah Norris · Sarath AR · Satyam Vishwakarma (Satya) · Saxon Fletcher · Sayful Islam · Scott Kingsley Clark · Scott Taylor · scribu · Sergey Biryukov · Sergio de Falco · Seth Rubenstein · Shaharia Azam · Shail Mehta · ShaneF · Shannon Smith · shaunandrews · Shawn Hooper · shidouhikari · Shipon Karmakar · Shreyash Srivastava · Shubham Sedani · siddharth ravikumar · Siobhan · Sirajum Mahdi · sjregan · Soren Wrede · SourceView · sruthi89 · stacimc · Stefano Minoia · Stephen Bernhardt · Stephen Cronin · Stephen Edgar · Stephen Harris · Steven Lin · strarsis · Subrata Sarkar · Sumi Subedi · Sumit Bagthariya · Sumit Singh · SunilPrajapati · Svitlana Sukhoveiko · syamraj24 · Sybre Waaijer · Syed Balkhi · Syed Nuhel · Synchro · Takashi Irie · Takashi Kitajima · Tammie Lister · Tapan Kumer Das · Tara King · Taylor · Taylor Dewey · Taylor Gorman · tazotodua · Teddy Patriarca · Tellyworth · Thakor Darshil · them.es · thinkluke · Thomas Griffin · Thomas Kräftner · threadi · Tim Nolte · timbroddin · Timothée Brosille · Timothy Jacobs · tmatsuur · TobiasBg · tobifjellner (Tor-Bjorn Fjellner) · Tom · Tom Cafferkey · Tom Finley · Tom J Nowell · tomluckies · Tomoki Shimomura · tomsommer · tomxygen · Toni Viemerö · Tonya Mork · Toro_Unit (Hiroshi Urabe) · torres126 · Torsten Landsiedel · Toru Miki · toscho · Travis Smith · tropicalista · Trupti Kanzariya · Ugyen Dorji · upadalavipul · Utsav Patel · Utsav tilava · Uttam Kumar Dash · valerogarte · Vicente Canales · vikram6 · viliamkopecky · Vipul Ghori · vivekawsm · vladimiraus · vortfu · Vraja Das · Wasiur Rahman · welaunchio · Weston Ruter · WHSajid · WP Corner · xlthlx · Yan Sern · Yannis Guyon · Yui · Yuliyan Slavchev · Yuvrajsinh Sisodiya · Zack Tollman · Zane Matthew · zieladam · Zunaid Amin · Česlav Przywara

\n\n\n\n

Más de 70 regiones han traducido el 90 por ciento o más de WordPress 6.5 a su idioma. Los traductores de la comunidad están trabajando arduamente para garantizar que haya más traducciones en camino. Gracias a todos los que ayudan a que WordPress esté disponible en 200 idiomas.

\n\n\n\n

Por último, pero no menos importante, gracias a los voluntarios que contribuyen a los foros de soporte respondiendo preguntas de los usuarios de WordPress de todo el mundo.

\n\n\n\n

Involúcrate y contribuye

\n\n\n\n

La participación en WordPress no se limita a la codificación. Si le atrae contribuir, aprender más e involucrarse es fácil. Descubre los equipos que se unen en Make WordPress y utiliza esta herramienta interactiva para ayudarte a decidir cuál es la adecuada para ti.

\n\n\n\n

Un haiku más

\n\n\n\n

¡6.5 ya está aquí!
Juega, interactúa, construye mejor,
Más fuerte y más rápido.

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:65:\"https://es-mx.wordpress.org/2024/04/03/wordpress-6-5-regina/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1021\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:3;a:6:{s:4:\"data\";s:73:\"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:33:\"El mes en WordPress: Febrero 2024\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:72:\"https://es-mx.wordpress.org/2024/03/08/el-mes-en-wordpress-febrero-2024/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:80:\"https://es-mx.wordpress.org/2024/03/08/el-mes-en-wordpress-febrero-2024/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 08 Mar 2024 18:19:29 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Mes en WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1016\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:377:\"En febrero se produjo un progreso significativo hacia el próximo lanzamiento de WordPress 6.5 y los preparativos finales para WordCamp Asia. Se publicaron los resultados de la encuesta anual de WordPress y comenzaron las discusiones sobre los próximos pasos del proyecto de liberación de datos. Sigue leyendo para conocer los últimos acontecimientos en el espacio […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:9577:\"\n

En febrero se produjo un progreso significativo hacia el próximo lanzamiento de WordPress 6.5 y los preparativos finales para WordCamp Asia. Se publicaron los resultados de la encuesta anual de WordPress y comenzaron las discusiones sobre los próximos pasos del proyecto de liberación de datos. Sigue leyendo para conocer los últimos acontecimientos en el espacio de WordPress.

\n\n\n\n\n\n\n\n

Prepárate para WordCamp Asia

\n\n\n\n

El escenario está listo para el primer evento emblemático de WordPress del año en Taipei, Taiwán. WordCamp Asia 2024 comenzó el 7 de marzo y promete tres días de aprendizaje, networking e inspiración.

\n\n\n\n

El calendario de este año presenta una extensa lista de oradores, incluidos los invitados Josepha Haden Chomphosy, Ben Thompson, Noel Tock, y JU-CHUN KO. Para concluir la cumbre, los asistentes pueden interactuar con el cofundador de WordPress, Matt Mullenweg, en una sesión de preguntas y respuestas. Descubre cómo enviar tus preguntas.

\n\n\n\n

¿No puedes llegar a Taipei? Ve la transmisión en vivo del evento en el canal de YouTube de WordPress.

\n\n\n\n

Cuenta atrás para WordPress 6.5

\n\n\n\n

WordPress 6.5 está en camino para su tan esperado lanzamiento el 26 de marzo. Después de los lanzamientos beta del mes pasado, la primera versión candidata (RC1) ya está disponible para pruebas, lo que marca otro hito en el ciclo de desarrollo.

\n\n\n\n

Esta versión importante agregará delicadeza y ajuste a la forma en que controla su experiencia de creación de sitios, con mucho que explorar específicamente para los desarrolladores. Obtén una descripción detallada de las funciones destacadas en el anuncio de la Beta 1.

\n\n\n\n

Nuevo en el plugin Gutenberg

\n\n\n\n

En febrero se enviaron dos nuevas versiones de Gutenberg:

\n\n\n\n\n\n\n\n

Actualizaciones del equipo

\n\n\n\n\n\n\n\n

Solicitudes de comentarios y pruebas

\n\n\n\n\n\n\n\n

Eventos de WordPress

\n\n\n\n\n\n\n\n
\n\n\n\n

¿Tienes una historia que podríamos incluir en el próximo número de ‘El Mes en WordPress’? Háznoslo saber llenando este formulario (en inglés).

\n\n\n\n

Traducido de wordpress.org/news

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:77:\"https://es-mx.wordpress.org/2024/03/08/el-mes-en-wordpress-febrero-2024/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1016\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:4;a:6:{s:4:\"data\";s:73:\"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"El mes en WordPress: Diciembre 2023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:74:\"https://es-mx.wordpress.org/2024/01/31/el-mes-en-wordpress-diciembre-2023/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"https://es-mx.wordpress.org/2024/01/31/el-mes-en-wordpress-diciembre-2023/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 31 Jan 2024 20:00:14 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Mes en WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1010\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:315:\"A medida que 2023 llegaba a su fin, WordPress se despidió con el tan esperado State of the Word y la hoja de ruta 6.5, entre otras actualizaciones interesantes. Sigue leyendo para obtener más información sobre las celebraciones de fin de año de la comunidad y echar un vistazo a lo que nos espera para […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:10525:\"\n

A medida que 2023 llegaba a su fin, WordPress se despidió con el tan esperado State of the Word y la hoja de ruta 6.5, entre otras actualizaciones interesantes.

\n\n\n\n

Sigue leyendo para obtener más información sobre las celebraciones de fin de año de la comunidad y echar un vistazo a lo que nos espera para el próximo año.

\n\n\n\n\n\n\n\n

Aspectos destacados del State of the Word

\n\n\n\n

El 11 de diciembre, el cofundador de WordPress, Matt Mullenweg, pronunció su discurso anual sobre el State of the Word en Madrid, España, marcando la primera edición internacional del evento. Casi 200 entusiastas de WordPress y líderes de la industria tecnológica se reunieron en persona para escuchar lo que sigue para WordPress, con una gran audiencia uniéndose en línea o desde una de las 47 fiestas de observación celebradas en 18 países.

\n\n\n\n

El discurso de apertura destacó los hitos del año pasado y mostró demostraciones convincentes, brindando una idea de los próximos desarrollos para el editor del sitio, la fase de colaboración y el rediseño del administrador. Matt también presentó el enfoque de 2024 en la liberación de datos, con el objetivo de desbloquear barreras digitales y migraciones sin fricciones a WordPress para una web más abierta.

\n\n\n\n
\n\n
\n\n\n\n

El evento concluyó con una sesión de preguntas y respuestas y esta entrada de seguimiento.

\n\n\n\n

Hoja de ruta hacia WordPress 6.5

\n\n\n\n

El lanzamiento de WordPress 6.5 está programado para el 26 de marzo de 2024. Esta versión importante presentará una nueva biblioteca de fuentes para una fácil administración global de fuentes, soporte para herramientas de apariencia en temas clásicos, vistas de datos para plantillas y patrones, y revisiones más completas en todo el mundo. experiencia en edición, entre otros aspectos destacados.

\n\n\n\n

6.5 también incluirá nuevas API como Interactividad, Campos personalizados y Enlace de bloques que amplían las capacidades de bloque y respaldan funciones como Anulaciones de patrones sincronizados.

\n\n\n\n

Obtén más información sobre las funciones previstas para WordPress 6.5 en esta entrada de hoja de ruta.

\n\n\n\n
\n

No esperes a la próxima versión para optimizar sus flujos de trabajo creativos con estas potentes herramientas del Editor del sitio.

\n
\n\n\n\n

Nuevo en el plugin Gutenberg

\n\n\n\n

En diciembre se enviaron dos nuevas versiones de Gutenberg:

\n\n\n\n\n\n\n\n

Actualizaciones del equipo

\n\n\n\n\n\n\n\n

Eventos de WordPress

\n\n\n\n\n\n\n\n
\n\n\n\n

¿Tienes una historia que podríamos incluir en el próximo número de ‘El Mes en WordPress’? Háznoslo saber llenando este formulario (en inglés).

\n\n\n\n

Las siguientes personas contribuyeron a este mes en WordPress: Bernard Meyer, Nicholas Garofalo, y Lauren Stein

\n\n\n\n

Traducido de wordpress.org/news

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:79:\"https://es-mx.wordpress.org/2024/01/31/el-mes-en-wordpress-diciembre-2023/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1010\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:5;a:6:{s:4:\"data\";s:57:\"\n \n \n \n \n \n \n \n\n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:4:{s:0:\"\";a:6:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:33:\"El mes en WordPress: Octubre 2023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:72:\"https://es-mx.wordpress.org/2023/11/15/el-mes-en-wordpress-octubre-2023/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 15 Nov 2023 13:42:21 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Mes en WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1004\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:0:\"\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:1989:\"\n\n
\n \n
\n \n

Suscríbete para seguir leyendo

\n \n \n

\n Conviértete en suscriptor de pago para obtener acceso al resto de esta entrada y otro contenido exclusivo.\n

\n \n \n
\n \n \n \n
\n \n
\n \n
\n\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1004\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:6;a:6:{s:4:\"data\";s:79:\"\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"WordPress 6.4.1: Actualización de mantenimiento\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:86:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-1-actualizacion-de-mantenimiento/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:94:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-1-actualizacion-de-mantenimiento/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 09 Nov 2023 14:24:28 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:3:{i:0;a:5:{s:4:\"data\";s:15:\"Actualizaciones\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:13:\"Mantenimiento\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:2;a:5:{s:4:\"data\";s:3:\"6.4\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1001\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:380:\"¡WordPress 6.4.1 ya está disponible! Esta versión menor presenta cuatro correcciones de errores. Puedes revisar un resumen de las actualizaciones de mantenimiento en esta versión leyendo el anuncio de la versión candidata o viendo la lista de tickets en Trac. WordPress 6.4.1 es una versión de ciclo corto. Si tienes sitios que admiten actualizaciones automáticas […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:6118:\"\n

¡WordPress 6.4.1 ya está disponible!

\n\n\n\n

Esta versión menor presenta cuatro correcciones de errores. Puedes revisar un resumen de las actualizaciones de mantenimiento en esta versión leyendo el anuncio de la versión candidata o viendo la lista de tickets en Trac.

\n\n\n\n\n\n\n\n

WordPress 6.4.1 es una versión de ciclo corto. Si tienes sitios que admiten actualizaciones automáticas en segundo plano, el proceso de actualización comenzará automáticamente. Si tu sitio no se actualiza automáticamente, también puedes actualizarlo desde tu Escritorio de WordPress.

\n\n\n\n

Puedes descargar WordPress 6.4.1 desde WordPress.org o visitar tu Escritorio de WordPress, hacer clic en “Actualizaciones” y luego hacer clic en “Actualizar ahora”.

\n\n\n\n

Para obtener más información sobre esta versión, visita el sitio HelpHub.

\n\n\n\n

Gracias a estos contribuyentes de WordPress

\n\n\n\n

Este lanzamiento fue dirigido por Aaron Jorbin y Tonya Mork. Gracias a todos los que probaron RC y 6.4.1 y generaron informes.

\n\n\n\n

WordPress 6.4.1 no habría sido posible sin las contribuciones de las siguientes personas. Su coordinación rápida y concertada para implementar correcciones de mantenimiento en una versión estable es un testimonio del poder y la capacidad de la comunidad de WordPress.

\n\n\n\n

@afragen @clorith @desrosj @pbiron @schlessera @azaozz @davidbaumwald @tomsommer @nexflaszlo @howdy_mcgee @baxbridge @earnjam @timothyblynjacobs @johnbillion @flixos90 @joedolson @jeffpaul @zunaid321 @courane01 @audrasjb @tacoverdo @ironprogrammer @webcommsat @otto42 @barry @chanthaboune @rajinsharwar @aaroncampbell @peterwilsoncc @anandau14 @iandunn @matthewjho @coffee2code @boogah @jason_the_adams @joemcgill @johnjamesjacoby @jrf @renehermi @dlh @mukesh27 @sumitbagthariya16 @starbuck @sergeybiryukov

\n\n\n\n

Cómo contribuir

\n\n\n\n

Para participar en el desarrollo central de WordPress, diríjete a Trac, selecciona un ticket y únete a la conversación en el canal #core. ¿Necesitas ayuda? Consulta el Manual del colaborador principal.

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:91:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-1-actualizacion-de-mantenimiento/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1001\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:7;a:6:{s:4:\"data\";s:79:\"\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:27:\"WordPress 6.4 “Shirley”\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:61:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-shirley/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:69:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-shirley/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 09 Nov 2023 14:18:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:3:{i:0;a:5:{s:4:\"data\";s:15:\"Actualizaciones\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:12:\"Lanzamientos\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:2;a:5:{s:4:\"data\";s:3:\"6.4\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://es-mx.wordpress.org/?p=988\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:334:\"Saluda a WordPress 6.4 “Shirley”, que lleva el nombre de la icónica artista de jazz Shirley Horn. Su voz distintiva y su extraordinaria conexión con el piano la establecieron como una de las principales músicos de jazz de su generación. El viaje de Horn desde la escena del jazz de Washington D.C. hasta el escenario […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:75814:\"\n
\"\"
\n\n\n\n

Saluda a WordPress 6.4 “Shirley”, que lleva el nombre de la icónica artista de jazz Shirley Horn. Su voz distintiva y su extraordinaria conexión con el piano la establecieron como una de las principales músicos de jazz de su generación. El viaje de Horn desde la escena del jazz de Washington D.C. hasta el escenario internacional es un testimonio de su dedicación y perseverancia. Su influencia llegó mucho más allá de los límites del jazz tradicional, rompiendo fronteras e inspirando a audiencias de todo el mundo.

\n\n\n\n\n\n\n\n

Disfruta del ritmo suave de la música de Shirley Horn mientras disfrutas de todo lo que ofrece 6.4.

\n\n\n\n

Esta última versión de WordPress presenta un tema predeterminado nuevo y versátil y un conjunto de actualizaciones para potenciar cada paso de su viaje creativo. Elabora tu contenido sin problemas con más mejoras de redacción. Explora más formas de hacer realidad su visión y optimizar la edición del sitio con herramientas mejoradas. Si eres nuevo en WordPress o un creador experimentado, “Shirley” tiene algo para ti. Descubre la flexibilidad inigualable de construir con bloques y deja volar tus ideas.

\n\n\n\n
\n

Muchas de las características y mejoras de WordPress 6.4 se incluyen en la categoría “pequeñas pero poderosas”. Junto con la belleza adaptable del tema Twenty Twenty-Four, estas actualizaciones ayudan a los creadores de contenido y desarrolladores de sitios a ahorrar tiempo y esfuerzo al tiempo que brindan la experiencia de WordPress de alto valor y sin complicaciones que el mundo espera.

\nJosepha Haden Chomphosy, directora ejecutiva de WordPress
\n\n\n\n
\n\n
\n\n\n\n

¿Qué hay dentro 6.4?

\n\n\n\n

Conoce Twenty Twenty-Four

\n\n\n\n

Experimente la edición de sitios en su máxima expresión con Twenty Twenty-Four. Este nuevo tema predeterminado multifacético ha sido cuidadosamente diseñado teniendo en mente tres casos de uso distintos, desde escritores y artistas hasta emprendedores. Ahorra tiempo y esfuerzo con su extensa colección de más de 35 plantillas y patrones y descubre un mundo de posibilidades creativas con algunos ajustes. La notable flexibilidad de Twenty Twenty-Four garantiza una adaptación ideal para casi cualquier tipo de sitio. Compruébalo en esta demostración.

\n\n\n\n
\"\"
\n\n\n\n

Deja que tu escritura fluya

\n\n\n\n

Las nuevas mejoras garantizan que tu proceso de creación de contenido sea fluido. Encuentra nuevos atajos de teclado en la Vista de lista, combinación de listas más inteligente y control mejorado sobre la configuración de enlaces. Una experiencia de barra de herramientas coherente para los bloques de Navegación, Lista y Cotización le permite trabajar de manera eficiente con las opciones de herramientas que necesita.

\n\n\n\n
\"\"
\n\n\n\n

La paleta de comandos acaba de mejorar

\n\n\n\n

Introducida por primera vez en WordPress 6.3, la paleta de comandos es una poderosa herramienta para encontrar rápidamente lo que necesitas, realizar tareas de manera eficiente y acelerar el flujo de trabajo de su construcción. Disfruta de un diseño renovado y nuevos comandos para realizar acciones específicas de bloques en esta versión.

\n\n\n\n
\"\"
\n\n\n\n

Categorizar y filtrar patrones

\n\n\n\n

Los patrones son una excelente manera de aprovechar el potencial de los bloques y simplificar el proceso de creación de tu sitio. WordPress 6.4 te permite organizarlos con categorías personalizadas. Además, el nuevo filtrado avanzado en la sección Patrones del insertador hace que encontrar todos sus patrones sea más intuitivo.

\n\n\n\n
\"\"
\n\n\n\n

Se creativo con más herramientas de diseño

\n\n\n\n

Crea diseños atractivos y funcionales con un conjunto ampliado de herramientas de diseño. Juega con imágenes de fondo en bloques de grupo para obtener diseños únicos y mantén las dimensiones de la imagen consistentes con las proporciones de aspecto del marcador de posición. ¿Quieres agregar botones a tu bloque de navegación? Ahora puedes hacerlo cómodamente sin una línea de código.

\n\n\n\n
\"\"
\n\n\n\n

Haz que tus imágenes destaquen

\n\n\n\n

Habilita la funcionalidad de caja de luz para permitir que los visitantes de su sitio disfruten de imágenes interactivas en pantalla completa al hacer clic. Aplícalo globalmente o a imágenes específicas para personalizar la experiencia de visualización.

\n\n\n\n
\"\"
\n\n\n\n

Cambia el nombre de los bloques de grupo

\n\n\n\n

Pónle un nombre personalizado a los bloques de grupo para organizar y distinguir áreas de su contenido fácilmente. Estos nombres serán visibles en la Vista de lista.

\n\n\n\n
\"\"
\n\n\n\n

Vista previa de imágenes en vista de lista

\n\n\n\n

Las nuevas vistas previas de los bloques de Galería e Imágenes en la Vista de lista le permiten visualizar y ubicar dónde están las imágenes de tu contenido de un vistazo.

\n\n\n\n
\"\"
\n\n\n\n

Compartir patrones entre sitios

\n\n\n\n

¿Necesitas utilizar tus patrones personalizados en otro sitio? Importarlos y exportarlos como archivos JSON desde la vista de patrones del Editor del sitio.

\n\n\n\n
\"\"
\n\n\n\n

Presentación de los bloques Hooks

\n\n\n\n

Los bloques Hooks permiten a los desarrolladores insertar automáticamente bloques dinámicos en ubicaciones de contenido específicas, enriqueciendo la extensibilidad de los temas de bloques a través de plugins. Si bien se considera una herramienta para desarrolladores, esta función está diseñada para respetar sus preferencias y le brinda control total para agregar, descartar y personalizar bloques insertados automáticamente según sus necesidades.

\n\n\n\n
\"\"
\n\n\n\n

El rendimiento gana

\n\n\n\n

Esta versión incluye más de 100 actualizaciones relacionadas con el rendimiento para una experiencia más rápida y eficiente. Las mejoras notables se centran en el rendimiento de carga de plantillas para temas (incluido Twenty Twenty-Four), el uso de estrategias de carga de scripts “diferidas” y “asíncronas” en el núcleo, los bloques y los temas, y la optimización de las opciones de carga automática.

\n\n\n\n

Aspectos destacados de la accesibilidad

\n\n\n\n

Cada lanzamiento se compromete a hacer que WordPress sea accesible para todos. WordPress 6.4 trae varias mejoras en la Vista de lista y compatibilidad con etiquetas aria para el bloque de Navegación, entre otras cosas destacadas. La interfaz de usuario del administrador incluye mejoras en la ubicación de los botones, el contexto de los elementos del menú “Agregar nuevo” y los mensajes hablados sobre el estado del sitio. Obtén más información sobre todas las actualizaciones destinadas a mejorar la accesibilidad.

\n\n\n\n

Otras notas de interés

\n\n\n\n\n\n\n\n

Obtén más información sobre WordPress 6.4

\n\n\n\n

Consulta la nueva página de WordPress 6.4 para obtener más información sobre las numerosas mejoras y características de esta versión.

\n\n\n\n

Explora Learn WordPress para ver videos instructivos rápidos, talleres en línea y otros recursos gratuitos para mejorar sus conocimientos y habilidades de WordPress.

\n\n\n\n

Si buscas notas técnicas detalladas sobre nuevos cambios, la Guía de campo de WordPress 6.4 es para ti. No olvides suscribirte al Blog para desarrolladores para estar al tanto de las últimas actualizaciones de desarrollo, tutoriales y más.

\n\n\n\n

Para obtener más información sobre instalación, correcciones y cambios de archivos, visita las notas de la versión 6.4.

\n\n\n\n

El equipo de lanzamiento 6.4

\n\n\n\n

​​La versión WordPress 6.4 llega de la mano de un equipo de lanzamiento de género subrepresentado para dar la bienvenida y potenciar diversas voces en el proyecto de código abierto de WordPress.

\n\n\n\n
\n

Ser parte del equipo de coordinación de la versión 6.4 me ha permitido observar de cerca el intrincado proceso de lanzamiento, donde cada detalle, por menor que sea, se aborda meticulosamente, teniendo en cuenta varios factores como el rendimiento y la compatibilidad con versiones anteriores. Todavía hay mucho que aprender, pero me siento afortunado de haber tenido la oportunidad de contribuir a WordPress 6.4.

\nAkshaya Rane, miembro del equipo coordinador de la versión 6.4
\n\n\n\n

Durante varias semanas, el equipo de lanzamiento 6.4 mantuvo el lanzamiento encaminado y avanzó liderando el trabajo colectivo, conectando ideas y eliminando obstáculos.

\n\n\n\n\n\n\n\n

Gracias contribuyentes.

\n\n\n\n

WordPress cree en democratizar la publicación y las libertades que conlleva el código abierto. Apoyando esta idea hay una comunidad global y diversa de personas que trabajan juntas para fortalecer el software.

\n\n\n\n

WordPress 6.4 refleja los innumerables esfuerzos y la pasión de más de 600 contribuyentes en al menos 56 países. ¡Este lanzamiento también dio la bienvenida a más de 170 contribuyentes nuevos!

\n\n\n\n

Su colaboración generó más de 1150 mejoras y correcciones, lo que garantizó una versión estable para todos, un testimonio del poder y la capacidad de la comunidad de código abierto de WordPress.

\n\n\n\n

6adminit · Aaron D. Campbell · Aaron Jorbin · Aaron Robertshaw · aayusha · Abha Thakor · Abid Omar · Adam Silverstein · Adhun Anand · admcfajn · adrianduffell · aegkr · ahardyjpl · Ahmed Hussein · Ahmed Kabir Chaion · ajakaroth · Aki Hamano · Akihiro Harai · Akira Tachibana · Akshaya Rane · Al-Amin Firdows · Alain Schlesser · Albert Juhé Lluveras · Alex Concha · Alex King · Alex Lende · Alex Stine · Alexandre Buffet · Alisha Bajracharya · Allison Tarr · Alvi Tazwar · amedv · Ana Cirujano · Anand Upadhyay · Anders Norén · André · Andrea Fercia · Andrei Draganescu · Andrew Hayward · Andrew Hutchings · Andrew Nacin · Andrew Ozz · Andrew Serong · Andrew Wilder · Andy Fragen · Andy Peatling · Ankit Gade · Ankit K Gupta · Ankit Panchal · Anna · Anne Katzeff · Anne McCarthy · Anne-Mieke Bovelett · anphira · Anthony Burchell · Anton Plauche · Anton Timmermans · Anton Vlasenko · Anveshika Srivastava · archon810 · arena · Ari Stathopoulos · Arnab Mondal · Artemio Morales · Arthur Chu · asafm7 · Aslam Doctor · Aurooba Ahmed · Austin Ginder · Ayesh Karunaratne · azharckra · Balu B · bangank36 · barbmiller · Barry · Bart · Basilis Kanonidis · Beatriz Fialho · behoney · ben · Ben Dwyer · Ben Greeley · Ben Hansen · Benjamin Intal · Benjamin Zekavica · benjaminknox · Benoit Chantre · Bernhard Reiter · Bernie Reiter · Bhrugesh Bavishi · Bijay Yadav · Binsaifullah · Biplav · Birendra Dhami · Birgit Olzem · Birgit Pauli-Haack · Block Themes Pro · bmalsht · bonger · bookwyrm · Boone Gorges · Boro Sitnikovski · Brad Jorsch · Bradley Jacobs · Brandon Kraft · Brandon Vreeman · Brian Gardner · Brian Haas · Brooke · Brooke. · Bud Kraus · Caleb Burks · Calvin Alkan · Carlo Cannas · Carlos Bravo · Carlos G. P. · Carolina Nymark · Cathi Bosco · ceer · cenkdemir · Chad Chadbourne · chased@si.edu · Chintan hingrajiya · Chip Bennett · Chloé Bringmann · Chris Runnells · chriscct7 · chrisdesrochers · codersantosh · Colin Stewart · Corey Worrell · Courtney Patubo Kranzke · Courtney Robertson · Crisoforo Gaspar · crstauf · Csaba (LittleBigThings) · Cupid Chakma · cybeardjm · Cyberchicken · Daisuke Takahashi · Dajeema Rai · Damon Cook · Damon Sharp · Dan Tovbein · Daniel Bachhuber · Daniel Richards · danieldudzic · Daniele Scasciafratte · Danielle Zarcaro · danieltj · darerodz · Darin Kotter · darkfate · Darren Ethier (nerrad) · Darshit Rajyaguru · Dave Loodts · dave03 · David Baumwald · David Biňovec · David Calhoun · David E. Smith · David Favor · David Herrera · David Ryan · David Smith · Dawid Urbanski · daxelrod · De Belser Arne · Dean Sas · Dee Teal · Deepak Vijayan · Denis Žoljom · Dennis Snell · Derek Blank · Derrick Tennant · Devan Ferguson · Dharmesh Patel · Dhrumil Kumbhani · Dhruvi Shah · Diane Co · Dilip Bheda · Dimitris Mitsis · Dion Hulse · DJ · dj.cowan · Dominik Schilling · doughamlin · Drew Jaynes · Earle Davies · Ebonie Butler · Edi Amin · Edward Caissie · Ehtisham S. · Ella van Durpe · Ellen Bauer · emailjoey · Emerson Maningo · Emily Clarke · Emily Leffler Schulman · emirpprime · enodekciw · Enrico Battocchi · Erik Betshammar · Esrat Sultana Popy · Estela Rueda · Fabian Kägy · Fabian Todt · Fabio Rubioglio · Faisal Alvi · Felipe Elia · Felix Arntz · Femy Praseeth · floydwilde · FolioVision · Francesca Marano · Frank Laszlo · Fredde Battel · fzhantw · Gabriel Koen · Ganesh Dahal · Garrett Hyder · Gary Cao · Gary Pendergast · Gennady Kovshenin · George Hotelling · George Mamadashvili · Gerardo Pacheco · Gio Lodi · Glen Davies · Gnanasekaran Loganathan · Gopal Krishnan · GOZER · gpotter · Grant M. Kinney · Greg Ross · Greg Ziółkowski · gregfuller · Guss77 · Gustavo Bordoni · gvgvgvijayan · Héctor Prieto · H.M. Mushfiqur Rahman · hanneslsm · Hanzala Taifun · Hareesh S · Harsh Gajipara · Hasanuzzaman · Haz · Helen Hou-Sandi · Hemant Tejwani · Hit Bhalodia · hlunter · Howdy_McGee · Huzaifa Al Mesbah · Ian Dunn · Incursa Designs · ironprogrammer · Isabel Brison · itecrs · Ivan Zhuck · jaimieolmstead · Jakaria Istauk · Jake Goldman · Jake Spurlock · James Hunt · James Janco · James Koster · James Roberts · james0r · Jamie McHale · Jamie Perrelet · Jamie VanRaalte · jane · Jarda Snajdr · Jari Vuorenmaa · Jarko Piironen · Jason Adams · Jason Cosper · Jason Crist · jastos · Jean-Baptiste Audras · Jeff Bowen · Jeff Everhart · Jeff Ong · jeffikus · Jeffrey Paul · jeflopo · Jeremy Felt · Jeremy Herve · Jeremy Yip · jeryj · Jesin A · Jessica Duarte · Jessica Goddard · Jessica Lyschik · Jick · Jip Moors · jivygraphics · Joe Dolson · Joe Hoyle · Joe McGill · Joen A. · John Blackbourn · John Hooks · John James Jacoby · John Regan · Jon Brown · Jon Cave · Jonathan Desrosiers · Jonny Harris · Jono Alderson · Joona · Joost de Valk · JordanPak · jordesign · Jorge Costa · Joseph G. · Josepha Haden · joshcanhelp · joshuatf · JR Tashjian · Juan Aldasoro · JuanMa Garrido · Juliette Reinders Folmer · Justin Tadlock · Jyolsna J E · K M Ashikur Rahman · K. Adam White · KafleG · Kai Hao · Kalmang · Kalpesh · Kamrul Hasan · Karlijn Bok · Karol Manijak · Karthik Thayyil · Katie Ayres · kawsaralameven · Keanan Koppenhaver · Kelly Choyce-Dwan · Kevin Fodness · Kevin Miller · Kevin Taron · khleomix · Khokan Sardar · Kim Coleman · Kishan Jasani · kkmuffme · Koji Kuno · Konstantin Kovshenin · Konstantin Obenland · Kopila Shrestha · krokodok · Krupal Panchal · Labun Chemjong · Lance Willett · LarryWEB · lastsplash (a11n) · lau@mindproducts.com.au · launchinteractive · Laura Adamonis · Laura Byrne · laurelfulford · Lauren · Laxmikant Bhumkar · Lee Willis · Lena Morita · Liam Gladdy · Linkon Miyan · Linnea Huxford · Lloyd Budd · Lovekesh Kumar · Luigi · Luis Felipe Zaguini · Luis Herranz · Luke Cavanagh · lunaluna · lyndauwp · Márcio Duarte · maciejmackowiak · madejackson · Madhu Dollu · Madhu Dollu · Maggie Cabrera · Mahbub Hasan Imon · Mahrokh · Mai · Maja Benke · maltfield · Manesh Timilsina · manfcarlo · Manzoor Wani · marcelle42 · Marcelo de Moraes Serpa · Marco Ciampini · Marco Pereirinha · Marcoevich · margolisj · Marin Atanasov · Mario Santos · Marius L. J. · Mark Jaquith · Marko Ivanovic · Marta Torre · Martijn van der Klis · martin.krcho · Mary Baum · Masoud NKH · mathsgrinds · Matias Benedetto · Matias Ventura · Matt Keys · Matt Watson · Matthaus Klute · Matthew Eppelsheimer · Matthew Farlymn · Matthew Haines-Young · matthewjho · maurodf · Maxwell Morgan · maysi · Md HR Shahin · meagan hanes · Mehedi Hassan · Meher Bala · Mel Choyce-Dwan · mer00x · merel1988 · Michael Arestad · Michael Burridge · Michael Showes · Michal Czaplinski · Michalooki · Michelle Blanchette · Michelle Frechette · Michi91 · Miguel Fonseca · Mikael Korpela · Mike Jolley (a11n) · Mike McAlister · Mike Schinkel · Mike Schroder · Mike Straw · Mikin Chauhan · Milen Petrinski – Gonzo · mimi · mitchellaustin · Monir · Mrinal Haque · mrwweb · Muhammad Arslan · Muhibul Haque · mujuonly · Mukesh Panchal · Mumtahina Faguni · Mushrit Shabnam · Myles Taylor · Nalini Thakor · nandhuraj · Nazgul · Nazmul Sabuz · Neil Hainsworth · nendeb · Nick Diego · Nicolas Juen · Nicole Furlan · nicomollet · nidhidhandhukiya · Niels Lange · Nihar Ranjan Das · Nik Tsekouras · Nilambar Sharma · Nilo Velez · niravsherasiya7707 · Nitesh Das · Nithin John · Nithin SreeRaj · Noah Allen · Nyasha · ockham · Ohia · okat · Olga Gleckler · Oliver Campion · OllieJones · Paal Joachim Romdahl · pannelars · Pascal Birchler · Paul Biron · Paul Kevan · pavelevap · Pedro Mendonça · pentatonicfunk · Pete Nelson · Peter Wilson · petitphp · petrosparaskevopoulos · Petter Walbø Johnsgård · Phill · Pieterjan Deneys · piyushdeshmukh · Plugin Devs · Pooja Bhimani · Pooja Derashri · Pooja N Muchandikar · pranavjoshi · Prashant · Presskopp · r-c · Rajin Sharwar · Ramon Ahnert · Ramon Corrales · Ramon James · Rebekah Markowitz · Remy Perona · ren · Renatho (a11n) · Rene Hermenau · Reyes Martínez · Riad Benguella · Rian Rietveld · Rich Tabor · Robert Anderson · Robert O’Rourke · Robin · robpetrin · Rolf Allard van Hagen · Ryan Duff · Ryan McCue · Ryan Neudorf · Ryan Welcher · Sérgio Gomes · Sagar Tamang · Sajjad Hossain Sagor · Sakib Mohammed · Sal Ferrarello · samba45 · Samir Karmacharya · Sampat Viral · Samuel Wood (Otto) · Sarah Norris · Sarah Williams · Sarath AR · Satish Prajapati · saulirajala · saxonfletcher · Scott Kingsley Clark · Scott Reilly · Scott Taylor · Scout James · scribu · Sergey Biryukov · Sergio Scabuzzo · Seth Rubenstein · Shail Mehta · shawfactor · Shawn Hooper · shilo-ey · Shiva Shanker Bhatta · shresthaaman · Shubham Sedani · Simon Dowdles · Siobhan · Siobhan Bamber · Smit Rathod · sofiashendi · Sonia Gaballa · Soren Wrede · SourceView · Spenser Hale · Stephanie Walters · Stephen Bernhardt · Stephen Edgar · Steve Erdelyi · Steve Jones · Subodh Sunuwar · Subrata Sarkar · Suji K Chandran · Sumi Subedi · Sumit Bagthariya · Sumit Singh · Sunita Rai · suprsam · syamraj24 · Sybre Waaijer · Synchro · Sé Reed · Taco Verdonschot · Tahmid ul Karim · Tahmina Jahan · Takayuki Miyoshi · Tammie Lister · Tanvirul Haque · Teddy Patriarca · tejadev · thinkluke · Thomas Patrick Levy · tibbsa · Tiffany Bridge · Tim Nolte · timdix · Timothy Jacobs · tmatsuur · TobiasBg · tobifjellner (Tor-Bjorn Fjellner) · Tom · Tom Cafferkey · Tom H · Tom J Nowell · tomluckies · Tomoki Shimomura · tomsommer · Tonya Mork · Toro_Unit (Hiroshi Urabe) · Torsten Landsiedel · toscho · Tran Ngoc Tuan Anh · Trinisha · Trisha Salas · tristanleboss · TV productions · Ugyen Dorji · Ulrich · Umesh Balayar · Upadala Vipul · Utsav tilava · valentindu62 · Valerie Blackburn · Vicente Canales · Viktor Szépe · Vipul Ghori · vivekawsm · vortfu · Vraja Das · webashrafians · WebMan Design | Oliver Juhas · Weston Ruter · WHSajid · Will Skora · William Earnhardt · Willington Vega · Winstina · winterstreet · WraithKenny · wyrfel · Yoseph Tamang · Yui · zieladam · Zunaid Amin · Илья

\n\n\n\n

Más de 60 regiones han traducido el 90 por ciento o más de WordPress 6.4 a su idioma. Los traductores de la comunidad están trabajando arduamente para garantizar que haya más traducciones en camino. Gracias a todos los que ayudan a que WordPress esté disponible en 200 idiomas.

\n\n\n\n

Por último, pero no menos importante, gracias a los voluntarios que contribuyen a los foros de soporte respondiendo preguntas de los usuarios de WordPress de todo el mundo.

\n\n\n\n

Involúcrate

\n\n\n\n

La participación en WordPress no se limita a la codificación. Si te atrae contribuir, aprender más e involucrarse es fácil. Descubre los equipos que se unen en Make WordPress y utiliza esta herramienta interactiva para ayudarle a decidir cuál es la adecuada para ti.

\n\n\n\n

Mirando hacia el futuro

\n\n\n\n

Durante las últimas dos décadas, WordPress ha transformado el panorama editorial digital y ha permitido a cualquiera crear y compartir, desde historias personales hechas a mano hasta movimientos que cambian el mundo.

\n\n\n\n

El presente y el futuro de WordPress ofrecen oportunidades interesantes para todos, tanto para los constructores como para las empresas. El trabajo fundamental para la Fase 3 de la hoja de ruta continúa, con esfuerzos centrados en fomentar la colaboración en tiempo real y optimizar los flujos de publicación para mejorar la forma en que los creadores y los equipos trabajan juntos en WordPress.

\n\n\n\n

Manténte al tanto de las últimas noticias y oportunidades de contribución suscribiéndose a WordPress News y al podcast WP Briefing.

\n\n\n\n
\n\n\n\n

Un haiku de liberación.

\n\n\n\n

La suave sensación del jazz
La vanguardia de la web
Instalar 6.4

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-shirley/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"988\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:8;a:6:{s:4:\"data\";s:76:\"\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:42:\"State of the Word 2023 – Guarda la fecha\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"https://es-mx.wordpress.org/2023/11/06/state-of-the-word-2023-guarda-la-fecha/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:86:\"https://es-mx.wordpress.org/2023/11/06/state-of-the-word-2023-guarda-la-fecha/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 06 Nov 2023 16:25:16 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:2:{i:0;a:5:{s:4:\"data\";s:7:\"Eventos\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:14:\"state of world\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://es-mx.wordpress.org/?p=985\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:328:\"¡Es hora de reservar la fecha, el 11 de diciembre de 2023, para el State of the World de este año! State of the Word es el discurso de apertura anual pronunciado por el cofundador del proyecto WordPress, Matt Mullenweg. Cada año, el evento comparte reflexiones sobre el progreso del proyecto y las aspiraciones para […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:2245:\"\n
\"\"
\n\n\n\n

¡Es hora de reservar la fecha, el 11 de diciembre de 2023, para el State of the World de este año!

\n\n\n\n\n\n\n\n

State of the Word es el discurso de apertura anual pronunciado por el cofundador del proyecto WordPress, Matt Mullenweg. Cada año, el evento comparte reflexiones sobre el progreso del proyecto y las aspiraciones para el futuro del código abierto.

\n\n\n\n

Por primera vez, State of the Word se llevará a cabo fuera de Norteamérica, esta vez con la comunidad española en Madrid, España. El evento se transmitirá en vivo a los entusiastas de WordPress de todo el mundo a través de las plataformas de redes sociales de WordPress.org.

\n\n\n\n

Únete a Matt mientras ofrece una retrospectiva de 2023, muestra lo último en tecnología de WordPress y comenta sobre el futuro del proyecto de código abierto de WordPress.

\n\n\n\n

Los detalles que incluyen cómo reservar un ticket para el evento en persona, el enlace para ver la transmisión en vivo e información sobre cómo enviar preguntas para la parte de preguntas y respuestas se proporcionarán en noviembre y se compartirán en WordPress.org y cuentas de redes sociales afiliadas.

\n\n\n\n

Traducido de wordpress.org/news

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"https://es-mx.wordpress.org/2023/11/06/state-of-the-word-2023-guarda-la-fecha/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"985\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:9;a:6:{s:4:\"data\";s:73:\"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"El mes en WordPress: Agosto 2023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:71:\"https://es-mx.wordpress.org/2023/09/13/el-mes-en-wordpress-agosto-2023/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:79:\"https://es-mx.wordpress.org/2023/09/13/el-mes-en-wordpress-agosto-2023/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 13 Sep 2023 14:07:07 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Mes en WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://es-mx.wordpress.org/?p=982\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:366:\"Agosto de 2023 marcó otro capítulo emocionante en WordPress, con la Cumbre de la Comunidad y WordCamp US que reunieron a la comunidad para discusiones significativas, intercambio de conocimientos y aprendizaje. Este mes también dio la bienvenida al tan esperado lanzamiento de WordPress 6.3 y ofreció un vistazo de lo que está por venir. Profundicemos […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:14983:\"\n

Agosto de 2023 marcó otro capítulo emocionante en WordPress, con la Cumbre de la Comunidad y WordCamp US que reunieron a la comunidad para discusiones significativas, intercambio de conocimientos y aprendizaje. Este mes también dio la bienvenida al tan esperado lanzamiento de WordPress 6.3 y ofreció un vistazo de lo que está por venir. Profundicemos en ello.

\n\n\n\n\n\n\n\n

Conoce WordPress 6.3 “Lionel”

\n\n\n\n

WordPress 6.3 “Lionel” se lanzó el 8 de agosto de 2023 y lleva el nombre del aclamado vibrafonista, pianista y percusionista de jazz Lionel Hampton.

\n\n\n\n

Esta importante actualización hace que darle vida a tu visión con bloques sea más intuitivo y eficiente. Su contenido, plantillas y patrones ahora están perfectamente integrados en el Editor del sitio, lo que le permite diseñar cada aspecto de su presencia en línea en una sola ubicación. Puedes perfeccionar tus diseños con nuevas herramientas, disfrutar de un control preciso sobre los menús de navegación y trabajar más rápido con la paleta de comandos. Explora las novedades.

\n\n\n\n

WordPress 6.3 presenta más de 500 funciones y mejoras con un énfasis continuo en el rendimiento y la accesibilidad. Este lanzamiento fue posible gracias a más de 650 colaboradores de 52 países.

\n\n\n\n
\n\n
Video en inglés
\n\n\n\n

Si bien el Editor del sitio seguirá mejorándose, este lanzamiento significa un hito importante ya que marca la conclusión de la Fase 2 de Gutenberg. Tómate un momento para ver “Diseñado con WordPress”, una oda a este extraordinario viaje que vale la pena celebrar.

\n\n\n\n
\n

Descarga WordPress 6.3.1.

\n
\n\n\n\n

Hoja de ruta hacia 6.4

\n\n\n\n

Los contribuyentes ya están trabajando en WordPress 6.4, cuyo lanzamiento se espera para el 7 de noviembre de 2023. Este lanzamiento, liderado por un equipo de lanzamiento de género subrepresentado, se centrará en mejorar diferentes aspectos de la experiencia de WordPress mientras continúa el trabajo fundamental para la Fase 3 de Gutenberg. Puede anticipar funciones como administración de fuentes y un nuevo tema predeterminado, Twenty Twenty-Four.

\n\n\n\n

Twenty Twenty-Four pretende ser un tema versátil, que presenta una variedad de plantillas y patrones diseñados específicamente para tres casos de uso: emprendedores y pequeñas empresas, fotógrafos y artistas, y escritores y blogueros.

\n\n\n\n
\n

Consulta la entrada de la hoja de ruta 6.4 para obtener una vista previa provisional de las características esperadas.

\n
\n\n\n\n

Nuevo en el plugin Gutenberg

\n\n\n\n

Se enviaron dos nuevas versiones de Gutenberg en el último mes:

\n\n\n\n\n\n\n\n
\n

Sigue las entradas “Novedades de Gutenberg” para estar al tanto de las últimas mejoras.

\n
\n\n\n\n

Actualizaciones del equipo: próxima generación de eventos de WordPress, rediseño de WP Admin y más

\n\n\n\n\n\n\n\n
\n

¿Estás interesado en ver nuevos formatos de eventos de WordPress en tu comunidad local? ¡Inspírate con estos conceptos creativos y comparte tus ideas!

\n
\n\n\n\n

Solicitudes de comentarios y pruebas

\n\n\n\n\n\n\n\n
\n

El equipo de formación busca comentarios sobre las primeras vías de aprendizaje descritas para mejorar la experiencia educativa de Learn WordPress. Comparte tus pensamientos antes del 15 de septiembre de 2023.

\n
\n\n\n\n

Actualizaciones de eventos de WordPress

\n\n\n\n\n\n\n\n
\n

Únete a Josepha Haden Chomphosy en el episodio 61 de WP Briefing mientras analiza sus conclusiones de la Cumbre Comunitaria.

\n
\n\n\n\n
\n\n\n\n

¿Tienes una historia que podríamos incluir en el próximo número de ‘El Mes en WordPress’? Háznoslo saber llenando este formulario (en inglés).

\n\n\n\n

Las siguientes personas contribuyeron a este mes en WordPress: @rmartinezduque, @laurlittle.

\n\n\n\n

Traducido de wordpress.org/news

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:76:\"https://es-mx.wordpress.org/2023/09/13/el-mes-en-wordpress-agosto-2023/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"982\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}s:27:\"http://www.w3.org/2005/Atom\";a:1:{s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:0:\"\";s:7:\"attribs\";a:1:{s:0:\"\";a:3:{s:4:\"href\";s:38:\"https://es-mx.wordpress.org/news/feed/\";s:3:\"rel\";s:4:\"self\";s:4:\"type\";s:19:\"application/rss+xml\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:44:\"http://purl.org/rss/1.0/modules/syndication/\";a:2:{s:12:\"updatePeriod\";a:1:{i:0;a:5:{s:4:\"data\";s:9:\"\n hourly \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:15:\"updateFrequency\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"\n 1 \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:4:\"site\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"65529093\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}}}}}}s:4:\"type\";i:128;s:7:\"headers\";a:11:{s:6:\"server\";s:5:\"nginx\";s:4:\"date\";s:29:\"Wed, 07 Oct 2026 18:18:30 GMT\";s:12:\"content-type\";s:34:\"application/rss+xml; charset=UTF-8\";s:4:\"vary\";s:37:\"Accept-Encoding, accept, content-type\";s:6:\"x-olaf\";s:3:\"⛄\";s:13:\"last-modified\";s:29:\"Thu, 01 Oct 2026 17:02:15 GMT\";s:4:\"link\";s:64:\"; rel=\"https://api.w.org/\"\";s:15:\"x-frame-options\";s:10:\"SAMEORIGIN\";s:16:\"content-encoding\";s:4:\"gzip\";s:7:\"alt-svc\";s:5:\"clear\";s:4:\"x-nc\";s:13:\"EXPIRED dca 2\";}s:5:\"build\";i:1760643936;s:21:\"cache_expiration_time\";i:1791440310;s:23:\"__cache_expiration_time\";i:1791440310;}', 'off'); -INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES -(1605, '_site_transient_timeout_feed_d117b5738fbd35bd8c0391cda1f2b5d9', '1791440311', 'off'); -INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES -(1606, '_site_transient_feed_d117b5738fbd35bd8c0391cda1f2b5d9', 'a:6:{s:5:\"child\";a:1:{s:0:\"\";a:1:{s:3:\"rss\";a:1:{i:0;a:6:{s:4:\"data\";s:3:\"\n\n\n\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:7:\"version\";s:3:\"2.0\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:1:{s:7:\"channel\";a:1:{i:0;a:6:{s:4:\"data\";s:112:\"\n \n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"WordPress Planet\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:28:\"http://planet.wordpress.org/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"language\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"en\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:47:\"WordPress Planet - http://planet.wordpress.org/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"item\";a:50:{i:0;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:87:\"Open Channels FM: Meta Opens Muse to DIY Hardware, GPT-6 Plays WoW Blind, and BootLoops\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563398\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:92:\"https://openchannels.fm/meta-opens-muse-to-diy-hardware-gpt-6-plays-wow-blind-and-bootloops/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:204:\"Open Channels News host Robert shares AI\'s evolving role, highlighting Meta\'s Home Link for hardware integration, GPT-6 Astra\'s gameplay without visuals, and BootLoops enhancing scientific research tools.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 07 Oct 2026 15:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:1;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:67:\"WPTavern: #236 – Brian Coords on WordPress as the Source of Truth\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"https://wptavern.com/?post_type=podcast&p=208932\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:81:\"https://wptavern.com/podcast/236-brian-coords-on-wordpress-as-the-source-of-truth\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:57954:\"
Transcript
\n

[00:00:19] Nathan Wrigley: Welcome to the Jukebox Podcast from WP Tavern. My name is Nathan Wrigley.

\n\n\n\n

Jukebox is a podcast which is dedicated to all things WordPress. The people, the events, the plugins, the blocks, the themes, and in this case, making WordPress the source of truth across web projects, not just the website.

\n\n\n\n

If you’d like to subscribe to the podcast, you can do that by searching for WP Tavern in your podcast player of choice, or by going to wptavern.com/feed/podcast, and you can copy that URL into most podcast players.

\n\n\n\n

If you have a topic that you’d like us to feature on the podcast, I’m keen to hear from you and hopefully get you, or your idea, featured on the show. Head to wptavern.com/contact/jukebox and use the form there.

\n\n\n\n

So on the podcast today we have Brian Coords. Brian’s journey started in teaching and after a surprise detour, thanks to a growing family and a need for new work, he jumped headfirst into WordPress, spending a decade in agency and freelance roles before landing as a developer advocate at WooCommerce. He’s known for his knack for explaining the complicated parts of WordPress, championing documentation, blogging, podcasting, and bridging the gap between community needs and product development.

\n\n\n\n

Brian recently delivered a talk at WordCamp US entitled, The Site is the Source of Truth, Block Themes, AI and Agency Workflows, and that’s the focal point for our conversation.

\n\n\n\n

We start with Brian’s background in both education and development, and how he finds his DevRel role the perfect bridge between those worlds. We then get into the evolution of WordPress from its early days to the present, questioning just what it is that has given the platform such staying power, especially as agencies race to adopt shiny AI tools or static site builders, and are tempted to throw WordPress out with the bath water.

\n\n\n\n

Brian sees unique value in the WordPress ecosystem, especially for sites with longstanding content, integrations, and complex needs. And he makes the case for why the platform is built to last.

\n\n\n\n

We talk through the idea of the site as the source of truth, using WordPress, and increasingly block themes, not only as a publishing platform, but as the repository for all your design, content, and workflow guidelines. Instead of letting generative AI run wild, and potentially cause chaos, Brian outlines how agencies and product teams can centralise approved patterns, templates, and even content guidelines directly in the WordPress site, helping both AI and human users maintain brand and design consistency.

\n\n\n\n

We also unpack the state of block themes, why agency adoption is taking longer than expected? What’s coming soon for WooCommerce users, and how the move to block-based building is reducing plugin sprawl and making sites more resilient. And of course, we wrestle with the tight rope walk of what should go into WooCommerce Core, versus what is better left to the ecosystem, especially in a world where AI can spin up basic plugins in seconds.

\n\n\n\n

If you’re curious about how WordPress agencies can survive and thrive alongside AI, what the future holds for block themes, and how to build smarter, more sustainable workflows, this episode is for you.

\n\n\n\n

If you’re interested in finding out more, you can find all of the links in the show notes by heading to wptavern.com/podcast where you’ll find all the other episodes as well.

\n\n\n\n

And so without further delay, I bring you Brian Coords.

\n\n\n\n

I am joined on the podcast by Brian Coords. Hello, Brian.

\n\n\n\n

[00:04:05] Brian Coords: Thank you for having me.

\n\n\n\n

[00:04:05] Nathan Wrigley: Oh, you’re so welcome. Brian and I were supposed to record this podcast episode at WordCamp US, but, Jamie Marsland.

\n\n\n\n

[00:04:14] Brian Coords: He ruined it, yeah.

\n\n\n\n

[00:04:16] Nathan Wrigley: Yeah, we’re going to blame him. We had another engagement, which was to watch Jamie Marsland. But I appreciate you giving me the time after your WordCamp US experience. We’re both back home now.

\n\n\n\n

But if anybody isn’t familiar with you, Brian, we’re going to be talking a little bit about a presentation that you did at WordCamp US. That’s going to be the fulcrum around which the conversation goes. I’m going to encourage everybody, probably to go and look at the WP Tavern show notes, check them out. We will link to that presentation, which is called The Site is The Source of Truth: Block Themes, AI, and Agency Workflows.

\n\n\n\n

Hopefully gives you some intuition of what we’re going to talk about. Brian, do you just want to tell the audience a little bit about you? I know it’s a rather generic question, but tell us about you, your background, lo these many years.

\n\n\n\n

[00:04:58] Brian Coords: Yeah, so currently I work at WooCommerce as a developer advocate, so just working on community documentation, release posts, the blog, all that kind of communication stuff for WooCommerce.

\n\n\n\n

But before that, I spent like 10 years in the agency and freelancer world building WordPress sites, so I leaned on that for WordCamp US. Especially because you can only talk about WooCommerce so much at a WordCamp, so I leaned on my agency background and figured block themes, AI, all this stuff mixing around, what can I try to make sense out of it, and I don’t know if I did, but I got some thoughts out.

\n\n\n\n

[00:05:34] Nathan Wrigley: I remember a couple of years ago, prior to you getting that job, you were doing various bits and pieces, one of which actually for a tiny period of time was writing for The Tavern. And then I remember you getting the job. I was looking at your profile on social media, I think, and you landed the developer relations job, and I thought, “Oh, if ever there was a job which fitted a character,” it felt like you had dropped into something absolutely ideal. Do you just want to tell us what that role actually involves? And is it as ideal as it sounds for somebody of your characteristics?

\n\n\n\n

[00:06:03] Brian Coords: Yeah. To be honest, I saw that that was a type of job that existed in tech, and before I worked in any web development, I was a teacher. I was a high school teacher, so kind of wanted to bring back teaching and writing into what I did as a day job. So I saw that’s what a developer advocate, that’s like what DevRel does, and I basically spent like a year or two doing it for free, to prove that I could do it and get a job. And was like, “I’ll just pretend to be one, and then eventually somebody will pay me”,. And that’s kinda how it worked out.

\n\n\n\n

I mean that’s basically the job, is you’re teaching, you’re doing a lot of writing, you’re doing a lot of explaining things, you’re taking a lot of community feedback and bringing it back internally and saying, “This is what people are asking for, this is what they like or don’t like about the new feature”. You’re just bridging that communication gap, but you are also not responsible for any code, and that’s the best part of it. I’m less stressed about code overall.

\n\n\n\n

[00:06:57] Nathan Wrigley: I’m just going to go totally off piste here because I want to dig into what you said there, because I find that really interesting.

\n\n\n\n

One of the most important pillars of, I think, every society is the education piece, particularly of the younger generation, the children. I have reasons to be into that, but I won’t share them here. But, very, very meaningful to me.

\n\n\n\n

Do you miss that aspect of life? Obviously there’s a reason that you stepped away from that. Perhaps it was paperwork or burnout or whatever it may be. But do you miss the kind of face-to-face bit? Because obviously I’m imagining that you were, there was you, Brian, at the front talking to actual humans who you could reach out and touch if you needed to. How does this map to that, and the desire that you obviously once had to be an educator with real humans inside a real classroom?

\n\n\n\n

[00:07:39] Brian Coords: I left it sort of accidentally. We got pregnant with our first kid and needed to move, and I just needed to find a job closer to home. And it just was an accident, and I stumbled into WordPress and tech and everything. And so, I did miss it and I felt, I think I had an experience where I spoke at a WordCamp and I was like, it felt like teaching, because it was like I know everybody in the room. This is a community, I know everybody, I have a relationship with them. I’m up in front of the room talking to them, but they’re also yelling at me and heckling me because we know each other so well.

\n\n\n\n

So it reminded me of that vibe. So I kind of did look for this job as a way to bridge the two things, the WordPress and the tech side, and also a chance to do writing and teaching and bring it back a little bit. And maybe one day I’ll go back to a classroom or something.

\n\n\n\n

[00:08:27] Nathan Wrigley: Yeah, maybe. One of the curious things that I think about when you see education done well online, you watch somebody’s YouTube content or wherever that content may land. You sort of get the impression that they just turned on the camera and began. Oh, they’ve added in some animations, and they’ve cut and done transitions and things like that.

\n\n\n\n

But for every, let’s say 30 minutes that you produce online, is there, an hour, two hours, three hours of thinking it through, figuring out the pedagogy, who’s the audience, how do you write to their skill level? Just talk us through that bit a little bit, and I promise that’s the last off-piste bit we’ll do.

\n\n\n\n

[00:09:03] Brian Coords: Yeah, I mean, for everything that I record, I spend a lot of time doing drafts of it. I’ll try to write the whole thing and just, what would this look like if I wrote the whole thing out?

\n\n\n\n

And then, I’ve tried doing, a prompter where you read into the camera, and that never feels natural, it doesn’t work. But if I do three or four takes of it, by the time I get to that fourth take, I’ve internalized it, and then I can free flow it after that. And that’s how I approach my talk at WordCamp, where I just kept doing it personally, to the point where I felt like I could just say the stuff naturally.

\n\n\n\n

But I do bring in some of the teaching stuff of thinking about what is the student doing at the time? What are their goals? What is the one thing that they should walk away from this? And I try to bring as much of that into it, but, it’s hit or miss, you know.

\n\n\n\n

[00:09:49] Nathan Wrigley: Yeah, I guess one of the things that you always were going to miss is the sort of the feedback loop of having people in front of you, you know you’re, if all the children in front of you are gazing at the floor, then you know you’ve definitely pitched it incorrectly and you probably need to rethink. But you’re not necessarily going to get that shooting YouTube videos, but perhaps would, inside of a WordCamp. I can see you nodding, I hope that’s not actually what’s happened.

\n\n\n\n

[00:10:12] Brian Coords: Yeah, your YouTube comments are pretty close to being in front of a bunch of middle schoolers, right? That’s pretty similar. But the face-to-face and being in a real room is important. That’s why I took this job too, is more WordCamps, more Meetups, more time in person, but also I don’t have to leave my house every day.

\n\n\n\n

[00:10:29] Nathan Wrigley: Yeah, there is that.

\n\n\n\n

[00:10:30] Brian Coords: I get a balance.

\n\n\n\n

[00:10:30] Nathan Wrigley: That’s really nice, isn’t it? Yeah, so you can be working at the time of day that suits you and your family.

\n\n\n\n

Okay, so back on the piste. The title of the presentation, as I said, is The Site is the Source of Truth, Block Themes, AI, and Agency Workflows. I’m just going to read some of the blurb just so that the listener has context, and it goes like this.

\n\n\n\n

“Block themes give WordPress an opportunity to become more than a publishing tool or a place where finished designs are implemented. With the right theme structure, patterns, templates, and brand guidelines, a WordPress site can become the source of truth for how new pages and layouts should be built. That matters even more as agencies begin using AI in their build process. AI is useful when it can work from existing pieces, approved patterns, real content, design tokens, reusable blocks, and known template structures. It is much less useful when it starts every landing page from scratch.”

\n\n\n\n

And it goes on, but I’ll stop there. Do you want to just summarize what you actually did in that presentation? Then we’ll dig into the bits and the pieces.

\n\n\n\n

[00:11:27] Brian Coords: Yeah, so you submit the idea for a talk months before a conference, and then you get to the conference and three weeks ahead they tell you, “Hey, your talk got selected.” I submitted a couple. That was the one they picked, and then I read all that and I thought, “Did I write that?” I couldn’t even remember writing all that.

\n\n\n\n

But it, the timing actually worked out because we are doing a block theme in Woo right now, and I’m spending a lot of time focusing on that. It all lined up. But I definitely read that description, and I had already started working on some slides and I thought, “Oh, I don’t know how much this lines up to what I actually am presenting.”

\n\n\n\n

But I think the goal of what I wanted to do is talk about, I feel like a lot of agencies these days are saying, “We don’t need WordPress. We’re moving to static sites. We’re just letting AI vibe code everything on our sites.” And I wanted to kind of say there’s some value in the systems that WordPress has. It’s maybe a little more work, but there’s reasons for it.”

\n\n\n\n

And I ended up doing a history lesson of, “Here’s where WordPress started. Here’s where we took the journey of why things are the way they are, and the benefits for agencies.” and so I kind of ended up in a place where I got to that topic, but I did a lot of rambling throughout the presentation. I felt like the context was really important. The like, why are we here? Why is WordPress the way it is.

\n\n\n\n

[00:12:45] Nathan Wrigley: Yeah. Okay, that’s really interesting. So you said there, values in the systems that we have, and we’ll explore that in a moment. But technology’s such a weird one, isn’t it? In that most of the evolution of humans, we come up with ideas and then we finesse them a little bit. We adapt them over time, but it can be, a decade, 100 years before any major improvement takes place. You think the printing press, it just carried on as that printing press for many hundreds of years before it got slightly tweaked with linotype and things like that.

\n\n\n\n

But technology seems to be quite happy to wholesale throw the baby out with the bathwater on a more or less continuous cycle. So, why then do you feel that WordPress should buck that trend in the advent of AI? Like, why does it stand a chance when AI systems are becoming ultra-capable, static sites, or just talk to your agent and it’ll just build whatever you want. What is it? What’s the intrinsic value that you think will mean that it will be around in a, I don’t know, 5 years, 10 years, whatever that may be?

\n\n\n\n

[00:13:42] Brian Coords: Yeah, I think that’s a question everyone’s asking, which is, “Is there a unique value to WordPress that you can’t replace with AI?” And I think some people will point to the community and just the ecosystem and the fact that so many solutions already exist. I feel like AI is really good when you have nothing, and you’re going from zero to one. I have nothing and I’m going to make something brand new.

\n\n\n\n

Once you get to something where you’ve had a site for 10 years and it has tons of content and tons of authors and all these integrations and all these sorts of things, AI is helpful, but everything has to move a little slower, everything has to be a little bit more resilient, and those are the places where having a little framework underneath, something like WordPress holding everything together, ends up being a little bit more valuable. But it’s definitely changing when you would use it, when you would reach for it, and I think that’s the part people are struggling with right now.

\n\n\n\n

[00:14:30] Nathan Wrigley: Yeah. There’s so many examples in my life where there’s a new innovation, but I stick with the older thing, just because it’s tried and it’s tested, and I know the limitations of it and I know what I can do with it. So maybe that’s a good comparison.

\n\n\n\n

It will be interesting to see how AI is able to adapt and just simply build things which are robust and usable. But I think at the moment, the core promise for anybody trying to sell a website to a client, for example, is exactly that. It’s reliable. It’s battle tested. It’s been used on millions of sites all over the world, and it’s got a familiar interface and you can go in and do this, that, and the other thing, and click save and publish and what have you, and it’ll just work. Whether or not that remains the case a, a decade from now, I guess only time will tell.

\n\n\n\n

But, have this idea in your presentation of the site being the, and you said the, source of truth. What did you mean by that? What is the underpinning of that? What are the bits that kind of spin off if the WordPress site is the source of truth, what are the bits that sort of rely on that foundation?

\n\n\n\n

[00:15:28] Brian Coords: Yeah, I think one of the things that people see when they start using AI is it will just do whatever it wants. So you could ask it for two pages on your site, and they might look completely different. It might pull in some design trend here. The language might be completely different on this other one. It might not understand your audience and your values.

\n\n\n\n

And so with AI, you end up doing a lot of shepherding that’s kind of like, “well, no, this is the target audience. This is my color palette. This is the design things I like to use.” And so I leaned a lot in the talk to things like patterns in WordPress. Where, it’s something we do in WooCommerce where we have a designer, they’re very talented, they make really nice patterns that really conform to our brand. And then AI can go in and say, “pull the patterns down from the site first and use those. Don’t spin up crazy new designs. Use the ones that our human designer put a lot of care and effort into, that live in the pattern library on the website.”

\n\n\n\n

And so the more you put into the website and the more you train AI to, don’t go crazy and create new things, use the stuff I already have, use the tools I have, that I think makes things a little bit more reliable, a little bit more consistent. And so I think for agencies, finding ways to put stuff into the website that’s going to help the AI, and guide it directly to doing things the right way. Instead of it always wanting to like, come up with some brand-new chunk of code that you now have to look at. So that was kind of a part of it definitely.

\n\n\n\n

[00:16:52] Nathan Wrigley: So, what you’re saying there is instead of having all these disparate things like, I don’t know, you’ve got a Figma file over there. And you’ve got a Google document over here. And you’ve got another three different things and you can’t really figure out where the heck they are.

\n\n\n\n

Put it all in a WordPress website, and from the point of view of the design, patterns would fit beautifully for that. You can organise your typography, and basic colour palettes, and layouts, and the way things ought to look. And I don’t know, here’s two dozen ways that we might structure a page. Lock all of that away. You don’t necessarily have to publish it anywhere on the front end, but the AI can go and creep around in there and get some guidance.

\n\n\n\n

But then also presumably you could do the same with, I don’t know, your writing style. You could have draft posts where you outline the manner in which you would like to convey your company. And the words which are off limits, or the words which are definitely going to be used. So in that sense because WordPress can do video, it can do audio, it can do designs, it can do layouts and typography, why not just have that as the source of truth? Is that a sort of summation of what you were saying?

\n\n\n\n

[00:17:54] Brian Coords: Yeah, I think that’s essentially right. And I talked a little bit about, there’s a project in WordPress called Content Guidelines, I think, and it does that. Where you put in a lot of your rules. And then I also talked, a lot of agencies use GitHub and Git repos for their WordPress sites, and in there you can do things like having agents files, and skills and stuff that share across your team.

\n\n\n\n

So sometimes it’s in WordPress, sometimes it’s in that kind of GitHub code base for your website. So it depends on your agency’s workflows and stuff. But the point is, everybody puts stuff in the same place, because when I worked at an agency, it was that. It was, they used Figma and they used XD, and they have a Google Doc with all the technical specs, and then there’s 15 emails from the client. And AI actually is really good at taking all those things and putting it in one place and building a little knowledge base. And then when you bring on another developer, their AI is going to know exactly where that is, and it’s going to make things a little bit more scalable.

\n\n\n\n

So it’s just an organizational principle, like just cleaning things up, putting stuff in one space, and making WordPress sort of the home for that, instead of using all these different tools that maybe you don’t need, or maybe you’re going to lose access to.

\n\n\n\n

[00:19:00] Nathan Wrigley: I can’t remember the name, I think you just called it content guidelines or something like that. I can’t remember the name of that project, and I also can’t remember whether the intention is to ship that in Core at some point.

\n\n\n\n

That seems like a really curious idea. Presumably it’s a non-public facing repository of, I’m doing air quotes, “stuff”. So you just dump into there all of the different bits and pieces. Presumably by trial and error over many iterations, you’ll figure out exactly what the agent’s creeping around in your site, and that content guidelines portion of your site is going to be able to take from that.

\n\n\n\n

And you would amend it, and then when you begin another client site, that would be your first port of call. Get your client guidelines figured out, get that set of constraints worked out, and then move on with the design process.

\n\n\n\n

That’s a really neat idea. Somewhat hidden from the public, but pretty neat. Now, I don’t really deal with agencies. I don’t have any communication with them. Do you have a sense that they’re open to these ideas, or it’s just some sort of curiosity which the core team think they might ship, but who knows whether anybody will use it? Have you got intuitions that this would be used?

\n\n\n\n

[00:20:00] Brian Coords: Yeah, that’s been an interesting one. That content guidelines feature almost shipped, and then it got pulled at the last minute and was kind of like, “Let’s see some real world usage of this.” I think it’s probably really helpful for big news publications. That’s what I’ve heard a lot of. Where they have 20 authors and they want to make sure their authors are doing the right thing, and so that makes sense.

\n\n\n\n

I think for agencies, a lot of the ones I talk to, they really, they like putting things in GitHub. That’s where they like to put stuff, and they like putting it in the code. I don’t know if they’ll put it in WordPress, but I think it’ll be interesting to see. But I feel like we’re all just dealing with, there’s just tons of content, and markdown files, and prompts and skills and all these overwhelming amounts of things, and it’s like everybody together is trying to figure out what are the best ways to do this. And I think it’s just fun to explore the ideas and see. In two years maybe we’ll all have the answer to this.

\n\n\n\n

[00:20:54] Nathan Wrigley: Yeah. We’ll have a fresh set of new problems in two years.

\n\n\n\n

[00:20:57] Brian Coords: Yeah.

\n\n\n\n

[00:20:57] Nathan Wrigley: It was curious there, we’d been talking about AI for a while and then when you, corroborated your examples there, you described the humans using it, which I thought was quite interesting. So you’ve got these 20 people working for, let’s say, TechCrunch or something like that. Big organization, lots of editors, lots of authors and what have you. But even if the AI never touches base on that, just the idea that the humans can access it in a human-readable way, not all about the AI.

\n\n\n\n

Just that seems worth shipping. If all that you do is have some mechanism to show brand new author to techcrunch.com, how you would like things to look and feel and what have you, that seems like a reason to ship it even if the AI portion isn’t launched at the beginning.

\n\n\n\n

[00:21:38] Brian Coords: I think everybody’s explored, I know I did, where you go all in on AI and it’s going to write all my stuff, and it’s going to do all these things for me. And then internally we’ve had a, I forget what the post, but somebody wrote this kind of, writing is for humans post, and a lot of people in the company rallied around that. Which is like, it was fun to let AI do some stuff, but writing is important, and writing should be done by humans. We don’t want to put AI content out. So at the end of the day, we expect humans to write, and we still really value that, and writing is a valuable thing in and of itself.

\n\n\n\n

But then AI can come in a little later and say, “Well, maybe I’ll review it for you. Maybe I’ll give you some feedback and you can take it or not.” But it’s been an interesting, I feel like there was a pendulum where AI will do everything, and now it’s like, no, I think we’ll find the places for it to make things move faster, but there’s just still human value, and I’m glad to see that pendulum maybe coming back, at least internally for us it is.

\n\n\n\n

[00:22:34] Nathan Wrigley: Sorry, going slightly off piste here, but I have an intuition that by the time another decade has passed, I think there is a version of the universe in which people have become really sick and tired of AI. I think it’s a really plausible future that some things will be viewed with enormous incredulity and skepticism if there’s any hint of it being done by an AI.

\n\n\n\n

So perhaps that won’t be design. Perhaps it won’t be music. Perhaps it won’t be coding. But I’ve got a feeling that writing, especially fictional writing and things like that, but also opinion pieces and things, I think that is highly likely to become, once again, the domain of a human being. And I know for certain that my own children are very skeptical about AI and the future that’s presenting. So yeah, I welcome that commentary. I’ll leave it there if you’ve got anything to follow up with. If not, I’ll ask another question.

\n\n\n\n

[00:23:22] Brian Coords: Yeah, I go back and forth on it. I’ve never listened to AI music, and I don’t think I ever will.

\n\n\n\n

[00:23:28] Nathan Wrigley: No.

\n\n\n\n

[00:23:29] Brian Coords: Maybe I have and I just don’t know it.

\n\n\n\n

[00:23:31] Nathan Wrigley: Curiously, I bet you have. Yeah.

\n\n\n\n

[00:23:32] Brian Coords: Yeah, I probably have. AI writing is the same way. It’s if you can’t tell that it’s AI, will that matter? And I think at the end of the day it will, because I don’t read things unless I know who the author is and I’m interested in their perspective, and I don’t really listen to music if I don’t know, I like to know the story of the band, and I like to know the context. If I’m reading a book, I like to know when the author lived and what culture they’re filtering everything through and, yeah, maybe we’ll be unique and some people will just want to doom scroll AI videos of cats, but I never did that before, so I don’t know if I’ll do it starting now.

\n\n\n\n

[00:24:05] Nathan Wrigley: No, but curiously, it might offer a slight marketing edge, let’s put it that way. If you can certify provably that you are the real thing. Whether that be in the music space and you simply have to record the process of you going through the process of creating a song with all of the mistakes, and heartache, and anguish that that is.

\n\n\n\n

But I feel that maybe there will be a craving for that in the future. Maybe people will literally work harder to find people online who are provably writing their own material, be that songs or making videos or writing and what have you.

\n\n\n\n

So we’ve all been swamped AI and been beguiled by it, I think as you’ve said, the pendulum feels like there’s a bit of a swing in the other direction, and it might be that you can have a marketing edge simply because you’re actually taking the time to, to write things out. So anyway, there you go.

\n\n\n\n

Let’s move on slightly. So block themes. You were mentioning that at Woo you’re currently playing with a block theme. I don’t know how many of those are actually in the bag already and out there in the wild coming directly from Woo. But it does feel that many years ago block themes were being touted as the thing.

\n\n\n\n

It feels like it didn’t turn out quite the way we expected. There hasn’t been this deluge of block themes, and everybody’s put the classic themes behind them. I think people are clinging to classic themes for a variety of reasons. Do you want to just talk about why you think block themes fit into this whole agency source of truth piece as well?

\n\n\n\n

[00:25:28] Brian Coords: Yeah, block themes have been interesting. I’ve seen a lot of agencies that really start to like them, and agencies understand the value. I think, for a lot of existing websites, just changing your theme is hard. There has to be a really good reason to change your theme, because who knows what’s going to break? Who knows how everything is going to work, especially with e-commerce? It’s like if it’s not broken, don’t touch it. There better be a good reason for it.

\n\n\n\n

And so I think in some ways for a lot of people, block themes for existing sites maybe haven’t given them a really good reason to switch yet. But I think it will for a number of reasons. I was actually just talking to a coworker about our block theme that we’re getting ready to launch. Probably by the time this is out, it might be in a public beta.

\n\n\n\n

But one of the things that was interesting is in WooCommerce, there was a theme called Storefront, which was like, that was the WooCommerce theme. And we’re doing a comparison right now, where if you wanted to move from Storefront to our block theme, Storefront had all these plugins. A plugin to do a header on your site, and a plugin to do a little mini cart, and a plugin to do product carousels, and all these plugins you would have to install. And that meant testing them and making sure they work and updating.

\n\n\n\n

And we did a comparison of how many of these things can you already just do in the block editor, and it was like 90% of it already exists in the block editor. And you don’t need a plugin for it, and you don’t need extra code, and you don’t need to buy a new extension. So I think people are starting to see the value of it, once they realize how much is just included. I can change anything. I don’t need a plugin to add this or that to my site.

\n\n\n\n

So I think there’s a lot of value to it, and it just ends up being a little safer because it’s just WordPress and WooCommerce and a theme that only has a little bit of styling. I’m not worried about the compatibility of plugins, and I’m not worried about paying for updates and all these sorts of things, and is it going to break on the next version?

\n\n\n\n

And so I think there’s a lot of value to it, and it just makes WordPress itself more the thing you’re relying on. You’re just relying on the blocks. You’re just relying on the things that WordPress gives you. So I think there’s going to be a lot of benefits to it, but yeah, we have not, there is no WooCommerce official block theme yet, but we’re hoping that there will be one soon.

\n\n\n\n

[00:27:31] Nathan Wrigley: One of the things that I thought block themes would tackle really quickly soon after launching, which never kind of ended up being the case, was for example, things like WooCommerce, atomising every bit of a WooCommerce site into a separate, let’s say block. So for example, I don’t know, the add to cart block, and the the I don’t know, show the quantity in the cart in the menu block, and yada, yada.

\n\n\n\n

And you go to the cart page or the payment page, and you would just fill it up with the blocks as you’d like, and add spacing and add margins and what have you. That never seemed to take off, but also I don’t know if it’s still talked about, or the promise of that is still something that you are hoping to deliver.

\n\n\n\n

Just talk us through where we’re at in terms of atomising the entirety of a WooCommerce site into individual blocks. So rather than dropping entire sort of templates or structures, you can pick and cherry pick. obviously there’d be dependencies. If you’ve got this, you must have that. But just tell us where we’re at.

\n\n\n\n

[00:28:28] Brian Coords: Yeah, so overall you can do that for most of a store. I think the only thing that doesn’t have blocks right now at all is like the account pages. Somebody logs in and they see their downloads and their order history and all that. That stuff is, I don’t even think is anywhere blocks at all. But that was one of the things as part of this process is, we looked at all the blocks, because there is a add to cart button block, and there is a quantity selector block, and there is a product image gallery block. I mean there’s like a, more than 100, maybe 200 blocks in WooCommerce.

\n\n\n\n

There’s a lot, but the thing that they were missing was the style controls, which is I think what a lot of people wanted. Which is if I have the button, is it going to look like every other button on my site? And can I customize it? Are all the form inputs on my checkout page going to look just like the drop down on my product selection page?

\n\n\n\n

And so that’s been the big push recently, like actually building the block theme, like 90% of the work of what they’re doing is just fixing the blocks, and making the blocks better. And the theme is just a very thin layer.

\n\n\n\n

So it’s gotten a lot better, and that’s kind of the goal is once we have our own theme we can show, okay, all this stuff is customizable and editable. And I think probably in the next release you’ll see a huge focus on those block style changes showing up in WooCommerce.

\n\n\n\n

[00:29:44] Nathan Wrigley: I have a curious question that you may or may not wish to answer. Let’s see how this one goes. If you, as you just described, you were talking about you don’t need a plugin for that. You don’t need to worry about an update or a payment for this thing. We’re bringing all that functionality into Core.

\n\n\n\n

I’m wondering what that tightrope looks like, where over there somewhere, part of the community, somebody’s got a paid plugin, which is the basis of their entire livelihood. But it just so happens that, we could really ship that in Core, and that would be really useful to have in Core. We reckon that 80% of the people who use WooCommerce will use that.

\n\n\n\n

How do you decide when something gets made and the obvious sort of community impact that that thing may have had? So as I said, that’s a tricky question. I will leave you to answer it or not.

\n\n\n\n

[00:30:31] Brian Coords: Yeah, it is a huge topic of discussion. James Kemp, who is the Core product lead has been pushing for more of these things in Core. And I think that the big question right now is, are a lot of the people making money on plugins going to be able to continue making money on some of those plugins with AI? Because there’s a lot of plugins that are 100 lines of code that an AI will happily spit out for you.

\n\n\n\n

And so I think the floor is raising on people building plugins. Where if your plugin isn’t doing anything super complicated, if it’s set it and forget it, then there’s probably not going to be a market for it in the future.

\n\n\n\n

But that said, there’s this whole other area of opportunity where there’s tons of plugins that need to be built still. There’s integrations that are really complicated that you don’t want to leave to AI. There’s things around modifying payments and modifying how your checkout works and different types of products. And all of that stuff I think is still available, and I think most people will choose to pay for those sorts of things.

\n\n\n\n

But if your plugin is something, I will just say we’ve, all the ones we’ve brought in are our own plugins so far. So this new WooCommerce release that’s coming out this week is different product variations can have image galleries on each variation. That’s a thing. But that was our plugin. So we took our plugin and we put it in Core, and gave it away for free. We don’t really try to go after if somebody’s got an established community plugin and they’re supporting it. We don’t want to go after them. But we are definitely cannibalizing a few of our own plugins, and turning off a little bit of revenue we get from those to put those in Core. And that’s, we think it’s worth it in the long run to just have a better WooCommerce.

\n\n\n\n

[00:32:09] Nathan Wrigley: I think that’s a really difficult tightrope to walk, isn’t it? Because obviously you would love to have every piece of functionality available in a, you know, easy to use manner in Core, or at least all the bits and pieces that were essential. But at the same time, there’s this delicate balancing act of the community, which at the moment seems to be, how shall we say it, in a holding pattern? Let’s go with that.

\n\n\n\n

There’s a lot of uncertainty, people who have this sort of utility plugin that does this one thing, as you’ve described, it may be 100, 200 lines of code. Where in the past that was probably going to make you some nice pocket change. It does feel like that is going away.

\n\n\n\n

So if that is the calculus upon which you’re basing whether you build something into Core or not, you’re potentially swooping in and creating something for which there is no business anymore anyway, Because now in the advent of AI, anybody with half a minute can whip that same functionality up, and you might as well have it all security checked and what have you inside of Core.

\n\n\n\n

But very difficult to figure out how to balance damaging, I suppose, is the wrong word, but it’s adjacent to what I’m after. Damaging relations with community members who are great great advertisements for building on top of WooCommerce, and yet shipping all these things in Core. Difficult. I’m glad, I don’t have to square that circle.

\n\n\n\n

[00:33:23] Brian Coords: Yeah, and we have a very vocal extension developer community. They give us feedback all the time. And some of them, I think they’re well aware that they’re much more likely to be threatened by AI, than they are us wanting the functionality of their plugin in Core.

\n\n\n\n

But there’s also a general sense in WooCommerce from, like the customers, which is, “Why do I need so many plugins?” And that’s kind of a concern and that fear of, when I update WooCommerce and I have 30 to 50 extensions, which is very normal for a WooCommerce store, is each one of those going to work? Do I have to worry about that?

\n\n\n\n

And so it is also a balance where it’s almost damaging WooCommerce that you need so many plugins just to run a store. And that why do I need a plugin for this and this, you know? So we’re trying to balance that, where we want to make it feel more secure and reliable.

\n\n\n\n

But also I think a lot of those plugins are much more threatened by AI than they are us getting around. We have plenty to work on before we get around to taking other people’s plugins. We have plenty to work on our own to improve basically WooCommerce, subscriptions, all the kind of Core stuff we already manage.

\n\n\n\n

[00:34:25] Nathan Wrigley: Yeah, I feel that in the WordPress space, the most likely bit to survive, is potentially WooCommerce. Just simply because there is so much that is at stake by messing up your website by injecting a bunch of AI slop. Again, I’m doing air quotes.

\n\n\n\n

Because, this is your revenue. If you take your site down for half a minute, that really could lose you, I don’t know, thousands of dollars in orders. But I don’t know if that’s your intuition as well. It feels like brochure sites, that is very much up for debate at the moment. We’ll have to see how the landscape goes with that. But it feels like the WooCommerce bit, the e-commerce of WordPress’s community, it feels like you’re on a bit of safer ground just simply because of the revenue that’s generated by those sites and the reluctance of people to meddle with them.

\n\n\n\n

[00:35:14] Brian Coords: Yeah. I mean that’s what I’ve been yelling internally, so I’m glad you agree. I think e-commerce is definitely much more, has a much stronger moat than static brochure sites. And I think that’s what people in WordPress are sort of dealing with, which is for all these sites that are on WordPress how many of them need WordPress? How many of them need this functionality? WooCommerce definitely. You need a database, and you need security, and you need updates and you need all this stuff.

\n\n\n\n

For a marketing brochure site, you probably didn’t need it to begin with, but WordPress was easier. So the question is for those simple marketing sites, do we make WordPress easier so that they can keep using WordPress, or do we say, “No, we’re going to lean in on publishing, commerce, really complicated, heavier duty sites that probably generate more money, but maybe the total market share goes down,” I don’t know. I think that is a big question.

\n\n\n\n

[00:36:05] Nathan Wrigley: Yeah, it’s interesting. I can imagine in a decade from now, the UI for a typical brochure site almost not even a UI. It’s something that we can’t really conceive of at the moment. It might be that, you speak to a thing, and the thing reacts and amends as necessary. Maybe WordPress will have to fight that territory to keep its market share.

\n\n\n\n

But I do feel that the WooCommerce side, I think people are going to be able to justify the time put in to logging into a platform and going through a list of products and adding, “Okay, I’ve got some shoes that I’m selling over here and they come in seven different varieties. I want to sell the shoes. I’m going to upload the color palettes for each of those shoe,”. There’s just some calculus of the work that needs to be done and the maintenance that needs to be done. I feel that you’re on much, much stronger ground as you described. So yeah, I think you’ve every reason to be sanguine.

\n\n\n\n

[00:36:52] Brian Coords: Yeah, and I still think people want to log in to something and look at something. Especially with e-commerce, they want to just see a screen of how their orders are doing. They don’t want to ask AI to generate that every single second that they want to see how many orders they have, and what their revenue is for that day and all their analytics. They just want to log in and see the thing that they see every day. They don’t need to vibe code that on the fly by asking AI to generate it, right?

\n\n\n\n

[00:37:15] Nathan Wrigley: Do you know that’s really interesting? I have genuinely never thought about the desire to log into a thing, but that actually makes a lot of sense to me.

\n\n\n\n

This is going to sound extremely out there, but I’m going to say it anyway. There is something of akin to getting home when you’ve been on a long journey, and you finally get to your own front door after sleeping in hotels, beds, and all of that. There’s just something quite nice about getting into you own environment and it’s, “Ah, I’m at home.”

\n\n\n\n

And I actually have started blogging again recently, and I get a real great feeling when I log in and all that familiar stuff is there, and, “Oh, look, there’s all the pictures that I’ve posted on this website these many years.” I think there’s something there. I think that’s really curious. The idea of logging into something, being purposeful about it. Not speaking to the exact same interface that you talk to every other thing to do the job. Having a place, a URL that you go to, the environments how you’ve set it up, I can’t believe I’ve never thought of that before, but I think that’s quite profound. I hope you’re right.

\n\n\n\n

[00:38:18] Brian Coords: Yeah. I hope I’m right too. I hope that there’s just some things in life you don’t want to ask an agent to go do for you, and you just say, “Let me just click on this and change this thing.” Some things are just faster than, “All right, I’m going to text my agent, and hopefully he does it right, and then he’s going to send me a screenshot that it got done.” I mean, I love doing that kind of stuff. I do it for some things, but yeah, sometimes you’re just, “show me that same dashboard.”

\n\n\n\n

[00:38:41] Nathan Wrigley: Yeah. And I do wonder in the years to come how ready we are going to be to submit all of that control. Just the idea that an essential part of your business, like your e-commerce site could be done by an AI with very little intuition as to what’s happening once that command has been given and it updates that stuff.

\n\n\n\n

But not just that you don’t know what that thing did, what the thousand other things that were done prior to that one prompt. Okay, it looks nice at the minute, but how did it even get there? Well that was about two years of prompting. Okay. All right. Can we unpick that? Not really. We haven’t the faintest idea how it got to this. Yeah, that’s really interesting. Okay. I think I’ve asked everything I wish to ask. Is there anything you wanted to get out before we knock it on the head, Brian?

\n\n\n\n

[00:39:24] Brian Coords: No, just hopefully we’re still here in five years, not just prompting away in our basements.

\n\n\n\n

[00:39:29] Nathan Wrigley: You know what? I think if you’d have asked me that question six months ago, I had less certainty than I do now. I think I’ve seen a sort of, tsunami is the wrong word, it certainly is not that, but a general sense out in the world at at large of distrust and a move towards the sort of more artisan side of life.

\n\n\n\n

And so I think it’ll be curious to revisit this conversation in a few years time and see how that pendulum has swung. If the AI overlords are listening to this in the year 2028, please do not come and get me. I was wrong. But there we go. Let’s hope that we’ve all got somewhere to stand, a beachhead to stand in a few years. That’d be nice to think about.

\n\n\n\n

Okay, Brian, thank you so much for chatting to me today. I really appreciate it.

\n\n\n\n

[00:40:10] Brian Coords: Thank you.

\n
\n\n\n\n

On the podcast today we have Brian Coords.

\n\n\n\n

Brian’s journey started in teaching, and after a surprise detour, thanks to a growing family and a need for new work, he jumped headfirst into WordPress, spending a decade in agency and freelance roles before landing as a Developer Advocate at WooCommerce. He’s known for his knack for explaining the complicated parts of WordPress, championing documentation, blogging, podcasting, and bridging the gap between community needs and product development.

\n\n\n\n

Brian recently delivered a talk at WordCamp US entitled “The Site Is the Source of Truth: Block Themes, AI, and Agency Workflows,” and that’s the focal point for our conversation. We start with Brian’s background in both education and development, and how he finds his DevRel role the perfect bridge between those worlds.

\n\n\n\n

We then get into the evolution of WordPress, from its early days to the present, questioning just what it is that has given the platform such staying power, especially as agencies race to adopt shiny AI tools or static site builders and are tempted to throw WordPress out with the bathwater. Brian sees unique value in the WordPress ecosystem, especially for sites with longstanding content, integrations, and complex needs, and he makes the case for why the platform is built to last.

\n\n\n\n

We talk through the idea of ‘the site as the source of truth’, using WordPress (and increasingly block themes) not only as a publishing platform, but as the repository for all your design, content, and workflow guidelines. Instead of letting generative AI run wild (and potentially create chaos), Brian outlines how agencies and product teams can centralise approved patterns, templates, and even content guidelines directly in the WordPress site, helping both AI and human users maintain brand and design consistency.

\n\n\n\n

We also unpack the state of block themes, why agency adoption has taken longer than expected, what’s coming soon for WooCommerce users, and how the move to block-based building is reducing plugin sprawl and making sites more resilient. And, of course, we wrestle with the tightrope walk of what should go into WooCommerce Core versus what is better left to the ecosystem, especially in a world where AI can spin up basic plugins in seconds.

\n\n\n\n

If you’re curious about how WordPress agencies can survive and thrive alongside AI, what the future holds for block themes, and how to build smarter, more sustainable workflows, this episode is for you.

\n\n\n\n

Useful links

\n\n\n\n

Brian’s website

\n\n\n\n

The Site Is the Source of Truth: Block Themes, AI, and Agency Workflows – Brian’s presentation at WordCamp US 2026

\n\n\n\n

WooCommerce

\n\n\n\n

Content Guidelines: A Gutenberg Experiment

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 07 Oct 2026 13:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Nathan Wrigley\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:2;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:54:\"Akismet: Upgrade to the official Akismet Drupal module\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:28:\"http://akismet.com/?p=285183\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:71:\"https://akismet.com/blog/upgrade-to-the-official-akismet-drupal-module/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:8721:\"
\"\"
\n\n\n\n

If your Drupal site still runs the community Akismet module (drupal/akismet), the official Akismet module (drupal/akismet_antispam) can upgrade it in place. You swap the Composer package, run database updates, and your API key and protection settings come along. We built it so you don’t have to uninstall, reinstall, and re-enter everything. This post walks through the steps.

\n\n\n\n

Which sites this covers

\n\n\n\n

The update needs Drupal 10.3 or later on PHP 8.1 or later. That covers sites on the community module’s 2.0.x releases and its 8.x-1.x dev branch.

\n\n\n\n

If you’re on an older setup:

\n\n\n\n\n\n\n\n

The migration guide on drupal.org has a table for every release if you’re not sure which one you run.

\n\n\n\n

Before you start

\n\n\n\n\n\n\n\n

What carries over, and what doesn’t

\n\n\n\n

These come along:

\n\n\n\n\n\n\n\n

These don’t:

\n\n\n\n\n\n\n\n

You don’t have to track any of this by hand. The update prints a report that names every item above that applies to your site.

\n\n\n\n

The migration

\n\n\n
\n
\n
\n \n
\n
composer remove drupal/akismet
composer require drupal/akismet_antispam -W
drush cr
drush updb
\n
\n
\n
\n\n\n

Run them in that order, back to back.

\n\n\n\n
    \n
  1. composer remove first, and leave the module installed in Drupal. Don’t uninstall it, because the update reads its database state. The official module’s composer.json conflicts with drupal/akismet, so Composer won’t install them side by side.
  2. \n\n\n\n
  3. composer require ... -W lets Composer update shared dependencies, like the Akismet PHP SDK or the PSR HTTP packages, if your lock file pins an older version. Without -W, Composer can refuse with “the package is fixed to … (lock file version).”
  4. \n\n\n\n
  5. drush cr before anything else. The community module shipped services that no longer exist, and Drupal still has them cached. Until you rebuild, logged-in pages return a 500 and drush commands die on shutdown. drush cr works when nothing else does.
  6. \n\n\n\n
  7. drush updb runs the update. Stay off the comment admin screens until it finishes.
  8. \n
\n\n\n\n
\n
\n \n \n
\n \n\n\n

Read the report. It’s also logged to watchdog, so you won’t lose it if your terminal scrolls away. Then export and commit the new configuration:

\n\n\n
\n
\n
\n \n
\n
drush cex
\n
\n
\n
\n\n\n

On every other environment, rebuild the cache before anything else touches it:

\n\n\n
\n
\n
\n \n
\n
drush cr && drush deploy
\n
\n
\n
\n\n\n

Check that it worked

\n\n\n\n\n\n\n\n

Already on the official module 1.0?

\n\n\n\n

Upgrading to 1.1 is one command and a database update:

\n\n\n
\n
\n
\n \n
\n
composer update drupal/akismet_antispam -W
drush updb
\n
\n
\n
\n\n\n

The -W matters here. Version 1.1 needs Akismet PHP SDK 1.5, and if your lock file still pins 1.4, Composer stops with:

\n\n\n
\n
\n
\n \n
\n
drupal/akismet_antispam 1.1.0 requires automattic/akismet-sdk ^1.5 -> found automattic/akismet-sdk[v1.5.0] but the package is fixed to v1.4.0 (lock file version).
\n
\n
\n
\n\n\n

-W (short for --with-dependencies) lets Composer update the SDK along with the module.

\n\n\n\n

Questions

\n\n\n\n

If something in the report surprises you, or the update doesn’t go the way this post says, open an issue in the issue queue. The migration guide and the module’s README have the full details.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 22:13:52 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Derek Springer\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:3;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"WordPress.org blog: WordPress 7.1.3 Maintenance and Security Release\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://wordpress.org/news/?p=21753\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:84:\"https://wordpress.org/news/2026/10/wordpress-7-1-3-maintenance-and-security-release/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:5431:\"

This security and maintenance release features 7 security fixes and 4 bug fixes.

\n\n\n\n

Because this is a security release, it is recommended that you update your sites immediately.

\n\n\n\n

You can download WordPress 7.1.3 from WordPress.org, or visit your WordPress Dashboard, click “Updates”, and then click “Update Now”. If you have sites that support automatic background updates, the update process will begin automatically.

\n\n\n\n

Security updates included in this release

\n\n\n\n

The security team would like to thank the following people and organizations for responsibly reporting vulnerabilities, and allowing them to be fixed in this release:

\n\n\n\n\n\n\n\n

Thank you to these WordPress contributors

\n\n\n\n

This release was led by Jake Spurlock.

\n\n\n\n

WordPress 7.1.3 would not have been possible without the contributions of the following people. Their asynchronous coordination to deliver maintenance and security fixes into a stable release is a testament to the power and capability of the WordPress community.

\n\n\n\n

Aaron Jorbin, Adam Silverstein, Adi Moldovan, Adrian Duffell, Alex Concha, Arkaprabha Chowdhury, Deepak Kumar, donniam, Ehtisham Siddiqui, Jake Spurlock, Jb Audras, Jeremy Felt, Joe Dolson, John Blackbourn, Jon Surrell, Jonathan Desrosiers, Ken Gagne, Khokan Sardar, Lance Willett, lucatume, marcs0h, Peter Wilson, Paul Kevan, RS Software, Rudy Faile, Sergey Biryukov, siliconforks, smerriman, Stephen Bernhardt, Suryakant Upadhyay, vortfu, webVerts, Weston Ruter, Yogesh Bhutkar

\n\n\n\n

Backports

\n\n\n\n

As a courtesy, the security fixes are being backported, where necessary, to all branches eligible to receive security fixes (currently through 4.7). As a reminder, only the most recent version of WordPress is actively supported. The backports are in progress and will ship as they become ready.

\n\n\n\n

How to contribute

\n\n\n\n

To get involved in WordPress core development, head over to Trac, pick a ticket, and join the conversation in the #core channel. Need help? Check out the Core Contributor Handbook.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 17:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Jake Spurlock\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:4;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:123:\"Open Channels FM: Open Source Maintainers Defend Against AI Spam, Linux Data Trends and WordPress Accessibility Challenges\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563376\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:128:\"https://openchannels.fm/open-source-maintainers-defend-against-ai-spam-linux-data-trends-and-wordpress-accessibility-challenges/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:130:\"AI-driven growth presents challenges in security and accessibility and infrastructure hurdles that technology teams cannot ignore.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 15:45:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:5;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"Open Channels FM: The Essential Human Touch in Genealogical Research\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562236\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:75:\"https://openchannels.fm/the-essential-human-touch-in-genealogical-research/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:382:\"As artificial intelligence becomes more integrated into genealogical research, it is tempting to imagine a future where longstanding mysteries are unraveled with a few keystrokes. AI tools can now scan, transcribe, and sort through centuries of records, but the heart of successful genealogy still depends on something machines cannot replicate: the human touch. No matter […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 10:42:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:6;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"OpenStation Blog: Someone Said “I Hate OpenStation.” That Was Actually Useful.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1400\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:93:\"https://openstation.blog/2026/10/06/someone-said-i-hate-openstation-that-was-actually-useful/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:5333:\"

A few days ago, someone opened a support thread about AllTerrain Forms and, in the middle of otherwise useful feedback, wrote something very direct: “I hate OpenStation.”

\n\n\n\n

Obviously that is not the nicest sentence to read when you are working on the product, but at the same time it immediately got my attention because this is exactly the kind of feedback that can be useful if you don’t take it personally.

\n\n\n\n

So instead of trying to explain why OpenStation is good, or why we made certain decisions, I asked a very simple question: what exactly makes you hate it?

\n\n\n\n

Her answer was actually very good.

\n\n\n\n

She works on a laptop, so screen space matters a lot. OpenStation was opening windows too small for her workflow, which meant that one of her first actions was always maximizing them. She also didn’t like losing the visible URL because she regularly copies URLs into emails, project trackers or messages. On top of that, her users are not very technical, and from her point of view OpenStation was adding another layer to WordPress that she would eventually have to explain and support.

\n\n\n\n

She basically said that browser tabs already exist, users understand them, they use the whole screen, and they don’t hide the URL.

\n\n\n\n

And I think this is exactly where building software becomes interesting, because from our side all of those decisions had reasons behind them, but reasons don’t really matter if the final experience is worse for the person using it.

\n\n\n\n

None of these are theoretical product discussions. They are very concrete things that someone hit while trying to use the software for real work.

\n\n\n\n

That matters a lot to me.

\n\n\n\n

We started discussing these points immediately, and one of them has already made it into the next OpenStation release.

\n\n\n\n
\"OpenStation
\n\n\n\n

Users will now be able to choose how new windows open: using the current default behaviour, maximized, or focused. Focused mode maximizes the new window and minimizes the other windows on the same desk, so people working on smaller screens can have something much closer to the experience they expect.

\n\n\n\n

This came directly from that kind of feedback, and the implementation is already merged:

\n\n\n\n

PR #964: Preferences: choose how newly opened windows appear

\n\n\n\n

And this is really the point.

\n\n\n\n

We obviously have our own vision for OpenStation. We believe WordPress can have a much better working environment than the traditional admin experience, and there are many things we still want to explore there. But having a strong idea of where the product should go does not mean pretending every decision we make is correct.

\n\n\n\n

Sometimes the most useful feedback is not “great release” or “this looks amazing”. Sometimes it is someone telling you that a window is too small, that they want the URL back, that something scrolls when it shouldn’t, or simply that they don’t see the benefit of what you built.

\n\n\n\n

That kind of feedback forces you to look at the product from outside your own head, which is probably one of the hardest things to do when you have been working on it every day for months.

\n\n\n\n

For me, OpenStation becoming more mature is not only about adding more apps, more features or more ambitious ideas. A big part of maturity is improving all those small things that make the product feel natural, predictable and less annoying to use.

\n\n\n\n

And I think there is also something important here about open source. People can complain, explain exactly what does not work for them, and a few days later they can literally see the code that changes that behaviour.

\n\n\n\n

That is a pretty healthy way to build software.

\n\n\n\n

So yes, tell us when OpenStation is great, but especially tell us when it sucks. We may not agree with every suggestion, and we obviously cannot build every requested feature, but if there is a real problem behind the feedback, we want to understand it.

\n\n\n\n

In this case, someone said “I hate OpenStation.”

\n\n\n\n

Fair enough.

\n\n\n\n

A few days later, OpenStation got better because of it.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 08:54:53 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:7;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Matt: Beeper MCP\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:23:\"https://ma.tt/?p=155119\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:33:\"https://ma.tt/2026/10/beeper-mcp/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:351:\"

Fellow Automattician Job Thomas, down in Cape Town, South Africa, has a lovely story about using Claude and the Beeper MCP to wrangle all the group chats for his daughter’s sports.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 06:35:11 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"Matt\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:8;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:111:\"Open Channels FM: Technology’s Fast Feedback Loop with Triumph of the Nerds, Agile AI, and WordPress Security\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563290\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:113:\"https://openchannels.fm/technologys-fast-feedback-loop-with-triumph-of-the-nerds-agile-ai-and-wordpress-security/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:88:\"Faster tech means new challenges from AI feedback loops to WordPress security incidents.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 05 Oct 2026 15:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:9;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"Open Channels FM: Topics in Tech Business, It’s Rinse and Repeat\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2560606\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:64:\"https://openchannels.fm/topics-in-business-its-rinse-and-repeat/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"Sometime we think, been there, done that, but hey, not everyone has done that.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 05 Oct 2026 09:54:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:10;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:39:\"Akismet: Akismet now supports Drupal 12\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:28:\"http://akismet.com/?p=285135\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:56:\"https://akismet.com/blog/akismet-now-supports-drupal-12/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:5034:\"
\"\"
\n\n\n\n

Version 1.1.0 of the official Akismet Drupal module is out with support for Drupal 12. If you’re planning your move to 12, spam protection won’t hold you back. Here are the highlights.

\n\n\n\n

Drupal 12 from day one

\n\n\n\n

The module now runs on Drupal 10.3+, 11 and 12. On Drupal 12, Akismet checks comments and user registrations as soon as you install it, since both live in core. Contact forms, webforms, and the Key module will be supported as soon as they’re ready for D12.

\n\n\n\n

What else is new in 1.1.0

\n\n\n\n

Better spam scoring

\n\n\n\n

Every check now gives Akismet a fuller picture of each submission. The module’s bot detection watches how someone fills out a form: how long they take, how they type, and how they scroll, click or tap. In 1.1.0, all of those signals feed straight into Akismet’s spam scoring. With more context, Akismet can better tell a real person from a bot, so you should see more spam caught and fewer real messages flagged by mistake.

\n\n\n\n

Better GDPR export

\n\n\n\n

drush akismet:gdpr-export now takes --format=json (or csv and yaml) and returns the full stored record for each match, including the original submission. That makes subject access requests easier to answer completely.

\n\n\n\n

The export also withholds the moderator’s identity, as GDPR Article 15(4) allows.

\n\n\n\n

Clearer warnings about your stored API key

\n\n\n\n

The status report now warns you about a leftover copy in yoursettings and stays visible until you deal with it. A new Delete stored API key form removes it in one step. You’ll find the link on the settings page and in the status report.

\n\n\n\n

Coming from the community module?

\n\n\n\n

Before the official module, some Drupal sites used the community-maintained Akismet module (drupal/akismet). That project is no longer maintained. If you’re still running it on Drupal 10.3 or later, 1.1.0 can take over your install in place. Your API key, connection timeout and protection settings carry over, and the update prints a report of everything it migrated, changed or dropped. Our migration guide on drupal.org walks through the process.

\n\n\n\n

Get started

\n\n\n\n

You’ll need an Akismet API key. Grab one from our pricing page. It’s free for personal sites.

\n\n\n\n

For a new install:

\n\n\n
\n
\n
\n \n
\n
composer require drupal/akismet_antispam
\n
\n
\n
\n\n\n

If you’re already on 1.0, update the module along with the Akismet PHP SDK it depends on, then run the database updates:

\n\n\n
\n
\n
\n \n
\n
composer update drupal/akismet_antispam --with-dependencies
drush updb
\n
\n
\n
\n\n\n

The module needs Drupal 10.3, 11 or 12 and PHP 8.1 or newer, or the newer PHP your Drupal core requires.

\n\n\n\n

Found a bug or have an idea? Tell us in the issue queue.

\n\n\n\n

New to the module? Start with our introduction to the official Akismet Drupal module, or see how it’s built on the official Akismet PHP SDK.

\n\n\n\n

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 02 Oct 2026 18:59:59 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Derek Springer\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:11;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:93:\"Open Channels FM: Beyond Rants, Productive Discussions and the Mystery of Poor Design Choices\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563201\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:99:\"https://openchannels.fm/beyond-rants-productive-discussions-and-the-mystery-of-poor-design-choices/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:141:\"Bob Dunn reflects on online conversation styles and an infamous hardware design blunder, offering unsolicited solutions and food for thought.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 02 Oct 2026 12:02:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:12;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:80:\"Open Channels FM: Why We Build Systems aka Zach and Carl’s Emporium of Madness\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563171\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:84:\"https://openchannels.fm/why-we-build-systems-aka-zach-and-carls-emporium-of-madness/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:225:\"In this episode, hosts Zach and Carl discuss adapting to technological change, personal reinvention, and the impact of AI on creativity and web development, emphasizing diverse income strategies and effective ADHD management.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 01 Oct 2026 11:41:11 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:13;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:53:\"Open Channels FM: The Jerks and Flows of the Open Web\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:33:\"https://openchannels.fm/?p=114879\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:40:\"https://openchannels.fm/jerks-and-flows/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:102:\"You may start something and then boom, it\'s over. Or an idea that disappears as quickly as it appears.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 30 Sep 2026 15:21:41 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:14;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"WPTavern: #235 – Rob Pugh and Tony Arcangelini on Bringing Podcasting to Jetpack\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"https://wptavern.com/?post_type=podcast&p=208505\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:96:\"https://wptavern.com/podcast/235-rob-pugh-and-tony-arcangelini-on-bringing-podcasting-to-jetpack\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:49098:\"
Transcript
\n

[00:00:19] Nathan Wrigley: Welcome to the Jukebox Podcast from WP Tavern. My name is Nathan Wrigley.

\n\n\n\n

Jukebox is a podcast which is dedicated to all things WordPress, the people, the events, the plugins, the blocks, the themes, and in this case, bringing podcasting to Jetpack.

\n\n\n\n

If you’d like to subscribe to the podcast, you can do that by searching for WP Tavern in your podcast player of choice, or by going to wptavern.com/feed/podcast, and you can copy that URL into most podcast players.

\n\n\n\n

If you have a topic that you’d like us to feature on the podcast, I’m keen to hear from you and hopefully get you, or your idea, featured on the show. Head to wptavern.com/contact/jukebox, and use the form there.

\n\n\n\n

So on the podcast today we have Rob Pugh and Tony Arcangelini. Rob and Tony are longstanding members of the Automattic team with extensive backgrounds in marketing, product, and software development. They’ve spent years building tools for creators, writers, podcasters, and everyone in between, and now they’re fully immersed in WordPress’s evolving podcasting capabilities.

\n\n\n\n

If you’ve been looking for ways to run your podcast from your own WordPress site, this conversation is for you. Rob and Tony dive into the new Jetpack podcasting features, and why they made the leap from WordPress.com’s basic audio offerings, to a more robust, integrated solution, within Jetpack.

\n\n\n\n

They talk about what makes WordPress and Jetpack such a powerful home for creators. The ability to bring your newsletter, blog, podcast, and all your content and communication under one roof, all while keeping ownership of your data.

\n\n\n\n

We talk through the advantages of keeping your content out of walled gardens like Substack and Patreon, and the value of flexibility, whether that’s adding WooCommerce to sell merch or customising your site’s look.

\n\n\n\n

Rob and Tony breakdown just how easy it is to start your show. Drop audio into a post, set your category, and let Jetpack handle the rest. From distributing your RSS feed to major podcast apps, to sending out newsletters, and automated social posts. They also get into how integrations with PocketCasts and Jetpack AI make content creation, transcription, and distribution smoother than ever before. Plus how WordPress is open Foundation promises you’ll never be locked in.

\n\n\n\n

If you are a creator wondering how the next generation of podcasting fits into the WordPress ecosystem, or just want an easier way to launch and grow your show, this episode is for you.

\n\n\n\n

If you’re interested in finding out more, you can find all of the links in the show notes by heading to wptavern.com/podcast, where you’ll find all the other episodes as well.

\n\n\n\n

And so without further delay, I bring you Rob Pugh and Tony Arcangelini.

\n\n\n\n

I am joined on the podcast by Rob Pugh and Tony Arcangelini. Hello, both.

\n\n\n\n

[00:03:23] Rob Pugh: Hey, how’s it going, Nathan?

\n\n\n\n

[00:03:24] Tony: Hello, Nathan.

\n\n\n\n

[00:03:25] Nathan Wrigley: Nice to have you both with us.

\n\n\n\n

Today we’re going to be talking about something which is actually genuinely dear to my heart because we’re going on about podcasts. Yay!

\n\n\n\n

I’ve been in the podcasting space for decades, and WordPress has been the place where I’ve done it every single episode. I’m entirely indebted to WordPress for the capacity to do all of the podcasting I’ve done. But I’ve never done it inside of Jetpack, because until recently, I don’t think that was possible. So that’s what we’re going to talk about today.

\n\n\n\n

First of all, I’ll just go round the houses. I’ll start with Rob. Would you mind giving us just a quick potted bio of what it is that you do over at Automattic, Jetpack, whatever it is that you want to mention.

\n\n\n\n

[00:04:04] Rob Pugh: Yeah, so I’ve worked at Automattic for seven years. I’ve been in marketing and now focused more on product, but I like to do a bit of everything. And I work mostly with tools for people that create stuff. So podcasts fit right in there, and we are excited to build out this feature.

\n\n\n\n

[00:04:19] Nathan Wrigley: Nice. Thank you. Tony.

\n\n\n\n

[00:04:21] Tony: Yeah. I’ve also worked for Automattic for about eight years now. I do software development, and so I have had firsthand in building everything that we’re talking about today.

\n\n\n\n

[00:04:31] Nathan Wrigley: Okay, thank you very much.

\n\n\n\n

Now, just before we started recording, I was on the call with Tony before Rob joined in and you labored the point, not labored, but you mentioned that you were in the sort of creator side of Automattic. I didn’t know that existed, but that to me is about the most interesting bit of any organization. You know, the bit where the musicians come, and the poets come and the writers come and the podcasters, and the videos and the YouTubers, and all of that come. I think that’s really interesting, and I didn’t realise there was a wing of the business entirely aligned to that. But I guess I’ve been schooled, and now I know. So podcasting definitely comes under that banner.

\n\n\n\n

Okay so I didn’t know this existed, and I think it didn’t exist, but maybe Tony can redirect me a little bit here. Podcasting in the WordPress space, I think you could do more or less everything that we’re about to talk about inside of wordpress.com until recently, but now it’s shipped inside of Jetpack. First of all, I’ll just send that one to Tony. Is that true? Is this all like a port of things into Jetpack from .com?

\n\n\n\n

[00:05:32] Tony: I’d say it’s a little bit more than a port. So we built a very basic feature of podcasting in WordPress.com to offer WordPress.com users. It was very basic. It was just the feed. Basically what you see in the free offerings right now. The ability to drag an audio into a post and for that post to then become a podcast episode. And then we had a curated RSS feed that was available. And then very basic, the core basic iTunes tags that are needed to be able to be picked up by these apps.

\n\n\n\n

That existed there. It was a bit outdated. It hadn’t been touched in a long time, and so we felt like it would be a great tool to leverage for creators. Giving them a better product, something that would be useful with stats and the ability to manage your episodes and all of that. And we figured if we were going to put all this effort into it, that we should probably make it more widely available. And so Jetpack was, I think, the natural fit for us.

\n\n\n\n

[00:06:26] Nathan Wrigley: Yeah, I’m kind of curious how it’s ended up in Jetpack and not just its own plugin. Is it because you’re leveraging the other things that Jetpack can do? Are there sort of dependencies, if you know what I mean, where, okay, it just makes sense because Jetpack already does that piece of the puzzle, and we can just build over the top of that?

\n\n\n\n

Or is it just the brand recognition, the fact that you’ve got an email list that you don’t need to convert and they can just toggle a switch and automatically have got podcasts? What was the reasoning on putting it inside of Jetpack and not just its own thing?

\n\n\n\n

[00:06:54] Tony: I would say, at least from an engineering perspective, there’s stuff that’s in it that is exclusively within Jetpack. So, the ability to do stats, that’s a hard thing to do when you’re having a self-hosted site, to be able to watch and see what apps are actually touching those download files, and then be able to aggregate them all in one place and then give them back to you in a way that’s easy.

\n\n\n\n

So, at least from an architectural perspective, Jetpack was the easiest because it allows us to leverage some of the endpoints that are already there, and use a lot of those tools.

\n\n\n\n

But then secondly, I think it’s also from an overall product perspective, being able to put it alongside other features like newsletters. Where you can have a newsletter, you can be able to take it into the reader. Have this one episode that now spans across multiple different avenues to be consumed, is I think, also another big benefit in putting it into Jetpack. As opposed to just dropping another, because there’s already a lot of plugins out there, a few big plugins that you can grab for free that do podcasting.

\n\n\n\n

[00:07:56] Nathan Wrigley: I think one of the big bits that I realised early on in my podcasting journey was that you’re not really just trying to create an audio feed. It’s more useful as a podcast if you’ve got this kind of wrap around thing. So like you say, you’ve got a home which is yours, AKA your WordPress website. But also things like the capacity to send out an email if people are interested in subscribing, and they don’t necessarily have a podcast player that they use all the time, but they do want to consume your content.

\n\n\n\n

The fact that they can subscribe to a newsletter, you click publish, that newsletter automatically drops in their inbox. It just makes sense that all the jigsaw pieces that a podcaster needs, it feels like WordPress has had forever.

\n\n\n\n

And there is some part of me which is curious that it’s taken this long to come into the, let’s say, .org side of WordPress. Because all of the different parts, the newsletter, the RSS feed, the blog posting, all of that stuff has been available. It just kind of never got joined up. It strikes me as odd because people have moved over to Patreon, Substack has become this whole thing over the last decade. And really it felt like WordPress had that audience a decade ago.

\n\n\n\n

Maybe it’ll claw it back. I certainly hope it does, but it feels like a lot of people have left the WordPress ecosystem for their podcasting because that stuff wasn’t available. Rob, maybe you want to take that one? It’s not really a question, more of an observation.

\n\n\n\n

[00:09:16] Rob Pugh: Yeah, there’s a lot to unpack there. I agree. I think we were a little late in bringing some of these tools to wordpress.org. But I think we’re seeing the renewed focus across the technology space on ownership.

\n\n\n\n

WordPress has remained the best way to do that. And for us to be able to offer these tools to users. It shows everyone that you can, as you said, own your blog your newsletter, your podcast, together. And it does make sense for us to offer all of these tools in one space.

\n\n\n\n

I like to think of it going back to the origins of WordPress, and we started as blogging, everyone getting your thoughts out there and sharing them. Meeting new people, engaging and creating communities. And podcast is just another medium. We provide that for the written word, so of course we should try and provide that for the spoken word as well. So I do hope that we can show people the benefits, and the ease of having it all together and come back and give us a try.

\n\n\n\n

[00:10:11] Nathan Wrigley: Yeah. I think for me at least anyway, that argument is embedded in my soul. The idea of owning your own content on the web is really important. It’d be interesting to see in the year 2026, 2027 and going forward how much that stuff really matters. I’m just curious, in the age of AI whether people still want to own anything at all. But it’ll be certainly interesting to see.

\n\n\n\n

[00:10:30] Rob Pugh: Sorry, yeah, weigh in on that. I think we’ve seen it over decades and comes in waves. When social media started it was really exciting, and people ran and then saw some of the pitfalls, and they start coming back.

\n\n\n\n

And then recently you mentioned Substack, and I loved Substack when it started. It was a space for some serious dialogue, and a place for writers engage. And then over time, well, we need that VC money, and now it’s basically another social media site. And you realise, oh I don’t really own my data, I just own a Substack, and how valuable is that? And it’s coming back.

\n\n\n\n

And I think AI, it’s becoming even, the cycles are quicker now. AI’s incredible, I use it all the time. I use it to help come up with prototypes for how to best display this podcast product. But, you’ll see quickly that you don’t own anything, and you need to have a home like WordPress. And you retain ownership of your audience, and your data and your posts and your podcasts, and that’s, I think, never going to go away, and AI’s only going to reinforce that for people.

\n\n\n\n

[00:11:23] Nathan Wrigley: Yeah, I think one of the curious things as well is if you want to do anything outside of the normal that the platform will allow, so let’s take the example of Substack. There’s a limited subset of things that it can do. The bedrock of what it does I’m sure is excellent. I confess I’ve never used it, but I’ve seen many people deploy it for their own podcast, so you know, it must work.

\n\n\n\n

But the minute you want to stray outside of those boundaries, and you want to do something a little bit different, I don’t know, you might want to sell some merchandise or something like that. Well just pop WooCommerce on top of your website and you’re off to the races.

\n\n\n\n

Or, I don’t know, you want to have a different flavor in the way it looks at Christmas or something, well you just adapt the theme. And I’m, imagining good luck doing that over on these proprietary platforms. I don’t know if that’s possible, but it certainly would be a lot harder than it would be on the WordPress side I would have thought.

\n\n\n\n

[00:12:08] Rob Pugh: For sure the customisation expanding is all very important, but to me even more important is just that it feels like Substack is just another platform that’s changing the rules on their people midstream, and if you don’t like the direction of. Like tried it before and it was nice to have a non-social media site to have serious writing and reading of other serious authors, and now I’m getting short form reel videos on my homepage, and I didn’t sign up for this.

\n\n\n\n

And if you’re a creator over there, you might be stuck. How do you port your audience over? It’s technically possible, so they say they’re open, but it’s a pain, and people don’t want to leave. And if you’re actually successful, they take 10%, which is great when you’re zero paid subscribers. But, there’s people paying $10,000 a month to Substack.

\n\n\n\n

[00:12:48] Nathan Wrigley: They take 10%?

\n\n\n\n

[00:12:49] Rob Pugh: 10% no matter what, which is great if you’re free, but if you have 100 paid subscribers paying you $10 a month, suddenly it’s insane. Like it’s a terrible deal and people feel stuck. Like WordPress even, wordpress.com, jetpack, if don’t like those rules, we can’t change them too much. You can go to any of the other great podcast hosts, or plugins.

\n\n\n\n

[00:13:09] Nathan Wrigley: Yeah, I guess that’s a curious thing. And then you can embed those on your WordPress website and just carry right on as if nothing had happened. Yeah, that’s a really interesting point.

\n\n\n\n

[00:13:15] Rob Pugh: Exactly.

\n\n\n\n

[00:13:16] Nathan Wrigley: So from what I’ve seen, it looks like a really simple solution to implement. What I mean by that is, as a user of your product, it seems like you’re basically doing a bunch of stuff which as a WordPress user you would be simply doing anyway.

\n\n\n\n

Like, you create a post. I don’t know if there’s a requirement to have a special custom post type for a podcast, or if you can just use regular posts. You go in, drop some audio in, and kind of you’re off to the races. Type some text and what have you.

\n\n\n\n

Is it really as simple as that? Is it simply a case of make a post, drop some audio in? Or is there some stuff that you need to do in advance to prepare your podcast? So I’m leading you up the garden path with that question. Tell us how it works. What do you need to do in order to get started? How much work is involved?

\n\n\n\n

[00:13:59] Tony: Yeah, I think that’s it. There are a few settings that are naturally required for starting a show. So you have your typical art for your show. You’ve got to set your categories and things like that in a setting. But then once that’s all set up, all you do is you create a new post, drop in the audio. We actually have an audio block as well, like a podcast episode block that will pull in a lot of the newer, fancier, podcasting 2.0 markup as well for you to do like chapters and things like that. And then that’s it.

\n\n\n\n

As long as it’s within the category, it’s not a custom post type, it’s just a regular post. And then we are able to differentiate between an episode and just a post by two things. One, is it in the designated category that you set? And two, does it have the audio or video? We also have a few video files that we allow as well, and that’s it.

\n\n\n\n

[00:14:46] Nathan Wrigley: Okay, that’s really neat. So you can use a regular WordPress post, but if you don’t assign it the category, let’s say in this case I’ve named it podcast, let’s go with that. If you don’t assign that category, it’s a regular post. Nothing off that tries to smuggle its way into your RSS feed, which would be attempted to be consumed by a podcast player. It just doesn’t go in there.

\n\n\n\n

The minute I assign the category of podcast, drop in some audio, then it’s in that separate RSS feed. Dear listener, if you’re not familiar with that, basically a podcast is an RSS feed. That is literally what it is. Your podcast player is just consuming a bunch of text, which is an RSS feed, and interpreting that in a certain way with images and the audio and what have you.

\n\n\n\n

And so that’s it. That’s all you have to do. Configure the settings, put a piece of audio in, assign the category, click publish. You’re done.

\n\n\n\n

[00:15:35] Tony: Yep, that’s all. That’s all it is. I think the harder part is trying to come up with the titles and filling out the show notes. And, I have a friend who I got to start a podcast when we were working on this product, and he was using it, giving us feedback. But then, it’s like I looked at his podcast, and it was literally just like episode one, and it just, he’s like, “That’s the hard part, is coming up with all of the other stuff.”

\n\n\n\n

[00:15:53] Nathan Wrigley: But you have Jetpack AI as well, don’t you? So there is an opportunity, I would presume, to lean into that. If you were to write a corpus of text that went alongside the, I don’t know, the audio, it could be a transcript or what have you. Presumably then Jetpack can go sift through all of that, and suggest some sensible titles if you really can’t be bothered to work out a title for the podcast episode. But then again, does it have the capacity to do things like trawl through the audio and transcribe and things like that? Or is that a bit roadmap-y still?

\n\n\n\n

[00:16:20] Tony: Yeah. So that was one of the things that we wanted to work on was the ability to transcribe. And, because we have the privilege of working closely with Pocket Casts, we have, a lot of fancy tools that they have built already for their podcasting platform that we were going to try and leverage for the podcast show.

\n\n\n\n

[00:16:39] Nathan Wrigley: Pocket Casts is an Android, iOS, and, it’s a web player as well. It’s a place where you go download onto your phone or what have you and play them. I have it, I use it every single week, and I’ve noticed that whether a transcript is made or not, Pocket Casts actually makes one.

\n\n\n\n

[00:16:54] Tony: Yep.

\n\n\n\n

[00:16:54] Nathan Wrigley: So if I ship a podcast without a transcript, Pocket Casts magically has a transcript. So I don’t know where that voodoo is happening. But that technology, you can then do double duty on that. You can take the technology they’ve built, use it in the Jetpack side of things, and do the transcription. Okay, that’s neat. Sorry, I interrupted. Apologies.

\n\n\n\n

[00:17:11] Tony: You’re good. Yeah, that’s all of it. That’s, it right there.

\n\n\n\n

[00:17:13] Rob Pugh: I think that’s a great segue into Pocket Casts, which in our opinion is the best app to listen to podcasts. The best platform. And one of the really cool things we were able to do with, because we work closely with Pocket Casts, is when you are distributing your podcast. We pick, just to start, the six biggest ones and hold your hand on submitting to them. But Pocket Casts is actually Automattic. Automattic, you can spell it with one or two Ts. And, if you click the button, it just is uploaded to their network It takes minutes, and it’s, some of the other ones, we hold your hand, but it’s a little annoying, and some of them can take a couple days, like Apple, to approve things. But, Pocket Casts just works. I don’t know if you want to add anything on that magic, Tony.

\n\n\n\n

[00:17:52] Tony: Yeah, it’s very simple. It’s like right off the bat. If you already had an episode recorded, you could start a new website, upload your first episode, set your settings, and be on Pocket Casts, I would say, in less than an hour, honestly.

\n\n\n\n

[00:18:06] Nathan Wrigley: Yeah, because you’ve got that tight integration.

\n\n\n\n

[00:18:08] Tony: Yeah. It doesn’t say anything for the website configurations, which I’m sure would take more time, but at the very least, if you wanted to get your show out there, it’s a pretty instant approval.

\n\n\n\n

[00:18:17] Nathan Wrigley: I think podcast players. If you’ve never run a podcast, there’s this whole dance that you have to do. The first time you ever try to release an episode, and that is to get it set up with the distribution channels that are popular. So I’m thinking of things like Apple Podcasts, and YouTube Music, and Amazon, and the list goes on and on. There’s, dozens of them, some more important than others. I think probably Apple is probably the biggest one, and maybe Spotify and some others come in second and third place.

\n\n\n\n

But you have to do this thing where in some cases you have to go and get an account, and there’s really no way around that. Do you do some of that heavy lifting though? Do you make it easy for people to understand how to do it? When I did it, like 10 years ago for the first, and thankfully, only time I really ever had to do it, it was a case of going out and Googling it and reading things. But do you have that information in the UI to make that journey a little bit easier, reduce hours to minutes perhaps?

\n\n\n\n

[00:19:07] Tony: Yep, we have a button.

\n\n\n\n

[00:19:08] Rob Pugh: So there’s a distribution tab which lists the, all six like you mentioned, Amazon, Spotify, Apple, Pocket Casts, Podcast Index, which covers a whole bunch of minor networks. And I’d love to one day have it be fully automatic like it is with Pocket Casts. But some of them you need actual partnerships with these, Apple or Spotify to make that happen, and we haven’t prioritized putting a business person to go start a relationship and that.

\n\n\n\n

So we will organize them for you and try and give clear instructions in our documentation to how to do it. But there is just a button then when you’re looking and it shows you the status of it, if it’s in or not.

\n\n\n\n

[00:19:42] Nathan Wrigley: Okay. So you click the button, do the necessary thing, and then it will report back to you whether or not that has been successful. It’s a bit of a strange vestige really of the internet from way back when. It feels like in this day and age of everybody using APIs to connect to this, that, and the other thing.

\n\n\n\n

But companies like Apple seem to be very unwilling to let that bit of their system be wide open. You’ve got to sign up for an Apple Creators account. I forget exactly what it’s called, but you log in and then you submit your RSS feed. It really doesn’t take that long, but you still have to do it.

\n\n\n\n

[00:20:12] Rob Pugh: Yeah.

\n\n\n\n

[00:20:13] Nathan Wrigley: And I think they’re doing it because they get to see from the inside out, how popular your podcast is. And I don’t know, maybe they can monetize things from their end. I’m not really sure how that works.

\n\n\n\n

[00:20:23] Rob Pugh: It’s really another example of the closed internet.

\n\n\n\n

[00:20:26] Nathan Wrigley: Yeah.

\n\n\n\n

[00:20:26] Rob Pugh: Which is terrible. Why does Apple and Spotify need to be closed? So I think with having your podcast on WordPress with Jetpack, wordpress.com, and being in Pocket Casts, great. Then you’re, in the more of the open garden which is a better place to be.

\n\n\n\n

And the cool thing with our stats, you can see who’s coming, like how many people are listening to your show on Apple versus Spotify versus Pocket Casts. So you know if you’re not getting any from Spotify, then you don’t even need to be there. Of course though, it helps with findability to be everywhere, so we want to give you that option.

\n\n\n\n

[00:20:56] Nathan Wrigley: Yeah, at the end of the day, it all boils down to an RSS feed, which if it’s on your WordPress website presumably contains your domain name, forward slash, I don’t know, feed forward slash something maybe. So your RSS feed is going to be fairly short, probably very on message.

\n\n\n\n

Does it work that way or does it have some sort of Jetpack or, I don’t know, WordPress.com thing in it? Because when you go to these other platforms, it’s typically platformname.com/randomstringof12characters or something like that, which is very hard to read out in your podcast. But the way you’ve got it built, it sounds like the sort of thing that would trip off the tongue. So you know, wptavern.com/podcast. Put that into your podcast player of choice and you’re done. I’m saying all of that like that’s true, but I don’t know if it is.

\n\n\n\n

[00:21:40] Tony: Yeah, that’s it. Slash feed at the end.

\n\n\n\n

[00:21:43] Nathan Wrigley: Okay.

\n\n\n\n

[00:21:43] Tony: Because it is an RSS feed, yeah.

\n\n\n\n

[00:21:45] Nathan Wrigley: That’s still fairly straightforward. But again, that’s a nice bit of branding, isn’t it? And, I think that’s really good.

\n\n\n\n

Linking it back to the branding. We touched on this a minute ago, but if you haven’t started a podcast before, it may not be entirely obvious that you do want those other things like a newsletter, and like the ability to post to socials, and it feels like you’ve got the complete wraparound solution for that.

\n\n\n\n

Because as your podcast grows, which let’s hope it does, then you will probably wish to have a relationship with your listeners via an email newsletter. You probably will wish to be posting on social media. You probably will wish to do all of these different things. So social posting, newsletter, RSS feed, WordPress as the sort of custodian of all the text and the images and the videos that I put in. Is there any other secret sauce that we’ve missed there? Is there any other sort of unique binding that Jetpack brings that we haven’t mentioned there?

\n\n\n\n

[00:22:37] Rob Pugh: I’ll take it back first to like why we started this, and decided to build this, and I think you’re exactly right. First we found there are lots of WordPress.com and Jetpack users who have podcasts somewhere else. And that’s fine, but they were forced to because we didn’t offer it, and that really makes sense. Why would you need to go somewhere else?

\n\n\n\n

So you say today, our goal in creating it was twofold for the people creating the platform. It should just be as easy as possible. Podcasting and writing is hard enough. You should focus on that. Let us handle all the difficult stuff.

\n\n\n\n

Like you said, you need to, have a newsletter and a podcast and a blog and own all of it, and why can’t you do that with one publish event? And then from the consumer’s side of like consumer of content, some people want to listen to only podcasts, and some people want to read on a blog or, say, the WordPress.com reader. Shout out, go check that out if you haven’t in a while.

\n\n\n\n

And like me, I prefer to actually read stuff in my email inbox, like a old weirdo. It shouldn’t be, you should let people consume however they want to, and it shouldn’t be a lot of extra work for you, the host, the creator, to manage all of these things on different platforms. Just have it be as simple as possible, and that was really our goal. And then, yes, exactly what you said with all the other Jetpack stuff. Social media is a great one. Gosh, you could go on and on. Performance, security, basics.

\n\n\n\n

[00:23:46] Nathan Wrigley: Yeah. And it binds to, you said it just then, and it binds to the one publish event. So when I began my podcasting journey you end up with, like all these Zapier connections and different ways that, I don’t know, a webhook which goes off here and does a particular thing because you want it to be posted to this social network. With this, once you’ve got all of the bits and pieces configured, you click publish.

\n\n\n\n

So you know, you do your audio, you write your text, you do all of that in a draft state, upload the audio. But the moment you click publish, the newsletter goes out, the social media posts go out, and all of that just happens automatically. And you don’t have to think about it. And they’re already there in your website.

\n\n\n\n

It’s not like you have to do much. You just toggle, actually we should talk about that. You have to toggle the Jetpack podcast setting on, and presumably the newsletter setting, and yada yada, all those other things. But once you’ve toggled all those things on and got them set up, every time you click publish, all of those dominoes fall, and everything just happens on autopilot, which is really nice.

\n\n\n\n

What do we need to toggle on? How do we set it up? How expensive is it? Let’s start there.

\n\n\n\n

[00:24:50] Rob Pugh: I’ll talk about the pricing and then Tony can talk about the, the toggles.

\n\n\n\n

[00:24:54] Nathan Wrigley: Excellent. Yeah.

\n\n\n\n

[00:24:55] Rob Pugh: Yeah, we talked a bit about the pricing. I think that Automattic has always had a really generous free tier across its products, and it made sense for us to continue that. So you can today go to WordPress.com and start a blog for free.

\n\n\n\n

It’s going to have some ads on it, but it’s free. You can have your newsletter sent out unlimited sends for free with unlimited subscribers, and unlimited podcasts for free. That’s like, amazing deal. We don’t get enough credit for that, but cool.

\n\n\n\n

But we did build some compelling things to make you hopefully want to upgrade, or as you grow your podcast, you’ll find valuable. I think the stats are really cool. To me, all of the essential stats and none of the unessential stats, which if you’re an advanced podcaster might not be as good as you’re looking for. But, for most novice users, you just want to know the basics.

\n\n\n\n

Anything beyond that starts to feel like Google Analytics, like, I’m lost. So just give me the basic. Are they coming on Apple? Where, how many listeners to which episodes, and where in the world are they coming from? Which refers, like which sites are they coming from? That’s a great starting place for me.

\n\n\n\n

Help with distribution, the episode list, having a clear place for all your podcast episodes, the podcast block, really cool. And on WordPress.com too, we include the audio hosting once you upgrade. It’s not on Jetpack yet, so we’re waiting to see if, because we offer a similar thing for VideoPress, shout out best video hosting for WordPress.

\n\n\n\n

[00:26:09] Nathan Wrigley: Yeah, there’s VideoPress will handle the video side of things. That’s becoming the thing, by the way. I’m sure you know that. But in the podcasting space, I went to The Podcast Show in London, about four months ago or something like that. Everybody’s talking about video.

\n\n\n\n

[00:26:22] Rob Pugh: Yeah.

\n\n\n\n

[00:26:23] Nathan Wrigley: And so that being bound into Jetpack as well is just another string to your bow. I’m just going to segue slightly. I think Pocket Cast does a pretty good job of doing things like HLS video. I could be wrong about that, but I’ve got a feeling it does.

\n\n\n\n

[00:26:35] Rob Pugh: They even hook up with your Apple TV now, so you can watch and listen and yeah.

\n\n\n\n

[00:26:40] Nathan Wrigley: Oh, so this is really clever and completely out of the realms of possibility just a year ago. So you could be listening on your headphones whilst you’re out walking the dog on your podcast player, so you’re only listening to audio. And you come back in, put your Apple TV on, turn on the Pocket Cast player, and it will seamlessly drop you right in the video at the exact moment where you finished the dog walk. It’s so clever and so neat. I love all that stuff.

\n\n\n\n

[00:27:08] Rob Pugh: The future is so cool.

\n\n\n\n

[00:27:09] Nathan Wrigley: Yeah.

\n\n\n\n

[00:27:10] Rob Pugh: I love it.

\n\n\n\n

[00:27:10] Nathan Wrigley: Okay. So Tony, how do we switch it on? Is it genuinely one toggle in the Jetpack settings, or is there a little bit more to be set up?

\n\n\n\n

[00:27:17] Tony: Yeah, more or less. There is one toggle to turn the module on. And then once it’s on, you go to Jetpack and click on the podcast option, and then from there, there should just be one button that is to set up your show.

\n\n\n\n

And all it really requires is you either creating a new category or selecting a category. And this is, as we were talking about before, the category feed that is going to be taken over from there. And then you technically are done. But it’s advised that you fill out all of the other base settings, and we walk you through all of the ones that are required by the podcast show apps, to make sure that you don’t get blocked by Apple or Spotify for not having the necessary settings.

\n\n\n\n

[00:27:57] Nathan Wrigley: If I’ve been a podcaster for a number of years and I’ve got, I don’t know, a back catalog of 100 episodes or something like that. How do we handle that? How do we bring in previous episodes? And is there like an automated way of doing that or do I have to go and refigure 100 brand new pages on my WordPress website?

\n\n\n\n

Is there any heavy lifting done there? Let’s just deal with the audio first, just the RSS feed and the audio. Is it a simple case of dropping the old podcast RSS feed in and you’ll capture all that audio and it’ll be on the Jetpack side of things? Let’s do that first.

\n\n\n\n

[00:28:28] Tony: That’s a great question. I am not super familiar with the Core WordPress importer, but I believe that if there is a valid RSS feed with the normal RSS style tags, like enclosure and things like that, you should be able to import your RSS feed. Depending on how it’s configured on your current host, directly into WordPress. I’m not too sure what that would result in exactly. Especially because there’s a lot of different hosts out there, and it’s not like there’s one standard format for exporting your content. But yeah, that should get you part of the way there.

\n\n\n\n

Then I think in the future, we’re really looking to start targeting some of the major current podcast hosts to be able to configure a migration flow to be able to come from those places to ours, in a more seamless way, albeit whatever sort of export they can give you or, whatnot. But I think that’s still on the horizon.

\n\n\n\n

[00:29:27] Nathan Wrigley: Yeah, it’d be really nice to, let’s say I have 100 episodes and I’ve got, it’s over on whatever, hosting platform X over there, for my podcast audio feed. It’d be nice to be able to just suck in all the descriptions, and all the titles and have them be created as WordPress posts with the category assigned. So that essentially my WordPress site with the click of a button and the wait of an hour has suddenly got 100 posts of the podcast type all ready to go. And then, that’ll sit inside my SEO sitemap and all of that kind of stuff. That would be really interesting to be able to do, I think.

\n\n\n\n

[00:29:58] Rob Pugh: Yeah, I think we will try and have that in the future. We usually do try and make importing, especially from closed platforms, super easy. An example, another Substack. We have an amazing Substack importer. They’re not a big podcaster yet, but they, do have some, and we can look at adding that. But if you have all of your newsletter on Substack, you click a button and we bring over your whole, build you a website, bring over all your posts, all your subscribers, even paid subscribers. We seamlessly transfer it to the Stripe account. Everything we’re building, we’re just trying to make it super easy for people to own your data, go wherever you want. We encourage movement in and out, wherever you want to go, it’s up to you.

\n\n\n\n

[00:30:31] Nathan Wrigley: I suppose that then leads me to this question, which is, and you’ve probably just answered it. You’re not holding people behind some sort of paywall here. If people try Jetpack Podcasts out and they decide, “You know what? I really want to go the other direction. I want to maybe go back to where I was, or just move to a new host,” or what have you. You’re not holding any of that hostage, are you? You can take it and run with it and put it somewhere else?

\n\n\n\n

[00:30:52] Rob Pugh: Yeah. Yeah, absolutely not. Like that’s the, I think, one of the fundamentals of WordPress. You should be able to move within WordPress and out as much as you want. I will say that this is a new feature that me and Tony have built. Just because something doesn’t exist in a super streamlined way, doesn’t mean it’s our intention to lock you in. So please reach out and we’ll happily help you migrate off if that’s your wish.

\n\n\n\n

[00:31:15] Nathan Wrigley: So I’ll just let you know, dear listener, that there’s several URLs which rather than read them, because in many cases they can be quite long. But one of them, which is really easy for me to say, I might as well do that one, is wordpress.com/podcast. That’s probably the easiest one. Oh, and maybe this one as well, jetpack.com/support/jetpack-podcast. There’s several more.

\n\n\n\n

[00:31:38] Rob Pugh: Let me jump in. Let me sorry, Because as of two days ago, we now have jetpack.com/podcast.

\n\n\n\n

[00:31:45] Nathan Wrigley: Oh, okay. That’s way better.

\n\n\n\n

[00:31:46] Rob Pugh: We just relaunched the entire jetpack.com site, which is cool. You should go check it out. Yeah, so.

\n\n\n\n

[00:31:51] Nathan Wrigley: Again though, that, so what was that? Jetpack.com/podcast is kind of the home for all of those bits and pieces.

\n\n\n\n

[00:31:56] Rob Pugh: Yep, exactly.

\n\n\n\n

[00:31:57] Nathan Wrigley: In which case, go there. That’s where you’re going to find all of the bits and pieces and I presume, when things are, adapted and modified.

\n\n\n\n

[00:32:03] Rob Pugh: Yeah, the way to think about it’s still for some people confusing about Jetpack. So if you would like a website, the best WordPress hosting, then go to wordpress.com/podcast, and we’ll host your podcast for you. And if you want to host somewhere else, that’s great. Go host your WordPress site somewhere else, then go to jetpack.com/podcast and we’ll get you all set up as well.

\n\n\n\n

[00:32:23] Nathan Wrigley: In which case, I will say thank you Rob, and thank you, Tony. Thanks so much for chatting to me, both of you.

\n\n\n\n

[00:32:28] Rob Pugh: Yeah. Thank you Nathan.

\n\n\n\n

[00:32:28] Tony: Yep, thank you.

\n
\n\n\n\n

On the podcast today we have Rob Pugh and Tony Arcangelini.

\n\n\n\n

Rob and Tony are longstanding members of the Automattic team, with extensive backgrounds in marketing, product, and software development. They’ve spent years building tools for creators, writers, podcasters, and everyone in between, and are now fully immersed in WordPress’s evolving podcasting capabilities.

\n\n\n\n

If you’ve been looking for ways to run your podcast from your own WordPress site, this conversation is for you. Rob and Tony dive into the new Jetpack podcasting features and why they made the leap from WordPress.com’s basic audio offerings to a more robust, integrated solution within Jetpack. They talk about what makes WordPress and Jetpack such a powerful home for creators: the ability to bring your newsletter, blog, podcast, and all your content and communication under one roof, all while keeping ownership of your data.

\n\n\n\n

We talk through the advantages of keeping your content out of walled gardens like Substack and Patreon, and the value of flexibility, whether that’s adding WooCommerce to sell merch or customising your site’s look. Rob and Tony break down just how easy it is to start your show, drop audio into a post, set your category, and let Jetpack handle the rest, from distributing your RSS feed to major podcast apps, to sending out newsletters and automated social posts.

\n\n\n\n

They also get into how integrations with Pocket Casts and Jetpack AI make content creation, transcription, and distribution smoother than ever, plus how WordPress’ open foundation promises you’ll never be locked in.

\n\n\n\n

If you’re a creator wondering how the next generation of podcasting fits into the WordPress ecosystem, or just want an easier way to launch and grow your show, this episode is for you.

\n\n\n\n

Useful links

\n\n\n\n

Pocket Casts

\n\n\n\n

VideoPress

\n\n\n\n

The Podcast Show London

\n\n\n\n

Podcasts on wordpress.com

\n\n\n\n

Podcasts on jetpack.com

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 30 Sep 2026 12:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Nathan Wrigley\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:15;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"bbPress: bbPress 2.6.19 is out!\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"https://bbpress.org/?p=249953\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:55:\"https://bbpress.org/blog/2026/09/bbpress-2-6-19-is-out/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:1642:\"

bbPress 2.6.19 is a security and maintenance release. Everyone running bbPress should update. \"🔒\"

\n\n\n\n

This release applies inherited forum passwords to REST API responses and BuddyPress activity, and strengthens access checks for restricted forum content across feeds, group forums, and other indirect views. It also tightens moderation and forum-role permissions, protects importer credentials and account handling, and improves escaping in profile and administration output.

\n\n\n\n

There are maintenance fixes for BuddyPress group-forum associations and notifications, converter cleanup, imported database passwords, subscription emails, and reply positioning. The 2.6.19 upgrade notes cover integration details. bbPress still requires WordPress 6.0 or newer and PHP 7.2 or newer. The automatic database version 264 upgrade clears saved converter query SQL from older password upgrades.

\n\n\n\n

These changes are also in the 2.7 development branch, which is now 2.7.0-alpha-4. Thank you to thewindghost, ngonhuy, and moltenbit for responsibly reporting issues fixed in this release, and to everyone who helped review and test the changes.

\n\n\n\n

Download bbPress 2.6.19 from WordPress.org, or update from your WordPress dashboard.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 30 Sep 2026 01:17:13 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:17:\"John James Jacoby\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:16;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"Open Channels FM: Delegating to AI: What September Taught Us About Control and Cost\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563114\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:89:\"https://openchannels.fm/delegating-to-ai-what-september-taught-us-about-control-and-cost/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:149:\"This month\'s AI stories, from kernel-crawling bots to assistants booking your flights, all pointed to the same gap: creation got cheap. Trust didn\'t.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 29 Sep 2026 12:12:01 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:17;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:128:\"HeroPress: From Blogging to Belonging: My WordPress Journey – Blogging से Belonging तक: मेरी WordPress Journey\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:56:\"https://heropress.com/?post_type=heropress-essays&p=8892\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:168:\"https://heropress.com/essays/from-blogging-to-belonging-my-wordpress-journey/#utm_source=rss&utm_medium=rss&utm_campaign=from-blogging-to-belonging-my-wordpress-journey\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:95629:\"\"Pull

वर्डप्रेस ने मुझे मेरे ज़िंदगी में कुछ अलग करने का मौक़ा दिया।

\n\n\n\n

Introduction

\n\n\n\n

My name is Satyam Vishwakarma, though most people know me as Satya.

\n\n\n\n

I come from a small village called Mahmadpur, near Fatehpur, the city of Doaba, in Uttar Pradesh, nestled between the sacred Ganga and Yamuna rivers. This is the place I’ve always called home.

\n\n\n\n

I studied Electronics Engineering (Micro) at Government Polytechnic College in Fatehpur. Growing up and studying in a relatively small city, I never had a clear idea of where technology or the internet could take me.

\n\n\n\n
\"Satyam
Satyam Vishwakarma presenting his project during the first year of his diploma, 2018.
\n\n\n\n

I didn’t discover WordPress with a big career plan. I was simply curious about technology and wanted to help the people around me.

\n\n\n\n

Most of my classmates, including me, came from Hindi-medium schools or the UP Board. A lot of the technical material we found online was either difficult to understand or simply wasn’t written in the kind of simple English we were comfortable with.

\n\n\n\n

At the same time, I was probably one of the more tech-savvy people around me. I loved trying new software, exploring new features, and figuring out how things worked. Whenever I discovered something interesting, I would share it with my WhatsApp groups and classmates.

\n\n\n\n

I didn’t think of that as writing or teaching at the time.

\n\n\n\n

I was simply sharing something I had discovered.

\n\n\n\n

Eventually, I thought: why not put some of this information somewhere that more people could find it?

\n\n\n\n

That small thought became the beginning of my writing career.

\n\n\n\n

Before WordPress, there was Blogger

\n\n\n\n

Some of my earliest opportunities to write online came through people I met on WhatsApp.

\n\n\n\n

I became friends with Mohit Vyas and Arpit Nuwal through one of the technology-focused WhatsApp groups I was part of. They had built a website called TopJankari. It wasn’t running on WordPress. It was a custom-built, dynamic website with its own basic way of managing content, but it was still fairly simple compared with the content management systems I discovered later.

\n\n\n\n

I started writing technology and tips-related content for TopJankari.

\n\n\n\n

For me, this was exciting. I was taking the things I was already experimenting with and turning them into something that other people could actually read and use.

\n\n\n\n

Around the same time, I started experimenting with Blogger.com and began publishing my own technology and tips-related content there.

\n\n\n\n

I wasn’t thinking about becoming a professional writer.

\n\n\n\n

I just enjoyed technology; I enjoyed explaining things, and I liked the idea that something I wrote could help another person solve a problem.

\n\n\n\n

That was enough motivation to keep going.

\n\n\n\n

Then WordPress entered the picture

\n\n\n\n

While I was experimenting with blogging, my brother Shivam (now runs a WordPress design agency called Subhash Digital) built his first website with WordPress.

\n\n\n\n

That caught my attention.

\n\n\n\n

I was already curious about how websites worked, and seeing him build something with WordPress gave me an idea of what was possible. I wanted to try it myself.

\n\n\n\n

Around the same time, my brother Kapil and I started learning WordPress together.

\n\n\n\n

Neither of us really knew what we were doing.

\n\n\n\n

We learned through YouTube videos, documentation, blog posts, and mostly through experimentation.

We would try something, break it, search for why it broke, fix it, and move on to the next thing.

\n\n\n\n

My first WordPress project was EngineersGuru, a place where I could share content related to my Electronics Engineering (Micro) course.

\n\n\n\n

I initially ran it as a subdomain, with the idea of making useful course-related tutorials and information easier for fellow students to understand.

\n\n\n\n

We also started an Android-related blog and Jankari.xyz, a more general website where I could write about pretty much anything I found interesting.

\n\n\n\n

In hindsight, those websites were my playground.

\n\n\n\n

They were where I learned WordPress, writing, SEO, content creation, and the basics of running websites.

\n\n\n\n

I wasn’t following a carefully designed career path. I was just building things because I wanted to see what I could do.

\n\n\n\n

And that curiosity kept taking me somewhere new.

\n\n\n\n

Learning by failing

\n\n\n\n

As I continued blogging, I started learning about SEO, monetization, and affiliate marketing.

\n\n\n\n

I experimented with different kinds of websites and eventually built more than ten blogs while I was still learning.

\n\n\n\n

One of my projects eventually became EYNZone (formerly known as EYNWorld), where I started helping others learn WordPress and other skills and grow their own projects.

\n\n\n\n

There were plenty of failures along the way.

\n\n\n\n

I applied for Google AdSense more than twenty times before I finally stopped guessing and actually studied the guidelines carefully. Eventually, I got a brand-new domain approved with only two articles.

\n\n\n\n
\"An
\n\n\n\n

That experience stayed with me.

\n\n\n\n

It taught me that rejection doesn’t necessarily mean you aren’t capable.

\n\n\n\n

Sometimes you simply haven’t figured out the problem yet.

\n\n\n\n

That became a recurring theme in my life.

\n\n\n\n

Looking for a career, finding a community

\n\n\n\n

Eventually, I started looking for a full-time job in mid 2022.

\n\n\n\n

That was another learning experience, although not always a pleasant one.

\n\n\n\n

I applied to more than 800 companies and went through around 2,000 job applications.

\n\n\n\n

During that period, I discovered UnderrepresentedInTech through Michelle Frechette. That eventually introduced me to Post Status, where I started meeting more people from the WordPress ecosystem.

\n\n\n\n

Something interesting was happening.

\n\n\n\n

While I was struggling to find where I fit professionally, I was slowly finding a place for myself in WordPress.

\n\n\n\n

I started learning not just about the software, but about the project behind it and the people who were building it.

\n\n\n\n

And then I heard about WordCamp Bhopal.

\n\n\n\n

The WordCamp I almost couldn’t attend

\n\n\n\n

My first WordCamp was WordCamp Bhopal in 2023.

\n\n\n\n

I wanted to go.

\n\n\n\n

I had told people I would go.

\n\n\n\n

There was just one problem: I didn’t have the money to actually make the trip happen.

\n\n\n\n

So I asked for help in the Post Status Slack community.

\n\n\n\n

I still think about what happened next.

\n\n\n\n

People who had never met me in person decided to help. Alan, Jenni, and Corey Maass contributed financially. Michelle, Jeff, and others shared my request, and Ronald (from DLXPlugins) also helped after seeing it.

\n\n\n\n

People I barely knew, or had never met at all, helped me get to an event that I otherwise couldn’t have attended.

\n\n\n\n

I made it to Bhopal.

\n\n\n\n

The journey itself was almost comical. I travelled at the last moment, ended up at the wrong location at night, and then had an entire hotel saga before things finally settled down.

\n\n\n\n

But once I got there, none of that really mattered.

\n\n\n\n

Later at the event, Nabin Jaiswal also helped.

\n\n\n\n

I met people I had previously known only through websites, Slack, and social media.

\n\n\n\n\n\n\n\n


And then something unexpected happened.

\n\n\n\n

I wanted to go to another WordCamp.

\n\n\n\n

Then another.

\n\n\n\n

That first trip was followed by WordCamp Mumbai, WordCamp Udaipur, where I received a scholarship, and WordCamp Ahmedabad in 2023.

\n\n\n\n\n\n\n\n


Within a few months, WordPress had gone from something I used on my computer to something I experienced through people.

\n\n\n\n

It had faces now.

\n\n\n\n

Names.

\n\n\n\n

Conversations.

\n\n\n\n

Handshakes.

\n\n\n\n

People asking how I was doing.

\n\n\n\n

And I wanted to give something back.

\n\n\n\n

I didn’t know how much I could contribute

\n\n\n\n

I started with the Marketing team and gradually found my way into other parts of the project: Community, Meetups, Polyglots, Photos, Training, and Core.

\n\n\n\n

In January 2024, I published a public contribution goal for myself.

\n\n\n\n
\n

My #WordPress contribution goals for 2024:
1. Contribute 100 photos \"📸\"
2. Translate 5000 strings \"🌐\"
3. Write 5 documentation pieces \"📝\"
4. Organize meetups \"🤝\"
5. Attend 8+ WordCamps \"🎉\"
6. Make impactful marketing contributions! \"💡\" #OpenSource #WordPressCommunity #2024Goals pic.twitter.com/uLxE0BdYVL

— Satyam Vishwakarma (Satya) (@ask_hellosatya) January 17, 2024
\n
\n\n\n\n

I wanted to contribute 100 photos, translate thousands of strings, work on documentation and training, organize meetups, attend WordCamps, volunteer at events, and make meaningful contributions to marketing.

\n\n\n\n

At the time, it was simply a list of things I wanted to try.

\n\n\n\n

I didn’t know where it would lead.

\n\n\n\n

Within that year, I contributed around 150 photos and translated, reviewed, or suggested around 1,400 strings. I also reviewed Training content, organized my first meetup for WordPress’s 21st birthday, graduated as a mentee in the WordPress Contributor Mentorship Program 2nd Cohort for Support and Polyglots, worked on marketing for releases and events, volunteered at multiple events, and eventually led Contributor Day tables.

\n\n\n\n\n\n\n\n


I also became a Project Manager at do_action Bhopal after starting there as a Content and Social Media Manager.

\n\n\n\n\n\n\n\n


I also volunteered at PHPCamp 2024, an Un(conference) inspired by the BarCamp format.

\n\n\n\n\n\n\n\n


Other WordCamp Events I Attended in 2025–2026

\n\n\n\n\n\n\n\n


I also helped with sponsorships and the overall program progress of WPSimplified’s three-month live WordPress training program, led by Sunil Kumar Sharma, which ran from November 2025 to January 2026.

\n\n\n\n
\"\"
Satyam Vishwakarma, with WPSimplified swag presented in recognition of his organizing efforts.
\n\n\n\n

On paper, those things look like achievements.

\n\n\n\n

But that’s not how I remember them.

\n\n\n\n

I remember sitting in meetings, wondering whether my idea was good enough.

\n\n\n\n

I remember asking questions.

\n\n\n\n

I remember people patiently explaining things.

\n\n\n\n

I remember realizing that I could actually be useful.

\n\n\n\n

And I remember the feeling of seeing something I had worked on become part of something much bigger than me.

\n\n\n\n

That was when contribution started becoming less about “what can I get from WordPress?” and more about “what can I give back?”

\n\n\n\n

The people became the story

\n\n\n\n

The more I contributed, the more people I met.

\n\n\n\n

Some of them became friends.

\n\n\n\n

Some became mentors.

\n\n\n\n

Some simply inspired me by watching how they showed up for the community.

\n\n\n\n

Michelle Frechette has been one of those people for me. So have Topher DeRosia, Isotta Peira, Nidhi Jain, Ganga Kafle, and many others.

\n\n\n\n

What I admire about people like them isn’t just what they have achieved.

\n\n\n\n

It’s the way they make other people feel that there is room for them, too.

\n\n\n\n

That matters when you’re coming from somewhere like Fatehpur and trying to find your place in a global community.

\n\n\n\n

You don’t always need someone to give you an opportunity.

\n\n\n\n

Sometimes you just need someone to make you believe that you are allowed to try.

\n\n\n\n

I’ve been fortunate to have people do that for me.

\n\n\n\n

From contributing to building

\n\n\n\n

By my second year, I started wanting to build things of my own within the WordPress ecosystem.

\n\n\n\n

I volunteered and led the marketing team alongside Emma Young at WordCamp Asia 2025 in Manila.

\n\n\n\n

I started building plugins of my own, with contributions and support from Harish, Bhargav, Makarand Mane, Hitanshu Sahu, and Sajid Ansari.

\n\n\n\n

The first was QuoteFrameShare.

\n\n\n\n

It lets people create and share customizable blockquotes in WordPress.

\n\n\n\n
\n

That project was particularly meaningful to me because writing and poetry have always been a part of who I am. Something that started with me writing technology tutorials for fellow engineering students had now come full circle into something I was building for writers, poets, and storytellers.

\n
\n\n\n\n

The second was Contributor Photo Gallery.

\n\n\n\n

It helps WordPress contributors display their WordPress.org photo contributions as a portfolio without needing to write code.

\n\n\n\n
\n

That one came from another part of my journey: photography and the WordPress Photo Directory.

\n
\n\n\n\n

I liked that both projects solved relatively simple problems, but for communities and people I actually cared about.

\n\n\n\n

I wasn’t just building a plugin because I could.

\n\n\n\n

I was building something because I had an idea and thought it could be useful to someone else.

\n\n\n\n

Not everything went smoothly

\n\n\n\n

My WordPress journey hasn’t been a straight line upward.

\n\n\n\n

There was a period when I became so enthusiastic about contributing that I started trying to do everything.

\n\n\n\n

Every team.

\n\n\n\n

Every opportunity.

\n\n\n\n

Every event.

\n\n\n\n

Every possible contribution.

\n\n\n\n

I was so focused on proving that I could contribute that I wasn’t paying enough attention to everything else in my life.

\n\n\n\n

Eventually, I burned out.

\n\n\n\n

I also learned that community work has its own challenges. Not every experience was positive, and there were moments when I felt overlooked, misunderstood, or discouraged.

\n\n\n\n

Those experiences were difficult, but they also forced me to think about what I actually wanted from contribution.

\n\n\n\n

I realized that I didn’t want to spend my time trying to prove that I belonged.

\n\n\n\n

I wanted to contribute because I cared about the project and the people in it.

\n\n\n\n

That changed how I look at contribution today.

\n\n\n\n

I learned that I didn’t need to be everywhere, collect every badge, or chase the biggest contribution count to prove that I cared.

\n\n\n\n

I needed to find a way of contributing that I could actually sustain.

\n\n\n\n

I also realized I didn’t need to sacrifice my health, livelihood, or peace of mind to prove that I cared.

\n\n\n\n

If you have one hour a week, contribute that hour.

\n\n\n\n

If you have more time, great.

\n\n\n\n

But contribution should be sustainable.

\n\n\n\n

The support that I will never forget

\n\n\n\n

One of the reasons I can talk about the difficult parts honestly is that the positive side of this community has been very real for me too.

\n\n\n\n

People have supported me in ways they didn’t have to.

\n\n\n\n

The help I received to attend my first WordCamp is one example.

\n\n\n\n

Katie at Barn2 later sponsored a couple of my WordCamp trips through the company’s events budget. Makarand nominated me for the Yoast Care Fund, which I was fortunate enough to receive.

\n\n\n\n

The WP Open Community Collective also supported me through a Contributor Day Lead Sponsorship sponsored by GoDaddy.

\n\n\n\n

And there were people who helped in ways that weren’t financial at all.

\n\n\n\n

People gave me their time.

\n\n\n\n

They answered questions.

\n\n\n\n

They recommended me.

\n\n\n\n

They encouraged me when I was uncertain.

\n\n\n\n

Those things can be easy to overlook when you are talking about contribution numbers, but for me, they are the real story.

\n\n\n\n

Because behind every contribution is usually a person.

\n\n\n\n

And behind my contributions are a lot of people who helped me get there.

\n\n\n\n

What WordPress gave me

\n\n\n\n

When I look back at the person who started writing technology tutorials for fellow engineering students, I don’t think he would have imagined any of this.

\n\n\n\n

I didn’t have a conventional path into technology.

\n\n\n\n

I didn’t study computer science.

\n\n\n\n

I learned WordPress by building things, breaking things, and figuring them out.

\n\n\n\n

And somehow, that was enough to get started.

\n\n\n\n

WordPress helped me develop skills in technology, content, SEO, marketing, product building, and community.

\n\n\n\n

It gave me opportunities to work with people around the world.

\n\n\n\n

It took me to WordCamps that I once couldn’t afford to attend.

\n\n\n\n

It helped me build open-source products.

\n\n\n\n

But those aren’t the things I value most.

\n\n\n\n

The biggest thing WordPress gave me was people.

\n\n\n\n

That’s why the word ‘belonging’ feels more appropriate to me than ‘success.’

\n\n\n\n

I came to WordPress to build websites.

\n\n\n\n

Somewhere along the way, WordPress helped me build a community around me.

\n\n\n\n

I am still figuring it out

\n\n\n\n

I still don’t know exactly where WordPress will take me.

\n\n\n\n

I want to keep building products.

\n\n\n\n

I want to grow further in the marketing and product side of my career.

\n\n\n\n

I want to explore more around partnerships and community.

\n\n\n\n

And one day, I’d love to co-lead a WordPress release.

\n\n\n\n

But I don’t want to chase these things just for a title or a badge.

\n\n\n\n

I want to build things that are genuinely useful.

\n\n\n\n

I want to become better at what I do.

\n\n\n\n

I want to help people who are where I was a few years ago.

\n\n\n\n

And I want to be the kind of person who, when someone remembers their first steps into WordPress, they can say: “Satya helped me get started.”

\n\n\n\n

That would mean more to me than any badge.

\n\n\n\n

Because that’s what happened to me.

\n\n\n\n

People helped me get started.

\n\n\n\n

People made space for me.

\n\n\n\n

People encouraged me.

\n\n\n\n

People believed I could contribute before I was completely sure myself.

\n\n\n\n

So if someone reading this is just starting their WordPress journey, my advice is simple:

\n\n\n\n

Start small. Ask questions. Find something you enjoy. Contribute consistently, but within your capacity.

\n\n\n\n

You don’t need to have everything figured out before you begin.

\n\n\n\n

I certainly didn’t.

\n\n\n\n

I started writing because I wanted to make complicated things easier for my classmates.

\n\n\n\n

I started blogging because I was curious about technology.

\n\n\n\n

I started using WordPress because my brother showed me what was possible.

\n\n\n\n

I kept learning because there was always something new to discover.

\n\n\n\n

And eventually, I started contributing because I wanted to give something back.

\n\n\n\n

But somewhere along the way, something else happened.

\n\n\n\n

I found people.

\n\n\n\n

I found opportunities.

\n\n\n\n

I found a community.

\n\n\n\n

And I found a place where I could keep learning, contributing, and becoming a little better than I was before.

\n\n\n\n

I came to WordPress to build websites.

\n\n\n\n

Somewhere along the way, WordPress helped me build a community around me.

\n\n\n\n

And maybe that’s what this journey has really been about.

\n\n\n\n

From blogging to belonging.

\n\n\n\n

Blogging से Belonging तक: मेरी WordPress Journey

\n\n\n\n

शुरुआत

\n\n\n\n

मेरा नाम सत्यम विश्वकर्मा है, हालांकि ज़्यादातर लोग मुझे सत्या के नाम से जानते हैं।

\n\n\n\n

मैं महमदपुर नाम के एक छोटे से गाँव से आता हूँ, जो उत्तर प्रदेश के फतेहपुर, दोआब के शहर, के पास है और गंगा और यमुना नदियों के बीच बसा है। यह जगह हमेशा से मुझे अपना घर लगी है।

\n\n\n\n

मैंने फतेहपुर के Government Polytechnic College से Electronics Engineering (Micro) की पढ़ाई की। एक छोटे शहर में बड़े होते और पढ़ते हुए मुझे कभी ठीक से अंदाज़ा नहीं था कि technology या internet मुझे कहाँ तक ले जा सकते हैं।

\n\n\n\n

मैं WordPress तक किसी बड़े career plan के साथ नहीं पहुँचा था। मैं बस technology को लेकर उत्सुक था और अपने आसपास के लोगों की मदद करना चाहता था।

\n\n\n\n

मेरे ज़्यादातर classmates, मेरी तरह, Hindi-medium schools या UP Board से पढ़े हुए थे।

\n\n\n\n

हमें इंटरनेट पर मिलने वाली बहुत-सी technical सामग्री या तो समझना मुश्किल होती थी या फिर वह उस तरह की आसान English में नहीं होती थी, जिसे हम सहजता से समझ सकें।

\n\n\n\n

साथ ही, मैं शायद अपने आसपास के लोगों में technology को लेकर थोड़ा ज़्यादा curious था।

\n\n\n\n

मुझे नया software आज़माना, नए features explore करना और यह समझना बहुत पसंद था कि चीज़ें कैसे काम करती हैं।

\n\n\n\n

जब भी मुझे कुछ interesting मिलता, मैं उसे अपने WhatsApp groups और classmates के साथ share करता था।

\n\n\n\n

उस समय मैंने इसे writing या teaching के तौर पर नहीं देखा था।

\n\n\n\n

मैं बस वही share कर रहा था जो मैंने खुद discover किया था।

\n\n\n\n

फिर एक दिन मन में आया:

\n\n\n\n

क्यों न इस information को कहीं ऐसी जगह रखा जाए, जहाँ इसे और लोग भी ढूँढ सकें?

\n\n\n\n

वही छोटी-सी सोच मेरी writing journey की शुरुआत बन गई।

\n\n\n\n

WordPress से पहले Blogger था

\n\n\n\n


Online लिखने के मेरे शुरुआती मौकों में से कुछ मुझे WhatsApp पर मिले लोगों की वजह से मिले।

\n\n\n\n

मैं technology से जुड़े एक WhatsApp group के ज़रिए Mohit Vyas और Arpit Nawal से online मिला। उन्होंने TopJankari नाम की website बनाई थी।

\n\n\n\n

वह WordPress पर नहीं चलती थी। वह एक custom-built, dynamic website थी, जिसमें content manage करने का अपना basic system था। बाद में मुझे जिन content management systems के बारे में पता चला, उनकी तुलना में वह काफी simple थी।

\n\n\n\n

मैंने TopJankari के लिए technology और tips से जुड़ा content लिखना शुरू किया।

\n\n\n\n

मेरे लिए यह बहुत exciting था।

\n\n\n\n

जिन चीज़ों को मैं खुद आज़मा रहा था, उन्हें मैं अब इस तरह लिख रहा था कि कोई दूसरा भी उन्हें पढ़कर इस्तेमाल कर सके।

\n\n\n\n

उसी दौरान मैंने Blogger.com के साथ भी experiment करना शुरू किया और वहाँ अपना technology और tips-related content publish करने लगा।

\n\n\n\n

उस समय मैं professional writer बनने के बारे में नहीं सोच रहा था।

\n\n\n\n

मुझे बस technology पसंद थी। मुझे चीज़ों को समझाना पसंद था। और मुझे यह विचार अच्छा लगता था कि मेरे द्वारा लिखी गई कोई चीज़ किसी दूसरे व्यक्ति की समस्या हल करने में मदद कर सकती है।

\n\n\n\n

मेरे लिए इतना ही काफी था आगे बढ़ते रहने के लिए।

\n\n\n\n

फिर WordPress मेरी कहानी में आया

\n\n\n\n


जब मैं blogging के साथ experiment कर रहा था, मेरे भाई Shivam ने उस समय तक WordPress पर अपनी पहली website बना ली थी।

\n\n\n\n

इसने मेरा ध्यान खींचा।

\n\n\n\n

मैं पहले से ही websites के काम करने के तरीके को लेकर curious था।

\n\n\n\n

उनको WordPress के साथ कुछ बनाते हुए देखकर मुझे पहली बार अंदाज़ा हुआ कि इसके साथ क्या-क्या बनाया जा सकता है।

\n\n\n\n

मैं भी इसे आज़माना चाहता था।

\n\n\n\n

उसी दौरान मेरे भाई Kapil और मैंने साथ मिलकर WordPress सीखना शुरू किया।

\n\n\n\n

हम दोनों को वास्तव में कुछ खास पता नहीं था।

\n\n\n\n

हमने YouTube videos, documentation, blog posts और सबसे ज़्यादा experimentation के ज़रिए सीखा।

\n\n\n\n

हम कुछ try करते, उसे तोड़ देते, फिर search करते कि वह क्यों टूटा, उसे ठीक करते और फिर अगली चीज़ पर बढ़ जाते।

\n\n\n\n

मेरा पहला WordPress project EngineersGuru था। वहाँ मैं अपनी Electronics Engineering (Micro) की पढ़ाई से जुड़ा content शेयर (publish) करता था।

\n\n\n\n

शुरुआत में मैंने इसे एक subdomain के रूप में चलाया। मेरा उद्देश्य था कि मेरे fellow students के लिए course से जुड़ी tutorials और useful information को समझना थोड़ा आसान हो सके।

\n\n\n\n

हमने एक Android-related blog भी शुरू किया और Jankari.xyz भी, जो एक ऐसी general website थी जहाँ मैं लगभग किसी भी ऐसी चीज़ के बारे में लिख सकता था जो मुझे interesting लगती थी।

\n\n\n\n

आज पीछे मुड़कर देखता हूँ तो ये websites मेरे लिए एक playground थीं।

\n\n\n\n

यहीं मैंने WordPress, writing, SEO, content creation और websites चलाने की basic बातें सीखीं।

\n\n\n\n

मैं किसी carefully planned career path पर नहीं चल रहा था।

\n\n\n\n

मैं बस चीज़ें बना रहा था, क्योंकि मैं देखना चाहता था कि मैं क्या कर सकता हूँ।

\n\n\n\n

और मेरी वही curiosity मुझे लगातार कहीं न कहीं आगे ले जाती रही।

\n\n\n\n

गलतियों से सीखना

\n\n\n\n


जैसे-जैसे blogging आगे बढ़ी, मैंने SEO, monetization और affiliate marketing के बारे में सीखना शुरू किया।

\n\n\n\n

मैंने अलग-अलग तरह की websites के साथ experiment किया और सीखते-सीखते दस से ज़्यादा blogs बनाए।

\n\n\n\n

मेरे इन्हीं projects में से एक आगे चलकर EYNZone बना, जिसे पहले EYNWorld के नाम से जाना जाता था। वहाँ मैंने दूसरे लोगों को WordPress और दूसरी skills सीखाने और अपने projects को grow करने में मदद करना शुरू किया।

\n\n\n\n

इस रास्ते में बहुत सारी असफलताएँ भी आईं।

\n\n\n\n

मैंने Google AdSense के लिए बीस से ज़्यादा बार apply किया, और हर बार कुछ न कुछ गलत हो जाता था। आखिरकार मैंने सिर्फ अंदाज़ा लगाना बंद किया और guidelines को सही से पढ़ना और समझना शुरू किया।

\n\n\n\n

आखिर में एक बिल्कुल नए domain पर सिर्फ दो articles के साथ मेरा AdSense approve हो गया।

\n\n\n\n

उस अनुभव का असर मुझ पर रह गया।

\n\n\n\n

इसने मुझे सिखाया कि rejection का मतलब हमेशा यह नहीं होता कि आप capable नहीं हैं।

\n\n\n\n

कभी-कभी इसका मतलब सिर्फ इतना होता है कि आपने अभी तक समस्या को समझा नहीं है।

\n\n\n\n

मेरी ज़िंदगी में यह बात बार-बार सामने आती रही।

\n\n\n\n

Career की तलाश में निकला था, Community मिल गई

\n\n\n\n


आखिरकार, 2022 के बीच में मैंने full-time नौकरी की तलाश शुरू की।

\n\n\n\n

वह भी अपने आप में एक learning experience था, हालांकि हमेशा अच्छा नहीं था।

\n\n\n\n

मैंने 800 से ज़्यादा companies में apply किया और करीब 2,000 job applications के process से गुज़रा।

\n\n\n\n

इसी दौरान मुझे Michelle Frechette के ज़रिए UnderrepresentedInTech के बारे में पता चला। वहाँ से आगे मुझे Post Status से जुड़ने का मौका मिला, जहाँ मैंने WordPress ecosystem के और लोगों से मिलना शुरू किया।

\n\n\n\n

कुछ interesting हो रहा था।

\n\n\n\n

जहाँ मैं यह समझने की कोशिश कर रहा था कि professionally मेरी जगह कहाँ है, वहीं धीरे-धीरे WordPress में मुझे अपनी जगह मिल रही थी।

\n\n\n\n

मैं सिर्फ software के बारे में नहीं सीख रहा था।

\n\n\n\n

मैं उस project के बारे में सीख रहा था जो software के पीछे था, और उन लोगों के बारे में भी जो उसे बनाने में मदद कर रहे थे।

\n\n\n\n

और फिर मैंने WordCamp Bhopal के बारे में सुना।

\n\n\n\n

वह WordCamp जिसे मैं लगभग attend नहीं कर पाता

\n\n\n\n


मेरा पहला WordCamp, WordCamp Bhopal 2023 था।

\n\n\n\n

मैं जाना चाहता था।

\n\n\n\n

मैंने लोगों से कह भी दिया था कि मैं जाऊँगा।

\n\n\n\n

बस एक समस्या थी।

\n\n\n\n

मेरे पास उस trip के लिए पैसे नहीं थे।

\n\n\n\n

इसलिए मैंने Post Status Slack community में मदद माँगी।

\n\n\n\n

आज भी मैं सोचता हूँ कि उसके बाद क्या हुआ था।

\n\n\n\n

जिन लोगों ने मुझे कभी सामने से देखा तक नहीं था, उन्होंने मेरी मदद करने का फैसला किया।

\n\n\n\n

Alan, Jenni और Corey Maass ने financially मदद की। Michelle, Jeff और दूसरे लोगों ने मेरी request को share किया। Ronald, जो DLXPlugins से हैं, उन्होंने भी इसे देखकर मदद की।

\n\n\n\n

जिन लोगों को मैं मुश्किल से जानता था, या शायद कभी मिला ही नहीं था, उन्होंने मुझे उस event तक पहुँचने में मदद की जहाँ मैं अपने दम पर नहीं जा सकता था।

\n\n\n\n

मैं Bhopal पहुँच गया।

\n\n\n\n

और वह सफ़र अपने आप में काफ़ी उलझनों से भरा था।

\n\n\n\n

मैंने आखिरी समय में यात्रा शुरू की, रात में गलत जगह पहुँच गया और फिर होटल को लेकर एक अलग ही किस्सा शुरू हो गया। आखिरकार, किसी तरह सब ठीक हुआ।

\n\n\n\n

लेकिन जब मैं वहाँ पहुँच गया, तो इनमें से किसी चीज़ की उतनी importance नहीं रही।

\n\n\n\n

Event के दौरान Nabin Jaiswal ने भी मेरी मदद की।

\n\n\n\n

मैं उन लोगों से मिला जिन्हें अब तक सिर्फ websites, Email, Slack और social media के ज़रिए जानता था।

\n\n\n\n

और फिर कुछ unexpected हुआ।

\n\n\n\n

मेरा मन हुआ कि मैं एक और WordCamp में जाऊँ।

\n\n\n\n

फिर एक और।

\n\n\n\n

उस पहली trip के बाद WordCamp Mumbai, WordCamp Udaipur, जहाँ मुझे scholarship मिली, और WordCamp Ahmedabad आए।

\n\n\n\n

कुछ ही महीनों में WordPress मेरे लिए computer पर इस्तेमाल की जाने वाली किसी चीज़ से बदलकर लोगों के ज़रिए अनुभव की जाने वाली चीज़ बन गया था।

\n\n\n\n

अब उसके चेहरे थे।

\n\n\n\n

नाम थे।

\n\n\n\n

बातचीत थी।

\n\n\n\n

हाथ मिलाना था।

\n\n\n\n

लोग पूछते थे कि मैं कैसा हूँ।

\n\n\n\n

और मेरा मन हुआ कि अब मुझे भी कुछ वापस देना चाहिए।

\n\n\n\n

मुझे नहीं पता था कि मैं कितना contribute कर सकता हूँ

\n\n\n\n


मैंने शुरुआत Marketing team से की और धीरे-धीरे WordPress project के दूसरे हिस्सों तक पहुँचता गया: Community, Meetups, Polyglots, Photos, Training और Core।

\n\n\n\n

जनवरी 2024 में मैंने अपने लिए एक public contribution लक्ष्य बनाया।

\n\n\n\n

मैं 100 photos contribute करना चाहता था, हजारों strings translate करना चाहता था, documentation और training पर काम करना चाहता था, meetups organize करना चाहता था, WordCamps attend करना चाहता था, events में volunteer करना चाहता था और marketing में meaningful contributions देना चाहता था।

\n\n\n\n

उस समय यह बस उन चीज़ों की एक list थी जिन्हें मैं try करना चाहता था।

\n\n\n\n

मुझे नहीं पता था कि यह मुझे कहाँ ले जाएगी।

\n\n\n\n

उस साल मैंने करीब 150 photos contribute कीं और लगभग 1,400 strings को translate, review या suggest किया। मैंने Training content भी review किया, WordPress के 21st birthday के लिए अपना पहला meetup organize किया, releases और events के marketing पर काम किया, कई events में volunteer किया और Contributor Days में tables भी lead करने लगा।

\n\n\n\n

मैं do_action Bhopal में Content and Social Media Manager के लिए चुना गया और बाद में Project Manager बना दिया गया।

\n\n\n\n

कागज़ पर देखें तो ये सब achievements लगती हैं।

\n\n\n\n

लेकिन मुझे ये इस तरह याद नहीं हैं।

\n\n\n\n

मुझे meetings याद हैं, जहाँ मैं सोचता था कि मेरा idea सही भी है या नहीं।

\n\n\n\n

मुझे अपने सवाल पूछना याद है।

\n\n\n\n

मुझे याद है कि लोग धैर्य से चीज़ें समझाते थे।

\n\n\n\n

मुझे याद है वह एहसास जब मुझे पहली बार लगा कि मैं वास्तव में useful हो सकता हूँ।

\n\n\n\n

और मुझे वह feeling याद है जब मेरे काम की कोई छोटी-सी चीज़ मेरे से कहीं बड़ी किसी चीज़ का हिस्सा बन गई।

\n\n\n\n

शायद वहीं से contribution मेरे लिए बदलना शुरू हुआ।

\n\n\n\n

यह सवाल कम होने लगा कि:

\n\n\n\n

“मुझे WordPress से क्या मिल सकता है?”

\n\n\n\n

और उसकी जगह एक दूसरा सवाल आने लगा:

\n\n\n\n

“मैं WordPress को क्या दे सकता हूँ?”

\n\n\n\n

कहानी में लोग आने लगे

\n\n\n\n


जितना मैं contribute करता गया, उतने ही ज़्यादा लोगों से मिलता गया।

\n\n\n\n

कुछ दोस्त बन गए।

\n\n\n\n

कुछ mentors बन गए।

\n\n\n\n

कुछ ऐसे लोग थे जिन्होंने बस community में जिस तरह अपनी जगह बनाई और दूसरों के लिए मौजूद रहे, उससे मुझे inspiration मिली।

\n\n\n\n

Michelle Frechette मेरे लिए ऐसे ही लोगों में से एक रही हैं। उनके साथ Topher DeRosia, Isotta Peira, Nidhi Jain, Ganga Kafle, और कई दूसरे लोग भी हैं।

\n\n\n\n

मैं इन लोगों से सिर्फ इसलिए प्रभावित नहीं हूँ कि उन्होंने क्या हासिल किया है।

\n\n\n\n

बल्कि इसलिए कि वे दूसरों को यह महसूस कराते हैं कि उनके लिए भी जगह है।

\n\n\n\n

जब आप Fatehpur जैसी जगह से आते हैं और एक global community में अपनी जगह बनाने की कोशिश करते हैं, तो यह बहुत मायने रखता है।

\n\n\n\n

हर बार किसी का आपको opportunity देना ज़रूरी नहीं होता।

\n\n\n\n

कभी-कभी आपको सिर्फ किसी ऐसे व्यक्ति की ज़रूरत होती है जो आपको यह विश्वास दिला दे कि:

\n\n\n\n

“हाँ, तुम भी कोशिश कर सकते हो।”

\n\n\n\n

मैं खुशकिस्मत हूँ कि मेरी journey में ऐसे लोग आए।

\n\n\n\n

Contribution से building तक

\n\n\n\n


मेरे दूसरे साल तक आते-आते मेरे मन में WordPress ecosystem के अंदर अपने कुछ products बनाने की इच्छा होने लगी।

\n\n\n\n

मैंने WordCamp Asia 2025 में Manila में Emma Young के साथ marketing team में lead किया और volunteer किया।

\n\n\n\n

इसके साथ मैंने अपने plugins बनाना भी शुरू किया, जिसमें Harish, Bhargav, Makarand Mane, Hitanshu Sahu, और Sajid Ansari के contributions और support ने मदद की।

\n\n\n\n

पहला था QuoteFrameShare

\n\n\n\n

यह लोगों को WordPress में customizable blockquotes बनाने और share करने की सुविधा देता है।

\n\n\n\n

यह project मेरे लिए खास था क्योंकि writing और poetry हमेशा से मेरी ज़िंदगी का हिस्सा रहे हैं।

\n\n\n\n

जिस चीज़ की शुरुआत fellow engineering students के लिए technology tutorials लिखने से हुई थी, वह अब घूमकर ऐसे product तक पहुँच गई थी जिसे writers, poets और storytellers के लिए बनाया जा रहा था।

\n\n\n\n

दूसरा था Contributor Photo Gallery

\n\n\n\n

यह WordPress contributors को अपनी WordPress.org photo contributions को बिना code लिखे एक portfolio की तरह दिखाने में मदद करता है।

\n\n\n\n

यह मेरी journey के एक और हिस्से से आया था: photography और WordPress Photo Directory।

\n\n\n\n

मुझे अच्छा लगा कि दोनों projects छोटी और relatively simple problems को solve करते थे, लेकिन उन communities और लोगों के लिए, जो मेरे लिए सच में मायने रखते थे।

\n\n\n\n

मैं सिर्फ इसलिए plugin नहीं बना रहा था क्योंकि मैं बना सकता था।

\n\n\n\n

मैं इसलिए कुछ बना रहा था क्योंकि मेरे पास एक idea था और मुझे लगा कि वह किसी और के लिए useful हो सकता है।

\n\n\n\n

सब कुछ हमेशा ठीक नहीं रहा

\n\n\n\n


मेरी WordPress journey हमेशा सीधी ऊपर की ओर जाने वाली कहानी नहीं रही।

\n\n\n\n

एक समय ऐसा भी आया जब contribution को लेकर मेरा उत्साह इतना बढ़ गया कि मैं सब कुछ करने की कोशिश करने लगा।

\n\n\n\n

हर team।

\n\n\n\n

हर opportunity।

\n\n\n\n

हर event।

\n\n\n\n

हर possible contribution।

\n\n\n\n

मैं यह साबित करने में इतना व्यस्त हो गया था कि मैं contribute कर सकता हूँ कि मैंने अपनी ज़िंदगी की बाकी चीज़ों पर पर्याप्त ध्यान देना शुरू नहीं किया।

\n\n\n\n

आखिरकार, मैं burnout हो गया।

\n\n\n\n

मैंने यह भी सीखा कि community work की अपनी challenges होती हैं।

\n\n\n\n

हर experience अच्छा नहीं था। कुछ ऐसे moments भी आए जब मुझे लगा कि मेरी बात को देखा नहीं गया, मुझे समझा नहीं गया या मैंने discouraged महसूस किया।

\n\n\n\n

वे experiences आसान नहीं थे।

\n\n\n\n

लेकिन उन्होंने मुझे यह सोचने पर मजबूर किया कि आखिर मैं contribution से क्या चाहता हूँ।

\n\n\n\n

मुझे एहसास हुआ कि मैं अपना समय यह साबित करने में नहीं लगाना चाहता था कि मैं belong करता हूँ।

\n\n\n\n

मैं contribute इसलिए करना चाहता था क्योंकि मुझे इस project और इसमें शामिल लोगों की परवाह थी।

\n\n\n\n

इसने contribution को देखने का मेरा तरीका बदल दिया।

\n\n\n\n

मुझे समझ आया कि मुझे हर जगह होना ज़रूरी नहीं है। हर badge collect करना ज़रूरी नहीं है। सबसे बड़ा contribution count हासिल करना भी ज़रूरी नहीं है ताकि मैं यह साबित कर सकूँ कि मुझे परवाह है।

\n\n\n\n

मुझे बस ऐसा तरीका ढूँढना था जिससे मैं लंबे समय तक contribute कर सकूँ।

\n\n\n\n

मुझे यह भी समझ आया कि यह साबित करने के लिए कि मुझे परवाह है, मुझे अपनी health, livelihood या peace of mind को sacrifice करने की ज़रूरत नहीं है।

\n\n\n\n

अगर आपके पास हफ्ते में सिर्फ एक घंटा है, तो उतना ही contribute कीजिए।

\n\n\n\n

अगर आपके पास ज़्यादा समय है, तो बहुत अच्छी बात है।

\n\n\n\n

लेकिन contribution sustainable होना चाहिए।

\n\n\n\n

वह support जिसे मैं कभी नहीं भूलूँगा

\n\n\n\n


शायद यही वजह है कि मैं अपनी journey के मुश्किल हिस्सों के बारे में भी ईमानदारी से बात कर सकता हूँ, क्योंकि इस community का positive side भी मेरे लिए उतना ही वास्तविक रहा है।

\n\n\n\n

लोगों ने मेरी ऐसे तरीकों से मदद की, जिसकी उन्हें कोई मजबूरी नहीं थी।

\n\n\n\n

मेरे पहले WordCamp तक पहुँचने में मिली मदद इसका एक उदाहरण है।

\n\n\n\n

बाद में Katie at Barn2 ने company के events budget के ज़रिए मेरे कुछ WordCamp trips sponsor किए। Makarand ने मुझे Yoast Care Fund के लिए nominate किया, जिसे पाना मेरे लिए सौभाग्य की बात रही।

\n\n\n\n

WP Open Community Collective ने भी मुझे Contributor Day Lead Sponsorship, जिसे GoDaddy ने sponsor किया था, के ज़रिए support किया।

\n\n\n\n

और कुछ लोगों ने ऐसी मदद की जो financial बिल्कुल नहीं थी।

\n\n\n\n

लोगों ने अपना समय दिया।

\n\n\n\n

मेरे सवालों के जवाब दिए।

\n\n\n\n

मेरी recommendations कीं।

\n\n\n\n

जब मैं खुद को लेकर uncertain था, तब मुझे encourage किया गया।

\n\n\n\n

Contribution numbers की बात करते समय इन चीज़ों को आसानी से नज़रअंदाज़ किया जा सकता है।

\n\n\n\n

लेकिन मेरे लिए असली कहानी यही है।

\n\n\n\n

क्योंकि हर contribution के पीछे अक्सर एक इंसान होता है।

\n\n\n\n

और मेरी contributions के पीछे बहुत सारे ऐसे लोग हैं जिन्होंने मुझे वहाँ तक पहुँचने में मदद की।

\n\n\n\n

WordPress ने मुझे क्या दिया

\n\n\n\n


जब मैं उस लड़के को पीछे मुड़कर देखता हूँ जिसने अपने fellow engineering students के लिए technology tutorials लिखना शुरू किया था, तो मुझे नहीं लगता कि उसने कभी सोचा होगा कि उसकी journey यहाँ तक आएगी।

\n\n\n\n

Technology में आने का मेरा कोई conventional रास्ता नहीं था।

\n\n\n\n

मैंने computer science की पढ़ाई नहीं की।

\n\n\n\n

मैंने WordPress की चीज़ें बनाकर, उन्हें तोड़कर और फिर उन्हें समझते हुए सीखा।

\n\n\n\n

और किसी तरह, शुरुआत करने के लिए इतना ही काफी था।

\n\n\n\n

WordPress ने मुझे technology, content, SEO, marketing, product building और community जैसी skills विकसित करने में मदद की।

\n\n\n\n

इसने मुझे दुनिया भर के लोगों के साथ काम करने के मौके दिए।

\n\n\n\n

मुझे उन WordCamps तक पहुँचाया, जिन्हें मैं कभी afford भी नहीं कर सकता था।

\n\n\n\n

इसने मुझे open-source products बनाने का मौका दिया।

\n\n\n\n

लेकिन इन सबमें से कोई भी चीज़ वह नहीं है जिसे मैं सबसे ज़्यादा महत्व देता हूँ।

\n\n\n\n

WordPress ने मुझे सबसे बड़ी चीज़ जो दी, वह लोग थे।

\n\n\n\n

शायद इसीलिए मेरे लिए “success” से ज़्यादा सही शब्द “belonging” है।

\n\n\n\n

मैं WordPress पर websites बनाने आया था।

\n\n\n\n

लेकिन कहीं न कहीं, WordPress ने मेरे आसपास एक community बना दी।

\n\n\n\n

मैं अभी भी इसे समझने की कोशिश कर रहा हूँ

\n\n\n\n


मुझे अभी भी ठीक से नहीं पता कि WordPress मुझे आगे कहाँ ले जाएगा।

\n\n\n\n

मैं products बनाते रहना चाहता हूँ।

\n\n\n\n

मैं marketing और product के क्षेत्र में और आगे बढ़ना चाहता हूँ।

\n\n\n\n

मैं partnerships और community के बारे में और explore करना चाहता हूँ।

\n\n\n\n

और एक दिन, मैं WordPress release को co-lead करना चाहता हूँ।

\n\n\n\n

लेकिन मैं इन चीज़ों के पीछे सिर्फ किसी title या badge के लिए नहीं भागना चाहता।

\n\n\n\n

मैं ऐसी चीज़ें बनाना चाहता हूँ जो सच में useful हों।

\n\n\n\n

मैं अपने काम में बेहतर बनना चाहता हूँ।

\n\n\n\n

मैं उन लोगों की मदद करना चाहता हूँ जो आज वहीं खड़े हैं जहाँ मैं कुछ साल पहले था।

\n\n\n\n

और मैं ऐसा इंसान बनना चाहता हूँ कि जब कोई अपने WordPress journey के शुरुआती दिनों को याद करे, तो शायद वह कह सके:

\n\n\n\n

“Satya ने मेरी शुरुआत में मेरी मदद की थी।”

\n\n\n\n

मेरे लिए वह किसी भी badge से ज़्यादा मायने रखेगा।

\n\n\n\n

क्योंकि मेरे साथ भी यही हुआ था।

\n\n\n\n

लोगों ने मेरी शुरुआत में मेरी मदद की।

\n\n\n\n

लोगों ने मेरे लिए जगह बनाई।

\n\n\n\n

लोगों ने मुझे encourage किया।

\n\n\n\n

लोगों ने मुझ पर भरोसा किया, उस समय भी जब मुझे खुद पूरी तरह यकीन नहीं था कि मैं contribute कर सकता हूँ।

\n\n\n\n

इसलिए अगर आप अपनी WordPress journey अभी शुरू कर रहे हैं, तो मेरी सलाह बहुत simple है:

\n\n\n\n

छोटे से शुरू कीजिए। सवाल पूछिए। जो पसंद है, उसे खोजिए। लगातार contribute कीजिए, लेकिन अपनी capacity के भीतर।

\n\n\n\n

आपको शुरुआत करने से पहले सब कुछ पता होना ज़रूरी नहीं है।

\n\n\n\n

मुझे भी नहीं पता था।

\n\n\n\n

मैंने लिखना इसलिए शुरू किया क्योंकि मैं अपने classmates के लिए मुश्किल चीज़ों को आसान बनाना चाहता था।

\n\n\n\n

मैंने blogging इसलिए शुरू की क्योंकि technology को लेकर मेरे अंदर curiosity थी।

\n\n\n\n

मैंने WordPress इसलिए शुरू किया क्योंकि मेरे भाई ने मुझे दिखाया कि इसके साथ क्या किया जा सकता है।

\n\n\n\n

मैं सीखता रहा क्योंकि हमेशा कुछ नया सीखने के लिए था।

\n\n\n\n

और आखिरकार, मैंने contribute करना शुरू किया क्योंकि मैं कुछ वापस देना चाहता था।

\n\n\n\n

लेकिन कहीं न कहीं, इस journey के दौरान कुछ और भी हुआ।

\n\n\n\n

मुझे लोग मिले।

\n\n\n\n

मुझे opportunities मिलीं।

\n\n\n\n

मुझे एक community मिली।

\n\n\n\n

और मुझे एक ऐसी जगह मिली जहाँ मैं सीखता रह सकता था, contribute करता रह सकता था और हर दिन थोड़ा बेहतर बनता रह सकता था।

\n\n\n\n

मैं WordPress पर वेबसाइटें बनाने आया था।

\n\n\n\n

लेकिन कहीं न कहीं, WordPress ने मेरे आसपास एक community बना दी।

और शायद यही इस पूरी journey का असली मतलब है।

\n\n\n\n

Blogging से Belonging तक।

\n

The post From Blogging to Belonging: My WordPress Journey – Blogging से Belonging तक: मेरी WordPress Journey appeared first on HeroPress.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 29 Sep 2026 11:43:21 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:18:\"Satyam Vishwakarma\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:18;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"Open Channels FM: What Can You Learn From 4.4 Million Words?\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562978\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"https://openchannels.fm/what-can-you-learn-from-4-4-million-words/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:232:\"In this episode, Bob Dunn discusses utilizing 4.4 million words from Open Channels FM\'s podcasts and blog posts. He highlights tools like Jetpack AI Search and Site Chat, enhancing users\' access to valuable insights and discussions.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 29 Sep 2026 09:42:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:19;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:62:\"OpenStation Blog: WordPress Has Been Missing This for 15 Years\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1342\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:81:\"https://openstation.blog/2026/09/28/wordpress-has-been-missing-this-for-15-years/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:16418:\"
\n

tl;dr:

\n\n\n\n

15 years stuck in the same wp-admin, why don’t you try in playground the new wp-admin experience?

\n
\n\n\n\n

WordPress has spent the last fifteen years becoming capable of doing almost everything, yet somehow we have continued interacting with wp-admin in fundamentally the same way: click somewhere, load another screen, go back, open another tab because you do not want to lose the previous one, and after a while end up with ten different WordPress tabs scattered across your browser.

\n\n\n\n

I find it quite funny that we all accepted this as completely normal.

\n\n\n\n

Today WordPress is used to run stores, publications, membership sites, communities, LMS platforms, agencies and entire businesses. We have plugins that are effectively full applications, incredibly complex editing experiences, analytics, forms, CRM systems, media tools, commerce, automation and thousands of other things living inside the same installation. Yet the interface connecting all of them still assumes that, most of the time, you want to look at one thing at once.

\n\n\n\n

And when you don’t, the browser has to solve the problem for us.

\n\n\n\n

Browser tabs have essentially become the window manager of WordPress.

\n\n\n\n
\"\"
\n\n\n\n

That is one of the ideas that eventually led us to OpenStation.

\n\n\n\n

Why don’t we have windows?

\n\n\n\n

It sounds ridiculously obvious when you phrase it like that, but that is exactly why I find the question interesting.

\n\n\n\n

On a normal computer I can have my editor open next to a browser, keep a terminal in the background, drag files around, minimize something I want to return to later, or simply arrange my workspace around whatever I am doing at that moment. Nobody thinks about this as a feature anymore because it is just how computers work.

\n\n\n\n

Then we open WordPress and suddenly that whole model disappears.

\n\n\n\n
\"\"
\n\n\n\n

If I am editing a post and need something from the Media Library, I navigate away or open another tab. If I am checking an order while editing a product, another tab. If I want to compare two posts, another tab. If I am configuring something and need to check how another part of the site is set up, another tab.

\n\n\n\n

There is nothing technically wrong with that, of course, and it has worked for years, but after building and using OpenStation every day I started noticing how much context we constantly throw away simply because wp-admin was designed around pages rather than workspaces.

\n\n\n\n

That distinction matters much more today than it probably did fifteen years ago.

\n\n\n\n

WordPress quietly became something much bigger

\n\n\n\n

I keep describing WordPress as the operating system of the web, and obviously I do not mean that literally. What I mean is that WordPress has gradually accumulated many of the characteristics you would expect from a platform where applications live.

\n\n\n\n

Plugins install capabilities into it. Users have identities and permissions. Applications share data. We have APIs, scheduled processes, notifications, media, editors, databases and an enormous ecosystem of software that knows how to work with the same underlying environment.

\n\n\n\n

The strange part is that the interface never fully made the same transition.

\n\n\n\n

We kept adding more applications to WordPress, but we continued presenting them largely as destinations in a menu.

\n\n\n\n

OpenStation started from a very simple thought: what happens if, instead of redesigning every individual wp-admin page again, we change the environment in which those pages live?

\n\n\n\n
\"\"
\n\n\n\n

That immediately opens a much larger set of possibilities.

\n\n\n\n

A post editor does not need to replace your media library on screen. A WooCommerce order does not need to replace the product you were editing. A plugin screen does not necessarily need to occupy the entire browser just because you clicked its menu item.

\n\n\n\n

They can simply be windows.

\n\n\n\n

You can move them, resize them, minimize them, keep several of them open, organise them across different desktops and return to exactly what you were doing without recreating the context again.

\n\n\n\n

The funny thing is that none of this feels particularly futuristic. Quite the opposite. We have been using computers this way for decades.

\n\n\n\n

We just somehow never brought that interaction model into wp-admin.

\n\n\n\n

The interesting part is not actually the windows

\n\n\n\n

The windows are what people notice first because they are visual, but I think the more important idea is what happens once WordPress stops assuming that navigation must destroy context.

\n\n\n\n

Suddenly the admin becomes a workspace.

\n\n\n\n

You can have the Media Library next to the editor instead of travelling between them. You can keep an order visible while checking something else. You can open notes or widgets without abandoning your current task. Applications can coexist on the same desktop and eventually interact with each other in ways that become much harder when everything is isolated in separate browser tabs.

\n\n\n\n

This is also where things like drag and drop become much more interesting.

\n\n\n\n

If two applications are part of the same environment, moving an image, a product, a post or another WordPress entity between them can become an actual interaction instead of a sequence of copy, navigate, search, paste and navigate back.

\n\n\n\n

And once you start thinking about WordPress this way, a lot of things that initially looked like unrelated OpenStation features start making sense together: windows, the dock, multiple desktops, widgets, the command palette and applications are all different pieces of the same idea.

\n\n\n\n

The goal is not to decorate wp-admin until it looks like a desktop operating system. The goal is to make working in WordPress feel less like navigating a website and more like working inside an environment.

\n\n\n\n

We don’t need to replace wp-admin to do this

\n\n\n\n

This is probably the part I like the most about the approach.

\n\n\n\n

WordPress already has an enormous ecosystem and rebuilding everything would be both unrealistic and, in my opinion, the wrong problem to solve. There are thousands of admin interfaces that already work, plugins developers have spent years building, and workflows users already understand.

\n\n\n\n

OpenStation can sit on top of that rather than asking the ecosystem to start again.

\n\n\n\n

The existing WordPress admin can continue being WordPress. Existing plugins can continue exposing their interfaces. What changes is how those interfaces are presented and how you move between them.

\n\n\n\n

In some ways, I think that is much more interesting than simply designing another admin UI.

\n\n\n\n

We are not trying to decide what every WordPress application should look like. We are trying to give those applications a better place to live.

\n\n\n\n

And once you have that place, building actual OpenStation-native applications becomes possible as well. We have already been experimenting with things like a photo editor, project management tools and forms, but what excites me is not any individual application. It is the idea that WordPress can host an entire collection of tools that feel like they belong to the same workspace instead of a collection of isolated screens connected by a sidebar.

\n\n\n\n

So why did it take fifteen years?

\n\n\n\n

Probably because there was never a single moment where the old model stopped working.

\n\n\n\n

WordPress evolved gradually. A new menu here, another plugin there, a more sophisticated editor, WooCommerce, custom post types, page builders, analytics, SEO tools and so on. Each addition fitted reasonably well into what already existed, so there was never an obvious reason to stop and question the basic interaction model.

\n\n\n\n

But those small changes accumulated.

\n\n\n\n

The WordPress of today asks considerably more from wp-admin than the WordPress of fifteen years ago did, and I think that eventually creates an opportunity to revisit assumptions that once seemed completely reasonable.

\n\n\n\n

The assumption we are questioning with OpenStation is a very simple one:

\n\n\n\n

Why should opening something in WordPress mean leaving everything else behind?

\n\n\n\n

After spending months working this way, I now notice it every time I go back to the traditional flow. I open something, realise I need another part of WordPress, create another browser tab and immediately think: why am I doing this outside WordPress when WordPress itself could manage the workspace?

\n\n\n\n

That is probably the best way I can explain what we are building.

\n\n\n\n

WordPress has had applications for a very long time.

\n\n\n\n

Perhaps what it has been missing all these years is somewhere for those applications to actually live together.

\n\n\n\n

By the way, don’t forget you can always try OpenStation without even installing it in your site, using WordPress playgrounds

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 28 Sep 2026 12:57:03 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:20;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:39:\"Open Channels FM: Open Source Champions\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:46:\"https://openchannels.fm/open-source-champions/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:209:\"The Open Source Champions initiative invites individuals and brands to support the network through a unique advocacy opportunity, offering exposure, promotional features, and participation in special episodes.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 28 Sep 2026 12:17:19 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:21;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:113:\"Gutenberg Times: Gutenberg 24.0, the road to 7.2, a new default theme named Ipsum, and more—Weekend Edition 377\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://gutenbergtimes.com/?p=47181\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:119:\"https://gutenbergtimes.com/gutenberg-24-0-the-road-to-7-2-a-new-default-theme-named-ipsum-and-more-weekend-edition-377/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:34343:\"

Howdy,

\n\n\n\n

Before anything else: if you maintain WordPress sites, go update them. WordPress 7.1.2 shipped on September 22 to patch a single critical vulnerability in page template resolution, one that lets an unauthenticated attacker load a chosen PHP file from outside your active theme’s directories.

\n\n\n\n

Now let’s move on to better things. Anne McCarthy is auctioning off her framed WordPress release albums, the ones given to release squad members. All the proceeds go to Stimpunks, a nonprofit started by Ryan Boren, who joined the project in 2003 and wrote the plugin system that nearly every site runs on. She calls the albums “a form of a gold medal to me,” and she built the auction site herself in a week. The starting bid is $500.

\n\n\n\n

We also learned this fortnight that the next default theme will be called Ipsum, which means 16 years of naming themes after the calendar is over. Admittedly, I’ll miss the old Twenty* names a little. But it’s time for something new for a new era.

\n\n\n\n

Two more quick things: WordPress has taken its turn leading the Open Website Alliance, alongside Drupal, Joomla!, and TYPO3, with Mary Hubbard holding the rotating presidency for the WordPress Foundation. And starting with 7.2 in December, release parties move from in-person events to livestreamed webinars, so the whole squad can actually be there.

\n\n\n\n

Enjoy your weekend!

\n\n\n\n

Your friendly neighborhood dev advocate, \"🍂\"
Justin Tadlock

\n\n\n\n\n\n
\n\n\n\n

Developing Gutenberg and WordPress

\n\n\n\n

Two security releases in six days. WordPress 7.1.2 is the urgent one, and it’s security-only: an unauthenticated attacker can, under the right conditions, make page template resolution include a readable local PHP file from outside the active theme directories. John Blackbourn led the release, Robert Ressl disclosed it, and the fix was backported to every eligible branch going back to 4.7.

\n\n\n\n

Five days earlier, WordPress 7.1.1 arrived as the regular maintenance release with 11 security fixes, 17 bug fixes on Core, and 19 for the Block Editor. Aaron Jorbin led it, and Anthropic is credited twice in the security list.

\n\n\n\n
\n\n\n\n

Aki Hamano announced what’s new in Gutenberg 24.0. The big feature: post title changes now show up in revisions with a proper diff, so you can stop guessing when a rename happened. The Gallery block gains a Grid variation with column count and “crop images to fit” configurable per breakpoint, and Site Title picks up fit-text, scaling to the width available instead of a fixed point size. And nearly 100 icons were redrawn on a stroke-based grid.

\n\n\n\n
\n\n\n\n

Stalled out somewhere between “clone the repo” and “why won’t this build”? Contributor Toolkit 1.2 from JuanMa Garrido now covers Gutenberg as well as Core, and it runs a stock WordPress in Playground with your checkout mounted as the plugin, already activated. No local server, no Docker.

\n\n\n\n

The road to 7.2

\n\n\n\n

Anne McCarthy published the roadmap to 7.2, and it looks to be a security-heavy cycle by WordPress standards. Sudo mode gates sensitive admin actions behind re-authentication, a new Secrets API gives credentials “a first-class way to store credentials safely,” and Application Passwords get hardened. Notes should gain a suggestion mode and emoji reactions. Designers get form element customization in Global Styles and custom block states. The final release lands in early December.

\n\n\n\n
\n\n\n\n

Real-time collaboration came out of WordPress 7.0, and Chris Zarate has now explained why in a post on moving to a server-aware approach for collaboration, written with Alec Geatches, Dennis Snell, ingeniumed, and Paul Kevan. The old design had browsers hold the post in a CRDT document and sync peer-to-peer, which broke three ways: the server couldn’t tell who made which edit, opening the door to content laundering; REST API and WP-CLI updates couldn’t participate, so saves became all-or-nothing overwrites; and a dropped connection could take your work with it. Three candidate sync engines are on the table, with a gutenberg-sync-engines repo to test against. If you build editorial tooling, have an opinion about this now.

\n\n\n\n
\n\n\n\n

The next default theme has a name, and for the first time in well over a decade, it isn’t a year. Henrique Iamarino introduced Ipsum, built with Carolina Nymark, Maggie Cabrera, and Juanfra Aldasoro. The reasoning behind the naming change: “default themes will have their own names and change when the design calls for it, not when the calendar does.” The theme is intentionally spare. It’s blog-first, has minimal typesets, and structural elements that stay invisible until you need them. The request is simple: “try it and tell us what breaks and what’s missing.”

\n\n\n\n
\"Screenshot
\n\n\n\n
\n\n\n\n

Nik Tsekouras opened a call for testing the DataForm editor inspector, which rebuilds the Post and Page tab of the Settings sidebar so it stops drifting from Quick Edit in the Site Editor. Install Gutenberg 24.0 or later and enable Editor Inspector: Use DataForm under Settings → Gutenberg. Test it as an editor, author, and contributor, not just as an admin.

\n\n\n\n

Behind the release

\n\n\n\n

A minor release can touch more than twenty branches, and much of that work was done by hand. Lance Willett opened a public repo of Core release tools, which includes tagging, release docs, SVN merge verification, and contributor lists.

\n\n\n\n
\n\n\n\n

Huzaifa Al Mesbah counted 84 people who tested WordPress 7.1 across 337 Trac tickets. Fifty were first-timers, which is 60% of everyone who showed up. The most important line: “you don’t need to be a developer.” 7.2 testing is open now.

\n\n\n\n

Plugins, Themes, and Tools for #nocode site builders and owners

\n\n\n\n

WooCommerce 11.2 lands the week of October 6, so read Shani Banerjee’s pre-release notes before it arrives rather than after. Order withdrawal emails become configurable, the CSV importer can match products by Global Unique ID when neither ID nor SKU is available, and checkout fields gain date support with min/max validation. Two of the seventeen developer advisories will bite if you ignore them: date filters in wc_get_orders() and wc_get_products() now read a bare date as a day in your store’s timezone rather than UTC, and the Cart and Checkout order summary becomes a fixed 360px column with the two-column breakpoint moving from 700px to 920px.

\n\n\n\n
\n\n\n\n

Two dot releases arrived in between, both flagged as security updates. WooCommerce 11.1.2 fixes the infinite recursion that was breaking product variation galleries, and 11.1.1 hardened API permissions and session handling.

\n\n\n\n
\n\n\n\n

The latest WordPress.com changelog moves the AI website builder from picking a theme to generating one: on Premium and Business plans, it “now generates a fully custom theme built around your goals and brand.” A new Annotate feature lets you queue several targeted edits and send them at once.

\n\n\n\n
\n\n\n\n

GatherPress started on a fourteen-hour drive to WordCamp US in 2018, when two Montclair meetup organizers came up with a name and then didn’t write any code for nine months. Rae Morey tells the story of how it grew into WordPress’ Meetup.com replacement, through July of this year, when Automattic’s Karen Arnold confirmed WordPress is going ahead with it. The gatherpress.org domain is transferring to the Foundation, and the plugin has been testable at events.wordpress.org since August 28. No launch date yet, and co-maintainer Mervin Hernandez Sitnikovski would rather you help than wait.

\n\n\n\n

Theme Development for Full Site Editing and Blocks

\n\n\n\n

WooCommerce has a new block theme. Brian Coords announced that Purple is back and ready for beta testing. The project was paused during a strategy update last year, and it’s Woo’s first official block theme.

\n\n\n\n
\"\"
\n\n\n\n

Ten color palettes, ten font pairings, custom styles for both WooCommerce and core blocks, and templates covering everything from Shop to Checkout to My Account. The inserter category is being renamed from “WooCommerce” to “Shop.” If you’re wondering where Storefront’s featured extensions went, block editing absorbed most of them. Peter Schimke also notes that Purple is now the default for new WordPress.com Commerce stores.

\n\n\n\n
\n\n\n\n

Mark your calendar for Wednesday, September 30 at 10 a.m. PDT / 1 p.m. EDT / 7 p.m. CEST: Woo is hosting a live session on building with WooCommerce block themes. Mike McAlister of Ollie joins Woo engineers Karol Manijak and Lucio Giannotta. There’s a Q&A at the end and a recording afterward, but questions only work if you show up.

\n\n\n\n
\n\n\n\n

“We need more workflow in Core,” said K. Adam White, principal engineer at Human Made, talking with Nathan Wrigley on WP Tavern about migrating to blocks with artisanal care and enterprise efficiency. At the center of it is Human Made’s open-source Rehydrator, which uses pattern HTML as a template and injects migrated content into it, so structure and styling survive a move off something like Sitecore. He describes building SQLite databases from client exports just to find the edge cases. He’s candid about the gaps, too: granular permissions, editorial approval workflows, and internationalization.

\n\n\n
\n
\n\n
\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n
\n

“Keeping up with Gutenberg – Index 2026”
A chronological list of the WordPress Make Blog posts from various teams involved in Gutenberg development: Design, Theme Review Team, Core Editor, Core JS, Core CSS, Test, and Meta team from Jan. 2024 on. Updated by yours truly. 

\n
\n\n\n\n\n\n\n
\n

The previous years are also available:
2020 | 2021 | 2022 | 2023 | 2024 | 2025

\n
\n
\n\n\n

Building Blocks and Tools for the Block editor

\n\n\n\n

Your Query Loop returns nothing, and the heading and pagination you wrapped around it render anyway. Ryan Welcher spent a live stream adding a “hide if empty” control to Advanced Query Loop, his free plugin that extends the core Query Loop with taxonomy relationships, meta queries, and relative date filters.

\n\n\n
\n
\n\n
\n
\n\n\n
\n\n\n\n

Gutenberg’s JavaScript tests have moved off Jest. Marco Ciampini explains that unit and integration tests now use Vitest, driven by ESM: as more dependencies shipped ECMAScript modules, the CommonJS-based Jest setup needed more and more compatibility glue. The part that affects you: @wordpress/scripts 36.0.0 makes Vitest the default for test-unit-js, with @wordpress/eslint-plugin 27.0.0 following. Not ready to migrate? Switch to wp-scripts test-unit-jest and install the Jest dependencies yourself.

\n\n\n\n

AI in WordPress

\n\n\n\n

Your agent builds you a landing page, and then what? It sits in a chat log, or a folder, or a local dev server nobody else can reach. That’s the gap Spacefast is built for, and Automattic soft-launched it this week: Matt Mullenweg announced it on X. The pitch is the last mile for agent output: publish from a conversation with Claude or ChatGPT, from npx spacefast publish, or from a GitHub push, and get a permanent URL with immutable versions, one-click rollback, and access controls. It hosts full-stack projects, not just static files.

\n\n\n\n

The WordPress hook is a Spacefast plugin with two modes. Static mode hooks into Simply Static, exports your site, and publishes the snapshot. Headless mode treats WordPress as the content source for a repository project, triggering a production rebuild when you publish or update public content.

\n\n\n\n

MCP turns up everywhere

\n\n\n\n

WordPress Trac now speaks MCP. Lance Willett announced a Trac MCP server that’s “public and free to use: no account or API key needed.” Ask what’s left on a ticket and which pull requests are still open, or what someone committed in January 2005—yes, it goes back that far. It covers every WordPress.org Trac, from Core and Meta to bbPress and GlotPress. James LePage wrote the first version, with props to Jon Surrell, David Newman, and Konstantin Obenland.

\n\n\n\n
\n\n\n\n

Jamie Marsland makes the case for why WebMCP is going to be big for WordPress and, more usefully, shows you how to try it this afternoon: open the ChatGPT desktop app in Work mode, load WordPress Playground in its built-in browser, and ask it to build you a homepage. His framing is the clearest I’ve read. WebMCP gives an assistant “an instruction manual with working buttons” instead of making it squint at screenshots.

\n\n\n\n
\n\n\n\n

For the enterprise view of the same shift, Shane Schick compares WebMCP and traditional MCP and lands on a line I’d pull out of the whole piece: “MCP is not going away, and WebMCP shouldn’t be seen as a rival protocol.” His table sets them side by side on deployment, access scope, scalability, and auditability. That auditability row is the one that matters if you answer to a compliance team.

\n\n\n\n
\n\n\n\n

Schick also introduces Parse.ly MCP, which connects Parse.ly data to whichever assistant your team already uses. You authorize once with your existing login, and the assistant sees exactly the sites your account already sees. “Analysis that used to take a request and a day now takes a conversation.”

\n\n\n\n
\n\n\n\n

One more, for the security-conscious: WPShout walks through connecting Cursor to WordPress with MCP using ThemeIsle’s Easy MCP AI plugin. Every tool call still passes a WordPress capability check, with a 60-requests-per-minute default. Their advice is the part to take seriously: “read-only first, watch the audit log for a week, then grant write scopes deliberately.”

\n\n\n\n

Putting agents to work

\n\n\n\n

Anthropic open-sourced its commerce agents on September 2, and WooCommerce has already adapted them. Shani Banerjee walks through running the Claude Commerce Agent on WooCommerce, which spins up a demo store with eight products and nine orders in about fifteen minutes. The neat piece is a bridge plugin: the assistant’s cart lives under a Store API token your browser session can’t see, so at checkout the plugin re-adds each item to your real cart with normal stock checks. Merchant-side changes stage behind an approval gate, and “ask it to approve itself and it declines.”

\n\n\n\n
\n\n\n\n

There’s a second kind of visitor to design for now. Carlo Daniele argues for building WordPress for AI agents instead of just human visitors, and the distinction he draws is the useful one: “Crawlers primarily retrieve or index information. Agents can go a step further and take action on a user’s behalf.” That turns architecture questions into permission questions: who is asking, on whose behalf, what can they change, which actions need approval. The Abilities API and MCP Adapter are where WordPress answers them.

\n\n\n\n
\n\n\n\n

A week later, Daniele turned to operations. What happens when AI agents become your new website operators? works through a five-stage autonomy ladder and argues most teams should sit partway up it for a while. I feel like he’s right about that. As he puts it: “An agent that makes a bad production change creates another.”

\n\n\n\n

Learning and practice

\n\n\n\n

Want a structured introduction rather than a pile of blog posts? Destiny Kanno announced that the AI-Powered WordPress course is now live on Learn WordPress: four modules, 23 lessons, roughly nine hours. The first three are for anyone who publishes; the fourth introduces the developer APIs and assumes no prior PHP experience.

\n\n\n\n
\n\n\n\n

The AI team’s contributor summary for September 16 is a good snapshot of what’s actually moving. neillmcshea reports work on markdown feeds for the AI plugin, so AI clients can request a markdown version of a post. PHP AI Client 1.5.0 is close. There are still open gaps in web search support. For example, message parts can’t represent source annotations, and citation URLs are hard to retrieve.

\n\n\n\n
\n\n\n\n

Finally, a piece for the conversations you have with clients rather than with a terminal. Will Davis writes about how WordPress agencies use AI, and what clients should ask about it, arguing that the honest uses are the boring ones—code generation, QA, content migration, documentation—while architecture and governance stay human. His five questions for clients would work just as well on a sales call, starting with “What does a person review before it reaches me?” As he puts it, AI “genuinely reduces repetitive work, but it doesn’t replace judgment.”

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n
\n

Need a plugin .zip from Gutenberg’s master branch?
Gutenberg Times provides daily build for testing and review.

\n
\n\n\n\n\n\n\n
\"\"
\n\n\n\n\n\n\n
\n

Now also available via WordPress Playground. There is no need for a test site locally or on a server. Have you been using it? Email me with your experience.

\n
\n
\n\n\n
\n\n\n\n

Questions? Suggestions? Ideas?
Don’t hesitate to send them via email or
send me a message on WordPress Slack or Twitter @bph.

\n\n\n\n
\n\n\n\n

For questions to be answered on the Gutenberg Changelog,
send them to changelog@gutenbergtimes.com

\n\n\n

\n\n\n\n\n
\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Sat, 26 Sep 2026 16:45:09 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Justin Tadlock\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:22;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:40:\"Dennis Snell: Enter the mess: Shortcodes\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:36:\"https://fluffyandflakey.blog/?p=4130\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"https://fluffyandflakey.blog/2026/09/25/enter-the-mess-shortcodes/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:1005:\"

Tonight I started working on some Shortcode processing in WordPress. This is an historically nasty problem because the Shortcode syntax and parsing is wildly dynamic.

\n\n\n\n\n\n\n\n

This is a problem that has plagued me for years and I have generally just ignored. There’s an open Core issue in Trac for changing some shortcode parsing (#50683), and I have thought a lot about it.

\n\n\n\n

But I think there is more to explore, and more to gain. Maybe this goes nowhere, but keep your eyes open for it.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Sat, 26 Sep 2026 02:43:45 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Dennis Snell\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:23;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:71:\"Open Channels FM: Your Website Could Use a Changelog to Fuel Creativity\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562622\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"https://openchannels.fm/your-website-could-use-a-changelog-to-fuel-creativity/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:220:\"A website changelog helps creators document progress, celebrate small wins, showcase evolution, fuel creativity, and build audience trust. It can include updates, humor, and various formats, making it accessible for all.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 25 Sep 2026 13:44:23 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:24;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:94:\"Open Channels FM: Is It Time to Move On? Navigating Change and Letting Go in Fast-Paced Times\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562603\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:99:\"https://openchannels.fm/is-it-time-to-move-on-navigating-change-and-letting-go-in-fast-paced-times/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:101:\"A reflection on recognizing the right time to move on from creative projects and handling self-doubt.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 25 Sep 2026 12:30:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:25;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:100:\"OpenStation Blog: “I can’t imagine using WordPress any other way”: the love behind OpenStation\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1306\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:109:\"https://openstation.blog/2026/09/25/i-cant-imagine-using-wordpress-any-other-way-the-love-behind-openstation/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:8731:\"
\"A
\n\n\n\n

OPENSTATION · COMMUNITY VOICES

\n\n\n\n

Formerly Desktop Mode, now a new way to feel at home in wp-admin.

\n\n\n\n

A plugin can accumulate installs. It is rarer for people to describe it as a new way of thinking. As of September 25, 2026, OpenStation, known in its earliest releases as Desktop Mode, has inspired 23 public WordPress.org reviews: 22 five-star and one four-star.

\n\n\n\n

OpenStation turns the WordPress admin into a spatial workspace: movable windows, a dock, a taskbar, widgets and virtual desktops. That is the feature list. The feeling is better told by the people who use it.

\n\n\n\n
\n\n\n\n

The words that stopped us in our tracks

\n\n\n\n

1. When a plugin becomes the default

\n\n\n\n
\n

“I can’t imagine using WordPress any other way. I love this plugin so much.”

\n
\n\n\n\n

— Nick Hamze, “Favorite plugin ever”

\n\n\n\n

That may be the highest compliment a tool can earn: not merely useful, but difficult to imagine living without. Nick’s review reads less like a rating and more like an invitation to join a movement.

\n\n\n\n
\n

“This is a game-changer. Can never go back!”

\n
\n\n\n\n

— ainom, “Absolute pure awesomeness”

\n\n\n\n

OpenStation begins as a striking visual idea, then quietly rewires expectations. Once several admin screens can live together, the old one-page-at-a-time flow feels surprisingly distant.

\n\n\n\n
\n\n\n\n

2. When the metaphor improves the work

\n\n\n\n
\n

“It genuinely feels like using a lightweight operating system inside WordPress.”

\n
\n\n\n\n

— spackenjaeger, “A revolutionary new WordPress admin experience”

\n\n\n\n

The operating-system metaphor is not decoration. Windows hold context. The dock makes tools reachable. Virtual desktops separate kinds of work. The familiar desktop grammar turns multitasking into something visible and natural.

\n\n\n\n
\n

“Having several admin screens open at once changed how I work more than I expected.”

\n
\n\n\n\n

— Juan Lentino, production user and plugin integrator

\n\n\n\n

Juan’s review is especially telling: he has run OpenStation in production since the Desktop Mode days and builds integrations against it. The novelty faded; the workflow remained.

\n\n\n\n
\n\n\n\n

3. When delight becomes productive

\n\n\n\n
\n

“The desktop-style layout, draggable windows, dock, and taskbar make the admin area feel completely different in the best way.”

\n
\n\n\n\n

— Marco Moreira, “A refreshing new way to use WordPress admin”

\n\n\n\n

Productivity software does not have to be joyless. The best interfaces reduce friction and add a little momentum, the feeling that the workspace is helping rather than merely waiting.

\n\n\n\n
\n

“This plugin blowed my mind. It turns your wordpress admin in such a beautiful dashboard. What an experience.”

\n
\n\n\n\n

— MauroS, “One word… Wow!”

\n\n\n\n

The wording is wonderfully unfiltered. Beauty, surprise and experience are not side effects here; they are part of the product.

\n\n\n\n
\n\n\n\n

4. When people see the road ahead

\n\n\n\n
\n

“This is definitely something I would use on a daily basis. Well done!”

\n
\n\n\n\n

— vepth, “I’m blown away”

\n\n\n\n
\n

“Desktop Mode definitely stands out with its own approach.”

\n
\n\n\n\n

— Rami Obeidat, “Modern and creative admin experience”

\n\n\n\n

Both reviews point to the same achievement: OpenStation is not chasing a generic “modern admin” look. It has a point of view—spatial, extensible and unmistakably its own.

\n\n\n\n
\n\n\n\n

From Desktop Mode to OpenStation

\n\n\n\n

The project’s name changed because its ambition outgrew a mode. “Desktop Mode” described the first transformation. OpenStation describes the platform emerging around it: a place where WordPress apps, windows, widgets and workflows can meet.

\n\n\n\n
\n

“The integration surface is unusually well behaved for a plugin this ambitious.”

\n
\n\n\n\n

— Juan Lentino, WordPress.org reviewer and integrator

\n\n\n\n

That sentence matters as much as the praise for the interface. The magic users see is supported by a public API that plugin authors can build on, frequent releases and an opt-in design that keeps classic WordPress one click away.

\n\n\n\n

The best roadmap is a chorus

\n\n\n\n

Names change. Interfaces evolve. Code ships, breaks, improves and ships again. What stays constant in these reviews is the feeling that WordPress can be more personal, more spatial and more alive.

\n\n\n\n

OpenStation is still moving fast. But if the people already living in it are any guide, the destination is worth watching, and the journey is already changing how they work.

\n\n\n\n

Explore OpenStation on GitHub →
Read all WordPress.org reviews →

\n\n\n\n

Quotes are excerpted from public WordPress.org reviews. Spelling is preserved; excerpts are linked to their original sources.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 25 Sep 2026 11:33:33 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:26;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Matt: Bruce Schneier on Systems\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:23:\"https://ma.tt/?p=155048\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"https://ma.tt/2026/09/schneier/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:460:\"
\n\n
\n\n\n\n

Bruce is one of my favorite writers. He packs profoundness. Also honored that he’s an advisor at Automattic, truly one of my idols. His blogs and books rocked my world when I was young.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 25 Sep 2026 07:04:50 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"Matt\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:27;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:76:\"Open Channels FM: How Generational Perspectives Shape Our Digital Work Lives\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562342\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"https://openchannels.fm/how-generational-perspectives-shape-our-digital-work-lives/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:114:\"Cami and Bob talk about adapting to tech changes growing older in the web industry and keeping routines that work.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 24 Sep 2026 14:30:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:28;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:109:\"Open Channels FM: Navigating Support Systems from the Man Cold to Open Source and WordPress Open Web Alliance\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562536\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:116:\"https://openchannels.fm/navigating-support-systems-from-the-man-cold-to-open-source-and-wordpress-open-web-alliance/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:132:\"Examining support systems behind open source, the open web, and everyday life, along with why sustaining these efforts is necessary.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 24 Sep 2026 13:02:50 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:29;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:53:\"Open Channels FM: The Podcast Open Makers is Archived\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562154\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"https://openchannels.fm/the-podcast-open-makers-is-archived/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:221:\"The podcast network has reduced its active lineup to four shows, leading to no new episodes for Open Makers. However, past content remains accessible, with a shift towards deeper discussions on open source and web trends.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 23 Sep 2026 13:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:30;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:101:\"WPTavern: #234 – K. Adam White on Migrating to Blocks With Artisanal Care and Enterprise Efficiency\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"https://wptavern.com/?post_type=podcast&p=208362\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:114:\"https://wptavern.com/podcast/234-k-adam-white-on-migrating-to-blocks-with-artisanal-care-and-enterprise-efficiency\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:53882:\"
Transcript
\n

[00:00:19] Nathan Wrigley: Welcome to the Jukebox Podcast from WP Tavern. My name is Nathan Wrigley.

\n\n\n\n

Jukebox is a podcast which is dedicated to all things WordPress. The people, the events, the plugins, the blocks, the themes, and in this case, migrating to blocks at an enterprise level and what’s involved in moving from a different CMS into WordPress.

\n\n\n\n

If you’d like to subscribe to the podcast, you can do that by searching for WP Tavern in your podcast player of choice, or by going to wptavern.com/feed/podcast, and you can copy that URL into most podcast players.

\n\n\n\n

If you have a topic that you’d like us to feature on the podcast, I’m keen to hear from you and hopefully get you, or your idea, featured on the show. Head to wptavern.com/contact/jukebox and use the form there.

\n\n\n\n

So on the podcast today, we have K. Adam White, or K. Adam for short.  K. Adam is the principal engineer at Human Made, an enterprise WordPress consultancy. He’s been involved with WordPress for almost 20 years, attending his first WordCamp in Boston back in 2011, and has contributed to WordPress Core and the broader open source ecosystem. Human Made is known for delivering complex projects, think high stakes, no room for mistakes? From global brands moving to WordPress.

\n\n\n\n

This time around,  K. Adam delivered a presentation at WordCamp US focused on a crucial topic for anyone modernising their site, migrating to blocks. Human Made has been all in on the block editor since the Gutenberg plugin days, and the team now specialises in large scale migrations from other content management systems like Sitecore, as well as from other WordPress page builders.

\n\n\n\n

Our conversation focused on the technical and editorial challenges of moving tens, or hundreds, of thousands of posts into the world of blocks and patterns. We talked about the need to combine artisanal care, attention to detail in design, layout, and brand, with industrial scale. The ability to automate, audit and validate mass migrations without losing visual fidelity.

\n\n\n\n

We also discussed the use of patterns as a foundation for development, integrating custom and Core blocks, and leveraging new tools, including AI powered agents and open source plugins like Human Made’s, own rehydrator, to streamline migration workflows.

\n\n\n\n

We also touched upon how clients are onboarded. The process of auditing legacy content. Strategies for training editorial teams on the block editor. And there’s a frank reflection on gaps in WordPress, like granular content permissions.

\n\n\n\n

If you are contemplating a move to the block editor, wrestling with a massive content migration, or curious about what happens when enterprise complexity meets the flexibility of WordPress, this episode is for you.

\n\n\n\n

If you’re interested in finding out more, you can find all of the links in the show notes by heading to wptavern.com/podcast, where you’ll find all the other episodes as well.

\n\n\n\n

And so without further delay, I bring you  K. Adam White.

\n\n\n\n

I am joined on the podcast by K. Adam White. Hello, K. Adam.

\n\n\n\n

[00:03:41] K. Adam White: Hello. It’s good to be here.

\n\n\n\n

[00:03:42] Nathan Wrigley: Yeah. Thank you for joining us. You have an interesting name. Just go on, I know it’s totally off piste, but tell us about your name.

\n\n\n\n

[00:03:49] K. Adam White: Sure. It’s a first initial K, and the middle name Adam that got conjoined in college and I quite like it. So I think in a sphere, and a particular niche in WordPress with so many Adams of so many different colours, then K. Adam is a little bit more me.

\n\n\n\n

[00:04:04] Nathan Wrigley: Yeah, nice. So we’re in the corridor, so forgive any noise that you hear on this podcast episode. We can’t avoid it. We’re in the corridor at  WordCamp US, and you have done, some presentation work this time around. Do you want to just tell us, I mean I presume it’s happened because we’re at the very closing stages of the conference. How did it go?

\n\n\n\n

[00:04:21] K. Adam White: It went, as far as I can tell, quite well. My session was early yesterday, right after the morning keynotes in that early slot where everyone’s coffee has kicked in, and the fatigue of the conference hasn’t quite set in yet.

\n\n\n\n

So I had a great audience and the talk I thing went quite well. I’ve had a number of different conversations off the back of it on various different topics that I covered. So the breadth of those discussions has been really exciting for me.

\n\n\n\n

[00:04:44] Nathan Wrigley: So that is going to be the meat and the bones of what we’re going to talk about today. But first, if you don’t mind, let’s talk a little bit about you and what you do and where you work, just so that we can paint your credentials if you like.

\n\n\n\n

So tell us about your job, how long you’ve been in the WordPress space? Who do you work for? Et cetera.

\n\n\n\n

[00:04:59] K. Adam White: Yeah. My job is principal engineer at Human Made. We’re a WordPress enterprise consultancy, and I have been there nine years. I’ve been in the WordPress community quite a lot longer than that. My first WordCamp was WordCamp Boston 2011, which is a mind boggling 15 years ago now. And before that, I had been using WordPress personally since 2007. So we’re coming up on 20 years of involvement, at least as a user. And then, became a contributor in the early 2010s around 2013, I think my first commit landed.

\n\n\n\n

[00:05:25] Nathan Wrigley: Yeah, nice and Human Made, if you haven’t heard, we’ll put the links into the show notes, anything that K. Adam mentions today, we will put us a link on the WP Tavern podcast episode website, so you can click through to it. But go and check out Human Made, definitely one of the big hitters. I think it’s fair to say in the WordPress space.

\n\n\n\n

[00:05:40] K. Adam White: It’s very kind of you to say so.

\n\n\n\n

[00:05:42] Nathan Wrigley: You did your presentation and it was entitled, Migrating to Blocks. I’m going to intuit from that, that Human Made is all in on the block editor. You’re not using some sort of other proprietary platform. Would that be the case?

\n\n\n\n

[00:05:55] K. Adam White: That would be the case. We were very early adopters of Gutenberg back in its plugin days. We were doing work before it was merged for building out some early block sites, testing out what we could do. Learning how to build and change our theme development processes to move in a more block oriented direction, and then follow that directly into the Full Site Editor world.

\n\n\n\n

And it’s been a great ride. We do work with other page builders and other blocks, platforms and frameworks. We do tend to, as a company, work on projects that have some sort of particular technical complexity that made someone come to us rather than a different agency.

\n\n\n\n

That does mean that we are broadly specialised in WordPress as a platform, including many of those page builders. We’ve worked with Elementor, we’ve worked with Divi, Beaver Builder, but we as a company will always advocate for the block editor and the site editor. And we have our own processes oriented more and more towards delivery with that framework in mind.

\n\n\n\n

I think that the thing that is bringing some of the companies that we help to migrate to WordPress into this ecosystem is the flexibility and the quality of the editorial experience. And personally, my opinion is that Gutenberg does that leaps and bounds better than any of our other page builders that don’t have that native integration into the platform.

\n\n\n\n

[00:07:09] Nathan Wrigley: So if a client comes to you and they are agnostic as to what you are going to build with, your default posture would be we are going to use the block editor.

\n\n\n\n

[00:07:16] K. Adam White: Absolutely default.

\n\n\n\n

[00:07:17] Nathan Wrigley: Okay. And do you have to do any level of persuasion anymore? I’m guessing if we were to rewind the clock, let’s go to 2017, soon after Gutenberg started to become more widely available. I imagine there was quite a bit of explaining to do. Do you still have to do any of that? Or is it a case now that the enterprise people understand what’s going on, and there’s less of a back and forth about whether they should use blocks and patterns and whatever else?

\n\n\n\n

[00:07:41] K. Adam White: If we are building from scratch, we haven’t found there is any reluctance. Particularly if people are coming from a different content management system, particularly a different enterprise content management system. The editor is so compelling, that there’s never any objection to using it. They might ask, should we use this or some other thing I’ve heard of? And we can say, the block editor is built in. We feel that it’s the most robust and future proof platform that you can choose. So we would recommend going that route rather than adding in another plugin, however good they are.

\n\n\n\n

But we do still, nonetheless, have some projects where they are already on a page builder, and they might have invested a lot of training. We might have an entire business school worth of people that are very comfortable with whatever their existing system is, whether that’s Beaver Builder or something else, et cetera, Elementor.

\n\n\n\n

And I think that it’s very important for us to remember what our remit is when we come into a project. That, doesn’t always involve helping them change everything to match what we see as the future. I think that’s a responsibility of the client to understand where they are in conjunction with where the WordPress roadmap is, and make their own decisions about what tools are right for them.

\n\n\n\n

So, for existing projects, we’ll work with what’s right for the clients editorial team, but if we have to make a recommendation, it will always be the block editor.

\n\n\n\n

[00:08:56] Nathan Wrigley: Okay. Yeah, good to know. At place in the market where you are, I’m presuming there’s very little room for error. When you build something, it’s got to work out of the box, on day one. You’ve presumably got stakeholders who’ve got editorial teams, and they’re fairly, we’re, dealing with large corporations that can’t afford for there to be mistakes.

\n\n\n\n

So that kind of leads us to the nature of your presentation, which was called, and again, links will be in the show notes on wptavern.com. Migrating to Blocks with Artisanal Care and Industrial Scale. And I’m actually just going to read the first paragraph because it summarises what we’re going to talk about perfectly. It’s fairly long, but I’ll go through it all.

\n\n\n\n

Whether we’re modernising an old personal blog or migrating hundreds of thousands of existing posts from another CMS. Using WordPress in 2026 means converting our contents to blocks. The convert to blocks button in the editor works well enough for one post. But if we have dozens or hundreds, what can we do to make the process less manual and more powerful? How can we integrate a site’s content directly into full block patterns without losing the columns and structure it had before? And then it goes on to mention, a particular build, I presume, where you were leaving one CMS coming into WordPress.

\n\n\n\n

Just lay out some of the fun, interesting problems that you have to overcome when you’re moving from an entirely different CMS into WordPress, because I guess it’s more complicated than, “Look, there’s a bunch of paragraphs and images. Let’s just drag those over and hope for the best.” Tell us what the problem before you is.

\n\n\n\n

[00:10:22] K. Adam White: That’s a great question. It’s actually remarkable how close you can get to satisfaction with just moving paragraphs and images over and hoping for the best. But there is a big gap in terms of visual fidelity.

\n\n\n\n

The editor in a theme that we’ve built for a client will be configured with patterns and templates and all of the block variations that they need to be able to very quickly sketch out a page. If they are starting from scratch, a client with a fully site editing enabled theme can drop a hero pattern on the page, set in the media they need. Change any font sizes within the pallet of what’s available with their brand guidelines encoded in the theme.json. It’s very easy for them to build out and write content fresh.

\n\n\n\n

But if you have, again, hundreds of thousands of posts, even if you’ve built all those patterns, the heading and paragraph and image only approach doesn’t cut it, because then there would be a tremendously backbreaking amount of work, adding group blocks, adding background colours, et cetera.

\n\n\n\n

That’s usually data that is available in one form or the other in the current system. If we’re migrating without a design change, we will have, whether it’s the layout database in Sitecore or a metadata in a different WordPress block editor that we’re migrating from. Or whatever the equivalent is in our source. We want to preserve the layout of the page and the styling elements. So making sure that headings get the right text treatment, that anything that’s italicised comes over. All of the nuances there, particularly around background colours, images, et cetera. That’s the piece that we’ve been over the past year, looking at how we can improve our process when we’re building a new site, but bringing content over from an old.

\n\n\n\n

Within that context, my talk covered two broad areas. The specific tail end of the talk was about how we can actually use the theme patterns that already exist in the theme directory, and use those to inject particular pieces of source data. So if you have a pattern for a hero element, and you know from your source data what the image URL is supposed to be, what the title is supposed to be. We can use the HTML directly from the pattern file, and do lightweight search replaces within that using either direct PHP string replacements or a tool that we’ve written, that I shared a link to called rehydrator, which is a very early stage experiment, that we’ve got out on GitHub.

\n\n\n\n

And we can use that to put the content into the structure that it’s going to need to have for it to be fully, visually correct. So rather than just reducing and throwing away anything that isn’t a heading or a paragraph, we’re taking the framework from the theme pattern that’s been built. And then we’re writing a migrator that takes data and puts it into that HTML structure, and saves that into the post content. So that when an editor opens up a page, it loads correctly in the editor without block validation errors and it looks right on the front end.

\n\n\n\n

[00:13:15] Nathan Wrigley: Okay. There’s a lot of depth in that, isn’t there? We’ll come back to that in a moment.

\n\n\n\n

I’m curious about process of how you, persuade clients that you are going to be able to carry this work out successfully. So how does that actually work? You obviously look at their existing content, you have a discussion about what the new design is going to look like, and then do you build out some kind of templates or patterns or what have you, so that you can then pull in a proportion of the content, maybe, I don’t know, 10 or a hundred or 5,000 or whatever it may be, pieces of content. Check that that’s all right. Show it to the client. How does that workflow go to build up their confidence that what you are going to do when you finally click the button is actually going to succeed?

\n\n\n\n

[00:13:50] K. Adam White: The way that we’ve been approaching that, I think particularly, over the past six months, I should caveat first that this process has changed so much. Because the tools we have available with AI agents have been evolving in leaps and bounds alongside this particular migration process, which started in January.

\n\n\n\n

So in this case, we started out by building patterns that we could put content for one test post, from the existing site manually. Bringing the contents over, copying and pasting headings, et cetera. And using that to create the patterns that we could show to the client to say, does this look correct? Does this structure mirror what you’re expecting? Is this what you expect an author to have available within the post editor?

\n\n\n\n

And then you know, which pieces belong in the template, which pieces are managed at the site editor level? We’ve done a lot of that ahead of starting the actual migration.

\n\n\n\n

Now that the migration is in progress, any subsequent pieces we’re developing in tandem, we’re saying, okay, we have a press release. That press release, we have audited the incoming data, and we have determined that there are four different layouts for press releases. And this one is used the most and it has these elements. This one is used less, but it has images, et cetera.

\n\n\n\n

And we can build the template for that post type, and at the same time write the migrator for identifying the content nodes, and the source data and bringing that information over into the new patterns.

\n\n\n\n

So we have the patterns that we can show, okay, if you’re building something from scratch, this is what that looks like in the editor. But then at the same time, we can run the migrator over, in most cases, all of the relevant type of data and say, and here is a list of pages to validate.

\n\n\n\n

So what we’ve been doing is bringing that to our stakeholder, and allowing them to do spot checks, so that they can look through and validate that there are all of the required elements on the test pages. Things like, “oh, alright, we don’t have a mapper yet for video embeds. So videos are missing,” and that’s usually going to be an all or nothing thing. We’ve found very few cases where we end up with one or two errors on a specific post basis that aren’t related to support for a complete type of output pattern.

\n\n\n\n

[00:15:55] Nathan Wrigley: Is there a sort of fault tolerance there? So obviously in the case of this particular migration, tens of thousands of posts, I guess there’s never going to be a moment where you can be a hundred percent confident apart from reading the 10,000 posts that you’ve done everything correctly. Is there a, we’ll do 10 to begin with, then we’ll go up to a hundred, then we’ll go up to a thousand.

\n\n\n\n

What, is the sort of tolerance that you present to the client? I’m just imagining that just lurking in post 9,999 is just some weird thing that was allowable in the CMS but never got used before or since, and that piece of content got missed. I don’t know what’s allowable in that scenario. So is there any level of tolerance for fault?

\n\n\n\n

[00:16:32] K. Adam White: The major advance that we’ve made with migrations as a broad structure this year is a much better understanding of those edge cases. And the way that we’ve done that is by leveraging Claude and various other tools to do cross site audits to make sure that we have a full picture of the source data.

\n\n\n\n

So we are able to feed in whatever export files we get from our source site. In this case we’re working from Sitecore, which is an enterprise CMS, which has two database structure. There’s actually a database with a content tree, and then another database that contains layout information. And a page is rendered by switching back and forth between those and assembling the final output.

\n\n\n\n

We were able to get exports of the relevant content from both of those, from the developer of the current site. And we fed those and a whole bunch of documents from the product owner into a ongoing conversation with Claude. And we’re able to use that to build some actually node.js scripts that would take the files we’d gotten from the Sitecore devs, and build a local database in SQLite that each developer on the team was able to run locally. And we can query against that to find those edge cases.

\n\n\n\n

So in a combination of writing our own manual queries, or having a chat conversation prompt for finding individual things, and then it will run a number of queries and report back to us. We’re able to identify very quickly, oh, there’s only one press release that has images, that’s interesting. But there are 17 that have a FAQ accordion.

\n\n\n\n

So that type of auditing has become trivial, and it’s mind boggling how much faster that’s allowed us to move in terms of understanding the data that’s there, and building out a mapping of how we’ll migrate through the different types of content.

\n\n\n\n

We don’t tend to start with only 10 pages in a post type because it’s relatively cheap to run the migrator over a thousand instead of 10. And that gives you a lot more content for both various people on the client team, but then also agentic tools to click through and do a little bit of spot check validation.

\n\n\n\n

What we tend to do is to migrate content type by content type, and we’ll prioritise those based on what we see as the balance between scale and complexity.

\n\n\n\n

[00:18:39] Nathan Wrigley: Do you leverage Core blocks wherever possible, or do you bring bespoke Human Made blocks where that’s necessary? Or can you basically bind everything in this particular build to a Core block?

\n\n\n\n

[00:18:51] K. Adam White: Most of the time we will start with Core blocks and get as far as we can with them. This is a change from how we used to do it. Our early days, we had a lot of rapid iteration in the markup that Core blocks were using. In some cases, there was a lot of evolution in how the controls for them were set up.

\n\n\n\n

[00:19:07] Nathan Wrigley: It was brutal.

\n\n\n\n

[00:19:09] K. Adam White: It was brutal. But that pace of change for the main building blocks of a site has slowed down tremendously, and I think it’s a very stable foundation. So we will be pattern first in our development. We will start by working, doing a lot of in-editor prototyping actually, to build out layouts and patterns for each individual unit of content, each individual sort of component group in the source site. And, it will only be when we run into something like a carousel or a modal that we might reach for a off the shelf, third party option that’s not in Core, or bring our own solution to the table.

\n\n\n\n

[00:19:45] Nathan Wrigley: So do you take, when you said pattern there, is a pattern a sub component of a, let’s say post for want of a better word? Or is it that the pattern is the entire post with bits injected into it? So paragraphs, headings, videos, whatever it may be? Like I said, at the beginning, or are you building up the entire post from various different patterns? Here’s a video pattern and here’s a, I don’t know, a paragraph pattern with a heading? Or a background image or whatever it may be.

\n\n\n\n

[00:20:12] K. Adam White: Patterns tends to be at number of different levels. We might have individual patterns for a particular treatment of headline for example. But we also will have a pattern for a hero section. We’ll have a pattern for a hero section plus the bio below that, that we can use to populate a template in the site editor.

\n\n\n\n

We build patterns at multiple levels of granularity, and we have a leaf to trunk system where we’ll make sure that we have renderings, whether they’re Core blocks with either default styling or one or two block variations, or individual patterns for things where we need to compose one or two blocks together. We’ll make sure that we have all of those leaf node pieces of content, all of our paragraphs, all of our inline images. And then we’ll build patterns for those higher level groups, the full width backgrounds with coloration and a particular headline treatment.

\n\n\n\n

We build out those patterns at all of those different levels because it’s nice to have the granularity when we’re writing our migrators, and patterns can reference each other. So you can have an accordion pattern, which includes two references to an accordion item pattern, and you can have all of those little bits of HTML be discreet PHP files in your WordPress theme. So it makes it very simple to pull up in your editor only the code that you need to edit for a particular unit and know how that’s going to be scoped.

\n\n\n\n

[00:21:26] Nathan Wrigley: This is going to sound like such a peculiar question, but it genuinely, from my point of view, this sounds like really interesting and curious work. It sounds, like there’s a lot to get your teeth into. You’re pushing the boundaries a little bit, but also you’ve got the scope of WordPress, which kind of makes it slightly easier.

\n\n\n\n

I’m basically just making the comment that I think I would enjoy doing the work that you are doing. I don’t know if that, yeah, there really a question there.

\n\n\n\n

[00:21:47] K. Adam White: Unfortunately, we’re doing less and less of that work, and Claude’s doing more and more of it. It’s been actually very efficient because this is such a core central construct in the WordPress block editor. There’s a lot of good documentation about it and agentic tools are quite good at helping to build pattern markup.

\n\n\n\n

So, what we’ve been doing is bringing our human eyes onto that, doing all of our spot checks, making sure that things are kept as simple as possible. Because I think we’re all familiar with how verbose and overly complicated output can be from some tools. But then it is also something that I really wish more people were talking about and doing. Brian Coords earlier today in his talk, mentioned that pattern driven development really he sees as something that more and more of the WordPress community should be trying out. Because there are so many things that we used to build custom blocks for, that just strictly aren’t necessary anymore. And we can get so far by composing what we get from the lego kit of WordPress out of the box.

\n\n\n\n

[00:22:40] Nathan Wrigley: Yeah, I feel like if we went back to 2015 and began Gutenberg again, I feel going patterns first would actually be a nicer approach, certainly a more straightforward approach. I know that there’s, ways to overcome that, but I always drop patterns in, never blocks, and then I’m always interacting with the blocks within the pattern. But it’s patterns first for me all the time. Just because I like the fact that I’m dropping in multiple bits of content that are pre-configured and pre-made and pre, I’ve fiddled with the CSS and made it just how I like it. And I just click the button once and there it is, and I can just rinse and repeat and it’s really straightforward.

\n\n\n\n

[00:23:12] K. Adam White: I would agree, and over the past two to five releases of WordPress, we’ve also had such powerful additional tools added to the pattern toolkit. For example, Partially Synced Patterns. Was a major topic that I shared in my talk. Being able to have a reusable pattern and then make the content editable on a post by post basis makes it very seamless for a non-technical editor to go in, and not have access out of the box to stylistic controls that would make something drift from the brand’s guidelines that they’re trying to follow, but still be able to customise link targets, CTA, text, all of the descriptive and image elements.

\n\n\n\n

[00:23:47] Nathan Wrigley: You are in the weeds of WordPress, and I’m in the weeds of WordPress all the time, but I still feel those tools are widely, not misunderstood, that’s the wrong, just there’s a void. Nobody even knows they’re there. There’s just tonnes of tooling inside the block editor that people simply don’t know about, because the UI and the UX is still a bit funky. You’ve got to go to various different places, and it’s easy to go down the wrong route.

\n\n\n\n

Do you know what I mean? There’s a bunch of tools inside a WordPress that if you only had a few hours with somebody over your shoulder pointing out, “okay, click on that, look at that menu that does this thing.” It’s a shame in a way that’s the case. But I do feel there’s a lot of unexplored potential in every WordPress website that presumably you are leveraging. But I guess just because you’re in the weeds of it.

\n\n\n\n

[00:24:30] K. Adam White: Wherever possible, we have the privilege of having a lot of history with the CMS. Human Made was founded in 2010 and has always had a strong open source posture. We’ve contributed to Core, we’ve put plugins out there in the ecosystem that are used by a number of other agencies. We’ve found the best of what our frenemy competitors use, and been able to adopt those into our own processes.

\n\n\n\n

And the benefits of understanding all of the different types of block that you can use tremendously outweigh any time sink that it takes to learn them. I hope that, from my talk, people will now know that in 7.0, we added PHP only blocks, where you can have the attributes auto registered so that you get, even as a non JavaScript developer, a interface in the editor that someone can open up and go in and change values in the sidebar.

\n\n\n\n

I hope that more people learn about Partially Synced Patterns. I hope more people learn about all of the different types of block that we have available, and find ways to integrate those into their own toolkits. Because playing with the grain of WordPress and using the Block Editor for all it’s worth, are how we untap the most value for our clients.

\n\n\n\n

[00:25:34] Nathan Wrigley: Yeah, there is certainly an awful lot of power, and like I said, I just think some of it gets missed.

\n\n\n\n

How much after you’ve done the migration, how much time do you have to spend with the clients? I have this impression that the Gutenberg editor is pretty straightforward, muscle memory for me essentially. Hours of playing in it. I know where all the bits and pieces are.

\n\n\n\n

But I would also recognise that if I was to show it to somebody who’d never played with WordPress and was coming from, in this case Sitecore, how overwhelming is it? And do you take steps to make it less overwhelming by minimising what’s available in the interface, or just disabling options? What do you do in that regard?

\n\n\n\n

[00:26:08] K. Adam White: No matter how much flexibility our clients want, it’s usually valuable to disable some options. I can’t remember a site we’ve shipped recently for any large website where we left the custom colour picker in, for example. You want to do a better job of limiting what people can use, so that we have confidence that the output, no matter how design savvy or not someone is, is going to be consistent with the rest of the site.

\n\n\n\n

My colleague, Joeleen Kennedy, gave a talk a couple years ago at the first  WordCamp US Showcase Day back in 2024, about work we had done customising the editor for that type of simplicity. And in particular things that we can do around colour palette selection. Ways that we can hide the styling controls for certain blocks through having them embedded in a pattern.

\n\n\n\n

It’s interesting to see that in WordPress recently, if you are editing content that has been marked as having come from a pattern in a post, you can edit all of the text, you can edit all of the images and link targets, but you actually have to hit edit pattern in the sidebar in some cases, depending on how the post is set up, to get into the details within the post that allow all of those other controls to be visible.

\n\n\n\n

That divide took a tiny bit of adjustment for people on our client teams, but the separation has helped them stay focused on the content, and worry less about the overwhelming, combinatorial set of styling possibilities that their blocks have.

\n\n\n\n

[00:27:29] Nathan Wrigley: Do you think that the necessary tools are already built into WordPress to do the kind of work that you are doing? Or is there some missing piece that would make it easier for somebody who doesn’t have the deep pockets that presumably Human Made would require, to do that kind of work. Is the default tooling usually okay to migrate things or have you had to build loads of bespoke tooling?

\n\n\n\n

So in terms of if I was to approach a WordPress website and try to migrate from Sitecore over to WordPress, is this something that you absolutely need a team to do, or would you be able to get some simulation of this with Core WordPress?

\n\n\n\n

[00:28:04] K. Adam White: If you had access to the exports of data from a Sitecore website, and you had a core vanilla WordPress install. And you had a LLM tool of some sort, I think that you could do a lot to get close to what you want. The LLM piece, I think enables this to be done by more people without having to be completely familiar with all of the internal nuances of WordPress. You need to direct it to the architectural pattern that you want, but we have found that it speaks Gutenberg pretty well.

\n\n\n\n

[00:28:32] Nathan Wrigley: What was the name of the tool that you said you’d custom and built?

\n\n\n\n

[00:28:34] K. Adam White: We had built a plugin called rehydrator.

\n\n\n\n

[00:28:36] Nathan Wrigley: Okay, rehydrator, yeah.

\n\n\n\n

[00:28:37] K. Adam White: rehydrator is the tool that we use to take a pattern in the theme and then use that pattern as the template when we’re bringing content over to make sure that we keep all of the styling theme side, and that our migration script doesn’t duplicate the markup specifically.

\n\n\n\n

[00:28:51] Nathan Wrigley: What’s Human Made’s approach to the WordPress project in that regard? You said it was a plugin. Does that mean it’s a wordpress.org repository plugin, or is it one that you have on your own, I don’t know, GitHub repository or whatever it may be.

\n\n\n\n

[00:29:01] K. Adam White: We have some things in the .org repository. In this case, that particular plugin is only on GitHub. A number of ones that we build are only on GitHub, because we’re building them for a very transient in time period of a site.

\n\n\n\n

You don’t need a migration tool to be part of your site long term, it’s not something you’re going to be leaving active, and updating month over month when there is a site running. It’s something that you bring in for the purpose of populating the data. And then you can remove that.

\n\n\n\n

And in that regard, for this particular one, at the moment it’s partly because it’s quite young, and it’s also because we don’t see it as being general purpose. So that plugin specifically is on GitHub and publicly available through Composer, but not on the plugin directory.

\n\n\n\n

In other situations, we’ve gone the opposite direction, and anything that we see as being a ongoing value to a site as it’s running, we do try to move those over as we can.

\n\n\n\n

[00:29:52] Nathan Wrigley: Given that you are on the sort of engineering side of Human Made, I don’t know if this question will land, but we seem to be in this interesting period where there’s a lot of chatter, AI kind of fits into the equation a little bit, but there’s a lot of chatter about the, market share of WordPress and whether or not WordPress as a tool will continue with the same numbers and clout and market share and all of those kind of things.

\n\n\n\n

Do you notice at the enterprise level that there’s been any kind of change in a southerly direction? Maybe there’s been a direct change in a northerly direction. What I’m trying to say is, for the enterprise, does WordPress still maintain that kind of pride place, top of the tree, or are you struggling to find new clients?

\n\n\n\n

[00:30:28] K. Adam White: We’re not struggling to find new clients. We’re lucky that we’re doing quite well on marketing, and we also have had a very powerful year in terms of building relationships with new enterprises, and finding ways to take the technology that we believe in and solve their problems with it.

\n\n\n\n

But I would argue that WordPress has never been the top of the enterprise space. And this actually goes back to your question about what is there that might be missing inside WordPress. The biggest thing that I think someone gets from a more, I’m going to use the term loosely, traditional enterprise CMS, is control.

\n\n\n\n

And WordPress has a security model where the ability to edit and publish a piece of content is usually at the post level. There’s ways to add specific permission checks for metadata. There’s ways that you can restrict what’s accessible and editable with custom interfaces and custom API endpoints. But we tend to have things fall down to the capability checks for user can edit post 1, 2, 3. Yes. No.

\n\n\n\n

And that means that if you have a user profile where your organisation depends on someone being able to come in and touch only the headlines and the SEO metadata, we don’t really have a model for that right now in WordPress.

\n\n\n\n

Whereas something like Sitecore, each individual, almost at the level of every string on the site, whether it’s a set of paragraphs or the label of a button, ends up as a individual node in the content tree. And those can be granted or denied to certain users on a much more granular level. So that to me is a bridge that I still am excited to see what we can do within WordPress to maybe build better interfaces, or better primitives in the editor.

\n\n\n\n

Block locking helps a little bit, but it is an API that’s quite difficult for some teams to wrap their heads around. And it also doesn’t really change the fact that if you can edit the post, and you were able to get the code editor up, then if you’re able to save it, you’re able to save it and doesn’t really go block by block. You’d have to write custom validation or permissions logic in order to be able to reject and update based on the user if they’re editing a block that is next to the one that they were supposed to.

\n\n\n\n

[00:32:32] Nathan Wrigley: So do you have to present to the clients? It’ll be fine. This is what WordPress has. Don’t worry too much about it. If you’ve got this permission, yep, sure. You might be able to overlap and think people could delete things or modify things that perhaps they wouldn’t have to. That’s an educational piece on your side. Go and teach everybody not to mess around with things that they shouldn’t be messing around with.

\n\n\n\n

But you would wish that in WordPress you could assign, say, as you described, this H1, this person can amend it, and this person can access the colour palette for the background image over here, but they can’t access the text. That kind of really granular permission. Whereas block locking just, it seems a bit more of a blunt instrument if you know what I mean. It’s binary. It’s locked or it’s not. You’d like to unlock the capabilities within each block so that certain users can do certain things within the same block.

\n\n\n\n

[00:33:15] K. Adam White: Within blocks, we tend to rely on security through obscurity. We can hide or obfuscate controls behind block locking with content only. We can hide them behind patterns. But if someone’s coming to WordPress, we do make sure that they understand upfront what the nuance of control will be. And we will work with them usually to make things more editable.

\n\n\n\n

Again, I will mention that most of the projects that we get that come from one of these more control-oriented CMSs into WordPress, what they’re seeking is actually more flexibility, not less. So they’re making a decision that they are willing to exchange the stringent control that they get in their existing tool for a process-based change. Maybe they add a review step, or add some sort of workflow plugin, so that we can validate that things look good and have someone sign off on it before it gets published. They would prefer to go that route than to sacrifice the ability for the editors to have the full control, and full pallet of options available to them.

\n\n\n\n

[00:34:13] Nathan Wrigley: Right, so that’s a much more loose approach. Everybody can maybe do more than they ought to do. If we have some editorial guideline where that can’t finally hit the public domain because the publish button is unavailable to you, that’s, okay. We’ll accept that kinda halfway house, if you like. That’s interesting.

\n\n\n\n

[00:34:30] K. Adam White: Each client’s needs are going to be slightly different. We do layer in publication checklists. We have tools to be able to say, this has to be tagged with the primary category before it goes live. We have tools to say, this still has lorum ipsum in it. You can add those in and build workflows, but I tend to like to help clients build processes to support those, rather than trying to take a draconian approach and lock everything down. Because then your work is going to be constantly chasing fine-grained permissions controls when you could be working to use that time making sure that all of the editors know what they can do.

\n\n\n\n

[00:35:04] Nathan Wrigley: I just want to drill into this a bit more. I know this isn’t where we were supposed to go, but I find it really interesting. Would you like those things to ship in Core? obviously they suit you down to the ground, all of those granular permissions, but do you think that belongs in Core?

\n\n\n\n

[00:35:17] K. Adam White: I think that we need more workflow in Core.

\n\n\n\n

[00:35:20] Nathan Wrigley: Okay.

\n\n\n\n

[00:35:20] K. Adam White: I know that there’s a number of different agencies and hosts which each have developed our own workflows solutions. I’ve worked across a number of them on projects that I’ve helped to support.

\n\n\n\n

But the notion that if you have something published and you make an edit out of the box, WordPress will automatically put live any further changes that you make to a published post when you hit save. That is probably the single thing that we most frequently have to build some type of plugin into a site to handle.

\n\n\n\n

Because we need to be able to give people an editorial review step. So that is something that I think we have a number of good tools, but I would love to see a more opinionated default in Core that we can use as a foundation for more complicated post editorial workflow. I think that’s the thing that we most frequently run into. That, and also I guess internationalisation are probably the two things that hopefully will come to the surface of the WordPress roadmap over time.

\n\n\n\n

[00:36:13] Nathan Wrigley: Yeah, I’d really not thought about that. Given Human Made’s sort of credentials and what have you. Do you have a lot of clout? Do you just punch above your weight in conversations about what makes it into Core? Do you get involved in those discussions? I’ve literally no idea how that would happen. Do you communicate to people when a release is coming around. Do you have a voice? Do you make yourself available? What is Human Made’s position in terms of getting things pushed into Core?

\n\n\n\n

[00:36:37] K. Adam White: We participate in the project. I personally have been less involved in Core over the past several years than I would have hoped. I’ve been very much enjoying the detailed, quite close to the ground work that I’m doing on our agency projects. But unfortunately, I have taken a bit of a step back on the open source project.

\n\n\n\n

Some of my colleagues are in a slightly different boat. My colleague, John Blackbourn, our Director of Security for our own hosting product is also the head of the Security Team for WordPress? And has been helping us get the core patches out for the recent set of security releases.

\n\n\n\n

We obviously will advocate in calls for feedback within the Gutenberg project when we feel that there’s a particular direction that we see from our projects. We are able to provide feedback on the UI, and the capabilities of new blocks that are being proposed. But that’s all done through the normal Gutenberg GitHub issue, and WordPress

\n\n\n\n

[00:37:28] Nathan Wrigley: So I think we should probably knock it on the head there. We’ve reached our allocated time. I’ll just point out that these days, it used to be the case that if I was at a WordCamp, you’d really have to wait about six months before the video for the presentation was available. I’m pretty sure it’ll be done already, in all honesty. 24 hours seems to be the time there. So if you were to go to WP Tavern, I will make sure that the link to the video, of K. Adam is there. If not, you can probably go to Google and search Migrating to Blocks, and in parenthesis, with Artisanal Care at Industrial Scale, and you’ll be able to see what it is that K. Adam was talking about.

\n\n\n\n

But really, thank you so much for chatting to me today about all of that.

\n\n\n\n

[00:38:06] K. Adam White: Thank you very much. And I can confirm that the video is already live on YouTube.

\n
\n\n\n\n

On the podcast today we have K. Adam White, or K. Adam for short.

\n\n\n\n

K. Adam is the principal engineer at Human Made, an enterprise WordPress consultancy. He’s been involved with WordPress almost 20 years, attended his first WordCamp in Boston back in 2011, and has contributed to WordPress Core and the broader open source ecosystem. Human Made is known for delivering complex projects, think high stakes, no room for mistakes, from global brands moving to WordPress.

\n\n\n\n

This time around, K. Adam delivered a presentation at WordCamp US focused on a crucial topic for anyone modernising their site, migrating to blocks. Human Made has been all-in on the block editor since the Gutenberg plugin days, and the team now specialises in large-scale migrations from other content management systems like Sitecore, as well as from other WordPress page builders.

\n\n\n\n

Our conversation focused on the technical and editorial challenges of moving tens or hundreds of thousands of posts into the world of blocks and patterns. We talked about the need to combine “artisanal care”, attention to detail in design, layout, and brand, with “industrial scale”, the ability to automate, audit, and validate mass migrations without losing visual fidelity.

\n\n\n\n

We also discussed the use of patterns as a foundation for development, integrating custom and Core blocks, and leveraging new tools (including AI-powered agents and open source plugins like Human Made’s own rehydrator) to streamline migration workflows. We also touched upon how clients are onboarded, the process of auditing legacy content, strategies for training editorial teams on the block editor, and there’s a frank reflection on gaps in WordPress, like granular content permissions.

\n\n\n\n

If you’re contemplating a move to the block editor, wrestling with a massive content migration, or curious about what happens when enterprise complexity meets the flexibility of WordPress, this episode is for you.

\n\n\n\n

Useful links

\n\n\n\n

Human Made

\n\n\n\n

Migrating to Blocks (With Artisanal Care, at Industrial Scale) – K. Adam’s presentation at WordCamp US 2026

\n\n\n\n

Human Made’s rehydrator plugin on GitHub

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 23 Sep 2026 12:53:53 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Nathan Wrigley\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:31;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:43:\"WordPress.org blog: WordPress 7.1.2 Release\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://wordpress.org/news/?p=21731\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:59:\"https://wordpress.org/news/2026/09/wordpress-7-1-2-release/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:3425:\"

This security release features a fix for a critical severity security vulnerability.

\n\n\n\n

Because this is a security release, it is recommended that you update your sites immediately.

\n\n\n\n

You can download WordPress 7.1.2 from WordPress.org, or visit your WordPress Dashboard, click “Updates”, and then click “Update Now”. If you have sites that support automatic background updates, the update process will begin automatically.

\n\n\n\n

Security update included in this release

\n\n\n\n

The security team would like to thank Robert Ressl for responsibly disclosing that an unauthenticated attacker can, under certain conditions, make page template resolution include a chosen readable local PHP file outside the active theme directories. If relevant pre-conditions for both the server environment and the active theme are met, this can lead to remote code execution (RCE).

\n\n\n\n

Thank you to these WordPress contributors

\n\n\n\n

This release was led by John Blackbourn. WordPress 7.1.2 would not have been possible without the contributions of the following people:

\n\n\n\n

Aaron Jorbin, Aki Hamano, Alex Concha, Ehtisham Siddiqui, fiocavallari, Jb Audras, Jeffrey Paul, Jeremy Felt, Joe McGill, John Blackbourn, Jon Surrell, Lance Willett, Manuel Camargo, marcs0h, martin.krcho, Mukesh Panchal, Olga Gleckler, Pascal Birchler, Peter Wilson, Rajin Sharwar, Ressl, Rudy Faile, Sergey Biryukov, Shail Mehta, Stephanie Walters, and vortfu.

\n\n\n\n

CVE and GHSA references

\n\n\n\n

Further details can be found in the advisory: CVE-2026-87902 / GHSA-7hp8-65ch-5whp.

\n\n\n\n

Backports

\n\n\n\n

As a courtesy, the security fix was backported to all branches eligible to receive security fixes (currently through 4.7). As a reminder, only the most recent version of WordPress is actively supported.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 22 Sep 2026 14:01:20 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:15:\"John Blackbourn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:32;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:107:\"Open Channels FM: Balancing Tradition and Innovation in Genealogy During the Era of Artificial Intelligence\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562212\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:114:\"https://openchannels.fm/balancing-tradition-and-innovation-in-genealogy-during-the-era-of-artificial-intelligence/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:111:\"I makes genealogy faster and more accurate while Charleen Mullenweg explains the ongoing need for human review.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 22 Sep 2026 12:02:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:33;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:98:\"Open Channels FM: Invisible Unicode Attacks, CrowdSec Source Leak, and the AI Coding Boom Explored\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562271\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:103:\"https://openchannels.fm/invisible-unicode-attacks-crowdsec-source-leak-and-the-ai-coding-boom-explored/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:134:\"Invisible characters challenge spam filters, CrowdSec deals with a code leak, and AI is shifting what matters in software development.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 15:30:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:34;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"bbPress: bbPress 2.6.18 is out!\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"https://bbpress.org/?p=249876\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:55:\"https://bbpress.org/blog/2026/09/bbpress-2-6-18-is-out/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:1178:\"

bbPress 2.6.18 is a maintenance release focused on forum imports and first-login password upgrades.

\n\n\n\n

Imported users can now upgrade their passwords on first login for more legacy forum formats, including cases where the original forum database is no longer available. This release also corrects PHPWind topic statuses, reply counts, and forum dates during import, and restores Super Moderator edit links on front-end bbPress user screens.

\n\n\n\n

bbPress 2.6.18 requires PHP 7.2 or newer and WordPress 6.0 or newer. Sites running an older PHP version should update PHP before upgrading bbPress. Read the 2.6.18 upgrade notes for importer compatibility details.

\n\n\n\n

These changes are also in the 2.7 development branch. The Plugin Directory’s development trunk remains at 2.7.0-alpha-3.

\n\n\n\n

Download bbPress 2.6.18 from WordPress.org, or update from your WordPress dashboard.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 14:53:41 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:17:\"John James Jacoby\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:35;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"WordPress.org blog: WordPress Takes Its Turn Leading the Open Website Alliance\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://wordpress.org/news/?p=21709\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:49:\"https://wordpress.org/news/2026/09/owa-president/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:2391:\"

I’m happy to announce that I am now serving as president of the Open Website Alliance (OWA), representing the WordPress Foundation. The Alliance brings together the community organizations behind Drupal, Joomla!, TYPO3, and WordPress to advocate for open source and share practices that benefit their projects. I represent the WordPress Foundation in this role, which rotates among the Alliance’s members.

\n\n\n\n
\"\"
\n\n\n\n

WordPress announced its participation in the Alliance in 2024, building on our work with Drupal, Joomla!, and TYPO3 to respond to the European Union’s Cyber Resilience Act. While many open source projects focus on underlying digital infrastructure, our content management systems power the websites where businesses reach customers and sell products and services. We asked policymakers to account for that economic role when setting security requirements, while respecting how communities of developers, translators, educators, and other contributors build and maintain the software. We share a belief that everyone should have the freedom to use, change, and share the tools they rely on.

\n\n\n\n

This commitment to openness builds on efforts such WordPress’s recent signing of the Open Weights and American AI Leadership letter. Our mission to democratize publishing means giving anyone a voice and welcoming everyone to contribute. Working with other communities puts those values into practice beyond WordPress, supporting the freedoms that make participation possible. I invite you to read the Open Website Alliance charter to learn more about the commitments its members share and how the Alliance works.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 14:28:41 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Mary Hubbard\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:36;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:77:\"OpenStation Blog: Drag, Drop, Preview: How a Post Gets Written in OpenStation\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1220\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:93:\"https://openstation.blog/2026/09/21/drag-drop-preview-an-ordinary-day-writing-in-openstation/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:2340:\"

I started writing a post (this post!).

\n\n\n\n

Then, as usually happens, I needed a picture, so I dragged one straight from my desktop into OpenStation. No downloading, no extra tabs needed, no extra spaces in the editor, no more “in which tab was the image!?”… I just dragged it from my desktop…

\n\n\n\n
\"Happy\"
\n\n\n\n

Done!

\n\n\n\n

And then I thought the post was already descriptive enough to tell how much we enjoy creating content in OpenStation… But I missed the preview. I wanted to see what the post would look like and edit it in real time. And it happened, I just had to click on the eye icon in the title bar of this editor.

\n\n\n\n

This is probably my favourite kind of productivity, the boring stuff becoming pleasantly simple…

\n\n\n\n

And yes, this whole post was written while recording the video \"🙂\"

\n\n\n\n
\n
\n \n \n
\n \n\n\n

But I thought that a quick sanity review from one of my bots would make the post nicer for SEO. So I just saved the draft, and gave it to my agent \"😉\"

\n\n\n\n

And the best part, is that EVERYTHING that my Agent did, is traceable.

\n\n\n\n
\"Dashboard
\n\n\n\n

Switch to OpenStation

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 13:39:51 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:37;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:58:\"Open Channels FM: AI for the Rest of Us, Beyond the Bubble\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562231\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:64:\"https://openchannels.fm/ai-for-the-rest-of-us-beyond-the-bubble/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:74:\"Bob Dunn talks about breaking out of AI echo chambers to gain new insights\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 09:35:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:38;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:47:\"OpenStation Blog: A better way to use WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1160\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"https://openstation.blog/2026/09/18/a-better-way-to-use-wordpress/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:5884:\"

I have been using WordPress for a long time, and I still love it. But wp-admin has basically worked in the same way for years.

\n\n\n\n

OpenStation is our attempt to change that.

\n\n\n\n

It’s a simple idea: instead of moving from one admin page to another, you have a desktop where you can open different parts of WordPress at the same time.

\n\n\n\n
\"A
\n\n\n\n

Your WordPress. Your workspace.

\n\n\n\n

You can open your posts, pages, media, plugins, WooCommerce or any OpenStation app in different windows.

\n\n\n\n

You can move them around, minimize them or put two things next to each other.

\n\n\n\n

It may sound like a small difference, but once you start using WordPress this way, it changes a lot.

\n\n\n\n

Real-time previews

\n\n\n\n

You can also see your changes while you are working on them.

\n\n\n\n

No need to constantly jump between wp-admin and the frontend just to check how something looks.

\n\n\n\n
\"Screenshot
\n\n\n\n

Apps inside WordPress

\n\n\n\n

This is one of my favorite parts.

\n\n\n\n

We are building apps like AllTerrain Forms, Photo Editor (And more!) specifically for OpenStation.

\n\n\n\n

They are still WordPress plugins, but they feel much more like normal desktop apps.

\n\n\n\n
\"A
\n\n\n\n

WordPress on your phone

\n\n\n\n

We also wanted OpenStation to work properly on mobile.

\n\n\n\n

You can install it as a PWA and use WordPress from your phone almost like any other app.

\n\n\n\n
\"A
\n\n\n\n

Performance Is Fast. Really fast.

\n\n\n\n

OpenStation is not only about changing how WordPress looks.

\n\n\n\n

We have put a lot of work into making it fast. In many cases, opening and moving between WordPress screens is faster than using them directly from wp-admin.

\n\n\n\n

We are also working on caching and preloading parts of WordPress before you need them.

\n\n\n\n

The goal is very simple: you click something and it opens FAST.

\n\n\n\n
\n\n
\n\n\n\n

And it is still WordPress

\n\n\n\n

This is important.

\n\n\n\n

We are not trying to replace WordPress or build another platform on top of it.

\n\n\n\n

Your plugins are still your plugins. WooCommerce is still WooCommerce. Your content stays in WordPress.

\n\n\n\n

OpenStation just gives you a different way to use all of it.

\n\n\n\n

And, of course, it is open source.

\n\n\n\n

Thank you

\n\n\n\n

And finally, a big thank you to everyone in the WordPress community who has tried OpenStation, shared feedback, reported bugs or simply told others about it.

\n\n\n\n
\"Grid
\n\n\n\n

And especially to all the contributors who are helping us build it. OpenStation would not be what it is today without you.

\n\n\n\n

There is still a lot we want to do, and seeing people contributing, experimenting and building things with OpenStation is probably the best part of the whole project.

\n\n\n\n

Thank you \"❤\"

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 18 Sep 2026 15:21:06 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:39;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:39:\"Open Channels FM: OCN Week in Review #4\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562022\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:45:\"https://openchannels.fm/ocn-week-in-review-4/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:428:\"This week Robert Jacobi shared about the evolving landscape of open source and tech. Highlights include AI’s growing role in security, WordPress and Apache fortifying their processes, LibreOffice redefining productivity with privacy, LoopConf rethinking event funding, and Switzerland’s bold move toward digital sovereignty. Explore how accountability, control, and sustainability are shaping the future of open technology.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 18 Sep 2026 13:45:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:40;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"Open Channels FM: Drawing the Line Between Openness and Noise in the Digital World\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562008\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:85:\"https://openchannels.fm/drawing-the-line-between-openness-and-noise-in-digital-world/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:100:\"Is sharing everything always good? Bob Dunn reflects on transparency and the noise in online spaces.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 18 Sep 2026 12:30:44 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:41;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"WordPress.org blog: WordPress 7.1.1 Maintenance and Security Release\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://wordpress.org/news/?p=21717\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:84:\"https://wordpress.org/news/2026/09/wordpress-7-1-1-maintenance-and-security-release/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:12736:\"

This security and maintenance release features 17 bug fixes on Core, 19 bug fixes for the Block Editor, and 11 security fixes.

\n\n\n\n

Because this is a security release, it is recommended that you update your sites immediately.

\n\n\n\n

You can download WordPress 7.1.1 from WordPress.org, or visit your WordPress Dashboard, click “Updates”, and then click “Update Now”. If you have sites that support automatic background updates, the update process will begin automatically.

\n\n\n\n

WordPress 7.1.1 is a short-cycle release. The next major release will be version 7.2 and is currently planned for December.

\n\n\n\n

For more information, please visit the WordPress 7.1.1 HelpHub site.

\n\n\n\n

Security updates included in this release

\n\n\n\n

The security team would like to thank the following people for responsibly reporting vulnerabilities, and allowing them to be fixed in this release:

\n\n\n\n\n\n\n\n

Thank you to these WordPress contributors

\n\n\n\n

This release was led by Adam Silverstein, Adrian Duffell, Andrei Draganescu, and Aaron Jorbin.

\n\n\n\n

WordPress 7.1.1 would not have been possible without the contributions of the following people. Their asynchronous coordination to deliver maintenance and security fixes into a stable release is a testament to the power and capability of the WordPress community.

\n\n\n\n

Aaron Jorbin, abrahamfariaz, Adam Silverstein, Adi Moldovan, Adrian Duffell, Aki Hamano, Alex Concha, Andrea Fercia, andreasca, Andrei Draganescu, Andrew Duthie, Andrew Serong, André Maneiro, annezazu, Anthony White, Arkaprabha Chowdhury, Ashar Fuadi, Azragh, Barry, buffer1024, Chunhui Ouyang, Courtney Robertson, Dagan, Daniel Richards, Daniel Rodriguez, Darshit Rajyaguru, David Biňovec, Deepak Kumar, Dennis Snell, DevSaiful, Dhruvang21, Dominik Schilling, Ehtisham Siddiqui, Ella Van Durpe, Erick Wambua, FahimMurshed, Fernando Tellado, fiocavallari, George Mamadashvili, George Vasiliades, gregbenz, Harish Tewari, Hit Bhalodia, Isabel Brison, Jake Spurlock, Jamie Dąbrowiecki, Jb Audras, Jeffrey Paul, Jeremy Felt, Jiwoon Kim, Joe Dolson, Joe Hoyle, Joe McGill, Joen Asmussen, Johannes Jülg, John Blackbourn, Jon Surrell, Jonathan Desrosiers, Josh, Kamran Abdul Aziz, Khokan Sardar, Kira Schroder, kleisauke, Kushagra Goyal, l1onofjudah, Lance Willett, luksusspokoju, Manzoor Wani, Marco Ciampini, marcs0h, Marin Atanasov, Michael, Mohammad Jangda, mrkenobi, Mukesh Panchal, Nawazkhan Pathan, Nik Tsekouras, Parth Jogi, Pascal Birchler, Paul Biron, Paul Kevan, Peter Wilson, Rafie Muhammad, ramonopoly, Rashed Hossain, Ressl, Riad Benguella, Rudy Faile, Sainath Poojary, Scott Kingsley Clark, Sergey Biryukov, Shail Mehta, Shameem – a11n, siliconforks, Slava Abakumov, Stephen Bernhardt, Sukhendu Sekhar Guria, Ugyen Dorji, Utsav Ladani, vortfu, Weston Ruter, w3bdsgn, wolf45 plus representatives from Automattic, Bluehost, GoDaddy, Pantheon, and WP Engine.

\n\n\n\n

Backports

\n\n\n\n

As a courtesy, the security fixes are being backported, where necessary, to all branches eligible to receive security fixes (currently through 4.7). As a reminder, only the most recent version of WordPress is actively supported. The backports are in progress and will ship as they become ready.

\n\n\n\n

How to contribute

\n\n\n\n

To get involved in WordPress core development, head over to Trac, pick a ticket, and join the conversation in the #core channel. Need help? Check out the Core Contributor Handbook.

\n\n\n\n

Props to Ehtisham Siddiqui, Lance Willett, Weston Ruter, and Adam Silverstein for proofreading.

\n\n\n\n

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 17 Sep 2026 19:53:09 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Aaron Jorbin\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:42;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"Open Channels FM: Open Source Economics, LibreOffice, and Swiss Digital Sovereignty\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2561963\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:88:\"https://openchannels.fm/open-source-economics-libreoffice-and-swiss-digital-sovereignty/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:112:\"Shifting budgets and tech priorities drive change for open source events software and government infrastructure.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 17 Sep 2026 16:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:43;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"Matt: OmFest: A Celebration of Curiosity, Connection, and the Future\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:23:\"https://ma.tt/?p=154845\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://ma.tt/2026/09/omfest-soon/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:7320:\"
\"\"
\n\n\n\n

OmFest is coming together quite nicely! The new website is beautiful and highlights some of the experiences available throughout the day. I think Om would be very impressed by the attendee list. We’re doing it at the Swedish American Hall, the same venue as the first WordCamp, where Om, of course, spoke about Blogs and Journalism. (The videos have been lost to digirot, unless anyone has some recordings? I’ve been looking everywhere.)

\n\n\n\n

Below is cross-posted from OmFest.co:

\n\n\n\n

September 29th is when Om would have turned 60. 

\n\n\n\n

When I first started thinking about how to mark the day, I knew I didn’t want a traditional memorial. Om loved bringing interesting people together, and he loved a festival that taught him something he didn’t already know. His curiosity crossed so many worlds and passions: technology, journalism, photography, investing, watches, pens, coffee, design, music, India, New York, San Francisco.

\n\n\n\n

So we’re bringing these worlds together. On September 29 in San Francisco, we’re throwing OmFest—twelve hours of ideas, objects, food, music, and conversation, organized and anchored around a statement Om once said:

\n\n\n\n
\n

“If you pay enough attention to the present, you can see the future.”

\n
\n\n\n\n

Present Future

\n\n\n\n

Instead of tributes or keynotes, we’ll host a series of short talks with one simple challenge: teach us something you’re seeing before everyone else sees it. No pitches, no career retrospectives. You don’t even have to talk about Om. What happens to photography when anyone can generate the perfect image with AI? Why do physical objects become more meaningful as our lives become more digital? Are glasses becoming computers? What does handwriting do to the way we think? Different subjects, same goal: everyone leaves knowing something they didn’t know when they arrived.

\n\n\n\n

A Festival of Om’s Curiosity

\n\n\n\n

Between the talks, there will be plenty to stumble upon. Through Om’s Lens: a gallery of Om’s photography. TIME: an exhibit that uses his watch obsession to spark a discussion about craft and collecting. Field Notes: a communal writing table stocked with fine paper, fountain pens, and ink, where you can write something worth remembering—and either keep it or leave it behind to be bound in a book to commemorate the day. And Om’s Shelf: books he read, loved, and recommended. The collection will start full and slowly empty as his favorite reads pass into other hands.

\n\n\n\n

People from Om’s different worlds will drop in throughout the day to share knowledge and facilitate small, hands-on moments: a photography tutorial, a notebook-binding session, a lesson on the mechanics of a watch, an experience with a coffee you’ve never tried, a tea ceremony. And, woven into this experience, will be OM/60: sixty small discoveries about Om, hidden throughout.

\n\n\n\n

All Roads Lead to Om

\n\n\n\n

The most important part, however, isn’t any of these objects. At check-in, instead of a badge with your company and title, you’ll choose the worlds through which you knew Om: photography, journalism, technology, GigaOm, investing, WordPress, India, coffee, pens and ink, design, music, or simply friends and family.

\n\n\n\n

Then we build a physical map of it. It starts nearly empty. You add yourself, mark how you knew Om and whom he introduced you to, and those people connect to others. By the end of the night, I hope we’ll be able to see what Om spent a lifetime making.

\n\n\n\n

The question I keep asking myself: who will meet because of Om that Om never had the chance to introduce? If OmFest works, his network won’t just be documented that day. It’ll grow.

\n\n\n\n

From Ideas to Celebration

\n\n\n\n

The day flows and builds. Morning is coffee, breakfast, books, photography, and conversation. The middle is deliberately unstructured—wander, eat, write, talk. In the evening, friends share short stories as we raise a glass to Om on his 60th. Then the bars roll in, the lights go down, the music gets louder, and OmFest becomes DesiParty: his old-school New York nights, Asian Underground, bhangra, electronica. We start with ideas and end with dancing. That feels right.

\n\n\n\n

Version 1.0

\n\n\n\n

What we’re building shouldn’t end on September 29. What does registration look like if it’s designed to help strangers talk to each other? How do you design a conference around curiosity instead of status? How do you make something that works for a two-hour visit or a twelve-hour one? How does a room encourage connection without forcing networking?

\n\n\n\n

We’re treating OmFest as an experiment. We’ll document what works—formats, designs, code, templates, check-in, programming—and open source as much of it as we can. Other events can take the best ideas and make them better.

\n\n\n\n

September 29 isn’t the end of OmFest. It’s version 1.0.

\n\n\n\n

Come Build with Us

\n\n\n\n

People from across Om’s life are building OmFest together. Some are contributing photographs. Someone is making a textile; another is bringing tea and guiding ceremonies. Others are helping with watches, eyewear, books, music, writing, and stories. We haven’t discovered whole parts of Om’s world yet. That’s the point.

\n\n\n\n

If Om introduced you to something, or someone, we’d love to know. If there’s something you think people should experience, see, hear, taste, read, or learn that day, tell us.

\n\n\n\n

And if you just want to come, come. You don’t need to have known Om. You only need to be curious.

\n\n\n\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 17 Sep 2026 01:04:27 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"Matt\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:44;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Matt: Mirene\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:23:\"https://ma.tt/?p=154872\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"https://ma.tt/2026/09/mirene-2/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:245:\"

It’s official in SF Standard: Stewart Brand sells his seaworthy Sausalito houseboat to tech CEO. Ahoy!

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 17 Sep 2026 00:45:36 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"Matt\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:45;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:131:\"Open Channels FM: Scaling Security WordPress Reinvents Protection and Apache Bolsters Infrastructure While Zephyr Expands Ecosystem\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2561934\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:138:\"https://openchannels.fm/scaling-security-wordpress-reinvents-protection-and-apache-bolsters-infrastructure-while-zephyr-expands-ecosystem/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:128:\"WordPress, Apache, and Zephyr adapt to AI-driven security and infrastructure demands shaping the future of open source at scale.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 16 Sep 2026 16:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:46;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"Open Channels FM: Navigating Founder-Led Sales in Today’s Market\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2560839\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:70:\"https://openchannels.fm/navigating-founder-led-sales-in-todays-market/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:210:\"Founder-led sales focus on authentic outreach and relationship building, prioritizing genuine engagement in communities over cold pitches, fostering trust, and recognizing that not every prospect is a good fit.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 16 Sep 2026 12:53:50 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:47;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"bbPress: bbPress 2.6.17 is out!\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"https://bbpress.org/?p=249814\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:55:\"https://bbpress.org/blog/2026/09/bbpress-2-6-17-is-out/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:2627:\"

bbPress 2.6.17 is a security and maintenance release with broad improvements to permissions, private content, subscriptions, moderation workflows, and forum counts. Everyone running bbPress should update as soon as possible. \"🔒\"

\n\n\n\n

(You may notice 2.6.17 release follows 2.6.15. Well, I found a SQL bug right after 2.6.16 was tagged and I didn’t want to wait to get that fix out, sooooo… here we are!)

\n\n\n\n

This release strengthens inherited private and hidden forum visibility, BuddyPress Group Forum boundaries, subscriber access checks, profile editing, REST API and XML-RPC requests, search results, canonical redirects, topic tags, reply moves, topic splits, and output escaping.

\n\n\n\n

It also includes a substantial overhaul of count maintenance and repair tools, improving topic, reply, forum, subforum, engagement, voice, and user contribution counts across moderation, moves, merges, splits, deletion, restoration, reassignment, and simultaneous requests. Block Themes now receive first-class support while continuing to use bbPress’s PHP templates, and the Plugin Directory gains a populated WordPress Playground preview.

\n\n\n\n

Developers should review the 2.6.17 upgrade notes, especially if an integration hooks bbPress creation or moderation actions for counts, filters custom statuses or count values, customizes subforum queries, or overrides form-user-roles.php.

\n\n\n\n

All of these changes have also been merged into the 2.7 development branch, which is now at 2.7.0-alpha-3.

\n\n\n\n

Thank you to obenland, hoangkien1020, rafiem, faran66, im_rootkid, winty, winstoncrooker, vvh1te3zz, mickey_cyberkid, phanphanhailong, hieunx91, jassbugbounty, nextdoorsec, akemi20, amedit, djsplatt, antonade, foobar7, paulos__, and nomadsyndiode for contributing reports, patches, testing, and review. Thank you for helping keep bbPress communities safe and reliable! \"🙏\"

\n\n\n\n

Download bbPress 2.6.17 from WordPress.org, or update directly from your WordPress dashboard.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 16 Sep 2026 07:23:20 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:17:\"John James Jacoby\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:48;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:98:\"Open Channels FM: The Cost of Convenience How AI Agents and Security Initiatives Challenge Control\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2561898\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:105:\"https://openchannels.fm/the-cost-of-convenience-how-ai-agents-and-security-initiatives-challenge-control/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:98:\"AI agents handle daily tasks and IBM and Red Hat invest billions in open source software security.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 15 Sep 2026 16:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:49;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:81:\"Open Channels FM: Open Stacks, Federation, and the Changing Landscape of Software\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2561881\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:86:\"https://openchannels.fm/open-stacks-federation-and-the-changing-landscape-of-software/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:157:\"Hosts Robert Jacobi and Dave Lockie have a conversation about AI impacts, open source priorities, data privacy, and emerging alternative network technologies\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 15 Sep 2026 10:17:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}}}}}}}}}}s:4:\"type\";i:128;s:7:\"headers\";a:9:{s:6:\"server\";s:5:\"nginx\";s:4:\"date\";s:29:\"Wed, 07 Oct 2026 18:18:31 GMT\";s:12:\"content-type\";s:8:\"text/xml\";s:13:\"last-modified\";s:29:\"Wed, 07 Oct 2026 18:00:45 GMT\";s:4:\"vary\";s:15:\"Accept-Encoding\";s:15:\"x-frame-options\";s:10:\"SAMEORIGIN\";s:16:\"content-encoding\";s:4:\"gzip\";s:7:\"alt-svc\";s:5:\"clear\";s:4:\"x-nc\";s:9:\"HIT dca 2\";}s:5:\"build\";i:1760643936;s:21:\"cache_expiration_time\";i:1791440311;s:23:\"__cache_expiration_time\";i:1791440311;}', 'off'); -INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES -(1607, '_transient_timeout_dash_v2_3605f57d6641b1f6504fce9d39bcf566', '1791440311', 'off'), -(1608, '_transient_dash_v2_3605f57d6641b1f6504fce9d39bcf566', '', 'off'), -(1610, '_site_transient_update_plugins', 'O:8:\"stdClass\":5:{s:12:\"last_checked\";i:1791467007;s:8:\"response\";a:4:{s:51:\"all-in-one-wp-migration/all-in-one-wp-migration.php\";O:8:\"stdClass\":13:{s:2:\"id\";s:37:\"w.org/plugins/all-in-one-wp-migration\";s:4:\"slug\";s:23:\"all-in-one-wp-migration\";s:6:\"plugin\";s:51:\"all-in-one-wp-migration/all-in-one-wp-migration.php\";s:11:\"new_version\";s:5:\"7.112\";s:3:\"url\";s:54:\"https://wordpress.org/plugins/all-in-one-wp-migration/\";s:7:\"package\";s:72:\"https://downloads.wordpress.org/plugin/all-in-one-wp-migration.7.112.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:76:\"https://ps.w.org/all-in-one-wp-migration/assets/icon-256x256.png?rev=2458334\";s:2:\"1x\";s:76:\"https://ps.w.org/all-in-one-wp-migration/assets/icon-128x128.png?rev=2458334\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:79:\"https://ps.w.org/all-in-one-wp-migration/assets/banner-1544x500.png?rev=3490368\";s:2:\"1x\";s:78:\"https://ps.w.org/all-in-one-wp-migration/assets/banner-772x250.png?rev=3490368\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"3.3\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"5.3\";s:16:\"requires_plugins\";a:0:{}}s:23:\"compressx/compressx.php\";O:8:\"stdClass\":14:{s:2:\"id\";s:23:\"w.org/plugins/compressx\";s:4:\"slug\";s:9:\"compressx\";s:6:\"plugin\";s:23:\"compressx/compressx.php\";s:11:\"new_version\";s:6:\"0.9.40\";s:3:\"url\";s:40:\"https://wordpress.org/plugins/compressx/\";s:7:\"package\";s:59:\"https://downloads.wordpress.org/plugin/compressx.0.9.40.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:62:\"https://ps.w.org/compressx/assets/icon-256x256.png?rev=3108121\";s:2:\"1x\";s:62:\"https://ps.w.org/compressx/assets/icon-128x128.png?rev=3108121\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:65:\"https://ps.w.org/compressx/assets/banner-1544x500.png?rev=3108121\";s:2:\"1x\";s:64:\"https://ps.w.org/compressx/assets/banner-772x250.png?rev=3108121\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"5.8\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"7.0\";s:16:\"requires_plugins\";a:0:{}s:14:\"upgrade_notice\";s:113:\"\";}s:27:\"yabe-webfont/jooosi-fon.php\";O:8:\"stdClass\":13:{s:2:\"id\";s:26:\"w.org/plugins/yabe-webfont\";s:4:\"slug\";s:12:\"yabe-webfont\";s:6:\"plugin\";s:27:\"yabe-webfont/jooosi-fon.php\";s:11:\"new_version\";s:5:\"1.1.5\";s:3:\"url\";s:43:\"https://wordpress.org/plugins/yabe-webfont/\";s:7:\"package\";s:61:\"https://downloads.wordpress.org/plugin/yabe-webfont.1.1.5.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:65:\"https://ps.w.org/yabe-webfont/assets/icon-256x256.png?rev=2926323\";s:2:\"1x\";s:65:\"https://ps.w.org/yabe-webfont/assets/icon-256x256.png?rev=2926323\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:68:\"https://ps.w.org/yabe-webfont/assets/banner-1544x500.png?rev=2928341\";s:2:\"1x\";s:67:\"https://ps.w.org/yabe-webfont/assets/banner-772x250.png?rev=2926323\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"6.0\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"7.4\";s:16:\"requires_plugins\";a:0:{}}s:30:\"seo-by-rank-math/rank-math.php\";O:8:\"stdClass\":13:{s:2:\"id\";s:30:\"w.org/plugins/seo-by-rank-math\";s:4:\"slug\";s:16:\"seo-by-rank-math\";s:6:\"plugin\";s:30:\"seo-by-rank-math/rank-math.php\";s:11:\"new_version\";s:7:\"1.0.280\";s:3:\"url\";s:47:\"https://wordpress.org/plugins/seo-by-rank-math/\";s:7:\"package\";s:67:\"https://downloads.wordpress.org/plugin/seo-by-rank-math.1.0.280.zip\";s:5:\"icons\";a:2:{s:2:\"1x\";s:61:\"https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330\";s:3:\"svg\";s:61:\"https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:72:\"https://ps.w.org/seo-by-rank-math/assets/banner-1544x500.png?rev=2639678\";s:2:\"1x\";s:71:\"https://ps.w.org/seo-by-rank-math/assets/banner-772x250.png?rev=2639678\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"6.7\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"7.4\";s:16:\"requires_plugins\";a:0:{}}}s:12:\"translations\";a:0:{}s:9:\"no_update\";a:6:{s:36:\"contact-form-7/wp-contact-form-7.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:28:\"w.org/plugins/contact-form-7\";s:4:\"slug\";s:14:\"contact-form-7\";s:6:\"plugin\";s:36:\"contact-form-7/wp-contact-form-7.php\";s:11:\"new_version\";s:3:\"6.2\";s:3:\"url\";s:45:\"https://wordpress.org/plugins/contact-form-7/\";s:7:\"package\";s:61:\"https://downloads.wordpress.org/plugin/contact-form-7.6.2.zip\";s:5:\"icons\";a:2:{s:2:\"1x\";s:59:\"https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255\";s:3:\"svg\";s:59:\"https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:69:\"https://ps.w.org/contact-form-7/assets/banner-1544x500.png?rev=860901\";s:2:\"1x\";s:68:\"https://ps.w.org/contact-form-7/assets/banner-772x250.png?rev=880427\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"7.1\";}s:43:\"disable-media-pages/disable-media-pages.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:33:\"w.org/plugins/disable-media-pages\";s:4:\"slug\";s:19:\"disable-media-pages\";s:6:\"plugin\";s:43:\"disable-media-pages/disable-media-pages.php\";s:11:\"new_version\";s:5:\"4.0.3\";s:3:\"url\";s:50:\"https://wordpress.org/plugins/disable-media-pages/\";s:7:\"package\";s:68:\"https://downloads.wordpress.org/plugin/disable-media-pages.4.0.3.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:72:\"https://ps.w.org/disable-media-pages/assets/icon-256x256.png?rev=2653576\";s:2:\"1x\";s:72:\"https://ps.w.org/disable-media-pages/assets/icon-128x128.png?rev=2653576\";}s:7:\"banners\";a:0:{}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"6.0\";}s:47:\"disable-post-revision/disable-post-revision.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:35:\"w.org/plugins/disable-post-revision\";s:4:\"slug\";s:21:\"disable-post-revision\";s:6:\"plugin\";s:47:\"disable-post-revision/disable-post-revision.php\";s:11:\"new_version\";s:5:\"1.0.1\";s:3:\"url\";s:52:\"https://wordpress.org/plugins/disable-post-revision/\";s:7:\"package\";s:70:\"https://downloads.wordpress.org/plugin/disable-post-revision.1.0.1.zip\";s:5:\"icons\";a:1:{s:2:\"1x\";s:74:\"https://ps.w.org/disable-post-revision/assets/icon-128x128.png?rev=1423333\";}s:7:\"banners\";a:1:{s:2:\"1x\";s:76:\"https://ps.w.org/disable-post-revision/assets/banner-772x250.png?rev=1423333\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"3.0\";}s:48:\"faq-schema-for-pages-and-posts/wp-faq-schema.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:44:\"w.org/plugins/faq-schema-for-pages-and-posts\";s:4:\"slug\";s:30:\"faq-schema-for-pages-and-posts\";s:6:\"plugin\";s:48:\"faq-schema-for-pages-and-posts/wp-faq-schema.php\";s:11:\"new_version\";s:5:\"2.3.0\";s:3:\"url\";s:61:\"https://wordpress.org/plugins/faq-schema-for-pages-and-posts/\";s:7:\"package\";s:73:\"https://downloads.wordpress.org/plugin/faq-schema-for-pages-and-posts.zip\";s:5:\"icons\";a:1:{s:2:\"1x\";s:83:\"https://ps.w.org/faq-schema-for-pages-and-posts/assets/icon-128x128.png?rev=2195137\";}s:7:\"banners\";a:1:{s:2:\"1x\";s:85:\"https://ps.w.org/faq-schema-for-pages-and-posts/assets/banner-772x250.png?rev=2682654\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"4.6\";}s:30:\"table-of-contents-plus/toc.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:36:\"w.org/plugins/table-of-contents-plus\";s:4:\"slug\";s:22:\"table-of-contents-plus\";s:6:\"plugin\";s:30:\"table-of-contents-plus/toc.php\";s:11:\"new_version\";s:8:\"202609.1\";s:3:\"url\";s:53:\"https://wordpress.org/plugins/table-of-contents-plus/\";s:7:\"package\";s:74:\"https://downloads.wordpress.org/plugin/table-of-contents-plus.202609.1.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:75:\"https://ps.w.org/table-of-contents-plus/assets/icon-256x256.png?rev=1151771\";s:2:\"1x\";s:75:\"https://ps.w.org/table-of-contents-plus/assets/icon-128x128.png?rev=1151770\";}s:7:\"banners\";a:1:{s:2:\"1x\";s:76:\"https://ps.w.org/table-of-contents-plus/assets/banner-772x250.png?rev=578600\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"5.7\";}s:35:\"insert-headers-and-footers/ihaf.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:40:\"w.org/plugins/insert-headers-and-footers\";s:4:\"slug\";s:26:\"insert-headers-and-footers\";s:6:\"plugin\";s:35:\"insert-headers-and-footers/ihaf.php\";s:11:\"new_version\";s:5:\"2.3.9\";s:3:\"url\";s:57:\"https://wordpress.org/plugins/insert-headers-and-footers/\";s:7:\"package\";s:75:\"https://downloads.wordpress.org/plugin/insert-headers-and-footers.2.3.9.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:79:\"https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516\";s:2:\"1x\";s:79:\"https://ps.w.org/insert-headers-and-footers/assets/icon-128x128.png?rev=2758516\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:82:\"https://ps.w.org/insert-headers-and-footers/assets/banner-1544x500.png?rev=2758516\";s:2:\"1x\";s:81:\"https://ps.w.org/insert-headers-and-footers/assets/banner-772x250.png?rev=2758516\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"5.0\";}}s:7:\"checked\";a:12:{s:44:\"centro-de-funciones/alcastromol-function.php\";s:5:\"3.2.0\";s:51:\"all-in-one-wp-migration/all-in-one-wp-migration.php\";s:5:\"7.111\";s:23:\"compressx/compressx.php\";s:6:\"0.9.39\";s:36:\"contact-form-7/wp-contact-form-7.php\";s:3:\"6.2\";s:43:\"disable-media-pages/disable-media-pages.php\";s:5:\"4.0.3\";s:47:\"disable-post-revision/disable-post-revision.php\";s:5:\"1.0.1\";s:48:\"faq-schema-for-pages-and-posts/wp-faq-schema.php\";s:5:\"2.3.0\";s:27:\"yabe-webfont/jooosi-fon.php\";s:5:\"1.1.4\";s:30:\"seo-by-rank-math/rank-math.php\";s:7:\"1.0.279\";s:30:\"table-of-contents-plus/toc.php\";s:8:\"202609.1\";s:35:\"insert-headers-and-footers/ihaf.php\";s:5:\"2.3.9\";s:23:\"wp-rocket/wp-rocket.php\";s:6:\"3.15.3\";}}', 'off'), (1614, 'alcastromol_modules', 'a:5:{s:8:\"tailwind\";s:1:\"1\";s:5:\"cache\";s:1:\"1\";s:9:\"optimizer\";s:1:\"0\";s:5:\"debug\";s:1:\"0\";s:7:\"animejs\";s:1:\"1\";}', 'auto'), (1666, 'alcastromol_animejs_imports', 'a:14:{s:9:\"animation\";s:1:\"1\";s:4:\"text\";s:1:\"1\";s:5:\"utils\";s:1:\"0\";s:8:\"timeline\";s:1:\"0\";s:5:\"timer\";s:1:\"0\";s:10:\"animatable\";s:1:\"0\";s:9:\"draggable\";s:1:\"0\";s:6:\"layout\";s:1:\"0\";s:5:\"scope\";s:1:\"0\";s:6:\"engine\";s:1:\"0\";s:7:\"easings\";s:1:\"0\";s:3:\"svg\";s:1:\"0\";s:5:\"waapi\";s:1:\"0\";s:6:\"events\";s:1:\"0\";}', 'auto'), -(1824, '_site_transient_timeout_theme_roots', '1791468807', 'off'), -(1825, '_site_transient_theme_roots', 'a:1:{s:8:\"xmartica\";s:7:\"/themes\";}', 'off'), -(1834, '_transient_timeout_jooosi_fon_scanned_builders_1.1.4', '1791559920', 'off'), -(1835, '_transient_jooosi_fon_scanned_builders_1.1.4', 'a:7:{s:7:\"kadence\";a:3:{s:4:\"name\";s:7:\"kadence\";s:9:\"file_path\";s:95:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Kadence/Main.php\";s:10:\"class_name\";s:30:\"JooosiFon\\Builder\\Kadence\\Main\";}s:14:\"generate-press\";a:3:{s:4:\"name\";s:14:\"generate-press\";s:9:\"file_path\";s:101:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/GeneratePress/Main.php\";s:10:\"class_name\";s:36:\"JooosiFon\\Builder\\GeneratePress\\Main\";}s:10:\"builderius\";a:3:{s:4:\"name\";s:10:\"builderius\";s:9:\"file_path\";s:98:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Builderius/Main.php\";s:10:\"class_name\";s:33:\"JooosiFon\\Builder\\Builderius\\Main\";}s:14:\"classic-editor\";a:3:{s:4:\"name\";s:14:\"classic-editor\";s:9:\"file_path\";s:101:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/ClassicEditor/Main.php\";s:10:\"class_name\";s:36:\"JooosiFon\\Builder\\ClassicEditor\\Main\";}s:9:\"gutenberg\";a:3:{s:4:\"name\";s:9:\"gutenberg\";s:9:\"file_path\";s:97:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Gutenberg/Main.php\";s:10:\"class_name\";s:32:\"JooosiFon\\Builder\\Gutenberg\\Main\";}s:9:\"elementor\";a:3:{s:4:\"name\";s:9:\"elementor\";s:9:\"file_path\";s:97:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Elementor/Main.php\";s:10:\"class_name\";s:32:\"JooosiFon\\Builder\\Elementor\\Main\";}s:8:\"pinegrow\";a:3:{s:4:\"name\";s:8:\"pinegrow\";s:9:\"file_path\";s:96:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Pinegrow/Main.php\";s:10:\"class_name\";s:31:\"JooosiFon\\Builder\\Pinegrow\\Main\";}}', 'off'), -(1836, '_site_transient_timeout_wp_theme_files_patterns-4e297246f76a862cb5b45cef9a91a26c', '1791475320', 'off'), -(1837, '_site_transient_wp_theme_files_patterns-4e297246f76a862cb5b45cef9a91a26c', 'a:2:{s:7:\"version\";s:5:\"1.5.1\";s:8:\"patterns\";a:0:{}}', 'off'); +(1844, '_site_transient_timeout_php_check_478252eea4acfca65f7d24ee29253bbe', '1792110115', 'off'), +(1845, '_site_transient_php_check_478252eea4acfca65f7d24ee29253bbe', 'a:5:{s:19:\"recommended_version\";s:3:\"8.3\";s:15:\"minimum_version\";s:3:\"7.4\";s:12:\"is_supported\";b:1;s:9:\"is_secure\";b:1;s:13:\"is_acceptable\";b:1;}', 'off'), +(2000, 'polylang', 'a:18:{s:10:\"force_lang\";i:1;s:7:\"domains\";a:1:{s:2:\"es\";s:0:\"\";}s:12:\"hide_default\";b:1;s:7:\"rewrite\";b:1;s:13:\"redirect_lang\";b:0;s:7:\"browser\";b:0;s:13:\"media_support\";b:0;s:10:\"post_types\";a:0:{}s:10:\"taxonomies\";a:0:{}s:4:\"sync\";a:0:{}s:12:\"default_lang\";s:2:\"en\";s:9:\"nav_menus\";a:1:{s:8:\"xmartica\";a:1:{s:7:\"primary\";a:1:{s:2:\"en\";i:10;}}}s:16:\"first_activation\";i:1791559413;s:16:\"previous_version\";s:0:\"\";s:7:\"version\";s:6:\"3.8.10\";s:5:\"media\";a:1:{s:9:\"duplicate\";b:0;}s:27:\"machine_translation_enabled\";b:0;s:28:\"machine_translation_services\";a:1:{s:5:\"deepl\";a:0:{}}}', 'auto'), +(2001, 'pll_language_from_content_available', 'no', 'auto'), +(2002, 'polylang_wpml_strings', 'a:0:{}', 'auto'), +(2003, 'pll_language_taxonomies', 'a:0:{}', 'auto'), +(2005, 'widget_polylang', 'a:1:{s:12:\"_multiwidget\";i:1;}', 'auto'), +(2014, 'pll_dismissed_notices', 'a:1:{i:0;s:6:\"wizard\";}', 'auto'), +(2027, 'polylang_licenses', 'a:1:{s:12:\"polylang-pro\";a:2:{s:3:\"key\";s:32:\"b5e0b5f8dd8689e6aca49dd6e6e1a930\";s:4:\"data\";O:8:\"stdClass\":6:{s:7:\"license\";s:5:\"valid\";s:7:\"success\";b:1;s:7:\"expires\";s:8:\"lifetime\";s:9:\"item_name\";s:12:\"Polylang Pro\";s:13:\"customer_name\";s:8:\"Licensed\";s:14:\"customer_email\";s:20:\"license@polylang.pro\";}}}', 'off'), +(2037, 'duplicate_page_options', 'a:4:{s:21:\"duplicate_post_status\";s:5:\"draft\";s:23:\"duplicate_post_redirect\";s:7:\"to_list\";s:21:\"duplicate_post_suffix\";s:0:\"\";s:21:\"duplicate_post_editor\";s:7:\"classic\";}', 'auto'), +(2040, 'rank_math_sitemap_cache_files', 'a:0:{}', 'auto'); +INSERT INTO `xm_aca_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES +(2080, 'rewrite_rules', 'a:220:{s:19:\"sitemap_index\\.xml$\";s:19:\"index.php?sitemap=1\";s:31:\"([^/]+?)-sitemap([0-9]+)?\\.xml$\";s:51:\"index.php?sitemap=$matches[1]&sitemap_n=$matches[2]\";s:24:\"([a-z]+)?-?sitemap\\.xsl$\";s:25:\"index.php?xsl=$matches[1]\";s:11:\"^wp-json/?$\";s:22:\"index.php?rest_route=/\";s:14:\"^wp-json/(.*)?\";s:33:\"index.php?rest_route=/$matches[1]\";s:21:\"^index.php/wp-json/?$\";s:22:\"index.php?rest_route=/\";s:24:\"^index.php/wp-json/(.*)?\";s:33:\"index.php?rest_route=/$matches[1]\";s:17:\"^wp-sitemap\\.xml$\";s:23:\"index.php?sitemap=index\";s:17:\"^wp-sitemap\\.xsl$\";s:36:\"index.php?sitemap-stylesheet=sitemap\";s:23:\"^wp-sitemap-index\\.xsl$\";s:34:\"index.php?sitemap-stylesheet=index\";s:53:\"^(es)/wp-sitemap-([a-z]+?)-([a-z\\d_-]+?)-(\\d+?)\\.xml$\";s:92:\"index.php?lang=$matches[1]&sitemap=$matches[2]&sitemap-subtype=$matches[3]&paged=$matches[4]\";s:48:\"^wp-sitemap-([a-z]+?)-([a-z\\d_-]+?)-(\\d+?)\\.xml$\";s:75:\"index.php?sitemap=$matches[1]&sitemap-subtype=$matches[2]&paged=$matches[3]\";s:39:\"^(es)/wp-sitemap-([a-z]+?)-(\\d+?)\\.xml$\";s:64:\"index.php?lang=$matches[1]&sitemap=$matches[2]&paged=$matches[3]\";s:34:\"^wp-sitemap-([a-z]+?)-(\\d+?)\\.xml$\";s:47:\"index.php?sitemap=$matches[1]&paged=$matches[2]\";s:17:\"^oauth/authorize$\";s:38:\"index.php?mcp_oauth_endpoint=authorize\";s:26:\"^oauth/authorize-callback$\";s:47:\"index.php?mcp_oauth_endpoint=authorize-callback\";s:13:\"^oauth/token$\";s:34:\"index.php?mcp_oauth_endpoint=token\";s:15:\"^oauth/consent$\";s:36:\"index.php?mcp_oauth_endpoint=consent\";s:14:\"^oauth/revoke$\";s:35:\"index.php?mcp_oauth_endpoint=revoke\";s:39:\"^\\.well-known/oauth-protected-resource$\";s:48:\"index.php?mcp_oauth_discovery=protected-resource\";s:41:\"^\\.well-known/oauth-authorization-server$\";s:50:\"index.php?mcp_oauth_discovery=authorization-server\";s:34:\"wpcode/[^/]+/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:44:\"wpcode/[^/]+/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:64:\"wpcode/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:59:\"wpcode/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:59:\"wpcode/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:40:\"wpcode/[^/]+/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:23:\"wpcode/([^/]+)/embed/?$\";s:39:\"index.php?wpcode=$matches[1]&embed=true\";s:27:\"wpcode/([^/]+)/trackback/?$\";s:33:\"index.php?wpcode=$matches[1]&tb=1\";s:35:\"wpcode/([^/]+)/page/?([0-9]{1,})/?$\";s:46:\"index.php?wpcode=$matches[1]&paged=$matches[2]\";s:42:\"wpcode/([^/]+)/comment-page-([0-9]{1,})/?$\";s:46:\"index.php?wpcode=$matches[1]&cpage=$matches[2]\";s:31:\"wpcode/([^/]+)(?:/([0-9]+))?/?$\";s:45:\"index.php?wpcode=$matches[1]&page=$matches[2]\";s:23:\"wpcode/[^/]+/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:33:\"wpcode/[^/]+/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:53:\"wpcode/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:48:\"wpcode/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:48:\"wpcode/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:29:\"wpcode/[^/]+/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:52:\"wpcode_type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?wpcode_type=$matches[1]&feed=$matches[2]\";s:47:\"wpcode_type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?wpcode_type=$matches[1]&feed=$matches[2]\";s:28:\"wpcode_type/([^/]+)/embed/?$\";s:44:\"index.php?wpcode_type=$matches[1]&embed=true\";s:40:\"wpcode_type/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?wpcode_type=$matches[1]&paged=$matches[2]\";s:22:\"wpcode_type/([^/]+)/?$\";s:33:\"index.php?wpcode_type=$matches[1]\";s:56:\"wpcode_location/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:54:\"index.php?wpcode_location=$matches[1]&feed=$matches[2]\";s:51:\"wpcode_location/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:54:\"index.php?wpcode_location=$matches[1]&feed=$matches[2]\";s:32:\"wpcode_location/([^/]+)/embed/?$\";s:48:\"index.php?wpcode_location=$matches[1]&embed=true\";s:44:\"wpcode_location/([^/]+)/page/?([0-9]{1,})/?$\";s:55:\"index.php?wpcode_location=$matches[1]&paged=$matches[2]\";s:26:\"wpcode_location/([^/]+)/?$\";s:37:\"index.php?wpcode_location=$matches[1]\";s:52:\"wpcode_tags/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?wpcode_tags=$matches[1]&feed=$matches[2]\";s:47:\"wpcode_tags/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?wpcode_tags=$matches[1]&feed=$matches[2]\";s:28:\"wpcode_tags/([^/]+)/embed/?$\";s:44:\"index.php?wpcode_tags=$matches[1]&embed=true\";s:40:\"wpcode_tags/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?wpcode_tags=$matches[1]&paged=$matches[2]\";s:22:\"wpcode_tags/([^/]+)/?$\";s:33:\"index.php?wpcode_tags=$matches[1]\";s:52:\"(es)/category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:69:\"index.php?lang=$matches[1]&category_name=$matches[2]&feed=$matches[3]\";s:47:\"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:47:\"(es)/category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:69:\"index.php?lang=$matches[1]&category_name=$matches[2]&feed=$matches[3]\";s:42:\"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:28:\"(es)/category/(.+?)/embed/?$\";s:63:\"index.php?lang=$matches[1]&category_name=$matches[2]&embed=true\";s:23:\"category/(.+?)/embed/?$\";s:46:\"index.php?category_name=$matches[1]&embed=true\";s:40:\"(es)/category/(.+?)/page/?([0-9]{1,})/?$\";s:70:\"index.php?lang=$matches[1]&category_name=$matches[2]&paged=$matches[3]\";s:35:\"category/(.+?)/page/?([0-9]{1,})/?$\";s:53:\"index.php?category_name=$matches[1]&paged=$matches[2]\";s:22:\"(es)/category/(.+?)/?$\";s:52:\"index.php?lang=$matches[1]&category_name=$matches[2]\";s:17:\"category/(.+?)/?$\";s:35:\"index.php?category_name=$matches[1]\";s:49:\"(es)/tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&tag=$matches[2]&feed=$matches[3]\";s:44:\"tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:44:\"(es)/tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&tag=$matches[2]&feed=$matches[3]\";s:39:\"tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:25:\"(es)/tag/([^/]+)/embed/?$\";s:53:\"index.php?lang=$matches[1]&tag=$matches[2]&embed=true\";s:20:\"tag/([^/]+)/embed/?$\";s:36:\"index.php?tag=$matches[1]&embed=true\";s:37:\"(es)/tag/([^/]+)/page/?([0-9]{1,})/?$\";s:60:\"index.php?lang=$matches[1]&tag=$matches[2]&paged=$matches[3]\";s:32:\"tag/([^/]+)/page/?([0-9]{1,})/?$\";s:43:\"index.php?tag=$matches[1]&paged=$matches[2]\";s:19:\"(es)/tag/([^/]+)/?$\";s:42:\"index.php?lang=$matches[1]&tag=$matches[2]\";s:14:\"tag/([^/]+)/?$\";s:25:\"index.php?tag=$matches[1]\";s:50:\"(es)/type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&post_format=$matches[2]&feed=$matches[3]\";s:45:\"type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=en&post_format=$matches[1]&feed=$matches[2]\";s:45:\"(es)/type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&post_format=$matches[2]&feed=$matches[3]\";s:40:\"type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=en&post_format=$matches[1]&feed=$matches[2]\";s:26:\"(es)/type/([^/]+)/embed/?$\";s:61:\"index.php?lang=$matches[1]&post_format=$matches[2]&embed=true\";s:21:\"type/([^/]+)/embed/?$\";s:52:\"index.php?lang=en&post_format=$matches[1]&embed=true\";s:38:\"(es)/type/([^/]+)/page/?([0-9]{1,})/?$\";s:68:\"index.php?lang=$matches[1]&post_format=$matches[2]&paged=$matches[3]\";s:33:\"type/([^/]+)/page/?([0-9]{1,})/?$\";s:59:\"index.php?lang=en&post_format=$matches[1]&paged=$matches[2]\";s:20:\"(es)/type/([^/]+)/?$\";s:50:\"index.php?lang=$matches[1]&post_format=$matches[2]\";s:15:\"type/([^/]+)/?$\";s:41:\"index.php?lang=en&post_format=$matches[1]\";s:12:\"robots\\.txt$\";s:18:\"index.php?robots=1\";s:13:\"favicon\\.ico$\";s:19:\"index.php?favicon=1\";s:12:\"sitemap\\.xml\";s:23:\"index.php?sitemap=index\";s:48:\".*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\\.php$\";s:18:\"index.php?feed=old\";s:20:\".*wp-app\\.php(/.*)?$\";s:19:\"index.php?error=403\";s:18:\".*wp-register.php$\";s:23:\"index.php?register=true\";s:37:\"(es)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:44:\"index.php?lang=$matches[1]&&feed=$matches[2]\";s:32:\"feed/(feed|rdf|rss|rss2|atom)/?$\";s:35:\"index.php?lang=en&&feed=$matches[1]\";s:32:\"(es)/(feed|rdf|rss|rss2|atom)/?$\";s:44:\"index.php?lang=$matches[1]&&feed=$matches[2]\";s:27:\"(feed|rdf|rss|rss2|atom)/?$\";s:35:\"index.php?lang=en&&feed=$matches[1]\";s:13:\"(es)/embed/?$\";s:38:\"index.php?lang=$matches[1]&&embed=true\";s:8:\"embed/?$\";s:29:\"index.php?lang=en&&embed=true\";s:25:\"(es)/page/?([0-9]{1,})/?$\";s:45:\"index.php?lang=$matches[1]&&paged=$matches[2]\";s:20:\"page/?([0-9]{1,})/?$\";s:36:\"index.php?lang=en&&paged=$matches[1]\";s:32:\"(es)/comment-page-([0-9]{1,})/?$\";s:55:\"index.php?lang=$matches[1]&&page_id=2&cpage=$matches[2]\";s:27:\"comment-page-([0-9]{1,})/?$\";s:46:\"index.php?lang=en&&page_id=2&cpage=$matches[1]\";s:7:\"(es)/?$\";s:26:\"index.php?lang=$matches[1]\";s:46:\"(es)/comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&&feed=$matches[2]&withcomments=1\";s:41:\"comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?lang=en&&feed=$matches[1]&withcomments=1\";s:41:\"(es)/comments/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&&feed=$matches[2]&withcomments=1\";s:36:\"comments/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?lang=en&&feed=$matches[1]&withcomments=1\";s:22:\"(es)/comments/embed/?$\";s:38:\"index.php?lang=$matches[1]&&embed=true\";s:17:\"comments/embed/?$\";s:29:\"index.php?lang=en&&embed=true\";s:49:\"(es)/search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:57:\"index.php?lang=$matches[1]&s=$matches[2]&feed=$matches[3]\";s:44:\"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:48:\"index.php?lang=en&s=$matches[1]&feed=$matches[2]\";s:44:\"(es)/search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:57:\"index.php?lang=$matches[1]&s=$matches[2]&feed=$matches[3]\";s:39:\"search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:48:\"index.php?lang=en&s=$matches[1]&feed=$matches[2]\";s:25:\"(es)/search/(.+)/embed/?$\";s:51:\"index.php?lang=$matches[1]&s=$matches[2]&embed=true\";s:20:\"search/(.+)/embed/?$\";s:42:\"index.php?lang=en&s=$matches[1]&embed=true\";s:37:\"(es)/search/(.+)/page/?([0-9]{1,})/?$\";s:58:\"index.php?lang=$matches[1]&s=$matches[2]&paged=$matches[3]\";s:32:\"search/(.+)/page/?([0-9]{1,})/?$\";s:49:\"index.php?lang=en&s=$matches[1]&paged=$matches[2]\";s:19:\"(es)/search/(.+)/?$\";s:40:\"index.php?lang=$matches[1]&s=$matches[2]\";s:14:\"search/(.+)/?$\";s:31:\"index.php?lang=en&s=$matches[1]\";s:52:\"(es)/author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&author_name=$matches[2]&feed=$matches[3]\";s:47:\"author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=en&author_name=$matches[1]&feed=$matches[2]\";s:47:\"(es)/author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&author_name=$matches[2]&feed=$matches[3]\";s:42:\"author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=en&author_name=$matches[1]&feed=$matches[2]\";s:28:\"(es)/author/([^/]+)/embed/?$\";s:61:\"index.php?lang=$matches[1]&author_name=$matches[2]&embed=true\";s:23:\"author/([^/]+)/embed/?$\";s:52:\"index.php?lang=en&author_name=$matches[1]&embed=true\";s:40:\"(es)/author/([^/]+)/page/?([0-9]{1,})/?$\";s:68:\"index.php?lang=$matches[1]&author_name=$matches[2]&paged=$matches[3]\";s:35:\"author/([^/]+)/page/?([0-9]{1,})/?$\";s:59:\"index.php?lang=en&author_name=$matches[1]&paged=$matches[2]\";s:22:\"(es)/author/([^/]+)/?$\";s:50:\"index.php?lang=$matches[1]&author_name=$matches[2]\";s:17:\"author/([^/]+)/?$\";s:41:\"index.php?lang=en&author_name=$matches[1]\";s:74:\"(es)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:97:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[5]\";s:69:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:88:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:69:\"(es)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:97:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[5]\";s:64:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:88:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:50:\"(es)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$\";s:91:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&embed=true\";s:45:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$\";s:82:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&embed=true\";s:62:\"(es)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:98:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]\";s:57:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:89:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]\";s:44:\"(es)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:80:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]\";s:39:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:71:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]\";s:61:\"(es)/([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:81:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&feed=$matches[4]\";s:56:\"([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:72:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:56:\"(es)/([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:81:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&feed=$matches[4]\";s:51:\"([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:72:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:37:\"(es)/([0-9]{4})/([0-9]{1,2})/embed/?$\";s:75:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&embed=true\";s:32:\"([0-9]{4})/([0-9]{1,2})/embed/?$\";s:66:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&embed=true\";s:49:\"(es)/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:82:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]\";s:44:\"([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:73:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]\";s:31:\"(es)/([0-9]{4})/([0-9]{1,2})/?$\";s:64:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]\";s:26:\"([0-9]{4})/([0-9]{1,2})/?$\";s:55:\"index.php?lang=en&year=$matches[1]&monthnum=$matches[2]\";s:48:\"(es)/([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&year=$matches[2]&feed=$matches[3]\";s:43:\"([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:51:\"index.php?lang=en&year=$matches[1]&feed=$matches[2]\";s:43:\"(es)/([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&year=$matches[2]&feed=$matches[3]\";s:38:\"([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:51:\"index.php?lang=en&year=$matches[1]&feed=$matches[2]\";s:24:\"(es)/([0-9]{4})/embed/?$\";s:54:\"index.php?lang=$matches[1]&year=$matches[2]&embed=true\";s:19:\"([0-9]{4})/embed/?$\";s:45:\"index.php?lang=en&year=$matches[1]&embed=true\";s:36:\"(es)/([0-9]{4})/page/?([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&year=$matches[2]&paged=$matches[3]\";s:31:\"([0-9]{4})/page/?([0-9]{1,})/?$\";s:52:\"index.php?lang=en&year=$matches[1]&paged=$matches[2]\";s:18:\"(es)/([0-9]{4})/?$\";s:43:\"index.php?lang=$matches[1]&year=$matches[2]\";s:13:\"([0-9]{4})/?$\";s:34:\"index.php?lang=en&year=$matches[1]\";s:32:\"(es)/.?.+?/attachment/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:27:\".?.+?/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:42:\"(es)/.?.+?/attachment/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:37:\".?.+?/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:62:\"(es)/.?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:57:\".?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(es)/.?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:52:\".?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(es)/.?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:52:\".?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:38:\"(es)/.?.+?/attachment/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:33:\".?.+?/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:21:\"(es)/(.?.+?)/embed/?$\";s:58:\"index.php?lang=$matches[1]&pagename=$matches[2]&embed=true\";s:16:\"(.?.+?)/embed/?$\";s:41:\"index.php?pagename=$matches[1]&embed=true\";s:25:\"(es)/(.?.+?)/trackback/?$\";s:52:\"index.php?lang=$matches[1]&pagename=$matches[2]&tb=1\";s:20:\"(.?.+?)/trackback/?$\";s:35:\"index.php?pagename=$matches[1]&tb=1\";s:45:\"(es)/(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&feed=$matches[3]\";s:40:\"(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:40:\"(es)/(.?.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&feed=$matches[3]\";s:35:\"(.?.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:33:\"(es)/(.?.+?)/page/?([0-9]{1,})/?$\";s:65:\"index.php?lang=$matches[1]&pagename=$matches[2]&paged=$matches[3]\";s:28:\"(.?.+?)/page/?([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&paged=$matches[2]\";s:40:\"(es)/(.?.+?)/comment-page-([0-9]{1,})/?$\";s:65:\"index.php?lang=$matches[1]&pagename=$matches[2]&cpage=$matches[3]\";s:35:\"(.?.+?)/comment-page-([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&cpage=$matches[2]\";s:29:\"(es)/(.?.+?)(?:/([0-9]+))?/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&page=$matches[3]\";s:24:\"(.?.+?)(?:/([0-9]+))?/?$\";s:47:\"index.php?pagename=$matches[1]&page=$matches[2]\";s:32:\"(es)/[^/]+/attachment/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:27:\"[^/]+/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:42:\"(es)/[^/]+/attachment/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:37:\"[^/]+/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:62:\"(es)/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:57:\"[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(es)/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:52:\"[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(es)/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:52:\"[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:38:\"(es)/[^/]+/attachment/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:33:\"[^/]+/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:21:\"(es)/([^/]+)/embed/?$\";s:54:\"index.php?lang=$matches[1]&name=$matches[2]&embed=true\";s:16:\"([^/]+)/embed/?$\";s:37:\"index.php?name=$matches[1]&embed=true\";s:25:\"(es)/([^/]+)/trackback/?$\";s:48:\"index.php?lang=$matches[1]&name=$matches[2]&tb=1\";s:20:\"([^/]+)/trackback/?$\";s:31:\"index.php?name=$matches[1]&tb=1\";s:45:\"(es)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&feed=$matches[3]\";s:40:\"([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:40:\"(es)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&feed=$matches[3]\";s:35:\"([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:33:\"(es)/([^/]+)/page/?([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&name=$matches[2]&paged=$matches[3]\";s:28:\"([^/]+)/page/?([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&paged=$matches[2]\";s:40:\"(es)/([^/]+)/comment-page-([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&name=$matches[2]&cpage=$matches[3]\";s:35:\"([^/]+)/comment-page-([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&cpage=$matches[2]\";s:29:\"(es)/([^/]+)(?:/([0-9]+))?/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&page=$matches[3]\";s:24:\"([^/]+)(?:/([0-9]+))?/?$\";s:43:\"index.php?name=$matches[1]&page=$matches[2]\";s:21:\"(es)/[^/]+/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:16:\"[^/]+/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:31:\"(es)/[^/]+/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:26:\"[^/]+/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:51:\"(es)/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:46:\"[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:46:\"(es)/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:41:\"[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:46:\"(es)/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:41:\"[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:27:\"(es)/[^/]+/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:22:\"[^/]+/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";}', 'auto'), +(2141, 'category_children', 'a:0:{}', 'auto'), +(2184, '_transient_pll_translated_slugs', 'a:8:{s:8:\"category\";a:2:{s:4:\"slug\";s:8:\"category\";s:12:\"translations\";a:2:{s:2:\"en\";s:8:\"category\";s:2:\"es\";s:8:\"category\";}}s:8:\"post_tag\";a:2:{s:4:\"slug\";s:3:\"tag\";s:12:\"translations\";a:2:{s:2:\"en\";s:3:\"tag\";s:2:\"es\";s:3:\"tag\";}}s:11:\"post_format\";a:2:{s:4:\"slug\";s:4:\"type\";s:12:\"translations\";a:2:{s:2:\"en\";s:4:\"type\";s:2:\"es\";s:4:\"type\";}}s:6:\"author\";a:2:{s:4:\"slug\";s:6:\"author\";s:12:\"translations\";a:2:{s:2:\"en\";s:6:\"author\";s:2:\"es\";s:6:\"author\";}}s:6:\"search\";a:2:{s:4:\"slug\";s:6:\"search\";s:12:\"translations\";a:2:{s:2:\"en\";s:6:\"search\";s:2:\"es\";s:6:\"search\";}}s:10:\"attachment\";a:2:{s:4:\"slug\";s:10:\"attachment\";s:12:\"translations\";a:2:{s:2:\"en\";s:10:\"attachment\";s:2:\"es\";s:10:\"attachment\";}}s:5:\"paged\";a:2:{s:4:\"slug\";s:4:\"page\";s:12:\"translations\";a:2:{s:2:\"en\";s:4:\"page\";s:2:\"es\";s:4:\"page\";}}s:5:\"front\";a:2:{s:4:\"slug\";s:0:\"\";s:12:\"translations\";a:2:{s:2:\"en\";s:0:\"\";s:2:\"es\";s:0:\"\";}}}', 'on'), +(2187, '_site_transient_update_themes', 'O:8:\"stdClass\":5:{s:12:\"last_checked\";i:1791817533;s:7:\"checked\";a:1:{s:8:\"xmartica\";s:5:\"1.5.1\";}s:8:\"response\";a:0:{}s:9:\"no_update\";a:0:{}s:12:\"translations\";a:0:{}}', 'off'), +(2299, 'nav_menu_options', 'a:2:{i:0;b:0;s:8:\"auto_add\";a:0:{}}', 'off'), +(2343, '_site_transient_timeout_browser_8f5941452f094a396667f79f445c8177', '1792193473', 'off'), +(2344, '_site_transient_browser_8f5941452f094a396667f79f445c8177', 'a:10:{s:4:\"name\";s:7:\"Firefox\";s:7:\"version\";s:5:\"157.0\";s:8:\"platform\";s:9:\"Macintosh\";s:10:\"update_url\";s:32:\"https://www.mozilla.org/firefox/\";s:7:\"img_src\";s:44:\"http://s.w.org/images/browsers/firefox.png?1\";s:11:\"img_src_ssl\";s:45:\"https://s.w.org/images/browsers/firefox.png?1\";s:15:\"current_version\";s:2:\"56\";s:7:\"upgrade\";b:0;s:8:\"insecure\";b:0;s:6:\"mobile\";b:0;}', 'off'), +(2413, '_transient_pll_languages_list', 'a:2:{i:0;a:22:{s:4:\"name\";s:7:\"English\";s:4:\"slug\";s:2:\"en\";s:10:\"term_group\";i:0;s:7:\"term_id\";i:30;s:6:\"locale\";s:5:\"en_US\";s:6:\"is_rtl\";i:0;s:3:\"w3c\";s:5:\"en-US\";s:8:\"facebook\";s:5:\"en_US\";s:8:\"home_url\";s:21:\"https://xmartica.xyz/\";s:10:\"search_url\";s:21:\"https://xmartica.xyz/\";s:4:\"host\";N;s:13:\"page_on_front\";i:2;s:14:\"page_for_posts\";i:0;s:9:\"flag_code\";s:2:\"us\";s:8:\"flag_url\";s:90:\"https://xmartica.xyz/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/us.png\";s:4:\"flag\";s:576:\"\"English\"\";s:15:\"custom_flag_url\";s:0:\"\";s:11:\"custom_flag\";s:0:\"\";s:6:\"active\";b:1;s:9:\"fallbacks\";a:0:{}s:10:\"is_default\";b:1;s:10:\"term_props\";a:2:{s:8:\"language\";a:3:{s:7:\"term_id\";i:30;s:16:\"term_taxonomy_id\";i:30;s:5:\"count\";i:10;}s:13:\"term_language\";a:3:{s:7:\"term_id\";i:31;s:16:\"term_taxonomy_id\";i:31;s:5:\"count\";i:2;}}}i:1;a:22:{s:4:\"name\";s:8:\"Español\";s:4:\"slug\";s:2:\"es\";s:10:\"term_group\";i:0;s:7:\"term_id\";i:35;s:6:\"locale\";s:5:\"es_MX\";s:6:\"is_rtl\";i:0;s:3:\"w3c\";s:5:\"es-MX\";s:8:\"facebook\";s:5:\"es_MX\";s:8:\"home_url\";s:30:\"https://xmartica.xyz/es/inicio\";s:10:\"search_url\";s:24:\"https://xmartica.xyz/es/\";s:4:\"host\";N;s:13:\"page_on_front\";i:184;s:14:\"page_for_posts\";i:0;s:9:\"flag_code\";s:2:\"mx\";s:8:\"flag_url\";s:90:\"https://xmartica.xyz/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mx.png\";s:4:\"flag\";s:513:\"\"Español\"\";s:15:\"custom_flag_url\";s:0:\"\";s:11:\"custom_flag\";s:0:\"\";s:6:\"active\";b:1;s:9:\"fallbacks\";a:0:{}s:10:\"is_default\";b:0;s:10:\"term_props\";a:2:{s:8:\"language\";a:3:{s:7:\"term_id\";i:35;s:16:\"term_taxonomy_id\";i:35;s:5:\"count\";i:8;}s:13:\"term_language\";a:3:{s:7:\"term_id\";i:36;s:16:\"term_taxonomy_id\";i:36;s:5:\"count\";i:1;}}}}', 'on'), +(2622, '_transient_timeout_jooosi_fon_scanned_builders_1.1.4', '1791821200', 'off'), +(2623, '_transient_jooosi_fon_scanned_builders_1.1.4', 'a:7:{s:7:\"kadence\";a:3:{s:4:\"name\";s:7:\"kadence\";s:9:\"file_path\";s:95:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Kadence/Main.php\";s:10:\"class_name\";s:30:\"JooosiFon\\Builder\\Kadence\\Main\";}s:14:\"generate-press\";a:3:{s:4:\"name\";s:14:\"generate-press\";s:9:\"file_path\";s:101:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/GeneratePress/Main.php\";s:10:\"class_name\";s:36:\"JooosiFon\\Builder\\GeneratePress\\Main\";}s:10:\"builderius\";a:3:{s:4:\"name\";s:10:\"builderius\";s:9:\"file_path\";s:98:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Builderius/Main.php\";s:10:\"class_name\";s:33:\"JooosiFon\\Builder\\Builderius\\Main\";}s:14:\"classic-editor\";a:3:{s:4:\"name\";s:14:\"classic-editor\";s:9:\"file_path\";s:101:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/ClassicEditor/Main.php\";s:10:\"class_name\";s:36:\"JooosiFon\\Builder\\ClassicEditor\\Main\";}s:9:\"gutenberg\";a:3:{s:4:\"name\";s:9:\"gutenberg\";s:9:\"file_path\";s:97:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Gutenberg/Main.php\";s:10:\"class_name\";s:32:\"JooosiFon\\Builder\\Gutenberg\\Main\";}s:9:\"elementor\";a:3:{s:4:\"name\";s:9:\"elementor\";s:9:\"file_path\";s:97:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Elementor/Main.php\";s:10:\"class_name\";s:32:\"JooosiFon\\Builder\\Elementor\\Main\";}s:8:\"pinegrow\";a:3:{s:4:\"name\";s:8:\"pinegrow\";s:9:\"file_path\";s:96:\"/Applications/MAMP/htdocs/xmartica/wp-content/plugins/yabe-webfont/src/Builder/Pinegrow/Main.php\";s:10:\"class_name\";s:31:\"JooosiFon\\Builder\\Pinegrow\\Main\";}}', 'off'), +(2624, 'rank_math_pro_notice_added', '1', 'off'), +(2639, '_site_transient_timeout_feed_mod_203ddaeab844647ccdc6525a1073e4d6', '1791860695', 'off'), +(2640, '_site_transient_feed_mod_203ddaeab844647ccdc6525a1073e4d6', '1791817495', 'off'), +(2643, '_site_transient_timeout_feed_mod_d117b5738fbd35bd8c0391cda1f2b5d9', '1791860695', 'off'), +(2644, '_site_transient_feed_mod_d117b5738fbd35bd8c0391cda1f2b5d9', '1791817495', 'off'), +(2725, '_site_transient_timeout_wp_theme_files_patterns-4e297246f76a862cb5b45cef9a91a26c', '1791819284', 'off'), +(2726, '_site_transient_wp_theme_files_patterns-4e297246f76a862cb5b45cef9a91a26c', 'a:2:{s:7:\"version\";s:5:\"1.5.1\";s:8:\"patterns\";a:0:{}}', 'off'), +(2728, '_site_transient_timeout_theme_roots', '1791819285', 'off'), +(2729, '_site_transient_theme_roots', 'a:1:{s:8:\"xmartica\";s:7:\"/themes\";}', 'off'), +(2731, '_site_transient_timeout_community-events-1aecf33ab8525ff212ebdffbb438372e', '1791860690', 'off'), +(2732, '_site_transient_community-events-1aecf33ab8525ff212ebdffbb438372e', 'a:4:{s:9:\"sandboxed\";b:0;s:5:\"error\";N;s:8:\"location\";a:1:{s:2:\"ip\";s:9:\"127.0.0.0\";}s:6:\"events\";a:0:{}}', 'off'), +(2733, '_transient_timeout_rank_math_feed_posts_v2', '1791860692', 'off'), +(2734, '_transient_rank_math_feed_posts_v2', 'a:4:{i:0;a:5:{s:5:\"title\";a:1:{s:8:\"rendered\";s:51:\"Content AI 2.0: Introducing AI SEO Inside WordPress\";}s:4:\"date\";s:19:\"2026-10-12 14:58:20\";s:4:\"link\";s:62:\"https://rankmath.com/blog/introducing-supercharged-content-ai/\";s:12:\"custom_label\";s:0:\"\";s:9:\"condition\";s:0:\"\";}i:1;a:3:{s:5:\"title\";a:1:{s:8:\"rendered\";s:57:\"Free vs Paid WordPress Plugins: Which Should You Choose?\";}s:4:\"date\";s:19:\"2026-09-28 07:13:30\";s:4:\"link\";s:57:\"https://rankmath.com/blog/free-vs-paid-wordpress-plugins/\";}i:2;a:3:{s:5:\"title\";a:1:{s:8:\"rendered\";s:40:\"7 Best WordPress Site Management Plugins\";}s:4:\"date\";s:19:\"2026-09-15 04:05:37\";s:4:\"link\";s:60:\"https://rankmath.com/blog/wordpress-site-management-plugins/\";}i:3;a:3:{s:5:\"title\";a:1:{s:8:\"rendered\";s:64:\"The Best White Label SEO Tools to Save Time and Win More Clients\";}s:4:\"date\";s:19:\"2026-09-08 06:03:07\";s:4:\"link\";s:48:\"https://rankmath.com/blog/white-label-seo-tools/\";}}', 'off'), +(2735, '_site_transient_timeout_feed_203ddaeab844647ccdc6525a1073e4d6', '1791860695', 'off'); +INSERT INTO `xm_aca_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES +(2736, '_site_transient_feed_203ddaeab844647ccdc6525a1073e4d6', 'a:6:{s:5:\"child\";a:1:{s:0:\"\";a:1:{s:3:\"rss\";a:1:{i:0;a:6:{s:4:\"data\";s:3:\"\n\n\n\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:7:\"version\";s:3:\"2.0\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:1:{s:7:\"channel\";a:1:{i:0;a:6:{s:4:\"data\";s:52:\"\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:4:{s:0:\"\";a:8:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:41:\"Blog – WordPress.org Español (México)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:27:\"https://es-mx.wordpress.org\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"WordPress en Español de México\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:13:\"lastBuildDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 18 Jul 2024 14:05:49 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"language\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"es\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:9:\"generator\";a:1:{i:0;a:5:{s:4:\"data\";s:40:\"https://wordpress.org/?v=7.2-alpha-64309\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:5:\"image\";a:1:{i:0;a:6:{s:4:\"data\";s:11:\"\n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:5:{s:3:\"url\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"https://s.w.org/favicon.ico?2\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:41:\"Blog – WordPress.org Español (México)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:27:\"https://es-mx.wordpress.org\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:5:\"width\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"32\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:6:\"height\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"32\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}s:4:\"item\";a:10:{i:0;a:6:{s:4:\"data\";s:73:\"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:26:\"WordPress 6.6 “Dorsey”\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"https://es-mx.wordpress.org/2024/07/18/wordpress-6-6-dorsey/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"https://es-mx.wordpress.org/2024/07/18/wordpress-6-6-dorsey/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 18 Jul 2024 14:05:42 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Uncategorized\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1037\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:339:\"Saluda a WordPress 6.6 “Dorsey”, que lleva el nombre del legendario líder de la Big Band estadounidense, Tommy Dorsey. Famoso por su trombón de tono suave y sus composiciones, la música de Dorsey cautivó al público con su profundidad emocional y su energía vibrante. Deja que tu corazón se balancee y cante al ritmo de […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:61799:\"\n
\"\"
\n\n\n\n

Saluda a WordPress 6.6 “Dorsey”, que lleva el nombre del legendario líder de la Big Band estadounidense, Tommy Dorsey. Famoso por su trombón de tono suave y sus composiciones, la música de Dorsey cautivó al público con su profundidad emocional y su energía vibrante.

\n\n\n\n

Deja que tu corazón se balancee y cante al ritmo de las profundas notas de metal del sonido de la Big Band de Dorsey mientras exploras las nuevas características y mejoras de WordPress 6.6.

\n\n\n\n\n\n\n\n

¡Hola, 6.6!

\n\n\n\n

WordPress 6.6 cumple con la promesa de una mejor web al incorporar estilo, delicadeza y un conjunto de posibilidades creativas a la experiencia de creación de sitios. Esta versión te ayuda a hacer más con facilidad, poniendo herramientas mejoradas a tu alcance y dándote un poder sin precedentes detrás de escena. Encontrarás más formas de crear elementos de diseño hermosos y coherentes en todo tu sitio, un nuevo diseño para vistas previas rápidas de páginas en el Editor del sitio y la seguridad de las reversiones automáticas para actualizaciones automáticas de complementos fallidas, entre muchas otras características destacadas.

\n\n\n\n

Además de las nuevas características, “Dorsey” continúa brindando las mejoras de rendimiento y accesibilidad que puedes esperar de cada versión de WordPress. Explora lo que WordPress 6.6 tiene para ofrecer y prepárate para dejar que sus características lleven tus sitios a nuevas alturas.

\n\n\n\n\n\n\n\n

¿Qué hay dentro?

\n\n\n\n

Agrega más opciones de diseño a los temas de bloques

\n\n\n\n

Crea conjuntos de colores o fuentes para multiplicar las combinaciones de diseño en un tema. Estos conjuntos ofrecen posibilidades de diseño más contenidas, lo que permite una variedad visual dentro de las pautas de estilo más amplias del sitio.

\n\n\n\n
\"\"
\n\n\n\n

Simplifica tu flujo de trabajo con un nuevo diseño para las páginas en el Editor del sitio

\n\n\n\n

Ve todas tus páginas y una vista previa de cualquier página seleccionada con el nuevo diseño en paralelo en el Editor del sitio.

\n\n\n\n
\"\"
\n\n\n\n

Actualiza automáticamente tus plugins con tranquilidad

\n\n\n\n

Disfruta de la comodidad de las actualizaciones automáticas de plugins con la seguridad de poder revertirlas si algo sale mal, lo que le ofrece a tu sitio un nuevo nivel de seguridad, una funcionalidad mejorada a medida que esté disponible y casi sin tiempo ni ancho de banda para que esto suceda.

\n\n\n\n
\"\"
\n\n\n\n

Personaliza el contenido en patrones sincronizados

\n\n\n\n

Realiza cambios en el contenido en cada instancia de un patrón sincronizado manteniendo un estilo uniforme en todos ellos. Establece estas modificaciones para los bloques de encabezado, párrafo, botón e imagen cuando se colocan en un patrón sincronizado.

\n\n\n\n
\"\"
\n\n\n\n

Rendimiento

\n\n\n\n

WordPress 6.6 incluye actualizaciones importantes, como la eliminación de llamadas WP_Theme_JSON redundantes, la desactivación de la carga automática para opciones grandes y la eliminación de dependencias polyfill innecesarias. Otras novedades incluyen la carga diferida de incrustaciones de entrads, una nueva directiva data-wp-on-async y plantillas en el editor que se cargan aproximadamente un 35 % más rápido en general.

\n\n\n\n

Accesibilidad

\n\n\n\n

Esta versión incluye 58 correcciones y mejoras de accesibilidad. Estas se centran en aspectos fundamentales de la experiencia de WordPress, en particular el componente de vistas de datos que impulsa la nueva experiencia de edición del sitio y áreas como el Insertador, que proporciona una forma clave de interactuar con bloques y patrones.

\n\n\n\n

Y mucho más

\n\n\n\n

Visita la presentación de características para obtener una descripción general completa de todas las nuevas características y mejoras en WordPress 6.6.

\n\n\n\n\n\n\n\n

Más información sobre WordPress 6.6

\n\n\n\n

Explora Learn WordPress para obtener videos instructivos rápidos, talleres en línea y otros recursos gratuitos para mejorar tus conocimientos y habilidades sobre WordPress.

\n\n\n\n

La Guía práctica de WordPress 6.6 contiene información técnica detallada y notas para desarrolladores que te ayudarán a desarrollar con WordPress y aprovechar al máximo esta versión. No olvides suscribirte al Blog para desarrolladores para obtener actualizaciones, tutoriales y otro contenido útil de WordPress para desarrolladores.

\n\n\n\n

Para obtener información sobre la instalación, los cambios de archivos, las correcciones y otras actualizaciones, lee las notas de la versión 6.6.

\n\n\n\n

El equipo de la versión 6.6

\n\n\n\n

Cada versión llega a ti de la mano de un equipo dedicado de colaboradores entusiastas que ayudan a mantener las cosas encaminadas y avanzando sin problemas. El equipo que ha liderado la versión 6.6 es un grupo multifuncional de colaboradores que siempre están listos para defender ideas, eliminar obstáculos y resolver problemas.

\n\n\n\n\n\n\n\n

Gracias a los colaboradores

\n\n\n\n

La misión de WordPress es democratizar la publicación y encarnar las libertades que ofrece el código abierto. Una comunidad global y diversa de personas que colaboran para fortalecer el software respalda este esfuerzo.

\n\n\n\n

WordPress 6.6 refleja los esfuerzos incansables y la pasión de más de 630 colaboradores en al menos 51 países. ¡Esta versión también dio la bienvenida a más de 150 colaboradores primerizos!

\n\n\n\n

Su colaboración generó más de 1,900 mejoras y correcciones, lo que garantizó una versión estable para todos, un testimonio del poder y la capacidad de la comunidad de código abierto de WordPress.

\n\n\n\n

!Benni · 1naveengiri · Aaron Jorbin · Aaron Robertshaw · aatanasov · abditsori · Abha Thakor · abhi3315 · Abhijit Rakas · abitofmind · Adam Harley (Kawauso) · Adam Silverstein · Adel Tahri · adrianduffell · Aezaz Shekh · Ahmed Kabir Chaion · ajfleming · Ajit Bohra · Akash Dhawade · Aki Hamano · Akira Tachibana · akmelias · Alan Fuller · Albert Juhé Lluveras · alesflex · Alex Concha · Alex Kozack · Alex Lende · Alex Stine · Alexandre Buffet · alexminza · allilevine · Alvaro Gómez · amanias1977 · Amber Hinds · Amir Abbas · amisiewicz · Amit Raj · Anamarija Papić · Anders Norén · Andre Ribeiro · Andrea Fercia · Andrea Roenning · Andrei Draganescu · Andrei Lupu · Andrew Hayward · Andrew Hutchings · Andrew Nacin · Andrew Ozz · Andrew Serong · André Maneiro · Andy Fragen · Aneesh Devasthale · Angela Jin · Anil Vaza · Ankit K Gupta · Ankit Panchal · Anne McCarthy · Anthony Burchell · Anton Vlasenko · Ari Stathopoulos · Artemio Morales · Arthur Chu · Artur Piszek · Arun Sharma · Arunas Liuiza · Ashesh Magar · Asiqur Rahman · Asish Chandra Mohon · Aslam Doctor · asmittle · Aurooba Ahmed · Ayesh Karunaratne · Balu B · bangank36 · Bart Kalisz · Beatriz Fialho · Beau Lebens · Ben Dwyer · Ben Keith · Ben Ritner – Kadence WP · Benjamin Pick · Benjamin Zekavica · benjpw · bernhard-reiter · Birgit Pauli-Haack · bissy · Bjarne Oldrup · Blackbam · Blockify · bnewboldbsky · Brad Jorsch · Brennan Goewert · Brian Alexander · Brian Coords · Brian Gardner · Brian Gosnell · Brian Haas · Bridget Willard · Brooke · Bruno Freiberger Garcia · burnuser · Caleb Burks · Candy · Carlos Bravo · Carlos G. P. · Carolina Nymark · cbirdsong · Chad Chadbourne · Charlie Merland · Chloe Bringmann · Chouby · Chris Reynolds · chrisdotdotdot · Christopher · Colin Stewart · ColinD · colle · comecaramelos · Constantine Vasilyev · CookiesForDevo · Corey McKrill · Craig Francis · crazytonyli · Cullen Whitmore · Curdin Krummenacher · cyrus11 · Dale du Preez · Damon Cook · Damon Cook · Dan Soschin · Dani Guardiola · Daniel Richards · darerodz · Darren Ethier (nerrad) · Darshit Rajyaguru · dav4 · Dave Page · David · David A. Kennedy · David Baumwald · David Biňovec · David Bowman · David Calhoun · David Herrera · David Jensen · David Levine · David Rozando · David Smith · davideferre · De’Yonté W. · Dean Sas · Deep Patel · Deepak Vijayan · Denis Žoljom · Dennis Snell · Derek Blank · Devin Curtis · Dharmesh Patel · Dhrumil Kumbhani · Dhruval Shah · dhruvang21 · dhruvkb · DiedeExterkate · Dilip Bheda · Dion Hulse · DJ · DjZoNe · Dominik Schilling · Drew Jaynes · drrxbracho · Earle Davies · Elena Brescacin · Ella van Durpe · Emmanuel Hesry · Enej Bajgorić · Eneko Garrido · enodekciw · Enrico Battocchi · Enrico Sorcinelli · Erik · Estela Rueda · evanltd · Fabian Kägy · Fabian Todt · Faisal Alvi · Fanly · Farhan Ahmed · Felix Arntz · Flavia Bernárdez Rodríguez · Florian TIAR · Franz Josef Kaiser · Gabor Lippert · Gal Baras · Garth Mortensen · Gary Jones · George Mamadashvili · George Stephanis · Gerardo Pacheco · Glen Davies · Glenn Ansley · Grant M. Kinney · Greg Ziółkowski · Guido Scialfa · Héctor Prieto · hakre · hanneslsm · Hans-Gerd Gerhards · Harit Panchal · Harsh Gajipara · Haz · heinvv · HelgaTheViking · Hinnerk Altenburg · Hit Bhalodia · Hitendra Chopda · humanify · huubl · Huzaifa Al Mesbah · Ian Belanger · ignatiusjeroe · Imran · inwerpsel · Ipstenu (Mika Epstein) · Isabel Brison · IT Path Solutions · ivanottinger · Jaap Weijland · Jack Stevens · jaclync · James Koster · James Wesley Goedert · Jamie Speller · Jan Boddez · Jansen Tolle · janthiel · Jarda Snajdr · Jarek Mazurczak · Jaroslav “Dero” Polakovic · Jason Adams · Jason Crist · Jason Johnston · Jason LeMahieu (MadtownLems) · Javier Casares · jayanthparthsarathy · jdekhtiar · Jean-Baptiste Audras · Jeff Chi · Jeff Ong · Jeffrey Paul · jeflopo · Jenny Dupuy · Jeremy Felt · Jeremy Herve · Jeremy Pry · Jerry Jones · Jesús Amieiro · Jess · Jessica Lyschik · jhned · Jigar Bhanushali · Jip Moors · JiveDig · Joe Dolson · Joe McGill · Joen Asmussen · Johannes Jülg · John Blackbourn · John Espiritu · John Godley · John Hooks · John James Jacoby · Jon Surrell · jon092 · Jonathan · Jonathan Bossenger · Jonathan Desrosiers · Joni Erkkilä · Jonny Harris · jordesign · Jorge Costa · Jose Varghese · Josep Morán · Joseph Scott · Joshua Goode · Jossnaz · Juan Aldasoro · JuanMa Garrido · jules · Julie Moynat · Juliette Reinders Folmer · Julio Potier · Justin Tadlock · justnorris · Jyolsna J E · K. Adam White · KafleG · Kai Hao · Kajal Gohel · kamran8176 · Kapil Paul · Karlijn Bok · Karol Manijak · Karthik Thayyil · Kathryn Presner · Kellen Mace · Kelly Choyce-Dwan · keoshi · Kevin Hoffman · Khokan Sardar · killua99 · Kira Schroder · kitchin · Kite · Kjell Reigstad · kkmuffme · kmvan · Konstantin Kovshenin · kristastevens · kristenfisher427 · Krupa Nanda · Krupal Panchal · Kushang Tailor · kyleak · Lae · Lanre Smith · Lars Gersmann · Laura Byrne · laurelfulford · Lauren · Lauren Stein · Laurent Naudier · leemon · Lena Morita · Leonidas Milosis · Linkon Miyan · liviopv · Louis Wolmarans · Lovekesh Kumar · luboslives · Luigi Teschio · Luis · Luis Molina (interdevel) · luisherranz · Lyon Müller · Márcio Duarte · Madhu Dollu · Maggie Cabrera · Mai · Makdia Hussain · manfcarlo · Manoj Maharrshi · Marc · Marc Armengou · Marcelo de Moraes Serpa · Marco Ciampini · Marco Pereirinha · marherumr · Marie Comet · Marin Atanasov · Mario Santos · Marius L. J. · Mark Howells-Mead · Mark Jaquith · Mark Szymanski · Mark Uraine · Martijn van der Klis · Mary Baum · Mat Lipe · Mathieu Viet · Matias Benedetto · Matias Ventura · Matt Cromwell · Matt Medeiros · Matt Mullenweg · Matt Sherman · Md Abul Bashar · Md Sahadat Husain · Md Tofajjal Hossen · MD.NESAR MRIDHA · Meet Makadia · Meet Mehta · megane9988 · Meher Bala · Michael James Ilett · Michal Czaplinski · Miguel Fonseca · miguelsansegundo · Mihai Joldis · Miikka · Mikael Korpela · Mike Henderson · Mike McAlister · Mikey Binns · Minal Diwan · Miriam Schwab · miya · mkismy · Mohit Dadhich · Monzur Alam · Morais Junior · mrwweb · Muhibul Haque · mujuonly · Mukesh Panchal · Musannif Zahir · Mustaque Ahmed · myhro · mykolashlyakhtun · Mykyta Synelnikov · Nadir Seghir · Naeem Haque · Namith Jawahar · Narendra Sishodiya · Naresh Bheda · Nate Gay · Nazmul Hasan Robin · Nazmul Hosen · Nick Diego · nicmare · Nico · Nicolas Tatarchenko · Nicole Furlan · Nicole Paschen Caylor · nicomollet · nidhidhandhukiya · Niels Lange · Nihar Ranjan Das · Nik Tsekouras · Nilo Velez · Nirav Sherasiya · Nithin John · Nithin SreeRaj · nkeller15 · nosilver4u · obliviousharmony · Ohia ᚛ᚈᚐᚂᚐᚋᚆ᚜ · okat · Old account · Olga Gleckler · Oliver Campion · Oliver Schmid · OllieJones · Omar Alshaker · Paal Joachim Romdahl · Pablo Honey · Paolo L. Scala · Pascal Birchler · Patricia BT · Paul Bearne · Paul de Wouters · Paul Kevan · Paul Wilde · Pavan Patil · pavelevap · Pedro Mendonça · peiche · Per Søderlind · perryrylance · Peter Rubin · Peter Wilson · petitphp · Phi Phan · Pieterjan Deneys · Pinar · Pitam Dey · pkuliga · Pooja N Muchandikar · Povilas Staškus · Praful Patel · Pranit Dugad · Prasad Karmalkar · Prashant Baldha · Pratik Londhe · Prem Tiwari · Presskopp · presstoke · printsachen1 · Priyanshii Vijayvargiya · Prottoy Sarkar Argho · QuietNoise · Rachel Baker · Rafael Galani · Rafał Całka · Rajan Lama · Rajin Sharwar · Ramon Ahnert · Ramon Corrales · Ramon James · Ravikumar Patel · Ravinder Kumar · Rejaul Alom Khan · Remkus de Vries · Remy Perona · renishsurani · retrofox · Riad Benguella · Rich Collier · Rich Tabor · Richard Korthuis · richardevs · Rishi Mehta · Robert Anderson · Robert Ghetau · Robin Cornett · rodionov201 · Rodrigo Arias · Rodrigo Primo · Roger · Rolf Siebers · Roy Tanck · Ryan McCue · Ryan Urban · Ryan Welcher · Sébastien SERRE · Sérgio Gomes · Sören Wünsch · s0what · Sagar Prajapati · sahilthakur02 · Sakib Mohammed · Sal Ferrarello · Sam Berry · Sam Brockway · samiamnot · Sampat Viral · Samuel Rüegger · Samuel Sidler · Sanne van der Meulen · Sarah Norris · Sarkar Ripon · Sascha Metz · Saulius Vikerta · Saxon Fletcher · Saxon Fletcher · scribu · script2see · Sean Fisher · Sergey Biryukov · Seth Miller · Seth Rubenstein · Shail Mehta · Shalin Shah · Shannon Smith · shaunandrews · sheulyshila · Shital Marakana · Shiva Poudel · Shiva Shanker Bhatta · Shreyash Srivastava · Shubham Kumar Bansal · Shuvo Mohajan · Siddharth Thevaril · siliconforks · Simone Maranzana · Siobhan · sirzooro · SJNBham · Sneha Patil · Spencer Finnell · Stefano Minoia · Stephen Bernhardt · Stephen Brook · Stephen Edgar · stephenmiracle · Steve Jones · steveblum · strangehill · strarsis · Sudip Dadhaniya · Sumit Bagthariya · Sumit Singh · SunilPrajapati · Suwash · syamraj24 · Sybre Waaijer · Syed Balkhi · Tahmid ul Karim · Takashi Irie · Takashi Kitajima · Tammie Lister · Taylor Gorman · Terence Eden · Teresa Gobble · Thakor Darshil · thelmachido a11n · Thijs · Thirumani Guhan · Thomas Kräftner · Till Krüss · Tim Brathärig · Tim Nicholson · Tim Nolte · Timo Tijhof · Timothy Jacobs · tmatsuur · TobiasBg · tobifjellner (Tor-Bjorn Fjellner) · Tom Cafferkey · Tomek · tomepajk · Tomoki Shimomura · tomxygen · Toni Viemerö · Tony G · Tonya Mork · Toro_Unit (Hiroshi Urabe) · Torsten Landsiedel · Trupti Kanzariya · tunetheweb · twstokes · tybor · Ugyen Dorji · Umesh Gupta · up1512001 · Vicente Canales · Viktor Szépe · Vinit · Vinita Tandulkar · Vipul Gupta · Vishal Kothari · vivekawsm · WebMan Design | Oliver Juhas · websitegenii · wesatintellitonic · Weston Ruter · whaze · Will Skora · William Earnhardt · WilliamG · Wojtek Naruniec · Yagnik Sangani · yankiara · Yann · Yannis Guyon · Yui · Yukinobu Asakawa · Yuvrajsinh Sisodiya · Zack Krida · Zafar Kamal · zieladam · zkarj · Zunaid Amin

\n\n\n\n

Más de 60 regiones han traducido el 90 por ciento o más de WordPress 6.5 a su idioma. Los traductores de la comunidad están trabajando arduamente para garantizar que haya más traducciones en camino. Gracias a todos los que ayudan a que WordPress esté disponible en 200 idiomas.

\n\n\n\n

Por último, pero no menos importante, gracias a los voluntarios que contribuyen a los foros de soporte respondiendo preguntas de los usuarios de WordPress de todo el mundo.

\n\n\n\n

Involúcrate y contribuye

\n\n\n\n

La participación en WordPress no se limita a la codificación. Si le atrae contribuir, aprender más e involucrarse es fácil. Descubre los equipos que se unen en Make WordPress y utiliza esta herramienta interactiva para ayudarte a decidir cuál es la adecuada para ti.

\n\n\n\n

6.6 haiku

\n\n\n\n

Ya está aquí Seis-punto-seis.
Haz que todo sea hermoso, manténlo
con tu marca y relájate.

\n\n\n\n

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:65:\"https://es-mx.wordpress.org/2024/07/18/wordpress-6-6-dorsey/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1037\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:1;a:6:{s:4:\"data\";s:76:\"\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:15:\"WordPress 6.5.5\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:55:\"https://es-mx.wordpress.org/2024/06/25/wordpress-6-5-5/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:63:\"https://es-mx.wordpress.org/2024/06/25/wordpress-6-5-5/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 25 Jun 2024 14:22:53 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:2:{i:0;a:5:{s:4:\"data\";s:15:\"Actualizaciones\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:3:\"6.5\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1032\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:378:\"¡WordPress 6.5.5 ya está disponible! Esta versión presenta tres correcciones de seguridad. Debido a que se trata de una versión de seguridad, se recomienda que actualices tus sitios de inmediato. Esta versión menor también incluye 3 correcciones de errores en Core. Puedes descargar WordPress 6.5.5 desde WordPress.org o visitar tu Panel de WordPress, hacer clic […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:5768:\"\n

¡WordPress 6.5.5 ya está disponible!

\n\n\n\n

Esta versión presenta tres correcciones de seguridad. Debido a que se trata de una versión de seguridad, se recomienda que actualices tus sitios de inmediato. Esta versión menor también incluye 3 correcciones de errores en Core.

\n\n\n\n

Puedes descargar WordPress 6.5.5 desde WordPress.org o visitar tu Panel de WordPress, hacer clic en “Actualizaciones” y luego hacer clic en “Actualizar ahora”. Si tienes sitios que admiten actualizaciones automáticas en segundo plano, el proceso de actualización comenzará automáticamente.

\n\n\n\n

WordPress 6.5.5 es una versión de ciclo corto. El próximo lanzamiento importante será la versión 6.6, que está programada para el 16 de julio de 2024.

\n\n\n\n

Para obtener más información sobre WordPress 6.5.5, visita el sitio HelpHub.

\n\n\n\n

Actualizaciones de seguridad incluidas en esta versión

\n\n\n\n

El equipo de seguridad desea agradecer a las siguientes personas por informar responsablemente las vulnerabilidades y permitir que se corrijan en esta versión:

\n\n\n\n\n\n\n\n

Gracias a estos contribuyentes de WordPress

\n\n\n\n

Este lanzamiento fue dirigido por Aaron Jorbin.

\n\n\n\n

WordPress 6.5.5 no habría sido posible sin las contribuciones de las siguientes personas. Su coordinación asincrónica para ofrecer correcciones de mantenimiento y seguridad en una versión estable es un testimonio del poder y la capacidad de la comunidad de WordPress.

\n\n\n\n

Aaron Jorbin, Alex Concha, Andrew Ozz, bernhard-reiter, Colin Stewart, David Baumwald, Dennis Snell, Grant M. Kinney, Greg Ziółkowski, Jb Audras, Jonathan Desrosiers, Matias Ventura, Miguel Fonseca, Peter Wilson, Rajin Sharwar, Scott Reilly, Tonya Mork

\n\n\n\n

Cómo contribuir

\n\n\n\n

Para participar en el desarrollo central de WordPress, ve a Trac, elige un ticket y únete a la conversación en el canal #core de Slack. ¿Necesitas ayuda? Consulta el Manual del colaborador principal.

\n\n\n\n

¿Ya estás probando WordPress 6.6? La cuarta versión beta ya está disponible y contiene estas correcciones de seguridad. Para obtener más información sobre 6.6, consulta la entrada del anuncio de la beta 3. Obtén más información sobre cómo probar WordPress 6.6 aquí.

\n\n\n\n

Felicitaciones a Paul Kevan, Ehtisham Siddiqui, Alex Concha, Tonya Mork, y Angela Jin por su revisión.

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"https://es-mx.wordpress.org/2024/06/25/wordpress-6-5-5/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1032\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:2;a:6:{s:4:\"data\";s:79:\"\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:26:\"WordPress 6.5 “Regina”\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"https://es-mx.wordpress.org/2024/04/03/wordpress-6-5-regina/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"https://es-mx.wordpress.org/2024/04/03/wordpress-6-5-regina/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 03 Apr 2024 15:37:19 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:3:{i:0;a:5:{s:4:\"data\";s:15:\"Actualizaciones\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:12:\"Lanzamientos\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:2;a:5:{s:4:\"data\";s:3:\"6.5\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1021\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:369:\"Saluda a WordPress 6.5 “Regina”, inspirado en la versatilidad dinámica de la reconocida violinista de jazz Regina Carter. Artista galardonada y educadora de jazz reconocida por trascender el género, los fundamentos técnicos de Regina en la música clásica y su profundo conocimiento del jazz le han valido la reputación de ir audazmente más allá de […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:73321:\"\n
\"\"
\n\n\n\n

Saluda a WordPress 6.5 “Regina”, inspirado en la versatilidad dinámica de la reconocida violinista de jazz Regina Carter. Artista galardonada y educadora de jazz reconocida por trascender el género, los fundamentos técnicos de Regina en la música clásica y su profundo conocimiento del jazz le han valido la reputación de ir audazmente más allá de lo que es posible con el violín.

\n\n\n\n\n\n\n\n

Deja que los impresionantes giros y cambios sutiles del sonido innovador de Regina te sorprendan mientras exploras todo lo que ofrece 6.5.

\n\n\n\n

Esta última versión de WordPress pone más poder en los detalles. Ofrece formas nuevas y mejoradas de ajustar y mejorar su experiencia de creación de sitios, permitiéndote tomar el control de manera que lo hagas tuyo. Encontrarás nuevas formas de administrar la tipografía de tu sitio, revisiones más completas disponibles en más lugares y una colección de actualizaciones del Editor del sitio junto con impresionantes mejoras de rendimiento para ayudarlo a hacer las cosas de manera más fluida y rápida.

\n\n\n\n

“Regina” también marca la introducción de algunas herramientas innovadoras para desarrolladores que comenzarán a transformar la forma en que usas y amplías los bloques para crear experiencias atractivas. La API Interactivity abre un mundo de posibilidades creativas de interfaz, mientras que la API Block Bindings hace que las conexiones dinámicas entre bloques y datos sean perfectas. Estas, entre otras mejoras y actualizaciones centradas en los desarrolladores, están listas para ayudarle a evolucionar la forma en que construye con WordPress.

\n\n\n\n\n\n\n\n

¿Qué hay dentro de 6.5?

\n\n\n\n

Agrega y administra fuentes en tu sitio

\n\n\n\n

La nueva Biblioteca de fuentes te permite controlar una pieza esencial del diseño de tu sitio: la tipografía, sin codificación ni pasos adicionales. Instala, elimina y activa fácilmente fuentes locales y de Google en tu sitio para cualquier tema de Block. La capacidad de incluir colecciones de tipografía personalizadas brinda a los creadores y editores de sitios más opciones cuando se trata de diseñar contenido.

\n\n\n\n
\"\"
\n\n\n\n

Obtén más de tus revisiones, incluidas revisiones de plantillas y partes de plantillas

\n\n\n\n

Trabaja en proyectos creativos con una imagen más completa de lo que se ha hecho y a qué puede recurrir. Obtén detalles como marcas de tiempo, resúmenes rápidos y una lista paginada de todas las revisiones. Ve las revisiones del Libro de estilos para ver cómo los cambios afectan a cada bloque. Las revisiones ahora también están disponibles para plantillas y piezas de plantilla.

\n\n\n\n
\"\"
\n\n\n\n

Juega con herramientas mejoradas de fondo y sombra

\n\n\n\n\n\n\n\n
\"\"
\n\n\n\n

Descubre nuevas vistas de datos

\n\n\n\n

Cada parte de tu sitio viene con una biblioteca de información y datos; ahora puedes encontrar lo que necesitas rápidamente y organizarlo como desees. Las vistas de datos para páginas, plantillas, patrones y partes de plantillas te permiten ver datos en una vista de tabla o cuadrícula, con la opción de alternar campos y realizar cambios masivos.

\n\n\n\n
\"\"
\n\n\n\n

Arrastrar y soltar más suave

\n\n\n\n

Siente la diferencia cuando mueves cosas, con útiles señales visuales como elementos desplazados en la Vista de lista o arrastrándolos sin fricción a cualquier lugar de tu espacio de trabajo, de principio a fin.

\n\n\n\n
\"\"
\n\n\n\n

Controles de enlace mejorados

\n\n\n\n

Crea y administra enlaces fácilmente con una experiencia de creación de enlaces más intuitiva, como una interfaz de usuario optimizada y un acceso directo para copiar enlaces.

\n\n\n\n
\"\"
\n\n\n\n

Novedades para los desarrolladores en 6.5

\n\n\n\n

Lleva interacciones a bloques con la API de interactividad

\n\n\n\n

La API de interactividad ofrece a los desarrolladores un método estandarizado para crear experiencias de interfaz de usuario interactivas con bloques. Simplifica el proceso, con menos dependencia de herramientas externas, manteniendo al mismo tiempo un rendimiento óptimo. Úsalo para crear experiencias de usuario memorables, como obtener resultados de búsqueda al instante o permitir que los visitantes interactúen con el contenido en tiempo real.

\n\n\n\n

Conecta bloques a campos personalizados u otro contenido dinámico

\n\n\n\n

Vincula atributos de bloques principales a campos personalizados y utiliza el valor de los campos personalizados sin crear bloques personalizados. Con la tecnología de Block Bindings API, los desarrolladores pueden ampliar aún más esta capacidad para conectar bloques a cualquier contenido dinámico, incluso más allá de los campos personalizados. Si hay datos almacenados en otro lugar, apunta fácilmente los bloques a esa nueva fuente con solo unas pocas líneas de código.

\n\n\n\n

Agregar herramientas de apariencia a los temas clásicos

\n\n\n\n

Ofrece a los diseñadores y creadores que utilizan temas clásicos acceso a una experiencia de diseño mejorada. Opta por admitir opciones de espaciado, borde, tipografía y color, incluso sin utilizar theme.json. Una vez que se habilite el soporte, se agregarán automáticamente más herramientas a medida que estén disponibles.

\n\n\n\n

Explora mejoras en la experiencia del complemento

\n\n\n\n

Ahora existe una forma más sencilla de gestionar las dependencias de los plugins. Los autores de plugins pueden proporcionar un nuevo encabezado Requires Plugins con una lista separada por comas de los plugins requeridos, presentando a los usuarios enlaces para instalar y activar esos plugins primero.

\n\n\n\n

De rápido a más rápido: actualizaciones de rendimiento

\n\n\n\n

Esta versión incluye más de 110 actualizaciones de rendimiento, lo que da como resultado un aumento impresionante en la velocidad y la eficiencia en el Editor de publicaciones y el Editor del sitio. La carga es dos veces más rápida que en 6.4, con una velocidad de procesamiento de entrada hasta cinco veces más rápida que en la versión anterior.

\n\n\n\n

Los sitios traducidos ven una mejora de hasta un 25% en el tiempo de carga para esta versión, cortesía de Performant Translations. Otros aspectos destacados del rendimiento incluyen compatibilidad con imágenes AVIF y mejoras para registrar variaciones de bloques con devoluciones de llamada.

\n\n\n\n

Una tradición de inclusión

\n\n\n\n

Esta versión incluye más de 65 mejoras de accesibilidad en toda la plataforma, haciéndola más accesible que nunca. Contiene una solución importante que desbloquea el acceso a los submenús de administración para los usuarios de lectores de pantalla y otras personas que navegan con el teclado. Esta versión también agrega correcciones al contraste de color en los estados de enfoque del administrador, posicionamiento de elementos y enfoque del cursor, entre muchos otros, que ayudan a mejorar la experiencia de WordPress para todos.

\n\n\n\n

Obtén más información sobre WordPress 6.5

\n\n\n\n

Consulta la nueva página de WordPress 6.5 para obtener más información sobre las numerosas mejoras y funciones de esta versión, incluidas breves demostraciones de algunas de las funciones destacadas.

\n\n\n\n

Explora Learn WordPress para ver videos instructivos rápidos, talleres en línea y otros recursos gratuitos para mejorar tus conocimientos y habilidades de WordPress.

\n\n\n\n

Consulta la Guía de campo de WordPress 6.5 para obtener información técnica detallada y notas para desarrolladores que te ayudarán a crear con WordPress y aprovechar al máximo esta versión. No olvides suscribirte al Blog para desarrolladores para obtener actualizaciones para desarrolladores, tutoriales de funciones y otro contenido útil de WordPress desde la perspectiva del desarrollador.

\n\n\n\n

Para obtener más información sobre la instalación, cambios de archivos, correcciones y otras actualizaciones, lee las notas de la versión 6.5.

\n\n\n\n

El equipo de lanzamiento 6.5

\n\n\n\n

Cada lanzamiento tiene muchas partes móviles con sus propios triunfos y desafíos. Se necesita un equipo dedicado de colaboradores entusiastas para ayudar a mantener las cosas encaminadas y avanzando sin problemas. 6.5 es posible gracias a un grupo multifuncional de contribuyentes, siempre listos para defender ideas, eliminar obstáculos y resolver problemas.

\n\n\n\n\n\n\n\n

Gracias contribuyentes.

\n\n\n\n

WordPress cree en democratizar la publicación y las libertades que conlleva el código abierto. Apoyando esta idea hay una comunidad global y diversa de personas que colaboran para fortalecer el software.

\n\n\n\n

WordPress 6.5 refleja los innumerables esfuerzos y la pasión de alrededor de 700 colaboradores en al menos 57 países. ¡Este lanzamiento también dio la bienvenida a más de 150 contribuyentes nuevos!

\n\n\n\n

Su colaboración generó más de 2,500 mejoras y correcciones, lo que garantizó una versión estable para todos, un testimonio del poder y la capacidad de la comunidad de código abierto de WordPress.

\n\n\n\n

!Benni · _ck_ · Aaron Jorbin · Aaron Robertshaw · Abha Thakor · abletec · acosmin · Adam Silverstein · Adarsh Akshat · admcfajn · Ahmed Chaion · Ahmed Saeed · Akash Muchandikar · Aki Hamano · Akira Tachibana · akmelias · Akramul Hasan · Akshaya Rane · Alain Schlesser · Alan Fuller · Alex · Alex Concha · Alex King · Alex Kirk · Alex Lende · Alex Mills · Alex Stine · Alexander · Alexandre Buffet · Amber Hinds · Amy Hendrix (sabreuse) · Amy Kamala · Anand Upadhyay · Anders Norén · Andrea Fercia · Andrei Draganescu · Andrei Lupu · Andrew Hayward · Andrew Hutchings · Andrew Nacin · Andrew Norcross · Andrew Ozz · Andrew Serong · andrewleap · Andrii Balashov · André Maneiro · Andy Fragen · Andy Peatling · Aneesh Devasthale · Ankit K Gupta · Ankit Panchal · Anne McCarthy · Anthony Burchell · Antoine · Anton Lukin · Anton Timmermans · Anton Vlasenko · Antonella · Antonio D. · Antonis Lilis · arena94 · Ari Stathopoulos · Arslan Kalwar · Artemio Morales · Arthur Chu · Arun Chaitanya Jami · Arun Sharma · Arunas Liuiza · Asad Polash · Ashish Kumar (Ashfame) · Asish Chandra Mohon · audunmb · Aurooba Ahmed · Austin Matzko · axwax · Ayesh Karunaratne · Béryl de La Grandière · bahia0019 · Balu B · bangank36 · Barry · Barry · Bart Kalisz · bartkleinreesink · Beatriz Fialho · Beau Lebens · Beda · ben · Ben Dwyer · Ben Hansen · Ben Huson · Ben Lobaugh (blobaugh) · Ben Ritner – Kadence WP · Ben Word · Benjamin Zekavica · benjaminknox · Benoit Chantre · Bernhard Reiter · bernhard-reiter · billseymour · Biplav · Birgit Pauli-Haack · bobbingwide · Boone Gorges · born2webdesign · Brad Jorsch · Brad Parbs · Brad Williams · Brandon Kraft · Brandon Lavigne · Brian Coords · Brian Fischer · Brian Gardner · Brian Haas · Brian Henry · Brooke · burnuser · camya · Carlo Cannas · Carlos Bravo · Carlos G. P. · Carolina Nymark · cenkdemir · cfinnberg · Chad Chadbourne · chased@si.edu · chiilog (Chiaki Okamoto) · Chouby · Chris David Miles · Chris Reynolds · chriscct7 · christian-dale · Christopher · Chrystl · codepo8 · Colin Devroe · Colin Stewart · Corey Worrell · Cory Birdsong · Courtney Robertson · Creative Slice · crstauf · Cullen Whitmore · Cupid Chakma · cvorko · cybeardjm · Cyberchicken · Damon Cook · Dan Soschin · Daniel Bachhuber · Daniel Dvorkin · Daniel Käfer · Daniel Richards · Daniel Schutzsmith · danieldudzic · Daniele Scasciafratte · danieltj · darerodz · Darren Ethier (nerrad) · Darshit Rajyaguru · darssen · David Artiss · David Baumwald · David Biňovec · David Calhoun · David Herrera · David Levine · David Lingren · David Perez · David Smith · Dean Sas · Denis de Bernardy · Denis Žoljom · Dennis Hipp · Dennis Snell · Dennys Dionigi · Derek Blank · Derek Herman · Derek Springer · designsimply · Desrosj Bot · Devin Curtis · Devin Walker · Dharmesh Patel · Dhrumil Kumbhani · Dhruvi Shah · Dilip Bheda · Dion Hulse · Dominik Schilling · Dougal Campbell · Drew Jaynes · Dustin Falgout · Earle Davies · Ehtisham Siddiqui · Ella van Durpe · Emerson Maningo · emirpprime · Emmanuel Hesry · Endymion00 · Eric Andrew Lewis · Erick Hitter · Erik · Estela Rueda · Fabian Kägy · Fabian Todt · Fabio Rubioglio · Faisal Ahammad · Faisal Ahmed · Faisal Alvi · Fanly · Feast Design Co. · Felipe Elia · Felix Arntz · fgiannar · Florent Hernandez · Francesca Marano · FrancescoCarlucci · Frank Jäger · Frank Laszlo · Frank Wazeter · fushar · Gajendra Singh · Gan Eng Chin · Garbiñe · Gary Pendergast · gavande1 · Gennady Kovshenin · George Mamadashvili · George Stephanis · Gerard Reches · Gerardo Pacheco · Girish Panchal · Giuseppe Mazzapica · Glen Davies · goldenapples · Grant M. Kinney · Greg Ziółkowski · gregbenz · Guido Scialfa · gvgvgvijayan · H.M. Mushfiqur Rahman · hanneslsm · Hardik Raval · Hareesh S · Harsh Gajipara · Harsh Patel · Hasanuzzaman Shamim · Heather Lounsbury · Heiko Lübbe · Helen Hou-Sandi · HelgaTheViking · Hemant Tejwani · Hidekazu Ishikawa · Himani Panchal · Hit Bhalodia · Hitesh Talpada · Hossein · Howdy_McGee · Hridoy Mozumder · Hrithik Dalal · Hugh Lashbrooke · Hugo Chinchilla · hugod · huubl · Huzaifa Al Mesbah · Héctor Prieto · Ian Belanger · Ian Dunn · idad5 · Ignacio Cruz Moreno · ignatiusjeroe · Ihtisham Zahoor · Ilya Zolotov · ironprogrammer · Isabel Brison · iseulde · IT Path Solutions · itecrs · Ivan Zhuck · Jacob Cassidy · jadpm · James Collins · James Koster · James Roberts · Jamie Blomerus · Jamie Perrelet · Jan Thiel · jane · Janis Elsts · jansan · Japh · Jarda Snajdr · jarednova · Jason Adams · Jason Crist · Jason Crouse · Jason Johnston · Jason LeMahieu (MadtownLems) · Javier Casares · Jayadevan k · jbobich · Jean-Baptiste Audras · Jeff Ong · Jeffrey de Wit · Jeffrey Paul · Jenny Dupuy · Jeremy Felt · Jeremy Herve · jeryj · Jesús Amieiro · Jessica Lyschik · jghazally · Jip Moors · jivygraphics · jltallon · Joan · Joe · Joe Dolson · Joe Hoyle · Joe McGill · Joel James · Joen A. · John Blackbourn · John James Jacoby · johnciacia · Jon Brown · Jon Cave · Jon Surrell · Jonathan Bossenger · Jonathan Brinley · Jonathan Desrosiers · Jonny Harris · joppuyo · jordesign · Jorge Costa · Jorge Vilchez · jornp · Joseph Fusco · Josepha · joshcanhelp · joshuatf · Joy · JR Tashjian · JS Morisset · Juan Aldasoro · JuanMa Garrido · Juhi Saxena · Juliette Reinders Folmer · Justin Tadlock · K M Ashikur Rahman · K. Adam White · KafleG · Kai Hao · Kamrul Hasan · Kari Anderson · Karlijn Bok · Karol Manijak · Karthik Thayyil · Katka · kawsaralameven · Kelly Choyce-Dwan · Kevin Batdorf · Kevin Coleman · Kevin Taron · Kharis Sulistiyono · Kira Schroder · Kishan Jasani · kitchin · Kjell Reigstad · kkmuffme · Knut Sparhell · Koen Reus · Koesper · Konstantin Obenland · Krupa Nanda · Krupal Panchal · Kurt Payne · Kushang Tailor · Kylen Downs · lau@mindproducts.com.au · Laura Adamonis · Lauren Stein · Laurent MILLET · Lax Mariappan · Lena Morita · Leo Muniz · Leonardus Nugraha · Liam Gladdy · LiamMcArthur · Linkon Miyan · liviopv · lkraav · logikal16 · Lovekesh Kumar · luboslives · lucasbustamante · Luis Felipe Zaguini · Luis Herranz · Lukas Pawlik · Lukasz · Luke Cavanagh · Maarten · Madhu Dollu · Madhu Dollu · Maggie Cabrera · Mahbub Hasan Imon · mahnewr · Mahrokh · Malae · manfcarlo · manyourisms · Marc_J · Marcelo de Moraes Serpa · Marco Ciampini · Marcoevich · margolisj · Marie Comet · Marin Atanasov · Mario Santos · Marius L. J. · Mark Howells-Mead · Mark Jaquith · Marko Heijnen · Markus · martin.krcho · Mary Baum · mathewemoore · Matias Benedetto · Matias Ventura · matiasrecondo77 · Matt Mullenweg · Matteo Enna · Max Lyuchin · Maxime Pertici · Mayur Prajapati · Md Hossain Shohel · Md HR Shahin · Meg Phillips · megane9988 · Mel Choyce-Dwan · melcarthus · meta4 · metropolis_john · mevolkan · Micah Wood · Michael Showes · Michal Czaplinski · Michalooki · Miguel Fonseca · miguelsansegundo · Miikka · Mike Bijon · Mike Jolley (a11n) · Mike Schinkel · Mike Schroder · Mikin Chauhan · Milen Petrinski – Gonzo · mimi · mkismy · mnydigital · Mohammad Jangda · Monique Dubbelman · Monzur Alam · Morteza Geransayeh · mreishus · mrwweb · Muhammad Usman Iqbal · Muhibul Haque · mujuonly · Mukesh Panchal · Mumtahina Faguni · Musarrat Anjum Chowdhury · Naoki Ohashi · Naresh Bheda · Nate Allen · Navjot Singh · neffff · Neil Hainsworth · nendeb · NerdPress · Nick Diego · Nick Halsey · Nick Martianov · nickpagz · Nico · Nicole Furlan · Nicole Paschen Caylor · nidhidhandhukiya · Niels Lange · Nihar Ranjan Das · Nik Tsekouras · Nikita · nikmeyer · Nilambar Sharma · Nilo Velez · Niluthpal Purkayastha · Nirav Sherasiya · Nithin John · Nithin SreeRaj · Noah Allen · nosilver4u · Nowell VanHoesen · Nudge Themes · nwjames · obliviousharmony · ockham · oguzkocer · okat · Old account · olegfuture · Olga Gleckler · Paal Joachim Romdahl · Pacicio · pannelars · partyfrikadelle · Pascal Birchler · Patricia BT · Patrick Lumumba · Paul Bearne · Paul Biron · Paul de Wouters · Paul Kevan · Paul Wong-Gibbs · pavelevap · Peter Baylies · Peter Rubin · Peter Westwood · Peter Wilson · petitphp · Philipp Bammes · Philipp15b · Phill · Pieterjan Deneys · Pippin Williamson · Pitam Dey · pmeenan · Pooja Derashri · Pooja N Muchandikar · pooja9712 · pouicpouic · Prashant Baldha · Pratik Kumar · Prem Tiwari · Presskopp · presstoke · prionkor · Rafiq · Rajin Sharwar · Ramon Ahnert · Ramon Corrales · Ramon James · Rashi Gupta · rawrly · rcain · rebasaurus · Remy Perona · Renatho (a11n) · Rene Hermenau · retrofox · Riad Benguella · Rich Collier · Rich Tabor · Rishi Mehta · Rishi Shah · Robert Anderson · Rolf Allard van Hagen · room34 · Ryan Boren · Ryan McCue · Ryan Welcher · Ryann Micua · Ryo · Sé Reed · Sébastien SERRE · Sabbir Hasan · Sachyya · Sadi Mohammad Zaman · sadpencil · Sahil · Saiduzzaman Tohin · Sakib MD Nazmush · Sal Ferrarello · samba45 · Sampat Viral · Samuel Rüegger · Samuel Sidler · Samuel Wood (Otto) · Santiago Cerro López · Sarah Norris · Sarath AR · Satyam Vishwakarma (Satya) · Saxon Fletcher · Sayful Islam · Scott Kingsley Clark · Scott Taylor · scribu · Sergey Biryukov · Sergio de Falco · Seth Rubenstein · Shaharia Azam · Shail Mehta · ShaneF · Shannon Smith · shaunandrews · Shawn Hooper · shidouhikari · Shipon Karmakar · Shreyash Srivastava · Shubham Sedani · siddharth ravikumar · Siobhan · Sirajum Mahdi · sjregan · Soren Wrede · SourceView · sruthi89 · stacimc · Stefano Minoia · Stephen Bernhardt · Stephen Cronin · Stephen Edgar · Stephen Harris · Steven Lin · strarsis · Subrata Sarkar · Sumi Subedi · Sumit Bagthariya · Sumit Singh · SunilPrajapati · Svitlana Sukhoveiko · syamraj24 · Sybre Waaijer · Syed Balkhi · Syed Nuhel · Synchro · Takashi Irie · Takashi Kitajima · Tammie Lister · Tapan Kumer Das · Tara King · Taylor · Taylor Dewey · Taylor Gorman · tazotodua · Teddy Patriarca · Tellyworth · Thakor Darshil · them.es · thinkluke · Thomas Griffin · Thomas Kräftner · threadi · Tim Nolte · timbroddin · Timothée Brosille · Timothy Jacobs · tmatsuur · TobiasBg · tobifjellner (Tor-Bjorn Fjellner) · Tom · Tom Cafferkey · Tom Finley · Tom J Nowell · tomluckies · Tomoki Shimomura · tomsommer · tomxygen · Toni Viemerö · Tonya Mork · Toro_Unit (Hiroshi Urabe) · torres126 · Torsten Landsiedel · Toru Miki · toscho · Travis Smith · tropicalista · Trupti Kanzariya · Ugyen Dorji · upadalavipul · Utsav Patel · Utsav tilava · Uttam Kumar Dash · valerogarte · Vicente Canales · vikram6 · viliamkopecky · Vipul Ghori · vivekawsm · vladimiraus · vortfu · Vraja Das · Wasiur Rahman · welaunchio · Weston Ruter · WHSajid · WP Corner · xlthlx · Yan Sern · Yannis Guyon · Yui · Yuliyan Slavchev · Yuvrajsinh Sisodiya · Zack Tollman · Zane Matthew · zieladam · Zunaid Amin · Česlav Przywara

\n\n\n\n

Más de 70 regiones han traducido el 90 por ciento o más de WordPress 6.5 a su idioma. Los traductores de la comunidad están trabajando arduamente para garantizar que haya más traducciones en camino. Gracias a todos los que ayudan a que WordPress esté disponible en 200 idiomas.

\n\n\n\n

Por último, pero no menos importante, gracias a los voluntarios que contribuyen a los foros de soporte respondiendo preguntas de los usuarios de WordPress de todo el mundo.

\n\n\n\n

Involúcrate y contribuye

\n\n\n\n

La participación en WordPress no se limita a la codificación. Si le atrae contribuir, aprender más e involucrarse es fácil. Descubre los equipos que se unen en Make WordPress y utiliza esta herramienta interactiva para ayudarte a decidir cuál es la adecuada para ti.

\n\n\n\n

Un haiku más

\n\n\n\n

¡6.5 ya está aquí!
Juega, interactúa, construye mejor,
Más fuerte y más rápido.

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:65:\"https://es-mx.wordpress.org/2024/04/03/wordpress-6-5-regina/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1021\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:3;a:6:{s:4:\"data\";s:73:\"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:33:\"El mes en WordPress: Febrero 2024\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:72:\"https://es-mx.wordpress.org/2024/03/08/el-mes-en-wordpress-febrero-2024/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:80:\"https://es-mx.wordpress.org/2024/03/08/el-mes-en-wordpress-febrero-2024/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 08 Mar 2024 18:19:29 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Mes en WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1016\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:377:\"En febrero se produjo un progreso significativo hacia el próximo lanzamiento de WordPress 6.5 y los preparativos finales para WordCamp Asia. Se publicaron los resultados de la encuesta anual de WordPress y comenzaron las discusiones sobre los próximos pasos del proyecto de liberación de datos. Sigue leyendo para conocer los últimos acontecimientos en el espacio […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:9577:\"\n

En febrero se produjo un progreso significativo hacia el próximo lanzamiento de WordPress 6.5 y los preparativos finales para WordCamp Asia. Se publicaron los resultados de la encuesta anual de WordPress y comenzaron las discusiones sobre los próximos pasos del proyecto de liberación de datos. Sigue leyendo para conocer los últimos acontecimientos en el espacio de WordPress.

\n\n\n\n\n\n\n\n

Prepárate para WordCamp Asia

\n\n\n\n

El escenario está listo para el primer evento emblemático de WordPress del año en Taipei, Taiwán. WordCamp Asia 2024 comenzó el 7 de marzo y promete tres días de aprendizaje, networking e inspiración.

\n\n\n\n

El calendario de este año presenta una extensa lista de oradores, incluidos los invitados Josepha Haden Chomphosy, Ben Thompson, Noel Tock, y JU-CHUN KO. Para concluir la cumbre, los asistentes pueden interactuar con el cofundador de WordPress, Matt Mullenweg, en una sesión de preguntas y respuestas. Descubre cómo enviar tus preguntas.

\n\n\n\n

¿No puedes llegar a Taipei? Ve la transmisión en vivo del evento en el canal de YouTube de WordPress.

\n\n\n\n

Cuenta atrás para WordPress 6.5

\n\n\n\n

WordPress 6.5 está en camino para su tan esperado lanzamiento el 26 de marzo. Después de los lanzamientos beta del mes pasado, la primera versión candidata (RC1) ya está disponible para pruebas, lo que marca otro hito en el ciclo de desarrollo.

\n\n\n\n

Esta versión importante agregará delicadeza y ajuste a la forma en que controla su experiencia de creación de sitios, con mucho que explorar específicamente para los desarrolladores. Obtén una descripción detallada de las funciones destacadas en el anuncio de la Beta 1.

\n\n\n\n

Nuevo en el plugin Gutenberg

\n\n\n\n

En febrero se enviaron dos nuevas versiones de Gutenberg:

\n\n\n\n\n\n\n\n

Actualizaciones del equipo

\n\n\n\n\n\n\n\n

Solicitudes de comentarios y pruebas

\n\n\n\n\n\n\n\n

Eventos de WordPress

\n\n\n\n\n\n\n\n
\n\n\n\n

¿Tienes una historia que podríamos incluir en el próximo número de ‘El Mes en WordPress’? Háznoslo saber llenando este formulario (en inglés).

\n\n\n\n

Traducido de wordpress.org/news

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:77:\"https://es-mx.wordpress.org/2024/03/08/el-mes-en-wordpress-febrero-2024/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1016\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:4;a:6:{s:4:\"data\";s:73:\"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"El mes en WordPress: Diciembre 2023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:74:\"https://es-mx.wordpress.org/2024/01/31/el-mes-en-wordpress-diciembre-2023/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"https://es-mx.wordpress.org/2024/01/31/el-mes-en-wordpress-diciembre-2023/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 31 Jan 2024 20:00:14 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Mes en WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1010\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:315:\"A medida que 2023 llegaba a su fin, WordPress se despidió con el tan esperado State of the Word y la hoja de ruta 6.5, entre otras actualizaciones interesantes. Sigue leyendo para obtener más información sobre las celebraciones de fin de año de la comunidad y echar un vistazo a lo que nos espera para […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:10525:\"\n

A medida que 2023 llegaba a su fin, WordPress se despidió con el tan esperado State of the Word y la hoja de ruta 6.5, entre otras actualizaciones interesantes.

\n\n\n\n

Sigue leyendo para obtener más información sobre las celebraciones de fin de año de la comunidad y echar un vistazo a lo que nos espera para el próximo año.

\n\n\n\n\n\n\n\n

Aspectos destacados del State of the Word

\n\n\n\n

El 11 de diciembre, el cofundador de WordPress, Matt Mullenweg, pronunció su discurso anual sobre el State of the Word en Madrid, España, marcando la primera edición internacional del evento. Casi 200 entusiastas de WordPress y líderes de la industria tecnológica se reunieron en persona para escuchar lo que sigue para WordPress, con una gran audiencia uniéndose en línea o desde una de las 47 fiestas de observación celebradas en 18 países.

\n\n\n\n

El discurso de apertura destacó los hitos del año pasado y mostró demostraciones convincentes, brindando una idea de los próximos desarrollos para el editor del sitio, la fase de colaboración y el rediseño del administrador. Matt también presentó el enfoque de 2024 en la liberación de datos, con el objetivo de desbloquear barreras digitales y migraciones sin fricciones a WordPress para una web más abierta.

\n\n\n\n
\n\n
\n\n\n\n

El evento concluyó con una sesión de preguntas y respuestas y esta entrada de seguimiento.

\n\n\n\n

Hoja de ruta hacia WordPress 6.5

\n\n\n\n

El lanzamiento de WordPress 6.5 está programado para el 26 de marzo de 2024. Esta versión importante presentará una nueva biblioteca de fuentes para una fácil administración global de fuentes, soporte para herramientas de apariencia en temas clásicos, vistas de datos para plantillas y patrones, y revisiones más completas en todo el mundo. experiencia en edición, entre otros aspectos destacados.

\n\n\n\n

6.5 también incluirá nuevas API como Interactividad, Campos personalizados y Enlace de bloques que amplían las capacidades de bloque y respaldan funciones como Anulaciones de patrones sincronizados.

\n\n\n\n

Obtén más información sobre las funciones previstas para WordPress 6.5 en esta entrada de hoja de ruta.

\n\n\n\n
\n

No esperes a la próxima versión para optimizar sus flujos de trabajo creativos con estas potentes herramientas del Editor del sitio.

\n
\n\n\n\n

Nuevo en el plugin Gutenberg

\n\n\n\n

En diciembre se enviaron dos nuevas versiones de Gutenberg:

\n\n\n\n\n\n\n\n

Actualizaciones del equipo

\n\n\n\n\n\n\n\n

Eventos de WordPress

\n\n\n\n\n\n\n\n
\n\n\n\n

¿Tienes una historia que podríamos incluir en el próximo número de ‘El Mes en WordPress’? Háznoslo saber llenando este formulario (en inglés).

\n\n\n\n

Las siguientes personas contribuyeron a este mes en WordPress: Bernard Meyer, Nicholas Garofalo, y Lauren Stein

\n\n\n\n

Traducido de wordpress.org/news

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:79:\"https://es-mx.wordpress.org/2024/01/31/el-mes-en-wordpress-diciembre-2023/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1010\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:5;a:6:{s:4:\"data\";s:57:\"\n \n \n \n \n \n \n \n\n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:4:{s:0:\"\";a:6:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:33:\"El mes en WordPress: Octubre 2023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:72:\"https://es-mx.wordpress.org/2023/11/15/el-mes-en-wordpress-octubre-2023/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 15 Nov 2023 13:42:21 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Mes en WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1004\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:0:\"\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:1989:\"\n\n
\n \n
\n \n

Suscríbete para seguir leyendo

\n \n \n

\n Conviértete en suscriptor de pago para obtener acceso al resto de esta entrada y otro contenido exclusivo.\n

\n \n \n
\n \n \n \n
\n \n
\n \n
\n\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1004\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:6;a:6:{s:4:\"data\";s:79:\"\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"WordPress 6.4.1: Actualización de mantenimiento\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:86:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-1-actualizacion-de-mantenimiento/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:94:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-1-actualizacion-de-mantenimiento/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 09 Nov 2023 14:24:28 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:3:{i:0;a:5:{s:4:\"data\";s:15:\"Actualizaciones\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:13:\"Mantenimiento\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:2;a:5:{s:4:\"data\";s:3:\"6.4\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://es-mx.wordpress.org/?p=1001\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:380:\"¡WordPress 6.4.1 ya está disponible! Esta versión menor presenta cuatro correcciones de errores. Puedes revisar un resumen de las actualizaciones de mantenimiento en esta versión leyendo el anuncio de la versión candidata o viendo la lista de tickets en Trac. WordPress 6.4.1 es una versión de ciclo corto. Si tienes sitios que admiten actualizaciones automáticas […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:6118:\"\n

¡WordPress 6.4.1 ya está disponible!

\n\n\n\n

Esta versión menor presenta cuatro correcciones de errores. Puedes revisar un resumen de las actualizaciones de mantenimiento en esta versión leyendo el anuncio de la versión candidata o viendo la lista de tickets en Trac.

\n\n\n\n\n\n\n\n

WordPress 6.4.1 es una versión de ciclo corto. Si tienes sitios que admiten actualizaciones automáticas en segundo plano, el proceso de actualización comenzará automáticamente. Si tu sitio no se actualiza automáticamente, también puedes actualizarlo desde tu Escritorio de WordPress.

\n\n\n\n

Puedes descargar WordPress 6.4.1 desde WordPress.org o visitar tu Escritorio de WordPress, hacer clic en “Actualizaciones” y luego hacer clic en “Actualizar ahora”.

\n\n\n\n

Para obtener más información sobre esta versión, visita el sitio HelpHub.

\n\n\n\n

Gracias a estos contribuyentes de WordPress

\n\n\n\n

Este lanzamiento fue dirigido por Aaron Jorbin y Tonya Mork. Gracias a todos los que probaron RC y 6.4.1 y generaron informes.

\n\n\n\n

WordPress 6.4.1 no habría sido posible sin las contribuciones de las siguientes personas. Su coordinación rápida y concertada para implementar correcciones de mantenimiento en una versión estable es un testimonio del poder y la capacidad de la comunidad de WordPress.

\n\n\n\n

@afragen @clorith @desrosj @pbiron @schlessera @azaozz @davidbaumwald @tomsommer @nexflaszlo @howdy_mcgee @baxbridge @earnjam @timothyblynjacobs @johnbillion @flixos90 @joedolson @jeffpaul @zunaid321 @courane01 @audrasjb @tacoverdo @ironprogrammer @webcommsat @otto42 @barry @chanthaboune @rajinsharwar @aaroncampbell @peterwilsoncc @anandau14 @iandunn @matthewjho @coffee2code @boogah @jason_the_adams @joemcgill @johnjamesjacoby @jrf @renehermi @dlh @mukesh27 @sumitbagthariya16 @starbuck @sergeybiryukov

\n\n\n\n

Cómo contribuir

\n\n\n\n

Para participar en el desarrollo central de WordPress, diríjete a Trac, selecciona un ticket y únete a la conversación en el canal #core. ¿Necesitas ayuda? Consulta el Manual del colaborador principal.

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:91:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-1-actualizacion-de-mantenimiento/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"1001\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:7;a:6:{s:4:\"data\";s:79:\"\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:27:\"WordPress 6.4 “Shirley”\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:61:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-shirley/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:69:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-shirley/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 09 Nov 2023 14:18:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:3:{i:0;a:5:{s:4:\"data\";s:15:\"Actualizaciones\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:12:\"Lanzamientos\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:2;a:5:{s:4:\"data\";s:3:\"6.4\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://es-mx.wordpress.org/?p=988\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:334:\"Saluda a WordPress 6.4 “Shirley”, que lleva el nombre de la icónica artista de jazz Shirley Horn. Su voz distintiva y su extraordinaria conexión con el piano la establecieron como una de las principales músicos de jazz de su generación. El viaje de Horn desde la escena del jazz de Washington D.C. hasta el escenario […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:75814:\"\n
\"\"
\n\n\n\n

Saluda a WordPress 6.4 “Shirley”, que lleva el nombre de la icónica artista de jazz Shirley Horn. Su voz distintiva y su extraordinaria conexión con el piano la establecieron como una de las principales músicos de jazz de su generación. El viaje de Horn desde la escena del jazz de Washington D.C. hasta el escenario internacional es un testimonio de su dedicación y perseverancia. Su influencia llegó mucho más allá de los límites del jazz tradicional, rompiendo fronteras e inspirando a audiencias de todo el mundo.

\n\n\n\n\n\n\n\n

Disfruta del ritmo suave de la música de Shirley Horn mientras disfrutas de todo lo que ofrece 6.4.

\n\n\n\n

Esta última versión de WordPress presenta un tema predeterminado nuevo y versátil y un conjunto de actualizaciones para potenciar cada paso de su viaje creativo. Elabora tu contenido sin problemas con más mejoras de redacción. Explora más formas de hacer realidad su visión y optimizar la edición del sitio con herramientas mejoradas. Si eres nuevo en WordPress o un creador experimentado, “Shirley” tiene algo para ti. Descubre la flexibilidad inigualable de construir con bloques y deja volar tus ideas.

\n\n\n\n
\n

Muchas de las características y mejoras de WordPress 6.4 se incluyen en la categoría “pequeñas pero poderosas”. Junto con la belleza adaptable del tema Twenty Twenty-Four, estas actualizaciones ayudan a los creadores de contenido y desarrolladores de sitios a ahorrar tiempo y esfuerzo al tiempo que brindan la experiencia de WordPress de alto valor y sin complicaciones que el mundo espera.

\nJosepha Haden Chomphosy, directora ejecutiva de WordPress
\n\n\n\n\n\n\n\n

¿Qué hay dentro 6.4?

\n\n\n\n

Conoce Twenty Twenty-Four

\n\n\n\n

Experimente la edición de sitios en su máxima expresión con Twenty Twenty-Four. Este nuevo tema predeterminado multifacético ha sido cuidadosamente diseñado teniendo en mente tres casos de uso distintos, desde escritores y artistas hasta emprendedores. Ahorra tiempo y esfuerzo con su extensa colección de más de 35 plantillas y patrones y descubre un mundo de posibilidades creativas con algunos ajustes. La notable flexibilidad de Twenty Twenty-Four garantiza una adaptación ideal para casi cualquier tipo de sitio. Compruébalo en esta demostración.

\n\n\n\n
\"\"
\n\n\n\n

Deja que tu escritura fluya

\n\n\n\n

Las nuevas mejoras garantizan que tu proceso de creación de contenido sea fluido. Encuentra nuevos atajos de teclado en la Vista de lista, combinación de listas más inteligente y control mejorado sobre la configuración de enlaces. Una experiencia de barra de herramientas coherente para los bloques de Navegación, Lista y Cotización le permite trabajar de manera eficiente con las opciones de herramientas que necesita.

\n\n\n\n
\"\"
\n\n\n\n

La paleta de comandos acaba de mejorar

\n\n\n\n

Introducida por primera vez en WordPress 6.3, la paleta de comandos es una poderosa herramienta para encontrar rápidamente lo que necesitas, realizar tareas de manera eficiente y acelerar el flujo de trabajo de su construcción. Disfruta de un diseño renovado y nuevos comandos para realizar acciones específicas de bloques en esta versión.

\n\n\n\n
\"\"
\n\n\n\n

Categorizar y filtrar patrones

\n\n\n\n

Los patrones son una excelente manera de aprovechar el potencial de los bloques y simplificar el proceso de creación de tu sitio. WordPress 6.4 te permite organizarlos con categorías personalizadas. Además, el nuevo filtrado avanzado en la sección Patrones del insertador hace que encontrar todos sus patrones sea más intuitivo.

\n\n\n\n
\"\"
\n\n\n\n

Se creativo con más herramientas de diseño

\n\n\n\n

Crea diseños atractivos y funcionales con un conjunto ampliado de herramientas de diseño. Juega con imágenes de fondo en bloques de grupo para obtener diseños únicos y mantén las dimensiones de la imagen consistentes con las proporciones de aspecto del marcador de posición. ¿Quieres agregar botones a tu bloque de navegación? Ahora puedes hacerlo cómodamente sin una línea de código.

\n\n\n\n
\"\"
\n\n\n\n

Haz que tus imágenes destaquen

\n\n\n\n

Habilita la funcionalidad de caja de luz para permitir que los visitantes de su sitio disfruten de imágenes interactivas en pantalla completa al hacer clic. Aplícalo globalmente o a imágenes específicas para personalizar la experiencia de visualización.

\n\n\n\n
\"\"
\n\n\n\n

Cambia el nombre de los bloques de grupo

\n\n\n\n

Pónle un nombre personalizado a los bloques de grupo para organizar y distinguir áreas de su contenido fácilmente. Estos nombres serán visibles en la Vista de lista.

\n\n\n\n
\"\"
\n\n\n\n

Vista previa de imágenes en vista de lista

\n\n\n\n

Las nuevas vistas previas de los bloques de Galería e Imágenes en la Vista de lista le permiten visualizar y ubicar dónde están las imágenes de tu contenido de un vistazo.

\n\n\n\n
\"\"
\n\n\n\n

Compartir patrones entre sitios

\n\n\n\n

¿Necesitas utilizar tus patrones personalizados en otro sitio? Importarlos y exportarlos como archivos JSON desde la vista de patrones del Editor del sitio.

\n\n\n\n
\"\"
\n\n\n\n

Presentación de los bloques Hooks

\n\n\n\n

Los bloques Hooks permiten a los desarrolladores insertar automáticamente bloques dinámicos en ubicaciones de contenido específicas, enriqueciendo la extensibilidad de los temas de bloques a través de plugins. Si bien se considera una herramienta para desarrolladores, esta función está diseñada para respetar sus preferencias y le brinda control total para agregar, descartar y personalizar bloques insertados automáticamente según sus necesidades.

\n\n\n\n
\"\"
\n\n\n\n

El rendimiento gana

\n\n\n\n

Esta versión incluye más de 100 actualizaciones relacionadas con el rendimiento para una experiencia más rápida y eficiente. Las mejoras notables se centran en el rendimiento de carga de plantillas para temas (incluido Twenty Twenty-Four), el uso de estrategias de carga de scripts “diferidas” y “asíncronas” en el núcleo, los bloques y los temas, y la optimización de las opciones de carga automática.

\n\n\n\n

Aspectos destacados de la accesibilidad

\n\n\n\n

Cada lanzamiento se compromete a hacer que WordPress sea accesible para todos. WordPress 6.4 trae varias mejoras en la Vista de lista y compatibilidad con etiquetas aria para el bloque de Navegación, entre otras cosas destacadas. La interfaz de usuario del administrador incluye mejoras en la ubicación de los botones, el contexto de los elementos del menú “Agregar nuevo” y los mensajes hablados sobre el estado del sitio. Obtén más información sobre todas las actualizaciones destinadas a mejorar la accesibilidad.

\n\n\n\n

Otras notas de interés

\n\n\n\n\n\n\n\n

Obtén más información sobre WordPress 6.4

\n\n\n\n

Consulta la nueva página de WordPress 6.4 para obtener más información sobre las numerosas mejoras y características de esta versión.

\n\n\n\n

Explora Learn WordPress para ver videos instructivos rápidos, talleres en línea y otros recursos gratuitos para mejorar sus conocimientos y habilidades de WordPress.

\n\n\n\n

Si buscas notas técnicas detalladas sobre nuevos cambios, la Guía de campo de WordPress 6.4 es para ti. No olvides suscribirte al Blog para desarrolladores para estar al tanto de las últimas actualizaciones de desarrollo, tutoriales y más.

\n\n\n\n

Para obtener más información sobre instalación, correcciones y cambios de archivos, visita las notas de la versión 6.4.

\n\n\n\n

El equipo de lanzamiento 6.4

\n\n\n\n

​​La versión WordPress 6.4 llega de la mano de un equipo de lanzamiento de género subrepresentado para dar la bienvenida y potenciar diversas voces en el proyecto de código abierto de WordPress.

\n\n\n\n
\n

Ser parte del equipo de coordinación de la versión 6.4 me ha permitido observar de cerca el intrincado proceso de lanzamiento, donde cada detalle, por menor que sea, se aborda meticulosamente, teniendo en cuenta varios factores como el rendimiento y la compatibilidad con versiones anteriores. Todavía hay mucho que aprender, pero me siento afortunado de haber tenido la oportunidad de contribuir a WordPress 6.4.

\nAkshaya Rane, miembro del equipo coordinador de la versión 6.4
\n\n\n\n

Durante varias semanas, el equipo de lanzamiento 6.4 mantuvo el lanzamiento encaminado y avanzó liderando el trabajo colectivo, conectando ideas y eliminando obstáculos.

\n\n\n\n\n\n\n\n

Gracias contribuyentes.

\n\n\n\n

WordPress cree en democratizar la publicación y las libertades que conlleva el código abierto. Apoyando esta idea hay una comunidad global y diversa de personas que trabajan juntas para fortalecer el software.

\n\n\n\n

WordPress 6.4 refleja los innumerables esfuerzos y la pasión de más de 600 contribuyentes en al menos 56 países. ¡Este lanzamiento también dio la bienvenida a más de 170 contribuyentes nuevos!

\n\n\n\n

Su colaboración generó más de 1150 mejoras y correcciones, lo que garantizó una versión estable para todos, un testimonio del poder y la capacidad de la comunidad de código abierto de WordPress.

\n\n\n\n

6adminit · Aaron D. Campbell · Aaron Jorbin · Aaron Robertshaw · aayusha · Abha Thakor · Abid Omar · Adam Silverstein · Adhun Anand · admcfajn · adrianduffell · aegkr · ahardyjpl · Ahmed Hussein · Ahmed Kabir Chaion · ajakaroth · Aki Hamano · Akihiro Harai · Akira Tachibana · Akshaya Rane · Al-Amin Firdows · Alain Schlesser · Albert Juhé Lluveras · Alex Concha · Alex King · Alex Lende · Alex Stine · Alexandre Buffet · Alisha Bajracharya · Allison Tarr · Alvi Tazwar · amedv · Ana Cirujano · Anand Upadhyay · Anders Norén · André · Andrea Fercia · Andrei Draganescu · Andrew Hayward · Andrew Hutchings · Andrew Nacin · Andrew Ozz · Andrew Serong · Andrew Wilder · Andy Fragen · Andy Peatling · Ankit Gade · Ankit K Gupta · Ankit Panchal · Anna · Anne Katzeff · Anne McCarthy · Anne-Mieke Bovelett · anphira · Anthony Burchell · Anton Plauche · Anton Timmermans · Anton Vlasenko · Anveshika Srivastava · archon810 · arena · Ari Stathopoulos · Arnab Mondal · Artemio Morales · Arthur Chu · asafm7 · Aslam Doctor · Aurooba Ahmed · Austin Ginder · Ayesh Karunaratne · azharckra · Balu B · bangank36 · barbmiller · Barry · Bart · Basilis Kanonidis · Beatriz Fialho · behoney · ben · Ben Dwyer · Ben Greeley · Ben Hansen · Benjamin Intal · Benjamin Zekavica · benjaminknox · Benoit Chantre · Bernhard Reiter · Bernie Reiter · Bhrugesh Bavishi · Bijay Yadav · Binsaifullah · Biplav · Birendra Dhami · Birgit Olzem · Birgit Pauli-Haack · Block Themes Pro · bmalsht · bonger · bookwyrm · Boone Gorges · Boro Sitnikovski · Brad Jorsch · Bradley Jacobs · Brandon Kraft · Brandon Vreeman · Brian Gardner · Brian Haas · Brooke · Brooke. · Bud Kraus · Caleb Burks · Calvin Alkan · Carlo Cannas · Carlos Bravo · Carlos G. P. · Carolina Nymark · Cathi Bosco · ceer · cenkdemir · Chad Chadbourne · chased@si.edu · Chintan hingrajiya · Chip Bennett · Chloé Bringmann · Chris Runnells · chriscct7 · chrisdesrochers · codersantosh · Colin Stewart · Corey Worrell · Courtney Patubo Kranzke · Courtney Robertson · Crisoforo Gaspar · crstauf · Csaba (LittleBigThings) · Cupid Chakma · cybeardjm · Cyberchicken · Daisuke Takahashi · Dajeema Rai · Damon Cook · Damon Sharp · Dan Tovbein · Daniel Bachhuber · Daniel Richards · danieldudzic · Daniele Scasciafratte · Danielle Zarcaro · danieltj · darerodz · Darin Kotter · darkfate · Darren Ethier (nerrad) · Darshit Rajyaguru · Dave Loodts · dave03 · David Baumwald · David Biňovec · David Calhoun · David E. Smith · David Favor · David Herrera · David Ryan · David Smith · Dawid Urbanski · daxelrod · De Belser Arne · Dean Sas · Dee Teal · Deepak Vijayan · Denis Žoljom · Dennis Snell · Derek Blank · Derrick Tennant · Devan Ferguson · Dharmesh Patel · Dhrumil Kumbhani · Dhruvi Shah · Diane Co · Dilip Bheda · Dimitris Mitsis · Dion Hulse · DJ · dj.cowan · Dominik Schilling · doughamlin · Drew Jaynes · Earle Davies · Ebonie Butler · Edi Amin · Edward Caissie · Ehtisham S. · Ella van Durpe · Ellen Bauer · emailjoey · Emerson Maningo · Emily Clarke · Emily Leffler Schulman · emirpprime · enodekciw · Enrico Battocchi · Erik Betshammar · Esrat Sultana Popy · Estela Rueda · Fabian Kägy · Fabian Todt · Fabio Rubioglio · Faisal Alvi · Felipe Elia · Felix Arntz · Femy Praseeth · floydwilde · FolioVision · Francesca Marano · Frank Laszlo · Fredde Battel · fzhantw · Gabriel Koen · Ganesh Dahal · Garrett Hyder · Gary Cao · Gary Pendergast · Gennady Kovshenin · George Hotelling · George Mamadashvili · Gerardo Pacheco · Gio Lodi · Glen Davies · Gnanasekaran Loganathan · Gopal Krishnan · GOZER · gpotter · Grant M. Kinney · Greg Ross · Greg Ziółkowski · gregfuller · Guss77 · Gustavo Bordoni · gvgvgvijayan · Héctor Prieto · H.M. Mushfiqur Rahman · hanneslsm · Hanzala Taifun · Hareesh S · Harsh Gajipara · Hasanuzzaman · Haz · Helen Hou-Sandi · Hemant Tejwani · Hit Bhalodia · hlunter · Howdy_McGee · Huzaifa Al Mesbah · Ian Dunn · Incursa Designs · ironprogrammer · Isabel Brison · itecrs · Ivan Zhuck · jaimieolmstead · Jakaria Istauk · Jake Goldman · Jake Spurlock · James Hunt · James Janco · James Koster · James Roberts · james0r · Jamie McHale · Jamie Perrelet · Jamie VanRaalte · jane · Jarda Snajdr · Jari Vuorenmaa · Jarko Piironen · Jason Adams · Jason Cosper · Jason Crist · jastos · Jean-Baptiste Audras · Jeff Bowen · Jeff Everhart · Jeff Ong · jeffikus · Jeffrey Paul · jeflopo · Jeremy Felt · Jeremy Herve · Jeremy Yip · jeryj · Jesin A · Jessica Duarte · Jessica Goddard · Jessica Lyschik · Jick · Jip Moors · jivygraphics · Joe Dolson · Joe Hoyle · Joe McGill · Joen A. · John Blackbourn · John Hooks · John James Jacoby · John Regan · Jon Brown · Jon Cave · Jonathan Desrosiers · Jonny Harris · Jono Alderson · Joona · Joost de Valk · JordanPak · jordesign · Jorge Costa · Joseph G. · Josepha Haden · joshcanhelp · joshuatf · JR Tashjian · Juan Aldasoro · JuanMa Garrido · Juliette Reinders Folmer · Justin Tadlock · Jyolsna J E · K M Ashikur Rahman · K. Adam White · KafleG · Kai Hao · Kalmang · Kalpesh · Kamrul Hasan · Karlijn Bok · Karol Manijak · Karthik Thayyil · Katie Ayres · kawsaralameven · Keanan Koppenhaver · Kelly Choyce-Dwan · Kevin Fodness · Kevin Miller · Kevin Taron · khleomix · Khokan Sardar · Kim Coleman · Kishan Jasani · kkmuffme · Koji Kuno · Konstantin Kovshenin · Konstantin Obenland · Kopila Shrestha · krokodok · Krupal Panchal · Labun Chemjong · Lance Willett · LarryWEB · lastsplash (a11n) · lau@mindproducts.com.au · launchinteractive · Laura Adamonis · Laura Byrne · laurelfulford · Lauren · Laxmikant Bhumkar · Lee Willis · Lena Morita · Liam Gladdy · Linkon Miyan · Linnea Huxford · Lloyd Budd · Lovekesh Kumar · Luigi · Luis Felipe Zaguini · Luis Herranz · Luke Cavanagh · lunaluna · lyndauwp · Márcio Duarte · maciejmackowiak · madejackson · Madhu Dollu · Madhu Dollu · Maggie Cabrera · Mahbub Hasan Imon · Mahrokh · Mai · Maja Benke · maltfield · Manesh Timilsina · manfcarlo · Manzoor Wani · marcelle42 · Marcelo de Moraes Serpa · Marco Ciampini · Marco Pereirinha · Marcoevich · margolisj · Marin Atanasov · Mario Santos · Marius L. J. · Mark Jaquith · Marko Ivanovic · Marta Torre · Martijn van der Klis · martin.krcho · Mary Baum · Masoud NKH · mathsgrinds · Matias Benedetto · Matias Ventura · Matt Keys · Matt Watson · Matthaus Klute · Matthew Eppelsheimer · Matthew Farlymn · Matthew Haines-Young · matthewjho · maurodf · Maxwell Morgan · maysi · Md HR Shahin · meagan hanes · Mehedi Hassan · Meher Bala · Mel Choyce-Dwan · mer00x · merel1988 · Michael Arestad · Michael Burridge · Michael Showes · Michal Czaplinski · Michalooki · Michelle Blanchette · Michelle Frechette · Michi91 · Miguel Fonseca · Mikael Korpela · Mike Jolley (a11n) · Mike McAlister · Mike Schinkel · Mike Schroder · Mike Straw · Mikin Chauhan · Milen Petrinski – Gonzo · mimi · mitchellaustin · Monir · Mrinal Haque · mrwweb · Muhammad Arslan · Muhibul Haque · mujuonly · Mukesh Panchal · Mumtahina Faguni · Mushrit Shabnam · Myles Taylor · Nalini Thakor · nandhuraj · Nazgul · Nazmul Sabuz · Neil Hainsworth · nendeb · Nick Diego · Nicolas Juen · Nicole Furlan · nicomollet · nidhidhandhukiya · Niels Lange · Nihar Ranjan Das · Nik Tsekouras · Nilambar Sharma · Nilo Velez · niravsherasiya7707 · Nitesh Das · Nithin John · Nithin SreeRaj · Noah Allen · Nyasha · ockham · Ohia · okat · Olga Gleckler · Oliver Campion · OllieJones · Paal Joachim Romdahl · pannelars · Pascal Birchler · Paul Biron · Paul Kevan · pavelevap · Pedro Mendonça · pentatonicfunk · Pete Nelson · Peter Wilson · petitphp · petrosparaskevopoulos · Petter Walbø Johnsgård · Phill · Pieterjan Deneys · piyushdeshmukh · Plugin Devs · Pooja Bhimani · Pooja Derashri · Pooja N Muchandikar · pranavjoshi · Prashant · Presskopp · r-c · Rajin Sharwar · Ramon Ahnert · Ramon Corrales · Ramon James · Rebekah Markowitz · Remy Perona · ren · Renatho (a11n) · Rene Hermenau · Reyes Martínez · Riad Benguella · Rian Rietveld · Rich Tabor · Robert Anderson · Robert O’Rourke · Robin · robpetrin · Rolf Allard van Hagen · Ryan Duff · Ryan McCue · Ryan Neudorf · Ryan Welcher · Sérgio Gomes · Sagar Tamang · Sajjad Hossain Sagor · Sakib Mohammed · Sal Ferrarello · samba45 · Samir Karmacharya · Sampat Viral · Samuel Wood (Otto) · Sarah Norris · Sarah Williams · Sarath AR · Satish Prajapati · saulirajala · saxonfletcher · Scott Kingsley Clark · Scott Reilly · Scott Taylor · Scout James · scribu · Sergey Biryukov · Sergio Scabuzzo · Seth Rubenstein · Shail Mehta · shawfactor · Shawn Hooper · shilo-ey · Shiva Shanker Bhatta · shresthaaman · Shubham Sedani · Simon Dowdles · Siobhan · Siobhan Bamber · Smit Rathod · sofiashendi · Sonia Gaballa · Soren Wrede · SourceView · Spenser Hale · Stephanie Walters · Stephen Bernhardt · Stephen Edgar · Steve Erdelyi · Steve Jones · Subodh Sunuwar · Subrata Sarkar · Suji K Chandran · Sumi Subedi · Sumit Bagthariya · Sumit Singh · Sunita Rai · suprsam · syamraj24 · Sybre Waaijer · Synchro · Sé Reed · Taco Verdonschot · Tahmid ul Karim · Tahmina Jahan · Takayuki Miyoshi · Tammie Lister · Tanvirul Haque · Teddy Patriarca · tejadev · thinkluke · Thomas Patrick Levy · tibbsa · Tiffany Bridge · Tim Nolte · timdix · Timothy Jacobs · tmatsuur · TobiasBg · tobifjellner (Tor-Bjorn Fjellner) · Tom · Tom Cafferkey · Tom H · Tom J Nowell · tomluckies · Tomoki Shimomura · tomsommer · Tonya Mork · Toro_Unit (Hiroshi Urabe) · Torsten Landsiedel · toscho · Tran Ngoc Tuan Anh · Trinisha · Trisha Salas · tristanleboss · TV productions · Ugyen Dorji · Ulrich · Umesh Balayar · Upadala Vipul · Utsav tilava · valentindu62 · Valerie Blackburn · Vicente Canales · Viktor Szépe · Vipul Ghori · vivekawsm · vortfu · Vraja Das · webashrafians · WebMan Design | Oliver Juhas · Weston Ruter · WHSajid · Will Skora · William Earnhardt · Willington Vega · Winstina · winterstreet · WraithKenny · wyrfel · Yoseph Tamang · Yui · zieladam · Zunaid Amin · Илья

\n\n\n\n

Más de 60 regiones han traducido el 90 por ciento o más de WordPress 6.4 a su idioma. Los traductores de la comunidad están trabajando arduamente para garantizar que haya más traducciones en camino. Gracias a todos los que ayudan a que WordPress esté disponible en 200 idiomas.

\n\n\n\n

Por último, pero no menos importante, gracias a los voluntarios que contribuyen a los foros de soporte respondiendo preguntas de los usuarios de WordPress de todo el mundo.

\n\n\n\n

Involúcrate

\n\n\n\n

La participación en WordPress no se limita a la codificación. Si te atrae contribuir, aprender más e involucrarse es fácil. Descubre los equipos que se unen en Make WordPress y utiliza esta herramienta interactiva para ayudarle a decidir cuál es la adecuada para ti.

\n\n\n\n

Mirando hacia el futuro

\n\n\n\n

Durante las últimas dos décadas, WordPress ha transformado el panorama editorial digital y ha permitido a cualquiera crear y compartir, desde historias personales hechas a mano hasta movimientos que cambian el mundo.

\n\n\n\n

El presente y el futuro de WordPress ofrecen oportunidades interesantes para todos, tanto para los constructores como para las empresas. El trabajo fundamental para la Fase 3 de la hoja de ruta continúa, con esfuerzos centrados en fomentar la colaboración en tiempo real y optimizar los flujos de publicación para mejorar la forma en que los creadores y los equipos trabajan juntos en WordPress.

\n\n\n\n

Manténte al tanto de las últimas noticias y oportunidades de contribución suscribiéndose a WordPress News y al podcast WP Briefing.

\n\n\n\n
\n\n\n\n

Un haiku de liberación.

\n\n\n\n

La suave sensación del jazz
La vanguardia de la web
Instalar 6.4

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"https://es-mx.wordpress.org/2023/11/09/wordpress-6-4-shirley/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"988\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:8;a:6:{s:4:\"data\";s:76:\"\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:42:\"State of the Word 2023 – Guarda la fecha\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"https://es-mx.wordpress.org/2023/11/06/state-of-the-word-2023-guarda-la-fecha/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:86:\"https://es-mx.wordpress.org/2023/11/06/state-of-the-word-2023-guarda-la-fecha/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 06 Nov 2023 16:25:16 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:2:{i:0;a:5:{s:4:\"data\";s:7:\"Eventos\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}i:1;a:5:{s:4:\"data\";s:14:\"state of world\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://es-mx.wordpress.org/?p=985\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:328:\"¡Es hora de reservar la fecha, el 11 de diciembre de 2023, para el State of the World de este año! State of the Word es el discurso de apertura anual pronunciado por el cofundador del proyecto WordPress, Matt Mullenweg. Cada año, el evento comparte reflexiones sobre el progreso del proyecto y las aspiraciones para […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:2245:\"\n
\"\"
\n\n\n\n

¡Es hora de reservar la fecha, el 11 de diciembre de 2023, para el State of the World de este año!

\n\n\n\n\n\n\n\n

State of the Word es el discurso de apertura anual pronunciado por el cofundador del proyecto WordPress, Matt Mullenweg. Cada año, el evento comparte reflexiones sobre el progreso del proyecto y las aspiraciones para el futuro del código abierto.

\n\n\n\n

Por primera vez, State of the Word se llevará a cabo fuera de Norteamérica, esta vez con la comunidad española en Madrid, España. El evento se transmitirá en vivo a los entusiastas de WordPress de todo el mundo a través de las plataformas de redes sociales de WordPress.org.

\n\n\n\n

Únete a Matt mientras ofrece una retrospectiva de 2023, muestra lo último en tecnología de WordPress y comenta sobre el futuro del proyecto de código abierto de WordPress.

\n\n\n\n

Los detalles que incluyen cómo reservar un ticket para el evento en persona, el enlace para ver la transmisión en vivo e información sobre cómo enviar preguntas para la parte de preguntas y respuestas se proporcionarán en noviembre y se compartirán en WordPress.org y cuentas de redes sociales afiliadas.

\n\n\n\n

Traducido de wordpress.org/news

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"https://es-mx.wordpress.org/2023/11/06/state-of-the-word-2023-guarda-la-fecha/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"985\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:9;a:6:{s:4:\"data\";s:73:\"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:6:{s:0:\"\";a:7:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"El mes en WordPress: Agosto 2023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:71:\"https://es-mx.wordpress.org/2023/09/13/el-mes-en-wordpress-agosto-2023/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:79:\"https://es-mx.wordpress.org/2023/09/13/el-mes-en-wordpress-agosto-2023/#respond\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 13 Sep 2023 14:07:07 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"category\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Mes en WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://es-mx.wordpress.org/?p=982\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:11:\"isPermaLink\";s:5:\"false\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:366:\"Agosto de 2023 marcó otro capítulo emocionante en WordPress, con la Cumbre de la Comunidad y WordCamp US que reunieron a la comunidad para discusiones significativas, intercambio de conocimientos y aprendizaje. Este mes también dio la bienvenida al tan esperado lanzamiento de WordPress 6.3 y ofreció un vistazo de lo que está por venir. Profundicemos […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Abraham Morales (soyabrahamdev)\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:40:\"http://purl.org/rss/1.0/modules/content/\";a:1:{s:7:\"encoded\";a:1:{i:0;a:5:{s:4:\"data\";s:14983:\"\n

Agosto de 2023 marcó otro capítulo emocionante en WordPress, con la Cumbre de la Comunidad y WordCamp US que reunieron a la comunidad para discusiones significativas, intercambio de conocimientos y aprendizaje. Este mes también dio la bienvenida al tan esperado lanzamiento de WordPress 6.3 y ofreció un vistazo de lo que está por venir. Profundicemos en ello.

\n\n\n\n\n\n\n\n

Conoce WordPress 6.3 “Lionel”

\n\n\n\n

WordPress 6.3 “Lionel” se lanzó el 8 de agosto de 2023 y lleva el nombre del aclamado vibrafonista, pianista y percusionista de jazz Lionel Hampton.

\n\n\n\n

Esta importante actualización hace que darle vida a tu visión con bloques sea más intuitivo y eficiente. Su contenido, plantillas y patrones ahora están perfectamente integrados en el Editor del sitio, lo que le permite diseñar cada aspecto de su presencia en línea en una sola ubicación. Puedes perfeccionar tus diseños con nuevas herramientas, disfrutar de un control preciso sobre los menús de navegación y trabajar más rápido con la paleta de comandos. Explora las novedades.

\n\n\n\n

WordPress 6.3 presenta más de 500 funciones y mejoras con un énfasis continuo en el rendimiento y la accesibilidad. Este lanzamiento fue posible gracias a más de 650 colaboradores de 52 países.

\n\n\n\n
\n\n
Video en inglés
\n\n\n\n

Si bien el Editor del sitio seguirá mejorándose, este lanzamiento significa un hito importante ya que marca la conclusión de la Fase 2 de Gutenberg. Tómate un momento para ver “Diseñado con WordPress”, una oda a este extraordinario viaje que vale la pena celebrar.

\n\n\n\n
\n

Descarga WordPress 6.3.1.

\n
\n\n\n\n

Hoja de ruta hacia 6.4

\n\n\n\n

Los contribuyentes ya están trabajando en WordPress 6.4, cuyo lanzamiento se espera para el 7 de noviembre de 2023. Este lanzamiento, liderado por un equipo de lanzamiento de género subrepresentado, se centrará en mejorar diferentes aspectos de la experiencia de WordPress mientras continúa el trabajo fundamental para la Fase 3 de Gutenberg. Puede anticipar funciones como administración de fuentes y un nuevo tema predeterminado, Twenty Twenty-Four.

\n\n\n\n

Twenty Twenty-Four pretende ser un tema versátil, que presenta una variedad de plantillas y patrones diseñados específicamente para tres casos de uso: emprendedores y pequeñas empresas, fotógrafos y artistas, y escritores y blogueros.

\n\n\n\n
\n

Consulta la entrada de la hoja de ruta 6.4 para obtener una vista previa provisional de las características esperadas.

\n
\n\n\n\n

Nuevo en el plugin Gutenberg

\n\n\n\n

Se enviaron dos nuevas versiones de Gutenberg en el último mes:

\n\n\n\n\n\n\n\n
\n

Sigue las entradas “Novedades de Gutenberg” para estar al tanto de las últimas mejoras.

\n
\n\n\n\n

Actualizaciones del equipo: próxima generación de eventos de WordPress, rediseño de WP Admin y más

\n\n\n\n\n\n\n\n
\n

¿Estás interesado en ver nuevos formatos de eventos de WordPress en tu comunidad local? ¡Inspírate con estos conceptos creativos y comparte tus ideas!

\n
\n\n\n\n

Solicitudes de comentarios y pruebas

\n\n\n\n\n\n\n\n
\n

El equipo de formación busca comentarios sobre las primeras vías de aprendizaje descritas para mejorar la experiencia educativa de Learn WordPress. Comparte tus pensamientos antes del 15 de septiembre de 2023.

\n
\n\n\n\n

Actualizaciones de eventos de WordPress

\n\n\n\n\n\n\n\n
\n

Únete a Josepha Haden Chomphosy en el episodio 61 de WP Briefing mientras analiza sus conclusiones de la Cumbre Comunitaria.

\n
\n\n\n\n
\n\n\n\n

¿Tienes una historia que podríamos incluir en el próximo número de ‘El Mes en WordPress’? Háznoslo saber llenando este formulario (en inglés).

\n\n\n\n

Las siguientes personas contribuyeron a este mes en WordPress: @rmartinezduque, @laurlittle.

\n\n\n\n

Traducido de wordpress.org/news

\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://wellformedweb.org/CommentAPI/\";a:1:{s:10:\"commentRss\";a:1:{i:0;a:5:{s:4:\"data\";s:76:\"https://es-mx.wordpress.org/2023/09/13/el-mes-en-wordpress-agosto-2023/feed/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:38:\"http://purl.org/rss/1.0/modules/slash/\";a:1:{s:8:\"comments\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:7:\"post-id\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"982\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}s:27:\"http://www.w3.org/2005/Atom\";a:1:{s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:0:\"\";s:7:\"attribs\";a:1:{s:0:\"\";a:3:{s:4:\"href\";s:38:\"https://es-mx.wordpress.org/news/feed/\";s:3:\"rel\";s:4:\"self\";s:4:\"type\";s:19:\"application/rss+xml\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:44:\"http://purl.org/rss/1.0/modules/syndication/\";a:2:{s:12:\"updatePeriod\";a:1:{i:0;a:5:{s:4:\"data\";s:9:\"\n hourly \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:15:\"updateFrequency\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"\n 1 \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:30:\"com-wordpress:feed-additions:1\";a:1:{s:4:\"site\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"65529093\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}}}}}}s:4:\"type\";i:128;s:7:\"headers\";a:11:{s:6:\"server\";s:5:\"nginx\";s:4:\"date\";s:29:\"Mon, 12 Oct 2026 15:04:54 GMT\";s:12:\"content-type\";s:34:\"application/rss+xml; charset=UTF-8\";s:4:\"vary\";s:37:\"Accept-Encoding, accept, content-type\";s:6:\"x-olaf\";s:3:\"⛄\";s:13:\"last-modified\";s:29:\"Thu, 01 Oct 2026 17:02:15 GMT\";s:4:\"link\";s:64:\"; rel=\"https://api.w.org/\"\";s:15:\"x-frame-options\";s:10:\"SAMEORIGIN\";s:16:\"content-encoding\";s:4:\"gzip\";s:7:\"alt-svc\";s:5:\"clear\";s:4:\"x-nc\";s:13:\"EXPIRED dca 1\";}s:5:\"build\";i:1760643936;s:21:\"cache_expiration_time\";i:1791860695;s:23:\"__cache_expiration_time\";i:1791860695;}', 'off'); +INSERT INTO `xm_aca_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES +(2737, '_site_transient_timeout_feed_d117b5738fbd35bd8c0391cda1f2b5d9', '1791860695', 'off'); +INSERT INTO `xm_aca_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES +(2738, '_site_transient_feed_d117b5738fbd35bd8c0391cda1f2b5d9', 'a:6:{s:5:\"child\";a:1:{s:0:\"\";a:1:{s:3:\"rss\";a:1:{i:0;a:6:{s:4:\"data\";s:3:\"\n\n\n\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:7:\"version\";s:3:\"2.0\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:1:{s:7:\"channel\";a:1:{i:0;a:6:{s:4:\"data\";s:112:\"\n \n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"WordPress Planet\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:28:\"http://planet.wordpress.org/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:8:\"language\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"en\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:47:\"WordPress Planet - http://planet.wordpress.org/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"item\";a:50:{i:0;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:63:\"OpenStation Blog: What WordPress would have looked like in 1995\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1457\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"https://openstation.blog/2026/10/12/what-wordpress-would-have-looked-like-in-1995/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:3391:\"

I’ve been wondering how far a theme can take OpenStation. Not just a wallpaper and a different color, but everything: windows, dock, menus, fonts, icons, layouts, etc. So I tried to make wp-admin look like two operating systems from a long time ago.

\n\n\n\n
\"The
Can you believe that this is still WordPress? Turns out that the web is still fun! You only need WordPress, OpenStation, and one of these two themes.
\n\n\n\n

Retro 95 reimagines wp-admin as Windows 95. It even comes with a Start menu! And the classic clock sitting in the bottom-right corner is also there. You can try it live.

\n\n\n\n
\"wp-admin
\n\n\n\n

Retro 84 is the counterpart for Apple fans. It turns wp-admin into the first graphical OS that many people ever saw: the original Macintosh’s System 1. The beloved monochrome display, the classic pixelated font, and more! Check out the live demo.

\n\n\n\n
\"wp-admin
\n\n\n\n

And here’s a fun fact: every icon is pixel art typed into a text file, one character per pixel. The fonts were also made the same way, letter by letter.

\n\n\n\n
\"For
\n\n\n\n

Underneath, it’s the same wp-admin as always, just a few decades older.

\n\n\n\n

If you want to build your own theme, the docs list everything a theme can change. Maybe it’s time for a proper Windows Vista comeback.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 12 Oct 2026 11:31:07 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Miguel Torres\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:1;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:76:\"Open Channels FM: Building Stability Through Diversification in Tech Careers\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563193\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"https://openchannels.fm/building-stability-through-diversification-in-tech-careers/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:221:\"In a fast-evolving tech industry, professionals are embracing diversification for stability and growth. This strategy fosters financial security, creativity, and adaptability, preparing individuals for unforeseen changes.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 12 Oct 2026 09:18:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:2;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:91:\"Open Channels FM: OCN Week in Review #5: Scale, Adaptation, Verification and Infrastructure\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563443\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:94:\"https://openchannels.fm/ocn-week-in-review-5-scale-adaptation-verification-and-infrastructure/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:287:\"This week on Open Channels News, discover how AI is changing hardware, security reports, and gaming, plus the latest WordPress and enterprise data updates. Explore our concise wrap-up of major open source and tech stories, along with the recurring themes shaping the industry’s future.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 09 Oct 2026 13:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:3;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"Open Channels FM: Why Learning from Younger Colleagues Keeps You Fresh in Tech\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562359\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:85:\"https://openchannels.fm/why-learning-from-younger-colleagues-keeps-you-fresh-in-tech/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:210:\"To thrive in the evolving tech industry, professionals should engage with younger colleagues, embracing their fresh perspectives to foster adaptability, resilience, and ongoing personal and professional growth.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 08 Oct 2026 14:06:27 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:4;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:93:\"Open Channels FM: How Open Channels FM Balances Human Content with the AI Transparency Report\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563412\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:100:\"https://openchannels.fm/how-open-channels-fm-balances-human-content-with-the-ai-transparency-report/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:101:\"Learn how Bob Dunn chose to create a AI Transparency Report for the Open Channels FM Podcast Network.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 08 Oct 2026 12:00:34 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:5;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:87:\"Open Channels FM: Meta Opens Muse to DIY Hardware, GPT-6 Plays WoW Blind, and BootLoops\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563398\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:92:\"https://openchannels.fm/meta-opens-muse-to-diy-hardware-gpt-6-plays-wow-blind-and-bootloops/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:204:\"Open Channels News host Robert shares AI\'s evolving role, highlighting Meta\'s Home Link for hardware integration, GPT-6 Astra\'s gameplay without visuals, and BootLoops enhancing scientific research tools.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 07 Oct 2026 15:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:6;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:67:\"WPTavern: #236 – Brian Coords on WordPress as the Source of Truth\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"https://wptavern.com/?post_type=podcast&p=208932\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:81:\"https://wptavern.com/podcast/236-brian-coords-on-wordpress-as-the-source-of-truth\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:57954:\"
Transcript
\n

[00:00:19] Nathan Wrigley: Welcome to the Jukebox Podcast from WP Tavern. My name is Nathan Wrigley.

\n\n\n\n

Jukebox is a podcast which is dedicated to all things WordPress. The people, the events, the plugins, the blocks, the themes, and in this case, making WordPress the source of truth across web projects, not just the website.

\n\n\n\n

If you’d like to subscribe to the podcast, you can do that by searching for WP Tavern in your podcast player of choice, or by going to wptavern.com/feed/podcast, and you can copy that URL into most podcast players.

\n\n\n\n

If you have a topic that you’d like us to feature on the podcast, I’m keen to hear from you and hopefully get you, or your idea, featured on the show. Head to wptavern.com/contact/jukebox and use the form there.

\n\n\n\n

So on the podcast today we have Brian Coords. Brian’s journey started in teaching and after a surprise detour, thanks to a growing family and a need for new work, he jumped headfirst into WordPress, spending a decade in agency and freelance roles before landing as a developer advocate at WooCommerce. He’s known for his knack for explaining the complicated parts of WordPress, championing documentation, blogging, podcasting, and bridging the gap between community needs and product development.

\n\n\n\n

Brian recently delivered a talk at WordCamp US entitled, The Site is the Source of Truth, Block Themes, AI and Agency Workflows, and that’s the focal point for our conversation.

\n\n\n\n

We start with Brian’s background in both education and development, and how he finds his DevRel role the perfect bridge between those worlds. We then get into the evolution of WordPress from its early days to the present, questioning just what it is that has given the platform such staying power, especially as agencies race to adopt shiny AI tools or static site builders, and are tempted to throw WordPress out with the bath water.

\n\n\n\n

Brian sees unique value in the WordPress ecosystem, especially for sites with longstanding content, integrations, and complex needs. And he makes the case for why the platform is built to last.

\n\n\n\n

We talk through the idea of the site as the source of truth, using WordPress, and increasingly block themes, not only as a publishing platform, but as the repository for all your design, content, and workflow guidelines. Instead of letting generative AI run wild, and potentially cause chaos, Brian outlines how agencies and product teams can centralise approved patterns, templates, and even content guidelines directly in the WordPress site, helping both AI and human users maintain brand and design consistency.

\n\n\n\n

We also unpack the state of block themes, why agency adoption is taking longer than expected? What’s coming soon for WooCommerce users, and how the move to block-based building is reducing plugin sprawl and making sites more resilient. And of course, we wrestle with the tight rope walk of what should go into WooCommerce Core, versus what is better left to the ecosystem, especially in a world where AI can spin up basic plugins in seconds.

\n\n\n\n

If you’re curious about how WordPress agencies can survive and thrive alongside AI, what the future holds for block themes, and how to build smarter, more sustainable workflows, this episode is for you.

\n\n\n\n

If you’re interested in finding out more, you can find all of the links in the show notes by heading to wptavern.com/podcast where you’ll find all the other episodes as well.

\n\n\n\n

And so without further delay, I bring you Brian Coords.

\n\n\n\n

I am joined on the podcast by Brian Coords. Hello, Brian.

\n\n\n\n

[00:04:05] Brian Coords: Thank you for having me.

\n\n\n\n

[00:04:05] Nathan Wrigley: Oh, you’re so welcome. Brian and I were supposed to record this podcast episode at WordCamp US, but, Jamie Marsland.

\n\n\n\n

[00:04:14] Brian Coords: He ruined it, yeah.

\n\n\n\n

[00:04:16] Nathan Wrigley: Yeah, we’re going to blame him. We had another engagement, which was to watch Jamie Marsland. But I appreciate you giving me the time after your WordCamp US experience. We’re both back home now.

\n\n\n\n

But if anybody isn’t familiar with you, Brian, we’re going to be talking a little bit about a presentation that you did at WordCamp US. That’s going to be the fulcrum around which the conversation goes. I’m going to encourage everybody, probably to go and look at the WP Tavern show notes, check them out. We will link to that presentation, which is called The Site is The Source of Truth: Block Themes, AI, and Agency Workflows.

\n\n\n\n

Hopefully gives you some intuition of what we’re going to talk about. Brian, do you just want to tell the audience a little bit about you? I know it’s a rather generic question, but tell us about you, your background, lo these many years.

\n\n\n\n

[00:04:58] Brian Coords: Yeah, so currently I work at WooCommerce as a developer advocate, so just working on community documentation, release posts, the blog, all that kind of communication stuff for WooCommerce.

\n\n\n\n

But before that, I spent like 10 years in the agency and freelancer world building WordPress sites, so I leaned on that for WordCamp US. Especially because you can only talk about WooCommerce so much at a WordCamp, so I leaned on my agency background and figured block themes, AI, all this stuff mixing around, what can I try to make sense out of it, and I don’t know if I did, but I got some thoughts out.

\n\n\n\n

[00:05:34] Nathan Wrigley: I remember a couple of years ago, prior to you getting that job, you were doing various bits and pieces, one of which actually for a tiny period of time was writing for The Tavern. And then I remember you getting the job. I was looking at your profile on social media, I think, and you landed the developer relations job, and I thought, “Oh, if ever there was a job which fitted a character,” it felt like you had dropped into something absolutely ideal. Do you just want to tell us what that role actually involves? And is it as ideal as it sounds for somebody of your characteristics?

\n\n\n\n

[00:06:03] Brian Coords: Yeah. To be honest, I saw that that was a type of job that existed in tech, and before I worked in any web development, I was a teacher. I was a high school teacher, so kind of wanted to bring back teaching and writing into what I did as a day job. So I saw that’s what a developer advocate, that’s like what DevRel does, and I basically spent like a year or two doing it for free, to prove that I could do it and get a job. And was like, “I’ll just pretend to be one, and then eventually somebody will pay me”,. And that’s kinda how it worked out.

\n\n\n\n

I mean that’s basically the job, is you’re teaching, you’re doing a lot of writing, you’re doing a lot of explaining things, you’re taking a lot of community feedback and bringing it back internally and saying, “This is what people are asking for, this is what they like or don’t like about the new feature”. You’re just bridging that communication gap, but you are also not responsible for any code, and that’s the best part of it. I’m less stressed about code overall.

\n\n\n\n

[00:06:57] Nathan Wrigley: I’m just going to go totally off piste here because I want to dig into what you said there, because I find that really interesting.

\n\n\n\n

One of the most important pillars of, I think, every society is the education piece, particularly of the younger generation, the children. I have reasons to be into that, but I won’t share them here. But, very, very meaningful to me.

\n\n\n\n

Do you miss that aspect of life? Obviously there’s a reason that you stepped away from that. Perhaps it was paperwork or burnout or whatever it may be. But do you miss the kind of face-to-face bit? Because obviously I’m imagining that you were, there was you, Brian, at the front talking to actual humans who you could reach out and touch if you needed to. How does this map to that, and the desire that you obviously once had to be an educator with real humans inside a real classroom?

\n\n\n\n

[00:07:39] Brian Coords: I left it sort of accidentally. We got pregnant with our first kid and needed to move, and I just needed to find a job closer to home. And it just was an accident, and I stumbled into WordPress and tech and everything. And so, I did miss it and I felt, I think I had an experience where I spoke at a WordCamp and I was like, it felt like teaching, because it was like I know everybody in the room. This is a community, I know everybody, I have a relationship with them. I’m up in front of the room talking to them, but they’re also yelling at me and heckling me because we know each other so well.

\n\n\n\n

So it reminded me of that vibe. So I kind of did look for this job as a way to bridge the two things, the WordPress and the tech side, and also a chance to do writing and teaching and bring it back a little bit. And maybe one day I’ll go back to a classroom or something.

\n\n\n\n

[00:08:27] Nathan Wrigley: Yeah, maybe. One of the curious things that I think about when you see education done well online, you watch somebody’s YouTube content or wherever that content may land. You sort of get the impression that they just turned on the camera and began. Oh, they’ve added in some animations, and they’ve cut and done transitions and things like that.

\n\n\n\n

But for every, let’s say 30 minutes that you produce online, is there, an hour, two hours, three hours of thinking it through, figuring out the pedagogy, who’s the audience, how do you write to their skill level? Just talk us through that bit a little bit, and I promise that’s the last off-piste bit we’ll do.

\n\n\n\n

[00:09:03] Brian Coords: Yeah, I mean, for everything that I record, I spend a lot of time doing drafts of it. I’ll try to write the whole thing and just, what would this look like if I wrote the whole thing out?

\n\n\n\n

And then, I’ve tried doing, a prompter where you read into the camera, and that never feels natural, it doesn’t work. But if I do three or four takes of it, by the time I get to that fourth take, I’ve internalized it, and then I can free flow it after that. And that’s how I approach my talk at WordCamp, where I just kept doing it personally, to the point where I felt like I could just say the stuff naturally.

\n\n\n\n

But I do bring in some of the teaching stuff of thinking about what is the student doing at the time? What are their goals? What is the one thing that they should walk away from this? And I try to bring as much of that into it, but, it’s hit or miss, you know.

\n\n\n\n

[00:09:49] Nathan Wrigley: Yeah, I guess one of the things that you always were going to miss is the sort of the feedback loop of having people in front of you, you know you’re, if all the children in front of you are gazing at the floor, then you know you’ve definitely pitched it incorrectly and you probably need to rethink. But you’re not necessarily going to get that shooting YouTube videos, but perhaps would, inside of a WordCamp. I can see you nodding, I hope that’s not actually what’s happened.

\n\n\n\n

[00:10:12] Brian Coords: Yeah, your YouTube comments are pretty close to being in front of a bunch of middle schoolers, right? That’s pretty similar. But the face-to-face and being in a real room is important. That’s why I took this job too, is more WordCamps, more Meetups, more time in person, but also I don’t have to leave my house every day.

\n\n\n\n

[00:10:29] Nathan Wrigley: Yeah, there is that.

\n\n\n\n

[00:10:30] Brian Coords: I get a balance.

\n\n\n\n

[00:10:30] Nathan Wrigley: That’s really nice, isn’t it? Yeah, so you can be working at the time of day that suits you and your family.

\n\n\n\n

Okay, so back on the piste. The title of the presentation, as I said, is The Site is the Source of Truth, Block Themes, AI, and Agency Workflows. I’m just going to read some of the blurb just so that the listener has context, and it goes like this.

\n\n\n\n

“Block themes give WordPress an opportunity to become more than a publishing tool or a place where finished designs are implemented. With the right theme structure, patterns, templates, and brand guidelines, a WordPress site can become the source of truth for how new pages and layouts should be built. That matters even more as agencies begin using AI in their build process. AI is useful when it can work from existing pieces, approved patterns, real content, design tokens, reusable blocks, and known template structures. It is much less useful when it starts every landing page from scratch.”

\n\n\n\n

And it goes on, but I’ll stop there. Do you want to just summarize what you actually did in that presentation? Then we’ll dig into the bits and the pieces.

\n\n\n\n

[00:11:27] Brian Coords: Yeah, so you submit the idea for a talk months before a conference, and then you get to the conference and three weeks ahead they tell you, “Hey, your talk got selected.” I submitted a couple. That was the one they picked, and then I read all that and I thought, “Did I write that?” I couldn’t even remember writing all that.

\n\n\n\n

But it, the timing actually worked out because we are doing a block theme in Woo right now, and I’m spending a lot of time focusing on that. It all lined up. But I definitely read that description, and I had already started working on some slides and I thought, “Oh, I don’t know how much this lines up to what I actually am presenting.”

\n\n\n\n

But I think the goal of what I wanted to do is talk about, I feel like a lot of agencies these days are saying, “We don’t need WordPress. We’re moving to static sites. We’re just letting AI vibe code everything on our sites.” And I wanted to kind of say there’s some value in the systems that WordPress has. It’s maybe a little more work, but there’s reasons for it.”

\n\n\n\n

And I ended up doing a history lesson of, “Here’s where WordPress started. Here’s where we took the journey of why things are the way they are, and the benefits for agencies.” and so I kind of ended up in a place where I got to that topic, but I did a lot of rambling throughout the presentation. I felt like the context was really important. The like, why are we here? Why is WordPress the way it is.

\n\n\n\n

[00:12:45] Nathan Wrigley: Yeah. Okay, that’s really interesting. So you said there, values in the systems that we have, and we’ll explore that in a moment. But technology’s such a weird one, isn’t it? In that most of the evolution of humans, we come up with ideas and then we finesse them a little bit. We adapt them over time, but it can be, a decade, 100 years before any major improvement takes place. You think the printing press, it just carried on as that printing press for many hundreds of years before it got slightly tweaked with linotype and things like that.

\n\n\n\n

But technology seems to be quite happy to wholesale throw the baby out with the bathwater on a more or less continuous cycle. So, why then do you feel that WordPress should buck that trend in the advent of AI? Like, why does it stand a chance when AI systems are becoming ultra-capable, static sites, or just talk to your agent and it’ll just build whatever you want. What is it? What’s the intrinsic value that you think will mean that it will be around in a, I don’t know, 5 years, 10 years, whatever that may be?

\n\n\n\n

[00:13:42] Brian Coords: Yeah, I think that’s a question everyone’s asking, which is, “Is there a unique value to WordPress that you can’t replace with AI?” And I think some people will point to the community and just the ecosystem and the fact that so many solutions already exist. I feel like AI is really good when you have nothing, and you’re going from zero to one. I have nothing and I’m going to make something brand new.

\n\n\n\n

Once you get to something where you’ve had a site for 10 years and it has tons of content and tons of authors and all these integrations and all these sorts of things, AI is helpful, but everything has to move a little slower, everything has to be a little bit more resilient, and those are the places where having a little framework underneath, something like WordPress holding everything together, ends up being a little bit more valuable. But it’s definitely changing when you would use it, when you would reach for it, and I think that’s the part people are struggling with right now.

\n\n\n\n

[00:14:30] Nathan Wrigley: Yeah. There’s so many examples in my life where there’s a new innovation, but I stick with the older thing, just because it’s tried and it’s tested, and I know the limitations of it and I know what I can do with it. So maybe that’s a good comparison.

\n\n\n\n

It will be interesting to see how AI is able to adapt and just simply build things which are robust and usable. But I think at the moment, the core promise for anybody trying to sell a website to a client, for example, is exactly that. It’s reliable. It’s battle tested. It’s been used on millions of sites all over the world, and it’s got a familiar interface and you can go in and do this, that, and the other thing, and click save and publish and what have you, and it’ll just work. Whether or not that remains the case a, a decade from now, I guess only time will tell.

\n\n\n\n

But, have this idea in your presentation of the site being the, and you said the, source of truth. What did you mean by that? What is the underpinning of that? What are the bits that kind of spin off if the WordPress site is the source of truth, what are the bits that sort of rely on that foundation?

\n\n\n\n

[00:15:28] Brian Coords: Yeah, I think one of the things that people see when they start using AI is it will just do whatever it wants. So you could ask it for two pages on your site, and they might look completely different. It might pull in some design trend here. The language might be completely different on this other one. It might not understand your audience and your values.

\n\n\n\n

And so with AI, you end up doing a lot of shepherding that’s kind of like, “well, no, this is the target audience. This is my color palette. This is the design things I like to use.” And so I leaned a lot in the talk to things like patterns in WordPress. Where, it’s something we do in WooCommerce where we have a designer, they’re very talented, they make really nice patterns that really conform to our brand. And then AI can go in and say, “pull the patterns down from the site first and use those. Don’t spin up crazy new designs. Use the ones that our human designer put a lot of care and effort into, that live in the pattern library on the website.”

\n\n\n\n

And so the more you put into the website and the more you train AI to, don’t go crazy and create new things, use the stuff I already have, use the tools I have, that I think makes things a little bit more reliable, a little bit more consistent. And so I think for agencies, finding ways to put stuff into the website that’s going to help the AI, and guide it directly to doing things the right way. Instead of it always wanting to like, come up with some brand-new chunk of code that you now have to look at. So that was kind of a part of it definitely.

\n\n\n\n

[00:16:52] Nathan Wrigley: So, what you’re saying there is instead of having all these disparate things like, I don’t know, you’ve got a Figma file over there. And you’ve got a Google document over here. And you’ve got another three different things and you can’t really figure out where the heck they are.

\n\n\n\n

Put it all in a WordPress website, and from the point of view of the design, patterns would fit beautifully for that. You can organise your typography, and basic colour palettes, and layouts, and the way things ought to look. And I don’t know, here’s two dozen ways that we might structure a page. Lock all of that away. You don’t necessarily have to publish it anywhere on the front end, but the AI can go and creep around in there and get some guidance.

\n\n\n\n

But then also presumably you could do the same with, I don’t know, your writing style. You could have draft posts where you outline the manner in which you would like to convey your company. And the words which are off limits, or the words which are definitely going to be used. So in that sense because WordPress can do video, it can do audio, it can do designs, it can do layouts and typography, why not just have that as the source of truth? Is that a sort of summation of what you were saying?

\n\n\n\n

[00:17:54] Brian Coords: Yeah, I think that’s essentially right. And I talked a little bit about, there’s a project in WordPress called Content Guidelines, I think, and it does that. Where you put in a lot of your rules. And then I also talked, a lot of agencies use GitHub and Git repos for their WordPress sites, and in there you can do things like having agents files, and skills and stuff that share across your team.

\n\n\n\n

So sometimes it’s in WordPress, sometimes it’s in that kind of GitHub code base for your website. So it depends on your agency’s workflows and stuff. But the point is, everybody puts stuff in the same place, because when I worked at an agency, it was that. It was, they used Figma and they used XD, and they have a Google Doc with all the technical specs, and then there’s 15 emails from the client. And AI actually is really good at taking all those things and putting it in one place and building a little knowledge base. And then when you bring on another developer, their AI is going to know exactly where that is, and it’s going to make things a little bit more scalable.

\n\n\n\n

So it’s just an organizational principle, like just cleaning things up, putting stuff in one space, and making WordPress sort of the home for that, instead of using all these different tools that maybe you don’t need, or maybe you’re going to lose access to.

\n\n\n\n

[00:19:00] Nathan Wrigley: I can’t remember the name, I think you just called it content guidelines or something like that. I can’t remember the name of that project, and I also can’t remember whether the intention is to ship that in Core at some point.

\n\n\n\n

That seems like a really curious idea. Presumably it’s a non-public facing repository of, I’m doing air quotes, “stuff”. So you just dump into there all of the different bits and pieces. Presumably by trial and error over many iterations, you’ll figure out exactly what the agent’s creeping around in your site, and that content guidelines portion of your site is going to be able to take from that.

\n\n\n\n

And you would amend it, and then when you begin another client site, that would be your first port of call. Get your client guidelines figured out, get that set of constraints worked out, and then move on with the design process.

\n\n\n\n

That’s a really neat idea. Somewhat hidden from the public, but pretty neat. Now, I don’t really deal with agencies. I don’t have any communication with them. Do you have a sense that they’re open to these ideas, or it’s just some sort of curiosity which the core team think they might ship, but who knows whether anybody will use it? Have you got intuitions that this would be used?

\n\n\n\n

[00:20:00] Brian Coords: Yeah, that’s been an interesting one. That content guidelines feature almost shipped, and then it got pulled at the last minute and was kind of like, “Let’s see some real world usage of this.” I think it’s probably really helpful for big news publications. That’s what I’ve heard a lot of. Where they have 20 authors and they want to make sure their authors are doing the right thing, and so that makes sense.

\n\n\n\n

I think for agencies, a lot of the ones I talk to, they really, they like putting things in GitHub. That’s where they like to put stuff, and they like putting it in the code. I don’t know if they’ll put it in WordPress, but I think it’ll be interesting to see. But I feel like we’re all just dealing with, there’s just tons of content, and markdown files, and prompts and skills and all these overwhelming amounts of things, and it’s like everybody together is trying to figure out what are the best ways to do this. And I think it’s just fun to explore the ideas and see. In two years maybe we’ll all have the answer to this.

\n\n\n\n

[00:20:54] Nathan Wrigley: Yeah. We’ll have a fresh set of new problems in two years.

\n\n\n\n

[00:20:57] Brian Coords: Yeah.

\n\n\n\n

[00:20:57] Nathan Wrigley: It was curious there, we’d been talking about AI for a while and then when you, corroborated your examples there, you described the humans using it, which I thought was quite interesting. So you’ve got these 20 people working for, let’s say, TechCrunch or something like that. Big organization, lots of editors, lots of authors and what have you. But even if the AI never touches base on that, just the idea that the humans can access it in a human-readable way, not all about the AI.

\n\n\n\n

Just that seems worth shipping. If all that you do is have some mechanism to show brand new author to techcrunch.com, how you would like things to look and feel and what have you, that seems like a reason to ship it even if the AI portion isn’t launched at the beginning.

\n\n\n\n

[00:21:38] Brian Coords: I think everybody’s explored, I know I did, where you go all in on AI and it’s going to write all my stuff, and it’s going to do all these things for me. And then internally we’ve had a, I forget what the post, but somebody wrote this kind of, writing is for humans post, and a lot of people in the company rallied around that. Which is like, it was fun to let AI do some stuff, but writing is important, and writing should be done by humans. We don’t want to put AI content out. So at the end of the day, we expect humans to write, and we still really value that, and writing is a valuable thing in and of itself.

\n\n\n\n

But then AI can come in a little later and say, “Well, maybe I’ll review it for you. Maybe I’ll give you some feedback and you can take it or not.” But it’s been an interesting, I feel like there was a pendulum where AI will do everything, and now it’s like, no, I think we’ll find the places for it to make things move faster, but there’s just still human value, and I’m glad to see that pendulum maybe coming back, at least internally for us it is.

\n\n\n\n

[00:22:34] Nathan Wrigley: Sorry, going slightly off piste here, but I have an intuition that by the time another decade has passed, I think there is a version of the universe in which people have become really sick and tired of AI. I think it’s a really plausible future that some things will be viewed with enormous incredulity and skepticism if there’s any hint of it being done by an AI.

\n\n\n\n

So perhaps that won’t be design. Perhaps it won’t be music. Perhaps it won’t be coding. But I’ve got a feeling that writing, especially fictional writing and things like that, but also opinion pieces and things, I think that is highly likely to become, once again, the domain of a human being. And I know for certain that my own children are very skeptical about AI and the future that’s presenting. So yeah, I welcome that commentary. I’ll leave it there if you’ve got anything to follow up with. If not, I’ll ask another question.

\n\n\n\n

[00:23:22] Brian Coords: Yeah, I go back and forth on it. I’ve never listened to AI music, and I don’t think I ever will.

\n\n\n\n

[00:23:28] Nathan Wrigley: No.

\n\n\n\n

[00:23:29] Brian Coords: Maybe I have and I just don’t know it.

\n\n\n\n

[00:23:31] Nathan Wrigley: Curiously, I bet you have. Yeah.

\n\n\n\n

[00:23:32] Brian Coords: Yeah, I probably have. AI writing is the same way. It’s if you can’t tell that it’s AI, will that matter? And I think at the end of the day it will, because I don’t read things unless I know who the author is and I’m interested in their perspective, and I don’t really listen to music if I don’t know, I like to know the story of the band, and I like to know the context. If I’m reading a book, I like to know when the author lived and what culture they’re filtering everything through and, yeah, maybe we’ll be unique and some people will just want to doom scroll AI videos of cats, but I never did that before, so I don’t know if I’ll do it starting now.

\n\n\n\n

[00:24:05] Nathan Wrigley: No, but curiously, it might offer a slight marketing edge, let’s put it that way. If you can certify provably that you are the real thing. Whether that be in the music space and you simply have to record the process of you going through the process of creating a song with all of the mistakes, and heartache, and anguish that that is.

\n\n\n\n

But I feel that maybe there will be a craving for that in the future. Maybe people will literally work harder to find people online who are provably writing their own material, be that songs or making videos or writing and what have you.

\n\n\n\n

So we’ve all been swamped AI and been beguiled by it, I think as you’ve said, the pendulum feels like there’s a bit of a swing in the other direction, and it might be that you can have a marketing edge simply because you’re actually taking the time to, to write things out. So anyway, there you go.

\n\n\n\n

Let’s move on slightly. So block themes. You were mentioning that at Woo you’re currently playing with a block theme. I don’t know how many of those are actually in the bag already and out there in the wild coming directly from Woo. But it does feel that many years ago block themes were being touted as the thing.

\n\n\n\n

It feels like it didn’t turn out quite the way we expected. There hasn’t been this deluge of block themes, and everybody’s put the classic themes behind them. I think people are clinging to classic themes for a variety of reasons. Do you want to just talk about why you think block themes fit into this whole agency source of truth piece as well?

\n\n\n\n

[00:25:28] Brian Coords: Yeah, block themes have been interesting. I’ve seen a lot of agencies that really start to like them, and agencies understand the value. I think, for a lot of existing websites, just changing your theme is hard. There has to be a really good reason to change your theme, because who knows what’s going to break? Who knows how everything is going to work, especially with e-commerce? It’s like if it’s not broken, don’t touch it. There better be a good reason for it.

\n\n\n\n

And so I think in some ways for a lot of people, block themes for existing sites maybe haven’t given them a really good reason to switch yet. But I think it will for a number of reasons. I was actually just talking to a coworker about our block theme that we’re getting ready to launch. Probably by the time this is out, it might be in a public beta.

\n\n\n\n

But one of the things that was interesting is in WooCommerce, there was a theme called Storefront, which was like, that was the WooCommerce theme. And we’re doing a comparison right now, where if you wanted to move from Storefront to our block theme, Storefront had all these plugins. A plugin to do a header on your site, and a plugin to do a little mini cart, and a plugin to do product carousels, and all these plugins you would have to install. And that meant testing them and making sure they work and updating.

\n\n\n\n

And we did a comparison of how many of these things can you already just do in the block editor, and it was like 90% of it already exists in the block editor. And you don’t need a plugin for it, and you don’t need extra code, and you don’t need to buy a new extension. So I think people are starting to see the value of it, once they realize how much is just included. I can change anything. I don’t need a plugin to add this or that to my site.

\n\n\n\n

So I think there’s a lot of value to it, and it just ends up being a little safer because it’s just WordPress and WooCommerce and a theme that only has a little bit of styling. I’m not worried about the compatibility of plugins, and I’m not worried about paying for updates and all these sorts of things, and is it going to break on the next version?

\n\n\n\n

And so I think there’s a lot of value to it, and it just makes WordPress itself more the thing you’re relying on. You’re just relying on the blocks. You’re just relying on the things that WordPress gives you. So I think there’s going to be a lot of benefits to it, but yeah, we have not, there is no WooCommerce official block theme yet, but we’re hoping that there will be one soon.

\n\n\n\n

[00:27:31] Nathan Wrigley: One of the things that I thought block themes would tackle really quickly soon after launching, which never kind of ended up being the case, was for example, things like WooCommerce, atomising every bit of a WooCommerce site into a separate, let’s say block. So for example, I don’t know, the add to cart block, and the the I don’t know, show the quantity in the cart in the menu block, and yada, yada.

\n\n\n\n

And you go to the cart page or the payment page, and you would just fill it up with the blocks as you’d like, and add spacing and add margins and what have you. That never seemed to take off, but also I don’t know if it’s still talked about, or the promise of that is still something that you are hoping to deliver.

\n\n\n\n

Just talk us through where we’re at in terms of atomising the entirety of a WooCommerce site into individual blocks. So rather than dropping entire sort of templates or structures, you can pick and cherry pick. obviously there’d be dependencies. If you’ve got this, you must have that. But just tell us where we’re at.

\n\n\n\n

[00:28:28] Brian Coords: Yeah, so overall you can do that for most of a store. I think the only thing that doesn’t have blocks right now at all is like the account pages. Somebody logs in and they see their downloads and their order history and all that. That stuff is, I don’t even think is anywhere blocks at all. But that was one of the things as part of this process is, we looked at all the blocks, because there is a add to cart button block, and there is a quantity selector block, and there is a product image gallery block. I mean there’s like a, more than 100, maybe 200 blocks in WooCommerce.

\n\n\n\n

There’s a lot, but the thing that they were missing was the style controls, which is I think what a lot of people wanted. Which is if I have the button, is it going to look like every other button on my site? And can I customize it? Are all the form inputs on my checkout page going to look just like the drop down on my product selection page?

\n\n\n\n

And so that’s been the big push recently, like actually building the block theme, like 90% of the work of what they’re doing is just fixing the blocks, and making the blocks better. And the theme is just a very thin layer.

\n\n\n\n

So it’s gotten a lot better, and that’s kind of the goal is once we have our own theme we can show, okay, all this stuff is customizable and editable. And I think probably in the next release you’ll see a huge focus on those block style changes showing up in WooCommerce.

\n\n\n\n

[00:29:44] Nathan Wrigley: I have a curious question that you may or may not wish to answer. Let’s see how this one goes. If you, as you just described, you were talking about you don’t need a plugin for that. You don’t need to worry about an update or a payment for this thing. We’re bringing all that functionality into Core.

\n\n\n\n

I’m wondering what that tightrope looks like, where over there somewhere, part of the community, somebody’s got a paid plugin, which is the basis of their entire livelihood. But it just so happens that, we could really ship that in Core, and that would be really useful to have in Core. We reckon that 80% of the people who use WooCommerce will use that.

\n\n\n\n

How do you decide when something gets made and the obvious sort of community impact that that thing may have had? So as I said, that’s a tricky question. I will leave you to answer it or not.

\n\n\n\n

[00:30:31] Brian Coords: Yeah, it is a huge topic of discussion. James Kemp, who is the Core product lead has been pushing for more of these things in Core. And I think that the big question right now is, are a lot of the people making money on plugins going to be able to continue making money on some of those plugins with AI? Because there’s a lot of plugins that are 100 lines of code that an AI will happily spit out for you.

\n\n\n\n

And so I think the floor is raising on people building plugins. Where if your plugin isn’t doing anything super complicated, if it’s set it and forget it, then there’s probably not going to be a market for it in the future.

\n\n\n\n

But that said, there’s this whole other area of opportunity where there’s tons of plugins that need to be built still. There’s integrations that are really complicated that you don’t want to leave to AI. There’s things around modifying payments and modifying how your checkout works and different types of products. And all of that stuff I think is still available, and I think most people will choose to pay for those sorts of things.

\n\n\n\n

But if your plugin is something, I will just say we’ve, all the ones we’ve brought in are our own plugins so far. So this new WooCommerce release that’s coming out this week is different product variations can have image galleries on each variation. That’s a thing. But that was our plugin. So we took our plugin and we put it in Core, and gave it away for free. We don’t really try to go after if somebody’s got an established community plugin and they’re supporting it. We don’t want to go after them. But we are definitely cannibalizing a few of our own plugins, and turning off a little bit of revenue we get from those to put those in Core. And that’s, we think it’s worth it in the long run to just have a better WooCommerce.

\n\n\n\n

[00:32:09] Nathan Wrigley: I think that’s a really difficult tightrope to walk, isn’t it? Because obviously you would love to have every piece of functionality available in a, you know, easy to use manner in Core, or at least all the bits and pieces that were essential. But at the same time, there’s this delicate balancing act of the community, which at the moment seems to be, how shall we say it, in a holding pattern? Let’s go with that.

\n\n\n\n

There’s a lot of uncertainty, people who have this sort of utility plugin that does this one thing, as you’ve described, it may be 100, 200 lines of code. Where in the past that was probably going to make you some nice pocket change. It does feel like that is going away.

\n\n\n\n

So if that is the calculus upon which you’re basing whether you build something into Core or not, you’re potentially swooping in and creating something for which there is no business anymore anyway, Because now in the advent of AI, anybody with half a minute can whip that same functionality up, and you might as well have it all security checked and what have you inside of Core.

\n\n\n\n

But very difficult to figure out how to balance damaging, I suppose, is the wrong word, but it’s adjacent to what I’m after. Damaging relations with community members who are great great advertisements for building on top of WooCommerce, and yet shipping all these things in Core. Difficult. I’m glad, I don’t have to square that circle.

\n\n\n\n

[00:33:23] Brian Coords: Yeah, and we have a very vocal extension developer community. They give us feedback all the time. And some of them, I think they’re well aware that they’re much more likely to be threatened by AI, than they are us wanting the functionality of their plugin in Core.

\n\n\n\n

But there’s also a general sense in WooCommerce from, like the customers, which is, “Why do I need so many plugins?” And that’s kind of a concern and that fear of, when I update WooCommerce and I have 30 to 50 extensions, which is very normal for a WooCommerce store, is each one of those going to work? Do I have to worry about that?

\n\n\n\n

And so it is also a balance where it’s almost damaging WooCommerce that you need so many plugins just to run a store. And that why do I need a plugin for this and this, you know? So we’re trying to balance that, where we want to make it feel more secure and reliable.

\n\n\n\n

But also I think a lot of those plugins are much more threatened by AI than they are us getting around. We have plenty to work on before we get around to taking other people’s plugins. We have plenty to work on our own to improve basically WooCommerce, subscriptions, all the kind of Core stuff we already manage.

\n\n\n\n

[00:34:25] Nathan Wrigley: Yeah, I feel that in the WordPress space, the most likely bit to survive, is potentially WooCommerce. Just simply because there is so much that is at stake by messing up your website by injecting a bunch of AI slop. Again, I’m doing air quotes.

\n\n\n\n

Because, this is your revenue. If you take your site down for half a minute, that really could lose you, I don’t know, thousands of dollars in orders. But I don’t know if that’s your intuition as well. It feels like brochure sites, that is very much up for debate at the moment. We’ll have to see how the landscape goes with that. But it feels like the WooCommerce bit, the e-commerce of WordPress’s community, it feels like you’re on a bit of safer ground just simply because of the revenue that’s generated by those sites and the reluctance of people to meddle with them.

\n\n\n\n

[00:35:14] Brian Coords: Yeah. I mean that’s what I’ve been yelling internally, so I’m glad you agree. I think e-commerce is definitely much more, has a much stronger moat than static brochure sites. And I think that’s what people in WordPress are sort of dealing with, which is for all these sites that are on WordPress how many of them need WordPress? How many of them need this functionality? WooCommerce definitely. You need a database, and you need security, and you need updates and you need all this stuff.

\n\n\n\n

For a marketing brochure site, you probably didn’t need it to begin with, but WordPress was easier. So the question is for those simple marketing sites, do we make WordPress easier so that they can keep using WordPress, or do we say, “No, we’re going to lean in on publishing, commerce, really complicated, heavier duty sites that probably generate more money, but maybe the total market share goes down,” I don’t know. I think that is a big question.

\n\n\n\n

[00:36:05] Nathan Wrigley: Yeah, it’s interesting. I can imagine in a decade from now, the UI for a typical brochure site almost not even a UI. It’s something that we can’t really conceive of at the moment. It might be that, you speak to a thing, and the thing reacts and amends as necessary. Maybe WordPress will have to fight that territory to keep its market share.

\n\n\n\n

But I do feel that the WooCommerce side, I think people are going to be able to justify the time put in to logging into a platform and going through a list of products and adding, “Okay, I’ve got some shoes that I’m selling over here and they come in seven different varieties. I want to sell the shoes. I’m going to upload the color palettes for each of those shoe,”. There’s just some calculus of the work that needs to be done and the maintenance that needs to be done. I feel that you’re on much, much stronger ground as you described. So yeah, I think you’ve every reason to be sanguine.

\n\n\n\n

[00:36:52] Brian Coords: Yeah, and I still think people want to log in to something and look at something. Especially with e-commerce, they want to just see a screen of how their orders are doing. They don’t want to ask AI to generate that every single second that they want to see how many orders they have, and what their revenue is for that day and all their analytics. They just want to log in and see the thing that they see every day. They don’t need to vibe code that on the fly by asking AI to generate it, right?

\n\n\n\n

[00:37:15] Nathan Wrigley: Do you know that’s really interesting? I have genuinely never thought about the desire to log into a thing, but that actually makes a lot of sense to me.

\n\n\n\n

This is going to sound extremely out there, but I’m going to say it anyway. There is something of akin to getting home when you’ve been on a long journey, and you finally get to your own front door after sleeping in hotels, beds, and all of that. There’s just something quite nice about getting into you own environment and it’s, “Ah, I’m at home.”

\n\n\n\n

And I actually have started blogging again recently, and I get a real great feeling when I log in and all that familiar stuff is there, and, “Oh, look, there’s all the pictures that I’ve posted on this website these many years.” I think there’s something there. I think that’s really curious. The idea of logging into something, being purposeful about it. Not speaking to the exact same interface that you talk to every other thing to do the job. Having a place, a URL that you go to, the environments how you’ve set it up, I can’t believe I’ve never thought of that before, but I think that’s quite profound. I hope you’re right.

\n\n\n\n

[00:38:18] Brian Coords: Yeah. I hope I’m right too. I hope that there’s just some things in life you don’t want to ask an agent to go do for you, and you just say, “Let me just click on this and change this thing.” Some things are just faster than, “All right, I’m going to text my agent, and hopefully he does it right, and then he’s going to send me a screenshot that it got done.” I mean, I love doing that kind of stuff. I do it for some things, but yeah, sometimes you’re just, “show me that same dashboard.”

\n\n\n\n

[00:38:41] Nathan Wrigley: Yeah. And I do wonder in the years to come how ready we are going to be to submit all of that control. Just the idea that an essential part of your business, like your e-commerce site could be done by an AI with very little intuition as to what’s happening once that command has been given and it updates that stuff.

\n\n\n\n

But not just that you don’t know what that thing did, what the thousand other things that were done prior to that one prompt. Okay, it looks nice at the minute, but how did it even get there? Well that was about two years of prompting. Okay. All right. Can we unpick that? Not really. We haven’t the faintest idea how it got to this. Yeah, that’s really interesting. Okay. I think I’ve asked everything I wish to ask. Is there anything you wanted to get out before we knock it on the head, Brian?

\n\n\n\n

[00:39:24] Brian Coords: No, just hopefully we’re still here in five years, not just prompting away in our basements.

\n\n\n\n

[00:39:29] Nathan Wrigley: You know what? I think if you’d have asked me that question six months ago, I had less certainty than I do now. I think I’ve seen a sort of, tsunami is the wrong word, it certainly is not that, but a general sense out in the world at at large of distrust and a move towards the sort of more artisan side of life.

\n\n\n\n

And so I think it’ll be curious to revisit this conversation in a few years time and see how that pendulum has swung. If the AI overlords are listening to this in the year 2028, please do not come and get me. I was wrong. But there we go. Let’s hope that we’ve all got somewhere to stand, a beachhead to stand in a few years. That’d be nice to think about.

\n\n\n\n

Okay, Brian, thank you so much for chatting to me today. I really appreciate it.

\n\n\n\n

[00:40:10] Brian Coords: Thank you.

\n
\n\n\n\n

On the podcast today we have Brian Coords.

\n\n\n\n

Brian’s journey started in teaching, and after a surprise detour, thanks to a growing family and a need for new work, he jumped headfirst into WordPress, spending a decade in agency and freelance roles before landing as a Developer Advocate at WooCommerce. He’s known for his knack for explaining the complicated parts of WordPress, championing documentation, blogging, podcasting, and bridging the gap between community needs and product development.

\n\n\n\n

Brian recently delivered a talk at WordCamp US entitled “The Site Is the Source of Truth: Block Themes, AI, and Agency Workflows,” and that’s the focal point for our conversation. We start with Brian’s background in both education and development, and how he finds his DevRel role the perfect bridge between those worlds.

\n\n\n\n

We then get into the evolution of WordPress, from its early days to the present, questioning just what it is that has given the platform such staying power, especially as agencies race to adopt shiny AI tools or static site builders and are tempted to throw WordPress out with the bathwater. Brian sees unique value in the WordPress ecosystem, especially for sites with longstanding content, integrations, and complex needs, and he makes the case for why the platform is built to last.

\n\n\n\n

We talk through the idea of ‘the site as the source of truth’, using WordPress (and increasingly block themes) not only as a publishing platform, but as the repository for all your design, content, and workflow guidelines. Instead of letting generative AI run wild (and potentially create chaos), Brian outlines how agencies and product teams can centralise approved patterns, templates, and even content guidelines directly in the WordPress site, helping both AI and human users maintain brand and design consistency.

\n\n\n\n

We also unpack the state of block themes, why agency adoption has taken longer than expected, what’s coming soon for WooCommerce users, and how the move to block-based building is reducing plugin sprawl and making sites more resilient. And, of course, we wrestle with the tightrope walk of what should go into WooCommerce Core versus what is better left to the ecosystem, especially in a world where AI can spin up basic plugins in seconds.

\n\n\n\n

If you’re curious about how WordPress agencies can survive and thrive alongside AI, what the future holds for block themes, and how to build smarter, more sustainable workflows, this episode is for you.

\n\n\n\n

Useful links

\n\n\n\n

Brian’s website

\n\n\n\n

The Site Is the Source of Truth: Block Themes, AI, and Agency Workflows – Brian’s presentation at WordCamp US 2026

\n\n\n\n

WooCommerce

\n\n\n\n

Content Guidelines: A Gutenberg Experiment

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 07 Oct 2026 13:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Nathan Wrigley\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:7;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:54:\"Akismet: Upgrade to the official Akismet Drupal module\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:28:\"http://akismet.com/?p=285183\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:71:\"https://akismet.com/blog/upgrade-to-the-official-akismet-drupal-module/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:8721:\"
\"\"
\n\n\n\n

If your Drupal site still runs the community Akismet module (drupal/akismet), the official Akismet module (drupal/akismet_antispam) can upgrade it in place. You swap the Composer package, run database updates, and your API key and protection settings come along. We built it so you don’t have to uninstall, reinstall, and re-enter everything. This post walks through the steps.

\n\n\n\n

Which sites this covers

\n\n\n\n

The update needs Drupal 10.3 or later on PHP 8.1 or later. That covers sites on the community module’s 2.0.x releases and its 8.x-1.x dev branch.

\n\n\n\n

If you’re on an older setup:

\n\n\n\n
    \n
  • 8.x-1.0-alpha2 (Drupal 8 or 9): update the community module to 2.0.0-alpha2 while you update core, then follow this post.
  • \n\n\n\n
  • 7.x: upgrade Drupal first, then install the official module fresh. Your Akismet account and API key still work.
  • \n
\n\n\n\n

The migration guide on drupal.org has a table for every release if you’re not sure which one you run.

\n\n\n\n

Before you start

\n\n\n\n
    \n
  • Back up the database. The update only goes one way.
  • \n\n\n\n
  • Note which roles have “Bypass Akismet protection.” The update removes that permission (more on that below).
  • \n\n\n\n
  • Plan one deploy for the whole swap. Between the Composer change and drush updb, spam protection is off and some admin pages break, so don’t leave a gap between them.
  • \n
\n\n\n\n

What carries over, and what doesn’t

\n\n\n\n

These come along:

\n\n\n\n
    \n
  • Your API key
  • \n\n\n\n
  • Your connection timeout, if it’s between 1 and 60 seconds
  • \n\n\n\n
  • Your comment, contact and registration protection settings
  • \n
\n\n\n\n

These don’t:

\n\n\n\n
    \n
  • Check history. The community module’s akismet table is dropped, so the Spam tab starts empty. Those rows hold submitted content, including author emails and IP addresses, and the official module has no way to erase them later.
  • \n\n\n\n
  • Per-form settings. The community module could protect some comment types or contact forms and not others. The official module has one toggle per category, and it covers all of them.
  • \n\n\n\n
  • Per-form “discard spam.” This becomes one site-wide strictness setting.
  • \n\n\n\n
  • Test mode, custom API endpoints and the “block all submissions” outage policy.
  • \n\n\n\n
  • The “Bypass Akismet protection” permission. The update removes it from every role that had it. The official module’s equivalent is bypass akismet, and it isn’t granted automatically.
  • \n\n\n\n
  • Webform handlers. You’ll need to re-attach the Akismet handler to each webform that used it.
  • \n
\n\n\n\n

You don’t have to track any of this by hand. The update prints a report that names every item above that applies to your site.

\n\n\n\n

The migration

\n\n\n
\n
\n
\n \n
\n
composer remove drupal/akismet
composer require drupal/akismet_antispam -W
drush cr
drush updb
\n
\n
\n
\n\n\n

Run them in that order, back to back.

\n\n\n\n
    \n
  1. composer remove first, and leave the module installed in Drupal. Don’t uninstall it, because the update reads its database state. The official module’s composer.json conflicts with drupal/akismet, so Composer won’t install them side by side.
  2. \n\n\n\n
  3. composer require ... -W lets Composer update shared dependencies, like the Akismet PHP SDK or the PSR HTTP packages, if your lock file pins an older version. Without -W, Composer can refuse with “the package is fixed to … (lock file version).”
  4. \n\n\n\n
  5. drush cr before anything else. The community module shipped services that no longer exist, and Drupal still has them cached. Until you rebuild, logged-in pages return a 500 and drush commands die on shutdown. drush cr works when nothing else does.
  6. \n\n\n\n
  7. drush updb runs the update. Stay off the comment admin screens until it finishes.
  8. \n
\n\n\n\n
\n
\n \n \n
\n \n\n\n

Read the report. It’s also logged to watchdog, so you won’t lose it if your terminal scrolls away. Then export and commit the new configuration:

\n\n\n
\n
\n
\n \n
\n
drush cex
\n
\n
\n
\n\n\n

On every other environment, rebuild the cache before anything else touches it:

\n\n\n
\n
\n
\n \n
\n
drush cr && drush deploy
\n
\n
\n
\n\n\n

Check that it worked

\n\n\n\n
    \n
  • Settings: confirm your protection toggles at /admin/config/content/akismet.
  • \n\n\n\n
  • Status report: check the Akismet entries at /admin/reports/status.
  • \n\n\n\n
  • Test submission: post a comment as an anonymous user named akismet-guaranteed-spam. Akismet always flags that name, so the comment should land in the Spam tab.
  • \n
\n\n\n\n

Already on the official module 1.0?

\n\n\n\n

Upgrading to 1.1 is one command and a database update:

\n\n\n
\n
\n
\n \n
\n
composer update drupal/akismet_antispam -W
drush updb
\n
\n
\n
\n\n\n

The -W matters here. Version 1.1 needs Akismet PHP SDK 1.5, and if your lock file still pins 1.4, Composer stops with:

\n\n\n
\n
\n
\n \n
\n
drupal/akismet_antispam 1.1.0 requires automattic/akismet-sdk ^1.5 -> found automattic/akismet-sdk[v1.5.0] but the package is fixed to v1.4.0 (lock file version).
\n
\n
\n
\n\n\n

-W (short for --with-dependencies) lets Composer update the SDK along with the module.

\n\n\n\n

Questions

\n\n\n\n

If something in the report surprises you, or the update doesn’t go the way this post says, open an issue in the issue queue. The migration guide and the module’s README have the full details.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 22:13:52 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Derek Springer\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:8;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"WordPress.org blog: WordPress 7.1.3 Maintenance and Security Release\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://wordpress.org/news/?p=21753\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:84:\"https://wordpress.org/news/2026/10/wordpress-7-1-3-maintenance-and-security-release/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:5439:\"

This security and maintenance release features 7 security fixes and 4 bug fixes.

\n\n\n\n

Because this is a security release, it is recommended that you update your sites immediately.

\n\n\n\n

You can download WordPress 7.1.3 from WordPress.org, or visit your WordPress Dashboard, click “Updates”, and then click “Update Now”. If you have sites that support automatic background updates, the update process will begin automatically.

\n\n\n\n

Security updates included in this release

\n\n\n\n

The security team would like to thank the following people and organizations for responsibly reporting vulnerabilities, and allowing them to be fixed in this release:

\n\n\n\n
    \n
  • A stored XSS on the Comments administration page, exploitable via pending comments, reported by Trail of Bits in collaboration with OpenAI.
  • \n\n\n\n
  • A DoS issue in the WP_Http::make_absolute_url() method, reported by Anthropic
  • \n\n\n\n
  • A second-Order SQL injection in WordPress WXR export, reported by Anthropic
  • \n\n\n\n
  • A weakness allowing Author role users to sticky posts, reported by Anthropic
  • \n\n\n\n
  • Unauthenticated disclosure of comments on private & unpublished posts, reported by Ananda Dhakal from Patchstack
  • \n\n\n\n
  • Imgur embeds are vulnerable to XSS, reported by Zhengyu Liu, Jingcheng Yang, and Gavin Zhong
  • \n\n\n\n
  • Forgeable parameters passed to the {status}_{type} hook can lead to action name collision, reported by Alex Concha of the WordPress security team
  • \n
\n\n\n\n

Thank you to these WordPress contributors

\n\n\n\n

This release was led by Jake Spurlock.

\n\n\n\n

WordPress 7.1.3 would not have been possible without the contributions of the following people. Their asynchronous coordination to deliver maintenance and security fixes into a stable release is a testament to the power and capability of the WordPress community.

\n\n\n\n

Aaron Jorbin, Adam Silverstein, Adi Moldovan, Adrian Duffell, Alex Concha, Arkaprabha Chowdhury, Deepak Kumar, donniam, Ehtisham Siddiqui, Jake Spurlock, Jb Audras, Jeremy Felt, Joe Dolson, John Blackbourn, Jon Surrell, Jonathan Desrosiers, Ken Gagne, Khokan Sardar, Lance Willett, lucatume, marcs0h, Peter Wilson, Paul Kevan, RS Software, Rudy Faile, Sergey Biryukov, siliconforks, smerriman, Stephen Bernhardt, Suryakant Upadhyay, vortfu, webVerts, Weston Ruter, Yogesh Bhutkar

\n\n\n\n

Backports

\n\n\n\n

As a courtesy, the security fixes are being backported, where necessary, to all branches eligible to receive security fixes (currently through 4.7). As a reminder, only the most recent version of WordPress is actively supported. The backports are in progress and will ship as they become ready.

\n\n\n\n

How to contribute

\n\n\n\n

To get involved in WordPress core development, head over to Trac, pick a ticket, and join the conversation in the #core channel. Need help? Check out the Core Contributor Handbook.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 17:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Jake Spurlock\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:9;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:123:\"Open Channels FM: Open Source Maintainers Defend Against AI Spam, Linux Data Trends and WordPress Accessibility Challenges\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563376\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:128:\"https://openchannels.fm/open-source-maintainers-defend-against-ai-spam-linux-data-trends-and-wordpress-accessibility-challenges/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:130:\"AI-driven growth presents challenges in security and accessibility and infrastructure hurdles that technology teams cannot ignore.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 15:45:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:10;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"Open Channels FM: The Essential Human Touch in Genealogical Research\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562236\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:75:\"https://openchannels.fm/the-essential-human-touch-in-genealogical-research/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:382:\"As artificial intelligence becomes more integrated into genealogical research, it is tempting to imagine a future where longstanding mysteries are unraveled with a few keystrokes. AI tools can now scan, transcribe, and sort through centuries of records, but the heart of successful genealogy still depends on something machines cannot replicate: the human touch. No matter […]\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 10:42:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:11;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"OpenStation Blog: Someone Said “I Hate OpenStation.” That Was Actually Useful.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1400\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:93:\"https://openstation.blog/2026/10/06/someone-said-i-hate-openstation-that-was-actually-useful/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:5333:\"

A few days ago, someone opened a support thread about AllTerrain Forms and, in the middle of otherwise useful feedback, wrote something very direct: “I hate OpenStation.”

\n\n\n\n

Obviously that is not the nicest sentence to read when you are working on the product, but at the same time it immediately got my attention because this is exactly the kind of feedback that can be useful if you don’t take it personally.

\n\n\n\n

So instead of trying to explain why OpenStation is good, or why we made certain decisions, I asked a very simple question: what exactly makes you hate it?

\n\n\n\n

Her answer was actually very good.

\n\n\n\n

She works on a laptop, so screen space matters a lot. OpenStation was opening windows too small for her workflow, which meant that one of her first actions was always maximizing them. She also didn’t like losing the visible URL because she regularly copies URLs into emails, project trackers or messages. On top of that, her users are not very technical, and from her point of view OpenStation was adding another layer to WordPress that she would eventually have to explain and support.

\n\n\n\n

She basically said that browser tabs already exist, users understand them, they use the whole screen, and they don’t hide the URL.

\n\n\n\n

And I think this is exactly where building software becomes interesting, because from our side all of those decisions had reasons behind them, but reasons don’t really matter if the final experience is worse for the person using it.

\n\n\n\n

None of these are theoretical product discussions. They are very concrete things that someone hit while trying to use the software for real work.

\n\n\n\n

That matters a lot to me.

\n\n\n\n

We started discussing these points immediately, and one of them has already made it into the next OpenStation release.

\n\n\n\n
\"OpenStation
\n\n\n\n

Users will now be able to choose how new windows open: using the current default behaviour, maximized, or focused. Focused mode maximizes the new window and minimizes the other windows on the same desk, so people working on smaller screens can have something much closer to the experience they expect.

\n\n\n\n

This came directly from that kind of feedback, and the implementation is already merged:

\n\n\n\n

PR #964: Preferences: choose how newly opened windows appear

\n\n\n\n

And this is really the point.

\n\n\n\n

We obviously have our own vision for OpenStation. We believe WordPress can have a much better working environment than the traditional admin experience, and there are many things we still want to explore there. But having a strong idea of where the product should go does not mean pretending every decision we make is correct.

\n\n\n\n

Sometimes the most useful feedback is not “great release” or “this looks amazing”. Sometimes it is someone telling you that a window is too small, that they want the URL back, that something scrolls when it shouldn’t, or simply that they don’t see the benefit of what you built.

\n\n\n\n

That kind of feedback forces you to look at the product from outside your own head, which is probably one of the hardest things to do when you have been working on it every day for months.

\n\n\n\n

For me, OpenStation becoming more mature is not only about adding more apps, more features or more ambitious ideas. A big part of maturity is improving all those small things that make the product feel natural, predictable and less annoying to use.

\n\n\n\n

And I think there is also something important here about open source. People can complain, explain exactly what does not work for them, and a few days later they can literally see the code that changes that behaviour.

\n\n\n\n

That is a pretty healthy way to build software.

\n\n\n\n

So yes, tell us when OpenStation is great, but especially tell us when it sucks. We may not agree with every suggestion, and we obviously cannot build every requested feature, but if there is a real problem behind the feedback, we want to understand it.

\n\n\n\n

In this case, someone said “I hate OpenStation.”

\n\n\n\n

Fair enough.

\n\n\n\n

A few days later, OpenStation got better because of it.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 08:54:53 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:12;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Matt: Beeper MCP\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:23:\"https://ma.tt/?p=155119\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:33:\"https://ma.tt/2026/10/beeper-mcp/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:351:\"

Fellow Automattician Job Thomas, down in Cape Town, South Africa, has a lovely story about using Claude and the Beeper MCP to wrangle all the group chats for his daughter’s sports.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 06 Oct 2026 06:35:11 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"Matt\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:13;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:111:\"Open Channels FM: Technology’s Fast Feedback Loop with Triumph of the Nerds, Agile AI, and WordPress Security\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563290\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:113:\"https://openchannels.fm/technologys-fast-feedback-loop-with-triumph-of-the-nerds-agile-ai-and-wordpress-security/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:88:\"Faster tech means new challenges from AI feedback loops to WordPress security incidents.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 05 Oct 2026 15:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:14;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"Open Channels FM: Topics in Tech Business, It’s Rinse and Repeat\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2560606\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:64:\"https://openchannels.fm/topics-in-business-its-rinse-and-repeat/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"Sometime we think, been there, done that, but hey, not everyone has done that.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 05 Oct 2026 09:54:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:15;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:39:\"Akismet: Akismet now supports Drupal 12\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:28:\"http://akismet.com/?p=285135\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:56:\"https://akismet.com/blog/akismet-now-supports-drupal-12/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:5034:\"
\"\"
\n\n\n\n

Version 1.1.0 of the official Akismet Drupal module is out with support for Drupal 12. If you’re planning your move to 12, spam protection won’t hold you back. Here are the highlights.

\n\n\n\n

Drupal 12 from day one

\n\n\n\n

The module now runs on Drupal 10.3+, 11 and 12. On Drupal 12, Akismet checks comments and user registrations as soon as you install it, since both live in core. Contact forms, webforms, and the Key module will be supported as soon as they’re ready for D12.

\n\n\n\n

What else is new in 1.1.0

\n\n\n\n

Better spam scoring

\n\n\n\n

Every check now gives Akismet a fuller picture of each submission. The module’s bot detection watches how someone fills out a form: how long they take, how they type, and how they scroll, click or tap. In 1.1.0, all of those signals feed straight into Akismet’s spam scoring. With more context, Akismet can better tell a real person from a bot, so you should see more spam caught and fewer real messages flagged by mistake.

\n\n\n\n

Better GDPR export

\n\n\n\n

drush akismet:gdpr-export now takes --format=json (or csv and yaml) and returns the full stored record for each match, including the original submission. That makes subject access requests easier to answer completely.

\n\n\n\n

The export also withholds the moderator’s identity, as GDPR Article 15(4) allows.

\n\n\n\n

Clearer warnings about your stored API key

\n\n\n\n

The status report now warns you about a leftover copy in yoursettings and stays visible until you deal with it. A new Delete stored API key form removes it in one step. You’ll find the link on the settings page and in the status report.

\n\n\n\n

Coming from the community module?

\n\n\n\n

Before the official module, some Drupal sites used the community-maintained Akismet module (drupal/akismet). That project is no longer maintained. If you’re still running it on Drupal 10.3 or later, 1.1.0 can take over your install in place. Your API key, connection timeout and protection settings carry over, and the update prints a report of everything it migrated, changed or dropped. Our migration guide on drupal.org walks through the process.

\n\n\n\n

Get started

\n\n\n\n

You’ll need an Akismet API key. Grab one from our pricing page. It’s free for personal sites.

\n\n\n\n

For a new install:

\n\n\n
\n
\n
\n \n
\n
composer require drupal/akismet_antispam
\n
\n
\n
\n\n\n

If you’re already on 1.0, update the module along with the Akismet PHP SDK it depends on, then run the database updates:

\n\n\n
\n
\n
\n \n
\n
composer update drupal/akismet_antispam --with-dependencies
drush updb
\n
\n
\n
\n\n\n

The module needs Drupal 10.3, 11 or 12 and PHP 8.1 or newer, or the newer PHP your Drupal core requires.

\n\n\n\n

Found a bug or have an idea? Tell us in the issue queue.

\n\n\n\n

New to the module? Start with our introduction to the official Akismet Drupal module, or see how it’s built on the official Akismet PHP SDK.

\n\n\n\n

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 02 Oct 2026 18:59:59 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Derek Springer\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:16;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:93:\"Open Channels FM: Beyond Rants, Productive Discussions and the Mystery of Poor Design Choices\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563201\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:99:\"https://openchannels.fm/beyond-rants-productive-discussions-and-the-mystery-of-poor-design-choices/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:141:\"Bob Dunn reflects on online conversation styles and an infamous hardware design blunder, offering unsolicited solutions and food for thought.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 02 Oct 2026 12:02:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:17;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:80:\"Open Channels FM: Why We Build Systems aka Zach and Carl’s Emporium of Madness\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563171\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:84:\"https://openchannels.fm/why-we-build-systems-aka-zach-and-carls-emporium-of-madness/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:225:\"In this episode, hosts Zach and Carl discuss adapting to technological change, personal reinvention, and the impact of AI on creativity and web development, emphasizing diverse income strategies and effective ADHD management.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 01 Oct 2026 11:41:11 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:18;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:53:\"Open Channels FM: The Jerks and Flows of the Open Web\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:33:\"https://openchannels.fm/?p=114879\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:40:\"https://openchannels.fm/jerks-and-flows/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:102:\"You may start something and then boom, it\'s over. Or an idea that disappears as quickly as it appears.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 30 Sep 2026 15:21:41 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:19;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"WPTavern: #235 – Rob Pugh and Tony Arcangelini on Bringing Podcasting to Jetpack\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"https://wptavern.com/?post_type=podcast&p=208505\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:96:\"https://wptavern.com/podcast/235-rob-pugh-and-tony-arcangelini-on-bringing-podcasting-to-jetpack\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:49098:\"
Transcript
\n

[00:00:19] Nathan Wrigley: Welcome to the Jukebox Podcast from WP Tavern. My name is Nathan Wrigley.

\n\n\n\n

Jukebox is a podcast which is dedicated to all things WordPress, the people, the events, the plugins, the blocks, the themes, and in this case, bringing podcasting to Jetpack.

\n\n\n\n

If you’d like to subscribe to the podcast, you can do that by searching for WP Tavern in your podcast player of choice, or by going to wptavern.com/feed/podcast, and you can copy that URL into most podcast players.

\n\n\n\n

If you have a topic that you’d like us to feature on the podcast, I’m keen to hear from you and hopefully get you, or your idea, featured on the show. Head to wptavern.com/contact/jukebox, and use the form there.

\n\n\n\n

So on the podcast today we have Rob Pugh and Tony Arcangelini. Rob and Tony are longstanding members of the Automattic team with extensive backgrounds in marketing, product, and software development. They’ve spent years building tools for creators, writers, podcasters, and everyone in between, and now they’re fully immersed in WordPress’s evolving podcasting capabilities.

\n\n\n\n

If you’ve been looking for ways to run your podcast from your own WordPress site, this conversation is for you. Rob and Tony dive into the new Jetpack podcasting features, and why they made the leap from WordPress.com’s basic audio offerings, to a more robust, integrated solution, within Jetpack.

\n\n\n\n

They talk about what makes WordPress and Jetpack such a powerful home for creators. The ability to bring your newsletter, blog, podcast, and all your content and communication under one roof, all while keeping ownership of your data.

\n\n\n\n

We talk through the advantages of keeping your content out of walled gardens like Substack and Patreon, and the value of flexibility, whether that’s adding WooCommerce to sell merch or customising your site’s look.

\n\n\n\n

Rob and Tony breakdown just how easy it is to start your show. Drop audio into a post, set your category, and let Jetpack handle the rest. From distributing your RSS feed to major podcast apps, to sending out newsletters, and automated social posts. They also get into how integrations with PocketCasts and Jetpack AI make content creation, transcription, and distribution smoother than ever before. Plus how WordPress is open Foundation promises you’ll never be locked in.

\n\n\n\n

If you are a creator wondering how the next generation of podcasting fits into the WordPress ecosystem, or just want an easier way to launch and grow your show, this episode is for you.

\n\n\n\n

If you’re interested in finding out more, you can find all of the links in the show notes by heading to wptavern.com/podcast, where you’ll find all the other episodes as well.

\n\n\n\n

And so without further delay, I bring you Rob Pugh and Tony Arcangelini.

\n\n\n\n

I am joined on the podcast by Rob Pugh and Tony Arcangelini. Hello, both.

\n\n\n\n

[00:03:23] Rob Pugh: Hey, how’s it going, Nathan?

\n\n\n\n

[00:03:24] Tony: Hello, Nathan.

\n\n\n\n

[00:03:25] Nathan Wrigley: Nice to have you both with us.

\n\n\n\n

Today we’re going to be talking about something which is actually genuinely dear to my heart because we’re going on about podcasts. Yay!

\n\n\n\n

I’ve been in the podcasting space for decades, and WordPress has been the place where I’ve done it every single episode. I’m entirely indebted to WordPress for the capacity to do all of the podcasting I’ve done. But I’ve never done it inside of Jetpack, because until recently, I don’t think that was possible. So that’s what we’re going to talk about today.

\n\n\n\n

First of all, I’ll just go round the houses. I’ll start with Rob. Would you mind giving us just a quick potted bio of what it is that you do over at Automattic, Jetpack, whatever it is that you want to mention.

\n\n\n\n

[00:04:04] Rob Pugh: Yeah, so I’ve worked at Automattic for seven years. I’ve been in marketing and now focused more on product, but I like to do a bit of everything. And I work mostly with tools for people that create stuff. So podcasts fit right in there, and we are excited to build out this feature.

\n\n\n\n

[00:04:19] Nathan Wrigley: Nice. Thank you. Tony.

\n\n\n\n

[00:04:21] Tony: Yeah. I’ve also worked for Automattic for about eight years now. I do software development, and so I have had firsthand in building everything that we’re talking about today.

\n\n\n\n

[00:04:31] Nathan Wrigley: Okay, thank you very much.

\n\n\n\n

Now, just before we started recording, I was on the call with Tony before Rob joined in and you labored the point, not labored, but you mentioned that you were in the sort of creator side of Automattic. I didn’t know that existed, but that to me is about the most interesting bit of any organization. You know, the bit where the musicians come, and the poets come and the writers come and the podcasters, and the videos and the YouTubers, and all of that come. I think that’s really interesting, and I didn’t realise there was a wing of the business entirely aligned to that. But I guess I’ve been schooled, and now I know. So podcasting definitely comes under that banner.

\n\n\n\n

Okay so I didn’t know this existed, and I think it didn’t exist, but maybe Tony can redirect me a little bit here. Podcasting in the WordPress space, I think you could do more or less everything that we’re about to talk about inside of wordpress.com until recently, but now it’s shipped inside of Jetpack. First of all, I’ll just send that one to Tony. Is that true? Is this all like a port of things into Jetpack from .com?

\n\n\n\n

[00:05:32] Tony: I’d say it’s a little bit more than a port. So we built a very basic feature of podcasting in WordPress.com to offer WordPress.com users. It was very basic. It was just the feed. Basically what you see in the free offerings right now. The ability to drag an audio into a post and for that post to then become a podcast episode. And then we had a curated RSS feed that was available. And then very basic, the core basic iTunes tags that are needed to be able to be picked up by these apps.

\n\n\n\n

That existed there. It was a bit outdated. It hadn’t been touched in a long time, and so we felt like it would be a great tool to leverage for creators. Giving them a better product, something that would be useful with stats and the ability to manage your episodes and all of that. And we figured if we were going to put all this effort into it, that we should probably make it more widely available. And so Jetpack was, I think, the natural fit for us.

\n\n\n\n

[00:06:26] Nathan Wrigley: Yeah, I’m kind of curious how it’s ended up in Jetpack and not just its own plugin. Is it because you’re leveraging the other things that Jetpack can do? Are there sort of dependencies, if you know what I mean, where, okay, it just makes sense because Jetpack already does that piece of the puzzle, and we can just build over the top of that?

\n\n\n\n

Or is it just the brand recognition, the fact that you’ve got an email list that you don’t need to convert and they can just toggle a switch and automatically have got podcasts? What was the reasoning on putting it inside of Jetpack and not just its own thing?

\n\n\n\n

[00:06:54] Tony: I would say, at least from an engineering perspective, there’s stuff that’s in it that is exclusively within Jetpack. So, the ability to do stats, that’s a hard thing to do when you’re having a self-hosted site, to be able to watch and see what apps are actually touching those download files, and then be able to aggregate them all in one place and then give them back to you in a way that’s easy.

\n\n\n\n

So, at least from an architectural perspective, Jetpack was the easiest because it allows us to leverage some of the endpoints that are already there, and use a lot of those tools.

\n\n\n\n

But then secondly, I think it’s also from an overall product perspective, being able to put it alongside other features like newsletters. Where you can have a newsletter, you can be able to take it into the reader. Have this one episode that now spans across multiple different avenues to be consumed, is I think, also another big benefit in putting it into Jetpack. As opposed to just dropping another, because there’s already a lot of plugins out there, a few big plugins that you can grab for free that do podcasting.

\n\n\n\n

[00:07:56] Nathan Wrigley: I think one of the big bits that I realised early on in my podcasting journey was that you’re not really just trying to create an audio feed. It’s more useful as a podcast if you’ve got this kind of wrap around thing. So like you say, you’ve got a home which is yours, AKA your WordPress website. But also things like the capacity to send out an email if people are interested in subscribing, and they don’t necessarily have a podcast player that they use all the time, but they do want to consume your content.

\n\n\n\n

The fact that they can subscribe to a newsletter, you click publish, that newsletter automatically drops in their inbox. It just makes sense that all the jigsaw pieces that a podcaster needs, it feels like WordPress has had forever.

\n\n\n\n

And there is some part of me which is curious that it’s taken this long to come into the, let’s say, .org side of WordPress. Because all of the different parts, the newsletter, the RSS feed, the blog posting, all of that stuff has been available. It just kind of never got joined up. It strikes me as odd because people have moved over to Patreon, Substack has become this whole thing over the last decade. And really it felt like WordPress had that audience a decade ago.

\n\n\n\n

Maybe it’ll claw it back. I certainly hope it does, but it feels like a lot of people have left the WordPress ecosystem for their podcasting because that stuff wasn’t available. Rob, maybe you want to take that one? It’s not really a question, more of an observation.

\n\n\n\n

[00:09:16] Rob Pugh: Yeah, there’s a lot to unpack there. I agree. I think we were a little late in bringing some of these tools to wordpress.org. But I think we’re seeing the renewed focus across the technology space on ownership.

\n\n\n\n

WordPress has remained the best way to do that. And for us to be able to offer these tools to users. It shows everyone that you can, as you said, own your blog your newsletter, your podcast, together. And it does make sense for us to offer all of these tools in one space.

\n\n\n\n

I like to think of it going back to the origins of WordPress, and we started as blogging, everyone getting your thoughts out there and sharing them. Meeting new people, engaging and creating communities. And podcast is just another medium. We provide that for the written word, so of course we should try and provide that for the spoken word as well. So I do hope that we can show people the benefits, and the ease of having it all together and come back and give us a try.

\n\n\n\n

[00:10:11] Nathan Wrigley: Yeah. I think for me at least anyway, that argument is embedded in my soul. The idea of owning your own content on the web is really important. It’d be interesting to see in the year 2026, 2027 and going forward how much that stuff really matters. I’m just curious, in the age of AI whether people still want to own anything at all. But it’ll be certainly interesting to see.

\n\n\n\n

[00:10:30] Rob Pugh: Sorry, yeah, weigh in on that. I think we’ve seen it over decades and comes in waves. When social media started it was really exciting, and people ran and then saw some of the pitfalls, and they start coming back.

\n\n\n\n

And then recently you mentioned Substack, and I loved Substack when it started. It was a space for some serious dialogue, and a place for writers engage. And then over time, well, we need that VC money, and now it’s basically another social media site. And you realise, oh I don’t really own my data, I just own a Substack, and how valuable is that? And it’s coming back.

\n\n\n\n

And I think AI, it’s becoming even, the cycles are quicker now. AI’s incredible, I use it all the time. I use it to help come up with prototypes for how to best display this podcast product. But, you’ll see quickly that you don’t own anything, and you need to have a home like WordPress. And you retain ownership of your audience, and your data and your posts and your podcasts, and that’s, I think, never going to go away, and AI’s only going to reinforce that for people.

\n\n\n\n

[00:11:23] Nathan Wrigley: Yeah, I think one of the curious things as well is if you want to do anything outside of the normal that the platform will allow, so let’s take the example of Substack. There’s a limited subset of things that it can do. The bedrock of what it does I’m sure is excellent. I confess I’ve never used it, but I’ve seen many people deploy it for their own podcast, so you know, it must work.

\n\n\n\n

But the minute you want to stray outside of those boundaries, and you want to do something a little bit different, I don’t know, you might want to sell some merchandise or something like that. Well just pop WooCommerce on top of your website and you’re off to the races.

\n\n\n\n

Or, I don’t know, you want to have a different flavor in the way it looks at Christmas or something, well you just adapt the theme. And I’m, imagining good luck doing that over on these proprietary platforms. I don’t know if that’s possible, but it certainly would be a lot harder than it would be on the WordPress side I would have thought.

\n\n\n\n

[00:12:08] Rob Pugh: For sure the customisation expanding is all very important, but to me even more important is just that it feels like Substack is just another platform that’s changing the rules on their people midstream, and if you don’t like the direction of. Like tried it before and it was nice to have a non-social media site to have serious writing and reading of other serious authors, and now I’m getting short form reel videos on my homepage, and I didn’t sign up for this.

\n\n\n\n

And if you’re a creator over there, you might be stuck. How do you port your audience over? It’s technically possible, so they say they’re open, but it’s a pain, and people don’t want to leave. And if you’re actually successful, they take 10%, which is great when you’re zero paid subscribers. But, there’s people paying $10,000 a month to Substack.

\n\n\n\n

[00:12:48] Nathan Wrigley: They take 10%?

\n\n\n\n

[00:12:49] Rob Pugh: 10% no matter what, which is great if you’re free, but if you have 100 paid subscribers paying you $10 a month, suddenly it’s insane. Like it’s a terrible deal and people feel stuck. Like WordPress even, wordpress.com, jetpack, if don’t like those rules, we can’t change them too much. You can go to any of the other great podcast hosts, or plugins.

\n\n\n\n

[00:13:09] Nathan Wrigley: Yeah, I guess that’s a curious thing. And then you can embed those on your WordPress website and just carry right on as if nothing had happened. Yeah, that’s a really interesting point.

\n\n\n\n

[00:13:15] Rob Pugh: Exactly.

\n\n\n\n

[00:13:16] Nathan Wrigley: So from what I’ve seen, it looks like a really simple solution to implement. What I mean by that is, as a user of your product, it seems like you’re basically doing a bunch of stuff which as a WordPress user you would be simply doing anyway.

\n\n\n\n

Like, you create a post. I don’t know if there’s a requirement to have a special custom post type for a podcast, or if you can just use regular posts. You go in, drop some audio in, and kind of you’re off to the races. Type some text and what have you.

\n\n\n\n

Is it really as simple as that? Is it simply a case of make a post, drop some audio in? Or is there some stuff that you need to do in advance to prepare your podcast? So I’m leading you up the garden path with that question. Tell us how it works. What do you need to do in order to get started? How much work is involved?

\n\n\n\n

[00:13:59] Tony: Yeah, I think that’s it. There are a few settings that are naturally required for starting a show. So you have your typical art for your show. You’ve got to set your categories and things like that in a setting. But then once that’s all set up, all you do is you create a new post, drop in the audio. We actually have an audio block as well, like a podcast episode block that will pull in a lot of the newer, fancier, podcasting 2.0 markup as well for you to do like chapters and things like that. And then that’s it.

\n\n\n\n

As long as it’s within the category, it’s not a custom post type, it’s just a regular post. And then we are able to differentiate between an episode and just a post by two things. One, is it in the designated category that you set? And two, does it have the audio or video? We also have a few video files that we allow as well, and that’s it.

\n\n\n\n

[00:14:46] Nathan Wrigley: Okay, that’s really neat. So you can use a regular WordPress post, but if you don’t assign it the category, let’s say in this case I’ve named it podcast, let’s go with that. If you don’t assign that category, it’s a regular post. Nothing off that tries to smuggle its way into your RSS feed, which would be attempted to be consumed by a podcast player. It just doesn’t go in there.

\n\n\n\n

The minute I assign the category of podcast, drop in some audio, then it’s in that separate RSS feed. Dear listener, if you’re not familiar with that, basically a podcast is an RSS feed. That is literally what it is. Your podcast player is just consuming a bunch of text, which is an RSS feed, and interpreting that in a certain way with images and the audio and what have you.

\n\n\n\n

And so that’s it. That’s all you have to do. Configure the settings, put a piece of audio in, assign the category, click publish. You’re done.

\n\n\n\n

[00:15:35] Tony: Yep, that’s all. That’s all it is. I think the harder part is trying to come up with the titles and filling out the show notes. And, I have a friend who I got to start a podcast when we were working on this product, and he was using it, giving us feedback. But then, it’s like I looked at his podcast, and it was literally just like episode one, and it just, he’s like, “That’s the hard part, is coming up with all of the other stuff.”

\n\n\n\n

[00:15:53] Nathan Wrigley: But you have Jetpack AI as well, don’t you? So there is an opportunity, I would presume, to lean into that. If you were to write a corpus of text that went alongside the, I don’t know, the audio, it could be a transcript or what have you. Presumably then Jetpack can go sift through all of that, and suggest some sensible titles if you really can’t be bothered to work out a title for the podcast episode. But then again, does it have the capacity to do things like trawl through the audio and transcribe and things like that? Or is that a bit roadmap-y still?

\n\n\n\n

[00:16:20] Tony: Yeah. So that was one of the things that we wanted to work on was the ability to transcribe. And, because we have the privilege of working closely with Pocket Casts, we have, a lot of fancy tools that they have built already for their podcasting platform that we were going to try and leverage for the podcast show.

\n\n\n\n

[00:16:39] Nathan Wrigley: Pocket Casts is an Android, iOS, and, it’s a web player as well. It’s a place where you go download onto your phone or what have you and play them. I have it, I use it every single week, and I’ve noticed that whether a transcript is made or not, Pocket Casts actually makes one.

\n\n\n\n

[00:16:54] Tony: Yep.

\n\n\n\n

[00:16:54] Nathan Wrigley: So if I ship a podcast without a transcript, Pocket Casts magically has a transcript. So I don’t know where that voodoo is happening. But that technology, you can then do double duty on that. You can take the technology they’ve built, use it in the Jetpack side of things, and do the transcription. Okay, that’s neat. Sorry, I interrupted. Apologies.

\n\n\n\n

[00:17:11] Tony: You’re good. Yeah, that’s all of it. That’s, it right there.

\n\n\n\n

[00:17:13] Rob Pugh: I think that’s a great segue into Pocket Casts, which in our opinion is the best app to listen to podcasts. The best platform. And one of the really cool things we were able to do with, because we work closely with Pocket Casts, is when you are distributing your podcast. We pick, just to start, the six biggest ones and hold your hand on submitting to them. But Pocket Casts is actually Automattic. Automattic, you can spell it with one or two Ts. And, if you click the button, it just is uploaded to their network It takes minutes, and it’s, some of the other ones, we hold your hand, but it’s a little annoying, and some of them can take a couple days, like Apple, to approve things. But, Pocket Casts just works. I don’t know if you want to add anything on that magic, Tony.

\n\n\n\n

[00:17:52] Tony: Yeah, it’s very simple. It’s like right off the bat. If you already had an episode recorded, you could start a new website, upload your first episode, set your settings, and be on Pocket Casts, I would say, in less than an hour, honestly.

\n\n\n\n

[00:18:06] Nathan Wrigley: Yeah, because you’ve got that tight integration.

\n\n\n\n

[00:18:08] Tony: Yeah. It doesn’t say anything for the website configurations, which I’m sure would take more time, but at the very least, if you wanted to get your show out there, it’s a pretty instant approval.

\n\n\n\n

[00:18:17] Nathan Wrigley: I think podcast players. If you’ve never run a podcast, there’s this whole dance that you have to do. The first time you ever try to release an episode, and that is to get it set up with the distribution channels that are popular. So I’m thinking of things like Apple Podcasts, and YouTube Music, and Amazon, and the list goes on and on. There’s, dozens of them, some more important than others. I think probably Apple is probably the biggest one, and maybe Spotify and some others come in second and third place.

\n\n\n\n

But you have to do this thing where in some cases you have to go and get an account, and there’s really no way around that. Do you do some of that heavy lifting though? Do you make it easy for people to understand how to do it? When I did it, like 10 years ago for the first, and thankfully, only time I really ever had to do it, it was a case of going out and Googling it and reading things. But do you have that information in the UI to make that journey a little bit easier, reduce hours to minutes perhaps?

\n\n\n\n

[00:19:07] Tony: Yep, we have a button.

\n\n\n\n

[00:19:08] Rob Pugh: So there’s a distribution tab which lists the, all six like you mentioned, Amazon, Spotify, Apple, Pocket Casts, Podcast Index, which covers a whole bunch of minor networks. And I’d love to one day have it be fully automatic like it is with Pocket Casts. But some of them you need actual partnerships with these, Apple or Spotify to make that happen, and we haven’t prioritized putting a business person to go start a relationship and that.

\n\n\n\n

So we will organize them for you and try and give clear instructions in our documentation to how to do it. But there is just a button then when you’re looking and it shows you the status of it, if it’s in or not.

\n\n\n\n

[00:19:42] Nathan Wrigley: Okay. So you click the button, do the necessary thing, and then it will report back to you whether or not that has been successful. It’s a bit of a strange vestige really of the internet from way back when. It feels like in this day and age of everybody using APIs to connect to this, that, and the other thing.

\n\n\n\n

But companies like Apple seem to be very unwilling to let that bit of their system be wide open. You’ve got to sign up for an Apple Creators account. I forget exactly what it’s called, but you log in and then you submit your RSS feed. It really doesn’t take that long, but you still have to do it.

\n\n\n\n

[00:20:12] Rob Pugh: Yeah.

\n\n\n\n

[00:20:13] Nathan Wrigley: And I think they’re doing it because they get to see from the inside out, how popular your podcast is. And I don’t know, maybe they can monetize things from their end. I’m not really sure how that works.

\n\n\n\n

[00:20:23] Rob Pugh: It’s really another example of the closed internet.

\n\n\n\n

[00:20:26] Nathan Wrigley: Yeah.

\n\n\n\n

[00:20:26] Rob Pugh: Which is terrible. Why does Apple and Spotify need to be closed? So I think with having your podcast on WordPress with Jetpack, wordpress.com, and being in Pocket Casts, great. Then you’re, in the more of the open garden which is a better place to be.

\n\n\n\n

And the cool thing with our stats, you can see who’s coming, like how many people are listening to your show on Apple versus Spotify versus Pocket Casts. So you know if you’re not getting any from Spotify, then you don’t even need to be there. Of course though, it helps with findability to be everywhere, so we want to give you that option.

\n\n\n\n

[00:20:56] Nathan Wrigley: Yeah, at the end of the day, it all boils down to an RSS feed, which if it’s on your WordPress website presumably contains your domain name, forward slash, I don’t know, feed forward slash something maybe. So your RSS feed is going to be fairly short, probably very on message.

\n\n\n\n

Does it work that way or does it have some sort of Jetpack or, I don’t know, WordPress.com thing in it? Because when you go to these other platforms, it’s typically platformname.com/randomstringof12characters or something like that, which is very hard to read out in your podcast. But the way you’ve got it built, it sounds like the sort of thing that would trip off the tongue. So you know, wptavern.com/podcast. Put that into your podcast player of choice and you’re done. I’m saying all of that like that’s true, but I don’t know if it is.

\n\n\n\n

[00:21:40] Tony: Yeah, that’s it. Slash feed at the end.

\n\n\n\n

[00:21:43] Nathan Wrigley: Okay.

\n\n\n\n

[00:21:43] Tony: Because it is an RSS feed, yeah.

\n\n\n\n

[00:21:45] Nathan Wrigley: That’s still fairly straightforward. But again, that’s a nice bit of branding, isn’t it? And, I think that’s really good.

\n\n\n\n

Linking it back to the branding. We touched on this a minute ago, but if you haven’t started a podcast before, it may not be entirely obvious that you do want those other things like a newsletter, and like the ability to post to socials, and it feels like you’ve got the complete wraparound solution for that.

\n\n\n\n

Because as your podcast grows, which let’s hope it does, then you will probably wish to have a relationship with your listeners via an email newsletter. You probably will wish to be posting on social media. You probably will wish to do all of these different things. So social posting, newsletter, RSS feed, WordPress as the sort of custodian of all the text and the images and the videos that I put in. Is there any other secret sauce that we’ve missed there? Is there any other sort of unique binding that Jetpack brings that we haven’t mentioned there?

\n\n\n\n

[00:22:37] Rob Pugh: I’ll take it back first to like why we started this, and decided to build this, and I think you’re exactly right. First we found there are lots of WordPress.com and Jetpack users who have podcasts somewhere else. And that’s fine, but they were forced to because we didn’t offer it, and that really makes sense. Why would you need to go somewhere else?

\n\n\n\n

So you say today, our goal in creating it was twofold for the people creating the platform. It should just be as easy as possible. Podcasting and writing is hard enough. You should focus on that. Let us handle all the difficult stuff.

\n\n\n\n

Like you said, you need to, have a newsletter and a podcast and a blog and own all of it, and why can’t you do that with one publish event? And then from the consumer’s side of like consumer of content, some people want to listen to only podcasts, and some people want to read on a blog or, say, the WordPress.com reader. Shout out, go check that out if you haven’t in a while.

\n\n\n\n

And like me, I prefer to actually read stuff in my email inbox, like a old weirdo. It shouldn’t be, you should let people consume however they want to, and it shouldn’t be a lot of extra work for you, the host, the creator, to manage all of these things on different platforms. Just have it be as simple as possible, and that was really our goal. And then, yes, exactly what you said with all the other Jetpack stuff. Social media is a great one. Gosh, you could go on and on. Performance, security, basics.

\n\n\n\n

[00:23:46] Nathan Wrigley: Yeah. And it binds to, you said it just then, and it binds to the one publish event. So when I began my podcasting journey you end up with, like all these Zapier connections and different ways that, I don’t know, a webhook which goes off here and does a particular thing because you want it to be posted to this social network. With this, once you’ve got all of the bits and pieces configured, you click publish.

\n\n\n\n

So you know, you do your audio, you write your text, you do all of that in a draft state, upload the audio. But the moment you click publish, the newsletter goes out, the social media posts go out, and all of that just happens automatically. And you don’t have to think about it. And they’re already there in your website.

\n\n\n\n

It’s not like you have to do much. You just toggle, actually we should talk about that. You have to toggle the Jetpack podcast setting on, and presumably the newsletter setting, and yada yada, all those other things. But once you’ve toggled all those things on and got them set up, every time you click publish, all of those dominoes fall, and everything just happens on autopilot, which is really nice.

\n\n\n\n

What do we need to toggle on? How do we set it up? How expensive is it? Let’s start there.

\n\n\n\n

[00:24:50] Rob Pugh: I’ll talk about the pricing and then Tony can talk about the, the toggles.

\n\n\n\n

[00:24:54] Nathan Wrigley: Excellent. Yeah.

\n\n\n\n

[00:24:55] Rob Pugh: Yeah, we talked a bit about the pricing. I think that Automattic has always had a really generous free tier across its products, and it made sense for us to continue that. So you can today go to WordPress.com and start a blog for free.

\n\n\n\n

It’s going to have some ads on it, but it’s free. You can have your newsletter sent out unlimited sends for free with unlimited subscribers, and unlimited podcasts for free. That’s like, amazing deal. We don’t get enough credit for that, but cool.

\n\n\n\n

But we did build some compelling things to make you hopefully want to upgrade, or as you grow your podcast, you’ll find valuable. I think the stats are really cool. To me, all of the essential stats and none of the unessential stats, which if you’re an advanced podcaster might not be as good as you’re looking for. But, for most novice users, you just want to know the basics.

\n\n\n\n

Anything beyond that starts to feel like Google Analytics, like, I’m lost. So just give me the basic. Are they coming on Apple? Where, how many listeners to which episodes, and where in the world are they coming from? Which refers, like which sites are they coming from? That’s a great starting place for me.

\n\n\n\n

Help with distribution, the episode list, having a clear place for all your podcast episodes, the podcast block, really cool. And on WordPress.com too, we include the audio hosting once you upgrade. It’s not on Jetpack yet, so we’re waiting to see if, because we offer a similar thing for VideoPress, shout out best video hosting for WordPress.

\n\n\n\n

[00:26:09] Nathan Wrigley: Yeah, there’s VideoPress will handle the video side of things. That’s becoming the thing, by the way. I’m sure you know that. But in the podcasting space, I went to The Podcast Show in London, about four months ago or something like that. Everybody’s talking about video.

\n\n\n\n

[00:26:22] Rob Pugh: Yeah.

\n\n\n\n

[00:26:23] Nathan Wrigley: And so that being bound into Jetpack as well is just another string to your bow. I’m just going to segue slightly. I think Pocket Cast does a pretty good job of doing things like HLS video. I could be wrong about that, but I’ve got a feeling it does.

\n\n\n\n

[00:26:35] Rob Pugh: They even hook up with your Apple TV now, so you can watch and listen and yeah.

\n\n\n\n

[00:26:40] Nathan Wrigley: Oh, so this is really clever and completely out of the realms of possibility just a year ago. So you could be listening on your headphones whilst you’re out walking the dog on your podcast player, so you’re only listening to audio. And you come back in, put your Apple TV on, turn on the Pocket Cast player, and it will seamlessly drop you right in the video at the exact moment where you finished the dog walk. It’s so clever and so neat. I love all that stuff.

\n\n\n\n

[00:27:08] Rob Pugh: The future is so cool.

\n\n\n\n

[00:27:09] Nathan Wrigley: Yeah.

\n\n\n\n

[00:27:10] Rob Pugh: I love it.

\n\n\n\n

[00:27:10] Nathan Wrigley: Okay. So Tony, how do we switch it on? Is it genuinely one toggle in the Jetpack settings, or is there a little bit more to be set up?

\n\n\n\n

[00:27:17] Tony: Yeah, more or less. There is one toggle to turn the module on. And then once it’s on, you go to Jetpack and click on the podcast option, and then from there, there should just be one button that is to set up your show.

\n\n\n\n

And all it really requires is you either creating a new category or selecting a category. And this is, as we were talking about before, the category feed that is going to be taken over from there. And then you technically are done. But it’s advised that you fill out all of the other base settings, and we walk you through all of the ones that are required by the podcast show apps, to make sure that you don’t get blocked by Apple or Spotify for not having the necessary settings.

\n\n\n\n

[00:27:57] Nathan Wrigley: If I’ve been a podcaster for a number of years and I’ve got, I don’t know, a back catalog of 100 episodes or something like that. How do we handle that? How do we bring in previous episodes? And is there like an automated way of doing that or do I have to go and refigure 100 brand new pages on my WordPress website?

\n\n\n\n

Is there any heavy lifting done there? Let’s just deal with the audio first, just the RSS feed and the audio. Is it a simple case of dropping the old podcast RSS feed in and you’ll capture all that audio and it’ll be on the Jetpack side of things? Let’s do that first.

\n\n\n\n

[00:28:28] Tony: That’s a great question. I am not super familiar with the Core WordPress importer, but I believe that if there is a valid RSS feed with the normal RSS style tags, like enclosure and things like that, you should be able to import your RSS feed. Depending on how it’s configured on your current host, directly into WordPress. I’m not too sure what that would result in exactly. Especially because there’s a lot of different hosts out there, and it’s not like there’s one standard format for exporting your content. But yeah, that should get you part of the way there.

\n\n\n\n

Then I think in the future, we’re really looking to start targeting some of the major current podcast hosts to be able to configure a migration flow to be able to come from those places to ours, in a more seamless way, albeit whatever sort of export they can give you or, whatnot. But I think that’s still on the horizon.

\n\n\n\n

[00:29:27] Nathan Wrigley: Yeah, it’d be really nice to, let’s say I have 100 episodes and I’ve got, it’s over on whatever, hosting platform X over there, for my podcast audio feed. It’d be nice to be able to just suck in all the descriptions, and all the titles and have them be created as WordPress posts with the category assigned. So that essentially my WordPress site with the click of a button and the wait of an hour has suddenly got 100 posts of the podcast type all ready to go. And then, that’ll sit inside my SEO sitemap and all of that kind of stuff. That would be really interesting to be able to do, I think.

\n\n\n\n

[00:29:58] Rob Pugh: Yeah, I think we will try and have that in the future. We usually do try and make importing, especially from closed platforms, super easy. An example, another Substack. We have an amazing Substack importer. They’re not a big podcaster yet, but they, do have some, and we can look at adding that. But if you have all of your newsletter on Substack, you click a button and we bring over your whole, build you a website, bring over all your posts, all your subscribers, even paid subscribers. We seamlessly transfer it to the Stripe account. Everything we’re building, we’re just trying to make it super easy for people to own your data, go wherever you want. We encourage movement in and out, wherever you want to go, it’s up to you.

\n\n\n\n

[00:30:31] Nathan Wrigley: I suppose that then leads me to this question, which is, and you’ve probably just answered it. You’re not holding people behind some sort of paywall here. If people try Jetpack Podcasts out and they decide, “You know what? I really want to go the other direction. I want to maybe go back to where I was, or just move to a new host,” or what have you. You’re not holding any of that hostage, are you? You can take it and run with it and put it somewhere else?

\n\n\n\n

[00:30:52] Rob Pugh: Yeah. Yeah, absolutely not. Like that’s the, I think, one of the fundamentals of WordPress. You should be able to move within WordPress and out as much as you want. I will say that this is a new feature that me and Tony have built. Just because something doesn’t exist in a super streamlined way, doesn’t mean it’s our intention to lock you in. So please reach out and we’ll happily help you migrate off if that’s your wish.

\n\n\n\n

[00:31:15] Nathan Wrigley: So I’ll just let you know, dear listener, that there’s several URLs which rather than read them, because in many cases they can be quite long. But one of them, which is really easy for me to say, I might as well do that one, is wordpress.com/podcast. That’s probably the easiest one. Oh, and maybe this one as well, jetpack.com/support/jetpack-podcast. There’s several more.

\n\n\n\n

[00:31:38] Rob Pugh: Let me jump in. Let me sorry, Because as of two days ago, we now have jetpack.com/podcast.

\n\n\n\n

[00:31:45] Nathan Wrigley: Oh, okay. That’s way better.

\n\n\n\n

[00:31:46] Rob Pugh: We just relaunched the entire jetpack.com site, which is cool. You should go check it out. Yeah, so.

\n\n\n\n

[00:31:51] Nathan Wrigley: Again though, that, so what was that? Jetpack.com/podcast is kind of the home for all of those bits and pieces.

\n\n\n\n

[00:31:56] Rob Pugh: Yep, exactly.

\n\n\n\n

[00:31:57] Nathan Wrigley: In which case, go there. That’s where you’re going to find all of the bits and pieces and I presume, when things are, adapted and modified.

\n\n\n\n

[00:32:03] Rob Pugh: Yeah, the way to think about it’s still for some people confusing about Jetpack. So if you would like a website, the best WordPress hosting, then go to wordpress.com/podcast, and we’ll host your podcast for you. And if you want to host somewhere else, that’s great. Go host your WordPress site somewhere else, then go to jetpack.com/podcast and we’ll get you all set up as well.

\n\n\n\n

[00:32:23] Nathan Wrigley: In which case, I will say thank you Rob, and thank you, Tony. Thanks so much for chatting to me, both of you.

\n\n\n\n

[00:32:28] Rob Pugh: Yeah. Thank you Nathan.

\n\n\n\n

[00:32:28] Tony: Yep, thank you.

\n
\n\n\n\n

On the podcast today we have Rob Pugh and Tony Arcangelini.

\n\n\n\n

Rob and Tony are longstanding members of the Automattic team, with extensive backgrounds in marketing, product, and software development. They’ve spent years building tools for creators, writers, podcasters, and everyone in between, and are now fully immersed in WordPress’s evolving podcasting capabilities.

\n\n\n\n

If you’ve been looking for ways to run your podcast from your own WordPress site, this conversation is for you. Rob and Tony dive into the new Jetpack podcasting features and why they made the leap from WordPress.com’s basic audio offerings to a more robust, integrated solution within Jetpack. They talk about what makes WordPress and Jetpack such a powerful home for creators: the ability to bring your newsletter, blog, podcast, and all your content and communication under one roof, all while keeping ownership of your data.

\n\n\n\n

We talk through the advantages of keeping your content out of walled gardens like Substack and Patreon, and the value of flexibility, whether that’s adding WooCommerce to sell merch or customising your site’s look. Rob and Tony break down just how easy it is to start your show, drop audio into a post, set your category, and let Jetpack handle the rest, from distributing your RSS feed to major podcast apps, to sending out newsletters and automated social posts.

\n\n\n\n

They also get into how integrations with Pocket Casts and Jetpack AI make content creation, transcription, and distribution smoother than ever, plus how WordPress’ open foundation promises you’ll never be locked in.

\n\n\n\n

If you’re a creator wondering how the next generation of podcasting fits into the WordPress ecosystem, or just want an easier way to launch and grow your show, this episode is for you.

\n\n\n\n

Useful links

\n\n\n\n

Pocket Casts

\n\n\n\n

VideoPress

\n\n\n\n

The Podcast Show London

\n\n\n\n

Podcasts on wordpress.com

\n\n\n\n

Podcasts on jetpack.com

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 30 Sep 2026 12:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Nathan Wrigley\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:20;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"bbPress: bbPress 2.6.19 is out!\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"https://bbpress.org/?p=249953\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:55:\"https://bbpress.org/blog/2026/09/bbpress-2-6-19-is-out/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:1642:\"

bbPress 2.6.19 is a security and maintenance release. Everyone running bbPress should update. \"🔒\"

\n\n\n\n

This release applies inherited forum passwords to REST API responses and BuddyPress activity, and strengthens access checks for restricted forum content across feeds, group forums, and other indirect views. It also tightens moderation and forum-role permissions, protects importer credentials and account handling, and improves escaping in profile and administration output.

\n\n\n\n

There are maintenance fixes for BuddyPress group-forum associations and notifications, converter cleanup, imported database passwords, subscription emails, and reply positioning. The 2.6.19 upgrade notes cover integration details. bbPress still requires WordPress 6.0 or newer and PHP 7.2 or newer. The automatic database version 264 upgrade clears saved converter query SQL from older password upgrades.

\n\n\n\n

These changes are also in the 2.7 development branch, which is now 2.7.0-alpha-4. Thank you to thewindghost, ngonhuy, and moltenbit for responsibly reporting issues fixed in this release, and to everyone who helped review and test the changes.

\n\n\n\n

Download bbPress 2.6.19 from WordPress.org, or update from your WordPress dashboard.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 30 Sep 2026 01:17:13 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:17:\"John James Jacoby\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:21;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"Open Channels FM: Delegating to AI: What September Taught Us About Control and Cost\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563114\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:89:\"https://openchannels.fm/delegating-to-ai-what-september-taught-us-about-control-and-cost/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:149:\"This month\'s AI stories, from kernel-crawling bots to assistants booking your flights, all pointed to the same gap: creation got cheap. Trust didn\'t.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 29 Sep 2026 12:12:01 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:22;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:128:\"HeroPress: From Blogging to Belonging: My WordPress Journey – Blogging से Belonging तक: मेरी WordPress Journey\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:56:\"https://heropress.com/?post_type=heropress-essays&p=8892\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:168:\"https://heropress.com/essays/from-blogging-to-belonging-my-wordpress-journey/#utm_source=rss&utm_medium=rss&utm_campaign=from-blogging-to-belonging-my-wordpress-journey\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:95629:\"\"Pull

वर्डप्रेस ने मुझे मेरे ज़िंदगी में कुछ अलग करने का मौक़ा दिया।

\n\n\n\n

Introduction

\n\n\n\n

My name is Satyam Vishwakarma, though most people know me as Satya.

\n\n\n\n

I come from a small village called Mahmadpur, near Fatehpur, the city of Doaba, in Uttar Pradesh, nestled between the sacred Ganga and Yamuna rivers. This is the place I’ve always called home.

\n\n\n\n

I studied Electronics Engineering (Micro) at Government Polytechnic College in Fatehpur. Growing up and studying in a relatively small city, I never had a clear idea of where technology or the internet could take me.

\n\n\n\n
\"Satyam
Satyam Vishwakarma presenting his project during the first year of his diploma, 2018.
\n\n\n\n

I didn’t discover WordPress with a big career plan. I was simply curious about technology and wanted to help the people around me.

\n\n\n\n

Most of my classmates, including me, came from Hindi-medium schools or the UP Board. A lot of the technical material we found online was either difficult to understand or simply wasn’t written in the kind of simple English we were comfortable with.

\n\n\n\n

At the same time, I was probably one of the more tech-savvy people around me. I loved trying new software, exploring new features, and figuring out how things worked. Whenever I discovered something interesting, I would share it with my WhatsApp groups and classmates.

\n\n\n\n

I didn’t think of that as writing or teaching at the time.

\n\n\n\n

I was simply sharing something I had discovered.

\n\n\n\n

Eventually, I thought: why not put some of this information somewhere that more people could find it?

\n\n\n\n

That small thought became the beginning of my writing career.

\n\n\n\n

Before WordPress, there was Blogger

\n\n\n\n

Some of my earliest opportunities to write online came through people I met on WhatsApp.

\n\n\n\n

I became friends with Mohit Vyas and Arpit Nuwal through one of the technology-focused WhatsApp groups I was part of. They had built a website called TopJankari. It wasn’t running on WordPress. It was a custom-built, dynamic website with its own basic way of managing content, but it was still fairly simple compared with the content management systems I discovered later.

\n\n\n\n

I started writing technology and tips-related content for TopJankari.

\n\n\n\n

For me, this was exciting. I was taking the things I was already experimenting with and turning them into something that other people could actually read and use.

\n\n\n\n

Around the same time, I started experimenting with Blogger.com and began publishing my own technology and tips-related content there.

\n\n\n\n

I wasn’t thinking about becoming a professional writer.

\n\n\n\n

I just enjoyed technology; I enjoyed explaining things, and I liked the idea that something I wrote could help another person solve a problem.

\n\n\n\n

That was enough motivation to keep going.

\n\n\n\n

Then WordPress entered the picture

\n\n\n\n

While I was experimenting with blogging, my brother Shivam (now runs a WordPress design agency called Subhash Digital) built his first website with WordPress.

\n\n\n\n

That caught my attention.

\n\n\n\n

I was already curious about how websites worked, and seeing him build something with WordPress gave me an idea of what was possible. I wanted to try it myself.

\n\n\n\n

Around the same time, my brother Kapil and I started learning WordPress together.

\n\n\n\n

Neither of us really knew what we were doing.

\n\n\n\n

We learned through YouTube videos, documentation, blog posts, and mostly through experimentation.

We would try something, break it, search for why it broke, fix it, and move on to the next thing.

\n\n\n\n

My first WordPress project was EngineersGuru, a place where I could share content related to my Electronics Engineering (Micro) course.

\n\n\n\n

I initially ran it as a subdomain, with the idea of making useful course-related tutorials and information easier for fellow students to understand.

\n\n\n\n

We also started an Android-related blog and Jankari.xyz, a more general website where I could write about pretty much anything I found interesting.

\n\n\n\n

In hindsight, those websites were my playground.

\n\n\n\n

They were where I learned WordPress, writing, SEO, content creation, and the basics of running websites.

\n\n\n\n

I wasn’t following a carefully designed career path. I was just building things because I wanted to see what I could do.

\n\n\n\n

And that curiosity kept taking me somewhere new.

\n\n\n\n

Learning by failing

\n\n\n\n

As I continued blogging, I started learning about SEO, monetization, and affiliate marketing.

\n\n\n\n

I experimented with different kinds of websites and eventually built more than ten blogs while I was still learning.

\n\n\n\n

One of my projects eventually became EYNZone (formerly known as EYNWorld), where I started helping others learn WordPress and other skills and grow their own projects.

\n\n\n\n

There were plenty of failures along the way.

\n\n\n\n

I applied for Google AdSense more than twenty times before I finally stopped guessing and actually studied the guidelines carefully. Eventually, I got a brand-new domain approved with only two articles.

\n\n\n\n
\"An
\n\n\n\n

That experience stayed with me.

\n\n\n\n

It taught me that rejection doesn’t necessarily mean you aren’t capable.

\n\n\n\n

Sometimes you simply haven’t figured out the problem yet.

\n\n\n\n

That became a recurring theme in my life.

\n\n\n\n

Looking for a career, finding a community

\n\n\n\n

Eventually, I started looking for a full-time job in mid 2022.

\n\n\n\n

That was another learning experience, although not always a pleasant one.

\n\n\n\n

I applied to more than 800 companies and went through around 2,000 job applications.

\n\n\n\n

During that period, I discovered UnderrepresentedInTech through Michelle Frechette. That eventually introduced me to Post Status, where I started meeting more people from the WordPress ecosystem.

\n\n\n\n

Something interesting was happening.

\n\n\n\n

While I was struggling to find where I fit professionally, I was slowly finding a place for myself in WordPress.

\n\n\n\n

I started learning not just about the software, but about the project behind it and the people who were building it.

\n\n\n\n

And then I heard about WordCamp Bhopal.

\n\n\n\n

The WordCamp I almost couldn’t attend

\n\n\n\n

My first WordCamp was WordCamp Bhopal in 2023.

\n\n\n\n

I wanted to go.

\n\n\n\n

I had told people I would go.

\n\n\n\n

There was just one problem: I didn’t have the money to actually make the trip happen.

\n\n\n\n

So I asked for help in the Post Status Slack community.

\n\n\n\n

I still think about what happened next.

\n\n\n\n

People who had never met me in person decided to help. Alan, Jenni, and Corey Maass contributed financially. Michelle, Jeff, and others shared my request, and Ronald (from DLXPlugins) also helped after seeing it.

\n\n\n\n

People I barely knew, or had never met at all, helped me get to an event that I otherwise couldn’t have attended.

\n\n\n\n

I made it to Bhopal.

\n\n\n\n

The journey itself was almost comical. I travelled at the last moment, ended up at the wrong location at night, and then had an entire hotel saga before things finally settled down.

\n\n\n\n

But once I got there, none of that really mattered.

\n\n\n\n

Later at the event, Nabin Jaiswal also helped.

\n\n\n\n

I met people I had previously known only through websites, Slack, and social media.

\n\n\n\n\n\n\n\n


And then something unexpected happened.

\n\n\n\n

I wanted to go to another WordCamp.

\n\n\n\n

Then another.

\n\n\n\n

That first trip was followed by WordCamp Mumbai, WordCamp Udaipur, where I received a scholarship, and WordCamp Ahmedabad in 2023.

\n\n\n\n\n\n\n\n


Within a few months, WordPress had gone from something I used on my computer to something I experienced through people.

\n\n\n\n

It had faces now.

\n\n\n\n

Names.

\n\n\n\n

Conversations.

\n\n\n\n

Handshakes.

\n\n\n\n

People asking how I was doing.

\n\n\n\n

And I wanted to give something back.

\n\n\n\n

I didn’t know how much I could contribute

\n\n\n\n

I started with the Marketing team and gradually found my way into other parts of the project: Community, Meetups, Polyglots, Photos, Training, and Core.

\n\n\n\n

In January 2024, I published a public contribution goal for myself.

\n\n\n\n
\n

My #WordPress contribution goals for 2024:
1. Contribute 100 photos \"📸\"
2. Translate 5000 strings \"🌐\"
3. Write 5 documentation pieces \"📝\"
4. Organize meetups \"🤝\"
5. Attend 8+ WordCamps \"🎉\"
6. Make impactful marketing contributions! \"💡\" #OpenSource #WordPressCommunity #2024Goals pic.twitter.com/uLxE0BdYVL

— Satyam Vishwakarma (Satya) (@ask_hellosatya) January 17, 2024
\n
\n\n\n\n

I wanted to contribute 100 photos, translate thousands of strings, work on documentation and training, organize meetups, attend WordCamps, volunteer at events, and make meaningful contributions to marketing.

\n\n\n\n

At the time, it was simply a list of things I wanted to try.

\n\n\n\n

I didn’t know where it would lead.

\n\n\n\n

Within that year, I contributed around 150 photos and translated, reviewed, or suggested around 1,400 strings. I also reviewed Training content, organized my first meetup for WordPress’s 21st birthday, graduated as a mentee in the WordPress Contributor Mentorship Program 2nd Cohort for Support and Polyglots, worked on marketing for releases and events, volunteered at multiple events, and eventually led Contributor Day tables.

\n\n\n\n\n\n\n\n


I also became a Project Manager at do_action Bhopal after starting there as a Content and Social Media Manager.

\n\n\n\n\n\n\n\n


I also volunteered at PHPCamp 2024, an Un(conference) inspired by the BarCamp format.

\n\n\n\n\n\n\n\n


Other WordCamp Events I Attended in 2025–2026

\n\n\n\n\n\n\n\n


I also helped with sponsorships and the overall program progress of WPSimplified’s three-month live WordPress training program, led by Sunil Kumar Sharma, which ran from November 2025 to January 2026.

\n\n\n\n
\"\"
Satyam Vishwakarma, with WPSimplified swag presented in recognition of his organizing efforts.
\n\n\n\n

On paper, those things look like achievements.

\n\n\n\n

But that’s not how I remember them.

\n\n\n\n

I remember sitting in meetings, wondering whether my idea was good enough.

\n\n\n\n

I remember asking questions.

\n\n\n\n

I remember people patiently explaining things.

\n\n\n\n

I remember realizing that I could actually be useful.

\n\n\n\n

And I remember the feeling of seeing something I had worked on become part of something much bigger than me.

\n\n\n\n

That was when contribution started becoming less about “what can I get from WordPress?” and more about “what can I give back?”

\n\n\n\n

The people became the story

\n\n\n\n

The more I contributed, the more people I met.

\n\n\n\n

Some of them became friends.

\n\n\n\n

Some became mentors.

\n\n\n\n

Some simply inspired me by watching how they showed up for the community.

\n\n\n\n

Michelle Frechette has been one of those people for me. So have Topher DeRosia, Isotta Peira, Nidhi Jain, Ganga Kafle, and many others.

\n\n\n\n

What I admire about people like them isn’t just what they have achieved.

\n\n\n\n

It’s the way they make other people feel that there is room for them, too.

\n\n\n\n

That matters when you’re coming from somewhere like Fatehpur and trying to find your place in a global community.

\n\n\n\n

You don’t always need someone to give you an opportunity.

\n\n\n\n

Sometimes you just need someone to make you believe that you are allowed to try.

\n\n\n\n

I’ve been fortunate to have people do that for me.

\n\n\n\n

From contributing to building

\n\n\n\n

By my second year, I started wanting to build things of my own within the WordPress ecosystem.

\n\n\n\n

I volunteered and led the marketing team alongside Emma Young at WordCamp Asia 2025 in Manila.

\n\n\n\n

I started building plugins of my own, with contributions and support from Harish, Bhargav, Makarand Mane, Hitanshu Sahu, and Sajid Ansari.

\n\n\n\n

The first was QuoteFrameShare.

\n\n\n\n

It lets people create and share customizable blockquotes in WordPress.

\n\n\n\n
\n

That project was particularly meaningful to me because writing and poetry have always been a part of who I am. Something that started with me writing technology tutorials for fellow engineering students had now come full circle into something I was building for writers, poets, and storytellers.

\n
\n\n\n\n

The second was Contributor Photo Gallery.

\n\n\n\n

It helps WordPress contributors display their WordPress.org photo contributions as a portfolio without needing to write code.

\n\n\n\n
\n

That one came from another part of my journey: photography and the WordPress Photo Directory.

\n
\n\n\n\n

I liked that both projects solved relatively simple problems, but for communities and people I actually cared about.

\n\n\n\n

I wasn’t just building a plugin because I could.

\n\n\n\n

I was building something because I had an idea and thought it could be useful to someone else.

\n\n\n\n

Not everything went smoothly

\n\n\n\n

My WordPress journey hasn’t been a straight line upward.

\n\n\n\n

There was a period when I became so enthusiastic about contributing that I started trying to do everything.

\n\n\n\n

Every team.

\n\n\n\n

Every opportunity.

\n\n\n\n

Every event.

\n\n\n\n

Every possible contribution.

\n\n\n\n

I was so focused on proving that I could contribute that I wasn’t paying enough attention to everything else in my life.

\n\n\n\n

Eventually, I burned out.

\n\n\n\n

I also learned that community work has its own challenges. Not every experience was positive, and there were moments when I felt overlooked, misunderstood, or discouraged.

\n\n\n\n

Those experiences were difficult, but they also forced me to think about what I actually wanted from contribution.

\n\n\n\n

I realized that I didn’t want to spend my time trying to prove that I belonged.

\n\n\n\n

I wanted to contribute because I cared about the project and the people in it.

\n\n\n\n

That changed how I look at contribution today.

\n\n\n\n

I learned that I didn’t need to be everywhere, collect every badge, or chase the biggest contribution count to prove that I cared.

\n\n\n\n

I needed to find a way of contributing that I could actually sustain.

\n\n\n\n

I also realized I didn’t need to sacrifice my health, livelihood, or peace of mind to prove that I cared.

\n\n\n\n

If you have one hour a week, contribute that hour.

\n\n\n\n

If you have more time, great.

\n\n\n\n

But contribution should be sustainable.

\n\n\n\n

The support that I will never forget

\n\n\n\n

One of the reasons I can talk about the difficult parts honestly is that the positive side of this community has been very real for me too.

\n\n\n\n

People have supported me in ways they didn’t have to.

\n\n\n\n

The help I received to attend my first WordCamp is one example.

\n\n\n\n

Katie at Barn2 later sponsored a couple of my WordCamp trips through the company’s events budget. Makarand nominated me for the Yoast Care Fund, which I was fortunate enough to receive.

\n\n\n\n

The WP Open Community Collective also supported me through a Contributor Day Lead Sponsorship sponsored by GoDaddy.

\n\n\n\n

And there were people who helped in ways that weren’t financial at all.

\n\n\n\n

People gave me their time.

\n\n\n\n

They answered questions.

\n\n\n\n

They recommended me.

\n\n\n\n

They encouraged me when I was uncertain.

\n\n\n\n

Those things can be easy to overlook when you are talking about contribution numbers, but for me, they are the real story.

\n\n\n\n

Because behind every contribution is usually a person.

\n\n\n\n

And behind my contributions are a lot of people who helped me get there.

\n\n\n\n

What WordPress gave me

\n\n\n\n

When I look back at the person who started writing technology tutorials for fellow engineering students, I don’t think he would have imagined any of this.

\n\n\n\n

I didn’t have a conventional path into technology.

\n\n\n\n

I didn’t study computer science.

\n\n\n\n

I learned WordPress by building things, breaking things, and figuring them out.

\n\n\n\n

And somehow, that was enough to get started.

\n\n\n\n

WordPress helped me develop skills in technology, content, SEO, marketing, product building, and community.

\n\n\n\n

It gave me opportunities to work with people around the world.

\n\n\n\n

It took me to WordCamps that I once couldn’t afford to attend.

\n\n\n\n

It helped me build open-source products.

\n\n\n\n

But those aren’t the things I value most.

\n\n\n\n

The biggest thing WordPress gave me was people.

\n\n\n\n

That’s why the word ‘belonging’ feels more appropriate to me than ‘success.’

\n\n\n\n

I came to WordPress to build websites.

\n\n\n\n

Somewhere along the way, WordPress helped me build a community around me.

\n\n\n\n

I am still figuring it out

\n\n\n\n

I still don’t know exactly where WordPress will take me.

\n\n\n\n

I want to keep building products.

\n\n\n\n

I want to grow further in the marketing and product side of my career.

\n\n\n\n

I want to explore more around partnerships and community.

\n\n\n\n

And one day, I’d love to co-lead a WordPress release.

\n\n\n\n

But I don’t want to chase these things just for a title or a badge.

\n\n\n\n

I want to build things that are genuinely useful.

\n\n\n\n

I want to become better at what I do.

\n\n\n\n

I want to help people who are where I was a few years ago.

\n\n\n\n

And I want to be the kind of person who, when someone remembers their first steps into WordPress, they can say: “Satya helped me get started.”

\n\n\n\n

That would mean more to me than any badge.

\n\n\n\n

Because that’s what happened to me.

\n\n\n\n

People helped me get started.

\n\n\n\n

People made space for me.

\n\n\n\n

People encouraged me.

\n\n\n\n

People believed I could contribute before I was completely sure myself.

\n\n\n\n

So if someone reading this is just starting their WordPress journey, my advice is simple:

\n\n\n\n

Start small. Ask questions. Find something you enjoy. Contribute consistently, but within your capacity.

\n\n\n\n

You don’t need to have everything figured out before you begin.

\n\n\n\n

I certainly didn’t.

\n\n\n\n

I started writing because I wanted to make complicated things easier for my classmates.

\n\n\n\n

I started blogging because I was curious about technology.

\n\n\n\n

I started using WordPress because my brother showed me what was possible.

\n\n\n\n

I kept learning because there was always something new to discover.

\n\n\n\n

And eventually, I started contributing because I wanted to give something back.

\n\n\n\n

But somewhere along the way, something else happened.

\n\n\n\n

I found people.

\n\n\n\n

I found opportunities.

\n\n\n\n

I found a community.

\n\n\n\n

And I found a place where I could keep learning, contributing, and becoming a little better than I was before.

\n\n\n\n

I came to WordPress to build websites.

\n\n\n\n

Somewhere along the way, WordPress helped me build a community around me.

\n\n\n\n

And maybe that’s what this journey has really been about.

\n\n\n\n

From blogging to belonging.

\n\n\n\n

Blogging से Belonging तक: मेरी WordPress Journey

\n\n\n\n

शुरुआत

\n\n\n\n

मेरा नाम सत्यम विश्वकर्मा है, हालांकि ज़्यादातर लोग मुझे सत्या के नाम से जानते हैं।

\n\n\n\n

मैं महमदपुर नाम के एक छोटे से गाँव से आता हूँ, जो उत्तर प्रदेश के फतेहपुर, दोआब के शहर, के पास है और गंगा और यमुना नदियों के बीच बसा है। यह जगह हमेशा से मुझे अपना घर लगी है।

\n\n\n\n

मैंने फतेहपुर के Government Polytechnic College से Electronics Engineering (Micro) की पढ़ाई की। एक छोटे शहर में बड़े होते और पढ़ते हुए मुझे कभी ठीक से अंदाज़ा नहीं था कि technology या internet मुझे कहाँ तक ले जा सकते हैं।

\n\n\n\n

मैं WordPress तक किसी बड़े career plan के साथ नहीं पहुँचा था। मैं बस technology को लेकर उत्सुक था और अपने आसपास के लोगों की मदद करना चाहता था।

\n\n\n\n

मेरे ज़्यादातर classmates, मेरी तरह, Hindi-medium schools या UP Board से पढ़े हुए थे।

\n\n\n\n

हमें इंटरनेट पर मिलने वाली बहुत-सी technical सामग्री या तो समझना मुश्किल होती थी या फिर वह उस तरह की आसान English में नहीं होती थी, जिसे हम सहजता से समझ सकें।

\n\n\n\n

साथ ही, मैं शायद अपने आसपास के लोगों में technology को लेकर थोड़ा ज़्यादा curious था।

\n\n\n\n

मुझे नया software आज़माना, नए features explore करना और यह समझना बहुत पसंद था कि चीज़ें कैसे काम करती हैं।

\n\n\n\n

जब भी मुझे कुछ interesting मिलता, मैं उसे अपने WhatsApp groups और classmates के साथ share करता था।

\n\n\n\n

उस समय मैंने इसे writing या teaching के तौर पर नहीं देखा था।

\n\n\n\n

मैं बस वही share कर रहा था जो मैंने खुद discover किया था।

\n\n\n\n

फिर एक दिन मन में आया:

\n\n\n\n

क्यों न इस information को कहीं ऐसी जगह रखा जाए, जहाँ इसे और लोग भी ढूँढ सकें?

\n\n\n\n

वही छोटी-सी सोच मेरी writing journey की शुरुआत बन गई।

\n\n\n\n

WordPress से पहले Blogger था

\n\n\n\n


Online लिखने के मेरे शुरुआती मौकों में से कुछ मुझे WhatsApp पर मिले लोगों की वजह से मिले।

\n\n\n\n

मैं technology से जुड़े एक WhatsApp group के ज़रिए Mohit Vyas और Arpit Nawal से online मिला। उन्होंने TopJankari नाम की website बनाई थी।

\n\n\n\n

वह WordPress पर नहीं चलती थी। वह एक custom-built, dynamic website थी, जिसमें content manage करने का अपना basic system था। बाद में मुझे जिन content management systems के बारे में पता चला, उनकी तुलना में वह काफी simple थी।

\n\n\n\n

मैंने TopJankari के लिए technology और tips से जुड़ा content लिखना शुरू किया।

\n\n\n\n

मेरे लिए यह बहुत exciting था।

\n\n\n\n

जिन चीज़ों को मैं खुद आज़मा रहा था, उन्हें मैं अब इस तरह लिख रहा था कि कोई दूसरा भी उन्हें पढ़कर इस्तेमाल कर सके।

\n\n\n\n

उसी दौरान मैंने Blogger.com के साथ भी experiment करना शुरू किया और वहाँ अपना technology और tips-related content publish करने लगा।

\n\n\n\n

उस समय मैं professional writer बनने के बारे में नहीं सोच रहा था।

\n\n\n\n

मुझे बस technology पसंद थी। मुझे चीज़ों को समझाना पसंद था। और मुझे यह विचार अच्छा लगता था कि मेरे द्वारा लिखी गई कोई चीज़ किसी दूसरे व्यक्ति की समस्या हल करने में मदद कर सकती है।

\n\n\n\n

मेरे लिए इतना ही काफी था आगे बढ़ते रहने के लिए।

\n\n\n\n

फिर WordPress मेरी कहानी में आया

\n\n\n\n


जब मैं blogging के साथ experiment कर रहा था, मेरे भाई Shivam ने उस समय तक WordPress पर अपनी पहली website बना ली थी।

\n\n\n\n

इसने मेरा ध्यान खींचा।

\n\n\n\n

मैं पहले से ही websites के काम करने के तरीके को लेकर curious था।

\n\n\n\n

उनको WordPress के साथ कुछ बनाते हुए देखकर मुझे पहली बार अंदाज़ा हुआ कि इसके साथ क्या-क्या बनाया जा सकता है।

\n\n\n\n

मैं भी इसे आज़माना चाहता था।

\n\n\n\n

उसी दौरान मेरे भाई Kapil और मैंने साथ मिलकर WordPress सीखना शुरू किया।

\n\n\n\n

हम दोनों को वास्तव में कुछ खास पता नहीं था।

\n\n\n\n

हमने YouTube videos, documentation, blog posts और सबसे ज़्यादा experimentation के ज़रिए सीखा।

\n\n\n\n

हम कुछ try करते, उसे तोड़ देते, फिर search करते कि वह क्यों टूटा, उसे ठीक करते और फिर अगली चीज़ पर बढ़ जाते।

\n\n\n\n

मेरा पहला WordPress project EngineersGuru था। वहाँ मैं अपनी Electronics Engineering (Micro) की पढ़ाई से जुड़ा content शेयर (publish) करता था।

\n\n\n\n

शुरुआत में मैंने इसे एक subdomain के रूप में चलाया। मेरा उद्देश्य था कि मेरे fellow students के लिए course से जुड़ी tutorials और useful information को समझना थोड़ा आसान हो सके।

\n\n\n\n

हमने एक Android-related blog भी शुरू किया और Jankari.xyz भी, जो एक ऐसी general website थी जहाँ मैं लगभग किसी भी ऐसी चीज़ के बारे में लिख सकता था जो मुझे interesting लगती थी।

\n\n\n\n

आज पीछे मुड़कर देखता हूँ तो ये websites मेरे लिए एक playground थीं।

\n\n\n\n

यहीं मैंने WordPress, writing, SEO, content creation और websites चलाने की basic बातें सीखीं।

\n\n\n\n

मैं किसी carefully planned career path पर नहीं चल रहा था।

\n\n\n\n

मैं बस चीज़ें बना रहा था, क्योंकि मैं देखना चाहता था कि मैं क्या कर सकता हूँ।

\n\n\n\n

और मेरी वही curiosity मुझे लगातार कहीं न कहीं आगे ले जाती रही।

\n\n\n\n

गलतियों से सीखना

\n\n\n\n


जैसे-जैसे blogging आगे बढ़ी, मैंने SEO, monetization और affiliate marketing के बारे में सीखना शुरू किया।

\n\n\n\n

मैंने अलग-अलग तरह की websites के साथ experiment किया और सीखते-सीखते दस से ज़्यादा blogs बनाए।

\n\n\n\n

मेरे इन्हीं projects में से एक आगे चलकर EYNZone बना, जिसे पहले EYNWorld के नाम से जाना जाता था। वहाँ मैंने दूसरे लोगों को WordPress और दूसरी skills सीखाने और अपने projects को grow करने में मदद करना शुरू किया।

\n\n\n\n

इस रास्ते में बहुत सारी असफलताएँ भी आईं।

\n\n\n\n

मैंने Google AdSense के लिए बीस से ज़्यादा बार apply किया, और हर बार कुछ न कुछ गलत हो जाता था। आखिरकार मैंने सिर्फ अंदाज़ा लगाना बंद किया और guidelines को सही से पढ़ना और समझना शुरू किया।

\n\n\n\n

आखिर में एक बिल्कुल नए domain पर सिर्फ दो articles के साथ मेरा AdSense approve हो गया।

\n\n\n\n

उस अनुभव का असर मुझ पर रह गया।

\n\n\n\n

इसने मुझे सिखाया कि rejection का मतलब हमेशा यह नहीं होता कि आप capable नहीं हैं।

\n\n\n\n

कभी-कभी इसका मतलब सिर्फ इतना होता है कि आपने अभी तक समस्या को समझा नहीं है।

\n\n\n\n

मेरी ज़िंदगी में यह बात बार-बार सामने आती रही।

\n\n\n\n

Career की तलाश में निकला था, Community मिल गई

\n\n\n\n


आखिरकार, 2022 के बीच में मैंने full-time नौकरी की तलाश शुरू की।

\n\n\n\n

वह भी अपने आप में एक learning experience था, हालांकि हमेशा अच्छा नहीं था।

\n\n\n\n

मैंने 800 से ज़्यादा companies में apply किया और करीब 2,000 job applications के process से गुज़रा।

\n\n\n\n

इसी दौरान मुझे Michelle Frechette के ज़रिए UnderrepresentedInTech के बारे में पता चला। वहाँ से आगे मुझे Post Status से जुड़ने का मौका मिला, जहाँ मैंने WordPress ecosystem के और लोगों से मिलना शुरू किया।

\n\n\n\n

कुछ interesting हो रहा था।

\n\n\n\n

जहाँ मैं यह समझने की कोशिश कर रहा था कि professionally मेरी जगह कहाँ है, वहीं धीरे-धीरे WordPress में मुझे अपनी जगह मिल रही थी।

\n\n\n\n

मैं सिर्फ software के बारे में नहीं सीख रहा था।

\n\n\n\n

मैं उस project के बारे में सीख रहा था जो software के पीछे था, और उन लोगों के बारे में भी जो उसे बनाने में मदद कर रहे थे।

\n\n\n\n

और फिर मैंने WordCamp Bhopal के बारे में सुना।

\n\n\n\n

वह WordCamp जिसे मैं लगभग attend नहीं कर पाता

\n\n\n\n


मेरा पहला WordCamp, WordCamp Bhopal 2023 था।

\n\n\n\n

मैं जाना चाहता था।

\n\n\n\n

मैंने लोगों से कह भी दिया था कि मैं जाऊँगा।

\n\n\n\n

बस एक समस्या थी।

\n\n\n\n

मेरे पास उस trip के लिए पैसे नहीं थे।

\n\n\n\n

इसलिए मैंने Post Status Slack community में मदद माँगी।

\n\n\n\n

आज भी मैं सोचता हूँ कि उसके बाद क्या हुआ था।

\n\n\n\n

जिन लोगों ने मुझे कभी सामने से देखा तक नहीं था, उन्होंने मेरी मदद करने का फैसला किया।

\n\n\n\n

Alan, Jenni और Corey Maass ने financially मदद की। Michelle, Jeff और दूसरे लोगों ने मेरी request को share किया। Ronald, जो DLXPlugins से हैं, उन्होंने भी इसे देखकर मदद की।

\n\n\n\n

जिन लोगों को मैं मुश्किल से जानता था, या शायद कभी मिला ही नहीं था, उन्होंने मुझे उस event तक पहुँचने में मदद की जहाँ मैं अपने दम पर नहीं जा सकता था।

\n\n\n\n

मैं Bhopal पहुँच गया।

\n\n\n\n

और वह सफ़र अपने आप में काफ़ी उलझनों से भरा था।

\n\n\n\n

मैंने आखिरी समय में यात्रा शुरू की, रात में गलत जगह पहुँच गया और फिर होटल को लेकर एक अलग ही किस्सा शुरू हो गया। आखिरकार, किसी तरह सब ठीक हुआ।

\n\n\n\n

लेकिन जब मैं वहाँ पहुँच गया, तो इनमें से किसी चीज़ की उतनी importance नहीं रही।

\n\n\n\n

Event के दौरान Nabin Jaiswal ने भी मेरी मदद की।

\n\n\n\n

मैं उन लोगों से मिला जिन्हें अब तक सिर्फ websites, Email, Slack और social media के ज़रिए जानता था।

\n\n\n\n

और फिर कुछ unexpected हुआ।

\n\n\n\n

मेरा मन हुआ कि मैं एक और WordCamp में जाऊँ।

\n\n\n\n

फिर एक और।

\n\n\n\n

उस पहली trip के बाद WordCamp Mumbai, WordCamp Udaipur, जहाँ मुझे scholarship मिली, और WordCamp Ahmedabad आए।

\n\n\n\n

कुछ ही महीनों में WordPress मेरे लिए computer पर इस्तेमाल की जाने वाली किसी चीज़ से बदलकर लोगों के ज़रिए अनुभव की जाने वाली चीज़ बन गया था।

\n\n\n\n

अब उसके चेहरे थे।

\n\n\n\n

नाम थे।

\n\n\n\n

बातचीत थी।

\n\n\n\n

हाथ मिलाना था।

\n\n\n\n

लोग पूछते थे कि मैं कैसा हूँ।

\n\n\n\n

और मेरा मन हुआ कि अब मुझे भी कुछ वापस देना चाहिए।

\n\n\n\n

मुझे नहीं पता था कि मैं कितना contribute कर सकता हूँ

\n\n\n\n


मैंने शुरुआत Marketing team से की और धीरे-धीरे WordPress project के दूसरे हिस्सों तक पहुँचता गया: Community, Meetups, Polyglots, Photos, Training और Core।

\n\n\n\n

जनवरी 2024 में मैंने अपने लिए एक public contribution लक्ष्य बनाया।

\n\n\n\n

मैं 100 photos contribute करना चाहता था, हजारों strings translate करना चाहता था, documentation और training पर काम करना चाहता था, meetups organize करना चाहता था, WordCamps attend करना चाहता था, events में volunteer करना चाहता था और marketing में meaningful contributions देना चाहता था।

\n\n\n\n

उस समय यह बस उन चीज़ों की एक list थी जिन्हें मैं try करना चाहता था।

\n\n\n\n

मुझे नहीं पता था कि यह मुझे कहाँ ले जाएगी।

\n\n\n\n

उस साल मैंने करीब 150 photos contribute कीं और लगभग 1,400 strings को translate, review या suggest किया। मैंने Training content भी review किया, WordPress के 21st birthday के लिए अपना पहला meetup organize किया, releases और events के marketing पर काम किया, कई events में volunteer किया और Contributor Days में tables भी lead करने लगा।

\n\n\n\n

मैं do_action Bhopal में Content and Social Media Manager के लिए चुना गया और बाद में Project Manager बना दिया गया।

\n\n\n\n

कागज़ पर देखें तो ये सब achievements लगती हैं।

\n\n\n\n

लेकिन मुझे ये इस तरह याद नहीं हैं।

\n\n\n\n

मुझे meetings याद हैं, जहाँ मैं सोचता था कि मेरा idea सही भी है या नहीं।

\n\n\n\n

मुझे अपने सवाल पूछना याद है।

\n\n\n\n

मुझे याद है कि लोग धैर्य से चीज़ें समझाते थे।

\n\n\n\n

मुझे याद है वह एहसास जब मुझे पहली बार लगा कि मैं वास्तव में useful हो सकता हूँ।

\n\n\n\n

और मुझे वह feeling याद है जब मेरे काम की कोई छोटी-सी चीज़ मेरे से कहीं बड़ी किसी चीज़ का हिस्सा बन गई।

\n\n\n\n

शायद वहीं से contribution मेरे लिए बदलना शुरू हुआ।

\n\n\n\n

यह सवाल कम होने लगा कि:

\n\n\n\n

“मुझे WordPress से क्या मिल सकता है?”

\n\n\n\n

और उसकी जगह एक दूसरा सवाल आने लगा:

\n\n\n\n

“मैं WordPress को क्या दे सकता हूँ?”

\n\n\n\n

कहानी में लोग आने लगे

\n\n\n\n


जितना मैं contribute करता गया, उतने ही ज़्यादा लोगों से मिलता गया।

\n\n\n\n

कुछ दोस्त बन गए।

\n\n\n\n

कुछ mentors बन गए।

\n\n\n\n

कुछ ऐसे लोग थे जिन्होंने बस community में जिस तरह अपनी जगह बनाई और दूसरों के लिए मौजूद रहे, उससे मुझे inspiration मिली।

\n\n\n\n

Michelle Frechette मेरे लिए ऐसे ही लोगों में से एक रही हैं। उनके साथ Topher DeRosia, Isotta Peira, Nidhi Jain, Ganga Kafle, और कई दूसरे लोग भी हैं।

\n\n\n\n

मैं इन लोगों से सिर्फ इसलिए प्रभावित नहीं हूँ कि उन्होंने क्या हासिल किया है।

\n\n\n\n

बल्कि इसलिए कि वे दूसरों को यह महसूस कराते हैं कि उनके लिए भी जगह है।

\n\n\n\n

जब आप Fatehpur जैसी जगह से आते हैं और एक global community में अपनी जगह बनाने की कोशिश करते हैं, तो यह बहुत मायने रखता है।

\n\n\n\n

हर बार किसी का आपको opportunity देना ज़रूरी नहीं होता।

\n\n\n\n

कभी-कभी आपको सिर्फ किसी ऐसे व्यक्ति की ज़रूरत होती है जो आपको यह विश्वास दिला दे कि:

\n\n\n\n

“हाँ, तुम भी कोशिश कर सकते हो।”

\n\n\n\n

मैं खुशकिस्मत हूँ कि मेरी journey में ऐसे लोग आए।

\n\n\n\n

Contribution से building तक

\n\n\n\n


मेरे दूसरे साल तक आते-आते मेरे मन में WordPress ecosystem के अंदर अपने कुछ products बनाने की इच्छा होने लगी।

\n\n\n\n

मैंने WordCamp Asia 2025 में Manila में Emma Young के साथ marketing team में lead किया और volunteer किया।

\n\n\n\n

इसके साथ मैंने अपने plugins बनाना भी शुरू किया, जिसमें Harish, Bhargav, Makarand Mane, Hitanshu Sahu, और Sajid Ansari के contributions और support ने मदद की।

\n\n\n\n

पहला था QuoteFrameShare

\n\n\n\n

यह लोगों को WordPress में customizable blockquotes बनाने और share करने की सुविधा देता है।

\n\n\n\n

यह project मेरे लिए खास था क्योंकि writing और poetry हमेशा से मेरी ज़िंदगी का हिस्सा रहे हैं।

\n\n\n\n

जिस चीज़ की शुरुआत fellow engineering students के लिए technology tutorials लिखने से हुई थी, वह अब घूमकर ऐसे product तक पहुँच गई थी जिसे writers, poets और storytellers के लिए बनाया जा रहा था।

\n\n\n\n

दूसरा था Contributor Photo Gallery

\n\n\n\n

यह WordPress contributors को अपनी WordPress.org photo contributions को बिना code लिखे एक portfolio की तरह दिखाने में मदद करता है।

\n\n\n\n

यह मेरी journey के एक और हिस्से से आया था: photography और WordPress Photo Directory।

\n\n\n\n

मुझे अच्छा लगा कि दोनों projects छोटी और relatively simple problems को solve करते थे, लेकिन उन communities और लोगों के लिए, जो मेरे लिए सच में मायने रखते थे।

\n\n\n\n

मैं सिर्फ इसलिए plugin नहीं बना रहा था क्योंकि मैं बना सकता था।

\n\n\n\n

मैं इसलिए कुछ बना रहा था क्योंकि मेरे पास एक idea था और मुझे लगा कि वह किसी और के लिए useful हो सकता है।

\n\n\n\n

सब कुछ हमेशा ठीक नहीं रहा

\n\n\n\n


मेरी WordPress journey हमेशा सीधी ऊपर की ओर जाने वाली कहानी नहीं रही।

\n\n\n\n

एक समय ऐसा भी आया जब contribution को लेकर मेरा उत्साह इतना बढ़ गया कि मैं सब कुछ करने की कोशिश करने लगा।

\n\n\n\n

हर team।

\n\n\n\n

हर opportunity।

\n\n\n\n

हर event।

\n\n\n\n

हर possible contribution।

\n\n\n\n

मैं यह साबित करने में इतना व्यस्त हो गया था कि मैं contribute कर सकता हूँ कि मैंने अपनी ज़िंदगी की बाकी चीज़ों पर पर्याप्त ध्यान देना शुरू नहीं किया।

\n\n\n\n

आखिरकार, मैं burnout हो गया।

\n\n\n\n

मैंने यह भी सीखा कि community work की अपनी challenges होती हैं।

\n\n\n\n

हर experience अच्छा नहीं था। कुछ ऐसे moments भी आए जब मुझे लगा कि मेरी बात को देखा नहीं गया, मुझे समझा नहीं गया या मैंने discouraged महसूस किया।

\n\n\n\n

वे experiences आसान नहीं थे।

\n\n\n\n

लेकिन उन्होंने मुझे यह सोचने पर मजबूर किया कि आखिर मैं contribution से क्या चाहता हूँ।

\n\n\n\n

मुझे एहसास हुआ कि मैं अपना समय यह साबित करने में नहीं लगाना चाहता था कि मैं belong करता हूँ।

\n\n\n\n

मैं contribute इसलिए करना चाहता था क्योंकि मुझे इस project और इसमें शामिल लोगों की परवाह थी।

\n\n\n\n

इसने contribution को देखने का मेरा तरीका बदल दिया।

\n\n\n\n

मुझे समझ आया कि मुझे हर जगह होना ज़रूरी नहीं है। हर badge collect करना ज़रूरी नहीं है। सबसे बड़ा contribution count हासिल करना भी ज़रूरी नहीं है ताकि मैं यह साबित कर सकूँ कि मुझे परवाह है।

\n\n\n\n

मुझे बस ऐसा तरीका ढूँढना था जिससे मैं लंबे समय तक contribute कर सकूँ।

\n\n\n\n

मुझे यह भी समझ आया कि यह साबित करने के लिए कि मुझे परवाह है, मुझे अपनी health, livelihood या peace of mind को sacrifice करने की ज़रूरत नहीं है।

\n\n\n\n

अगर आपके पास हफ्ते में सिर्फ एक घंटा है, तो उतना ही contribute कीजिए।

\n\n\n\n

अगर आपके पास ज़्यादा समय है, तो बहुत अच्छी बात है।

\n\n\n\n

लेकिन contribution sustainable होना चाहिए।

\n\n\n\n

वह support जिसे मैं कभी नहीं भूलूँगा

\n\n\n\n


शायद यही वजह है कि मैं अपनी journey के मुश्किल हिस्सों के बारे में भी ईमानदारी से बात कर सकता हूँ, क्योंकि इस community का positive side भी मेरे लिए उतना ही वास्तविक रहा है।

\n\n\n\n

लोगों ने मेरी ऐसे तरीकों से मदद की, जिसकी उन्हें कोई मजबूरी नहीं थी।

\n\n\n\n

मेरे पहले WordCamp तक पहुँचने में मिली मदद इसका एक उदाहरण है।

\n\n\n\n

बाद में Katie at Barn2 ने company के events budget के ज़रिए मेरे कुछ WordCamp trips sponsor किए। Makarand ने मुझे Yoast Care Fund के लिए nominate किया, जिसे पाना मेरे लिए सौभाग्य की बात रही।

\n\n\n\n

WP Open Community Collective ने भी मुझे Contributor Day Lead Sponsorship, जिसे GoDaddy ने sponsor किया था, के ज़रिए support किया।

\n\n\n\n

और कुछ लोगों ने ऐसी मदद की जो financial बिल्कुल नहीं थी।

\n\n\n\n

लोगों ने अपना समय दिया।

\n\n\n\n

मेरे सवालों के जवाब दिए।

\n\n\n\n

मेरी recommendations कीं।

\n\n\n\n

जब मैं खुद को लेकर uncertain था, तब मुझे encourage किया गया।

\n\n\n\n

Contribution numbers की बात करते समय इन चीज़ों को आसानी से नज़रअंदाज़ किया जा सकता है।

\n\n\n\n

लेकिन मेरे लिए असली कहानी यही है।

\n\n\n\n

क्योंकि हर contribution के पीछे अक्सर एक इंसान होता है।

\n\n\n\n

और मेरी contributions के पीछे बहुत सारे ऐसे लोग हैं जिन्होंने मुझे वहाँ तक पहुँचने में मदद की।

\n\n\n\n

WordPress ने मुझे क्या दिया

\n\n\n\n


जब मैं उस लड़के को पीछे मुड़कर देखता हूँ जिसने अपने fellow engineering students के लिए technology tutorials लिखना शुरू किया था, तो मुझे नहीं लगता कि उसने कभी सोचा होगा कि उसकी journey यहाँ तक आएगी।

\n\n\n\n

Technology में आने का मेरा कोई conventional रास्ता नहीं था।

\n\n\n\n

मैंने computer science की पढ़ाई नहीं की।

\n\n\n\n

मैंने WordPress की चीज़ें बनाकर, उन्हें तोड़कर और फिर उन्हें समझते हुए सीखा।

\n\n\n\n

और किसी तरह, शुरुआत करने के लिए इतना ही काफी था।

\n\n\n\n

WordPress ने मुझे technology, content, SEO, marketing, product building और community जैसी skills विकसित करने में मदद की।

\n\n\n\n

इसने मुझे दुनिया भर के लोगों के साथ काम करने के मौके दिए।

\n\n\n\n

मुझे उन WordCamps तक पहुँचाया, जिन्हें मैं कभी afford भी नहीं कर सकता था।

\n\n\n\n

इसने मुझे open-source products बनाने का मौका दिया।

\n\n\n\n

लेकिन इन सबमें से कोई भी चीज़ वह नहीं है जिसे मैं सबसे ज़्यादा महत्व देता हूँ।

\n\n\n\n

WordPress ने मुझे सबसे बड़ी चीज़ जो दी, वह लोग थे।

\n\n\n\n

शायद इसीलिए मेरे लिए “success” से ज़्यादा सही शब्द “belonging” है।

\n\n\n\n

मैं WordPress पर websites बनाने आया था।

\n\n\n\n

लेकिन कहीं न कहीं, WordPress ने मेरे आसपास एक community बना दी।

\n\n\n\n

मैं अभी भी इसे समझने की कोशिश कर रहा हूँ

\n\n\n\n


मुझे अभी भी ठीक से नहीं पता कि WordPress मुझे आगे कहाँ ले जाएगा।

\n\n\n\n

मैं products बनाते रहना चाहता हूँ।

\n\n\n\n

मैं marketing और product के क्षेत्र में और आगे बढ़ना चाहता हूँ।

\n\n\n\n

मैं partnerships और community के बारे में और explore करना चाहता हूँ।

\n\n\n\n

और एक दिन, मैं WordPress release को co-lead करना चाहता हूँ।

\n\n\n\n

लेकिन मैं इन चीज़ों के पीछे सिर्फ किसी title या badge के लिए नहीं भागना चाहता।

\n\n\n\n

मैं ऐसी चीज़ें बनाना चाहता हूँ जो सच में useful हों।

\n\n\n\n

मैं अपने काम में बेहतर बनना चाहता हूँ।

\n\n\n\n

मैं उन लोगों की मदद करना चाहता हूँ जो आज वहीं खड़े हैं जहाँ मैं कुछ साल पहले था।

\n\n\n\n

और मैं ऐसा इंसान बनना चाहता हूँ कि जब कोई अपने WordPress journey के शुरुआती दिनों को याद करे, तो शायद वह कह सके:

\n\n\n\n

“Satya ने मेरी शुरुआत में मेरी मदद की थी।”

\n\n\n\n

मेरे लिए वह किसी भी badge से ज़्यादा मायने रखेगा।

\n\n\n\n

क्योंकि मेरे साथ भी यही हुआ था।

\n\n\n\n

लोगों ने मेरी शुरुआत में मेरी मदद की।

\n\n\n\n

लोगों ने मेरे लिए जगह बनाई।

\n\n\n\n

लोगों ने मुझे encourage किया।

\n\n\n\n

लोगों ने मुझ पर भरोसा किया, उस समय भी जब मुझे खुद पूरी तरह यकीन नहीं था कि मैं contribute कर सकता हूँ।

\n\n\n\n

इसलिए अगर आप अपनी WordPress journey अभी शुरू कर रहे हैं, तो मेरी सलाह बहुत simple है:

\n\n\n\n

छोटे से शुरू कीजिए। सवाल पूछिए। जो पसंद है, उसे खोजिए। लगातार contribute कीजिए, लेकिन अपनी capacity के भीतर।

\n\n\n\n

आपको शुरुआत करने से पहले सब कुछ पता होना ज़रूरी नहीं है।

\n\n\n\n

मुझे भी नहीं पता था।

\n\n\n\n

मैंने लिखना इसलिए शुरू किया क्योंकि मैं अपने classmates के लिए मुश्किल चीज़ों को आसान बनाना चाहता था।

\n\n\n\n

मैंने blogging इसलिए शुरू की क्योंकि technology को लेकर मेरे अंदर curiosity थी।

\n\n\n\n

मैंने WordPress इसलिए शुरू किया क्योंकि मेरे भाई ने मुझे दिखाया कि इसके साथ क्या किया जा सकता है।

\n\n\n\n

मैं सीखता रहा क्योंकि हमेशा कुछ नया सीखने के लिए था।

\n\n\n\n

और आखिरकार, मैंने contribute करना शुरू किया क्योंकि मैं कुछ वापस देना चाहता था।

\n\n\n\n

लेकिन कहीं न कहीं, इस journey के दौरान कुछ और भी हुआ।

\n\n\n\n

मुझे लोग मिले।

\n\n\n\n

मुझे opportunities मिलीं।

\n\n\n\n

मुझे एक community मिली।

\n\n\n\n

और मुझे एक ऐसी जगह मिली जहाँ मैं सीखता रह सकता था, contribute करता रह सकता था और हर दिन थोड़ा बेहतर बनता रह सकता था।

\n\n\n\n

मैं WordPress पर वेबसाइटें बनाने आया था।

\n\n\n\n

लेकिन कहीं न कहीं, WordPress ने मेरे आसपास एक community बना दी।

और शायद यही इस पूरी journey का असली मतलब है।

\n\n\n\n

Blogging से Belonging तक।

\n

The post From Blogging to Belonging: My WordPress Journey – Blogging से Belonging तक: मेरी WordPress Journey appeared first on HeroPress.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 29 Sep 2026 11:43:21 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:18:\"Satyam Vishwakarma\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:23;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"Open Channels FM: What Can You Learn From 4.4 Million Words?\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562978\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"https://openchannels.fm/what-can-you-learn-from-4-4-million-words/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:232:\"In this episode, Bob Dunn discusses utilizing 4.4 million words from Open Channels FM\'s podcasts and blog posts. He highlights tools like Jetpack AI Search and Site Chat, enhancing users\' access to valuable insights and discussions.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 29 Sep 2026 09:42:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:24;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:62:\"OpenStation Blog: WordPress Has Been Missing This for 15 Years\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1342\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:81:\"https://openstation.blog/2026/09/28/wordpress-has-been-missing-this-for-15-years/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:16418:\"
\n

tl;dr:

\n\n\n\n

15 years stuck in the same wp-admin, why don’t you try in playground the new wp-admin experience?

\n
\n\n\n\n

WordPress has spent the last fifteen years becoming capable of doing almost everything, yet somehow we have continued interacting with wp-admin in fundamentally the same way: click somewhere, load another screen, go back, open another tab because you do not want to lose the previous one, and after a while end up with ten different WordPress tabs scattered across your browser.

\n\n\n\n

I find it quite funny that we all accepted this as completely normal.

\n\n\n\n

Today WordPress is used to run stores, publications, membership sites, communities, LMS platforms, agencies and entire businesses. We have plugins that are effectively full applications, incredibly complex editing experiences, analytics, forms, CRM systems, media tools, commerce, automation and thousands of other things living inside the same installation. Yet the interface connecting all of them still assumes that, most of the time, you want to look at one thing at once.

\n\n\n\n

And when you don’t, the browser has to solve the problem for us.

\n\n\n\n

Browser tabs have essentially become the window manager of WordPress.

\n\n\n\n
\"\"
\n\n\n\n

That is one of the ideas that eventually led us to OpenStation.

\n\n\n\n

Why don’t we have windows?

\n\n\n\n

It sounds ridiculously obvious when you phrase it like that, but that is exactly why I find the question interesting.

\n\n\n\n

On a normal computer I can have my editor open next to a browser, keep a terminal in the background, drag files around, minimize something I want to return to later, or simply arrange my workspace around whatever I am doing at that moment. Nobody thinks about this as a feature anymore because it is just how computers work.

\n\n\n\n

Then we open WordPress and suddenly that whole model disappears.

\n\n\n\n
\"\"
\n\n\n\n

If I am editing a post and need something from the Media Library, I navigate away or open another tab. If I am checking an order while editing a product, another tab. If I want to compare two posts, another tab. If I am configuring something and need to check how another part of the site is set up, another tab.

\n\n\n\n

There is nothing technically wrong with that, of course, and it has worked for years, but after building and using OpenStation every day I started noticing how much context we constantly throw away simply because wp-admin was designed around pages rather than workspaces.

\n\n\n\n

That distinction matters much more today than it probably did fifteen years ago.

\n\n\n\n

WordPress quietly became something much bigger

\n\n\n\n

I keep describing WordPress as the operating system of the web, and obviously I do not mean that literally. What I mean is that WordPress has gradually accumulated many of the characteristics you would expect from a platform where applications live.

\n\n\n\n

Plugins install capabilities into it. Users have identities and permissions. Applications share data. We have APIs, scheduled processes, notifications, media, editors, databases and an enormous ecosystem of software that knows how to work with the same underlying environment.

\n\n\n\n

The strange part is that the interface never fully made the same transition.

\n\n\n\n

We kept adding more applications to WordPress, but we continued presenting them largely as destinations in a menu.

\n\n\n\n

OpenStation started from a very simple thought: what happens if, instead of redesigning every individual wp-admin page again, we change the environment in which those pages live?

\n\n\n\n
\"\"
\n\n\n\n

That immediately opens a much larger set of possibilities.

\n\n\n\n

A post editor does not need to replace your media library on screen. A WooCommerce order does not need to replace the product you were editing. A plugin screen does not necessarily need to occupy the entire browser just because you clicked its menu item.

\n\n\n\n

They can simply be windows.

\n\n\n\n

You can move them, resize them, minimize them, keep several of them open, organise them across different desktops and return to exactly what you were doing without recreating the context again.

\n\n\n\n

The funny thing is that none of this feels particularly futuristic. Quite the opposite. We have been using computers this way for decades.

\n\n\n\n

We just somehow never brought that interaction model into wp-admin.

\n\n\n\n

The interesting part is not actually the windows

\n\n\n\n

The windows are what people notice first because they are visual, but I think the more important idea is what happens once WordPress stops assuming that navigation must destroy context.

\n\n\n\n

Suddenly the admin becomes a workspace.

\n\n\n\n

You can have the Media Library next to the editor instead of travelling between them. You can keep an order visible while checking something else. You can open notes or widgets without abandoning your current task. Applications can coexist on the same desktop and eventually interact with each other in ways that become much harder when everything is isolated in separate browser tabs.

\n\n\n\n

This is also where things like drag and drop become much more interesting.

\n\n\n\n

If two applications are part of the same environment, moving an image, a product, a post or another WordPress entity between them can become an actual interaction instead of a sequence of copy, navigate, search, paste and navigate back.

\n\n\n\n

And once you start thinking about WordPress this way, a lot of things that initially looked like unrelated OpenStation features start making sense together: windows, the dock, multiple desktops, widgets, the command palette and applications are all different pieces of the same idea.

\n\n\n\n

The goal is not to decorate wp-admin until it looks like a desktop operating system. The goal is to make working in WordPress feel less like navigating a website and more like working inside an environment.

\n\n\n\n

We don’t need to replace wp-admin to do this

\n\n\n\n

This is probably the part I like the most about the approach.

\n\n\n\n

WordPress already has an enormous ecosystem and rebuilding everything would be both unrealistic and, in my opinion, the wrong problem to solve. There are thousands of admin interfaces that already work, plugins developers have spent years building, and workflows users already understand.

\n\n\n\n

OpenStation can sit on top of that rather than asking the ecosystem to start again.

\n\n\n\n

The existing WordPress admin can continue being WordPress. Existing plugins can continue exposing their interfaces. What changes is how those interfaces are presented and how you move between them.

\n\n\n\n

In some ways, I think that is much more interesting than simply designing another admin UI.

\n\n\n\n

We are not trying to decide what every WordPress application should look like. We are trying to give those applications a better place to live.

\n\n\n\n

And once you have that place, building actual OpenStation-native applications becomes possible as well. We have already been experimenting with things like a photo editor, project management tools and forms, but what excites me is not any individual application. It is the idea that WordPress can host an entire collection of tools that feel like they belong to the same workspace instead of a collection of isolated screens connected by a sidebar.

\n\n\n\n

So why did it take fifteen years?

\n\n\n\n

Probably because there was never a single moment where the old model stopped working.

\n\n\n\n

WordPress evolved gradually. A new menu here, another plugin there, a more sophisticated editor, WooCommerce, custom post types, page builders, analytics, SEO tools and so on. Each addition fitted reasonably well into what already existed, so there was never an obvious reason to stop and question the basic interaction model.

\n\n\n\n

But those small changes accumulated.

\n\n\n\n

The WordPress of today asks considerably more from wp-admin than the WordPress of fifteen years ago did, and I think that eventually creates an opportunity to revisit assumptions that once seemed completely reasonable.

\n\n\n\n

The assumption we are questioning with OpenStation is a very simple one:

\n\n\n\n

Why should opening something in WordPress mean leaving everything else behind?

\n\n\n\n

After spending months working this way, I now notice it every time I go back to the traditional flow. I open something, realise I need another part of WordPress, create another browser tab and immediately think: why am I doing this outside WordPress when WordPress itself could manage the workspace?

\n\n\n\n

That is probably the best way I can explain what we are building.

\n\n\n\n

WordPress has had applications for a very long time.

\n\n\n\n

Perhaps what it has been missing all these years is somewhere for those applications to actually live together.

\n\n\n\n

By the way, don’t forget you can always try OpenStation without even installing it in your site, using WordPress playgrounds

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 28 Sep 2026 12:57:03 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:25;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:39:\"Open Channels FM: Open Source Champions\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2563023\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:46:\"https://openchannels.fm/open-source-champions/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:209:\"The Open Source Champions initiative invites individuals and brands to support the network through a unique advocacy opportunity, offering exposure, promotional features, and participation in special episodes.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 28 Sep 2026 12:17:19 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:26;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:113:\"Gutenberg Times: Gutenberg 24.0, the road to 7.2, a new default theme named Ipsum, and more—Weekend Edition 377\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://gutenbergtimes.com/?p=47181\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:119:\"https://gutenbergtimes.com/gutenberg-24-0-the-road-to-7-2-a-new-default-theme-named-ipsum-and-more-weekend-edition-377/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:34343:\"

Howdy,

\n\n\n\n

Before anything else: if you maintain WordPress sites, go update them. WordPress 7.1.2 shipped on September 22 to patch a single critical vulnerability in page template resolution, one that lets an unauthenticated attacker load a chosen PHP file from outside your active theme’s directories.

\n\n\n\n

Now let’s move on to better things. Anne McCarthy is auctioning off her framed WordPress release albums, the ones given to release squad members. All the proceeds go to Stimpunks, a nonprofit started by Ryan Boren, who joined the project in 2003 and wrote the plugin system that nearly every site runs on. She calls the albums “a form of a gold medal to me,” and she built the auction site herself in a week. The starting bid is $500.

\n\n\n\n

We also learned this fortnight that the next default theme will be called Ipsum, which means 16 years of naming themes after the calendar is over. Admittedly, I’ll miss the old Twenty* names a little. But it’s time for something new for a new era.

\n\n\n\n

Two more quick things: WordPress has taken its turn leading the Open Website Alliance, alongside Drupal, Joomla!, and TYPO3, with Mary Hubbard holding the rotating presidency for the WordPress Foundation. And starting with 7.2 in December, release parties move from in-person events to livestreamed webinars, so the whole squad can actually be there.

\n\n\n\n

Enjoy your weekend!

\n\n\n\n

Your friendly neighborhood dev advocate, \"🍂\"
Justin Tadlock

\n\n\n\n\n\n
\n\n\n\n

Developing Gutenberg and WordPress

\n\n\n\n

Two security releases in six days. WordPress 7.1.2 is the urgent one, and it’s security-only: an unauthenticated attacker can, under the right conditions, make page template resolution include a readable local PHP file from outside the active theme directories. John Blackbourn led the release, Robert Ressl disclosed it, and the fix was backported to every eligible branch going back to 4.7.

\n\n\n\n

Five days earlier, WordPress 7.1.1 arrived as the regular maintenance release with 11 security fixes, 17 bug fixes on Core, and 19 for the Block Editor. Aaron Jorbin led it, and Anthropic is credited twice in the security list.

\n\n\n\n
\n\n\n\n

Aki Hamano announced what’s new in Gutenberg 24.0. The big feature: post title changes now show up in revisions with a proper diff, so you can stop guessing when a rename happened. The Gallery block gains a Grid variation with column count and “crop images to fit” configurable per breakpoint, and Site Title picks up fit-text, scaling to the width available instead of a fixed point size. And nearly 100 icons were redrawn on a stroke-based grid.

\n\n\n\n
\n\n\n\n

Stalled out somewhere between “clone the repo” and “why won’t this build”? Contributor Toolkit 1.2 from JuanMa Garrido now covers Gutenberg as well as Core, and it runs a stock WordPress in Playground with your checkout mounted as the plugin, already activated. No local server, no Docker.

\n\n\n\n

The road to 7.2

\n\n\n\n

Anne McCarthy published the roadmap to 7.2, and it looks to be a security-heavy cycle by WordPress standards. Sudo mode gates sensitive admin actions behind re-authentication, a new Secrets API gives credentials “a first-class way to store credentials safely,” and Application Passwords get hardened. Notes should gain a suggestion mode and emoji reactions. Designers get form element customization in Global Styles and custom block states. The final release lands in early December.

\n\n\n\n
\n\n\n\n

Real-time collaboration came out of WordPress 7.0, and Chris Zarate has now explained why in a post on moving to a server-aware approach for collaboration, written with Alec Geatches, Dennis Snell, ingeniumed, and Paul Kevan. The old design had browsers hold the post in a CRDT document and sync peer-to-peer, which broke three ways: the server couldn’t tell who made which edit, opening the door to content laundering; REST API and WP-CLI updates couldn’t participate, so saves became all-or-nothing overwrites; and a dropped connection could take your work with it. Three candidate sync engines are on the table, with a gutenberg-sync-engines repo to test against. If you build editorial tooling, have an opinion about this now.

\n\n\n\n
\n\n\n\n

The next default theme has a name, and for the first time in well over a decade, it isn’t a year. Henrique Iamarino introduced Ipsum, built with Carolina Nymark, Maggie Cabrera, and Juanfra Aldasoro. The reasoning behind the naming change: “default themes will have their own names and change when the design calls for it, not when the calendar does.” The theme is intentionally spare. It’s blog-first, has minimal typesets, and structural elements that stay invisible until you need them. The request is simple: “try it and tell us what breaks and what’s missing.”

\n\n\n\n
\"Screenshot
\n\n\n\n
\n\n\n\n

Nik Tsekouras opened a call for testing the DataForm editor inspector, which rebuilds the Post and Page tab of the Settings sidebar so it stops drifting from Quick Edit in the Site Editor. Install Gutenberg 24.0 or later and enable Editor Inspector: Use DataForm under Settings → Gutenberg. Test it as an editor, author, and contributor, not just as an admin.

\n\n\n\n

Behind the release

\n\n\n\n

A minor release can touch more than twenty branches, and much of that work was done by hand. Lance Willett opened a public repo of Core release tools, which includes tagging, release docs, SVN merge verification, and contributor lists.

\n\n\n\n
\n\n\n\n

Huzaifa Al Mesbah counted 84 people who tested WordPress 7.1 across 337 Trac tickets. Fifty were first-timers, which is 60% of everyone who showed up. The most important line: “you don’t need to be a developer.” 7.2 testing is open now.

\n\n\n\n

Plugins, Themes, and Tools for #nocode site builders and owners

\n\n\n\n

WooCommerce 11.2 lands the week of October 6, so read Shani Banerjee’s pre-release notes before it arrives rather than after. Order withdrawal emails become configurable, the CSV importer can match products by Global Unique ID when neither ID nor SKU is available, and checkout fields gain date support with min/max validation. Two of the seventeen developer advisories will bite if you ignore them: date filters in wc_get_orders() and wc_get_products() now read a bare date as a day in your store’s timezone rather than UTC, and the Cart and Checkout order summary becomes a fixed 360px column with the two-column breakpoint moving from 700px to 920px.

\n\n\n\n
\n\n\n\n

Two dot releases arrived in between, both flagged as security updates. WooCommerce 11.1.2 fixes the infinite recursion that was breaking product variation galleries, and 11.1.1 hardened API permissions and session handling.

\n\n\n\n
\n\n\n\n

The latest WordPress.com changelog moves the AI website builder from picking a theme to generating one: on Premium and Business plans, it “now generates a fully custom theme built around your goals and brand.” A new Annotate feature lets you queue several targeted edits and send them at once.

\n\n\n\n
\n\n\n\n

GatherPress started on a fourteen-hour drive to WordCamp US in 2018, when two Montclair meetup organizers came up with a name and then didn’t write any code for nine months. Rae Morey tells the story of how it grew into WordPress’ Meetup.com replacement, through July of this year, when Automattic’s Karen Arnold confirmed WordPress is going ahead with it. The gatherpress.org domain is transferring to the Foundation, and the plugin has been testable at events.wordpress.org since August 28. No launch date yet, and co-maintainer Mervin Hernandez Sitnikovski would rather you help than wait.

\n\n\n\n

Theme Development for Full Site Editing and Blocks

\n\n\n\n

WooCommerce has a new block theme. Brian Coords announced that Purple is back and ready for beta testing. The project was paused during a strategy update last year, and it’s Woo’s first official block theme.

\n\n\n\n
\"\"
\n\n\n\n

Ten color palettes, ten font pairings, custom styles for both WooCommerce and core blocks, and templates covering everything from Shop to Checkout to My Account. The inserter category is being renamed from “WooCommerce” to “Shop.” If you’re wondering where Storefront’s featured extensions went, block editing absorbed most of them. Peter Schimke also notes that Purple is now the default for new WordPress.com Commerce stores.

\n\n\n\n
\n\n\n\n

Mark your calendar for Wednesday, September 30 at 10 a.m. PDT / 1 p.m. EDT / 7 p.m. CEST: Woo is hosting a live session on building with WooCommerce block themes. Mike McAlister of Ollie joins Woo engineers Karol Manijak and Lucio Giannotta. There’s a Q&A at the end and a recording afterward, but questions only work if you show up.

\n\n\n\n
\n\n\n\n

“We need more workflow in Core,” said K. Adam White, principal engineer at Human Made, talking with Nathan Wrigley on WP Tavern about migrating to blocks with artisanal care and enterprise efficiency. At the center of it is Human Made’s open-source Rehydrator, which uses pattern HTML as a template and injects migrated content into it, so structure and styling survive a move off something like Sitecore. He describes building SQLite databases from client exports just to find the edge cases. He’s candid about the gaps, too: granular permissions, editorial approval workflows, and internationalization.

\n\n\n
\n
\n\n
\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n
\n

“Keeping up with Gutenberg – Index 2026”
A chronological list of the WordPress Make Blog posts from various teams involved in Gutenberg development: Design, Theme Review Team, Core Editor, Core JS, Core CSS, Test, and Meta team from Jan. 2024 on. Updated by yours truly. 

\n
\n\n\n\n\n\n\n
\n

The previous years are also available:
2020 | 2021 | 2022 | 2023 | 2024 | 2025

\n
\n
\n\n\n

Building Blocks and Tools for the Block editor

\n\n\n\n

Your Query Loop returns nothing, and the heading and pagination you wrapped around it render anyway. Ryan Welcher spent a live stream adding a “hide if empty” control to Advanced Query Loop, his free plugin that extends the core Query Loop with taxonomy relationships, meta queries, and relative date filters.

\n\n\n
\n
\n\n
\n
\n\n\n
\n\n\n\n

Gutenberg’s JavaScript tests have moved off Jest. Marco Ciampini explains that unit and integration tests now use Vitest, driven by ESM: as more dependencies shipped ECMAScript modules, the CommonJS-based Jest setup needed more and more compatibility glue. The part that affects you: @wordpress/scripts 36.0.0 makes Vitest the default for test-unit-js, with @wordpress/eslint-plugin 27.0.0 following. Not ready to migrate? Switch to wp-scripts test-unit-jest and install the Jest dependencies yourself.

\n\n\n\n

AI in WordPress

\n\n\n\n

Your agent builds you a landing page, and then what? It sits in a chat log, or a folder, or a local dev server nobody else can reach. That’s the gap Spacefast is built for, and Automattic soft-launched it this week: Matt Mullenweg announced it on X. The pitch is the last mile for agent output: publish from a conversation with Claude or ChatGPT, from npx spacefast publish, or from a GitHub push, and get a permanent URL with immutable versions, one-click rollback, and access controls. It hosts full-stack projects, not just static files.

\n\n\n\n

The WordPress hook is a Spacefast plugin with two modes. Static mode hooks into Simply Static, exports your site, and publishes the snapshot. Headless mode treats WordPress as the content source for a repository project, triggering a production rebuild when you publish or update public content.

\n\n\n\n

MCP turns up everywhere

\n\n\n\n

WordPress Trac now speaks MCP. Lance Willett announced a Trac MCP server that’s “public and free to use: no account or API key needed.” Ask what’s left on a ticket and which pull requests are still open, or what someone committed in January 2005—yes, it goes back that far. It covers every WordPress.org Trac, from Core and Meta to bbPress and GlotPress. James LePage wrote the first version, with props to Jon Surrell, David Newman, and Konstantin Obenland.

\n\n\n\n
\n\n\n\n

Jamie Marsland makes the case for why WebMCP is going to be big for WordPress and, more usefully, shows you how to try it this afternoon: open the ChatGPT desktop app in Work mode, load WordPress Playground in its built-in browser, and ask it to build you a homepage. His framing is the clearest I’ve read. WebMCP gives an assistant “an instruction manual with working buttons” instead of making it squint at screenshots.

\n\n\n\n
\n\n\n\n

For the enterprise view of the same shift, Shane Schick compares WebMCP and traditional MCP and lands on a line I’d pull out of the whole piece: “MCP is not going away, and WebMCP shouldn’t be seen as a rival protocol.” His table sets them side by side on deployment, access scope, scalability, and auditability. That auditability row is the one that matters if you answer to a compliance team.

\n\n\n\n
\n\n\n\n

Schick also introduces Parse.ly MCP, which connects Parse.ly data to whichever assistant your team already uses. You authorize once with your existing login, and the assistant sees exactly the sites your account already sees. “Analysis that used to take a request and a day now takes a conversation.”

\n\n\n\n
\n\n\n\n

One more, for the security-conscious: WPShout walks through connecting Cursor to WordPress with MCP using ThemeIsle’s Easy MCP AI plugin. Every tool call still passes a WordPress capability check, with a 60-requests-per-minute default. Their advice is the part to take seriously: “read-only first, watch the audit log for a week, then grant write scopes deliberately.”

\n\n\n\n

Putting agents to work

\n\n\n\n

Anthropic open-sourced its commerce agents on September 2, and WooCommerce has already adapted them. Shani Banerjee walks through running the Claude Commerce Agent on WooCommerce, which spins up a demo store with eight products and nine orders in about fifteen minutes. The neat piece is a bridge plugin: the assistant’s cart lives under a Store API token your browser session can’t see, so at checkout the plugin re-adds each item to your real cart with normal stock checks. Merchant-side changes stage behind an approval gate, and “ask it to approve itself and it declines.”

\n\n\n\n
\n\n\n\n

There’s a second kind of visitor to design for now. Carlo Daniele argues for building WordPress for AI agents instead of just human visitors, and the distinction he draws is the useful one: “Crawlers primarily retrieve or index information. Agents can go a step further and take action on a user’s behalf.” That turns architecture questions into permission questions: who is asking, on whose behalf, what can they change, which actions need approval. The Abilities API and MCP Adapter are where WordPress answers them.

\n\n\n\n
\n\n\n\n

A week later, Daniele turned to operations. What happens when AI agents become your new website operators? works through a five-stage autonomy ladder and argues most teams should sit partway up it for a while. I feel like he’s right about that. As he puts it: “An agent that makes a bad production change creates another.”

\n\n\n\n

Learning and practice

\n\n\n\n

Want a structured introduction rather than a pile of blog posts? Destiny Kanno announced that the AI-Powered WordPress course is now live on Learn WordPress: four modules, 23 lessons, roughly nine hours. The first three are for anyone who publishes; the fourth introduces the developer APIs and assumes no prior PHP experience.

\n\n\n\n
\n\n\n\n

The AI team’s contributor summary for September 16 is a good snapshot of what’s actually moving. neillmcshea reports work on markdown feeds for the AI plugin, so AI clients can request a markdown version of a post. PHP AI Client 1.5.0 is close. There are still open gaps in web search support. For example, message parts can’t represent source annotations, and citation URLs are hard to retrieve.

\n\n\n\n
\n\n\n\n

Finally, a piece for the conversations you have with clients rather than with a terminal. Will Davis writes about how WordPress agencies use AI, and what clients should ask about it, arguing that the honest uses are the boring ones—code generation, QA, content migration, documentation—while architecture and governance stay human. His five questions for clients would work just as well on a sales call, starting with “What does a person review before it reaches me?” As he puts it, AI “genuinely reduces repetitive work, but it doesn’t replace judgment.”

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n
\n

Need a plugin .zip from Gutenberg’s master branch?
Gutenberg Times provides daily build for testing and review.

\n
\n\n\n\n\n\n\n
\"\"
\n\n\n\n\n\n\n
\n

Now also available via WordPress Playground. There is no need for a test site locally or on a server. Have you been using it? Email me with your experience.

\n
\n
\n\n\n
\n\n\n\n

Questions? Suggestions? Ideas?
Don’t hesitate to send them via email or
send me a message on WordPress Slack or Twitter @bph.

\n\n\n\n
\n\n\n\n

For questions to be answered on the Gutenberg Changelog,
send them to changelog@gutenbergtimes.com

\n\n\n

\n\n\n\n\n
\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Sat, 26 Sep 2026 16:45:09 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Justin Tadlock\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:27;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:40:\"Dennis Snell: Enter the mess: Shortcodes\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:36:\"https://fluffyandflakey.blog/?p=4130\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"https://fluffyandflakey.blog/2026/09/25/enter-the-mess-shortcodes/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:1005:\"

Tonight I started working on some Shortcode processing in WordPress. This is an historically nasty problem because the Shortcode syntax and parsing is wildly dynamic.

\n\n\n\n
    \n
  • Shortcode syntax is only technically recognized for shortcodes registered at the time of parsing. This means that there is not a general Shortcode grammar.
  • \n\n\n\n
  • Whether a shortcode has “content,” meaning whether it expects a closing tag, depends on whether the closing tag exists in the post.
  • \n
\n\n\n\n

This is a problem that has plagued me for years and I have generally just ignored. There’s an open Core issue in Trac for changing some shortcode parsing (#50683), and I have thought a lot about it.

\n\n\n\n

But I think there is more to explore, and more to gain. Maybe this goes nowhere, but keep your eyes open for it.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Sat, 26 Sep 2026 02:43:45 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Dennis Snell\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:28;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:71:\"Open Channels FM: Your Website Could Use a Changelog to Fuel Creativity\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562622\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"https://openchannels.fm/your-website-could-use-a-changelog-to-fuel-creativity/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:220:\"A website changelog helps creators document progress, celebrate small wins, showcase evolution, fuel creativity, and build audience trust. It can include updates, humor, and various formats, making it accessible for all.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 25 Sep 2026 13:44:23 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:29;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:94:\"Open Channels FM: Is It Time to Move On? Navigating Change and Letting Go in Fast-Paced Times\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562603\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:99:\"https://openchannels.fm/is-it-time-to-move-on-navigating-change-and-letting-go-in-fast-paced-times/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:101:\"A reflection on recognizing the right time to move on from creative projects and handling self-doubt.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 25 Sep 2026 12:30:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:30;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:100:\"OpenStation Blog: “I can’t imagine using WordPress any other way”: the love behind OpenStation\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1306\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:109:\"https://openstation.blog/2026/09/25/i-cant-imagine-using-wordpress-any-other-way-the-love-behind-openstation/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:8731:\"
\"A
\n\n\n\n

OPENSTATION · COMMUNITY VOICES

\n\n\n\n

Formerly Desktop Mode, now a new way to feel at home in wp-admin.

\n\n\n\n

A plugin can accumulate installs. It is rarer for people to describe it as a new way of thinking. As of September 25, 2026, OpenStation, known in its earliest releases as Desktop Mode, has inspired 23 public WordPress.org reviews: 22 five-star and one four-star.

\n\n\n\n

OpenStation turns the WordPress admin into a spatial workspace: movable windows, a dock, a taskbar, widgets and virtual desktops. That is the feature list. The feeling is better told by the people who use it.

\n\n\n\n
\n\n\n\n

The words that stopped us in our tracks

\n\n\n\n

1. When a plugin becomes the default

\n\n\n\n
\n

“I can’t imagine using WordPress any other way. I love this plugin so much.”

\n
\n\n\n\n

— Nick Hamze, “Favorite plugin ever”

\n\n\n\n

That may be the highest compliment a tool can earn: not merely useful, but difficult to imagine living without. Nick’s review reads less like a rating and more like an invitation to join a movement.

\n\n\n\n
\n

“This is a game-changer. Can never go back!”

\n
\n\n\n\n

— ainom, “Absolute pure awesomeness”

\n\n\n\n

OpenStation begins as a striking visual idea, then quietly rewires expectations. Once several admin screens can live together, the old one-page-at-a-time flow feels surprisingly distant.

\n\n\n\n
\n\n\n\n

2. When the metaphor improves the work

\n\n\n\n
\n

“It genuinely feels like using a lightweight operating system inside WordPress.”

\n
\n\n\n\n

— spackenjaeger, “A revolutionary new WordPress admin experience”

\n\n\n\n

The operating-system metaphor is not decoration. Windows hold context. The dock makes tools reachable. Virtual desktops separate kinds of work. The familiar desktop grammar turns multitasking into something visible and natural.

\n\n\n\n
\n

“Having several admin screens open at once changed how I work more than I expected.”

\n
\n\n\n\n

— Juan Lentino, production user and plugin integrator

\n\n\n\n

Juan’s review is especially telling: he has run OpenStation in production since the Desktop Mode days and builds integrations against it. The novelty faded; the workflow remained.

\n\n\n\n
\n\n\n\n

3. When delight becomes productive

\n\n\n\n
\n

“The desktop-style layout, draggable windows, dock, and taskbar make the admin area feel completely different in the best way.”

\n
\n\n\n\n

— Marco Moreira, “A refreshing new way to use WordPress admin”

\n\n\n\n

Productivity software does not have to be joyless. The best interfaces reduce friction and add a little momentum, the feeling that the workspace is helping rather than merely waiting.

\n\n\n\n
\n

“This plugin blowed my mind. It turns your wordpress admin in such a beautiful dashboard. What an experience.”

\n
\n\n\n\n

— MauroS, “One word… Wow!”

\n\n\n\n

The wording is wonderfully unfiltered. Beauty, surprise and experience are not side effects here; they are part of the product.

\n\n\n\n
\n\n\n\n

4. When people see the road ahead

\n\n\n\n
\n

“This is definitely something I would use on a daily basis. Well done!”

\n
\n\n\n\n

— vepth, “I’m blown away”

\n\n\n\n
\n

“Desktop Mode definitely stands out with its own approach.”

\n
\n\n\n\n

— Rami Obeidat, “Modern and creative admin experience”

\n\n\n\n

Both reviews point to the same achievement: OpenStation is not chasing a generic “modern admin” look. It has a point of view—spatial, extensible and unmistakably its own.

\n\n\n\n
\n\n\n\n

From Desktop Mode to OpenStation

\n\n\n\n

The project’s name changed because its ambition outgrew a mode. “Desktop Mode” described the first transformation. OpenStation describes the platform emerging around it: a place where WordPress apps, windows, widgets and workflows can meet.

\n\n\n\n
\n

“The integration surface is unusually well behaved for a plugin this ambitious.”

\n
\n\n\n\n

— Juan Lentino, WordPress.org reviewer and integrator

\n\n\n\n

That sentence matters as much as the praise for the interface. The magic users see is supported by a public API that plugin authors can build on, frequent releases and an opt-in design that keeps classic WordPress one click away.

\n\n\n\n

The best roadmap is a chorus

\n\n\n\n

Names change. Interfaces evolve. Code ships, breaks, improves and ships again. What stays constant in these reviews is the feeling that WordPress can be more personal, more spatial and more alive.

\n\n\n\n

OpenStation is still moving fast. But if the people already living in it are any guide, the destination is worth watching, and the journey is already changing how they work.

\n\n\n\n

Explore OpenStation on GitHub →
Read all WordPress.org reviews →

\n\n\n\n

Quotes are excerpted from public WordPress.org reviews. Spelling is preserved; excerpts are linked to their original sources.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 25 Sep 2026 11:33:33 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:31;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Matt: Bruce Schneier on Systems\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:23:\"https://ma.tt/?p=155048\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"https://ma.tt/2026/09/schneier/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:460:\"
\n\n
\n\n\n\n

Bruce is one of my favorite writers. He packs profoundness. Also honored that he’s an advisor at Automattic, truly one of my idols. His blogs and books rocked my world when I was young.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 25 Sep 2026 07:04:50 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"Matt\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:32;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:76:\"Open Channels FM: How Generational Perspectives Shape Our Digital Work Lives\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562342\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"https://openchannels.fm/how-generational-perspectives-shape-our-digital-work-lives/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:114:\"Cami and Bob talk about adapting to tech changes growing older in the web industry and keeping routines that work.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 24 Sep 2026 14:30:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:33;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:109:\"Open Channels FM: Navigating Support Systems from the Man Cold to Open Source and WordPress Open Web Alliance\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562536\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:116:\"https://openchannels.fm/navigating-support-systems-from-the-man-cold-to-open-source-and-wordpress-open-web-alliance/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:132:\"Examining support systems behind open source, the open web, and everyday life, along with why sustaining these efforts is necessary.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 24 Sep 2026 13:02:50 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:34;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:53:\"Open Channels FM: The Podcast Open Makers is Archived\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562154\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:60:\"https://openchannels.fm/the-podcast-open-makers-is-archived/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:221:\"The podcast network has reduced its active lineup to four shows, leading to no new episodes for Open Makers. However, past content remains accessible, with a shift towards deeper discussions on open source and web trends.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 23 Sep 2026 13:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"Bob\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:35;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:101:\"WPTavern: #234 – K. Adam White on Migrating to Blocks With Artisanal Care and Enterprise Efficiency\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"https://wptavern.com/?post_type=podcast&p=208362\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:114:\"https://wptavern.com/podcast/234-k-adam-white-on-migrating-to-blocks-with-artisanal-care-and-enterprise-efficiency\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:53882:\"
Transcript
\n

[00:00:19] Nathan Wrigley: Welcome to the Jukebox Podcast from WP Tavern. My name is Nathan Wrigley.

\n\n\n\n

Jukebox is a podcast which is dedicated to all things WordPress. The people, the events, the plugins, the blocks, the themes, and in this case, migrating to blocks at an enterprise level and what’s involved in moving from a different CMS into WordPress.

\n\n\n\n

If you’d like to subscribe to the podcast, you can do that by searching for WP Tavern in your podcast player of choice, or by going to wptavern.com/feed/podcast, and you can copy that URL into most podcast players.

\n\n\n\n

If you have a topic that you’d like us to feature on the podcast, I’m keen to hear from you and hopefully get you, or your idea, featured on the show. Head to wptavern.com/contact/jukebox and use the form there.

\n\n\n\n

So on the podcast today, we have K. Adam White, or K. Adam for short.  K. Adam is the principal engineer at Human Made, an enterprise WordPress consultancy. He’s been involved with WordPress for almost 20 years, attending his first WordCamp in Boston back in 2011, and has contributed to WordPress Core and the broader open source ecosystem. Human Made is known for delivering complex projects, think high stakes, no room for mistakes? From global brands moving to WordPress.

\n\n\n\n

This time around,  K. Adam delivered a presentation at WordCamp US focused on a crucial topic for anyone modernising their site, migrating to blocks. Human Made has been all in on the block editor since the Gutenberg plugin days, and the team now specialises in large scale migrations from other content management systems like Sitecore, as well as from other WordPress page builders.

\n\n\n\n

Our conversation focused on the technical and editorial challenges of moving tens, or hundreds, of thousands of posts into the world of blocks and patterns. We talked about the need to combine artisanal care, attention to detail in design, layout, and brand, with industrial scale. The ability to automate, audit and validate mass migrations without losing visual fidelity.

\n\n\n\n

We also discussed the use of patterns as a foundation for development, integrating custom and Core blocks, and leveraging new tools, including AI powered agents and open source plugins like Human Made’s, own rehydrator, to streamline migration workflows.

\n\n\n\n

We also touched upon how clients are onboarded. The process of auditing legacy content. Strategies for training editorial teams on the block editor. And there’s a frank reflection on gaps in WordPress, like granular content permissions.

\n\n\n\n

If you are contemplating a move to the block editor, wrestling with a massive content migration, or curious about what happens when enterprise complexity meets the flexibility of WordPress, this episode is for you.

\n\n\n\n

If you’re interested in finding out more, you can find all of the links in the show notes by heading to wptavern.com/podcast, where you’ll find all the other episodes as well.

\n\n\n\n

And so without further delay, I bring you  K. Adam White.

\n\n\n\n

I am joined on the podcast by K. Adam White. Hello, K. Adam.

\n\n\n\n

[00:03:41] K. Adam White: Hello. It’s good to be here.

\n\n\n\n

[00:03:42] Nathan Wrigley: Yeah. Thank you for joining us. You have an interesting name. Just go on, I know it’s totally off piste, but tell us about your name.

\n\n\n\n

[00:03:49] K. Adam White: Sure. It’s a first initial K, and the middle name Adam that got conjoined in college and I quite like it. So I think in a sphere, and a particular niche in WordPress with so many Adams of so many different colours, then K. Adam is a little bit more me.

\n\n\n\n

[00:04:04] Nathan Wrigley: Yeah, nice. So we’re in the corridor, so forgive any noise that you hear on this podcast episode. We can’t avoid it. We’re in the corridor at  WordCamp US, and you have done, some presentation work this time around. Do you want to just tell us, I mean I presume it’s happened because we’re at the very closing stages of the conference. How did it go?

\n\n\n\n

[00:04:21] K. Adam White: It went, as far as I can tell, quite well. My session was early yesterday, right after the morning keynotes in that early slot where everyone’s coffee has kicked in, and the fatigue of the conference hasn’t quite set in yet.

\n\n\n\n

So I had a great audience and the talk I thing went quite well. I’ve had a number of different conversations off the back of it on various different topics that I covered. So the breadth of those discussions has been really exciting for me.

\n\n\n\n

[00:04:44] Nathan Wrigley: So that is going to be the meat and the bones of what we’re going to talk about today. But first, if you don’t mind, let’s talk a little bit about you and what you do and where you work, just so that we can paint your credentials if you like.

\n\n\n\n

So tell us about your job, how long you’ve been in the WordPress space? Who do you work for? Et cetera.

\n\n\n\n

[00:04:59] K. Adam White: Yeah. My job is principal engineer at Human Made. We’re a WordPress enterprise consultancy, and I have been there nine years. I’ve been in the WordPress community quite a lot longer than that. My first WordCamp was WordCamp Boston 2011, which is a mind boggling 15 years ago now. And before that, I had been using WordPress personally since 2007. So we’re coming up on 20 years of involvement, at least as a user. And then, became a contributor in the early 2010s around 2013, I think my first commit landed.

\n\n\n\n

[00:05:25] Nathan Wrigley: Yeah, nice and Human Made, if you haven’t heard, we’ll put the links into the show notes, anything that K. Adam mentions today, we will put us a link on the WP Tavern podcast episode website, so you can click through to it. But go and check out Human Made, definitely one of the big hitters. I think it’s fair to say in the WordPress space.

\n\n\n\n

[00:05:40] K. Adam White: It’s very kind of you to say so.

\n\n\n\n

[00:05:42] Nathan Wrigley: You did your presentation and it was entitled, Migrating to Blocks. I’m going to intuit from that, that Human Made is all in on the block editor. You’re not using some sort of other proprietary platform. Would that be the case?

\n\n\n\n

[00:05:55] K. Adam White: That would be the case. We were very early adopters of Gutenberg back in its plugin days. We were doing work before it was merged for building out some early block sites, testing out what we could do. Learning how to build and change our theme development processes to move in a more block oriented direction, and then follow that directly into the Full Site Editor world.

\n\n\n\n

And it’s been a great ride. We do work with other page builders and other blocks, platforms and frameworks. We do tend to, as a company, work on projects that have some sort of particular technical complexity that made someone come to us rather than a different agency.

\n\n\n\n

That does mean that we are broadly specialised in WordPress as a platform, including many of those page builders. We’ve worked with Elementor, we’ve worked with Divi, Beaver Builder, but we as a company will always advocate for the block editor and the site editor. And we have our own processes oriented more and more towards delivery with that framework in mind.

\n\n\n\n

I think that the thing that is bringing some of the companies that we help to migrate to WordPress into this ecosystem is the flexibility and the quality of the editorial experience. And personally, my opinion is that Gutenberg does that leaps and bounds better than any of our other page builders that don’t have that native integration into the platform.

\n\n\n\n

[00:07:09] Nathan Wrigley: So if a client comes to you and they are agnostic as to what you are going to build with, your default posture would be we are going to use the block editor.

\n\n\n\n

[00:07:16] K. Adam White: Absolutely default.

\n\n\n\n

[00:07:17] Nathan Wrigley: Okay. And do you have to do any level of persuasion anymore? I’m guessing if we were to rewind the clock, let’s go to 2017, soon after Gutenberg started to become more widely available. I imagine there was quite a bit of explaining to do. Do you still have to do any of that? Or is it a case now that the enterprise people understand what’s going on, and there’s less of a back and forth about whether they should use blocks and patterns and whatever else?

\n\n\n\n

[00:07:41] K. Adam White: If we are building from scratch, we haven’t found there is any reluctance. Particularly if people are coming from a different content management system, particularly a different enterprise content management system. The editor is so compelling, that there’s never any objection to using it. They might ask, should we use this or some other thing I’ve heard of? And we can say, the block editor is built in. We feel that it’s the most robust and future proof platform that you can choose. So we would recommend going that route rather than adding in another plugin, however good they are.

\n\n\n\n

But we do still, nonetheless, have some projects where they are already on a page builder, and they might have invested a lot of training. We might have an entire business school worth of people that are very comfortable with whatever their existing system is, whether that’s Beaver Builder or something else, et cetera, Elementor.

\n\n\n\n

And I think that it’s very important for us to remember what our remit is when we come into a project. That, doesn’t always involve helping them change everything to match what we see as the future. I think that’s a responsibility of the client to understand where they are in conjunction with where the WordPress roadmap is, and make their own decisions about what tools are right for them.

\n\n\n\n

So, for existing projects, we’ll work with what’s right for the clients editorial team, but if we have to make a recommendation, it will always be the block editor.

\n\n\n\n

[00:08:56] Nathan Wrigley: Okay. Yeah, good to know. At place in the market where you are, I’m presuming there’s very little room for error. When you build something, it’s got to work out of the box, on day one. You’ve presumably got stakeholders who’ve got editorial teams, and they’re fairly, we’re, dealing with large corporations that can’t afford for there to be mistakes.

\n\n\n\n

So that kind of leads us to the nature of your presentation, which was called, and again, links will be in the show notes on wptavern.com. Migrating to Blocks with Artisanal Care and Industrial Scale. And I’m actually just going to read the first paragraph because it summarises what we’re going to talk about perfectly. It’s fairly long, but I’ll go through it all.

\n\n\n\n

Whether we’re modernising an old personal blog or migrating hundreds of thousands of existing posts from another CMS. Using WordPress in 2026 means converting our contents to blocks. The convert to blocks button in the editor works well enough for one post. But if we have dozens or hundreds, what can we do to make the process less manual and more powerful? How can we integrate a site’s content directly into full block patterns without losing the columns and structure it had before? And then it goes on to mention, a particular build, I presume, where you were leaving one CMS coming into WordPress.

\n\n\n\n

Just lay out some of the fun, interesting problems that you have to overcome when you’re moving from an entirely different CMS into WordPress, because I guess it’s more complicated than, “Look, there’s a bunch of paragraphs and images. Let’s just drag those over and hope for the best.” Tell us what the problem before you is.

\n\n\n\n

[00:10:22] K. Adam White: That’s a great question. It’s actually remarkable how close you can get to satisfaction with just moving paragraphs and images over and hoping for the best. But there is a big gap in terms of visual fidelity.

\n\n\n\n

The editor in a theme that we’ve built for a client will be configured with patterns and templates and all of the block variations that they need to be able to very quickly sketch out a page. If they are starting from scratch, a client with a fully site editing enabled theme can drop a hero pattern on the page, set in the media they need. Change any font sizes within the pallet of what’s available with their brand guidelines encoded in the theme.json. It’s very easy for them to build out and write content fresh.

\n\n\n\n

But if you have, again, hundreds of thousands of posts, even if you’ve built all those patterns, the heading and paragraph and image only approach doesn’t cut it, because then there would be a tremendously backbreaking amount of work, adding group blocks, adding background colours, et cetera.

\n\n\n\n

That’s usually data that is available in one form or the other in the current system. If we’re migrating without a design change, we will have, whether it’s the layout database in Sitecore or a metadata in a different WordPress block editor that we’re migrating from. Or whatever the equivalent is in our source. We want to preserve the layout of the page and the styling elements. So making sure that headings get the right text treatment, that anything that’s italicised comes over. All of the nuances there, particularly around background colours, images, et cetera. That’s the piece that we’ve been over the past year, looking at how we can improve our process when we’re building a new site, but bringing content over from an old.

\n\n\n\n

Within that context, my talk covered two broad areas. The specific tail end of the talk was about how we can actually use the theme patterns that already exist in the theme directory, and use those to inject particular pieces of source data. So if you have a pattern for a hero element, and you know from your source data what the image URL is supposed to be, what the title is supposed to be. We can use the HTML directly from the pattern file, and do lightweight search replaces within that using either direct PHP string replacements or a tool that we’ve written, that I shared a link to called rehydrator, which is a very early stage experiment, that we’ve got out on GitHub.

\n\n\n\n

And we can use that to put the content into the structure that it’s going to need to have for it to be fully, visually correct. So rather than just reducing and throwing away anything that isn’t a heading or a paragraph, we’re taking the framework from the theme pattern that’s been built. And then we’re writing a migrator that takes data and puts it into that HTML structure, and saves that into the post content. So that when an editor opens up a page, it loads correctly in the editor without block validation errors and it looks right on the front end.

\n\n\n\n

[00:13:15] Nathan Wrigley: Okay. There’s a lot of depth in that, isn’t there? We’ll come back to that in a moment.

\n\n\n\n

I’m curious about process of how you, persuade clients that you are going to be able to carry this work out successfully. So how does that actually work? You obviously look at their existing content, you have a discussion about what the new design is going to look like, and then do you build out some kind of templates or patterns or what have you, so that you can then pull in a proportion of the content, maybe, I don’t know, 10 or a hundred or 5,000 or whatever it may be, pieces of content. Check that that’s all right. Show it to the client. How does that workflow go to build up their confidence that what you are going to do when you finally click the button is actually going to succeed?

\n\n\n\n

[00:13:50] K. Adam White: The way that we’ve been approaching that, I think particularly, over the past six months, I should caveat first that this process has changed so much. Because the tools we have available with AI agents have been evolving in leaps and bounds alongside this particular migration process, which started in January.

\n\n\n\n

So in this case, we started out by building patterns that we could put content for one test post, from the existing site manually. Bringing the contents over, copying and pasting headings, et cetera. And using that to create the patterns that we could show to the client to say, does this look correct? Does this structure mirror what you’re expecting? Is this what you expect an author to have available within the post editor?

\n\n\n\n

And then you know, which pieces belong in the template, which pieces are managed at the site editor level? We’ve done a lot of that ahead of starting the actual migration.

\n\n\n\n

Now that the migration is in progress, any subsequent pieces we’re developing in tandem, we’re saying, okay, we have a press release. That press release, we have audited the incoming data, and we have determined that there are four different layouts for press releases. And this one is used the most and it has these elements. This one is used less, but it has images, et cetera.

\n\n\n\n

And we can build the template for that post type, and at the same time write the migrator for identifying the content nodes, and the source data and bringing that information over into the new patterns.

\n\n\n\n

So we have the patterns that we can show, okay, if you’re building something from scratch, this is what that looks like in the editor. But then at the same time, we can run the migrator over, in most cases, all of the relevant type of data and say, and here is a list of pages to validate.

\n\n\n\n

So what we’ve been doing is bringing that to our stakeholder, and allowing them to do spot checks, so that they can look through and validate that there are all of the required elements on the test pages. Things like, “oh, alright, we don’t have a mapper yet for video embeds. So videos are missing,” and that’s usually going to be an all or nothing thing. We’ve found very few cases where we end up with one or two errors on a specific post basis that aren’t related to support for a complete type of output pattern.

\n\n\n\n

[00:15:55] Nathan Wrigley: Is there a sort of fault tolerance there? So obviously in the case of this particular migration, tens of thousands of posts, I guess there’s never going to be a moment where you can be a hundred percent confident apart from reading the 10,000 posts that you’ve done everything correctly. Is there a, we’ll do 10 to begin with, then we’ll go up to a hundred, then we’ll go up to a thousand.

\n\n\n\n

What, is the sort of tolerance that you present to the client? I’m just imagining that just lurking in post 9,999 is just some weird thing that was allowable in the CMS but never got used before or since, and that piece of content got missed. I don’t know what’s allowable in that scenario. So is there any level of tolerance for fault?

\n\n\n\n

[00:16:32] K. Adam White: The major advance that we’ve made with migrations as a broad structure this year is a much better understanding of those edge cases. And the way that we’ve done that is by leveraging Claude and various other tools to do cross site audits to make sure that we have a full picture of the source data.

\n\n\n\n

So we are able to feed in whatever export files we get from our source site. In this case we’re working from Sitecore, which is an enterprise CMS, which has two database structure. There’s actually a database with a content tree, and then another database that contains layout information. And a page is rendered by switching back and forth between those and assembling the final output.

\n\n\n\n

We were able to get exports of the relevant content from both of those, from the developer of the current site. And we fed those and a whole bunch of documents from the product owner into a ongoing conversation with Claude. And we’re able to use that to build some actually node.js scripts that would take the files we’d gotten from the Sitecore devs, and build a local database in SQLite that each developer on the team was able to run locally. And we can query against that to find those edge cases.

\n\n\n\n

So in a combination of writing our own manual queries, or having a chat conversation prompt for finding individual things, and then it will run a number of queries and report back to us. We’re able to identify very quickly, oh, there’s only one press release that has images, that’s interesting. But there are 17 that have a FAQ accordion.

\n\n\n\n

So that type of auditing has become trivial, and it’s mind boggling how much faster that’s allowed us to move in terms of understanding the data that’s there, and building out a mapping of how we’ll migrate through the different types of content.

\n\n\n\n

We don’t tend to start with only 10 pages in a post type because it’s relatively cheap to run the migrator over a thousand instead of 10. And that gives you a lot more content for both various people on the client team, but then also agentic tools to click through and do a little bit of spot check validation.

\n\n\n\n

What we tend to do is to migrate content type by content type, and we’ll prioritise those based on what we see as the balance between scale and complexity.

\n\n\n\n

[00:18:39] Nathan Wrigley: Do you leverage Core blocks wherever possible, or do you bring bespoke Human Made blocks where that’s necessary? Or can you basically bind everything in this particular build to a Core block?

\n\n\n\n

[00:18:51] K. Adam White: Most of the time we will start with Core blocks and get as far as we can with them. This is a change from how we used to do it. Our early days, we had a lot of rapid iteration in the markup that Core blocks were using. In some cases, there was a lot of evolution in how the controls for them were set up.

\n\n\n\n

[00:19:07] Nathan Wrigley: It was brutal.

\n\n\n\n

[00:19:09] K. Adam White: It was brutal. But that pace of change for the main building blocks of a site has slowed down tremendously, and I think it’s a very stable foundation. So we will be pattern first in our development. We will start by working, doing a lot of in-editor prototyping actually, to build out layouts and patterns for each individual unit of content, each individual sort of component group in the source site. And, it will only be when we run into something like a carousel or a modal that we might reach for a off the shelf, third party option that’s not in Core, or bring our own solution to the table.

\n\n\n\n

[00:19:45] Nathan Wrigley: So do you take, when you said pattern there, is a pattern a sub component of a, let’s say post for want of a better word? Or is it that the pattern is the entire post with bits injected into it? So paragraphs, headings, videos, whatever it may be? Like I said, at the beginning, or are you building up the entire post from various different patterns? Here’s a video pattern and here’s a, I don’t know, a paragraph pattern with a heading? Or a background image or whatever it may be.

\n\n\n\n

[00:20:12] K. Adam White: Patterns tends to be at number of different levels. We might have individual patterns for a particular treatment of headline for example. But we also will have a pattern for a hero section. We’ll have a pattern for a hero section plus the bio below that, that we can use to populate a template in the site editor.

\n\n\n\n

We build patterns at multiple levels of granularity, and we have a leaf to trunk system where we’ll make sure that we have renderings, whether they’re Core blocks with either default styling or one or two block variations, or individual patterns for things where we need to compose one or two blocks together. We’ll make sure that we have all of those leaf node pieces of content, all of our paragraphs, all of our inline images. And then we’ll build patterns for those higher level groups, the full width backgrounds with coloration and a particular headline treatment.

\n\n\n\n

We build out those patterns at all of those different levels because it’s nice to have the granularity when we’re writing our migrators, and patterns can reference each other. So you can have an accordion pattern, which includes two references to an accordion item pattern, and you can have all of those little bits of HTML be discreet PHP files in your WordPress theme. So it makes it very simple to pull up in your editor only the code that you need to edit for a particular unit and know how that’s going to be scoped.

\n\n\n\n

[00:21:26] Nathan Wrigley: This is going to sound like such a peculiar question, but it genuinely, from my point of view, this sounds like really interesting and curious work. It sounds, like there’s a lot to get your teeth into. You’re pushing the boundaries a little bit, but also you’ve got the scope of WordPress, which kind of makes it slightly easier.

\n\n\n\n

I’m basically just making the comment that I think I would enjoy doing the work that you are doing. I don’t know if that, yeah, there really a question there.

\n\n\n\n

[00:21:47] K. Adam White: Unfortunately, we’re doing less and less of that work, and Claude’s doing more and more of it. It’s been actually very efficient because this is such a core central construct in the WordPress block editor. There’s a lot of good documentation about it and agentic tools are quite good at helping to build pattern markup.

\n\n\n\n

So, what we’ve been doing is bringing our human eyes onto that, doing all of our spot checks, making sure that things are kept as simple as possible. Because I think we’re all familiar with how verbose and overly complicated output can be from some tools. But then it is also something that I really wish more people were talking about and doing. Brian Coords earlier today in his talk, mentioned that pattern driven development really he sees as something that more and more of the WordPress community should be trying out. Because there are so many things that we used to build custom blocks for, that just strictly aren’t necessary anymore. And we can get so far by composing what we get from the lego kit of WordPress out of the box.

\n\n\n\n

[00:22:40] Nathan Wrigley: Yeah, I feel like if we went back to 2015 and began Gutenberg again, I feel going patterns first would actually be a nicer approach, certainly a more straightforward approach. I know that there’s, ways to overcome that, but I always drop patterns in, never blocks, and then I’m always interacting with the blocks within the pattern. But it’s patterns first for me all the time. Just because I like the fact that I’m dropping in multiple bits of content that are pre-configured and pre-made and pre, I’ve fiddled with the CSS and made it just how I like it. And I just click the button once and there it is, and I can just rinse and repeat and it’s really straightforward.

\n\n\n\n

[00:23:12] K. Adam White: I would agree, and over the past two to five releases of WordPress, we’ve also had such powerful additional tools added to the pattern toolkit. For example, Partially Synced Patterns. Was a major topic that I shared in my talk. Being able to have a reusable pattern and then make the content editable on a post by post basis makes it very seamless for a non-technical editor to go in, and not have access out of the box to stylistic controls that would make something drift from the brand’s guidelines that they’re trying to follow, but still be able to customise link targets, CTA, text, all of the descriptive and image elements.

\n\n\n\n

[00:23:47] Nathan Wrigley: You are in the weeds of WordPress, and I’m in the weeds of WordPress all the time, but I still feel those tools are widely, not misunderstood, that’s the wrong, just there’s a void. Nobody even knows they’re there. There’s just tonnes of tooling inside the block editor that people simply don’t know about, because the UI and the UX is still a bit funky. You’ve got to go to various different places, and it’s easy to go down the wrong route.

\n\n\n\n

Do you know what I mean? There’s a bunch of tools inside a WordPress that if you only had a few hours with somebody over your shoulder pointing out, “okay, click on that, look at that menu that does this thing.” It’s a shame in a way that’s the case. But I do feel there’s a lot of unexplored potential in every WordPress website that presumably you are leveraging. But I guess just because you’re in the weeds of it.

\n\n\n\n

[00:24:30] K. Adam White: Wherever possible, we have the privilege of having a lot of history with the CMS. Human Made was founded in 2010 and has always had a strong open source posture. We’ve contributed to Core, we’ve put plugins out there in the ecosystem that are used by a number of other agencies. We’ve found the best of what our frenemy competitors use, and been able to adopt those into our own processes.

\n\n\n\n

And the benefits of understanding all of the different types of block that you can use tremendously outweigh any time sink that it takes to learn them. I hope that, from my talk, people will now know that in 7.0, we added PHP only blocks, where you can have the attributes auto registered so that you get, even as a non JavaScript developer, a interface in the editor that someone can open up and go in and change values in the sidebar.

\n\n\n\n

I hope that more people learn about Partially Synced Patterns. I hope more people learn about all of the different types of block that we have available, and find ways to integrate those into their own toolkits. Because playing with the grain of WordPress and using the Block Editor for all it’s worth, are how we untap the most value for our clients.

\n\n\n\n

[00:25:34] Nathan Wrigley: Yeah, there is certainly an awful lot of power, and like I said, I just think some of it gets missed.

\n\n\n\n

How much after you’ve done the migration, how much time do you have to spend with the clients? I have this impression that the Gutenberg editor is pretty straightforward, muscle memory for me essentially. Hours of playing in it. I know where all the bits and pieces are.

\n\n\n\n

But I would also recognise that if I was to show it to somebody who’d never played with WordPress and was coming from, in this case Sitecore, how overwhelming is it? And do you take steps to make it less overwhelming by minimising what’s available in the interface, or just disabling options? What do you do in that regard?

\n\n\n\n

[00:26:08] K. Adam White: No matter how much flexibility our clients want, it’s usually valuable to disable some options. I can’t remember a site we’ve shipped recently for any large website where we left the custom colour picker in, for example. You want to do a better job of limiting what people can use, so that we have confidence that the output, no matter how design savvy or not someone is, is going to be consistent with the rest of the site.

\n\n\n\n

My colleague, Joeleen Kennedy, gave a talk a couple years ago at the first  WordCamp US Showcase Day back in 2024, about work we had done customising the editor for that type of simplicity. And in particular things that we can do around colour palette selection. Ways that we can hide the styling controls for certain blocks through having them embedded in a pattern.

\n\n\n\n

It’s interesting to see that in WordPress recently, if you are editing content that has been marked as having come from a pattern in a post, you can edit all of the text, you can edit all of the images and link targets, but you actually have to hit edit pattern in the sidebar in some cases, depending on how the post is set up, to get into the details within the post that allow all of those other controls to be visible.

\n\n\n\n

That divide took a tiny bit of adjustment for people on our client teams, but the separation has helped them stay focused on the content, and worry less about the overwhelming, combinatorial set of styling possibilities that their blocks have.

\n\n\n\n

[00:27:29] Nathan Wrigley: Do you think that the necessary tools are already built into WordPress to do the kind of work that you are doing? Or is there some missing piece that would make it easier for somebody who doesn’t have the deep pockets that presumably Human Made would require, to do that kind of work. Is the default tooling usually okay to migrate things or have you had to build loads of bespoke tooling?

\n\n\n\n

So in terms of if I was to approach a WordPress website and try to migrate from Sitecore over to WordPress, is this something that you absolutely need a team to do, or would you be able to get some simulation of this with Core WordPress?

\n\n\n\n

[00:28:04] K. Adam White: If you had access to the exports of data from a Sitecore website, and you had a core vanilla WordPress install. And you had a LLM tool of some sort, I think that you could do a lot to get close to what you want. The LLM piece, I think enables this to be done by more people without having to be completely familiar with all of the internal nuances of WordPress. You need to direct it to the architectural pattern that you want, but we have found that it speaks Gutenberg pretty well.

\n\n\n\n

[00:28:32] Nathan Wrigley: What was the name of the tool that you said you’d custom and built?

\n\n\n\n

[00:28:34] K. Adam White: We had built a plugin called rehydrator.

\n\n\n\n

[00:28:36] Nathan Wrigley: Okay, rehydrator, yeah.

\n\n\n\n

[00:28:37] K. Adam White: rehydrator is the tool that we use to take a pattern in the theme and then use that pattern as the template when we’re bringing content over to make sure that we keep all of the styling theme side, and that our migration script doesn’t duplicate the markup specifically.

\n\n\n\n

[00:28:51] Nathan Wrigley: What’s Human Made’s approach to the WordPress project in that regard? You said it was a plugin. Does that mean it’s a wordpress.org repository plugin, or is it one that you have on your own, I don’t know, GitHub repository or whatever it may be.

\n\n\n\n

[00:29:01] K. Adam White: We have some things in the .org repository. In this case, that particular plugin is only on GitHub. A number of ones that we build are only on GitHub, because we’re building them for a very transient in time period of a site.

\n\n\n\n

You don’t need a migration tool to be part of your site long term, it’s not something you’re going to be leaving active, and updating month over month when there is a site running. It’s something that you bring in for the purpose of populating the data. And then you can remove that.

\n\n\n\n

And in that regard, for this particular one, at the moment it’s partly because it’s quite young, and it’s also because we don’t see it as being general purpose. So that plugin specifically is on GitHub and publicly available through Composer, but not on the plugin directory.

\n\n\n\n

In other situations, we’ve gone the opposite direction, and anything that we see as being a ongoing value to a site as it’s running, we do try to move those over as we can.

\n\n\n\n

[00:29:52] Nathan Wrigley: Given that you are on the sort of engineering side of Human Made, I don’t know if this question will land, but we seem to be in this interesting period where there’s a lot of chatter, AI kind of fits into the equation a little bit, but there’s a lot of chatter about the, market share of WordPress and whether or not WordPress as a tool will continue with the same numbers and clout and market share and all of those kind of things.

\n\n\n\n

Do you notice at the enterprise level that there’s been any kind of change in a southerly direction? Maybe there’s been a direct change in a northerly direction. What I’m trying to say is, for the enterprise, does WordPress still maintain that kind of pride place, top of the tree, or are you struggling to find new clients?

\n\n\n\n

[00:30:28] K. Adam White: We’re not struggling to find new clients. We’re lucky that we’re doing quite well on marketing, and we also have had a very powerful year in terms of building relationships with new enterprises, and finding ways to take the technology that we believe in and solve their problems with it.

\n\n\n\n

But I would argue that WordPress has never been the top of the enterprise space. And this actually goes back to your question about what is there that might be missing inside WordPress. The biggest thing that I think someone gets from a more, I’m going to use the term loosely, traditional enterprise CMS, is control.

\n\n\n\n

And WordPress has a security model where the ability to edit and publish a piece of content is usually at the post level. There’s ways to add specific permission checks for metadata. There’s ways that you can restrict what’s accessible and editable with custom interfaces and custom API endpoints. But we tend to have things fall down to the capability checks for user can edit post 1, 2, 3. Yes. No.

\n\n\n\n

And that means that if you have a user profile where your organisation depends on someone being able to come in and touch only the headlines and the SEO metadata, we don’t really have a model for that right now in WordPress.

\n\n\n\n

Whereas something like Sitecore, each individual, almost at the level of every string on the site, whether it’s a set of paragraphs or the label of a button, ends up as a individual node in the content tree. And those can be granted or denied to certain users on a much more granular level. So that to me is a bridge that I still am excited to see what we can do within WordPress to maybe build better interfaces, or better primitives in the editor.

\n\n\n\n

Block locking helps a little bit, but it is an API that’s quite difficult for some teams to wrap their heads around. And it also doesn’t really change the fact that if you can edit the post, and you were able to get the code editor up, then if you’re able to save it, you’re able to save it and doesn’t really go block by block. You’d have to write custom validation or permissions logic in order to be able to reject and update based on the user if they’re editing a block that is next to the one that they were supposed to.

\n\n\n\n

[00:32:32] Nathan Wrigley: So do you have to present to the clients? It’ll be fine. This is what WordPress has. Don’t worry too much about it. If you’ve got this permission, yep, sure. You might be able to overlap and think people could delete things or modify things that perhaps they wouldn’t have to. That’s an educational piece on your side. Go and teach everybody not to mess around with things that they shouldn’t be messing around with.

\n\n\n\n

But you would wish that in WordPress you could assign, say, as you described, this H1, this person can amend it, and this person can access the colour palette for the background image over here, but they can’t access the text. That kind of really granular permission. Whereas block locking just, it seems a bit more of a blunt instrument if you know what I mean. It’s binary. It’s locked or it’s not. You’d like to unlock the capabilities within each block so that certain users can do certain things within the same block.

\n\n\n\n

[00:33:15] K. Adam White: Within blocks, we tend to rely on security through obscurity. We can hide or obfuscate controls behind block locking with content only. We can hide them behind patterns. But if someone’s coming to WordPress, we do make sure that they understand upfront what the nuance of control will be. And we will work with them usually to make things more editable.

\n\n\n\n

Again, I will mention that most of the projects that we get that come from one of these more control-oriented CMSs into WordPress, what they’re seeking is actually more flexibility, not less. So they’re making a decision that they are willing to exchange the stringent control that they get in their existing tool for a process-based change. Maybe they add a review step, or add some sort of workflow plugin, so that we can validate that things look good and have someone sign off on it before it gets published. They would prefer to go that route than to sacrifice the ability for the editors to have the full control, and full pallet of options available to them.

\n\n\n\n

[00:34:13] Nathan Wrigley: Right, so that’s a much more loose approach. Everybody can maybe do more than they ought to do. If we have some editorial guideline where that can’t finally hit the public domain because the publish button is unavailable to you, that’s, okay. We’ll accept that kinda halfway house, if you like. That’s interesting.

\n\n\n\n

[00:34:30] K. Adam White: Each client’s needs are going to be slightly different. We do layer in publication checklists. We have tools to be able to say, this has to be tagged with the primary category before it goes live. We have tools to say, this still has lorum ipsum in it. You can add those in and build workflows, but I tend to like to help clients build processes to support those, rather than trying to take a draconian approach and lock everything down. Because then your work is going to be constantly chasing fine-grained permissions controls when you could be working to use that time making sure that all of the editors know what they can do.

\n\n\n\n

[00:35:04] Nathan Wrigley: I just want to drill into this a bit more. I know this isn’t where we were supposed to go, but I find it really interesting. Would you like those things to ship in Core? obviously they suit you down to the ground, all of those granular permissions, but do you think that belongs in Core?

\n\n\n\n

[00:35:17] K. Adam White: I think that we need more workflow in Core.

\n\n\n\n

[00:35:20] Nathan Wrigley: Okay.

\n\n\n\n

[00:35:20] K. Adam White: I know that there’s a number of different agencies and hosts which each have developed our own workflows solutions. I’ve worked across a number of them on projects that I’ve helped to support.

\n\n\n\n

But the notion that if you have something published and you make an edit out of the box, WordPress will automatically put live any further changes that you make to a published post when you hit save. That is probably the single thing that we most frequently have to build some type of plugin into a site to handle.

\n\n\n\n

Because we need to be able to give people an editorial review step. So that is something that I think we have a number of good tools, but I would love to see a more opinionated default in Core that we can use as a foundation for more complicated post editorial workflow. I think that’s the thing that we most frequently run into. That, and also I guess internationalisation are probably the two things that hopefully will come to the surface of the WordPress roadmap over time.

\n\n\n\n

[00:36:13] Nathan Wrigley: Yeah, I’d really not thought about that. Given Human Made’s sort of credentials and what have you. Do you have a lot of clout? Do you just punch above your weight in conversations about what makes it into Core? Do you get involved in those discussions? I’ve literally no idea how that would happen. Do you communicate to people when a release is coming around. Do you have a voice? Do you make yourself available? What is Human Made’s position in terms of getting things pushed into Core?

\n\n\n\n

[00:36:37] K. Adam White: We participate in the project. I personally have been less involved in Core over the past several years than I would have hoped. I’ve been very much enjoying the detailed, quite close to the ground work that I’m doing on our agency projects. But unfortunately, I have taken a bit of a step back on the open source project.

\n\n\n\n

Some of my colleagues are in a slightly different boat. My colleague, John Blackbourn, our Director of Security for our own hosting product is also the head of the Security Team for WordPress? And has been helping us get the core patches out for the recent set of security releases.

\n\n\n\n

We obviously will advocate in calls for feedback within the Gutenberg project when we feel that there’s a particular direction that we see from our projects. We are able to provide feedback on the UI, and the capabilities of new blocks that are being proposed. But that’s all done through the normal Gutenberg GitHub issue, and WordPress

\n\n\n\n

[00:37:28] Nathan Wrigley: So I think we should probably knock it on the head there. We’ve reached our allocated time. I’ll just point out that these days, it used to be the case that if I was at a WordCamp, you’d really have to wait about six months before the video for the presentation was available. I’m pretty sure it’ll be done already, in all honesty. 24 hours seems to be the time there. So if you were to go to WP Tavern, I will make sure that the link to the video, of K. Adam is there. If not, you can probably go to Google and search Migrating to Blocks, and in parenthesis, with Artisanal Care at Industrial Scale, and you’ll be able to see what it is that K. Adam was talking about.

\n\n\n\n

But really, thank you so much for chatting to me today about all of that.

\n\n\n\n

[00:38:06] K. Adam White: Thank you very much. And I can confirm that the video is already live on YouTube.

\n
\n\n\n\n

On the podcast today we have K. Adam White, or K. Adam for short.

\n\n\n\n

K. Adam is the principal engineer at Human Made, an enterprise WordPress consultancy. He’s been involved with WordPress almost 20 years, attended his first WordCamp in Boston back in 2011, and has contributed to WordPress Core and the broader open source ecosystem. Human Made is known for delivering complex projects, think high stakes, no room for mistakes, from global brands moving to WordPress.

\n\n\n\n

This time around, K. Adam delivered a presentation at WordCamp US focused on a crucial topic for anyone modernising their site, migrating to blocks. Human Made has been all-in on the block editor since the Gutenberg plugin days, and the team now specialises in large-scale migrations from other content management systems like Sitecore, as well as from other WordPress page builders.

\n\n\n\n

Our conversation focused on the technical and editorial challenges of moving tens or hundreds of thousands of posts into the world of blocks and patterns. We talked about the need to combine “artisanal care”, attention to detail in design, layout, and brand, with “industrial scale”, the ability to automate, audit, and validate mass migrations without losing visual fidelity.

\n\n\n\n

We also discussed the use of patterns as a foundation for development, integrating custom and Core blocks, and leveraging new tools (including AI-powered agents and open source plugins like Human Made’s own rehydrator) to streamline migration workflows. We also touched upon how clients are onboarded, the process of auditing legacy content, strategies for training editorial teams on the block editor, and there’s a frank reflection on gaps in WordPress, like granular content permissions.

\n\n\n\n

If you’re contemplating a move to the block editor, wrestling with a massive content migration, or curious about what happens when enterprise complexity meets the flexibility of WordPress, this episode is for you.

\n\n\n\n

Useful links

\n\n\n\n

Human Made

\n\n\n\n

Migrating to Blocks (With Artisanal Care, at Industrial Scale) – K. Adam’s presentation at WordCamp US 2026

\n\n\n\n

Human Made’s rehydrator plugin on GitHub

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Wed, 23 Sep 2026 12:53:53 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Nathan Wrigley\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:36;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:43:\"WordPress.org blog: WordPress 7.1.2 Release\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://wordpress.org/news/?p=21731\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:59:\"https://wordpress.org/news/2026/09/wordpress-7-1-2-release/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:3425:\"

This security release features a fix for a critical severity security vulnerability.

\n\n\n\n

Because this is a security release, it is recommended that you update your sites immediately.

\n\n\n\n

You can download WordPress 7.1.2 from WordPress.org, or visit your WordPress Dashboard, click “Updates”, and then click “Update Now”. If you have sites that support automatic background updates, the update process will begin automatically.

\n\n\n\n

Security update included in this release

\n\n\n\n

The security team would like to thank Robert Ressl for responsibly disclosing that an unauthenticated attacker can, under certain conditions, make page template resolution include a chosen readable local PHP file outside the active theme directories. If relevant pre-conditions for both the server environment and the active theme are met, this can lead to remote code execution (RCE).

\n\n\n\n

Thank you to these WordPress contributors

\n\n\n\n

This release was led by John Blackbourn. WordPress 7.1.2 would not have been possible without the contributions of the following people:

\n\n\n\n

Aaron Jorbin, Aki Hamano, Alex Concha, Ehtisham Siddiqui, fiocavallari, Jb Audras, Jeffrey Paul, Jeremy Felt, Joe McGill, John Blackbourn, Jon Surrell, Lance Willett, Manuel Camargo, marcs0h, martin.krcho, Mukesh Panchal, Olga Gleckler, Pascal Birchler, Peter Wilson, Rajin Sharwar, Ressl, Rudy Faile, Sergey Biryukov, Shail Mehta, Stephanie Walters, and vortfu.

\n\n\n\n

CVE and GHSA references

\n\n\n\n

Further details can be found in the advisory: CVE-2026-87902 / GHSA-7hp8-65ch-5whp.

\n\n\n\n

Backports

\n\n\n\n

As a courtesy, the security fix was backported to all branches eligible to receive security fixes (currently through 4.7). As a reminder, only the most recent version of WordPress is actively supported.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 22 Sep 2026 14:01:20 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:15:\"John Blackbourn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:37;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:107:\"Open Channels FM: Balancing Tradition and Innovation in Genealogy During the Era of Artificial Intelligence\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562212\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:114:\"https://openchannels.fm/balancing-tradition-and-innovation-in-genealogy-during-the-era-of-artificial-intelligence/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:111:\"I makes genealogy faster and more accurate while Charleen Mullenweg explains the ongoing need for human review.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Tue, 22 Sep 2026 12:02:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:38;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:98:\"Open Channels FM: Invisible Unicode Attacks, CrowdSec Source Leak, and the AI Coding Boom Explored\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562271\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:103:\"https://openchannels.fm/invisible-unicode-attacks-crowdsec-source-leak-and-the-ai-coding-boom-explored/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:134:\"Invisible characters challenge spam filters, CrowdSec deals with a code leak, and AI is shifting what matters in software development.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 15:30:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:39;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"bbPress: bbPress 2.6.18 is out!\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"https://bbpress.org/?p=249876\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:55:\"https://bbpress.org/blog/2026/09/bbpress-2-6-18-is-out/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:1178:\"

bbPress 2.6.18 is a maintenance release focused on forum imports and first-login password upgrades.

\n\n\n\n

Imported users can now upgrade their passwords on first login for more legacy forum formats, including cases where the original forum database is no longer available. This release also corrects PHPWind topic statuses, reply counts, and forum dates during import, and restores Super Moderator edit links on front-end bbPress user screens.

\n\n\n\n

bbPress 2.6.18 requires PHP 7.2 or newer and WordPress 6.0 or newer. Sites running an older PHP version should update PHP before upgrading bbPress. Read the 2.6.18 upgrade notes for importer compatibility details.

\n\n\n\n

These changes are also in the 2.7 development branch. The Plugin Directory’s development trunk remains at 2.7.0-alpha-3.

\n\n\n\n

Download bbPress 2.6.18 from WordPress.org, or update from your WordPress dashboard.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 14:53:41 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:17:\"John James Jacoby\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:40;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:78:\"WordPress.org blog: WordPress Takes Its Turn Leading the Open Website Alliance\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://wordpress.org/news/?p=21709\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:49:\"https://wordpress.org/news/2026/09/owa-president/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:2391:\"

I’m happy to announce that I am now serving as president of the Open Website Alliance (OWA), representing the WordPress Foundation. The Alliance brings together the community organizations behind Drupal, Joomla!, TYPO3, and WordPress to advocate for open source and share practices that benefit their projects. I represent the WordPress Foundation in this role, which rotates among the Alliance’s members.

\n\n\n\n
\"\"
\n\n\n\n

WordPress announced its participation in the Alliance in 2024, building on our work with Drupal, Joomla!, and TYPO3 to respond to the European Union’s Cyber Resilience Act. While many open source projects focus on underlying digital infrastructure, our content management systems power the websites where businesses reach customers and sell products and services. We asked policymakers to account for that economic role when setting security requirements, while respecting how communities of developers, translators, educators, and other contributors build and maintain the software. We share a belief that everyone should have the freedom to use, change, and share the tools they rely on.

\n\n\n\n

This commitment to openness builds on efforts such WordPress’s recent signing of the Open Weights and American AI Leadership letter. Our mission to democratize publishing means giving anyone a voice and welcoming everyone to contribute. Working with other communities puts those values into practice beyond WordPress, supporting the freedoms that make participation possible. I invite you to read the Open Website Alliance charter to learn more about the commitments its members share and how the Alliance works.

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 14:28:41 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Mary Hubbard\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:41;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:85:\"OpenStation Blog: Drag, Drop, Preview: Writing a Post in OpenStation, Start to Finish\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1220\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:93:\"https://openstation.blog/2026/09/21/drag-drop-preview-an-ordinary-day-writing-in-openstation/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:2340:\"

I started writing a post (this post!).

\n\n\n\n

Then, as usually happens, I needed a picture, so I dragged one straight from my desktop into OpenStation. No downloading, no extra tabs needed, no extra spaces in the editor, no more “in which tab was the image!?”… I just dragged it from my desktop…

\n\n\n\n
\"Happy\"
\n\n\n\n

Done!

\n\n\n\n

And then I thought the post was already descriptive enough to tell how much we enjoy creating content in OpenStation… But I missed the preview. I wanted to see what the post would look like and edit it in real time. And it happened, I just had to click on the eye icon in the title bar of this editor.

\n\n\n\n

This is probably my favourite kind of productivity, the boring stuff becoming pleasantly simple…

\n\n\n\n

And yes, this whole post was written while recording the video \"🙂\"

\n\n\n\n
\n
\n \n \n
\n \n\n\n

But I thought that a quick sanity review from one of my bots would make the post nicer for SEO. So I just saved the draft, and gave it to my agent \"😉\"

\n\n\n\n

And the best part, is that EVERYTHING that my Agent did, is traceable.

\n\n\n\n
\"Dashboard
\n\n\n\n

Switch to OpenStation

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 13:39:51 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:42;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:58:\"Open Channels FM: AI for the Rest of Us, Beyond the Bubble\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562231\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:64:\"https://openchannels.fm/ai-for-the-rest-of-us-beyond-the-bubble/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:74:\"Bob Dunn talks about breaking out of AI echo chambers to gain new insights\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Mon, 21 Sep 2026 09:35:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:43;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:47:\"OpenStation Blog: A better way to use WordPress\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:32:\"https://openstation.blog/?p=1160\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:66:\"https://openstation.blog/2026/09/18/a-better-way-to-use-wordpress/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:5884:\"

I have been using WordPress for a long time, and I still love it. But wp-admin has basically worked in the same way for years.

\n\n\n\n

OpenStation is our attempt to change that.

\n\n\n\n

It’s a simple idea: instead of moving from one admin page to another, you have a desktop where you can open different parts of WordPress at the same time.

\n\n\n\n
\"A
\n\n\n\n

Your WordPress. Your workspace.

\n\n\n\n

You can open your posts, pages, media, plugins, WooCommerce or any OpenStation app in different windows.

\n\n\n\n

You can move them around, minimize them or put two things next to each other.

\n\n\n\n

It may sound like a small difference, but once you start using WordPress this way, it changes a lot.

\n\n\n\n

Real-time previews

\n\n\n\n

You can also see your changes while you are working on them.

\n\n\n\n

No need to constantly jump between wp-admin and the frontend just to check how something looks.

\n\n\n\n
\"Screenshot
\n\n\n\n

Apps inside WordPress

\n\n\n\n

This is one of my favorite parts.

\n\n\n\n

We are building apps like AllTerrain Forms, Photo Editor (And more!) specifically for OpenStation.

\n\n\n\n

They are still WordPress plugins, but they feel much more like normal desktop apps.

\n\n\n\n
\"A
\n\n\n\n

WordPress on your phone

\n\n\n\n

We also wanted OpenStation to work properly on mobile.

\n\n\n\n

You can install it as a PWA and use WordPress from your phone almost like any other app.

\n\n\n\n
\"A
\n\n\n\n

Performance Is Fast. Really fast.

\n\n\n\n

OpenStation is not only about changing how WordPress looks.

\n\n\n\n

We have put a lot of work into making it fast. In many cases, opening and moving between WordPress screens is faster than using them directly from wp-admin.

\n\n\n\n

We are also working on caching and preloading parts of WordPress before you need them.

\n\n\n\n

The goal is very simple: you click something and it opens FAST.

\n\n\n\n
\n\n
\n\n\n\n

And it is still WordPress

\n\n\n\n

This is important.

\n\n\n\n

We are not trying to replace WordPress or build another platform on top of it.

\n\n\n\n

Your plugins are still your plugins. WooCommerce is still WooCommerce. Your content stays in WordPress.

\n\n\n\n

OpenStation just gives you a different way to use all of it.

\n\n\n\n

And, of course, it is open source.

\n\n\n\n

Thank you

\n\n\n\n

And finally, a big thank you to everyone in the WordPress community who has tried OpenStation, shared feedback, reported bugs or simply told others about it.

\n\n\n\n
\"Grid
\n\n\n\n

And especially to all the contributors who are helping us build it. OpenStation would not be what it is today without you.

\n\n\n\n

There is still a lot we want to do, and seeing people contributing, experimenting and building things with OpenStation is probably the best part of the whole project.

\n\n\n\n

Thank you \"❤\"

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 18 Sep 2026 15:21:06 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"Daniel López\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:44;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:39:\"Open Channels FM: OCN Week in Review #4\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562022\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:45:\"https://openchannels.fm/ocn-week-in-review-4/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:428:\"This week Robert Jacobi shared about the evolving landscape of open source and tech. Highlights include AI’s growing role in security, WordPress and Apache fortifying their processes, LibreOffice redefining productivity with privacy, LoopConf rethinking event funding, and Switzerland’s bold move toward digital sovereignty. Explore how accountability, control, and sustainability are shaping the future of open technology.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 18 Sep 2026 13:45:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Open Channels FM\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:45;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:82:\"Open Channels FM: Drawing the Line Between Openness and Noise in the Digital World\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2562008\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:85:\"https://openchannels.fm/drawing-the-line-between-openness-and-noise-in-digital-world/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:100:\"Is sharing everything always good? Bob Dunn reflects on transparency and the noise in online spaces.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Fri, 18 Sep 2026 12:30:44 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:46;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"WordPress.org blog: WordPress 7.1.1 Maintenance and Security Release\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:35:\"https://wordpress.org/news/?p=21717\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:84:\"https://wordpress.org/news/2026/09/wordpress-7-1-1-maintenance-and-security-release/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:12736:\"

This security and maintenance release features 17 bug fixes on Core, 19 bug fixes for the Block Editor, and 11 security fixes.

\n\n\n\n

Because this is a security release, it is recommended that you update your sites immediately.

\n\n\n\n

You can download WordPress 7.1.1 from WordPress.org, or visit your WordPress Dashboard, click “Updates”, and then click “Update Now”. If you have sites that support automatic background updates, the update process will begin automatically.

\n\n\n\n

WordPress 7.1.1 is a short-cycle release. The next major release will be version 7.2 and is currently planned for December.

\n\n\n\n

For more information, please visit the WordPress 7.1.1 HelpHub site.

\n\n\n\n

Security updates included in this release

\n\n\n\n

The security team would like to thank the following people for responsibly reporting vulnerabilities, and allowing them to be fixed in this release:

\n\n\n\n
    \n
  • Stored cross-site scripting in wpautop() allows an unauthenticated visitor to inject script (subject to comment approval), reported by Rafie Muhammad (Awesome Motive, Inc.).
  • \n\n\n\n
  • HTML API: set_modifiable_text() allows breaking out of a comment via abrupt-closing sequences, reported by Jeremy Felt of the WordPress Security Team.
  • \n\n\n\n
  • Stored XSS in some themes that support custom headers, reported by Jeremy Felt of the WordPress Security Team.
  • \n\n\n\n
  • Specially crafted URLs can automatically install and preview an inactive theme from WordPress.org, reported by Paulos Yibelo and pwn.ai.
  • \n\n\n\n
  • Site Administrator can network-activate an installed Network-only plugin, reported by Jesse McNeil.
  • \n\n\n\n
  • Authenticated Path Traversal in WP REST Templates Controller, reported by Anthropic.
  • \n\n\n\n
  • XML-RPC can be used to publish customize_changeset posts that bypass checks for edit_css, reported by Ben Bidner of the WordPress Security Team.
  • \n\n\n\n
  • Contributor+ Arbitrary Post Overwrite, reported by Anthropic.
  • \n\n\n\n
  • Missing read_post check in attachment_submitbox_metadata() leaks a private parent-post title, reported by HDWSec.
  • \n\n\n\n
  • Missing Authorization leads to Draft/Pending Post Slug Disclosure by Contributor+, reported by Jakub Herman.
  • \n\n\n\n
  • Comments, including notes, can be reparented by any authenticated user, reported by Justin Hart, Viridis Security.
  • \n
\n\n\n\n

Thank you to these WordPress contributors

\n\n\n\n

This release was led by Adam Silverstein, Adrian Duffell, Andrei Draganescu, and Aaron Jorbin.

\n\n\n\n

WordPress 7.1.1 would not have been possible without the contributions of the following people. Their asynchronous coordination to deliver maintenance and security fixes into a stable release is a testament to the power and capability of the WordPress community.

\n\n\n\n

Aaron Jorbin, abrahamfariaz, Adam Silverstein, Adi Moldovan, Adrian Duffell, Aki Hamano, Alex Concha, Andrea Fercia, andreasca, Andrei Draganescu, Andrew Duthie, Andrew Serong, André Maneiro, annezazu, Anthony White, Arkaprabha Chowdhury, Ashar Fuadi, Azragh, Barry, buffer1024, Chunhui Ouyang, Courtney Robertson, Dagan, Daniel Richards, Daniel Rodriguez, Darshit Rajyaguru, David Biňovec, Deepak Kumar, Dennis Snell, DevSaiful, Dhruvang21, Dominik Schilling, Ehtisham Siddiqui, Ella Van Durpe, Erick Wambua, FahimMurshed, Fernando Tellado, fiocavallari, George Mamadashvili, George Vasiliades, gregbenz, Harish Tewari, Hit Bhalodia, Isabel Brison, Jake Spurlock, Jamie Dąbrowiecki, Jb Audras, Jeffrey Paul, Jeremy Felt, Jiwoon Kim, Joe Dolson, Joe Hoyle, Joe McGill, Joen Asmussen, Johannes Jülg, John Blackbourn, Jon Surrell, Jonathan Desrosiers, Josh, Kamran Abdul Aziz, Khokan Sardar, Kira Schroder, kleisauke, Kushagra Goyal, l1onofjudah, Lance Willett, luksusspokoju, Manzoor Wani, Marco Ciampini, marcs0h, Marin Atanasov, Michael, Mohammad Jangda, mrkenobi, Mukesh Panchal, Nawazkhan Pathan, Nik Tsekouras, Parth Jogi, Pascal Birchler, Paul Biron, Paul Kevan, Peter Wilson, Rafie Muhammad, ramonopoly, Rashed Hossain, Ressl, Riad Benguella, Rudy Faile, Sainath Poojary, Scott Kingsley Clark, Sergey Biryukov, Shail Mehta, Shameem – a11n, siliconforks, Slava Abakumov, Stephen Bernhardt, Sukhendu Sekhar Guria, Ugyen Dorji, Utsav Ladani, vortfu, Weston Ruter, w3bdsgn, wolf45 plus representatives from Automattic, Bluehost, GoDaddy, Pantheon, and WP Engine.

\n\n\n\n

Backports

\n\n\n\n

As a courtesy, the security fixes are being backported, where necessary, to all branches eligible to receive security fixes (currently through 4.7). As a reminder, only the most recent version of WordPress is actively supported. The backports are in progress and will ship as they become ready.

\n\n\n\n

How to contribute

\n\n\n\n

To get involved in WordPress core development, head over to Trac, pick a ticket, and join the conversation in the #core channel. Need help? Check out the Core Contributor Handbook.

\n\n\n\n

Props to Ehtisham Siddiqui, Lance Willett, Weston Ruter, and Adam Silverstein for proofreading.

\n\n\n\n

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 17 Sep 2026 19:53:09 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Aaron Jorbin\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:47;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:83:\"Open Channels FM: Open Source Economics, LibreOffice, and Swiss Digital Sovereignty\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://openchannels.fm/?p=2561963\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:88:\"https://openchannels.fm/open-source-economics-libreoffice-and-swiss-digital-sovereignty/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:112:\"Shifting budgets and tech priorities drive change for open source events software and government infrastructure.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 17 Sep 2026 16:00:00 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:8:\"Bob Dunn\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:48;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:68:\"Matt: OmFest: A Celebration of Curiosity, Connection, and the Future\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:23:\"https://ma.tt/?p=154845\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:34:\"https://ma.tt/2026/09/omfest-soon/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:7320:\"
\"\"
\n\n\n\n

OmFest is coming together quite nicely! The new website is beautiful and highlights some of the experiences available throughout the day. I think Om would be very impressed by the attendee list. We’re doing it at the Swedish American Hall, the same venue as the first WordCamp, where Om, of course, spoke about Blogs and Journalism. (The videos have been lost to digirot, unless anyone has some recordings? I’ve been looking everywhere.)

\n\n\n\n

Below is cross-posted from OmFest.co:

\n\n\n\n

September 29th is when Om would have turned 60. 

\n\n\n\n

When I first started thinking about how to mark the day, I knew I didn’t want a traditional memorial. Om loved bringing interesting people together, and he loved a festival that taught him something he didn’t already know. His curiosity crossed so many worlds and passions: technology, journalism, photography, investing, watches, pens, coffee, design, music, India, New York, San Francisco.

\n\n\n\n

So we’re bringing these worlds together. On September 29 in San Francisco, we’re throwing OmFest—twelve hours of ideas, objects, food, music, and conversation, organized and anchored around a statement Om once said:

\n\n\n\n
\n

“If you pay enough attention to the present, you can see the future.”

\n
\n\n\n\n

Present Future

\n\n\n\n

Instead of tributes or keynotes, we’ll host a series of short talks with one simple challenge: teach us something you’re seeing before everyone else sees it. No pitches, no career retrospectives. You don’t even have to talk about Om. What happens to photography when anyone can generate the perfect image with AI? Why do physical objects become more meaningful as our lives become more digital? Are glasses becoming computers? What does handwriting do to the way we think? Different subjects, same goal: everyone leaves knowing something they didn’t know when they arrived.

\n\n\n\n

A Festival of Om’s Curiosity

\n\n\n\n

Between the talks, there will be plenty to stumble upon. Through Om’s Lens: a gallery of Om’s photography. TIME: an exhibit that uses his watch obsession to spark a discussion about craft and collecting. Field Notes: a communal writing table stocked with fine paper, fountain pens, and ink, where you can write something worth remembering—and either keep it or leave it behind to be bound in a book to commemorate the day. And Om’s Shelf: books he read, loved, and recommended. The collection will start full and slowly empty as his favorite reads pass into other hands.

\n\n\n\n

People from Om’s different worlds will drop in throughout the day to share knowledge and facilitate small, hands-on moments: a photography tutorial, a notebook-binding session, a lesson on the mechanics of a watch, an experience with a coffee you’ve never tried, a tea ceremony. And, woven into this experience, will be OM/60: sixty small discoveries about Om, hidden throughout.

\n\n\n\n

All Roads Lead to Om

\n\n\n\n

The most important part, however, isn’t any of these objects. At check-in, instead of a badge with your company and title, you’ll choose the worlds through which you knew Om: photography, journalism, technology, GigaOm, investing, WordPress, India, coffee, pens and ink, design, music, or simply friends and family.

\n\n\n\n

Then we build a physical map of it. It starts nearly empty. You add yourself, mark how you knew Om and whom he introduced you to, and those people connect to others. By the end of the night, I hope we’ll be able to see what Om spent a lifetime making.

\n\n\n\n

The question I keep asking myself: who will meet because of Om that Om never had the chance to introduce? If OmFest works, his network won’t just be documented that day. It’ll grow.

\n\n\n\n

From Ideas to Celebration

\n\n\n\n

The day flows and builds. Morning is coffee, breakfast, books, photography, and conversation. The middle is deliberately unstructured—wander, eat, write, talk. In the evening, friends share short stories as we raise a glass to Om on his 60th. Then the bars roll in, the lights go down, the music gets louder, and OmFest becomes DesiParty: his old-school New York nights, Asian Underground, bhangra, electronica. We start with ideas and end with dancing. That feels right.

\n\n\n\n

Version 1.0

\n\n\n\n

What we’re building shouldn’t end on September 29. What does registration look like if it’s designed to help strangers talk to each other? How do you design a conference around curiosity instead of status? How do you make something that works for a two-hour visit or a twelve-hour one? How does a room encourage connection without forcing networking?

\n\n\n\n

We’re treating OmFest as an experiment. We’ll document what works—formats, designs, code, templates, check-in, programming—and open source as much of it as we can. Other events can take the best ideas and make them better.

\n\n\n\n

September 29 isn’t the end of OmFest. It’s version 1.0.

\n\n\n\n

Come Build with Us

\n\n\n\n

People from across Om’s life are building OmFest together. Some are contributing photographs. Someone is making a textile; another is bringing tea and guiding ceremonies. Others are helping with watches, eyewear, books, music, writing, and stories. We haven’t discovered whole parts of Om’s world yet. That’s the point.

\n\n\n\n

If Om introduced you to something, or someone, we’d love to know. If there’s something you think people should experience, see, hear, taste, read, or learn that day, tell us.

\n\n\n\n

And if you just want to come, come. You don’t need to have known Om. You only need to be curious.

\n\n\n\n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 17 Sep 2026 01:04:27 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"Matt\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:49;a:6:{s:4:\"data\";s:21:\"\n \n \n \n \n \n \n \n \n \n \n\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:5:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Matt: Mirene\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"guid\";a:1:{i:0;a:5:{s:4:\"data\";s:23:\"https://ma.tt/?p=154872\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"https://ma.tt/2026/09/mirene-2/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:245:\"

It’s official in SF Standard: Stewart Brand sells his seaworthy Sausalito houseboat to tech CEO. Ahoy!

\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"pubDate\";a:1:{i:0;a:5:{s:4:\"data\";s:31:\"Thu, 17 Sep 2026 00:45:36 +0000\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:1:{s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:4:\"Matt\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}}}}}}}}}}s:4:\"type\";i:128;s:7:\"headers\";a:9:{s:6:\"server\";s:5:\"nginx\";s:4:\"date\";s:29:\"Mon, 12 Oct 2026 15:04:55 GMT\";s:12:\"content-type\";s:8:\"text/xml\";s:13:\"last-modified\";s:29:\"Mon, 12 Oct 2026 14:45:36 GMT\";s:4:\"vary\";s:15:\"Accept-Encoding\";s:15:\"x-frame-options\";s:10:\"SAMEORIGIN\";s:16:\"content-encoding\";s:4:\"gzip\";s:7:\"alt-svc\";s:5:\"clear\";s:4:\"x-nc\";s:9:\"HIT dca 1\";}s:5:\"build\";i:1760643936;s:21:\"cache_expiration_time\";i:1791860695;s:23:\"__cache_expiration_time\";i:1791860695;}', 'off'); +INSERT INTO `xm_aca_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES +(2739, '_transient_timeout_dash_v2_3605f57d6641b1f6504fce9d39bcf566', '1791860695', 'off'), +(2740, '_transient_dash_v2_3605f57d6641b1f6504fce9d39bcf566', '', 'off'), +(2741, '_site_transient_timeout_poptags_40cd750bba9870f18aada2478b24840a', '1791828309', 'off'), +(2742, '_site_transient_poptags_40cd750bba9870f18aada2478b24840a', 'O:8:\"stdClass\":100:{s:11:\"woocommerce\";a:3:{s:4:\"name\";s:11:\"woocommerce\";s:4:\"slug\";s:11:\"woocommerce\";s:5:\"count\";i:12385;}s:6:\"widget\";a:3:{s:4:\"name\";s:6:\"widget\";s:4:\"slug\";s:6:\"widget\";s:5:\"count\";i:5151;}s:3:\"seo\";a:3:{s:4:\"name\";s:3:\"seo\";s:4:\"slug\";s:3:\"seo\";s:5:\"count\";i:3574;}s:5:\"admin\";a:3:{s:4:\"name\";s:5:\"admin\";s:4:\"slug\";s:5:\"admin\";s:5:\"count\";i:3015;}s:4:\"post\";a:3:{s:4:\"name\";s:4:\"post\";s:4:\"slug\";s:4:\"post\";s:5:\"count\";i:2790;}s:9:\"shortcode\";a:3:{s:4:\"name\";s:9:\"shortcode\";s:4:\"slug\";s:9:\"shortcode\";s:5:\"count\";i:2486;}s:2:\"ai\";a:3:{s:4:\"name\";s:2:\"AI\";s:4:\"slug\";s:2:\"ai\";s:5:\"count\";i:2447;}s:5:\"posts\";a:3:{s:4:\"name\";s:5:\"posts\";s:4:\"slug\";s:5:\"posts\";s:5:\"count\";i:2239;}s:8:\"security\";a:3:{s:4:\"name\";s:8:\"security\";s:4:\"slug\";s:8:\"security\";s:5:\"count\";i:2165;}s:8:\"comments\";a:3:{s:4:\"name\";s:8:\"comments\";s:4:\"slug\";s:8:\"comments\";s:5:\"count\";i:2071;}s:9:\"ecommerce\";a:3:{s:4:\"name\";s:9:\"ecommerce\";s:4:\"slug\";s:9:\"ecommerce\";s:5:\"count\";i:2013;}s:6:\"images\";a:3:{s:4:\"name\";s:6:\"images\";s:4:\"slug\";s:6:\"images\";s:5:\"count\";i:1836;}s:5:\"email\";a:3:{s:4:\"name\";s:5:\"email\";s:4:\"slug\";s:5:\"email\";s:5:\"count\";i:1791;}s:5:\"image\";a:3:{s:4:\"name\";s:5:\"image\";s:4:\"slug\";s:5:\"image\";s:5:\"count\";i:1662;}s:9:\"analytics\";a:3:{s:4:\"name\";s:9:\"analytics\";s:4:\"slug\";s:9:\"analytics\";s:5:\"count\";i:1603;}s:9:\"elementor\";a:3:{s:4:\"name\";s:9:\"elementor\";s:4:\"slug\";s:9:\"elementor\";s:5:\"count\";i:1580;}s:6:\"google\";a:3:{s:4:\"name\";s:6:\"google\";s:4:\"slug\";s:6:\"google\";s:5:\"count\";i:1573;}s:9:\"gutenberg\";a:3:{s:4:\"name\";s:9:\"gutenberg\";s:4:\"slug\";s:9:\"gutenberg\";s:5:\"count\";i:1565;}s:8:\"facebook\";a:3:{s:4:\"name\";s:8:\"facebook\";s:4:\"slug\";s:8:\"facebook\";s:5:\"count\";i:1534;}s:7:\"twitter\";a:3:{s:4:\"name\";s:7:\"twitter\";s:4:\"slug\";s:7:\"twitter\";s:5:\"count\";i:1515;}s:7:\"gallery\";a:3:{s:4:\"name\";s:7:\"gallery\";s:4:\"slug\";s:7:\"gallery\";s:5:\"count\";i:1514;}s:5:\"login\";a:3:{s:4:\"name\";s:5:\"login\";s:4:\"slug\";s:5:\"login\";s:5:\"count\";i:1480;}s:7:\"sidebar\";a:3:{s:4:\"name\";s:7:\"sidebar\";s:4:\"slug\";s:7:\"sidebar\";s:5:\"count\";i:1340;}s:7:\"content\";a:3:{s:4:\"name\";s:7:\"content\";s:4:\"slug\";s:7:\"content\";s:5:\"count\";i:1296;}s:15:\"payment-gateway\";a:3:{s:4:\"name\";s:15:\"payment gateway\";s:4:\"slug\";s:15:\"payment-gateway\";s:5:\"count\";i:1294;}s:11:\"performance\";a:3:{s:4:\"name\";s:11:\"performance\";s:4:\"slug\";s:11:\"performance\";s:5:\"count\";i:1258;}s:5:\"block\";a:3:{s:4:\"name\";s:5:\"block\";s:4:\"slug\";s:5:\"block\";s:5:\"count\";i:1239;}s:6:\"social\";a:3:{s:4:\"name\";s:6:\"social\";s:4:\"slug\";s:6:\"social\";s:5:\"count\";i:1217;}s:7:\"payment\";a:3:{s:4:\"name\";s:7:\"payment\";s:4:\"slug\";s:7:\"payment\";s:5:\"count\";i:1183;}s:5:\"video\";a:3:{s:4:\"name\";s:5:\"video\";s:4:\"slug\";s:5:\"video\";s:5:\"count\";i:1182;}s:4:\"page\";a:3:{s:4:\"name\";s:4:\"page\";s:4:\"slug\";s:4:\"page\";s:5:\"count\";i:1153;}s:5:\"media\";a:3:{s:4:\"name\";s:5:\"media\";s:4:\"slug\";s:5:\"media\";s:5:\"count\";i:1142;}s:12:\"contact-form\";a:3:{s:4:\"name\";s:12:\"contact form\";s:4:\"slug\";s:12:\"contact-form\";s:5:\"count\";i:1082;}s:7:\"widgets\";a:3:{s:4:\"name\";s:7:\"widgets\";s:4:\"slug\";s:7:\"widgets\";s:5:\"count\";i:1079;}s:6:\"slider\";a:3:{s:4:\"name\";s:6:\"slider\";s:4:\"slug\";s:6:\"slider\";s:5:\"count\";i:1062;}s:7:\"chatbot\";a:3:{s:4:\"name\";s:7:\"chatbot\";s:4:\"slug\";s:7:\"chatbot\";s:5:\"count\";i:1062;}s:10:\"e-commerce\";a:3:{s:4:\"name\";s:10:\"e-commerce\";s:4:\"slug\";s:10:\"e-commerce\";s:5:\"count\";i:1051;}s:4:\"spam\";a:3:{s:4:\"name\";s:4:\"spam\";s:4:\"slug\";s:4:\"spam\";s:5:\"count\";i:1050;}s:6:\"search\";a:3:{s:4:\"name\";s:6:\"search\";s:4:\"slug\";s:6:\"search\";s:5:\"count\";i:1006;}s:5:\"links\";a:3:{s:4:\"name\";s:5:\"links\";s:4:\"slug\";s:5:\"links\";s:5:\"count\";i:981;}s:4:\"chat\";a:3:{s:4:\"name\";s:4:\"chat\";s:4:\"slug\";s:4:\"chat\";s:5:\"count\";i:974;}s:4:\"form\";a:3:{s:4:\"name\";s:4:\"form\";s:4:\"slug\";s:4:\"form\";s:5:\"count\";i:950;}s:8:\"checkout\";a:3:{s:4:\"name\";s:8:\"checkout\";s:4:\"slug\";s:8:\"checkout\";s:5:\"count\";i:947;}s:8:\"shipping\";a:3:{s:4:\"name\";s:8:\"shipping\";s:4:\"slug\";s:8:\"shipping\";s:5:\"count\";i:939;}s:6:\"editor\";a:3:{s:4:\"name\";s:6:\"editor\";s:4:\"slug\";s:6:\"editor\";s:5:\"count\";i:914;}s:14:\"contact-form-7\";a:3:{s:4:\"name\";s:14:\"contact form 7\";s:4:\"slug\";s:14:\"contact-form-7\";s:5:\"count\";i:913;}s:5:\"forms\";a:3:{s:4:\"name\";s:5:\"forms\";s:4:\"slug\";s:5:\"forms\";s:5:\"count\";i:889;}s:5:\"embed\";a:3:{s:4:\"name\";s:5:\"embed\";s:4:\"slug\";s:5:\"embed\";s:5:\"count\";i:884;}s:4:\"menu\";a:3:{s:4:\"name\";s:4:\"menu\";s:4:\"slug\";s:4:\"menu\";s:5:\"count\";i:846;}s:3:\"rss\";a:3:{s:4:\"name\";s:3:\"rss\";s:4:\"slug\";s:3:\"rss\";s:5:\"count\";i:822;}s:9:\"dashboard\";a:3:{s:4:\"name\";s:9:\"dashboard\";s:4:\"slug\";s:9:\"dashboard\";s:5:\"count\";i:815;}s:8:\"calendar\";a:3:{s:4:\"name\";s:8:\"calendar\";s:4:\"slug\";s:8:\"calendar\";s:5:\"count\";i:813;}s:9:\"live-chat\";a:3:{s:4:\"name\";s:9:\"live chat\";s:4:\"slug\";s:9:\"live-chat\";s:5:\"count\";i:808;}s:3:\"api\";a:3:{s:4:\"name\";s:3:\"api\";s:4:\"slug\";s:3:\"api\";s:5:\"count\";i:804;}s:8:\"payments\";a:3:{s:4:\"name\";s:8:\"payments\";s:4:\"slug\";s:8:\"payments\";s:5:\"count\";i:799;}s:10:\"buddypress\";a:3:{s:4:\"name\";s:10:\"buddypress\";s:4:\"slug\";s:10:\"buddypress\";s:5:\"count\";i:791;}s:9:\"marketing\";a:3:{s:4:\"name\";s:9:\"marketing\";s:4:\"slug\";s:9:\"marketing\";s:5:\"count\";i:785;}s:10:\"automation\";a:3:{s:4:\"name\";s:10:\"automation\";s:4:\"slug\";s:10:\"automation\";s:5:\"count\";i:779;}s:5:\"pages\";a:3:{s:4:\"name\";s:5:\"pages\";s:4:\"slug\";s:5:\"pages\";s:5:\"count\";i:777;}s:6:\"blocks\";a:3:{s:4:\"name\";s:6:\"blocks\";s:4:\"slug\";s:6:\"blocks\";s:5:\"count\";i:768;}s:6:\"events\";a:3:{s:4:\"name\";s:6:\"events\";s:4:\"slug\";s:6:\"events\";s:5:\"count\";i:766;}s:4:\"feed\";a:3:{s:4:\"name\";s:4:\"feed\";s:4:\"slug\";s:4:\"feed\";s:5:\"count\";i:763;}s:7:\"booking\";a:3:{s:4:\"name\";s:7:\"booking\";s:4:\"slug\";s:7:\"booking\";s:5:\"count\";i:759;}s:9:\"affiliate\";a:3:{s:4:\"name\";s:9:\"affiliate\";s:4:\"slug\";s:9:\"affiliate\";s:5:\"count\";i:752;}s:7:\"youtube\";a:3:{s:4:\"name\";s:7:\"youtube\";s:4:\"slug\";s:7:\"youtube\";s:5:\"count\";i:742;}s:4:\"ajax\";a:3:{s:4:\"name\";s:4:\"ajax\";s:4:\"slug\";s:4:\"ajax\";s:5:\"count\";i:741;}s:5:\"popup\";a:3:{s:4:\"name\";s:5:\"popup\";s:4:\"slug\";s:5:\"popup\";s:5:\"count\";i:739;}s:10:\"responsive\";a:3:{s:4:\"name\";s:10:\"responsive\";s:4:\"slug\";s:10:\"responsive\";s:5:\"count\";i:721;}s:8:\"category\";a:3:{s:4:\"name\";s:8:\"category\";s:4:\"slug\";s:8:\"category\";s:5:\"count\";i:717;}s:13:\"accessibility\";a:3:{s:4:\"name\";s:13:\"accessibility\";s:4:\"slug\";s:13:\"accessibility\";s:5:\"count\";i:710;}s:4:\"gdpr\";a:3:{s:4:\"name\";s:4:\"GDPR\";s:4:\"slug\";s:4:\"gdpr\";s:5:\"count\";i:688;}s:8:\"tracking\";a:3:{s:4:\"name\";s:8:\"tracking\";s:4:\"slug\";s:8:\"tracking\";s:5:\"count\";i:678;}s:7:\"contact\";a:3:{s:4:\"name\";s:7:\"contact\";s:4:\"slug\";s:7:\"contact\";s:5:\"count\";i:665;}s:6:\"jquery\";a:3:{s:4:\"name\";s:6:\"jquery\";s:4:\"slug\";s:6:\"jquery\";s:5:\"count\";i:664;}s:3:\"css\";a:3:{s:4:\"name\";s:3:\"css\";s:4:\"slug\";s:3:\"css\";s:5:\"count\";i:661;}s:10:\"newsletter\";a:3:{s:4:\"name\";s:10:\"newsletter\";s:4:\"slug\";s:10:\"newsletter\";s:5:\"count\";i:652;}s:3:\"ads\";a:3:{s:4:\"name\";s:3:\"ads\";s:4:\"slug\";s:3:\"ads\";s:5:\"count\";i:637;}s:16:\"customer-support\";a:3:{s:4:\"name\";s:16:\"customer support\";s:4:\"slug\";s:16:\"customer-support\";s:5:\"count\";i:631;}s:5:\"share\";a:3:{s:4:\"name\";s:5:\"share\";s:4:\"slug\";s:5:\"share\";s:5:\"count\";i:630;}s:4:\"link\";a:3:{s:4:\"name\";s:4:\"link\";s:4:\"slug\";s:4:\"link\";s:5:\"count\";i:622;}s:10:\"javascript\";a:3:{s:4:\"name\";s:10:\"javascript\";s:4:\"slug\";s:10:\"javascript\";s:5:\"count\";i:621;}s:7:\"privacy\";a:3:{s:4:\"name\";s:7:\"privacy\";s:4:\"slug\";s:7:\"privacy\";s:5:\"count\";i:621;}s:12:\"social-media\";a:3:{s:4:\"name\";s:12:\"social media\";s:4:\"slug\";s:12:\"social-media\";s:5:\"count\";i:615;}s:6:\"import\";a:3:{s:4:\"name\";s:6:\"import\";s:4:\"slug\";s:6:\"import\";s:5:\"count\";i:613;}s:5:\"cache\";a:3:{s:4:\"name\";s:5:\"cache\";s:4:\"slug\";s:5:\"cache\";s:5:\"count\";i:606;}s:10:\"categories\";a:3:{s:4:\"name\";s:10:\"categories\";s:4:\"slug\";s:10:\"categories\";s:5:\"count\";i:604;}s:10:\"navigation\";a:3:{s:4:\"name\";s:10:\"navigation\";s:4:\"slug\";s:10:\"navigation\";s:5:\"count\";i:604;}s:8:\"redirect\";a:3:{s:4:\"name\";s:8:\"redirect\";s:4:\"slug\";s:8:\"redirect\";s:5:\"count\";i:589;}s:5:\"theme\";a:3:{s:4:\"name\";s:5:\"theme\";s:4:\"slug\";s:5:\"theme\";s:5:\"count\";i:586;}s:6:\"button\";a:3:{s:4:\"name\";s:6:\"button\";s:4:\"slug\";s:6:\"button\";s:5:\"count\";i:585;}s:10:\"statistics\";a:3:{s:4:\"name\";s:10:\"statistics\";s:4:\"slug\";s:10:\"statistics\";s:5:\"count\";i:575;}s:6:\"custom\";a:3:{s:4:\"name\";s:6:\"custom\";s:4:\"slug\";s:6:\"custom\";s:5:\"count\";i:575;}s:5:\"users\";a:3:{s:4:\"name\";s:5:\"users\";s:4:\"slug\";s:5:\"users\";s:5:\"count\";i:572;}s:7:\"comment\";a:3:{s:4:\"name\";s:7:\"comment\";s:4:\"slug\";s:7:\"comment\";s:5:\"count\";i:570;}s:8:\"whatsapp\";a:3:{s:4:\"name\";s:8:\"whatsapp\";s:4:\"slug\";s:8:\"whatsapp\";s:5:\"count\";i:564;}s:6:\"schema\";a:3:{s:4:\"name\";s:6:\"schema\";s:4:\"slug\";s:6:\"schema\";s:5:\"count\";i:561;}s:4:\"tags\";a:3:{s:4:\"name\";s:4:\"tags\";s:4:\"slug\";s:4:\"tags\";s:5:\"count\";i:559;}s:7:\"reviews\";a:3:{s:4:\"name\";s:7:\"reviews\";s:4:\"slug\";s:7:\"reviews\";s:5:\"count\";i:547;}s:6:\"mobile\";a:3:{s:4:\"name\";s:6:\"mobile\";s:4:\"slug\";s:6:\"mobile\";s:5:\"count\";i:546;}s:4:\"user\";a:3:{s:4:\"name\";s:4:\"user\";s:4:\"slug\";s:4:\"user\";s:5:\"count\";i:539;}}', 'off'), +(2746, '_site_transient_update_plugins', 'O:8:\"stdClass\":5:{s:12:\"last_checked\";i:1791817604;s:8:\"response\";a:6:{s:51:\"all-in-one-wp-migration/all-in-one-wp-migration.php\";O:8:\"stdClass\":13:{s:2:\"id\";s:37:\"w.org/plugins/all-in-one-wp-migration\";s:4:\"slug\";s:23:\"all-in-one-wp-migration\";s:6:\"plugin\";s:51:\"all-in-one-wp-migration/all-in-one-wp-migration.php\";s:11:\"new_version\";s:5:\"7.112\";s:3:\"url\";s:54:\"https://wordpress.org/plugins/all-in-one-wp-migration/\";s:7:\"package\";s:72:\"https://downloads.wordpress.org/plugin/all-in-one-wp-migration.7.112.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:76:\"https://ps.w.org/all-in-one-wp-migration/assets/icon-256x256.png?rev=2458334\";s:2:\"1x\";s:76:\"https://ps.w.org/all-in-one-wp-migration/assets/icon-128x128.png?rev=2458334\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:79:\"https://ps.w.org/all-in-one-wp-migration/assets/banner-1544x500.png?rev=3490368\";s:2:\"1x\";s:78:\"https://ps.w.org/all-in-one-wp-migration/assets/banner-772x250.png?rev=3490368\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"3.3\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"5.3\";s:16:\"requires_plugins\";a:0:{}}s:23:\"compressx/compressx.php\";O:8:\"stdClass\":14:{s:2:\"id\";s:23:\"w.org/plugins/compressx\";s:4:\"slug\";s:9:\"compressx\";s:6:\"plugin\";s:23:\"compressx/compressx.php\";s:11:\"new_version\";s:6:\"0.9.40\";s:3:\"url\";s:40:\"https://wordpress.org/plugins/compressx/\";s:7:\"package\";s:59:\"https://downloads.wordpress.org/plugin/compressx.0.9.40.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:62:\"https://ps.w.org/compressx/assets/icon-256x256.png?rev=3108121\";s:2:\"1x\";s:62:\"https://ps.w.org/compressx/assets/icon-128x128.png?rev=3108121\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:65:\"https://ps.w.org/compressx/assets/banner-1544x500.png?rev=3108121\";s:2:\"1x\";s:64:\"https://ps.w.org/compressx/assets/banner-772x250.png?rev=3108121\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"5.8\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"7.0\";s:16:\"requires_plugins\";a:0:{}s:14:\"upgrade_notice\";s:113:\"
    \n
  • Added the 'Maximum images per scan request' option to improve scanning performance.
  • \n
\";}s:36:\"contact-form-7/wp-contact-form-7.php\";O:8:\"stdClass\":13:{s:2:\"id\";s:28:\"w.org/plugins/contact-form-7\";s:4:\"slug\";s:14:\"contact-form-7\";s:6:\"plugin\";s:36:\"contact-form-7/wp-contact-form-7.php\";s:11:\"new_version\";s:5:\"6.2.2\";s:3:\"url\";s:45:\"https://wordpress.org/plugins/contact-form-7/\";s:7:\"package\";s:63:\"https://downloads.wordpress.org/plugin/contact-form-7.6.2.2.zip\";s:5:\"icons\";a:2:{s:2:\"1x\";s:59:\"https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255\";s:3:\"svg\";s:59:\"https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:69:\"https://ps.w.org/contact-form-7/assets/banner-1544x500.png?rev=860901\";s:2:\"1x\";s:68:\"https://ps.w.org/contact-form-7/assets/banner-772x250.png?rev=880427\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"7.1\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"8.3\";s:16:\"requires_plugins\";a:0:{}}s:27:\"yabe-webfont/jooosi-fon.php\";O:8:\"stdClass\":13:{s:2:\"id\";s:26:\"w.org/plugins/yabe-webfont\";s:4:\"slug\";s:12:\"yabe-webfont\";s:6:\"plugin\";s:27:\"yabe-webfont/jooosi-fon.php\";s:11:\"new_version\";s:5:\"1.1.5\";s:3:\"url\";s:43:\"https://wordpress.org/plugins/yabe-webfont/\";s:7:\"package\";s:61:\"https://downloads.wordpress.org/plugin/yabe-webfont.1.1.5.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:65:\"https://ps.w.org/yabe-webfont/assets/icon-256x256.png?rev=2926323\";s:2:\"1x\";s:65:\"https://ps.w.org/yabe-webfont/assets/icon-256x256.png?rev=2926323\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:68:\"https://ps.w.org/yabe-webfont/assets/banner-1544x500.png?rev=2928341\";s:2:\"1x\";s:67:\"https://ps.w.org/yabe-webfont/assets/banner-772x250.png?rev=2926323\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"6.0\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"7.4\";s:16:\"requires_plugins\";a:0:{}}s:30:\"seo-by-rank-math/rank-math.php\";O:8:\"stdClass\":13:{s:2:\"id\";s:30:\"w.org/plugins/seo-by-rank-math\";s:4:\"slug\";s:16:\"seo-by-rank-math\";s:6:\"plugin\";s:30:\"seo-by-rank-math/rank-math.php\";s:11:\"new_version\";s:7:\"1.0.280\";s:3:\"url\";s:47:\"https://wordpress.org/plugins/seo-by-rank-math/\";s:7:\"package\";s:67:\"https://downloads.wordpress.org/plugin/seo-by-rank-math.1.0.280.zip\";s:5:\"icons\";a:2:{s:2:\"1x\";s:61:\"https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330\";s:3:\"svg\";s:61:\"https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:72:\"https://ps.w.org/seo-by-rank-math/assets/banner-1544x500.png?rev=2639678\";s:2:\"1x\";s:71:\"https://ps.w.org/seo-by-rank-math/assets/banner-772x250.png?rev=2639678\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"6.7\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"7.4\";s:16:\"requires_plugins\";a:0:{}}s:35:\"insert-headers-and-footers/ihaf.php\";O:8:\"stdClass\":13:{s:2:\"id\";s:40:\"w.org/plugins/insert-headers-and-footers\";s:4:\"slug\";s:26:\"insert-headers-and-footers\";s:6:\"plugin\";s:35:\"insert-headers-and-footers/ihaf.php\";s:11:\"new_version\";s:5:\"2.4.0\";s:3:\"url\";s:57:\"https://wordpress.org/plugins/insert-headers-and-footers/\";s:7:\"package\";s:75:\"https://downloads.wordpress.org/plugin/insert-headers-and-footers.2.4.0.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:79:\"https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516\";s:2:\"1x\";s:79:\"https://ps.w.org/insert-headers-and-footers/assets/icon-128x128.png?rev=2758516\";}s:7:\"banners\";a:2:{s:2:\"2x\";s:82:\"https://ps.w.org/insert-headers-and-footers/assets/banner-1544x500.png?rev=2758516\";s:2:\"1x\";s:81:\"https://ps.w.org/insert-headers-and-footers/assets/banner-772x250.png?rev=2758516\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"5.0\";s:6:\"tested\";s:5:\"7.1.3\";s:12:\"requires_php\";s:3:\"7.0\";s:16:\"requires_plugins\";a:0:{}}}s:12:\"translations\";a:3:{i:0;a:7:{s:4:\"type\";s:6:\"plugin\";s:4:\"slug\";s:14:\"duplicate-page\";s:8:\"language\";s:5:\"es_MX\";s:7:\"version\";s:5:\"4.5.9\";s:7:\"updated\";s:19:\"2021-09-21 13:07:34\";s:7:\"package\";s:81:\"https://downloads.wordpress.org/translation/plugin/duplicate-page/4.5.9/es_MX.zip\";s:10:\"autoupdate\";b:1;}i:1;a:7:{s:4:\"type\";s:6:\"plugin\";s:4:\"slug\";s:8:\"polylang\";s:8:\"language\";s:5:\"es_MX\";s:7:\"version\";s:5:\"3.8.3\";s:7:\"updated\";s:19:\"2026-03-17 09:30:43\";s:7:\"package\";s:75:\"https://downloads.wordpress.org/translation/plugin/polylang/3.8.3/es_MX.zip\";s:10:\"autoupdate\";b:1;}i:2;a:9:{s:8:\"language\";s:5:\"es_MX\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-01T05:35:11+00:00\";s:12:\"english_name\";s:16:\"Spanish (Mexico)\";s:11:\"native_name\";s:19:\"Español de México\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-es_MX.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"es\";i:1;s:3:\"spa\";i:2;s:3:\"spa\";}s:4:\"type\";s:6:\"plugin\";s:4:\"slug\";s:12:\"polylang-pro\";}}s:9:\"no_update\";a:6:{s:46:\"brozzme-db-prefix-change/brozzme_db_prefix.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:38:\"w.org/plugins/brozzme-db-prefix-change\";s:4:\"slug\";s:24:\"brozzme-db-prefix-change\";s:6:\"plugin\";s:46:\"brozzme-db-prefix-change/brozzme_db_prefix.php\";s:11:\"new_version\";s:5:\"1.3.5\";s:3:\"url\";s:55:\"https://wordpress.org/plugins/brozzme-db-prefix-change/\";s:7:\"package\";s:73:\"https://downloads.wordpress.org/plugin/brozzme-db-prefix-change.1.3.5.zip\";s:5:\"icons\";a:1:{s:2:\"1x\";s:77:\"https://ps.w.org/brozzme-db-prefix-change/assets/icon-128x128.png?rev=1984539\";}s:7:\"banners\";a:1:{s:2:\"1x\";s:79:\"https://ps.w.org/brozzme-db-prefix-change/assets/banner-772x250.jpg?rev=1687149\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"4.7\";}s:43:\"disable-media-pages/disable-media-pages.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:33:\"w.org/plugins/disable-media-pages\";s:4:\"slug\";s:19:\"disable-media-pages\";s:6:\"plugin\";s:43:\"disable-media-pages/disable-media-pages.php\";s:11:\"new_version\";s:5:\"4.0.3\";s:3:\"url\";s:50:\"https://wordpress.org/plugins/disable-media-pages/\";s:7:\"package\";s:68:\"https://downloads.wordpress.org/plugin/disable-media-pages.4.0.3.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:72:\"https://ps.w.org/disable-media-pages/assets/icon-256x256.png?rev=2653576\";s:2:\"1x\";s:72:\"https://ps.w.org/disable-media-pages/assets/icon-128x128.png?rev=2653576\";}s:7:\"banners\";a:0:{}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"6.0\";}s:47:\"disable-post-revision/disable-post-revision.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:35:\"w.org/plugins/disable-post-revision\";s:4:\"slug\";s:21:\"disable-post-revision\";s:6:\"plugin\";s:47:\"disable-post-revision/disable-post-revision.php\";s:11:\"new_version\";s:5:\"1.0.1\";s:3:\"url\";s:52:\"https://wordpress.org/plugins/disable-post-revision/\";s:7:\"package\";s:70:\"https://downloads.wordpress.org/plugin/disable-post-revision.1.0.1.zip\";s:5:\"icons\";a:1:{s:2:\"1x\";s:74:\"https://ps.w.org/disable-post-revision/assets/icon-128x128.png?rev=1423333\";}s:7:\"banners\";a:1:{s:2:\"1x\";s:76:\"https://ps.w.org/disable-post-revision/assets/banner-772x250.png?rev=1423333\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"3.0\";}s:32:\"duplicate-page/duplicatepage.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:28:\"w.org/plugins/duplicate-page\";s:4:\"slug\";s:14:\"duplicate-page\";s:6:\"plugin\";s:32:\"duplicate-page/duplicatepage.php\";s:11:\"new_version\";s:5:\"4.5.9\";s:3:\"url\";s:45:\"https://wordpress.org/plugins/duplicate-page/\";s:7:\"package\";s:57:\"https://downloads.wordpress.org/plugin/duplicate-page.zip\";s:5:\"icons\";a:1:{s:2:\"1x\";s:67:\"https://ps.w.org/duplicate-page/assets/icon-128x128.jpg?rev=1412874\";}s:7:\"banners\";a:1:{s:2:\"1x\";s:69:\"https://ps.w.org/duplicate-page/assets/banner-772x250.jpg?rev=1410328\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"3.4\";}s:48:\"faq-schema-for-pages-and-posts/wp-faq-schema.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:44:\"w.org/plugins/faq-schema-for-pages-and-posts\";s:4:\"slug\";s:30:\"faq-schema-for-pages-and-posts\";s:6:\"plugin\";s:48:\"faq-schema-for-pages-and-posts/wp-faq-schema.php\";s:11:\"new_version\";s:5:\"2.3.0\";s:3:\"url\";s:61:\"https://wordpress.org/plugins/faq-schema-for-pages-and-posts/\";s:7:\"package\";s:73:\"https://downloads.wordpress.org/plugin/faq-schema-for-pages-and-posts.zip\";s:5:\"icons\";a:1:{s:2:\"1x\";s:83:\"https://ps.w.org/faq-schema-for-pages-and-posts/assets/icon-128x128.png?rev=2195137\";}s:7:\"banners\";a:1:{s:2:\"1x\";s:85:\"https://ps.w.org/faq-schema-for-pages-and-posts/assets/banner-772x250.png?rev=2682654\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"4.6\";}s:30:\"table-of-contents-plus/toc.php\";O:8:\"stdClass\":10:{s:2:\"id\";s:36:\"w.org/plugins/table-of-contents-plus\";s:4:\"slug\";s:22:\"table-of-contents-plus\";s:6:\"plugin\";s:30:\"table-of-contents-plus/toc.php\";s:11:\"new_version\";s:8:\"202609.1\";s:3:\"url\";s:53:\"https://wordpress.org/plugins/table-of-contents-plus/\";s:7:\"package\";s:74:\"https://downloads.wordpress.org/plugin/table-of-contents-plus.202609.1.zip\";s:5:\"icons\";a:2:{s:2:\"2x\";s:75:\"https://ps.w.org/table-of-contents-plus/assets/icon-256x256.png?rev=1151771\";s:2:\"1x\";s:75:\"https://ps.w.org/table-of-contents-plus/assets/icon-128x128.png?rev=1151770\";}s:7:\"banners\";a:1:{s:2:\"1x\";s:76:\"https://ps.w.org/table-of-contents-plus/assets/banner-772x250.png?rev=578600\";}s:11:\"banners_rtl\";a:0:{}s:8:\"requires\";s:3:\"5.7\";}}s:7:\"checked\";a:15:{s:44:\"centro-de-funciones/alcastromol-function.php\";s:5:\"3.2.0\";s:51:\"all-in-one-wp-migration/all-in-one-wp-migration.php\";s:5:\"7.111\";s:46:\"brozzme-db-prefix-change/brozzme_db_prefix.php\";s:5:\"1.3.5\";s:23:\"compressx/compressx.php\";s:6:\"0.9.39\";s:36:\"contact-form-7/wp-contact-form-7.php\";s:3:\"6.2\";s:43:\"disable-media-pages/disable-media-pages.php\";s:5:\"4.0.3\";s:47:\"disable-post-revision/disable-post-revision.php\";s:5:\"1.0.1\";s:32:\"duplicate-page/duplicatepage.php\";s:5:\"4.5.9\";s:48:\"faq-schema-for-pages-and-posts/wp-faq-schema.php\";s:5:\"2.3.0\";s:27:\"yabe-webfont/jooosi-fon.php\";s:5:\"1.1.4\";s:25:\"polylang-pro/polylang.php\";s:5:\"3.8.3\";s:30:\"seo-by-rank-math/rank-math.php\";s:7:\"1.0.279\";s:30:\"table-of-contents-plus/toc.php\";s:8:\"202609.1\";s:35:\"insert-headers-and-footers/ihaf.php\";s:5:\"2.3.9\";s:23:\"wp-rocket/wp-rocket.php\";s:6:\"3.15.3\";}}', 'off'), +(2751, '_transient_timeout_aioseo_plugin_cache_table_exists', '1792422406', 'off'), +(2752, '_transient_aioseo_plugin_cache_table_exists', '1', 'off'), +(2754, '_transient_timeout_as-post-store-dependencies-met', '1791903999', 'off'), +(2755, '_transient_as-post-store-dependencies-met', 'yes', 'off'), +(2756, '_transient_doing_cron', '1791817600.7055521011352539062500', 'on'), +(2757, '_site_transient_t15s-polylang', 'O:8:\"stdClass\":5:{s:12:\"polylang-pro\";a:1:{s:12:\"translations\";a:26:{s:2:\"ar\";a:7:{s:8:\"language\";s:2:\"ar\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-24T02:19:24+00:00\";s:12:\"english_name\";s:6:\"Arabic\";s:11:\"native_name\";s:14:\"العربية\";s:7:\"package\";s:81:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-ar.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"ar\";i:1;s:3:\"ara\";}}s:2:\"cs\";a:7:{s:8:\"language\";s:5:\"cs_CZ\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T10:39:57+00:00\";s:12:\"english_name\";s:5:\"Czech\";s:11:\"native_name\";s:9:\"Čeština\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-cs_CZ.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"cs\";i:1;s:3:\"ces\";}}s:2:\"da\";a:7:{s:8:\"language\";s:5:\"da_DK\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T13:56:53+00:00\";s:12:\"english_name\";s:6:\"Danish\";s:11:\"native_name\";s:5:\"Dansk\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-da_DK.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"da\";i:1;s:3:\"dan\";}}s:2:\"nl\";a:7:{s:8:\"language\";s:5:\"nl_NL\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T10:37:41+00:00\";s:12:\"english_name\";s:5:\"Dutch\";s:11:\"native_name\";s:10:\"Nederlands\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-nl_NL.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"nl\";i:1;s:3:\"nld\";}}s:5:\"nl-be\";a:7:{s:8:\"language\";s:5:\"nl_BE\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T10:40:47+00:00\";s:12:\"english_name\";s:15:\"Dutch (Belgium)\";s:11:\"native_name\";s:20:\"Nederlands (België)\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-nl_BE.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"nl\";i:1;s:3:\"nld\";}}s:5:\"en-au\";a:7:{s:8:\"language\";s:5:\"en_AU\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-08T07:22:28+00:00\";s:12:\"english_name\";s:19:\"English (Australia)\";s:11:\"native_name\";s:19:\"English (Australia)\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-en_AU.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"en\";i:1;s:3:\"eng\";i:2;s:3:\"eng\";}}s:5:\"en-gb\";a:7:{s:8:\"language\";s:5:\"en_GB\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-08T07:21:37+00:00\";s:12:\"english_name\";s:12:\"English (UK)\";s:11:\"native_name\";s:12:\"English (UK)\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-en_GB.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"en\";i:1;s:3:\"eng\";i:2;s:3:\"eng\";}}s:2:\"fr\";a:7:{s:8:\"language\";s:5:\"fr_FR\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T12:16:07+00:00\";s:12:\"english_name\";s:15:\"French (France)\";s:11:\"native_name\";s:9:\"Français\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-fr_FR.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"fr\";}}s:2:\"de\";a:7:{s:8:\"language\";s:5:\"de_DE\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T10:18:52+00:00\";s:12:\"english_name\";s:6:\"German\";s:11:\"native_name\";s:7:\"Deutsch\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-de_DE.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"de\";}}s:2:\"el\";a:7:{s:8:\"language\";s:2:\"el\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-30T14:52:40+00:00\";s:12:\"english_name\";s:5:\"Greek\";s:11:\"native_name\";s:16:\"Ελληνικά\";s:7:\"package\";s:81:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-el.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"el\";i:1;s:3:\"ell\";}}s:2:\"hi\";a:7:{s:8:\"language\";s:5:\"hi_IN\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-29T16:22:40+00:00\";s:12:\"english_name\";s:5:\"Hindi\";s:11:\"native_name\";s:18:\"हिन्दी\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-hi_IN.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"hi\";i:1;s:3:\"hin\";}}s:2:\"id\";a:7:{s:8:\"language\";s:5:\"id_ID\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-29T14:35:52+00:00\";s:12:\"english_name\";s:10:\"Indonesian\";s:11:\"native_name\";s:16:\"Bahasa Indonesia\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-id_ID.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"id\";i:1;s:3:\"ind\";}}s:2:\"it\";a:7:{s:8:\"language\";s:5:\"it_IT\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-27T14:10:29+00:00\";s:12:\"english_name\";s:7:\"Italian\";s:11:\"native_name\";s:8:\"Italiano\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-it_IT.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"it\";i:1;s:3:\"ita\";}}s:2:\"ja\";a:7:{s:8:\"language\";s:2:\"ja\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-01T05:33:08+00:00\";s:12:\"english_name\";s:8:\"Japanese\";s:11:\"native_name\";s:9:\"日本語\";s:7:\"package\";s:81:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-ja.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"ja\";}}s:2:\"fa\";a:7:{s:8:\"language\";s:5:\"fa_IR\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-27T10:40:40+00:00\";s:12:\"english_name\";s:7:\"Persian\";s:11:\"native_name\";s:10:\"فارسی\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-fa_IR.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"fa\";i:1;s:3:\"fas\";}}s:2:\"pl\";a:7:{s:8:\"language\";s:5:\"pl_PL\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T13:10:39+00:00\";s:12:\"english_name\";s:6:\"Polish\";s:11:\"native_name\";s:6:\"Polski\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-pl_PL.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"pl\";i:1;s:3:\"pol\";}}s:5:\"pt-br\";a:7:{s:8:\"language\";s:5:\"pt_BR\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T19:35:18+00:00\";s:12:\"english_name\";s:19:\"Portuguese (Brazil)\";s:11:\"native_name\";s:20:\"Português do Brasil\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-pt_BR.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"pt\";i:1;s:3:\"por\";}}s:2:\"pt\";a:7:{s:8:\"language\";s:5:\"pt_PT\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-07T15:42:03+00:00\";s:12:\"english_name\";s:21:\"Portuguese (Portugal)\";s:11:\"native_name\";s:10:\"Português\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-pt_PT.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"pt\";}}s:2:\"ro\";a:7:{s:8:\"language\";s:5:\"ro_RO\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-01T12:29:17+00:00\";s:12:\"english_name\";s:8:\"Romanian\";s:11:\"native_name\";s:8:\"Română\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-ro_RO.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"ro\";i:1;s:3:\"ron\";}}s:2:\"ru\";a:7:{s:8:\"language\";s:5:\"ru_RU\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-29T17:57:31+00:00\";s:12:\"english_name\";s:7:\"Russian\";s:11:\"native_name\";s:14:\"Русский\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-ru_RU.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"ru\";i:1;s:3:\"rus\";}}s:2:\"sr\";a:7:{s:8:\"language\";s:5:\"sr_RS\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-01T21:30:22+00:00\";s:12:\"english_name\";s:7:\"Serbian\";s:11:\"native_name\";s:23:\"Српски језик\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-sr_RS.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"sr\";i:1;s:3:\"srp\";}}s:5:\"es-mx\";a:7:{s:8:\"language\";s:5:\"es_MX\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-01T05:35:11+00:00\";s:12:\"english_name\";s:16:\"Spanish (Mexico)\";s:11:\"native_name\";s:19:\"Español de México\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-es_MX.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"es\";i:1;s:3:\"spa\";i:2;s:3:\"spa\";}}s:2:\"es\";a:7:{s:8:\"language\";s:5:\"es_ES\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-10-08T08:21:35+00:00\";s:12:\"english_name\";s:15:\"Spanish (Spain)\";s:11:\"native_name\";s:8:\"Español\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-es_ES.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"es\";i:1;s:3:\"spa\";i:2;s:3:\"spa\";}}s:2:\"sv\";a:7:{s:8:\"language\";s:5:\"sv_SE\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-24T07:27:03+00:00\";s:12:\"english_name\";s:7:\"Swedish\";s:11:\"native_name\";s:7:\"Svenska\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-sv_SE.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"sv\";i:1;s:3:\"swe\";}}s:2:\"tr\";a:7:{s:8:\"language\";s:5:\"tr_TR\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-23T11:36:16+00:00\";s:12:\"english_name\";s:7:\"Turkish\";s:11:\"native_name\";s:8:\"Türkçe\";s:7:\"package\";s:84:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-tr_TR.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"tr\";i:1;s:3:\"tur\";}}s:2:\"uk\";a:7:{s:8:\"language\";s:2:\"uk\";s:7:\"version\";s:9:\"3.3-beta1\";s:7:\"updated\";s:25:\"2026-09-29T17:51:16+00:00\";s:12:\"english_name\";s:9:\"Ukrainian\";s:11:\"native_name\";s:20:\"Українська\";s:7:\"package\";s:81:\"https://packages.translationspress.com/wp-syntex/polylang-pro/polylang-pro-uk.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"uk\";i:1;s:3:\"ukr\";}}}}s:11:\"polylang-wc\";a:1:{s:12:\"translations\";a:26:{s:2:\"ar\";a:7:{s:8:\"language\";s:2:\"ar\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-05T16:29:42+00:00\";s:12:\"english_name\";s:6:\"Arabic\";s:11:\"native_name\";s:14:\"العربية\";s:7:\"package\";s:79:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-ar.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"ar\";i:1;s:3:\"ara\";}}s:2:\"cs\";a:7:{s:8:\"language\";s:5:\"cs_CZ\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-10T23:35:09+00:00\";s:12:\"english_name\";s:5:\"Czech\";s:11:\"native_name\";s:9:\"Čeština\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-cs_CZ.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"cs\";i:1;s:3:\"ces\";}}s:2:\"da\";a:7:{s:8:\"language\";s:5:\"da_DK\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-12T08:31:41+00:00\";s:12:\"english_name\";s:6:\"Danish\";s:11:\"native_name\";s:5:\"Dansk\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-da_DK.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"da\";i:1;s:3:\"dan\";}}s:2:\"nl\";a:7:{s:8:\"language\";s:5:\"nl_NL\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-05T13:50:03+00:00\";s:12:\"english_name\";s:5:\"Dutch\";s:11:\"native_name\";s:10:\"Nederlands\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-nl_NL.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"nl\";i:1;s:3:\"nld\";}}s:5:\"nl-be\";a:7:{s:8:\"language\";s:5:\"nl_BE\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-13T19:37:35+00:00\";s:12:\"english_name\";s:15:\"Dutch (Belgium)\";s:11:\"native_name\";s:20:\"Nederlands (België)\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-nl_BE.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"nl\";i:1;s:3:\"nld\";}}s:5:\"en-au\";a:7:{s:8:\"language\";s:5:\"en_AU\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-09T16:08:50+00:00\";s:12:\"english_name\";s:19:\"English (Australia)\";s:11:\"native_name\";s:19:\"English (Australia)\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-en_AU.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"en\";i:1;s:3:\"eng\";i:2;s:3:\"eng\";}}s:5:\"en-gb\";a:7:{s:8:\"language\";s:5:\"en_GB\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-09T15:03:28+00:00\";s:12:\"english_name\";s:12:\"English (UK)\";s:11:\"native_name\";s:12:\"English (UK)\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-en_GB.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"en\";i:1;s:3:\"eng\";i:2;s:3:\"eng\";}}s:2:\"fr\";a:7:{s:8:\"language\";s:5:\"fr_FR\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-03-04T11:08:19+00:00\";s:12:\"english_name\";s:15:\"French (France)\";s:11:\"native_name\";s:9:\"Français\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-fr_FR.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"fr\";}}s:2:\"de\";a:7:{s:8:\"language\";s:5:\"de_DE\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-06T11:02:57+00:00\";s:12:\"english_name\";s:6:\"German\";s:11:\"native_name\";s:7:\"Deutsch\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-de_DE.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"de\";}}s:9:\"de/formal\";a:7:{s:8:\"language\";s:12:\"de_DE_formal\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-06T11:02:14+00:00\";s:12:\"english_name\";s:15:\"German (Formal)\";s:11:\"native_name\";s:13:\"Deutsch (Sie)\";s:7:\"package\";s:89:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-de_DE_formal.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"de\";}}s:2:\"el\";a:7:{s:8:\"language\";s:2:\"el\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-12T09:36:54+00:00\";s:12:\"english_name\";s:5:\"Greek\";s:11:\"native_name\";s:16:\"Ελληνικά\";s:7:\"package\";s:79:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-el.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"el\";i:1;s:3:\"ell\";}}s:2:\"hi\";a:7:{s:8:\"language\";s:5:\"hi_IN\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-13T17:27:17+00:00\";s:12:\"english_name\";s:5:\"Hindi\";s:11:\"native_name\";s:18:\"हिन्दी\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-hi_IN.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"hi\";i:1;s:3:\"hin\";}}s:2:\"id\";a:7:{s:8:\"language\";s:5:\"id_ID\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-06T02:09:40+00:00\";s:12:\"english_name\";s:10:\"Indonesian\";s:11:\"native_name\";s:16:\"Bahasa Indonesia\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-id_ID.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"id\";i:1;s:3:\"ind\";}}s:2:\"it\";a:7:{s:8:\"language\";s:5:\"it_IT\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-09T14:20:39+00:00\";s:12:\"english_name\";s:7:\"Italian\";s:11:\"native_name\";s:8:\"Italiano\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-it_IT.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"it\";i:1;s:3:\"ita\";}}s:2:\"ja\";a:7:{s:8:\"language\";s:2:\"ja\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-12T03:56:59+00:00\";s:12:\"english_name\";s:8:\"Japanese\";s:11:\"native_name\";s:9:\"日本語\";s:7:\"package\";s:79:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-ja.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"ja\";}}s:2:\"fa\";a:7:{s:8:\"language\";s:5:\"fa_IR\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-14T17:49:40+00:00\";s:12:\"english_name\";s:7:\"Persian\";s:11:\"native_name\";s:10:\"فارسی\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-fa_IR.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"fa\";i:1;s:3:\"fas\";}}s:2:\"pl\";a:7:{s:8:\"language\";s:5:\"pl_PL\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-09T19:20:26+00:00\";s:12:\"english_name\";s:6:\"Polish\";s:11:\"native_name\";s:6:\"Polski\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-pl_PL.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"pl\";i:1;s:3:\"pol\";}}s:5:\"pt-br\";a:7:{s:8:\"language\";s:5:\"pt_BR\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-09T14:22:06+00:00\";s:12:\"english_name\";s:19:\"Portuguese (Brazil)\";s:11:\"native_name\";s:20:\"Português do Brasil\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-pt_BR.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"pt\";i:1;s:3:\"por\";}}s:2:\"pt\";a:7:{s:8:\"language\";s:5:\"pt_PT\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-02-27T11:40:05+00:00\";s:12:\"english_name\";s:21:\"Portuguese (Portugal)\";s:11:\"native_name\";s:10:\"Português\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-pt_PT.zip\";s:3:\"iso\";a:1:{i:0;s:2:\"pt\";}}s:2:\"ro\";a:7:{s:8:\"language\";s:5:\"ro_RO\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-08T09:32:16+00:00\";s:12:\"english_name\";s:8:\"Romanian\";s:11:\"native_name\";s:8:\"Română\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-ro_RO.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"ro\";i:1;s:3:\"ron\";}}s:2:\"ru\";a:7:{s:8:\"language\";s:5:\"ru_RU\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-09T14:22:26+00:00\";s:12:\"english_name\";s:7:\"Russian\";s:11:\"native_name\";s:14:\"Русский\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-ru_RU.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"ru\";i:1;s:3:\"rus\";}}s:2:\"sr\";a:7:{s:8:\"language\";s:5:\"sr_RS\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-11T23:59:23+00:00\";s:12:\"english_name\";s:7:\"Serbian\";s:11:\"native_name\";s:23:\"Српски језик\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-sr_RS.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"sr\";i:1;s:3:\"srp\";}}s:5:\"es-mx\";a:7:{s:8:\"language\";s:5:\"es_MX\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-12T04:09:16+00:00\";s:12:\"english_name\";s:16:\"Spanish (Mexico)\";s:11:\"native_name\";s:19:\"Español de México\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-es_MX.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"es\";i:1;s:3:\"spa\";i:2;s:3:\"spa\";}}s:2:\"es\";a:7:{s:8:\"language\";s:5:\"es_ES\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-06T10:25:08+00:00\";s:12:\"english_name\";s:15:\"Spanish (Spain)\";s:11:\"native_name\";s:8:\"Español\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-es_ES.zip\";s:3:\"iso\";a:3:{i:0;s:2:\"es\";i:1;s:3:\"spa\";i:2;s:3:\"spa\";}}s:2:\"sv\";a:7:{s:8:\"language\";s:5:\"sv_SE\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-12T17:16:33+00:00\";s:12:\"english_name\";s:7:\"Swedish\";s:11:\"native_name\";s:7:\"Svenska\";s:7:\"package\";s:82:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-sv_SE.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"sv\";i:1;s:3:\"swe\";}}s:2:\"uk\";a:7:{s:8:\"language\";s:2:\"uk\";s:7:\"version\";s:9:\"1.8-beta1\";s:7:\"updated\";s:25:\"2026-01-07T12:17:11+00:00\";s:12:\"english_name\";s:9:\"Ukrainian\";s:11:\"native_name\";s:20:\"Українська\";s:7:\"package\";s:79:\"https://packages.translationspress.com/wp-syntex/polylang-wc/polylang-wc-uk.zip\";s:3:\"iso\";a:2:{i:0;s:2:\"uk\";i:1;s:3:\"ukr\";}}}}s:8:\"polylang\";a:1:{s:12:\"translations\";a:0:{}}s:15:\"polylang-readme\";a:1:{s:12:\"translations\";a:0:{}}s:13:\"_last_checked\";i:1791817606;}', 'off'); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_postmeta` +-- Estructura de tabla para la tabla `xm_aca_postmeta` -- -CREATE TABLE `wp_postmeta` ( +CREATE TABLE `xm_aca_postmeta` ( `meta_id` bigint UNSIGNED NOT NULL, `post_id` bigint UNSIGNED NOT NULL DEFAULT '0', `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, @@ -651,10 +692,10 @@ CREATE TABLE `wp_postmeta` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_postmeta` +-- Volcado de datos para la tabla `xm_aca_postmeta` -- -INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUES +INSERT INTO `xm_aca_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUES (1, 2, '_wp_page_template', 'default'), (2, 3, '_wp_page_template', 'default'), (5, 7, '_wpcode_auto_insert', '1'), @@ -735,9 +776,9 @@ INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUE (99, 42, '_wp_attached_file', '2026/10/xmartica-platform-07-sap-scaled.png'), (100, 42, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1440;s:4:\"file\";s:43:\"2026/10/xmartica-platform-07-sap-scaled.png\";s:8:\"filesize\";i:44759;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:36:\"xmartica-platform-07-sap-250x141.png\";s:5:\"width\";i:250;s:6:\"height\";i:141;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:4118;}s:5:\"large\";a:5:{s:4:\"file\";s:36:\"xmartica-platform-07-sap-700x394.png\";s:5:\"width\";i:700;s:6:\"height\";i:394;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:13482;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:36:\"xmartica-platform-07-sap-150x150.png\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:2963;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:36:\"xmartica-platform-07-sap-768x432.png\";s:5:\"width\";i:768;s:6:\"height\";i:432;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:12552;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:37:\"xmartica-platform-07-sap-1536x864.png\";s:5:\"width\";i:1536;s:6:\"height\";i:864;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:27762;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:38:\"xmartica-platform-07-sap-2048x1152.png\";s:5:\"width\";i:2048;s:6:\"height\";i:1152;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:49913;}s:5:\"small\";a:5:{s:4:\"file\";s:35:\"xmartica-platform-07-sap-120x68.png\";s:5:\"width\";i:120;s:6:\"height\";i:68;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:1911;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:36:\"xmartica-platform-07-sap-700x200.png\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:9438;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:28:\"xmartica-platform-07-sap.png\";}'), (102, 2, '_edit_last', '1'), -(103, 2, '_edit_lock', '1791068666:1'), +(103, 2, '_edit_lock', '1791588856:1'), (104, 1, '_edit_lock', '1790951018:1'), -(105, 2, '_wp_faq_schema', 'a:5:{i:0;a:2:{s:1:\"q\";s:57:\"¿Qué es la consultoría de transformación empresarial?\";s:1:\"a\";s:288:\"Es la disciplina de rediseñar cómo opera una organización — su estrategia, modelo operativo, procesos, tecnología y personas — para que rinda mejor y ejecute más rápido. Trabajamos en las siete áreas de práctica para llevar a una empresa de donde está a donde necesita estar.\";}i:1;a:2:{s:1:\"q\";s:54:\"¿Cuánto dura un proyecto de transformación digital?\";s:1:\"a\";s:13:\"Próximamente\";}i:2;a:2:{s:1:\"q\";s:59:\"¿Trabajan con empresas de todos los tamaños e industrias?\";s:1:\"a\";s:13:\"Próximamente\";}i:3;a:2:{s:1:\"q\";s:58:\"¿Cómo ayudan a adoptar IA sin interrumpir la operación?\";s:1:\"a\";s:13:\"Próximamente\";}i:4;a:2:{s:1:\"q\";s:60:\"¿Cómo se mide el éxito en un proyecto de transformación?\";s:1:\"a\";s:13:\"Próximamente\";}}'), +(105, 2, '_wp_faq_schema', 'a:5:{i:0;a:2:{s:1:\"q\";s:43:\"What is business transformation consulting?\";s:1:\"a\";s:280:\"It\'s the discipline of redesigning how an organization operates — its strategy, operating model, processes, technology and people — so it can perform better and execute faster. We work across all seven practice areas to move a company from where it is to where it needs to be.\";}i:1;a:2:{s:1:\"q\";s:52:\"How long does a digital transformation project take?\";s:1:\"a\";s:254:\"It depends on scope. A focused diagnostic and roadmap can take a few weeks, while an enterprise-wide transformation program typically runs in phases over 6 to 18 months. We scope every engagement around measurable milestones rather than a fixed calendar.\";}i:2;a:2:{s:1:\"q\";s:55:\"Do you work with companies of all sizes and industries?\";s:1:\"a\";s:185:\"Yes. Our practices are designed to scale from mid-market companies running a first structured transformation to large enterprises coordinating multi-country programs, across industries.\";}i:3;a:2:{s:1:\"q\";s:69:\"How do you help organizations adopt AI without disrupting operations?\";s:1:\"a\";s:220:\"We start with an AI strategy and governance framework, then pilot generative AI and automation use cases in controlled scope before scaling — always paired with change management so teams adopt the new ways of working.\";}i:4;a:2:{s:1:\"q\";s:55:\"How is success measured in a transformation engagement?\";s:1:\"a\";s:218:\"We agree on business KPIs upfront — efficiency, adoption, cost, revenue or experience metrics — and track them through the transformation office we help stand up, so progress is visible at every steering committee.\";}}'), (106, 45, '_wp_attached_file', '2026/10/add-sharp.svg'), (107, 45, '_wp_attachment_metadata', 'a:1:{s:8:\"filesize\";i:191;}'), (108, 46, '_wp_attached_file', '2026/10/icon-acordeon-cerrar.png'), @@ -770,14 +811,14 @@ INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUE (138, 56, '_wp_trash_meta_time', '1791057521'), (142, 58, '_wp_attached_file', '2026/10/wrapper-banner-hero.jpg'), (143, 58, '_wp_attachment_metadata', 'a:6:{s:5:\"width\";i:1920;s:6:\"height\";i:953;s:4:\"file\";s:31:\"2026/10/wrapper-banner-hero.jpg\";s:8:\"filesize\";i:222210;s:5:\"sizes\";a:7:{s:6:\"medium\";a:5:{s:4:\"file\";s:31:\"wrapper-banner-hero-250x124.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:124;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:2265;}s:5:\"large\";a:5:{s:4:\"file\";s:31:\"wrapper-banner-hero-700x347.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:347;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:9247;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:31:\"wrapper-banner-hero-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:1858;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:31:\"wrapper-banner-hero-768x381.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:381;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:10578;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:32:\"wrapper-banner-hero-1536x762.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:762;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:29965;}s:5:\"small\";a:5:{s:4:\"file\";s:30:\"wrapper-banner-hero-120x60.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:60;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:1170;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:31:\"wrapper-banner-hero-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:6411;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}}'), -(145, 60, '_edit_lock', '1791294227:1'), +(145, 60, '_edit_lock', '1791591376:1'), (146, 60, 'rank_math_internal_links_processed', '1'), (147, 60, '_edit_last', '1'), -(148, 60, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:66:\"¿Qué hace realmente un consultor de transformación empresarial?\";s:1:\"a\";s:294:\"Un consultor de transformación empresarial diagnostica cómo opera actualmente la organización, diseña el modelo operativo objetivo y el roadmap, y luego trabaja junto a tus equipos para implementarlo — cubriendo estrategia, procesos, tecnología, datos y gestión del cambio en el camino.\";}i:1;a:2:{s:1:\"q\";s:67:\"¿En qué se diferencia de la consultoría de gestión tradicional?\";s:1:\"a\";s:14:\"Próximamente,\";}i:2;a:2:{s:1:\"q\";s:74:\"¿Qué incluyen sus servicios de asesoría en transformación empresarial?\";s:1:\"a\";s:14:\"Próximamente,\";}i:3;a:2:{s:1:\"q\";s:65:\"¿Trabajan con empresas medianas o solo con grandes corporativos?\";s:1:\"a\";s:14:\"Próximamente,\";}}'), -(149, 62, '_wp_attached_file', '2026/10/xmartica-consulting-strategy-scaled.jpg'), +(148, 60, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:59:\"What does a business transformation consultant actually do?\";s:1:\"a\";s:272:\"A business transformation consultant diagnoses how an organization currently operates, designs the target operating model and roadmap, and then works alongside your teams to implement it — covering strategy, process, technology, data and change management along the way.\";}i:1;a:2:{s:1:\"q\";s:87:\"How is business transformation consulting different from general management consulting?\";s:1:\"a\";s:284:\"Traditional management consulting often stops at strategy and analysis. Business transformation consulting goes further — it includes designing the operating model, redesigning processes and technology, and staying through implementation so the recommendations actually get adopted.\";}i:2;a:2:{s:1:\"q\";s:66:\"What\'s included in your business transformation advisory services?\";s:1:\"a\";s:232:\"Our business transformation advisory services span diagnostics, transformation strategy, operating model and organizational design, process redesign, governance and a transformation PMO — engaged individually or as a full program.\";}i:3;a:2:{s:1:\"q\";s:63:\"Do you work with mid-size companies, or only large enterprises?\";s:1:\"a\";s:229:\"Both. As a business transformation consulting firm we scale the engagement team and scope to fit mid-market companies running their first structured transformation as well as large enterprises coordinating multi-country programs.\";}}'), +(149, 62, '_wp_attached_file', '2026/10/xmartica-consulting-strategy-scaled.jpg'); +INSERT INTO `xm_aca_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUES (150, 62, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1707;s:4:\"file\";s:47:\"2026/10/xmartica-consulting-strategy-scaled.jpg\";s:8:\"filesize\";i:393638;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:40:\"xmartica-consulting-strategy-250x167.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:167;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:13706;}s:5:\"large\";a:5:{s:4:\"file\";s:40:\"xmartica-consulting-strategy-700x467.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:467;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:62452;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:40:\"xmartica-consulting-strategy-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:8462;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:40:\"xmartica-consulting-strategy-768x512.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:512;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:70444;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:42:\"xmartica-consulting-strategy-1536x1024.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:1024;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:190759;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:42:\"xmartica-consulting-strategy-2048x1366.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1366;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:287509;}s:5:\"small\";a:5:{s:4:\"file\";s:39:\"xmartica-consulting-strategy-120x80.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:80;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:4524;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:40:\"xmartica-consulting-strategy-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:29095;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:32:\"xmartica-consulting-strategy.jpg\";}'), -(152, 63, '_wp_attached_file', '2026/10/xmartica-consulting-operating-model-scaled.jpg'); -INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUES +(152, 63, '_wp_attached_file', '2026/10/xmartica-consulting-operating-model-scaled.jpg'), (153, 63, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1709;s:4:\"file\";s:54:\"2026/10/xmartica-consulting-operating-model-scaled.jpg\";s:8:\"filesize\";i:415640;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:47:\"xmartica-consulting-operating-model-250x167.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:167;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:13337;}s:5:\"large\";a:5:{s:4:\"file\";s:47:\"xmartica-consulting-operating-model-700x467.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:467;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:60349;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:47:\"xmartica-consulting-operating-model-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:7863;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:47:\"xmartica-consulting-operating-model-768x513.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:513;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:69405;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:49:\"xmartica-consulting-operating-model-1536x1025.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:1025;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:191030;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:49:\"xmartica-consulting-operating-model-2048x1367.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1367;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:299293;}s:5:\"small\";a:5:{s:4:\"file\";s:46:\"xmartica-consulting-operating-model-120x80.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:80;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:4332;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:47:\"xmartica-consulting-operating-model-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:25037;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:39:\"xmartica-consulting-operating-model.jpg\";}'), (155, 64, '_wp_attached_file', '2026/10/consulting-why-01.svg'), (156, 64, '_wp_attachment_metadata', 'a:1:{s:8:\"filesize\";i:413;}'), @@ -801,16 +842,16 @@ INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUE (174, 73, '_wp_attachment_metadata', 'a:1:{s:8:\"filesize\";i:417;}'), (175, 74, '_wp_attached_file', '2026/10/wrapper-internas-01.jpg'), (176, 74, '_wp_attachment_metadata', 'a:6:{s:5:\"width\";i:1920;s:6:\"height\";i:1200;s:4:\"file\";s:31:\"2026/10/wrapper-internas-01.jpg\";s:8:\"filesize\";i:615375;s:5:\"sizes\";a:7:{s:6:\"medium\";a:5:{s:4:\"file\";s:31:\"wrapper-internas-01-250x156.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:156;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:3178;}s:5:\"large\";a:5:{s:4:\"file\";s:31:\"wrapper-internas-01-700x438.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:438;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:12885;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:31:\"wrapper-internas-01-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:2064;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:31:\"wrapper-internas-01-768x480.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:480;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:14529;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:32:\"wrapper-internas-01-1536x960.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:960;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:43231;}s:5:\"small\";a:5:{s:4:\"file\";s:30:\"wrapper-internas-01-120x75.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:75;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:1462;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:31:\"wrapper-internas-01-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:5912;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}}'), -(178, 75, '_edit_lock', '1791260046:1'), +(178, 75, '_edit_lock', '1791601561:1'), (179, 75, 'rank_math_internal_links_processed', '1'), (180, 75, '_edit_last', '1'), -(181, 75, '_wp_faq_schema', 'a:5:{i:0;a:2:{s:1:\"q\";s:68:\"¿Qué incluye realmente la consultoría de transformación digital?\";s:1:\"a\";s:248:\"Generalmente incluye un diagnóstico de madurez digital, un roadmap priorizado y apoyo en la implementación de tecnología, procesos y gestión del cambio — desde decisiones de nube y ERP hasta cómo los equipos adoptan nuevas formas de trabajo.\";}i:1;a:2:{s:1:\"q\";s:57:\"¿En qué se diferencia del consulting de TI tradicional?\";s:1:\"a\";s:14:\"Próximamente,\";}i:2;a:2:{s:1:\"q\";s:61:\"¿Ofrecen servicios para industrias específicas, como salud?\";s:1:\"a\";s:14:\"Próximamente,\";}i:3;a:2:{s:1:\"q\";s:62:\"¿Cuánto dura un programa típico de transformación digital?\";s:1:\"a\";s:14:\"Próximamente,\";}i:4;a:2:{s:1:\"q\";s:64:\"¿Lideran el proyecto o trabajan junto a nuestro equipo interno?\";s:1:\"a\";s:14:\"Próximamente,\";}}'), +(181, 75, '_wp_faq_schema', 'a:5:{i:0;a:2:{s:1:\"q\";s:61:\"What does digital transformation consulting actually include?\";s:1:\"a\";s:229:\"It typically includes a digital maturity assessment, a prioritized roadmap, and delivery support across technology, process and change management — everything from cloud and ERP decisions to how teams adopt new ways of working.\";}i:1;a:2:{s:1:\"q\";s:93:\"How is digital transformation management consulting different from traditional IT consulting?\";s:1:\"a\";s:259:\"IT consulting usually focuses on a specific system or infrastructure project. Digital transformation management consulting looks at the whole operating model — strategy, process, technology and people — so the change sticks beyond a single implementation.\";}i:2;a:2:{s:1:\"q\";s:97:\"Do you offer digital transformation consulting services for specific industries, like healthcare?\";s:1:\"a\";s:218:\"Yes. We support healthcare digital transformation consulting engagements alongside programs in financial services, retail and manufacturing, adapting the roadmap to each industry\'s regulatory and operational realities.\";}i:3;a:2:{s:1:\"q\";s:60:\"How long does a typical digital transformation program take?\";s:1:\"a\";s:172:\"A maturity assessment and roadmap can take a few weeks. Enterprise-wide programs — spanning cloud, ERP and process change — typically run in phases over 6 to 18 months.\";}i:4;a:2:{s:1:\"q\";s:87:\"Do you work as the lead digital transformation company, or alongside our internal team?\";s:1:\"a\";s:226:\"Both. Some clients want us to run the full digital transformation consulting engagement; others want a specialist team embedded alongside their internal PMO. We scope the engagement model around what you already have in place.\";}}'), (182, 77, '_wp_attached_file', '2026/10/xmartica-digital-strategy-scaled.jpg'), (183, 77, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1707;s:4:\"file\";s:44:\"2026/10/xmartica-digital-strategy-scaled.jpg\";s:8:\"filesize\";i:300261;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:37:\"xmartica-digital-strategy-250x167.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:167;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:10681;}s:5:\"large\";a:5:{s:4:\"file\";s:37:\"xmartica-digital-strategy-700x467.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:467;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:44872;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:37:\"xmartica-digital-strategy-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:6810;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:37:\"xmartica-digital-strategy-768x512.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:512;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:50506;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:39:\"xmartica-digital-strategy-1536x1024.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:1024;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:137999;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:39:\"xmartica-digital-strategy-2048x1366.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1366;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:214720;}s:5:\"small\";a:5:{s:4:\"file\";s:36:\"xmartica-digital-strategy-120x80.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:80;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:3732;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:37:\"xmartica-digital-strategy-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:22943;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:29:\"xmartica-digital-strategy.jpg\";}'), -(185, 78, '_edit_lock', '1791261777:1'), +(185, 78, '_edit_lock', '1791645869:1'), (186, 78, 'rank_math_internal_links_processed', '1'), (187, 78, '_edit_last', '1'), -(188, 78, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:84:\"¿Cuál es la diferencia entre consultoría de mejora de procesos y automatización?\";s:1:\"a\";s:335:\"La consultoría de mejora de procesos rediseña cómo fluye el trabajo de extremo a extremo, incluyendo los pasos manuales. La automatización, que definimos como parte del trabajo, reemplaza pasos específicos con software — y la recomendamos solo cuando el proceso subyacente es lo suficientemente eficiente como para justificarla.\";}i:1;a:2:{s:1:\"q\";s:52:\"¿Usan process mining o solo entrevistas y talleres?\";s:1:\"a\";s:14:\"Próximamente,\";}i:2;a:2:{s:1:\"q\";s:89:\"¿En qué se diferencian de los programas de mejora continua que ya tenemos internamente?\";s:1:\"a\";s:14:\"Próximamente,\";}i:3;a:2:{s:1:\"q\";s:74:\"¿Cómo aseguran que las mejoras no retrocedan tras finalizar el proyecto?\";s:1:\"a\";s:14:\"Próximamente,\";}}'), +(188, 78, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:84:\"What\'s the difference between process improvement consulting and process automation?\";s:1:\"a\";s:283:\"Process improvement consulting redesigns how work flows end to end, including manual steps. Automation, which we scope as part of the redesign, replaces specific steps with software — and we recommend it only where the underlying process is efficient enough to be worth automating.\";}i:1;a:2:{s:1:\"q\";s:60:\"Do you use process mining, or just interviews and workshops?\";s:1:\"a\";s:249:\"Both. Workshops give us context; process mining consulting gives us evidence — actual timestamps and system data showing where a process really slows down. We bring in process mining when the process is complex or high-volume enough to justify it.\";}i:2;a:2:{s:1:\"q\";s:85:\"How is this different from continuous improvement programs we already run internally?\";s:1:\"a\";s:250:\"Continuous improvement consulting from XmartETS complements internal programs — we bring outside diagnostic capacity, process mining and automation expertise your internal team may not have in-house, then hand off the routines needed to sustain it.\";}i:3;a:2:{s:1:\"q\";s:79:\"How do you make sure performance gains don\'t slide back after the project ends?\";s:1:\"a\";s:187:\"Every engagement includes a performance improvement consulting component — KPIs, targets and management routines — so the new way of working is measured and reinforced after we leave.\";}}'), (189, 80, '_wp_attached_file', '2026/10/xmartica-process-improvement-01-scaled.jpg'), (190, 80, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:1707;s:6:\"height\";i:2560;s:4:\"file\";s:50:\"2026/10/xmartica-process-improvement-01-scaled.jpg\";s:8:\"filesize\";i:588880;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-01-250x375.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:375;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:28641;}s:5:\"large\";a:5:{s:4:\"file\";s:44:\"xmartica-process-improvement-01-700x1050.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:1050;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:142044;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-01-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:8607;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:44:\"xmartica-process-improvement-01-768x1152.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:1152;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:162555;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:45:\"xmartica-process-improvement-01-1024x1536.jpg\";s:5:\"width\";i:1024;s:6:\"height\";i:1536;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:256775;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:45:\"xmartica-process-improvement-01-1366x2048.jpg\";s:5:\"width\";i:1366;s:6:\"height\";i:2048;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:414335;}s:5:\"small\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-01-120x180.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:180;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:8789;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-01-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:26595;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:35:\"xmartica-process-improvement-01.jpg\";}'), (192, 81, '_wp_attached_file', '2026/10/xmartica-process-improvement-02-scaled.jpg'), @@ -821,18 +862,18 @@ INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUE (199, 83, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1440;s:4:\"file\";s:50:\"2026/10/xmartica-process-improvement-04-scaled.jpg\";s:8:\"filesize\";i:353683;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-04-250x141.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:141;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:11658;}s:5:\"large\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-04-700x394.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:394;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:50815;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-04-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:8145;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-04-768x432.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:432;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:57531;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:44:\"xmartica-process-improvement-04-1536x864.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:864;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:158746;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:45:\"xmartica-process-improvement-04-2048x1152.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1152;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:252244;}s:5:\"small\";a:5:{s:4:\"file\";s:42:\"xmartica-process-improvement-04-120x68.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:68;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:4159;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:43:\"xmartica-process-improvement-04-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:29824;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:35:\"xmartica-process-improvement-04.jpg\";}'), (201, 84, '_wp_attached_file', '2026/10/xmartica-process-improvement-04-1-scaled.jpg'), (202, 84, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1440;s:4:\"file\";s:52:\"2026/10/xmartica-process-improvement-04-1-scaled.jpg\";s:8:\"filesize\";i:353683;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:45:\"xmartica-process-improvement-04-1-250x141.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:141;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:11658;}s:5:\"large\";a:5:{s:4:\"file\";s:45:\"xmartica-process-improvement-04-1-700x394.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:394;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:50815;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:45:\"xmartica-process-improvement-04-1-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:8145;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:45:\"xmartica-process-improvement-04-1-768x432.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:432;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:57531;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:46:\"xmartica-process-improvement-04-1-1536x864.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:864;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:158746;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:47:\"xmartica-process-improvement-04-1-2048x1152.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1152;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:252244;}s:5:\"small\";a:5:{s:4:\"file\";s:44:\"xmartica-process-improvement-04-1-120x68.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:68;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:4159;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:45:\"xmartica-process-improvement-04-1-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:29824;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:37:\"xmartica-process-improvement-04-1.jpg\";}'), -(204, 85, '_edit_lock', '1791296184:1'), +(204, 85, '_edit_lock', '1791646959:1'), (205, 85, 'rank_math_internal_links_processed', '1'), (206, 85, '_edit_last', '1'), -(207, 85, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:100:\"¿Cuál es la diferencia entre consultoría de datos y analítica y contratar a un desarrollador BI?\";s:1:\"a\";s:278:\"Un desarrollador BI construye lo que le pides. La consultoría de datos y analítica empieza un paso antes — definiendo qué debe medirse y por qué — y termina un paso después, con el gobierno que mantiene los datos confiables a medida que más personas dependen de ellos.\";}i:1;a:2:{s:1:\"q\";s:66:\"¿Ayudan a construir la estrategia de datos o solo los dashboards?\";s:1:\"a\";s:13:\"Próximamente\";}i:2;a:2:{s:1:\"q\";s:75:\"¿Qué significa en la práctica una “analítica de datos empresarial”?\";s:1:\"a\";s:13:\"Próximamente\";}i:3;a:2:{s:1:\"q\";s:73:\"¿Cómo manejan el gobierno de datos para empresas que recién comienzan?\";s:1:\"a\";s:13:\"Próximamente\";}}'), +(207, 85, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:87:\"What\'s the difference between data analytics consulting and just hiring a BI developer?\";s:1:\"a\";s:233:\"A BI developer builds what you ask for. Data analytics consulting starts a step earlier — defining what should be measured and why — and a step later, with the governance that keeps the data trustworthy as more people rely on it.\";}i:1;a:2:{s:1:\"q\";s:60:\"Do you help build the data strategy, or only the dashboards?\";s:1:\"a\";s:226:\"Both, and we recommend starting with strategy. Our data strategy consulting defines what to measure and why before we build anything, so the dashboards and models that follow actually answer the questions leadership is asking.\";}i:2;a:2:{s:1:\"q\";s:55:\"What does \'enterprise data analytics\' mean in practice?\";s:1:\"a\";s:194:\"It means a shared, governed layer of data and reporting that every business unit can build on — instead of each team maintaining its own version of the truth in a separate spreadsheet or tool.\";}i:3;a:2:{s:1:\"q\";s:69:\"How do you handle data governance for companies just getting started?\";s:1:\"a\";s:215:\"We scale governance to where you are. Early-stage data governance consulting might mean defining basic ownership and quality checks for your three most important datasets, not a full enterprise framework on day one.\";}}'), (208, 87, '_wp_attached_file', '2026/10/xmartica-data-analytics-01-scaled.jpg'), (209, 87, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1316;s:4:\"file\";s:45:\"2026/10/xmartica-data-analytics-01-scaled.jpg\";s:8:\"filesize\";i:271886;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-01-250x128.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:128;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:7657;}s:5:\"large\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-01-700x360.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:360;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:32236;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-01-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:6009;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-01-768x395.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:395;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:36540;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:39:\"xmartica-data-analytics-01-1536x789.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:789;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:104264;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:40:\"xmartica-data-analytics-01-2048x1053.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1053;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:176871;}s:5:\"small\";a:5:{s:4:\"file\";s:37:\"xmartica-data-analytics-01-120x62.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:62;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:2957;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-01-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:19985;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:30:\"xmartica-data-analytics-01.jpg\";}'), (211, 88, '_wp_attached_file', '2026/10/xmartica-data-analytics-02-scaled.jpg'), (212, 88, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1707;s:4:\"file\";s:45:\"2026/10/xmartica-data-analytics-02-scaled.jpg\";s:8:\"filesize\";i:198479;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-02-250x167.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:167;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:6904;}s:5:\"large\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-02-700x467.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:467;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:28024;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-02-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:4550;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-02-768x512.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:512;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:31247;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:40:\"xmartica-data-analytics-02-1536x1024.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:1024;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:87736;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:40:\"xmartica-data-analytics-02-2048x1366.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1366;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:139012;}s:5:\"small\";a:5:{s:4:\"file\";s:37:\"xmartica-data-analytics-02-120x80.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:80;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:2804;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:38:\"xmartica-data-analytics-02-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:13146;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:30:\"xmartica-data-analytics-02.jpg\";}'), -(214, 89, '_edit_lock', '1791297436:1'), +(214, 89, '_edit_lock', '1791649659:1'), (215, 89, 'rank_math_internal_links_processed', '1'), (216, 89, '_edit_last', '1'), -(217, 89, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:61:\"¿Qué produce realmente la consultoría de estrategia de IA?\";s:1:\"a\";s:215:\"Un portafolio priorizado de casos de uso de IA conectados a valor de negocio, un caso de negocio para los candidatos principales, y un diseño del modelo operativo de IA que gobernará cómo se construyen y escalan.\";}i:1;a:2:{s:1:\"q\";s:63:\"¿Qué es un modelo operativo de IA y realmente lo necesitamos?\";s:1:\"a\";s:13:\"Próximamente\";}i:2;a:2:{s:1:\"q\";s:82:\"¿En qué se diferencia de contratar directamente a un proveedor de IA generativa?\";s:1:\"a\";s:13:\"Próximamente\";}i:3;a:2:{s:1:\"q\";s:72:\"¿Cómo manejan el gobierno de IA y el riesgo sin frenar todo el avance?\";s:1:\"a\";s:13:\"Próximamente\";}}'), +(217, 89, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:50:\"What does AI strategy consulting actually produce?\";s:1:\"a\";s:191:\"A prioritized portfolio of AI use cases tied to business value, a business case for the top candidates, and a design for the AI operating model that will govern how they get built and scaled.\";}i:1;a:2:{s:1:\"q\";s:57:\"What is an AI operating model, and do we really need one?\";s:1:\"a\";s:246:\"It\'s the set of roles, decision rights and review processes that govern how AI gets built, approved and monitored. Without one, AI initiatives tend to stall in ad hoc approval cycles or ship without the review higher-risk use cases actually need.\";}i:2;a:2:{s:1:\"q\";s:66:\"How is this different from hiring a generative AI vendor directly?\";s:1:\"a\";s:224:\"A vendor sells you their platform. We\'re vendor-neutral: our generative AI consulting recommends whichever model or platform fits the use case, and we stay to handle governance and integration a vendor typically won\'t cover.\";}i:3;a:2:{s:1:\"q\";s:73:\"How do you handle AI governance and risk without slowing everything down?\";s:1:\"a\";s:274:\"We design tiered review: low-risk, internal-facing use cases move through a lightweight approval path, while higher-risk or customer-facing initiatives get a deeper review. Most of our AI governance consulting work goes into defining those tiers correctly for your business.\";}}'), (218, 91, '_wp_attached_file', '2026/10/xmartica-ai-strategy-01-scaled.jpg'), (219, 91, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1707;s:4:\"file\";s:42:\"2026/10/xmartica-ai-strategy-01-scaled.jpg\";s:8:\"filesize\";i:371768;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:35:\"xmartica-ai-strategy-01-250x167.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:167;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:11982;}s:5:\"large\";a:5:{s:4:\"file\";s:35:\"xmartica-ai-strategy-01-700x467.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:467;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:54163;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:35:\"xmartica-ai-strategy-01-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:7503;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:35:\"xmartica-ai-strategy-01-768x512.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:512;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:61051;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:37:\"xmartica-ai-strategy-01-1536x1024.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:1024;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:167168;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:37:\"xmartica-ai-strategy-01-2048x1366.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1366;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:260259;}s:5:\"small\";a:5:{s:4:\"file\";s:34:\"xmartica-ai-strategy-01-120x80.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:80;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:3864;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:35:\"xmartica-ai-strategy-01-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:25118;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:27:\"xmartica-ai-strategy-01.jpg\";}'), (221, 92, '_wp_attached_file', '2026/10/xmartica-ai-strategy-02-scaled.jpg'), @@ -843,10 +884,10 @@ INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUE (227, 96, '_wp_attached_file', '2026/10/ai-strategy-why-04.svg'), (228, 97, '_wp_attached_file', '2026/10/ai-strategy-why-05.svg'), (229, 98, '_wp_attached_file', '2026/10/ai-strategy-why-06.svg'), -(230, 99, '_edit_lock', '1791298086:1'), +(230, 99, '_edit_lock', '1791652144:1'), (231, 99, 'rank_math_internal_links_processed', '1'), (232, 99, '_edit_last', '1'), -(233, 99, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:53:\"¿Qué incluyen los servicios de gestión del cambio?\";s:1:\"a\";s:221:\"Un diagnóstico de preparación al cambio, un plan de comunicación y stakeholders, programas de capacitación y adopción, y una red de agentes de cambio y líderes alineados que sostienen el cambio después del go-live.\";}i:1;a:2:{s:1:\"q\";s:52:\"¿En qué se diferencia de un plan de comunicación?\";s:1:\"a\";s:13:\"Próximamente\";}i:2;a:2:{s:1:\"q\";s:107:\"¿Manejan la gestión del cambio específicamente para transformación digital y despliegues tecnológicos?\";s:1:\"a\";s:13:\"Próximamente\";}i:3;a:2:{s:1:\"q\";s:68:\"¿Cómo miden si la gestión del cambio realmente está funcionando?\";s:1:\"a\";s:13:\"Próximamente\";}}'), +(233, 99, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:46:\"What\'s included in change management services?\";s:1:\"a\";s:192:\"A change readiness assessment, a communication and stakeholder plan, training and adoption programs, and a network of change champions and aligned leaders who sustain the change after go-live.\";}i:1;a:2:{s:1:\"q\";s:77:\"How is organizational change management different from a communications plan?\";s:1:\"a\";s:286:\"A communications plan is one piece of it. Organizational change management also covers training, leadership alignment, culture and a network of champions inside the business — the parts that determine whether people actually change how they work, not just whether they heard about it.\";}i:2;a:2:{s:1:\"q\";s:96:\"Do you handle change management for digital transformation and technology rollouts specifically?\";s:1:\"a\";s:211:\"Yes — digital transformation change management is one of our most common engagement types. We time the readiness assessment, training and champion network to land alongside the technical go-live, not after it.\";}i:3;a:2:{s:1:\"q\";s:65:\"How do you measure whether change management is actually working?\";s:1:\"a\";s:224:\"We track adoption metrics — usage rates, readiness scores, feedback from the champion network — the same way we\'d track any other operational KPI, instead of relying on anecdotal sentiment from a handful of stakeholders.\";}}'), (234, 101, '_wp_attached_file', '2026/10/xmartica-change-management-01-scaled.jpg'), (235, 101, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:1707;s:6:\"height\";i:2560;s:4:\"file\";s:48:\"2026/10/xmartica-change-management-01-scaled.jpg\";s:8:\"filesize\";i:588880;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:41:\"xmartica-change-management-01-250x375.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:375;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:28641;}s:5:\"large\";a:5:{s:4:\"file\";s:42:\"xmartica-change-management-01-700x1050.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:1050;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:142044;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:41:\"xmartica-change-management-01-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:8607;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:42:\"xmartica-change-management-01-768x1152.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:1152;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:162555;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:43:\"xmartica-change-management-01-1024x1536.jpg\";s:5:\"width\";i:1024;s:6:\"height\";i:1536;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:256775;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:43:\"xmartica-change-management-01-1366x2048.jpg\";s:5:\"width\";i:1366;s:6:\"height\";i:2048;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:414335;}s:5:\"small\";a:5:{s:4:\"file\";s:41:\"xmartica-change-management-01-120x180.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:180;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:8789;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:41:\"xmartica-change-management-01-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:26595;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:33:\"xmartica-change-management-01.jpg\";}'), (237, 102, '_wp_attached_file', '2026/10/xmartica-change-management-02-scaled.jpg'), @@ -857,11 +898,12 @@ INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUE (243, 106, '_wp_attached_file', '2026/10/change-management-why-04.svg'), (244, 107, '_wp_attached_file', '2026/10/change-management-why-05.svg'), (245, 108, '_wp_attached_file', '2026/10/change-management-why-06.svg'), -(246, 109, '_edit_lock', '1791300174:1'), +(246, 109, '_edit_lock', '1791652540:1'), (247, 109, 'rank_math_internal_links_processed', '1'), (248, 109, '_edit_last', '1'), -(249, 109, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:89:\"¿Cuál es la diferencia entre estrategia de experiencia de cliente y consultoría de CX?\";s:1:\"a\";s:258:\"Están muy relacionadas — la estrategia de experiencia de cliente es el plan: el rediseño del recorrido, las prioridades y el caso de negocio. La consultoría de CX es el trabajo de asesoría más amplio que produce ese plan y luego ayuda a implementarlo.\";}i:1;a:2:{s:1:\"q\";s:88:\"¿Se enfocan en la experiencia digital o también en canales presenciales y de servicio?\";s:1:\"a\";s:13:\"Próximamente\";}i:2;a:2:{s:1:\"q\";s:96:\"¿Cómo se conecta la estrategia de CX con los ingresos y no solo con puntajes de satisfacción?\";s:1:\"a\";s:13:\"Próximamente\";}i:3;a:2:{s:1:\"q\";s:81:\"¿Ayudan a rediseñar programas de lealtad o solo el recorrido de compra inicial?\";s:1:\"a\";s:13:\"Próximamente\";}}'), -(250, 111, '_wp_attached_file', '2026/10/xmartica-customer-experience-01-scaled.jpg'), +(249, 109, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:77:\"What\'s the difference between customer experience strategy and CX consulting?\";s:1:\"a\";s:217:\"They\'re closely related — customer experience strategy is the plan: the journey redesign, priorities and business case. CX consulting is the broader advisory work that produces that plan and then helps implement it.\";}i:1;a:2:{s:1:\"q\";s:84:\"Do you focus on digital customer experience, or also in-person and service channels?\";s:1:\"a\";s:222:\"Both. Digital customer experience consulting covers web, app and self-service channels, but we design the strategy around the full journey — including sales and service interactions that stay human even as digital grows.\";}i:2;a:2:{s:1:\"q\";s:87:\"How does customer experience strategy connect to revenue, not just satisfaction scores?\";s:1:\"a\";s:245:\"We tie journey redesigns to specific retention, conversion and loyalty metrics from the start, and connect the customer experience work to the sales and commercial model — the parts of the business that translate a better journey into revenue.\";}i:3;a:2:{s:1:\"q\";s:74:\"Do you help redesign loyalty programs, or just the initial buying journey?\";s:1:\"a\";s:232:\"Both — our customer loyalty consulting covers retention and loyalty program design as its own workstream, alongside the acquisition and buying journey, because the two need to be designed together to actually reinforce each other.\";}}'), +(250, 111, '_wp_attached_file', '2026/10/xmartica-customer-experience-01-scaled.jpg'); +INSERT INTO `xm_aca_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUES (251, 111, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1440;s:4:\"file\";s:50:\"2026/10/xmartica-customer-experience-01-scaled.jpg\";s:8:\"filesize\";i:460439;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-01-250x141.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:141;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:10500;}s:5:\"large\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-01-700x394.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:394;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:56727;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-01-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:7231;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-01-768x432.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:432;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:65835;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:44:\"xmartica-customer-experience-01-1536x864.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:864;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:202609;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:45:\"xmartica-customer-experience-01-2048x1152.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1152;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:320006;}s:5:\"small\";a:5:{s:4:\"file\";s:42:\"xmartica-customer-experience-01-120x68.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:68;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:3404;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-01-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:32156;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:65:\"Business partners working together after a presentation in office\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:55:\"Business partners working together after a presentation\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:49:{i:0;s:6:\"people\";i:1;s:3:\"man\";i:2;s:8:\"business\";i:3;s:11:\"businessman\";i:4;s:5:\"young\";i:5;s:6:\"person\";i:6;s:9:\"caucasian\";i:7;s:6:\"office\";i:8;s:4:\"work\";i:9;s:7:\"working\";i:10;s:5:\"adult\";i:11;s:6:\"casual\";i:12;s:12:\"professional\";i:13;s:6:\"worker\";i:14;s:5:\"place\";i:15;s:3:\"job\";i:16;s:7:\"indoors\";i:17;s:11:\"negotiation\";i:18;s:17:\"business district\";i:19;s:7:\"startup\";i:20;s:13:\"businesswoman\";i:21;s:7:\"project\";i:22;s:5:\"woman\";i:23;s:5:\"start\";i:24;s:2:\"up\";i:25;s:5:\"group\";i:26;s:4:\"team\";i:27;s:7:\"meeting\";i:28;s:10:\"discussion\";i:29;s:9:\"coworking\";i:30;s:9:\"workplace\";i:31;s:7:\"smiling\";i:32;s:15:\"business people\";i:33;s:5:\"staff\";i:34;s:8:\"teamwork\";i:35;s:3:\"ceo\";i:36;s:12:\"office smart\";i:37;s:14:\"office meeting\";i:38;s:19:\"worker professional\";i:39;s:12:\"adult people\";i:40;s:13:\"people worker\";i:41;s:15:\"finance company\";i:42;s:19:\"professional worker\";i:43;s:4:\"suit\";i:44;s:8:\"strategy\";i:45;s:7:\"discuss\";i:46;s:10:\"investment\";i:47;s:7:\"company\";i:48;s:13:\"communication\";}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:35:\"xmartica-customer-experience-01.jpg\";}'), (253, 112, '_wp_attached_file', '2026/10/xmartica-customer-experience-02-scaled.jpg'), (254, 112, '_wp_attachment_metadata', 'a:7:{s:5:\"width\";i:2560;s:6:\"height\";i:1440;s:4:\"file\";s:50:\"2026/10/xmartica-customer-experience-02-scaled.jpg\";s:8:\"filesize\";i:353683;s:5:\"sizes\";a:8:{s:6:\"medium\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-02-250x141.jpg\";s:5:\"width\";i:250;s:6:\"height\";i:141;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:11658;}s:5:\"large\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-02-700x394.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:394;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:50815;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-02-150x150.jpg\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:8145;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-02-768x432.jpg\";s:5:\"width\";i:768;s:6:\"height\";i:432;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:57531;}s:9:\"1536x1536\";a:5:{s:4:\"file\";s:44:\"xmartica-customer-experience-02-1536x864.jpg\";s:5:\"width\";i:1536;s:6:\"height\";i:864;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:158746;}s:9:\"2048x2048\";a:5:{s:4:\"file\";s:45:\"xmartica-customer-experience-02-2048x1152.jpg\";s:5:\"width\";i:2048;s:6:\"height\";i:1152;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:252244;}s:5:\"small\";a:5:{s:4:\"file\";s:42:\"xmartica-customer-experience-02-120x68.jpg\";s:5:\"width\";i:120;s:6:\"height\";i:68;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:4159;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:43:\"xmartica-customer-experience-02-700x200.jpg\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:10:\"image/jpeg\";s:8:\"filesize\";i:29824;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}s:14:\"original_image\";s:35:\"xmartica-customer-experience-02.jpg\";}'), @@ -902,8 +944,7 @@ INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUE (290, 133, '_wp_attached_file', '2026/10/interna-02-e.svg'), (291, 133, '_wp_attachment_metadata', 'a:1:{s:8:\"filesize\";i:5766;}'), (292, 134, '_wp_attached_file', '2026/10/interna-02-f.svg'), -(293, 134, '_wp_attachment_metadata', 'a:1:{s:8:\"filesize\";i:7462;}'); -INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUES +(293, 134, '_wp_attachment_metadata', 'a:1:{s:8:\"filesize\";i:7462;}'), (294, 135, '_wp_attached_file', '2026/10/interna-02-01-a.svg'), (295, 135, '_wp_attachment_metadata', 'a:1:{s:8:\"filesize\";i:2539;}'), (296, 136, '_wp_attached_file', '2026/10/interna-02-01-b.svg'), @@ -986,15 +1027,215 @@ INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUE (378, 175, '_wp_attached_file', '2026/10/interna-02-02d.svg'), (379, 175, '_wp_attachment_metadata', 'a:1:{s:8:\"filesize\";i:6083;}'), (380, 176, '_wp_attached_file', '2026/10/img-consultoria-de-mejora-de-procesos-01.png'), -(381, 176, '_wp_attachment_metadata', 'a:6:{s:5:\"width\";i:1436;s:6:\"height\";i:926;s:4:\"file\";s:52:\"2026/10/img-consultoria-de-mejora-de-procesos-01.png\";s:8:\"filesize\";i:1587169;s:5:\"sizes\";a:6:{s:6:\"medium\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-250x161.png\";s:5:\"width\";i:250;s:6:\"height\";i:161;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:51752;}s:5:\"large\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-700x451.png\";s:5:\"width\";i:700;s:6:\"height\";i:451;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:353387;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-150x150.png\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:32036;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-768x495.png\";s:5:\"width\";i:768;s:6:\"height\";i:495;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:425411;}s:5:\"small\";a:5:{s:4:\"file\";s:51:\"img-consultoria-de-mejora-de-procesos-01-120x77.png\";s:5:\"width\";i:120;s:6:\"height\";i:77;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:14160;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-700x200.png\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:166902;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}}'); +(381, 176, '_wp_attachment_metadata', 'a:6:{s:5:\"width\";i:1436;s:6:\"height\";i:926;s:4:\"file\";s:52:\"2026/10/img-consultoria-de-mejora-de-procesos-01.png\";s:8:\"filesize\";i:1587169;s:5:\"sizes\";a:6:{s:6:\"medium\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-250x161.png\";s:5:\"width\";i:250;s:6:\"height\";i:161;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:51752;}s:5:\"large\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-700x451.png\";s:5:\"width\";i:700;s:6:\"height\";i:451;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:353387;}s:9:\"thumbnail\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-150x150.png\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:32036;}s:12:\"medium_large\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-768x495.png\";s:5:\"width\";i:768;s:6:\"height\";i:495;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:425411;}s:5:\"small\";a:5:{s:4:\"file\";s:51:\"img-consultoria-de-mejora-de-procesos-01-120x77.png\";s:5:\"width\";i:120;s:6:\"height\";i:77;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:14160;}s:11:\"custom-size\";a:5:{s:4:\"file\";s:52:\"img-consultoria-de-mejora-de-procesos-01-700x200.png\";s:5:\"width\";i:700;s:6:\"height\";i:200;s:9:\"mime-type\";s:9:\"image/png\";s:8:\"filesize\";i:166902;}}s:10:\"image_meta\";a:13:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}s:3:\"alt\";s:0:\"\";}}'), +(388, 180, '_wp_page_template', 'default'), +(389, 180, '_edit_lock', '1791568783:1'), +(401, 184, '_wp_page_template', 'default'), +(402, 184, '_edit_lock', '1791588838:1'), +(403, 184, 'rank_math_internal_links_processed', '1'), +(404, 184, '_edit_last', '1'), +(405, 184, '_wp_faq_schema', 'a:5:{i:0;a:2:{s:1:\"q\";s:57:\"¿Qué es la consultoría de transformación empresarial?\";s:1:\"a\";s:288:\"Es la disciplina de rediseñar cómo opera una organización — su estrategia, modelo operativo, procesos, tecnología y personas — para que rinda mejor y ejecute más rápido. Trabajamos en las siete áreas de práctica para llevar a una empresa de donde está a donde necesita estar.\";}i:1;a:2:{s:1:\"q\";s:54:\"¿Cuánto dura un proyecto de transformación digital?\";s:1:\"a\";s:13:\"Próximamente\";}i:2;a:2:{s:1:\"q\";s:59:\"¿Trabajan con empresas de todos los tamaños e industrias?\";s:1:\"a\";s:13:\"Próximamente\";}i:3;a:2:{s:1:\"q\";s:58:\"¿Cómo ayudan a adoptar IA sin interrumpir la operación?\";s:1:\"a\";s:13:\"Próximamente\";}i:4;a:2:{s:1:\"q\";s:60:\"¿Cómo se mide el éxito en un proyecto de transformación?\";s:1:\"a\";s:13:\"Próximamente\";}}'), +(406, 186, '_menu_item_type', 'post_type'), +(407, 186, '_menu_item_menu_item_parent', '21'), +(408, 186, '_menu_item_object_id', '60'), +(409, 186, '_menu_item_object', 'page'), +(410, 186, '_menu_item_target', ''), +(411, 186, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(412, 186, '_menu_item_xfn', ''), +(413, 186, '_menu_item_url', ''), +(415, 187, '_menu_item_type', 'post_type'), +(416, 187, '_menu_item_menu_item_parent', '21'), +(417, 187, '_menu_item_object_id', '75'), +(418, 187, '_menu_item_object', 'page'), +(419, 187, '_menu_item_target', ''), +(420, 187, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(421, 187, '_menu_item_xfn', ''), +(422, 187, '_menu_item_url', ''), +(424, 188, '_menu_item_type', 'post_type'), +(425, 188, '_menu_item_menu_item_parent', '21'), +(426, 188, '_menu_item_object_id', '78'), +(427, 188, '_menu_item_object', 'page'), +(428, 188, '_menu_item_target', ''), +(429, 188, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(430, 188, '_menu_item_xfn', ''), +(431, 188, '_menu_item_url', ''), +(433, 189, '_menu_item_type', 'post_type'), +(434, 189, '_menu_item_menu_item_parent', '21'), +(435, 189, '_menu_item_object_id', '85'), +(436, 189, '_menu_item_object', 'page'), +(437, 189, '_menu_item_target', ''), +(438, 189, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(439, 189, '_menu_item_xfn', ''), +(440, 189, '_menu_item_url', ''), +(442, 190, '_menu_item_type', 'post_type'), +(443, 190, '_menu_item_menu_item_parent', '21'), +(444, 190, '_menu_item_object_id', '89'), +(445, 190, '_menu_item_object', 'page'), +(446, 190, '_menu_item_target', ''), +(447, 190, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(448, 190, '_menu_item_xfn', ''), +(449, 190, '_menu_item_url', ''), +(451, 191, '_menu_item_type', 'post_type'), +(452, 191, '_menu_item_menu_item_parent', '21'), +(453, 191, '_menu_item_object_id', '99'), +(454, 191, '_menu_item_object', 'page'), +(455, 191, '_menu_item_target', ''), +(456, 191, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(457, 191, '_menu_item_xfn', ''), +(458, 191, '_menu_item_url', ''), +(460, 192, '_menu_item_type', 'post_type'), +(461, 192, '_menu_item_menu_item_parent', '21'), +(462, 192, '_menu_item_object_id', '109'), +(463, 192, '_menu_item_object', 'page'), +(464, 192, '_menu_item_target', ''), +(465, 192, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(466, 192, '_menu_item_xfn', ''), +(467, 192, '_menu_item_url', ''), +(469, 21, '_wp_old_date', '2026-10-01'), +(470, 22, '_wp_old_date', '2026-10-01'), +(471, 193, '_menu_item_type', 'post_type'), +(472, 193, '_menu_item_menu_item_parent', '0'), +(473, 193, '_menu_item_object_id', '184'), +(474, 193, '_menu_item_object', 'page'), +(475, 193, '_menu_item_target', ''), +(476, 193, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(477, 193, '_menu_item_xfn', ''), +(478, 193, '_menu_item_url', ''), +(479, 193, '_menu_item_orphaned', '1791584721'), +(480, 194, '_menu_item_type', 'custom'), +(481, 194, '_menu_item_menu_item_parent', '0'), +(482, 194, '_menu_item_object_id', '194'), +(483, 194, '_menu_item_object', 'custom'), +(484, 194, '_menu_item_target', ''), +(485, 194, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(486, 194, '_menu_item_xfn', ''), +(487, 194, '_menu_item_url', '#'), +(489, 195, '_menu_item_type', 'custom'), +(490, 195, '_menu_item_menu_item_parent', '0'), +(491, 195, '_menu_item_object_id', '195'), +(492, 195, '_menu_item_object', 'custom'), +(493, 195, '_menu_item_target', ''), +(494, 195, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(495, 195, '_menu_item_xfn', ''), +(496, 195, '_menu_item_url', '#'), +(498, 196, '_menu_item_type', 'post_type'), +(499, 196, '_menu_item_menu_item_parent', '194'), +(500, 196, '_menu_item_object_id', '109'), +(501, 196, '_menu_item_object', 'page'), +(502, 196, '_menu_item_target', ''), +(503, 196, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(504, 196, '_menu_item_xfn', ''), +(505, 196, '_menu_item_url', ''), +(507, 197, '_menu_item_type', 'post_type'), +(508, 197, '_menu_item_menu_item_parent', '194'), +(509, 197, '_menu_item_object_id', '99'), +(510, 197, '_menu_item_object', 'page'), +(511, 197, '_menu_item_target', ''), +(512, 197, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(513, 197, '_menu_item_xfn', ''), +(514, 197, '_menu_item_url', ''), +(516, 198, '_menu_item_type', 'post_type'), +(517, 198, '_menu_item_menu_item_parent', '194'), +(518, 198, '_menu_item_object_id', '89'), +(519, 198, '_menu_item_object', 'page'), +(520, 198, '_menu_item_target', ''), +(521, 198, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(522, 198, '_menu_item_xfn', ''), +(523, 198, '_menu_item_url', ''), +(525, 199, '_menu_item_type', 'post_type'), +(526, 199, '_menu_item_menu_item_parent', '194'), +(527, 199, '_menu_item_object_id', '85'), +(528, 199, '_menu_item_object', 'page'), +(529, 199, '_menu_item_target', ''), +(530, 199, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(531, 199, '_menu_item_xfn', ''), +(532, 199, '_menu_item_url', ''), +(534, 200, '_menu_item_type', 'post_type'), +(535, 200, '_menu_item_menu_item_parent', '194'), +(536, 200, '_menu_item_object_id', '78'), +(537, 200, '_menu_item_object', 'page'), +(538, 200, '_menu_item_target', ''), +(539, 200, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(540, 200, '_menu_item_xfn', ''), +(541, 200, '_menu_item_url', ''), +(543, 201, '_menu_item_type', 'post_type'), +(544, 201, '_menu_item_menu_item_parent', '194'), +(545, 201, '_menu_item_object_id', '75'), +(546, 201, '_menu_item_object', 'page'), +(547, 201, '_menu_item_target', ''), +(548, 201, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(549, 201, '_menu_item_xfn', ''), +(550, 201, '_menu_item_url', ''), +(552, 202, '_menu_item_type', 'post_type'), +(553, 202, '_menu_item_menu_item_parent', '194'), +(554, 202, '_menu_item_object_id', '60'), +(555, 202, '_menu_item_object', 'page'), +(556, 202, '_menu_item_target', ''), +(557, 202, '_menu_item_classes', 'a:1:{i:0;s:0:\"\";}'), +(558, 202, '_menu_item_xfn', ''), +(559, 202, '_menu_item_url', ''), +(561, 203, '_form', '
\n\n\n\n\n\n\n\n\n\n\n\n[submit \"Send message\"]\n\n
'), +(562, 203, '_mail', 'a:9:{s:6:\"active\";b:1;s:7:\"subject\";s:50:\"[_site_title] New contact request from [your-name]\";s:6:\"sender\";s:38:\"[_site_title] \";s:9:\"recipient\";s:19:\"[_site_admin_email]\";s:4:\"body\";s:200:\"Name: [your-name]\nWork email: [your-email]\nCompany: [your-company]\nArea of interest: [interest]\n\nMessage:\n[your-message]\n\n--\nThis message was sent from the contact form on [_site_title] ([_site_url]).\";s:18:\"additional_headers\";s:22:\"Reply-To: [your-email]\";s:11:\"attachments\";s:0:\"\";s:8:\"use_html\";b:1;s:13:\"exclude_blank\";b:1;}'), +(563, 203, '_mail_2', 'a:9:{s:6:\"active\";b:0;s:7:\"subject\";s:30:\"[_site_title] \"[your-subject]\"\";s:6:\"sender\";s:38:\"[_site_title] \";s:9:\"recipient\";s:12:\"[your-email]\";s:4:\"body\";s:220:\"Message Body:\n[your-message]\n\n-- \nThis email is a receipt for your contact form submission on our website ([_site_title] [_site_url]) in which your email address was used. If that was not you, please ignore this message.\";s:18:\"additional_headers\";s:29:\"Reply-To: [_site_admin_email]\";s:11:\"attachments\";s:0:\"\";s:8:\"use_html\";b:1;s:13:\"exclude_blank\";b:1;}'), +(564, 203, '_messages', 'a:22:{s:12:\"mail_sent_ok\";s:65:\"Thanks — your message has been sent. We\'ll be in touch shortly.\";s:12:\"mail_sent_ng\";s:71:\"There was an error trying to send your message. Please try again later.\";s:16:\"validation_error\";s:61:\"One or more fields have an error. Please check and try again.\";s:4:\"spam\";s:71:\"There was an error trying to send your message. Please try again later.\";s:12:\"accept_terms\";s:69:\"You must accept the terms and conditions before sending your message.\";s:16:\"invalid_required\";s:27:\"Please fill out this field.\";s:16:\"invalid_too_long\";s:32:\"This field has a too long input.\";s:17:\"invalid_too_short\";s:33:\"This field has a too short input.\";s:13:\"upload_failed\";s:46:\"There was an unknown error uploading the file.\";s:24:\"upload_file_type_invalid\";s:49:\"You are not allowed to upload files of this type.\";s:21:\"upload_file_too_large\";s:31:\"The uploaded file is too large.\";s:23:\"upload_failed_php_error\";s:38:\"There was an error uploading the file.\";s:12:\"invalid_date\";s:41:\"Please enter a date in YYYY-MM-DD format.\";s:14:\"date_too_early\";s:32:\"This field has a too early date.\";s:13:\"date_too_late\";s:31:\"This field has a too late date.\";s:14:\"invalid_number\";s:22:\"Please enter a number.\";s:16:\"number_too_small\";s:34:\"This field has a too small number.\";s:16:\"number_too_large\";s:34:\"This field has a too large number.\";s:23:\"quiz_answer_not_correct\";s:36:\"The answer to the quiz is incorrect.\";s:13:\"invalid_email\";s:30:\"Please enter an email address.\";s:11:\"invalid_url\";s:19:\"Please enter a URL.\";s:11:\"invalid_tel\";s:32:\"Please enter a telephone number.\";}'), +(565, 203, '_additional_settings', ''), +(566, 203, '_locale', 'en_US'), +(567, 203, '_hash', 'f727e0f56cf3dbf6fbd2c0278651c07b5018b4f48bcd08b261be0ca4dbabff57'), +(568, 3, '_wp_trash_meta_status', 'draft'), +(569, 3, '_wp_trash_meta_time', '1791590567'), +(570, 3, '_wp_desired_post_slug', 'politica-privacidad'), +(571, 205, '_edit_lock', '1791648493:1'), +(572, 205, 'rank_math_internal_links_processed', '1'), +(573, 205, '_edit_last', '1'), +(574, 205, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:66:\"¿Qué hace realmente un consultor de transformación empresarial?\";s:1:\"a\";s:294:\"Un consultor de transformación empresarial diagnostica cómo opera actualmente la organización, diseña el modelo operativo objetivo y el roadmap, y luego trabaja junto a tus equipos para implementarlo — cubriendo estrategia, procesos, tecnología, datos y gestión del cambio en el camino.\";}i:1;a:2:{s:1:\"q\";s:67:\"¿En qué se diferencia de la consultoría de gestión tradicional?\";s:1:\"a\";s:309:\"La consultoría de gestión tradicional suele detenerse en la estrategia y el análisis. La consultoría de transformación empresarial va más allá — incluye diseñar el modelo operativo, rediseñar procesos y tecnología, y acompañar la implementación para que las recomendaciones realmente se adopten.\";}i:2;a:2:{s:1:\"q\";s:74:\"¿Qué incluyen sus servicios de asesoría en transformación empresarial?\";s:1:\"a\";s:269:\"Nuestros servicios de asesoría en transformación empresarial abarcan diagnóstico, estrategia de transformación, modelo operativo y diseño organizacional, rediseño de procesos, gobierno y una PMO de transformación — de forma individual o como programa completo.\";}i:3;a:2:{s:1:\"q\";s:65:\"¿Trabajan con empresas medianas o solo con grandes corporativos?\";s:1:\"a\";s:259:\"Ambos. Como firma de consultoría de transformación empresarial, ajustamos el equipo y el alcance del proyecto tanto para empresas de mercado medio en su primera transformación estructurada como para grandes corporativos que coordinan programas multi-país.\";}}'), +(575, 207, '_edit_lock', '1791648609:1'), +(576, 207, 'rank_math_internal_links_processed', '1'), +(577, 207, '_edit_last', '1'), +(578, 207, '_wp_faq_schema', 'a:5:{i:0;a:2:{s:1:\"q\";s:68:\"¿Qué incluye realmente la consultoría de transformación digital?\";s:1:\"a\";s:248:\"Generalmente incluye un diagnóstico de madurez digital, un roadmap priorizado y apoyo en la implementación de tecnología, procesos y gestión del cambio — desde decisiones de nube y ERP hasta cómo los equipos adoptan nuevas formas de trabajo.\";}i:1;a:2:{s:1:\"q\";s:57:\"¿En qué se diferencia del consulting de TI tradicional?\";s:1:\"a\";s:292:\"El consulting de TI suele enfocarse en un sistema o proyecto de infraestructura específico. El digital transformation management consulting analiza todo el modelo operativo — estrategia, proceso, tecnología y personas — para que el cambio perdure más allá de una sola implementación.\";}i:2;a:2:{s:1:\"q\";s:61:\"¿Ofrecen servicios para industrias específicas, como salud?\";s:1:\"a\";s:205:\"Sí. Apoyamos proyectos de transformación digital en salud junto con programas en servicios financieros, retail y manufactura, adaptando el roadmap a la realidad regulatoria y operativa de cada industria.\";}i:3;a:2:{s:1:\"q\";s:62:\"¿Cuánto dura un programa típico de transformación digital?\";s:1:\"a\";s:191:\"Un diagnóstico de madurez y roadmap puede tomar algunas semanas. Los programas a nivel empresa — que abarcan nube, ERP y cambio de procesos — suelen correr en fases durante 6 a 18 meses.\";}i:4;a:2:{s:1:\"q\";s:64:\"¿Lideran el proyecto o trabajan junto a nuestro equipo interno?\";s:1:\"a\";s:245:\"Ambos. Algunos clientes quieren que lideremos todo el proyecto de consultoría de transformación digital; otros prefieren un equipo especialista integrado junto a su PMO interna. Definimos el modelo de trabajo según lo que ya tengas en marcha.\";}}'), +(579, 205, '_wp_page_template', 'default'), +(580, 207, '_wp_page_template', 'default'), +(581, 211, '_edit_lock', '1791649185:1'), +(582, 211, 'rank_math_internal_links_processed', '1'), +(583, 211, '_edit_last', '1'), +(584, 211, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:84:\"¿Cuál es la diferencia entre consultoría de mejora de procesos y automatización?\";s:1:\"a\";s:335:\"La consultoría de mejora de procesos rediseña cómo fluye el trabajo de extremo a extremo, incluyendo los pasos manuales. La automatización, que definimos como parte del trabajo, reemplaza pasos específicos con software — y la recomendamos solo cuando el proceso subyacente es lo suficientemente eficiente como para justificarla.\";}i:1;a:2:{s:1:\"q\";s:52:\"¿Usan process mining o solo entrevistas y talleres?\";s:1:\"a\";s:278:\"Ambos. Los talleres nos dan contexto; el process mining nos da evidencia — timestamps y datos de sistema reales que muestran dónde realmente se frena un proceso. Incorporamos process mining cuando el proceso es lo suficientemente complejo o de alto volumen para justificarlo.\";}i:2;a:2:{s:1:\"q\";s:89:\"¿En qué se diferencian de los programas de mejora continua que ya tenemos internamente?\";s:1:\"a\";s:275:\"La consultoría de mejora continua de XmartETS complementa los programas internos — aportamos capacidad de diagnóstico externa, process mining y experiencia en automatización que tu equipo interno puede no tener, y luego entregamos las rutinas necesarias para sostenerlo.\";}i:3;a:2:{s:1:\"q\";s:74:\"¿Cómo aseguran que las mejoras no retrocedan tras finalizar el proyecto?\";s:1:\"a\";s:201:\"Cada proyecto incluye un componente de consultoría de mejora del desempeño — KPIs, metas y rutinas de gestión — para que la nueva forma de trabajar se mida y refuerce después de que terminemos.\";}}'), +(585, 213, '_edit_lock', '1791647971:1'), +(586, 213, 'rank_math_internal_links_processed', '1'), +(587, 213, '_edit_last', '1'), +(588, 213, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:100:\"¿Cuál es la diferencia entre consultoría de datos y analítica y contratar a un desarrollador BI?\";s:1:\"a\";s:278:\"Un desarrollador BI construye lo que le pides. La consultoría de datos y analítica empieza un paso antes — definiendo qué debe medirse y por qué — y termina un paso después, con el gobierno que mantiene los datos confiables a medida que más personas dependen de ellos.\";}i:1;a:2:{s:1:\"q\";s:66:\"¿Ayudan a construir la estrategia de datos o solo los dashboards?\";s:1:\"a\";s:267:\"Ambas cosas, y recomendamos empezar por la estrategia. Nuestra consultoría de estrategia de datos define qué medir y por qué antes de construir nada, para que los dashboards y modelos que siguen realmente respondan las preguntas que el liderazgo se está haciendo.\";}i:2;a:2:{s:1:\"q\";s:71:\"¿Qué significa en la práctica una \'analítica de datos empresarial\'?\";s:1:\"a\";s:234:\"Significa una capa compartida y gobernada de datos y reportes sobre la que cada unidad de negocio puede construir — en lugar de que cada equipo mantenga su propia versión de la verdad en una hoja de cálculo o herramienta distinta.\";}i:3;a:2:{s:1:\"q\";s:73:\"¿Cómo manejan el gobierno de datos para empresas que recién comienzan?\";s:1:\"a\";s:269:\"Escalamos el gobierno según tu etapa. La consultoría de gobierno de datos en una etapa temprana puede significar definir propiedad básica y controles de calidad para tus tres conjuntos de datos más importantes, no un marco empresarial completo desde el primer día.\";}}'), +(589, 215, '_edit_lock', '1791649544:1'), +(590, 215, 'rank_math_internal_links_processed', '1'), +(591, 215, '_edit_last', '1'), +(592, 215, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:61:\"¿Qué produce realmente la consultoría de estrategia de IA?\";s:1:\"a\";s:215:\"Un portafolio priorizado de casos de uso de IA conectados a valor de negocio, un caso de negocio para los candidatos principales, y un diseño del modelo operativo de IA que gobernará cómo se construyen y escalan.\";}i:1;a:2:{s:1:\"q\";s:63:\"¿Qué es un modelo operativo de IA y realmente lo necesitamos?\";s:1:\"a\";s:302:\"Es el conjunto de roles, derechos de decisión y procesos de revisión que gobiernan cómo se construye, aprueba y monitorea la IA. Sin uno, las iniciativas de IA tienden a estancarse en ciclos de aprobación improvisados o a lanzarse sin la revisión que los casos de mayor riesgo realmente necesitan.\";}i:2;a:2:{s:1:\"q\";s:82:\"¿En qué se diferencia de contratar directamente a un proveedor de IA generativa?\";s:1:\"a\";s:276:\"Un proveedor te vende su plataforma. Nosotros somos independientes de proveedor: nuestra consultoría de IA generativa recomienda el modelo o plataforma que se ajusta al caso de uso, y nos quedamos para manejar el gobierno e integración que un proveedor normalmente no cubre.\";}i:3;a:2:{s:1:\"q\";s:72:\"¿Cómo manejan el gobierno de IA y el riesgo sin frenar todo el avance?\";s:1:\"a\";s:353:\"Diseñamos una revisión escalonada: los casos de uso internos de bajo riesgo avanzan por un camino de aprobación ligero, mientras que las iniciativas de mayor riesgo o de cara al cliente reciben una revisión más profunda. Gran parte de nuestro trabajo de consultoría de gobierno de IA consiste en definir correctamente esos niveles para tu negocio.\";}}'), +(593, 217, '_edit_lock', '1791653404:1'), +(594, 217, 'rank_math_internal_links_processed', '1'), +(595, 217, '_edit_last', '1'), +(596, 217, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:53:\"¿Qué incluyen los servicios de gestión del cambio?\";s:1:\"a\";s:221:\"Un diagnóstico de preparación al cambio, un plan de comunicación y stakeholders, programas de capacitación y adopción, y una red de agentes de cambio y líderes alineados que sostienen el cambio después del go-live.\";}i:1;a:2:{s:1:\"q\";s:52:\"¿En qué se diferencia de un plan de comunicación?\";s:1:\"a\";s:306:\"Un plan de comunicación es solo una parte. La gestión del cambio organizacional también cubre capacitación, alineación de liderazgo, cultura y una red de agentes de cambio dentro del negocio — las partes que determinan si las personas realmente cambian su forma de trabajar, no solo si se enteraron.\";}i:2;a:2:{s:1:\"q\";s:107:\"¿Manejan la gestión del cambio específicamente para transformación digital y despliegues tecnológicos?\";s:1:\"a\";s:269:\"Sí — la gestión del cambio en transformación digital es uno de nuestros tipos de proyecto más frecuentes. Sincronizamos el diagnóstico de preparación, la capacitación y la red de agentes de cambio para que coincidan con el go-live técnico, no después de él.\";}i:3;a:2:{s:1:\"q\";s:68:\"¿Cómo miden si la gestión del cambio realmente está funcionando?\";s:1:\"a\";s:283:\"Damos seguimiento a métricas de adopción — tasas de uso, puntajes de preparación, retroalimentación de la red de agentes de cambio — de la misma forma que seguiríamos cualquier otro KPI operativo, en lugar de basarnos en percepciones anecdóticas de unos pocos stakeholders.\";}}'), +(597, 219, '_edit_lock', '1791653282:1'), +(598, 219, 'rank_math_internal_links_processed', '1'), +(599, 219, '_edit_last', '1'), +(600, 219, '_wp_faq_schema', 'a:4:{i:0;a:2:{s:1:\"q\";s:89:\"¿Cuál es la diferencia entre estrategia de experiencia de cliente y consultoría de CX?\";s:1:\"a\";s:258:\"Están muy relacionadas — la estrategia de experiencia de cliente es el plan: el rediseño del recorrido, las prioridades y el caso de negocio. La consultoría de CX es el trabajo de asesoría más amplio que produce ese plan y luego ayuda a implementarlo.\";}i:1;a:2:{s:1:\"q\";s:88:\"¿Se enfocan en la experiencia digital o también en canales presenciales y de servicio?\";s:1:\"a\";s:267:\"Ambos. La consultoría de experiencia digital de cliente cubre canales web, app y autoservicio, pero diseñamos la estrategia alrededor del recorrido completo — incluyendo interacciones de ventas y servicio que siguen siendo humanas incluso cuando lo digital crece.\";}i:2;a:2:{s:1:\"q\";s:96:\"¿Cómo se conecta la estrategia de CX con los ingresos y no solo con puntajes de satisfacción?\";s:1:\"a\";s:278:\"Conectamos los rediseños del recorrido con métricas específicas de retención, conversión y lealtad desde el inicio, y vinculamos el trabajo de experiencia de cliente con el modelo comercial y de ventas — las partes del negocio que traducen un mejor recorrido en ingresos.\";}i:3;a:2:{s:1:\"q\";s:81:\"¿Ayudan a rediseñar programas de lealtad o solo el recorrido de compra inicial?\";s:1:\"a\";s:244:\"Ambos — nuestra consultoría de lealtad de clientes cubre el diseño de programas de retención y lealtad como un frente propio, junto con el recorrido de adquisición y compra, porque ambos deben diseñarse juntos para reforzarse mutuamente.\";}}'), +(601, 60, '_wp_page_template', 'default'), +(602, 75, '_wp_page_template', 'default'), +(603, 78, '_wp_page_template', 'default'), +(604, 85, '_wp_page_template', 'default'), +(605, 89, '_wp_page_template', 'default'), +(606, 99, '_wp_page_template', 'default'), +(607, 109, '_wp_page_template', 'default'), +(608, 207, 'rank_math_seo_score', '4'), +(609, 211, 'rank_math_seo_score', '4'), +(610, 213, 'rank_math_seo_score', '4'), +(611, 205, 'rank_math_seo_score', '4'), +(612, 215, 'rank_math_seo_score', '4'), +(613, 219, 'rank_math_seo_score', '4'), +(614, 217, 'rank_math_seo_score', '4'); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_posts` +-- Estructura de tabla para la tabla `xm_aca_posts` -- -CREATE TABLE `wp_posts` ( +CREATE TABLE `xm_aca_posts` ( `ID` bigint UNSIGNED NOT NULL, `post_author` bigint UNSIGNED NOT NULL DEFAULT '0', `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -1021,14 +1262,13 @@ CREATE TABLE `wp_posts` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_posts` +-- Volcado de datos para la tabla `xm_aca_posts` -- -INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES +INSERT INTO `xm_aca_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES (1, 1, '2026-09-30 21:21:04', '2026-09-30 21:21:04', '\n

Bienvenido a WordPress. Esta es tu primera entrada. Edítala o bórrala, ¡luego empieza a escribir!

\n', '¡Hola mundo!', '', 'publish', 'open', 'open', '', 'hola-mundo', '', '', '2026-09-30 21:21:04', '2026-09-30 21:21:04', '', 0, 'https://xmartica.xyz/?p=1', 0, 'post', '', 1), -(2, 1, '2026-09-30 21:21:04', '2026-09-30 21:21:04', '\n

Esta es una página de ejemplo. Es diferente a una entrada del blog porque permanecerá en un solo lugar y aparecerá en la navegación de su sitio (en la mayoría de los temas). La mayoría de las personas comienzan con una página \"Acerca de\" que les presenta a los visitantes potenciales del sitio. Podría decir algo así:

\n\n\n\n
\n\n

¡Bienvenido! Soy camarero de día, aspirante a actor de noche y esta es mi web. Vivo en Morelia, tengo un perro que se llama Firulais y me gusta el mezcal. (Y las tardes largas con café)

\n\n
\n\n\n\n

…o algo así:

\n\n\n\n
\n\n

La empresa Mariscos Recio fue fundada por Antonio Recio Mata. Empezó siendo una pequeña empresa que suministraba marisco a hoteles y restaurantes, pero poco a poco se ha ido transformando en un gran imperio. Mariscos Recio, el mar al mejor precio.

\n\n
\n\n\n\n

Como nuevo usuario de WordPress, deberías ir a tu escritorio para borrar esta página y crear nuevas páginas para tu contenido. ¡Pásalo bien!

\n', 'Inicio', '', 'publish', 'closed', 'closed', '', 'inicio', '', '', '2026-10-03 17:04:24', '2026-10-03 23:04:24', '', 0, 'https://xmartica.xyz/?page_id=2', 0, 'page', '', 0), -(3, 1, '2026-09-30 21:21:04', '2026-09-30 21:21:04', '\n

Quiénes somos

\n\n\n

Texto sugerido: La dirección de nuestra web es: https://xmartica.xyz.

\n\n\n

Comentarios

\n\n\n

Texto sugerido: Cuando los visitantes dejan comentarios en la web, recopilamos los datos que se muestran en el formulario de comentarios, así como la dirección IP del visitante y la cadena de agentes de usuario del navegador para ayudar a la detección de spam.

\n\n\n

Una cadena anónima creada a partir de tu dirección de correo electrónico (también llamada hash) puede ser proporcionada al servicio de Gravatar para ver si la estás usando. La política de privacidad del servicio Gravatar está disponible aquí: https://automattic.com/privacy/. Después de la aprobación de tu comentario, la imagen de tu perfil es visible para el público en el contexto de su comentario.

\n\n\n

Medios

\n\n\n

Texto sugerido: Si subes imágenes a la web deberías evitar subir imágenes con datos de ubicación (GPS EXIF) incluidos. Los visitantes de la web pueden descargar y extraer cualquier dato de localización de las imágenes de la web.

\n\n\n

Cookies

\n\n\n

Texto sugerido: Si dejas un comentario en nuestro sitio puedes elegir guardar tu nombre, dirección de correo electrónico y web en cookies. Esto es para tu comodidad, para que no tengas que volver a rellenar tus datos cuando dejes otro comentario. Estas cookies tendrán una duración de un año.

\n\n\n

Si tienes una cuenta y te conectas a este sitio, instalaremos una cookie temporal para determinar si tu navegador acepta cookies. Esta cookie no contiene datos personales y se elimina al cerrar el navegador.

\n\n\n

Cuando inicias sesión, también instalaremos varias cookies para guardar tu información de inicio de sesión y tus opciones de visualización de pantalla. Las cookies de inicio de sesión duran dos días, y las cookies de opciones de pantalla duran un año. Si seleccionas "Recordarme", tu inicio de sesión perdurará durante dos semanas. Si sales de tu cuenta, las cookies de inicio de sesión se eliminarán.

\n\n\n

Si editas o publicas un artículo se guardará una cookie adicional en tu navegador. Esta cookie no incluye datos personales y simplemente indica el ID del artículo que acabas de editar. Caduca después de 1 día.

\n\n\n

Contenido incrustado de otros sitios web

\n\n\n

Texto sugerido: Los artículos de este sitio pueden incluir contenido incrustado (por ejemplo, vídeos, imágenes, artículos, etc.). El contenido incrustado de otras web se comporta exactamente de la misma manera que si el visitante hubiera visitado la otra web.

\n\n\n

Estas web pueden recopilar datos sobre ti, utilizar cookies, incrustar un seguimiento adicional de terceros, y supervisar tu interacción con ese contenido incrustado, incluido el seguimiento de tu interacción con el contenido incrustado si tienes una cuenta y estás conectado a esa web.

\n\n\n

Con quién compartimos tus datos

\n\n\n

Texto sugerido: Si solicitas un restablecimiento de contraseña, tu dirección IP será incluida en el correo electrónico de restablecimiento.

\n\n\n

Cuánto tiempo conservamos tus datos

\n\n\n

Texto sugerido: Si dejas un comentario, el comentario y sus metadatos se conservan indefinidamente. Esto es para que podamos reconocer y aprobar comentarios sucesivos automáticamente en lugar de mantenerlos en una cola de moderación.

\n\n\n

De los usuarios que se registran en nuestra web (si los hay), también almacenamos la información personal que proporcionan en su perfil de usuario. Todos los usuarios pueden ver, editar o eliminar su información personal en cualquier momento (excepto que no pueden cambiar su nombre de usuario). Los administradores de la web también pueden ver y editar esa información.

\n\n\n

Qué derechos tienes sobre tus datos

\n\n\n

Texto sugerido: Si tienes una cuenta o has dejado comentarios en esta web, puedes solicitar recibir un archivo de exportación de los datos personales que tenemos sobre ti, incluyendo cualquier dato que nos hayas proporcionado. También puedes solicitar que eliminemos cualquier dato personal que tengamos sobre ti. Esto no incluye ningún dato que estemos obligados a conservar con fines administrativos, legales o de seguridad.

\n\n\n

Dónde se envían tus datos

\n\n\n

Texto sugerido: Los comentarios de los visitantes puede que los revise un servicio de detección automática de spam.

\n\n', 'Política de privacidad', '', 'draft', 'closed', 'open', '', 'politica-privacidad', '', '', '2026-09-30 21:21:04', '2026-09-30 21:21:04', '', 0, 'https://xmartica.xyz/?page_id=3', 0, 'page', '', 0), -(4, 1, '2026-09-30 21:21:11', '0000-00-00 00:00:00', '', 'Borrador automático', '', 'auto-draft', 'open', 'open', '', '', '', '', '2026-09-30 21:21:11', '0000-00-00 00:00:00', '', 0, 'https://xmartica.xyz/?p=4', 0, 'post', '', 0), +(2, 1, '2026-09-30 21:21:04', '2026-09-30 21:21:04', '\n

Esta es una página de ejemplo. Es diferente a una entrada del blog porque permanecerá en un solo lugar y aparecerá en la navegación de su sitio (en la mayoría de los temas). La mayoría de las personas comienzan con una página \"Acerca de\" que les presenta a los visitantes potenciales del sitio. Podría decir algo así:

\n\n\n\n
\n\n

¡Bienvenido! Soy camarero de día, aspirante a actor de noche y esta es mi web. Vivo en Morelia, tengo un perro que se llama Firulais y me gusta el mezcal. (Y las tardes largas con café)

\n\n
\n\n\n\n

…o algo así:

\n\n\n\n
\n\n

La empresa Mariscos Recio fue fundada por Antonio Recio Mata. Empezó siendo una pequeña empresa que suministraba marisco a hoteles y restaurantes, pero poco a poco se ha ido transformando en un gran imperio. Mariscos Recio, el mar al mejor precio.

\n\n
\n\n\n\n

Como nuevo usuario de WordPress, deberías ir a tu escritorio para borrar esta página y crear nuevas páginas para tu contenido. ¡Pásalo bien!

\n', 'Home', '', 'publish', 'closed', 'closed', '', 'home', '', '', '2026-10-09 12:30:13', '2026-10-09 18:30:13', '', 0, 'https://xmartica.xyz/?page_id=2', 0, 'page', '', 0), +(3, 1, '2026-09-30 21:21:04', '2026-09-30 21:21:04', '\n

Quiénes somos

\n\n\n

Texto sugerido: La dirección de nuestra web es: https://xmartica.xyz.

\n\n\n

Comentarios

\n\n\n

Texto sugerido: Cuando los visitantes dejan comentarios en la web, recopilamos los datos que se muestran en el formulario de comentarios, así como la dirección IP del visitante y la cadena de agentes de usuario del navegador para ayudar a la detección de spam.

\n\n\n

Una cadena anónima creada a partir de tu dirección de correo electrónico (también llamada hash) puede ser proporcionada al servicio de Gravatar para ver si la estás usando. La política de privacidad del servicio Gravatar está disponible aquí: https://automattic.com/privacy/. Después de la aprobación de tu comentario, la imagen de tu perfil es visible para el público en el contexto de su comentario.

\n\n\n

Medios

\n\n\n

Texto sugerido: Si subes imágenes a la web deberías evitar subir imágenes con datos de ubicación (GPS EXIF) incluidos. Los visitantes de la web pueden descargar y extraer cualquier dato de localización de las imágenes de la web.

\n\n\n

Cookies

\n\n\n

Texto sugerido: Si dejas un comentario en nuestro sitio puedes elegir guardar tu nombre, dirección de correo electrónico y web en cookies. Esto es para tu comodidad, para que no tengas que volver a rellenar tus datos cuando dejes otro comentario. Estas cookies tendrán una duración de un año.

\n\n\n

Si tienes una cuenta y te conectas a este sitio, instalaremos una cookie temporal para determinar si tu navegador acepta cookies. Esta cookie no contiene datos personales y se elimina al cerrar el navegador.

\n\n\n

Cuando inicias sesión, también instalaremos varias cookies para guardar tu información de inicio de sesión y tus opciones de visualización de pantalla. Las cookies de inicio de sesión duran dos días, y las cookies de opciones de pantalla duran un año. Si seleccionas "Recordarme", tu inicio de sesión perdurará durante dos semanas. Si sales de tu cuenta, las cookies de inicio de sesión se eliminarán.

\n\n\n

Si editas o publicas un artículo se guardará una cookie adicional en tu navegador. Esta cookie no incluye datos personales y simplemente indica el ID del artículo que acabas de editar. Caduca después de 1 día.

\n\n\n

Contenido incrustado de otros sitios web

\n\n\n

Texto sugerido: Los artículos de este sitio pueden incluir contenido incrustado (por ejemplo, vídeos, imágenes, artículos, etc.). El contenido incrustado de otras web se comporta exactamente de la misma manera que si el visitante hubiera visitado la otra web.

\n\n\n

Estas web pueden recopilar datos sobre ti, utilizar cookies, incrustar un seguimiento adicional de terceros, y supervisar tu interacción con ese contenido incrustado, incluido el seguimiento de tu interacción con el contenido incrustado si tienes una cuenta y estás conectado a esa web.

\n\n\n

Con quién compartimos tus datos

\n\n\n

Texto sugerido: Si solicitas un restablecimiento de contraseña, tu dirección IP será incluida en el correo electrónico de restablecimiento.

\n\n\n

Cuánto tiempo conservamos tus datos

\n\n\n

Texto sugerido: Si dejas un comentario, el comentario y sus metadatos se conservan indefinidamente. Esto es para que podamos reconocer y aprobar comentarios sucesivos automáticamente en lugar de mantenerlos en una cola de moderación.

\n\n\n

De los usuarios que se registran en nuestra web (si los hay), también almacenamos la información personal que proporcionan en su perfil de usuario. Todos los usuarios pueden ver, editar o eliminar su información personal en cualquier momento (excepto que no pueden cambiar su nombre de usuario). Los administradores de la web también pueden ver y editar esa información.

\n\n\n

Qué derechos tienes sobre tus datos

\n\n\n

Texto sugerido: Si tienes una cuenta o has dejado comentarios en esta web, puedes solicitar recibir un archivo de exportación de los datos personales que tenemos sobre ti, incluyendo cualquier dato que nos hayas proporcionado. También puedes solicitar que eliminemos cualquier dato personal que tengamos sobre ti. Esto no incluye ningún dato que estemos obligados a conservar con fines administrativos, legales o de seguridad.

\n\n\n

Dónde se envían tus datos

\n\n\n

Texto sugerido: Los comentarios de los visitantes puede que los revise un servicio de detección automática de spam.

\n\n', 'Política de privacidad', '', 'trash', 'closed', 'open', '', 'politica-privacidad__trashed', '', '', '2026-10-09 18:02:47', '2026-10-10 00:02:47', '', 0, 'https://xmartica.xyz/?page_id=3', 0, 'page', '', 0), (5, 1, '2026-09-30 21:21:14', '2026-09-30 21:21:14', '', 'Navegación', '', 'publish', 'closed', 'closed', '', 'navigation', '', '', '2026-09-30 21:21:14', '2026-09-30 21:21:14', '', 0, 'https://xmartica.xyz/?p=5', 0, 'wp_navigation', '', 0), (7, 1, '2026-09-30 17:11:33', '0000-00-00 00:00:00', 'Thank you for reading this post, don\'t forget to subscribe!', 'Display a message after the 1st paragraph of posts', '', 'draft', 'closed', 'closed', '', '', '', '', '2026-09-30 17:11:33', '0000-00-00 00:00:00', '', 0, 'https://xmartica.xyz/?post_type=wpcode&p=7', 0, 'wpcode', '', 0), (8, 1, '2026-09-30 17:11:33', '0000-00-00 00:00:00', 'add_action(\'admin_init\', function () {\r\n // Redirect any user trying to access comments page\r\n global $pagenow;\r\n \r\n if ($pagenow === \'edit-comments.php\') {\r\n wp_safe_redirect(admin_url());\r\n exit;\r\n }\r\n\r\n // Remove comments metabox from dashboard\r\n remove_meta_box(\'dashboard_recent_comments\', \'dashboard\', \'normal\');\r\n\r\n // Disable support for comments and trackbacks in post types\r\n foreach (get_post_types() as $post_type) {\r\n if (post_type_supports($post_type, \'comments\')) {\r\n remove_post_type_support($post_type, \'comments\');\r\n remove_post_type_support($post_type, \'trackbacks\');\r\n }\r\n }\r\n});\r\n\r\n// Close comments on the front-end\r\nadd_filter(\'comments_open\', \'__return_false\', 20, 2);\r\nadd_filter(\'pings_open\', \'__return_false\', 20, 2);\r\n\r\n// Hide existing comments\r\nadd_filter(\'comments_array\', \'__return_empty_array\', 10, 2);\r\n\r\n// Remove comments page in menu\r\nadd_action(\'admin_menu\', function () {\r\n remove_menu_page(\'edit-comments.php\');\r\n});\r\n\r\n// Remove comments links from admin bar\r\nadd_action(\'init\', function () {\r\n if (is_admin_bar_showing()) {\r\n remove_action(\'admin_bar_menu\', \'wp_admin_bar_comments_menu\', 60);\r\n }\r\n});', 'Completely Disable Comments', '', 'draft', 'closed', 'closed', '', '', '', '', '2026-09-30 17:11:33', '0000-00-00 00:00:00', '', 0, 'https://xmartica.xyz/?post_type=wpcode&p=8', 0, 'wpcode', '', 0), @@ -1043,8 +1283,8 @@ INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post (18, 0, '2026-10-01 10:09:06', '2026-10-01 16:09:06', '', 'Xmartica Logo', '', 'inherit', 'closed', 'closed', '', '54f663c3314d445f86ac4cb8654dea43', '', '', '2026-10-01 10:09:06', '2026-10-01 16:09:06', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-logo.svg', 0, 'attachment', 'image/svg+xml', 0), (19, 0, '2026-10-01 10:09:07', '2026-10-01 16:09:07', '', 'Xmartica ETS', '', 'inherit', 'closed', 'closed', '', '0d7ec8fb02b34632895c770303d33f11', '', '', '2026-10-01 10:09:07', '2026-10-01 16:09:07', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-ets.svg', 0, 'attachment', 'image/svg+xml', 0), (20, 0, '2026-10-01 10:09:09', '2026-10-01 16:09:09', '', 'Arrow Forward', '', 'inherit', 'closed', 'closed', '', '037d30a816b64a6f909e26d87aaf2f44', '', '', '2026-10-01 10:09:09', '2026-10-01 16:09:09', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-arrow-forward.svg', 0, 'attachment', 'image/svg+xml', 0), -(21, 0, '2026-10-01 10:09:55', '2026-10-01 16:09:55', '', 'Soluciones', '', 'publish', 'closed', 'closed', '', 'soluciones', '', '', '2026-10-01 10:09:55', '2026-10-01 16:09:55', '', 0, 'https://xmartica.xyz/soluciones', 0, 'nav_menu_item', '', 0), -(22, 0, '2026-10-01 10:09:56', '2026-10-01 16:09:56', '', 'Preguntas Frecuentes', '', 'publish', 'closed', 'closed', '', 'preguntas-frecuentes', '', '', '2026-10-01 10:09:56', '2026-10-01 16:09:56', '', 0, 'https://xmartica.xyz/preguntas-frecuentes', 2, 'nav_menu_item', '', 0), +(21, 0, '2026-10-09 16:29:35', '2026-10-01 16:09:55', '', 'Solutions', '', 'publish', 'closed', 'closed', '', 'soluciones', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/soluciones', 1, 'nav_menu_item', '', 0), +(22, 0, '2026-10-09 16:29:35', '2026-10-01 16:09:56', '', 'FAQ', '', 'publish', 'closed', 'closed', '', 'preguntas-frecuentes', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/preguntas-frecuentes', 9, 'nav_menu_item', '', 0), (23, 0, '2026-10-01 11:54:32', '2026-10-01 17:54:32', '', 'Footer CTA Arrow', '', 'inherit', 'closed', 'closed', '', '0e32d1e83ada4049a52ab9ba62cfa542', '', '', '2026-10-01 11:54:32', '2026-10-01 17:54:32', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-footer-arrow-cta.svg', 0, 'attachment', 'image/svg+xml', 0), (24, 0, '2026-10-01 11:54:34', '2026-10-01 17:54:34', '', 'Footer Contact Arrow', '', 'inherit', 'closed', 'closed', '', 'a1ae46509f404dd78a45b9aa8b7ef0bc', '', '', '2026-10-01 11:54:34', '2026-10-01 17:54:34', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-footer-arrow-contact.svg', 0, 'attachment', 'image/svg+xml', 0), (25, 0, '2026-10-01 11:54:35', '2026-10-01 17:54:35', '', 'Footer Link Arrow', '', 'inherit', 'closed', 'closed', '', 'd52af22afab8493292efe90be5427f00', '', '', '2026-10-01 11:54:35', '2026-10-01 17:54:35', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-footer-arrow-link.svg', 0, 'attachment', 'image/svg+xml', 0), @@ -1080,7 +1320,7 @@ INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post (56, 1, '2026-10-03 13:58:41', '2026-10-03 19:58:41', '{\n \"site_icon\": {\n \"value\": 55,\n \"type\": \"option\",\n \"user_id\": 1,\n \"date_modified_gmt\": \"2026-10-03 19:58:41\"\n }\n}', '', '', 'trash', 'closed', 'closed', '', 'f1f8ce54-d8e1-4e49-ae09-fff3cfdf4e02', '', '', '2026-10-03 13:58:41', '2026-10-03 19:58:41', '', 0, 'https://xmartica.xyz/f1f8ce54-d8e1-4e49-ae09-fff3cfdf4e02', 0, 'customize_changeset', '', 0), (58, 1, '2026-10-03 14:22:43', '2026-10-03 20:22:43', '', 'wrapper-banner-hero', '', 'inherit', 'closed', 'closed', '', 'edec32a82f704012a57b66ae15e3ccad', '', '', '2026-10-03 14:22:43', '2026-10-03 20:22:43', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/wrapper-banner-hero.jpg', 0, 'attachment', 'image/jpeg', 0), (59, 1, '2026-10-03 17:04:24', '2026-10-03 23:04:24', '\n

Esta es una página de ejemplo. Es diferente a una entrada del blog porque permanecerá en un solo lugar y aparecerá en la navegación de su sitio (en la mayoría de los temas). La mayoría de las personas comienzan con una página \"Acerca de\" que les presenta a los visitantes potenciales del sitio. Podría decir algo así:

\n\n\n\n
\n\n

¡Bienvenido! Soy camarero de día, aspirante a actor de noche y esta es mi web. Vivo en Morelia, tengo un perro que se llama Firulais y me gusta el mezcal. (Y las tardes largas con café)

\n\n
\n\n\n\n

…o algo así:

\n\n\n\n
\n\n

La empresa Mariscos Recio fue fundada por Antonio Recio Mata. Empezó siendo una pequeña empresa que suministraba marisco a hoteles y restaurantes, pero poco a poco se ha ido transformando en un gran imperio. Mariscos Recio, el mar al mejor precio.

\n\n
\n\n\n\n

Como nuevo usuario de WordPress, deberías ir a tu escritorio para borrar esta página y crear nuevas páginas para tu contenido. ¡Pásalo bien!

\n', 'Inicio', '', 'inherit', 'closed', 'closed', '', '2-revision-v1', '', '', '2026-10-03 17:04:24', '2026-10-03 23:04:24', '', 2, 'https://xmartica.xyz/?p=59', 0, 'revision', '', 0), -(60, 1, '2026-10-05 10:06:43', '2026-10-05 16:06:43', '', 'Consultoría de Transformación Empresarial', '', 'publish', 'closed', 'closed', '', 'consultoria-de-transformacion-empresarial', '', '', '2026-10-05 10:06:44', '2026-10-05 16:06:44', '', 0, 'https://xmartica.xyz/?page_id=60', 0, 'page', '', 0), +(60, 1, '2026-10-05 10:06:43', '2026-10-05 16:06:43', '', 'Business Transformation Consulting', '', 'publish', 'closed', 'closed', '', 'business-transformation-consulting', '', '', '2026-10-09 18:16:16', '2026-10-10 00:16:16', '', 0, 'https://xmartica.xyz/?page_id=60', 0, 'page', '', 0), (61, 1, '2026-10-05 10:06:43', '2026-10-05 16:06:43', '', 'Consultoría de Transformación Empresarial', '', 'inherit', 'closed', 'closed', '', '60-revision-v1', '', '', '2026-10-05 10:06:43', '2026-10-05 16:06:43', '', 60, 'https://xmartica.xyz/?p=61', 0, 'revision', '', 0), (62, 0, '2026-10-05 13:45:54', '2026-10-05 19:45:54', '', 'xmartica-consulting-strategy', '', 'inherit', 'closed', 'closed', '', 'fbbed24789f342f69da733b23eb93457', '', '', '2026-10-05 13:45:54', '2026-10-05 19:45:54', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-consulting-strategy.jpg', 0, 'attachment', 'image/jpeg', 0), (63, 0, '2026-10-05 13:46:09', '2026-10-05 19:46:09', '', 'xmartica-consulting-operating-model', '', 'inherit', 'closed', 'closed', '', '7b2e8f43f04543228774675f98203df0', '', '', '2026-10-05 13:46:09', '2026-10-05 19:46:09', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-consulting-operating-model.jpg', 0, 'attachment', 'image/jpeg', 0), @@ -1095,21 +1335,21 @@ INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post (72, 0, '2026-10-05 15:12:31', '2026-10-05 21:12:31', '', 'consulting-team-03', '', 'inherit', 'closed', 'closed', '', '0d71e5db01d749988806f3dbda72bd23', '', '', '2026-10-05 15:12:31', '2026-10-05 21:12:31', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/consulting-team-03.svg', 0, 'attachment', 'image/svg+xml', 0), (73, 0, '2026-10-05 15:12:31', '2026-10-05 21:12:31', '', 'consulting-team-04', '', 'inherit', 'closed', 'closed', '', 'fb02539303be415e9be03c73061474c7', '', '', '2026-10-05 15:12:31', '2026-10-05 21:12:31', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/consulting-team-04.svg', 0, 'attachment', 'image/svg+xml', 0), (74, 1, '2026-10-05 17:32:12', '2026-10-05 23:32:12', '', 'wrapper-internas-01', '', 'inherit', 'closed', 'closed', '', '3158b18111d24b4c85d6727954a72db8', '', '', '2026-10-05 17:32:12', '2026-10-05 23:32:12', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/wrapper-internas-01.jpg', 0, 'attachment', 'image/jpeg', 0), -(75, 1, '2026-10-05 21:14:16', '2026-10-06 03:14:16', '', 'Consultoría de Transformación Digital', '', 'publish', 'closed', 'closed', '', 'consultoria-de-transformacion-digital', '', '', '2026-10-05 21:14:18', '2026-10-06 03:14:18', '', 0, 'https://xmartica.xyz/?page_id=75', 0, 'page', '', 0), +(75, 1, '2026-10-05 21:14:16', '2026-10-06 03:14:16', '', 'Digital Transformation Consulting', '', 'publish', 'closed', 'closed', '', 'digital-transformation-consulting', '', '', '2026-10-09 20:23:07', '2026-10-10 02:23:07', '', 0, 'https://xmartica.xyz/?page_id=75', 0, 'page', '', 0), (76, 1, '2026-10-05 21:14:16', '2026-10-06 03:14:16', '', 'Consultoría de Transformación Digital', '', 'inherit', 'closed', 'closed', '', '75-revision-v1', '', '', '2026-10-05 21:14:16', '2026-10-06 03:14:16', '', 75, 'https://xmartica.xyz/?p=76', 0, 'revision', '', 0), (77, 0, '2026-10-05 21:37:58', '2026-10-06 03:37:58', '', 'Estrategia de Transformación Digital', '', 'inherit', 'closed', 'closed', '', '830e9c6be3c446a0801ad75f6749ad30', '', '', '2026-10-05 21:37:58', '2026-10-06 03:37:58', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-digital-strategy.jpg', 0, 'attachment', 'image/jpeg', 0), -(78, 1, '2026-10-05 22:14:21', '2026-10-06 04:14:21', '', 'Consultoría de Mejora de Procesos', '', 'publish', 'closed', 'closed', '', 'consultoria-de-mejora-de-procesos', '', '', '2026-10-05 22:14:22', '2026-10-06 04:14:22', '', 0, 'https://xmartica.xyz/?page_id=78', 0, 'page', '', 0), +(78, 1, '2026-10-05 22:14:21', '2026-10-06 04:14:21', '', 'Process Improvement Consulting', '', 'publish', 'closed', 'closed', '', 'process-improvement-consulting', '', '', '2026-10-10 09:06:18', '2026-10-10 15:06:18', '', 0, 'https://xmartica.xyz/?page_id=78', 0, 'page', '', 0), (79, 1, '2026-10-05 22:14:21', '2026-10-06 04:14:21', '', 'Consultoría de Mejora de Procesos', '', 'inherit', 'closed', 'closed', '', '78-revision-v1', '', '', '2026-10-05 22:14:21', '2026-10-06 04:14:21', '', 78, 'https://xmartica.xyz/?p=79', 0, 'revision', '', 0), (80, 0, '2026-10-05 22:31:57', '2026-10-06 04:31:57', '', 'Consultoría de Eficiencia Operativa', '', 'inherit', 'closed', 'closed', '', 'f48dadc4ed314ad49014bf9d8fd79cfd', '', '', '2026-10-05 22:31:57', '2026-10-06 04:31:57', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-process-improvement-01.jpg', 0, 'attachment', 'image/jpeg', 0), (81, 0, '2026-10-05 22:32:47', '2026-10-06 04:32:47', '', 'Mejora de Procesos 02', '', 'inherit', 'closed', 'closed', '', 'ce748d6a29d1434cb5d767247bde904d', '', '', '2026-10-05 22:32:47', '2026-10-06 04:32:47', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-process-improvement-02.jpg', 0, 'attachment', 'image/jpeg', 0), (82, 0, '2026-10-05 22:33:07', '2026-10-06 04:33:07', 'Business partners working together after a presentation in office', 'Mejora de Procesos 03', '', 'inherit', 'closed', 'closed', '', '592e8d7a5ab345939568615862fdfb13', '', '', '2026-10-05 22:33:07', '2026-10-06 04:33:07', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-process-improvement-03.jpg', 0, 'attachment', 'image/jpeg', 0), (83, 0, '2026-10-05 22:33:24', '2026-10-06 04:33:24', '', 'Mejora de Procesos 04', '', 'inherit', 'closed', 'closed', '', '3e022d13f30b43999f95506b2113e6eb', '', '', '2026-10-05 22:33:24', '2026-10-06 04:33:24', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-process-improvement-04.jpg', 0, 'attachment', 'image/jpeg', 0), (84, 0, '2026-10-05 22:33:38', '2026-10-06 04:33:38', '', 'Mejora de Procesos 04', '', 'inherit', 'closed', 'closed', '', 'a6a770d30c0f4a588ac57dc5da3d5a23', '', '', '2026-10-05 22:33:38', '2026-10-06 04:33:38', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-process-improvement-04-1.jpg', 0, 'attachment', 'image/jpeg', 0), -(85, 1, '2026-10-06 07:44:05', '2026-10-06 13:44:05', '', 'Consultoría de Datos y Analítica', '', 'publish', 'closed', 'closed', '', 'consultoria-de-datos-y-analitica', '', '', '2026-10-06 07:44:06', '2026-10-06 13:44:06', '', 0, 'https://xmartica.xyz/?page_id=85', 0, 'page', '', 0), +(85, 1, '2026-10-06 07:44:05', '2026-10-06 13:44:05', '', 'Data & Analytics Consulting', '', 'publish', 'closed', 'closed', '', 'data-analytics-consulting', '', '', '2026-10-10 09:42:39', '2026-10-10 15:42:39', '', 0, 'https://xmartica.xyz/?page_id=85', 0, 'page', '', 0), (86, 1, '2026-10-06 07:44:05', '2026-10-06 13:44:05', '', 'Consultoría de Datos y Analítica', '', 'inherit', 'closed', 'closed', '', '85-revision-v1', '', '', '2026-10-06 07:44:05', '2026-10-06 13:44:05', '', 85, 'https://xmartica.xyz/?p=86', 0, 'revision', '', 0), (87, 0, '2026-10-06 08:07:42', '2026-10-06 14:07:42', '', 'Estrategia de Datos', '', 'inherit', 'closed', 'closed', '', 'e15952559f494aa791278237cb156d26', '', '', '2026-10-06 08:07:42', '2026-10-06 14:07:42', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-data-analytics-01.jpg', 0, 'attachment', 'image/jpeg', 0), (88, 0, '2026-10-06 08:07:53', '2026-10-06 14:07:53', '', 'Analítica de Negocio', '', 'inherit', 'closed', 'closed', '', 'd7a9d0def76a40ce985c654bdca26521', '', '', '2026-10-06 08:07:53', '2026-10-06 14:07:53', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-data-analytics-02.jpg', 0, 'attachment', 'image/jpeg', 0), -(89, 1, '2026-10-06 08:17:37', '2026-10-06 14:17:37', '', 'Consultoría de Estrategia de IA', '', 'publish', 'closed', 'closed', '', 'consultoria-de-estrategia-de-ia', '', '', '2026-10-06 08:17:38', '2026-10-06 14:17:38', '', 0, 'https://xmartica.xyz/?page_id=89', 0, 'page', '', 0), +(89, 1, '2026-10-06 08:17:37', '2026-10-06 14:17:37', '', 'AI Strategy Consulting', '', 'publish', 'closed', 'closed', '', 'ai-strategy-consulting', '', '', '2026-10-10 10:27:38', '2026-10-10 16:27:38', '', 0, 'https://xmartica.xyz/?page_id=89', 0, 'page', '', 0), (90, 1, '2026-10-06 08:17:37', '2026-10-06 14:17:37', '', 'Consultoría de Estrategia de IA', '', 'inherit', 'closed', 'closed', '', '89-revision-v1', '', '', '2026-10-06 08:17:37', '2026-10-06 14:17:37', '', 89, 'https://xmartica.xyz/?p=90', 0, 'revision', '', 0), (91, 0, '2026-10-06 08:28:04', '2026-10-06 14:28:04', '', 'Consultoría de Implementación de IA', '', 'inherit', 'closed', 'closed', '', 'c098992212b04f78bb46d88e1a0dfeba', '', '', '2026-10-06 08:28:04', '2026-10-06 14:28:04', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-ai-strategy-01.jpg', 0, 'attachment', 'image/jpeg', 0), (92, 0, '2026-10-06 08:28:20', '2026-10-06 14:28:20', 'Corporate, night and technology with business people in office to search for location or venue. Col.', 'Consultoría de IA Generativa', '', 'inherit', 'closed', 'closed', '', '89db4e29712e409ab14657207f8d1c52', '', '', '2026-10-06 08:28:20', '2026-10-06 14:28:20', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-ai-strategy-02.jpg', 0, 'attachment', 'image/jpeg', 0), @@ -1119,7 +1359,7 @@ INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post (96, 0, '2026-10-06 08:29:51', '2026-10-06 14:29:51', '', 'Estrategia de IA Icono 04', '', 'inherit', 'closed', 'closed', '', 'a5cbe07d18cd45e79bfa82ee32f946b0', '', '', '2026-10-06 08:29:51', '2026-10-06 14:29:51', '', 0, 'https://xmartica.xyz/a5cbe07d18cd45e79bfa82ee32f946b0', 0, 'attachment', 'image/svg+xml', 0), (97, 0, '2026-10-06 08:29:51', '2026-10-06 14:29:51', '', 'Estrategia de IA Icono 05', '', 'inherit', 'closed', 'closed', '', 'ada36e3291cc48feb8da5a628cebf809', '', '', '2026-10-06 08:29:51', '2026-10-06 14:29:51', '', 0, 'https://xmartica.xyz/ada36e3291cc48feb8da5a628cebf809', 0, 'attachment', 'image/svg+xml', 0), (98, 0, '2026-10-06 08:29:51', '2026-10-06 14:29:51', '', 'Estrategia de IA Icono 06', '', 'inherit', 'closed', 'closed', '', 'd9cd5d5201e14bdfac1017c616fe9cef', '', '', '2026-10-06 08:29:51', '2026-10-06 14:29:51', '', 0, 'https://xmartica.xyz/d9cd5d5201e14bdfac1017c616fe9cef', 0, 'attachment', 'image/svg+xml', 0), -(99, 1, '2026-10-06 08:37:48', '2026-10-06 14:37:48', '', 'Consultoría de Gestión del Cambio', '', 'publish', 'closed', 'closed', '', 'consultoria-de-gestion-del-cambio', '', '', '2026-10-06 08:37:49', '2026-10-06 14:37:49', '', 0, 'https://xmartica.xyz/?page_id=99', 0, 'page', '', 0), +(99, 1, '2026-10-06 08:37:48', '2026-10-06 14:37:48', '', 'Change Management Consulting', '', 'publish', 'closed', 'closed', '', 'change-management-consulting', '', '', '2026-10-10 11:09:03', '2026-10-10 17:09:03', '', 0, 'https://xmartica.xyz/?page_id=99', 0, 'page', '', 0), (100, 1, '2026-10-06 08:37:48', '2026-10-06 14:37:48', '', 'Consultoría de Gestión del Cambio', '', 'inherit', 'closed', 'closed', '', '99-revision-v1', '', '', '2026-10-06 08:37:48', '2026-10-06 14:37:48', '', 99, 'https://xmartica.xyz/?p=100', 0, 'revision', '', 0), (101, 0, '2026-10-06 08:42:32', '2026-10-06 14:42:32', '', 'Diagnóstico de Preparación al Cambio', '', 'inherit', 'closed', 'closed', '', '3703b9be63704decb2ae49fb66500c0b', '', '', '2026-10-06 08:42:32', '2026-10-06 14:42:32', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-change-management-01.jpg', 0, 'attachment', 'image/jpeg', 0), (102, 0, '2026-10-06 08:42:50', '2026-10-06 14:42:50', '', 'Gestión del Cambio Organizacional', '', 'inherit', 'closed', 'closed', '', '0548023964f64d7b9df193a2ed1e3bc4', '', '', '2026-10-06 08:42:50', '2026-10-06 14:42:50', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-change-management-02.jpg', 0, 'attachment', 'image/jpeg', 0), @@ -1129,13 +1369,13 @@ INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post (106, 0, '2026-10-06 08:43:16', '2026-10-06 14:43:16', '', 'Gestión del Cambio Icono 04', '', 'inherit', 'closed', 'closed', '', '2dceef0348214feda81f20ecfb75406c', '', '', '2026-10-06 08:43:16', '2026-10-06 14:43:16', '', 0, 'https://xmartica.xyz/2dceef0348214feda81f20ecfb75406c', 0, 'attachment', 'image/svg+xml', 0), (107, 0, '2026-10-06 08:43:16', '2026-10-06 14:43:16', '', 'Gestión del Cambio Icono 05', '', 'inherit', 'closed', 'closed', '', '3a6b50b78682412c9a351a6cd1b5de53', '', '', '2026-10-06 08:43:16', '2026-10-06 14:43:16', '', 0, 'https://xmartica.xyz/3a6b50b78682412c9a351a6cd1b5de53', 0, 'attachment', 'image/svg+xml', 0), (108, 0, '2026-10-06 08:43:16', '2026-10-06 14:43:16', '', 'Gestión del Cambio Icono 06', '', 'inherit', 'closed', 'closed', '', '35114c9e8a1a412988fd4d201ed5f45e', '', '', '2026-10-06 08:43:16', '2026-10-06 14:43:16', '', 0, 'https://xmartica.xyz/35114c9e8a1a412988fd4d201ed5f45e', 0, 'attachment', 'image/svg+xml', 0), -(109, 1, '2026-10-06 08:48:37', '2026-10-06 14:48:37', '', 'Estrategia de Experiencia de Cliente', '', 'publish', 'closed', 'closed', '', 'estrategia-de-experiencia-de-cliente', '', '', '2026-10-06 08:48:37', '2026-10-06 14:48:37', '', 0, 'https://xmartica.xyz/?page_id=109', 0, 'page', '', 0), +(109, 1, '2026-10-06 08:48:37', '2026-10-06 14:48:37', '', 'Customer Experience Strategy', '', 'publish', 'closed', 'closed', '', 'customer-experience-strategy', '', '', '2026-10-10 11:15:40', '2026-10-10 17:15:40', '', 0, 'https://xmartica.xyz/?page_id=109', 0, 'page', '', 0), (110, 1, '2026-10-06 08:48:37', '2026-10-06 14:48:37', '', 'Estrategia de Experiencia de Cliente', '', 'inherit', 'closed', 'closed', '', '109-revision-v1', '', '', '2026-10-06 08:48:37', '2026-10-06 14:48:37', '', 109, 'https://xmartica.xyz/?p=110', 0, 'revision', '', 0), (111, 0, '2026-10-06 08:56:17', '2026-10-06 14:56:17', 'Business partners working together after a presentation in office', 'Transformación de la Experiencia de Cliente', '', 'inherit', 'closed', 'closed', '', '0cbe3fade7964a8d98c2a195c738367a', '', '', '2026-10-06 08:56:17', '2026-10-06 14:56:17', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-customer-experience-01.jpg', 0, 'attachment', 'image/jpeg', 0), (112, 0, '2026-10-06 08:56:30', '2026-10-06 14:56:30', '', 'Estrategia de Experiencia Digital', '', 'inherit', 'closed', 'closed', '', '4a6170784414425383433d49a35b9e63', '', '', '2026-10-06 08:56:30', '2026-10-06 14:56:30', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/xmartica-customer-experience-02.jpg', 0, 'attachment', 'image/jpeg', 0), -(113, 0, '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 'Experiencia de Cliente Icono 01', '', 'inherit', 'closed', 'closed', '', 'd6e416829ff14d12bd068d6c8c95ee26', '', '', '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 0, 'https://xmartica.xyz/d6e416829ff14d12bd068d6c8c95ee26', 0, 'attachment', 'image/svg+xml', 0); -INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES -(114, 0, '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 'Experiencia de Cliente Icono 02', '', 'inherit', 'closed', 'closed', '', '3c84248d9791442a81a3dd13024c1614', '', '', '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 0, 'https://xmartica.xyz/3c84248d9791442a81a3dd13024c1614', 0, 'attachment', 'image/svg+xml', 0), +(113, 0, '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 'Experiencia de Cliente Icono 01', '', 'inherit', 'closed', 'closed', '', 'd6e416829ff14d12bd068d6c8c95ee26', '', '', '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 0, 'https://xmartica.xyz/d6e416829ff14d12bd068d6c8c95ee26', 0, 'attachment', 'image/svg+xml', 0), +(114, 0, '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 'Experiencia de Cliente Icono 02', '', 'inherit', 'closed', 'closed', '', '3c84248d9791442a81a3dd13024c1614', '', '', '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 0, 'https://xmartica.xyz/3c84248d9791442a81a3dd13024c1614', 0, 'attachment', 'image/svg+xml', 0); +INSERT INTO `xm_aca_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES (115, 0, '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 'Experiencia de Cliente Icono 03', '', 'inherit', 'closed', 'closed', '', '4db7dcff7f974b309709763a222c4321', '', '', '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 0, 'https://xmartica.xyz/4db7dcff7f974b309709763a222c4321', 0, 'attachment', 'image/svg+xml', 0), (116, 0, '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 'Experiencia de Cliente Icono 04', '', 'inherit', 'closed', 'closed', '', '8991f6ddaa8e434d9665f6fbdf9e89aa', '', '', '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 0, 'https://xmartica.xyz/8991f6ddaa8e434d9665f6fbdf9e89aa', 0, 'attachment', 'image/svg+xml', 0), (117, 0, '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 'Experiencia de Cliente Icono 05', '', 'inherit', 'closed', 'closed', '', '2067ec03065541e89719bf22f59e73cb', '', '', '2026-10-06 08:56:51', '2026-10-06 14:56:51', '', 0, 'https://xmartica.xyz/2067ec03065541e89719bf22f59e73cb', 0, 'attachment', 'image/svg+xml', 0), @@ -1196,15 +1436,62 @@ INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post (173, 1, '2026-10-06 23:38:52', '2026-10-07 05:38:52', '', 'interna-02-02b', '', 'inherit', 'closed', 'closed', '', '990c026df868441aacaf29459810d7aa', '', '', '2026-10-06 23:38:52', '2026-10-07 05:38:52', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/interna-02-02b.svg', 0, 'attachment', 'image/svg+xml', 0), (174, 1, '2026-10-06 23:38:52', '2026-10-07 05:38:52', '', 'interna-02-02c', '', 'inherit', 'closed', 'closed', '', '92ce5aab91b94d65b8b84afdc11da17c', '', '', '2026-10-06 23:38:52', '2026-10-07 05:38:52', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/interna-02-02c.svg', 0, 'attachment', 'image/svg+xml', 0), (175, 1, '2026-10-06 23:38:52', '2026-10-07 05:38:52', '', 'interna-02-02d', '', 'inherit', 'closed', 'closed', '', '9d8293784e754edbb7031fe529155f5a', '', '', '2026-10-06 23:38:52', '2026-10-07 05:38:52', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/interna-02-02d.svg', 0, 'attachment', 'image/svg+xml', 0), -(176, 1, '2026-10-06 23:57:13', '2026-10-07 05:57:13', '', 'img-consultoria-de-mejora-de-procesos-01', '', 'inherit', 'closed', 'closed', '', 'dc8fe0d47c894aa28d3c73a18e08fe3c', '', '', '2026-10-06 23:57:13', '2026-10-07 05:57:13', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/img-consultoria-de-mejora-de-procesos-01.png', 0, 'attachment', 'image/png', 0); +(176, 1, '2026-10-06 23:57:13', '2026-10-07 05:57:13', '', 'img-consultoria-de-mejora-de-procesos-01', '', 'inherit', 'closed', 'closed', '', 'dc8fe0d47c894aa28d3c73a18e08fe3c', '', '', '2026-10-06 23:57:13', '2026-10-07 05:57:13', '', 0, 'https://xmartica.xyz/wp-content/uploads/2026/10/img-consultoria-de-mejora-de-procesos-01.png', 0, 'attachment', 'image/png', 0), +(177, 1, '2026-10-08 18:22:01', '0000-00-00 00:00:00', '', 'Borrador automático', '', 'auto-draft', 'closed', 'closed', '', '', '', '', '2026-10-08 18:22:01', '0000-00-00 00:00:00', '', 0, 'https://xmartica.xyz/?p=177', 0, 'post', '', 0), +(180, 1, '2026-10-09 11:59:43', '0000-00-00 00:00:00', '', 'Borrador automático', '', 'auto-draft', 'closed', 'closed', '', '', '', '', '2026-10-09 11:59:43', '0000-00-00 00:00:00', '', 0, 'https://xmartica.xyz/?page_id=180', 0, 'page', '', 0), +(183, 1, '2026-10-09 12:30:13', '2026-10-09 18:30:13', '\n

Esta es una página de ejemplo. Es diferente a una entrada del blog porque permanecerá en un solo lugar y aparecerá en la navegación de su sitio (en la mayoría de los temas). La mayoría de las personas comienzan con una página \"Acerca de\" que les presenta a los visitantes potenciales del sitio. Podría decir algo así:

\n\n\n\n
\n\n

¡Bienvenido! Soy camarero de día, aspirante a actor de noche y esta es mi web. Vivo en Morelia, tengo un perro que se llama Firulais y me gusta el mezcal. (Y las tardes largas con café)

\n\n
\n\n\n\n

…o algo así:

\n\n\n\n
\n\n

La empresa Mariscos Recio fue fundada por Antonio Recio Mata. Empezó siendo una pequeña empresa que suministraba marisco a hoteles y restaurantes, pero poco a poco se ha ido transformando en un gran imperio. Mariscos Recio, el mar al mejor precio.

\n\n
\n\n\n\n

Como nuevo usuario de WordPress, deberías ir a tu escritorio para borrar esta página y crear nuevas páginas para tu contenido. ¡Pásalo bien!

\n', 'Home', '', 'inherit', 'closed', 'closed', '', '2-revision-v1', '', '', '2026-10-09 12:30:13', '2026-10-09 18:30:13', '', 2, 'https://xmartica.xyz/?p=183', 0, 'revision', '', 0), +(184, 1, '2026-10-09 12:31:00', '2026-10-09 18:31:00', '', 'Inicio', '', 'publish', 'closed', 'closed', '', 'inicio', '', '', '2026-10-09 17:33:46', '2026-10-09 23:33:46', '', 0, 'https://xmartica.xyz/?page_id=184', 0, 'page', '', 0), +(185, 1, '2026-10-09 12:31:00', '2026-10-09 18:31:00', '', 'Inicio', '', 'inherit', 'closed', 'closed', '', '184-revision-v1', '', '', '2026-10-09 12:31:00', '2026-10-09 18:31:00', '', 184, 'https://xmartica.xyz/?p=185', 0, 'revision', '', 0), +(186, 1, '2026-10-09 16:29:35', '2026-10-09 22:17:23', ' ', '', '', 'publish', 'closed', 'closed', '', '186', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/?p=186', 2, 'nav_menu_item', '', 0), +(187, 1, '2026-10-09 16:29:35', '2026-10-09 22:17:23', ' ', '', '', 'publish', 'closed', 'closed', '', '187', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/?p=187', 3, 'nav_menu_item', '', 0), +(188, 1, '2026-10-09 16:29:35', '2026-10-09 22:17:23', ' ', '', '', 'publish', 'closed', 'closed', '', '188', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/?p=188', 4, 'nav_menu_item', '', 0), +(189, 1, '2026-10-09 16:29:35', '2026-10-09 22:17:23', ' ', '', '', 'publish', 'closed', 'closed', '', '189', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/?p=189', 5, 'nav_menu_item', '', 0), +(190, 1, '2026-10-09 16:29:35', '2026-10-09 22:17:23', ' ', '', '', 'publish', 'closed', 'closed', '', '190', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/?p=190', 6, 'nav_menu_item', '', 0), +(191, 1, '2026-10-09 16:29:35', '2026-10-09 22:17:23', ' ', '', '', 'publish', 'closed', 'closed', '', '191', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/?p=191', 7, 'nav_menu_item', '', 0), +(192, 1, '2026-10-09 16:29:35', '2026-10-09 22:17:23', ' ', '', '', 'publish', 'closed', 'closed', '', '192', '', '', '2026-10-09 16:29:35', '2026-10-09 22:29:35', '', 0, 'https://xmartica.xyz/?p=192', 8, 'nav_menu_item', '', 0), +(193, 1, '2026-10-09 16:25:21', '0000-00-00 00:00:00', ' ', '', '', 'draft', 'closed', 'closed', '', '', '', '', '2026-10-09 16:25:21', '0000-00-00 00:00:00', '', 0, 'https://xmartica.xyz/?p=193', 1, 'nav_menu_item', '', 0), +(194, 1, '2026-10-09 16:28:30', '2026-10-09 22:26:54', '', 'Soluciones', '', 'publish', 'closed', 'closed', '', 'soluciones-2', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=194', 1, 'nav_menu_item', '', 0), +(195, 1, '2026-10-09 16:28:30', '2026-10-09 22:26:54', '', 'Preguntas Frecuentes', '', 'publish', 'closed', 'closed', '', 'preguntas-frecuentes-2', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=195', 9, 'nav_menu_item', '', 0), +(196, 1, '2026-10-09 16:28:30', '2026-10-09 22:27:43', ' ', '', '', 'publish', 'closed', 'closed', '', '196', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=196', 8, 'nav_menu_item', '', 0), +(197, 1, '2026-10-09 16:28:30', '2026-10-09 22:27:43', ' ', '', '', 'publish', 'closed', 'closed', '', '197', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=197', 7, 'nav_menu_item', '', 0), +(198, 1, '2026-10-09 16:28:30', '2026-10-09 22:27:43', ' ', '', '', 'publish', 'closed', 'closed', '', '198', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=198', 6, 'nav_menu_item', '', 0), +(199, 1, '2026-10-09 16:28:30', '2026-10-09 22:27:43', ' ', '', '', 'publish', 'closed', 'closed', '', '199', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=199', 5, 'nav_menu_item', '', 0), +(200, 1, '2026-10-09 16:28:30', '2026-10-09 22:27:43', ' ', '', '', 'publish', 'closed', 'closed', '', '200', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=200', 4, 'nav_menu_item', '', 0), +(201, 1, '2026-10-09 16:28:30', '2026-10-09 22:27:43', ' ', '', '', 'publish', 'closed', 'closed', '', '201', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=201', 3, 'nav_menu_item', '', 0), +(202, 1, '2026-10-09 16:28:30', '2026-10-09 22:27:43', ' ', '', '', 'publish', 'closed', 'closed', '', '202', '', '', '2026-10-09 16:28:30', '2026-10-09 22:28:30', '', 0, 'https://xmartica.xyz/?p=202', 2, 'nav_menu_item', '', 0), +(203, 0, '2026-10-09 17:41:05', '2026-10-09 23:41:05', '
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n[submit \"Send message\"]\r\n\r\n
\n1\n[_site_title] New contact request from [your-name]\n[_site_title] \n[_site_admin_email]\nName: [your-name]\r\nWork email: [your-email]\r\nCompany: [your-company]\r\nArea of interest: [interest]\r\n\r\nMessage:\r\n[your-message]\r\n\r\n--\r\nThis message was sent from the contact form on [_site_title] ([_site_url]).\nReply-To: [your-email]\n\n1\n1\n\n[_site_title] \"[your-subject]\"\n[_site_title] \n[your-email]\nMessage Body:\r\n[your-message]\r\n\r\n-- \r\nThis email is a receipt for your contact form submission on our website ([_site_title] [_site_url]) in which your email address was used. If that was not you, please ignore this message.\nReply-To: [_site_admin_email]\n\n1\n1\nThanks — your message has been sent. We\'ll be in touch shortly.\nThere was an error trying to send your message. Please try again later.\nOne or more fields have an error. Please check and try again.\nThere was an error trying to send your message. Please try again later.\nYou must accept the terms and conditions before sending your message.\nPlease fill out this field.\nThis field has a too long input.\nThis field has a too short input.\nThere was an unknown error uploading the file.\nYou are not allowed to upload files of this type.\nThe uploaded file is too large.\nThere was an error uploading the file.\nPlease enter a date in YYYY-MM-DD format.\nThis field has a too early date.\nThis field has a too late date.\nPlease enter a number.\nThis field has a too small number.\nThis field has a too large number.\nThe answer to the quiz is incorrect.\nPlease enter an email address.\nPlease enter a URL.\nPlease enter a telephone number.', '2.- Contact form (English)', '', 'publish', 'closed', 'closed', '', '2-contact-form-english', '', '', '2026-10-09 17:43:01', '2026-10-09 23:43:01', '', 0, 'https://xmartica.xyz/?post_type=wpcf7_contact_form&p=203', 0, 'wpcf7_contact_form', '', 0), +(204, 1, '2026-10-09 18:02:47', '2026-10-10 00:02:47', '\n

Quiénes somos

\n\n\n

Texto sugerido: La dirección de nuestra web es: https://xmartica.xyz.

\n\n\n

Comentarios

\n\n\n

Texto sugerido: Cuando los visitantes dejan comentarios en la web, recopilamos los datos que se muestran en el formulario de comentarios, así como la dirección IP del visitante y la cadena de agentes de usuario del navegador para ayudar a la detección de spam.

\n\n\n

Una cadena anónima creada a partir de tu dirección de correo electrónico (también llamada hash) puede ser proporcionada al servicio de Gravatar para ver si la estás usando. La política de privacidad del servicio Gravatar está disponible aquí: https://automattic.com/privacy/. Después de la aprobación de tu comentario, la imagen de tu perfil es visible para el público en el contexto de su comentario.

\n\n\n

Medios

\n\n\n

Texto sugerido: Si subes imágenes a la web deberías evitar subir imágenes con datos de ubicación (GPS EXIF) incluidos. Los visitantes de la web pueden descargar y extraer cualquier dato de localización de las imágenes de la web.

\n\n\n

Cookies

\n\n\n

Texto sugerido: Si dejas un comentario en nuestro sitio puedes elegir guardar tu nombre, dirección de correo electrónico y web en cookies. Esto es para tu comodidad, para que no tengas que volver a rellenar tus datos cuando dejes otro comentario. Estas cookies tendrán una duración de un año.

\n\n\n

Si tienes una cuenta y te conectas a este sitio, instalaremos una cookie temporal para determinar si tu navegador acepta cookies. Esta cookie no contiene datos personales y se elimina al cerrar el navegador.

\n\n\n

Cuando inicias sesión, también instalaremos varias cookies para guardar tu información de inicio de sesión y tus opciones de visualización de pantalla. Las cookies de inicio de sesión duran dos días, y las cookies de opciones de pantalla duran un año. Si seleccionas "Recordarme", tu inicio de sesión perdurará durante dos semanas. Si sales de tu cuenta, las cookies de inicio de sesión se eliminarán.

\n\n\n

Si editas o publicas un artículo se guardará una cookie adicional en tu navegador. Esta cookie no incluye datos personales y simplemente indica el ID del artículo que acabas de editar. Caduca después de 1 día.

\n\n\n

Contenido incrustado de otros sitios web

\n\n\n

Texto sugerido: Los artículos de este sitio pueden incluir contenido incrustado (por ejemplo, vídeos, imágenes, artículos, etc.). El contenido incrustado de otras web se comporta exactamente de la misma manera que si el visitante hubiera visitado la otra web.

\n\n\n

Estas web pueden recopilar datos sobre ti, utilizar cookies, incrustar un seguimiento adicional de terceros, y supervisar tu interacción con ese contenido incrustado, incluido el seguimiento de tu interacción con el contenido incrustado si tienes una cuenta y estás conectado a esa web.

\n\n\n

Con quién compartimos tus datos

\n\n\n

Texto sugerido: Si solicitas un restablecimiento de contraseña, tu dirección IP será incluida en el correo electrónico de restablecimiento.

\n\n\n

Cuánto tiempo conservamos tus datos

\n\n\n

Texto sugerido: Si dejas un comentario, el comentario y sus metadatos se conservan indefinidamente. Esto es para que podamos reconocer y aprobar comentarios sucesivos automáticamente en lugar de mantenerlos en una cola de moderación.

\n\n\n

De los usuarios que se registran en nuestra web (si los hay), también almacenamos la información personal que proporcionan en su perfil de usuario. Todos los usuarios pueden ver, editar o eliminar su información personal en cualquier momento (excepto que no pueden cambiar su nombre de usuario). Los administradores de la web también pueden ver y editar esa información.

\n\n\n

Qué derechos tienes sobre tus datos

\n\n\n

Texto sugerido: Si tienes una cuenta o has dejado comentarios en esta web, puedes solicitar recibir un archivo de exportación de los datos personales que tenemos sobre ti, incluyendo cualquier dato que nos hayas proporcionado. También puedes solicitar que eliminemos cualquier dato personal que tengamos sobre ti. Esto no incluye ningún dato que estemos obligados a conservar con fines administrativos, legales o de seguridad.

\n\n\n

Dónde se envían tus datos

\n\n\n

Texto sugerido: Los comentarios de los visitantes puede que los revise un servicio de detección automática de spam.

\n\n', 'Política de privacidad', '', 'inherit', 'closed', 'closed', '', '3-revision-v1', '', '', '2026-10-09 18:02:47', '2026-10-10 00:02:47', '', 3, 'https://xmartica.xyz/?p=204', 0, 'revision', '', 0), +(205, 1, '2026-10-09 18:05:03', '2026-10-10 00:05:03', '', 'Consultoría de Transformación Empresarial', '', 'publish', 'closed', 'closed', '', 'consultoria-de-transformacion-empresarial', '', '', '2026-10-10 10:08:07', '2026-10-10 16:08:07', '', 0, 'https://xmartica.xyz/?page_id=205', 0, 'page', '', 0), +(206, 1, '2026-10-09 18:05:03', '2026-10-10 00:05:03', '', 'Business Transformation Consulting', '', 'inherit', 'closed', 'closed', '', '205-revision-v1', '', '', '2026-10-09 18:05:03', '2026-10-10 00:05:03', '', 205, 'https://xmartica.xyz/?p=206', 0, 'revision', '', 0), +(207, 1, '2026-10-09 18:05:46', '2026-10-10 00:05:46', '', 'Consultoría de Transformación Digital', '', 'publish', 'closed', 'closed', '', 'consultoria-de-transformacion-digital', '', '', '2026-10-10 10:09:55', '2026-10-10 16:09:55', '', 0, 'https://xmartica.xyz/?page_id=207', 0, 'page', '', 0), +(208, 1, '2026-10-09 18:05:46', '2026-10-10 00:05:46', '', 'Digital Transformation Consulting', '', 'inherit', 'closed', 'closed', '', '207-revision-v1', '', '', '2026-10-09 18:05:46', '2026-10-10 00:05:46', '', 207, 'https://xmartica.xyz/?p=208', 0, 'revision', '', 0), +(209, 1, '2026-10-09 18:08:23', '2026-10-10 00:08:23', '', 'Consultoría de Transformación Empresarial', '', 'inherit', 'closed', 'closed', '', '205-revision-v1', '', '', '2026-10-09 18:08:23', '2026-10-10 00:08:23', '', 205, 'https://xmartica.xyz/?p=209', 0, 'revision', '', 0), +(210, 1, '2026-10-09 18:08:40', '2026-10-10 00:08:40', '', 'Consultoría de Transformación Digital', '', 'inherit', 'closed', 'closed', '', '207-revision-v1', '', '', '2026-10-09 18:08:40', '2026-10-10 00:08:40', '', 207, 'https://xmartica.xyz/?p=210', 0, 'revision', '', 0), +(211, 1, '2026-10-09 18:10:01', '2026-10-10 00:10:01', '', 'Consultoría de Mejora de Procesos', '', 'publish', 'closed', 'closed', '', 'consultoria-de-mejora-de-procesos', '', '', '2026-10-10 10:19:35', '2026-10-10 16:19:35', '', 0, 'https://xmartica.xyz/?page_id=211', 0, 'page', '', 0), +(212, 1, '2026-10-09 18:10:01', '2026-10-10 00:10:01', '', 'Consultoría de Mejora de Procesos', '', 'inherit', 'closed', 'closed', '', '211-revision-v1', '', '', '2026-10-09 18:10:01', '2026-10-10 00:10:01', '', 211, 'https://xmartica.xyz/?p=212', 0, 'revision', '', 0), +(213, 1, '2026-10-09 18:10:27', '2026-10-10 00:10:27', '', 'Consultoría de Datos y Analítica', '', 'publish', 'closed', 'closed', '', 'consultoria-de-datos-y-analitica', '', '', '2026-10-10 09:59:15', '2026-10-10 15:59:15', '', 0, 'https://xmartica.xyz/?page_id=213', 0, 'page', '', 0), +(214, 1, '2026-10-09 18:10:27', '2026-10-10 00:10:27', '', 'Consultoría de Datos y Analítica', '', 'inherit', 'closed', 'closed', '', '213-revision-v1', '', '', '2026-10-09 18:10:27', '2026-10-10 00:10:27', '', 213, 'https://xmartica.xyz/?p=214', 0, 'revision', '', 0), +(215, 1, '2026-10-09 18:11:00', '2026-10-10 00:11:00', '', 'Consultoría de Estrategia de IA', '', 'publish', 'closed', 'closed', '', 'consultoria-de-estrategia-de-ia', '', '', '2026-10-10 10:25:21', '2026-10-10 16:25:21', '', 0, 'https://xmartica.xyz/?page_id=215', 0, 'page', '', 0), +(216, 1, '2026-10-09 18:11:00', '2026-10-10 00:11:00', '', 'Consultoría de Estrategia de IA', '', 'inherit', 'closed', 'closed', '', '215-revision-v1', '', '', '2026-10-09 18:11:00', '2026-10-10 00:11:00', '', 215, 'https://xmartica.xyz/?p=216', 0, 'revision', '', 0), +(217, 1, '2026-10-09 18:11:43', '2026-10-10 00:11:43', '', 'Consultoría de Gestión del Cambio', '', 'publish', 'closed', 'closed', '', 'consultoria-de-gestion-del-cambio', '', '', '2026-10-10 11:29:52', '2026-10-10 17:29:52', '', 0, 'https://xmartica.xyz/?page_id=217', 0, 'page', '', 0), +(218, 1, '2026-10-09 18:11:43', '2026-10-10 00:11:43', '', 'Consultoría de Gestión del Cambio', '', 'inherit', 'closed', 'closed', '', '217-revision-v1', '', '', '2026-10-09 18:11:43', '2026-10-10 00:11:43', '', 217, 'https://xmartica.xyz/?p=218', 0, 'revision', '', 0), +(219, 1, '2026-10-09 18:12:04', '2026-10-10 00:12:04', '', 'Estrategia de Experiencia de Cliente', '', 'publish', 'closed', 'closed', '', 'estrategia-de-experiencia-de-cliente', '', '', '2026-10-10 11:27:03', '2026-10-10 17:27:03', '', 0, 'https://xmartica.xyz/?page_id=219', 0, 'page', '', 0), +(220, 1, '2026-10-09 18:12:04', '2026-10-10 00:12:04', '', 'Estrategia de Experiencia de Cliente', '', 'inherit', 'closed', 'closed', '', '219-revision-v1', '', '', '2026-10-09 18:12:04', '2026-10-10 00:12:04', '', 219, 'https://xmartica.xyz/?p=220', 0, 'revision', '', 0), +(221, 1, '2026-10-09 18:13:35', '2026-10-10 00:13:35', '', 'Business Transformation Consulting', '', 'inherit', 'closed', 'closed', '', '60-revision-v1', '', '', '2026-10-09 18:13:35', '2026-10-10 00:13:35', '', 60, 'https://xmartica.xyz/?p=221', 0, 'revision', '', 0), +(222, 1, '2026-10-09 18:13:47', '2026-10-10 00:13:47', '', 'Digital Transformation Consulting', '', 'inherit', 'closed', 'closed', '', '75-revision-v1', '', '', '2026-10-09 18:13:47', '2026-10-10 00:13:47', '', 75, 'https://xmartica.xyz/?p=222', 0, 'revision', '', 0), +(223, 1, '2026-10-09 18:13:57', '2026-10-10 00:13:57', '', 'Process Improvement Consulting', '', 'inherit', 'closed', 'closed', '', '78-revision-v1', '', '', '2026-10-09 18:13:57', '2026-10-10 00:13:57', '', 78, 'https://xmartica.xyz/?p=223', 0, 'revision', '', 0), +(224, 1, '2026-10-09 18:14:06', '2026-10-10 00:14:06', '', 'Data & Analytics Consulting', '', 'inherit', 'closed', 'closed', '', '85-revision-v1', '', '', '2026-10-09 18:14:06', '2026-10-10 00:14:06', '', 85, 'https://xmartica.xyz/?p=224', 0, 'revision', '', 0), +(225, 1, '2026-10-09 18:14:18', '2026-10-10 00:14:18', '', 'AI Strategy Consulting', '', 'inherit', 'closed', 'closed', '', '89-revision-v1', '', '', '2026-10-09 18:14:18', '2026-10-10 00:14:18', '', 89, 'https://xmartica.xyz/?p=225', 0, 'revision', '', 0), +(226, 1, '2026-10-09 18:14:26', '2026-10-10 00:14:26', '', 'Change Management Consulting', '', 'inherit', 'closed', 'closed', '', '99-revision-v1', '', '', '2026-10-09 18:14:26', '2026-10-10 00:14:26', '', 99, 'https://xmartica.xyz/?p=226', 0, 'revision', '', 0), +(227, 1, '2026-10-09 18:14:38', '2026-10-10 00:14:38', '', 'Customer Experience Strategy', '', 'inherit', 'closed', 'closed', '', '109-revision-v1', '', '', '2026-10-09 18:14:38', '2026-10-10 00:14:38', '', 109, 'https://xmartica.xyz/?p=227', 0, 'revision', '', 0); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_rank_math_internal_links` +-- Estructura de tabla para la tabla `xm_aca_rank_math_internal_links` -- -CREATE TABLE `wp_rank_math_internal_links` ( +CREATE TABLE `xm_aca_rank_math_internal_links` ( `id` bigint UNSIGNED NOT NULL, `url` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL, `post_id` bigint UNSIGNED NOT NULL, @@ -1213,19 +1500,20 @@ CREATE TABLE `wp_rank_math_internal_links` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_rank_math_internal_links` +-- Volcado de datos para la tabla `xm_aca_rank_math_internal_links` -- -INSERT INTO `wp_rank_math_internal_links` (`id`, `url`, `post_id`, `target_post_id`, `type`) VALUES -(4, 'https://xmartica.xyz/wp-admin/', 2, 0, 'internal'); +INSERT INTO `xm_aca_rank_math_internal_links` (`id`, `url`, `post_id`, `target_post_id`, `type`) VALUES +(7, 'https://xmartica.xyz/wp-admin/', 178, 0, 'internal'), +(8, 'https://xmartica.xyz/wp-admin/', 2, 0, 'internal'); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_rank_math_internal_meta` +-- Estructura de tabla para la tabla `xm_aca_rank_math_internal_meta` -- -CREATE TABLE `wp_rank_math_internal_meta` ( +CREATE TABLE `xm_aca_rank_math_internal_meta` ( `object_id` bigint UNSIGNED NOT NULL, `internal_link_count` int UNSIGNED DEFAULT '0', `external_link_count` int UNSIGNED DEFAULT '0', @@ -1233,10 +1521,10 @@ CREATE TABLE `wp_rank_math_internal_meta` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_rank_math_internal_meta` +-- Volcado de datos para la tabla `xm_aca_rank_math_internal_meta` -- -INSERT INTO `wp_rank_math_internal_meta` (`object_id`, `internal_link_count`, `external_link_count`, `incoming_link_count`) VALUES +INSERT INTO `xm_aca_rank_math_internal_meta` (`object_id`, `internal_link_count`, `external_link_count`, `incoming_link_count`) VALUES (1, 0, 0, 0), (2, 1, 0, 0), (60, 0, 0, 0), @@ -1245,15 +1533,25 @@ INSERT INTO `wp_rank_math_internal_meta` (`object_id`, `internal_link_count`, `e (85, 0, 0, 0), (89, 0, 0, 0), (99, 0, 0, 0), -(109, 0, 0, 0); +(109, 0, 0, 0), +(178, 1, 0, 0), +(181, 0, 0, 0), +(184, 0, 0, 0), +(205, 0, 0, 0), +(207, 0, 0, 0), +(211, 0, 0, 0), +(213, 0, 0, 0), +(215, 0, 0, 0), +(217, 0, 0, 0), +(219, 0, 0, 0); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_termmeta` +-- Estructura de tabla para la tabla `xm_aca_termmeta` -- -CREATE TABLE `wp_termmeta` ( +CREATE TABLE `xm_aca_termmeta` ( `meta_id` bigint UNSIGNED NOT NULL, `term_id` bigint UNSIGNED NOT NULL DEFAULT '0', `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, @@ -1263,10 +1561,10 @@ CREATE TABLE `wp_termmeta` ( -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_terms` +-- Estructura de tabla para la tabla `xm_aca_terms` -- -CREATE TABLE `wp_terms` ( +CREATE TABLE `xm_aca_terms` ( `term_id` bigint UNSIGNED NOT NULL, `name` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', `slug` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', @@ -1274,10 +1572,10 @@ CREATE TABLE `wp_terms` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_terms` +-- Volcado de datos para la tabla `xm_aca_terms` -- -INSERT INTO `wp_terms` (`term_id`, `name`, `slug`, `term_group`) VALUES +INSERT INTO `xm_aca_terms` (`term_id`, `name`, `slug`, `term_group`) VALUES (1, 'Sin categoría', 'sin-categoria', 0), (2, 'text', 'text', 0), (3, 'after_paragraph', 'after_paragraph', 0), @@ -1288,26 +1586,55 @@ INSERT INTO `wp_terms` (`term_id`, `name`, `slug`, `term_group`) VALUES (8, 'disable', 'disable', 0), (9, 'comments', 'comments', 0), (10, 'Header ETS', 'header-ets', 0), -(11, 'xmartica', 'xmartica', 0); +(11, 'xmartica', 'xmartica', 0), +(17, 'Uncategorized', 'uncategorized-es', 0), +(18, 'pll_6ac91704e47c3', 'pll_6ac91704e47c3', 0), +(26, 'Uncategorized', 'uncategorized-en', 0), +(27, 'pll_6ac93049b19c1', 'pll_6ac93049b19c1', 0), +(30, 'English', 'en', 0), +(31, 'English', 'pll_en', 0), +(32, 'pll_6ac932685c818', 'pll_6ac932685c818', 0), +(33, 'pll_6ac932777e5ab', 'pll_6ac932777e5ab', 0), +(34, 'pll_6ac932777e5b8', 'pll_6ac932777e5b8', 0), +(35, 'Español', 'es', 0), +(36, 'Español', 'pll_es', 0), +(37, 'pll_6ac9329b690b6', 'pll_6ac9329b690b6', 0), +(38, 'pll_6ac932e4b8215', 'pll_6ac932e4b8215', 0), +(39, 'Header ETS ES', 'header-ets-es', 0), +(40, 'pll_6ac9812f9e3e5', 'pll_6ac9812f9e3e5', 0), +(41, 'pll_6ac9815a8bcb4', 'pll_6ac9815a8bcb4', 0), +(42, 'pll_6ac98258f0bfb', 'pll_6ac98258f0bfb', 0), +(43, 'pll_6ac982736b5a5', 'pll_6ac982736b5a5', 0), +(44, 'pll_6ac982946eb23', 'pll_6ac982946eb23', 0), +(45, 'pll_6ac982bfe6935', 'pll_6ac982bfe6935', 0), +(46, 'pll_6ac982d462e7f', 'pll_6ac982d462e7f', 0); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_term_relationships` +-- Estructura de tabla para la tabla `xm_aca_term_relationships` -- -CREATE TABLE `wp_term_relationships` ( +CREATE TABLE `xm_aca_term_relationships` ( `object_id` bigint UNSIGNED NOT NULL DEFAULT '0', `term_taxonomy_id` bigint UNSIGNED NOT NULL DEFAULT '0', `term_order` int NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_term_relationships` +-- Volcado de datos para la tabla `xm_aca_term_relationships` -- -INSERT INTO `wp_term_relationships` (`object_id`, `term_taxonomy_id`, `term_order`) VALUES +INSERT INTO `xm_aca_term_relationships` (`object_id`, `term_taxonomy_id`, `term_order`) VALUES (1, 1, 0), +(1, 30, 0), +(1, 31, 0), +(1, 33, 0), +(2, 29, 0), +(2, 30, 0), +(2, 38, 0), +(3, 30, 0), +(5, 30, 0), (7, 2, 0), (7, 3, 0), (7, 4, 0), @@ -1317,17 +1644,71 @@ INSERT INTO `wp_term_relationships` (`object_id`, `term_taxonomy_id`, `term_orde (8, 7, 0), (8, 8, 0), (8, 9, 0), +(17, 19, 0), +(17, 28, 0), +(17, 36, 0), +(17, 37, 0), (21, 10, 0), (22, 10, 0), -(44, 11, 0); +(26, 31, 0), +(26, 34, 0), +(44, 11, 0), +(60, 30, 0), +(60, 40, 0), +(75, 30, 0), +(75, 41, 0), +(78, 30, 0), +(78, 42, 0), +(85, 30, 0), +(85, 43, 0), +(89, 30, 0), +(89, 44, 0), +(99, 30, 0), +(99, 45, 0), +(109, 30, 0), +(109, 46, 0), +(177, 30, 0), +(180, 30, 0), +(184, 35, 0), +(184, 38, 0), +(186, 10, 0), +(187, 10, 0), +(188, 10, 0), +(189, 10, 0), +(190, 10, 0), +(191, 10, 0), +(192, 10, 0), +(194, 39, 0), +(195, 39, 0), +(196, 39, 0), +(197, 39, 0), +(198, 39, 0), +(199, 39, 0), +(200, 39, 0), +(201, 39, 0), +(202, 39, 0), +(205, 35, 0), +(205, 40, 0), +(207, 35, 0), +(207, 41, 0), +(211, 35, 0), +(211, 42, 0), +(213, 35, 0), +(213, 43, 0), +(215, 35, 0), +(215, 44, 0), +(217, 35, 0), +(217, 45, 0), +(219, 35, 0), +(219, 46, 0); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_term_taxonomy` +-- Estructura de tabla para la tabla `xm_aca_term_taxonomy` -- -CREATE TABLE `wp_term_taxonomy` ( +CREATE TABLE `xm_aca_term_taxonomy` ( `term_taxonomy_id` bigint UNSIGNED NOT NULL, `term_id` bigint UNSIGNED NOT NULL DEFAULT '0', `taxonomy` varchar(32) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', @@ -1337,10 +1718,10 @@ CREATE TABLE `wp_term_taxonomy` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_term_taxonomy` +-- Volcado de datos para la tabla `xm_aca_term_taxonomy` -- -INSERT INTO `wp_term_taxonomy` (`term_taxonomy_id`, `term_id`, `taxonomy`, `description`, `parent`, `count`) VALUES +INSERT INTO `xm_aca_term_taxonomy` (`term_taxonomy_id`, `term_id`, `taxonomy`, `description`, `parent`, `count`) VALUES (1, 1, 'category', '', 0, 1), (2, 2, 'wpcode_type', '', 0, 1), (3, 3, 'wpcode_location', '', 0, 1), @@ -1350,16 +1731,37 @@ INSERT INTO `wp_term_taxonomy` (`term_taxonomy_id`, `term_id`, `taxonomy`, `desc (7, 7, 'wpcode_location', '', 0, 1), (8, 8, 'wpcode_tags', '', 0, 1), (9, 9, 'wpcode_tags', '', 0, 1), -(10, 10, 'nav_menu', '', 0, 2), -(11, 11, 'wp_theme', '', 0, 1); +(10, 10, 'nav_menu', '', 0, 9), +(11, 11, 'wp_theme', '', 0, 1), +(17, 17, 'category', '', 0, 0), +(18, 18, 'term_translations', 'a:1:{s:2:\"en\";i:17;}', 0, 0), +(26, 26, 'category', '', 0, 0), +(27, 27, 'term_translations', 'a:1:{s:2:\"es\";i:26;}', 0, 0), +(30, 30, 'language', 'a:4:{s:9:\"fallbacks\";a:0:{}s:6:\"locale\";s:5:\"en_US\";s:3:\"rtl\";b:0;s:9:\"flag_code\";s:2:\"us\";}', 0, 10), +(31, 31, 'term_language', '', 0, 2), +(32, 32, 'term_translations', 'a:1:{s:2:\"en\";i:17;}', 0, 0), +(33, 33, 'term_translations', 'a:1:{s:2:\"en\";i:1;}', 0, 1), +(34, 34, 'term_translations', 'a:1:{s:2:\"en\";i:26;}', 0, 1), +(35, 35, 'language', 'a:4:{s:9:\"fallbacks\";a:0:{}s:6:\"locale\";s:5:\"es_MX\";s:3:\"rtl\";b:0;s:9:\"flag_code\";s:2:\"mx\";}', 0, 8), +(36, 36, 'term_language', '', 0, 1), +(37, 37, 'term_translations', 'a:1:{s:2:\"es\";i:17;}', 0, 1), +(38, 38, 'post_translations', 'a:2:{s:2:\"es\";i:184;s:2:\"en\";i:2;}', 0, 2), +(39, 39, 'nav_menu', '', 0, 9), +(40, 40, 'post_translations', 'a:2:{s:2:\"es\";i:205;s:2:\"en\";i:60;}', 0, 2), +(41, 41, 'post_translations', 'a:2:{s:2:\"es\";i:207;s:2:\"en\";i:75;}', 0, 2), +(42, 42, 'post_translations', 'a:2:{s:2:\"es\";i:211;s:2:\"en\";i:78;}', 0, 2), +(43, 43, 'post_translations', 'a:2:{s:2:\"es\";i:213;s:2:\"en\";i:85;}', 0, 2), +(44, 44, 'post_translations', 'a:2:{s:2:\"es\";i:215;s:2:\"en\";i:89;}', 0, 2), +(45, 45, 'post_translations', 'a:2:{s:2:\"es\";i:217;s:2:\"en\";i:99;}', 0, 2), +(46, 46, 'post_translations', 'a:2:{s:2:\"es\";i:219;s:2:\"en\";i:109;}', 0, 2); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_usermeta` +-- Estructura de tabla para la tabla `xm_aca_usermeta` -- -CREATE TABLE `wp_usermeta` ( +CREATE TABLE `xm_aca_usermeta` ( `umeta_id` bigint UNSIGNED NOT NULL, `user_id` bigint UNSIGNED NOT NULL DEFAULT '0', `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, @@ -1367,10 +1769,10 @@ CREATE TABLE `wp_usermeta` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_usermeta` +-- Volcado de datos para la tabla `xm_aca_usermeta` -- -INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES +INSERT INTO `xm_aca_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (1, 1, 'nickname', 'gabriel'), (2, 1, 'first_name', ''), (3, 1, 'last_name', ''), @@ -1383,31 +1785,34 @@ INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALU (10, 1, 'use_ssl', '0'), (11, 1, 'show_admin_bar_front', 'true'), (12, 1, 'locale', ''), -(13, 1, 'wp_capabilities', 'a:1:{s:13:\"administrator\";b:1;}'), -(14, 1, 'wp_user_level', '10'), +(13, 1, 'xm_aca_capabilities', 'a:1:{s:13:\"administrator\";b:1;}'), +(14, 1, 'xm_aca_user_level', '10'), (15, 1, 'dismissed_wp_pointers', ''), (16, 1, 'show_welcome_panel', '1'), -(17, 1, 'session_tokens', 'a:1:{s:64:\"20ac7f9a4b73395fa42c82cb668e333449b3285bf5f8475e2121e94d7480d05e\";a:4:{s:10:\"expiration\";i:1791569908;s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:84:\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:157.0) Gecko/20100101 Firefox/157.0\";s:5:\"login\";i:1791397108;}}'), -(18, 1, 'wp_dashboard_quick_press_last_post_id', '4'), +(17, 1, 'session_tokens', 'a:2:{s:64:\"f3c39a1790a76747162bba34962b6034464fe32923591e42db0f6e993d07f64e\";a:4:{s:10:\"expiration\";i:1791742748;s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:84:\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:157.0) Gecko/20100101 Firefox/157.0\";s:5:\"login\";i:1791569948;}s:64:\"c83f5f83538b9a35476011ea2a0f96126b2df575e50f1f2771599dc3134bc528\";a:4:{s:10:\"expiration\";i:1791907616;s:2:\"ip\";s:9:\"127.0.0.1\";s:2:\"ua\";s:84:\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:157.0) Gecko/20100101 Firefox/157.0\";s:5:\"login\";i:1791734816;}}'), +(18, 1, 'xm_aca_dashboard_quick_press_last_post_id', '177'), (19, 1, 'community-events-location', 'a:1:{s:2:\"ip\";s:9:\"127.0.0.0\";}'), (20, 1, 'manageedit-postcolumnshidden', 'a:3:{i:0;s:0:\"\";i:1;s:15:\"rank_math_title\";i:2;s:21:\"rank_math_description\";}'), (21, 1, 'manageedit-postcolumnshidden_default', '1'), (22, 1, 'manageedit-pagecolumnshidden', 'a:3:{i:0;s:0:\"\";i:1;s:15:\"rank_math_title\";i:2;s:21:\"rank_math_description\";}'), (23, 1, 'manageedit-pagecolumnshidden_default', '1'), -(24, 1, 'last_update', '1791276517'), +(24, 1, 'last_update', '1791631792'), (25, 1, 'meta-box-order_post', 'a:2:{i:0;b:0;s:4:\"side\";s:38:\"submitdiv,rank_math_metabox_content_ai\";}'), -(26, 1, 'wp_persisted_preferences', 'a:3:{s:4:\"core\";a:1:{s:26:\"isComplementaryAreaVisible\";b:1;}s:14:\"core/edit-post\";a:4:{s:12:\"welcomeGuide\";b:0;s:19:\"metaBoxesMainIsOpen\";b:0;s:14:\"fullscreenMode\";b:0;s:23:\"metaBoxesMainOpenHeight\";d:255.5;}s:9:\"_modified\";s:24:\"2026-10-06T13:36:57.988Z\";}'), +(26, 1, 'wp_persisted_preferences', 'a:3:{s:4:\"core\";a:1:{s:26:\"isComplementaryAreaVisible\";b:1;}s:14:\"core/edit-post\";a:4:{s:12:\"welcomeGuide\";b:0;s:19:\"metaBoxesMainIsOpen\";b:1;s:14:\"fullscreenMode\";b:0;s:23:\"metaBoxesMainOpenHeight\";d:255.5;}s:9:\"_modified\";s:24:\"2026-10-09T18:20:19.650Z\";}'), (27, 1, 'meta-box-order_page', 'a:2:{i:0;b:0;s:4:\"side\";s:38:\"submitdiv,rank_math_metabox_content_ai\";}'), -(28, 1, 'wp_user-settings', 'libraryContent=browse'), -(29, 1, 'wp_user-settings-time', '1791057518'); +(28, 1, 'xm_aca_user-settings', 'libraryContent=browse'), +(29, 1, 'xm_aca_user-settings-time', '1791057518'), +(30, 1, 'nav_menu_recently_edited', '10'), +(31, 1, 'managenav-menuscolumnshidden', 'a:5:{i:0;s:11:\"link-target\";i:1;s:11:\"css-classes\";i:2;s:3:\"xfn\";i:3;s:11:\"description\";i:4;s:15:\"title-attribute\";}'), +(32, 1, 'metaboxhidden_nav-menus', 'a:2:{i:0;s:19:\"pll_lang_switch_box\";i:1;s:12:\"add-post_tag\";}'); -- -------------------------------------------------------- -- --- Estructura de tabla para la tabla `wp_users` +-- Estructura de tabla para la tabla `xm_aca_users` -- -CREATE TABLE `wp_users` ( +CREATE TABLE `xm_aca_users` ( `ID` bigint UNSIGNED NOT NULL, `user_login` varchar(60) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', `user_pass` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', @@ -1421,10 +1826,10 @@ CREATE TABLE `wp_users` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -- --- Volcado de datos para la tabla `wp_users` +-- Volcado de datos para la tabla `xm_aca_users` -- -INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES +INSERT INTO `xm_aca_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES (1, 'gabriel', '$wp$2y$10$MXLNXtUDvZV/dNJgbUQbPOXA.Z80foN4lDtKH1RP1226sGl8Vr3x.', 'gabriel', 'gabriel.ron@konvertti.com', 'https://xmartica.xyz', '2026-09-30 21:21:04', '', 0, 'gabriel'); -- @@ -1432,9 +1837,9 @@ INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_ -- -- --- Indices de la tabla `wp_actionscheduler_actions` +-- Indices de la tabla `xm_aca_actionscheduler_actions` -- -ALTER TABLE `wp_actionscheduler_actions` +ALTER TABLE `xm_aca_actionscheduler_actions` ADD PRIMARY KEY (`action_id`), ADD KEY `hook_status_scheduled_date_gmt` (`hook`(163),`status`,`scheduled_date_gmt`), ADD KEY `status_scheduled_date_gmt` (`status`,`scheduled_date_gmt`), @@ -1447,39 +1852,39 @@ ALTER TABLE `wp_actionscheduler_actions` ADD KEY `status_claim_id` (`status`,`claim_id`); -- --- Indices de la tabla `wp_actionscheduler_claims` +-- Indices de la tabla `xm_aca_actionscheduler_claims` -- -ALTER TABLE `wp_actionscheduler_claims` +ALTER TABLE `xm_aca_actionscheduler_claims` ADD PRIMARY KEY (`claim_id`), ADD KEY `date_created_gmt` (`date_created_gmt`); -- --- Indices de la tabla `wp_actionscheduler_groups` +-- Indices de la tabla `xm_aca_actionscheduler_groups` -- -ALTER TABLE `wp_actionscheduler_groups` +ALTER TABLE `xm_aca_actionscheduler_groups` ADD PRIMARY KEY (`group_id`), ADD KEY `slug` (`slug`(191)); -- --- Indices de la tabla `wp_actionscheduler_logs` +-- Indices de la tabla `xm_aca_actionscheduler_logs` -- -ALTER TABLE `wp_actionscheduler_logs` +ALTER TABLE `xm_aca_actionscheduler_logs` ADD PRIMARY KEY (`log_id`), ADD KEY `action_id` (`action_id`), ADD KEY `log_date_gmt` (`log_date_gmt`); -- --- Indices de la tabla `wp_aioseo_table_of_contents_cache` +-- Indices de la tabla `xm_aca_aioseo_table_of_contents_cache` -- -ALTER TABLE `wp_aioseo_table_of_contents_cache` +ALTER TABLE `xm_aca_aioseo_table_of_contents_cache` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `ndx_aioseo_table_of_contents_cache_name` (`name`), ADD KEY `ndx_aioseo_table_of_contents_cache_expiration` (`expiration`); -- --- Indices de la tabla `wp_aioseo_table_of_contents_notifications` +-- Indices de la tabla `xm_aca_aioseo_table_of_contents_notifications` -- -ALTER TABLE `wp_aioseo_table_of_contents_notifications` +ALTER TABLE `xm_aca_aioseo_table_of_contents_notifications` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `ndx__aioseo_table_of_contents_notifications_slug` (`slug`), ADD KEY `ndx__aioseo_table_of_contents_notifications_dates` (`start`,`end`), @@ -1487,17 +1892,17 @@ ALTER TABLE `wp_aioseo_table_of_contents_notifications` ADD KEY `ndx__aioseo_table_of_contents_notifications_dismissed` (`dismissed`); -- --- Indices de la tabla `wp_commentmeta` +-- Indices de la tabla `xm_aca_commentmeta` -- -ALTER TABLE `wp_commentmeta` +ALTER TABLE `xm_aca_commentmeta` ADD PRIMARY KEY (`meta_id`), ADD KEY `comment_id` (`comment_id`), ADD KEY `meta_key` (`meta_key`(191)); -- --- Indices de la tabla `wp_comments` +-- Indices de la tabla `xm_aca_comments` -- -ALTER TABLE `wp_comments` +ALTER TABLE `xm_aca_comments` ADD PRIMARY KEY (`comment_ID`), ADD KEY `comment_post_ID` (`comment_post_ID`), ADD KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`), @@ -1506,9 +1911,9 @@ ALTER TABLE `wp_comments` ADD KEY `comment_author_email` (`comment_author_email`(10)); -- --- Indices de la tabla `wp_compressx_images_meta` +-- Indices de la tabla `xm_aca_compressx_images_meta` -- -ALTER TABLE `wp_compressx_images_meta` +ALTER TABLE `xm_aca_compressx_images_meta` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `uniq_blog_attachment` (`blog_id`,`attachment_id`), ADD KEY `idx_mime_type` (`mime_type`), @@ -1518,47 +1923,47 @@ ALTER TABLE `wp_compressx_images_meta` ADD KEY `idx_updated_at` (`updated_at`); -- --- Indices de la tabla `wp_jooosi_fon_fonts` +-- Indices de la tabla `xm_aca_jooosi_fon_fonts` -- -ALTER TABLE `wp_jooosi_fon_fonts` +ALTER TABLE `xm_aca_jooosi_fon_fonts` ADD PRIMARY KEY (`id`), ADD KEY `jooosi_fon_deleted_status` (`deleted_at`,`status`), ADD KEY `jooosi_fon_type_deleted` (`type`,`deleted_at`), ADD KEY `jooosi_fon_slug` (`slug`(191)); -- --- Indices de la tabla `wp_jooosi_fon_migrations` +-- Indices de la tabla `xm_aca_jooosi_fon_migrations` -- -ALTER TABLE `wp_jooosi_fon_migrations` +ALTER TABLE `xm_aca_jooosi_fon_migrations` ADD PRIMARY KEY (`version`); -- --- Indices de la tabla `wp_links` +-- Indices de la tabla `xm_aca_links` -- -ALTER TABLE `wp_links` +ALTER TABLE `xm_aca_links` ADD PRIMARY KEY (`link_id`), ADD KEY `link_visible` (`link_visible`); -- --- Indices de la tabla `wp_options` +-- Indices de la tabla `xm_aca_options` -- -ALTER TABLE `wp_options` +ALTER TABLE `xm_aca_options` ADD PRIMARY KEY (`option_id`), ADD UNIQUE KEY `option_name` (`option_name`), ADD KEY `autoload` (`autoload`); -- --- Indices de la tabla `wp_postmeta` +-- Indices de la tabla `xm_aca_postmeta` -- -ALTER TABLE `wp_postmeta` +ALTER TABLE `xm_aca_postmeta` ADD PRIMARY KEY (`meta_id`), ADD KEY `post_id` (`post_id`), ADD KEY `meta_key` (`meta_key`(191)); -- --- Indices de la tabla `wp_posts` +-- Indices de la tabla `xm_aca_posts` -- -ALTER TABLE `wp_posts` +ALTER TABLE `xm_aca_posts` ADD PRIMARY KEY (`ID`), ADD KEY `post_name` (`post_name`(191)), ADD KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`), @@ -1567,62 +1972,62 @@ ALTER TABLE `wp_posts` ADD KEY `type_status_author` (`post_type`,`post_status`,`post_author`); -- --- Indices de la tabla `wp_rank_math_internal_links` +-- Indices de la tabla `xm_aca_rank_math_internal_links` -- -ALTER TABLE `wp_rank_math_internal_links` +ALTER TABLE `xm_aca_rank_math_internal_links` ADD PRIMARY KEY (`id`), ADD KEY `link_direction` (`post_id`,`type`), ADD KEY `target_post_id` (`target_post_id`); -- --- Indices de la tabla `wp_rank_math_internal_meta` +-- Indices de la tabla `xm_aca_rank_math_internal_meta` -- -ALTER TABLE `wp_rank_math_internal_meta` +ALTER TABLE `xm_aca_rank_math_internal_meta` ADD PRIMARY KEY (`object_id`); -- --- Indices de la tabla `wp_termmeta` +-- Indices de la tabla `xm_aca_termmeta` -- -ALTER TABLE `wp_termmeta` +ALTER TABLE `xm_aca_termmeta` ADD PRIMARY KEY (`meta_id`), ADD KEY `term_id` (`term_id`), ADD KEY `meta_key` (`meta_key`(191)); -- --- Indices de la tabla `wp_terms` +-- Indices de la tabla `xm_aca_terms` -- -ALTER TABLE `wp_terms` +ALTER TABLE `xm_aca_terms` ADD PRIMARY KEY (`term_id`), ADD KEY `slug` (`slug`(191)), ADD KEY `name` (`name`(191)); -- --- Indices de la tabla `wp_term_relationships` +-- Indices de la tabla `xm_aca_term_relationships` -- -ALTER TABLE `wp_term_relationships` +ALTER TABLE `xm_aca_term_relationships` ADD PRIMARY KEY (`object_id`,`term_taxonomy_id`), ADD KEY `term_taxonomy_id` (`term_taxonomy_id`); -- --- Indices de la tabla `wp_term_taxonomy` +-- Indices de la tabla `xm_aca_term_taxonomy` -- -ALTER TABLE `wp_term_taxonomy` +ALTER TABLE `xm_aca_term_taxonomy` ADD PRIMARY KEY (`term_taxonomy_id`), ADD UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`), ADD KEY `taxonomy` (`taxonomy`); -- --- Indices de la tabla `wp_usermeta` +-- Indices de la tabla `xm_aca_usermeta` -- -ALTER TABLE `wp_usermeta` +ALTER TABLE `xm_aca_usermeta` ADD PRIMARY KEY (`umeta_id`), ADD KEY `user_id` (`user_id`), ADD KEY `meta_key` (`meta_key`(191)); -- --- Indices de la tabla `wp_users` +-- Indices de la tabla `xm_aca_users` -- -ALTER TABLE `wp_users` +ALTER TABLE `xm_aca_users` ADD PRIMARY KEY (`ID`), ADD KEY `user_login_key` (`user_login`), ADD KEY `user_nicename` (`user_nicename`), @@ -1633,123 +2038,123 @@ ALTER TABLE `wp_users` -- -- --- AUTO_INCREMENT de la tabla `wp_actionscheduler_actions` +-- AUTO_INCREMENT de la tabla `xm_aca_actionscheduler_actions` -- -ALTER TABLE `wp_actionscheduler_actions` - MODIFY `action_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22; +ALTER TABLE `xm_aca_actionscheduler_actions` + MODIFY `action_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32; -- --- AUTO_INCREMENT de la tabla `wp_actionscheduler_claims` +-- AUTO_INCREMENT de la tabla `xm_aca_actionscheduler_claims` -- -ALTER TABLE `wp_actionscheduler_claims` - MODIFY `claim_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1202; +ALTER TABLE `xm_aca_actionscheduler_claims` + MODIFY `claim_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1784; -- --- AUTO_INCREMENT de la tabla `wp_actionscheduler_groups` +-- AUTO_INCREMENT de la tabla `xm_aca_actionscheduler_groups` -- -ALTER TABLE `wp_actionscheduler_groups` +ALTER TABLE `xm_aca_actionscheduler_groups` MODIFY `group_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- --- AUTO_INCREMENT de la tabla `wp_actionscheduler_logs` +-- AUTO_INCREMENT de la tabla `xm_aca_actionscheduler_logs` -- -ALTER TABLE `wp_actionscheduler_logs` - MODIFY `log_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44; +ALTER TABLE `xm_aca_actionscheduler_logs` + MODIFY `log_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72; -- --- AUTO_INCREMENT de la tabla `wp_aioseo_table_of_contents_cache` +-- AUTO_INCREMENT de la tabla `xm_aca_aioseo_table_of_contents_cache` -- -ALTER TABLE `wp_aioseo_table_of_contents_cache` - MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; +ALTER TABLE `xm_aca_aioseo_table_of_contents_cache` + MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24; -- --- AUTO_INCREMENT de la tabla `wp_aioseo_table_of_contents_notifications` +-- AUTO_INCREMENT de la tabla `xm_aca_aioseo_table_of_contents_notifications` -- -ALTER TABLE `wp_aioseo_table_of_contents_notifications` +ALTER TABLE `xm_aca_aioseo_table_of_contents_notifications` MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT; -- --- AUTO_INCREMENT de la tabla `wp_commentmeta` +-- AUTO_INCREMENT de la tabla `xm_aca_commentmeta` -- -ALTER TABLE `wp_commentmeta` +ALTER TABLE `xm_aca_commentmeta` MODIFY `meta_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT; -- --- AUTO_INCREMENT de la tabla `wp_comments` +-- AUTO_INCREMENT de la tabla `xm_aca_comments` -- -ALTER TABLE `wp_comments` +ALTER TABLE `xm_aca_comments` MODIFY `comment_ID` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- --- AUTO_INCREMENT de la tabla `wp_compressx_images_meta` +-- AUTO_INCREMENT de la tabla `xm_aca_compressx_images_meta` -- -ALTER TABLE `wp_compressx_images_meta` +ALTER TABLE `xm_aca_compressx_images_meta` MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44; -- --- AUTO_INCREMENT de la tabla `wp_jooosi_fon_fonts` +-- AUTO_INCREMENT de la tabla `xm_aca_jooosi_fon_fonts` -- -ALTER TABLE `wp_jooosi_fon_fonts` +ALTER TABLE `xm_aca_jooosi_fon_fonts` MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- --- AUTO_INCREMENT de la tabla `wp_links` +-- AUTO_INCREMENT de la tabla `xm_aca_links` -- -ALTER TABLE `wp_links` +ALTER TABLE `xm_aca_links` MODIFY `link_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT; -- --- AUTO_INCREMENT de la tabla `wp_options` +-- AUTO_INCREMENT de la tabla `xm_aca_options` -- -ALTER TABLE `wp_options` - MODIFY `option_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1839; +ALTER TABLE `xm_aca_options` + MODIFY `option_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2758; -- --- AUTO_INCREMENT de la tabla `wp_postmeta` +-- AUTO_INCREMENT de la tabla `xm_aca_postmeta` -- -ALTER TABLE `wp_postmeta` - MODIFY `meta_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=383; +ALTER TABLE `xm_aca_postmeta` + MODIFY `meta_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=615; -- --- AUTO_INCREMENT de la tabla `wp_posts` +-- AUTO_INCREMENT de la tabla `xm_aca_posts` -- -ALTER TABLE `wp_posts` - MODIFY `ID` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=177; +ALTER TABLE `xm_aca_posts` + MODIFY `ID` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=228; -- --- AUTO_INCREMENT de la tabla `wp_rank_math_internal_links` +-- AUTO_INCREMENT de la tabla `xm_aca_rank_math_internal_links` -- -ALTER TABLE `wp_rank_math_internal_links` - MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +ALTER TABLE `xm_aca_rank_math_internal_links` + MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- --- AUTO_INCREMENT de la tabla `wp_termmeta` +-- AUTO_INCREMENT de la tabla `xm_aca_termmeta` -- -ALTER TABLE `wp_termmeta` +ALTER TABLE `xm_aca_termmeta` MODIFY `meta_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT; -- --- AUTO_INCREMENT de la tabla `wp_terms` +-- AUTO_INCREMENT de la tabla `xm_aca_terms` -- -ALTER TABLE `wp_terms` - MODIFY `term_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; +ALTER TABLE `xm_aca_terms` + MODIFY `term_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47; -- --- AUTO_INCREMENT de la tabla `wp_term_taxonomy` +-- AUTO_INCREMENT de la tabla `xm_aca_term_taxonomy` -- -ALTER TABLE `wp_term_taxonomy` - MODIFY `term_taxonomy_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; +ALTER TABLE `xm_aca_term_taxonomy` + MODIFY `term_taxonomy_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47; -- --- AUTO_INCREMENT de la tabla `wp_usermeta` +-- AUTO_INCREMENT de la tabla `xm_aca_usermeta` -- -ALTER TABLE `wp_usermeta` - MODIFY `umeta_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30; +ALTER TABLE `xm_aca_usermeta` + MODIFY `umeta_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33; -- --- AUTO_INCREMENT de la tabla `wp_users` +-- AUTO_INCREMENT de la tabla `xm_aca_users` -- -ALTER TABLE `wp_users` +ALTER TABLE `xm_aca_users` MODIFY `ID` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; COMMIT; diff --git a/wp-content/plugins/duplicate-page/css/dp_gutenberg.css b/wp-content/plugins/duplicate-page/css/dp_gutenberg.css new file mode 100644 index 0000000..52c5d90 --- /dev/null +++ b/wp-content/plugins/duplicate-page/css/dp_gutenberg.css @@ -0,0 +1,23 @@ +.dt-duplicate-post-status-info .components-button.is-tertiary.is-link { + color: #ffffff; + background-color: #007cba; + border: 1px solid #007cba; + text-decoration: none; + border-radius: 3px; + padding: 5px 10px 8px; + font-weight: bold; + transition: all 0.3s ease; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; +} + +.dt-duplicate-post-status-info .components-button.is-tertiary.is-link:hover{ + border-color: #0071a1; + background-color: #0071a1; + transition: all 0.3s ease; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + +} \ No newline at end of file diff --git a/wp-content/plugins/duplicate-page/css/duplicate_page.css b/wp-content/plugins/duplicate-page/css/duplicate_page.css new file mode 100644 index 0000000..1b5f242 --- /dev/null +++ b/wp-content/plugins/duplicate-page/css/duplicate_page.css @@ -0,0 +1,90 @@ +.dpmrs { + width: 100%; + background: #f5f5f5; + border: 1px solid #cdcdcd; + border-left: 4px solid #0073aa; + display: none; + overflow: auto; +} + +.dpmrs .l_dpmrs { + width: 200px; + float: left; +} + +.dpmrs .l_dpmrs img { + float: left; + padding: 10px; +} + +.dpmrs .r_dpmrs { + float: left; + padding: 15px 10px; +} + +.close_dp_help { + text-decoration: none; + border-radius: 4px; + padding: 5px 15px; + color: #fff; + font-size: 16px; + margin: 10px; +} + +.close_dp_help:hover { + color: #fff !important; +} + +.close_dp_help.fm_close_btn { + float: right; + cursor: pointer; + text-decoration: none; + background: #e00e0e; + border-radius: 100%; + padding: 0px 6px; + display: block; + color: #fff; + font-size: 10px; + margin: 0px; +} + +.close_dp_help.fm_close_btn_1 { + background: #fbc21c; + border-bottom: 3px solid #b18400; + margin-right: 0px; + margin-left: 0px; +} + +.close_dp_help.fm_close_btn_2 { + background: #239200; + border-bottom: 3px solid #155600; + margin-right: 0px; +} + +.close_dp_help.fm_close_btn_3 { + background: #ff1105; + border-bottom: 3px solid #b30900; +} + +.clear { + clear: both; +} +.duplicate_page_settings .saving-txt { + background: #fff; + padding: 10px 15px; + box-shadow: 0 1px 1px rgb(0 0 0 / 4%); + margin-top: 20px; + border-radius: 3px; + border:1px solid #c3c4c7; + border-left: solid 4px #2271b1; +} +.duplicate_page_settings .settings-error{ + margin-bottom: 0; +} +.duplicate_page_settings #poststuff{ + padding-top: 0px; +} +.duplicate_page_settings .settings-error.notice{ + margin-top: 20px; + margin-bottom: 0px; +} \ No newline at end of file diff --git a/wp-content/plugins/duplicate-page/duplicatepage.php b/wp-content/plugins/duplicate-page/duplicatepage.php new file mode 100644 index 0000000..8057e61 --- /dev/null +++ b/wp-content/plugins/duplicate-page/duplicatepage.php @@ -0,0 +1,439 @@ + 'draft', + 'duplicate_post_redirect' => 'to_list', + 'duplicate_post_suffix' => '', + 'duplicate_post_editor' => 'classic', + ); + $opt = get_option('duplicate_page_options'); + if (!isset($opt['duplicate_post_status'])) { + update_option('duplicate_page_options', $defaultsettings); + } + } + /* + Action Links + */ + public function duplicate_page_plugin_action_links($links, $file) + { + if ($file == plugin_basename(__FILE__)) { + $duplicate_page_links = ''.__('Settings', 'duplicate-page').''; + $duplicate_page_donate = ''.__('Donate', 'duplicate-page').''; + array_unshift($links, $duplicate_page_donate); + array_unshift($links, $duplicate_page_links); + } + + return $links; + } + + /* + * Admin Menu + */ + public function duplicate_page_options_page() + { + add_options_page(__('Duplicate Page', 'duplicate-page'), __('Duplicate Page', 'duplicate-page'), 'manage_options', 'duplicate_page_settings', array(&$this, 'duplicate_page_settings')); + } + + /* + * Duplicate Page Admin Settings + */ + public function duplicate_page_settings() + { + if (current_user_can('manage_options')) { + include 'inc/admin-settings.php'; + } + } + + /* + * Main function + */ + public function dt_duplicate_post_as_draft() + { + /* + * get Nonce value + */ + $nonce = sanitize_text_field($_REQUEST['nonce']); + /* + * get the original post id + */ + + $post_id = (isset($_GET['post']) ? intval($_GET['post']) : intval($_POST['post'])); + if(!wp_verify_nonce( $nonce, 'dt-duplicate-page-'.$post_id)) { + wp_die(__('Security check issue, Please try again.','duplicate-page')); + } + $post = get_post($post_id); + $current_user_id = get_current_user_id(); + if (current_user_can('manage_options') || current_user_can('edit_others_posts')) { + $this->duplicate_edit_post($post_id); + } + else if (current_user_can('edit_posts') && !current_user_can('publish_posts') && $current_user_id == $post->post_author){ + $this->duplicate_edit_post($post_id, 'pending'); + } + else if (current_user_can('edit_post', $post_id) && $current_user_id == $post->post_author ){ + $this->duplicate_edit_post($post_id); + } + else { + wp_die(__('Unauthorized Access.','duplicate-page')); + } + } + /** + * Duplicate edit post + */ + public function duplicate_edit_post($post_id,$post_status_update='') + { + global $wpdb; + $opt = get_option('duplicate_page_options'); + $suffix = isset($opt['duplicate_post_suffix']) && !empty($opt['duplicate_post_suffix']) ? ' -- '.esc_attr($opt['duplicate_post_suffix']) : ''; + if($post_status_update == ''){ + $post_status = !empty($opt['duplicate_post_status']) ? esc_attr($opt['duplicate_post_status']) : 'draft'; + }else{ + $post_status = $post_status_update; + } + $redirectit = !empty($opt['duplicate_post_redirect']) ? esc_attr($opt['duplicate_post_redirect']) : 'to_list'; + if (!(isset($_GET['post']) || isset($_POST['post']) || (isset($_REQUEST['action']) && 'dt_duplicate_post_as_draft' == sanitize_text_field($_REQUEST['action'])))) { + wp_die(__('No post to duplicate has been supplied!','duplicate-page')); + } + $returnpage = ''; + /* + * and all the original post data then + */ + $post = get_post($post_id); + /* + * if you don't want current user to be the new post author, + * then change next couple of lines to this: $new_post_author = $post->post_author; + */ + $current_user = wp_get_current_user(); + $new_post_author = $current_user->ID; + /* + * if post data exists, create the post duplicate + */ + if (isset($post) && $post != null) { + /* + * new post data array + */ + $args = array( + 'comment_status' => $post->comment_status, + 'ping_status' => $post->ping_status, + 'post_author' => $new_post_author, + 'post_content' => (isset($opt['duplicate_post_editor']) && $opt['duplicate_post_editor'] == 'gutenberg') ? wp_slash($post->post_content) : $post->post_content, + 'post_excerpt' => $post->post_excerpt, + 'post_parent' => $post->post_parent, + 'post_password' => $post->post_password, + 'post_status' => $post_status, + 'post_title' => $post->post_title.$suffix, + 'post_type' => $post->post_type, + 'to_ping' => $post->to_ping, + 'menu_order' => $post->menu_order, + ); + /* + * insert the post by wp_insert_post() function + */ + $new_post_id = wp_insert_post($args); + if(is_wp_error($new_post_id)){ + wp_die(__($new_post_id->get_error_message(),'duplicate-page')); + } + + /* + * get all current post terms ad set them to the new post draft + */ + $taxonomies = array_map('sanitize_text_field',get_object_taxonomies($post->post_type)); + if (!empty($taxonomies) && is_array($taxonomies)): + foreach ($taxonomies as $taxonomy) { + $post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs')); + wp_set_object_terms($new_post_id, $post_terms, $taxonomy, false); + } + endif; + /* + * duplicate all post meta + */ + $post_meta_keys = get_post_custom_keys( $post_id ); + if ( ! empty( $post_meta_keys ) ) { + foreach ( $post_meta_keys as $meta_key ) { + // get_post_meta returns already-unserialized values safely + $meta_values = get_post_meta( $post_id, $meta_key ); + foreach ( $meta_values as $meta_value ) { + // Block object injection - reject serialized objects (O: and C: patterns) + // unless the meta key belongs to a known plugin that legitimately stores them. + if ( is_string( $meta_value ) && preg_match( '/^O:\d+:|C:\d+:/', $meta_value ) ) { + $safe_prefixes = apply_filters( 'duplicate_page_safe_meta_prefixes', array( + 'breakdance_', + '_breakdance_', + ) ); + $is_safe = false; + foreach ( $safe_prefixes as $prefix ) { + if ( strpos( $meta_key, $prefix ) === 0 ) { + $is_safe = true; + break; + } + } + if ( ! $is_safe ) { + continue; + } + } + update_post_meta( $new_post_id, $meta_key, wp_slash( $meta_value ) ); + } + } + } + + /** + * Elementor compatibility fixes + */ + if(is_plugin_active( 'elementor/elementor.php' ) && class_exists('\Elementor\Core\Files\CSS\Post')){ + $css = \Elementor\Core\Files\CSS\Post::create( $new_post_id ); + $css->update(); + } + + /** + * Breakdance compatibility + */ + if ( defined( 'BREAKDANCE_PLUGIN_FILE' ) || function_exists( 'Breakdance\isBreakdanceRequest' ) ) { + $breakdance_timestamp_keys = apply_filters( 'duplicate_page_breakdance_timestamp_keys', array( + 'breakdance_created_at', + '_breakdance_created_at', + ) ); + foreach ( $breakdance_timestamp_keys as $ts_key ) { + if ( get_post_meta( $new_post_id, $ts_key, true ) ) { + update_post_meta( $new_post_id, $ts_key, current_time( 'mysql' ) ); + } + } + } + + /** + * The Events Calendar compatibility + */ + if ( function_exists( 'tribe_get_event' ) ) { + wp_update_post( array( 'ID' => $new_post_id ) ); + } + + /* + * finally, redirecting to your choice + */ + if ($post->post_type != 'post'){ + $returnpage = '?post_type='.$post->post_type; + } + if (!empty($redirectit) && $redirectit == 'to_list'){ + wp_redirect(esc_url_raw(admin_url('edit.php'.$returnpage))); + } elseif (!empty($redirectit) && $redirectit == 'to_page'){ + wp_redirect(esc_url_raw(admin_url('post.php?action=edit&post='.$new_post_id))); + } else { + wp_redirect(esc_url_raw(admin_url('edit.php'.$returnpage))); + } + exit; + } + else { + wp_die(__('Error! Post creation failed, could not find original post: ','duplicate-page').$post_id); + } + exit; + } + + /* + * Add the duplicate link to action list for post_row_actions + */ + public function dt_duplicate_post_link($actions, $post) + { + // Skip acf-field-group post type + if($post->post_type == 'acf-field-group'){ + return $actions; + } + + $opt = get_option('duplicate_page_options'); + $post_status = !empty($opt['duplicate_post_status']) ? esc_attr($opt['duplicate_post_status']) : 'draft'; + if (current_user_can('edit_post', $post->ID)) { + $actions['duplicate'] = isset($post) ? ''.__('Duplicate This', 'duplicate-page').'' : ''; + } + + return $actions; + } + + /* + * Add the duplicate link to edit screen - classic editor + */ + public function duplicate_page_custom_button_classic() + { + global $post; + $opt = get_option('duplicate_page_options'); + $post_status = !empty($opt['duplicate_post_status']) ? esc_attr($opt['duplicate_post_status']) : 'draft'; + $html = '
'; + $html .= '
'; + $html .= isset($post) ? ''.__('Duplicate This', 'duplicate-page').'' :''; + $html .= '
'; + $html .= '
'; + $content = wpautop($html); + $content = str_replace(']]>', ']]>', $content); + echo $content; + } + + /* + * Add the duplicate link to edit screen - gutenberg + */ + public function duplicate_page_custom_button_guten() + { + global $post; + $screen = get_current_screen(); + if ( ! $screen || $screen->base !== 'post' ) { + return; + } + if ($post) { + $opt = get_option('duplicate_page_options'); + $post_status = !empty($opt['duplicate_post_status']) ? esc_attr($opt['duplicate_post_status']) : 'draft'; + if (isset($opt['duplicate_post_editor']) && ($opt['duplicate_post_editor'] == 'gutenberg' || $opt['duplicate_post_editor'] == 'all')) { + wp_enqueue_style('dp-main-style', plugin_dir_url(__FILE__) . 'css/dp_gutenberg.css'); + wp_register_script( "dt_duplicate_post_script", plugins_url( '/js/editor-script.js', __FILE__ ), array( 'wp-edit-post', 'wp-plugins', 'wp-i18n', 'wp-element' ), DUPLICATE_PAGE_PLUGIN_VERSION); + wp_localize_script( 'dt_duplicate_post_script', 'dt_params', array( + 'dp_post_id' => intval($post->ID), + 'dtnonce' => wp_create_nonce( 'dt-duplicate-page-'.intval($post->ID)), + 'dp_post_text' => __("Duplicate This",'duplicate-page'), + 'dp_post_title'=> __('Duplicate this as ','duplicate-page').$post_status, + 'dp_duplicate_link' => "admin.php?action=dt_duplicate_post_as_draft" + ) + ); + wp_enqueue_script( 'dt_duplicate_post_script' ); + } + } + } + + /* + * Admin Bar Duplicate This Link + */ + public function duplicate_page_admin_bar_link() + { + global $wp_admin_bar, $post; + $opt = get_option('duplicate_page_options'); + $post_status = !empty($opt['duplicate_post_status']) ? esc_attr($opt['duplicate_post_status']) : 'draft'; + $current_object = get_queried_object(); + if (empty($current_object)) { + return; + } + if (!empty($current_object->post_type) + && ($post_type_object = get_post_type_object($current_object->post_type)) + && ($post_type_object->show_ui || $current_object->post_type == 'attachment')) { + $wp_admin_bar->add_menu(array( + 'parent' => 'edit', + 'id' => 'duplicate_this', + 'title' => __('Duplicate This as ', 'duplicate-page').$post_status, + 'href' => isset($post) ? esc_url_raw(admin_url().'admin.php?action=dt_duplicate_post_as_draft&post='.intval($post->ID).'&nonce='.wp_create_nonce( 'dt-duplicate-page-'.intval($post->ID))) :'', + )); + } + } + + /* + * Redirect function + */ + public static function dp_redirect($url) + { + $web_url = esc_url_raw($url); + wp_register_script( 'dp-setting-redirect', ''); + wp_enqueue_script( 'dp-setting-redirect' ); + wp_add_inline_script( + 'dp-setting-redirect', + ' window.location.href="'.$web_url.'" ;' + ); + } + /* + Load Help Desk + */ + public function load_help_desk() { + $mkcontent = ''; + $mkcontent .= ''; + if (false === ($mk_dp_close_dp_help_c = get_option('mk_fm_close_fm_help_c'))) { + echo apply_filters('the_content', $mkcontent); + } + } + /* + Close Help + */ + public function mk_dp_close_dp_help() { + $nonce = sanitize_text_field($_REQUEST['nonce']); + if (wp_verify_nonce($nonce, 'nc_help_desk')) { + if (false === ($mk_fm_close_fm_help_c = get_option('mk_fm_close_fm_help_c'))) { + $set = update_option('mk_fm_close_fm_help_c', 'done'); + if ($set) { + echo 'ok'; + } else { + echo 'oh'; + } + } else { + echo 'ac'; + } + }else { + echo 'ac'; + } + die; + } + /* + Custom Assets + */ + public function custom_assets() { + wp_enqueue_style( 'duplicate-page', plugins_url( '/css/duplicate_page.css', __FILE__ ) ); + wp_enqueue_script( 'duplicate-page', plugins_url( '/js/duplicate_page.js', __FILE__ ) ); + wp_localize_script( 'duplicate-page', 'dt_params', array( + 'ajax_url' => admin_url( 'admin-ajax.php'), + 'nonce' => wp_create_nonce( 'nc_help_desk' )) + ); + } + } +new duplicate_page(); +endif; \ No newline at end of file diff --git a/wp-content/plugins/duplicate-page/inc/admin-settings.php b/wp-content/plugins/duplicate-page/inc/admin-settings.php new file mode 100644 index 0000000..46d1b28 --- /dev/null +++ b/wp-content/plugins/duplicate-page/inc/admin-settings.php @@ -0,0 +1,90 @@ +custom_assets(); +?> +
+load_help_desk(); ?> +

+Saving Please wait...
','duplicate-page'); + $duplicatepageoptions = array( + "duplicate_post_editor" => sanitize_text_field(htmlentities($_POST["duplicate_post_editor"])), + "duplicate_post_status" => sanitize_text_field(htmlentities($_POST["duplicate_post_status"])), + "duplicate_post_redirect" => sanitize_text_field(htmlentities($_POST["duplicate_post_redirect"])), + "duplicate_post_suffix" => sanitize_text_field(htmlentities($_POST["duplicate_post_suffix"])) + ); + + $saveSettings = update_option('duplicate_page_options', $duplicatepageoptions); + if ($saveSettings) { + duplicate_page::dp_redirect('options-general.php?page=duplicate_page_settings&msg=1'); + } else { + duplicate_page::dp_redirect('options-general.php?page=duplicate_page_settings&msg=2'); + } +endif; + +$opt = get_option('duplicate_page_options'); +if (!empty($msg) && $msg == 1): + _e('
+

Settings saved.

','duplicate-page'); +elseif (!empty($msg) && $msg == 2): + _e('
+

Settings not saved.

','duplicate-page'); +endif; +?> +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
+ +

Default: Classic Editor', 'duplicate-page'); ?>

+
+ +

Default: Draft','duplicate-page'); ?>

+
+

Default: To All Posts List','duplicate-page'); ?>

+
+ +

+
+

+
+
+
+
+ diff --git a/wp-content/plugins/duplicate-page/js/duplicate_page.js b/wp-content/plugins/duplicate-page/js/duplicate_page.js new file mode 100644 index 0000000..d15fcd9 --- /dev/null +++ b/wp-content/plugins/duplicate-page/js/duplicate_page.js @@ -0,0 +1,28 @@ +jQuery(window).on('load',function() { + jQuery('.dpmrs').delay(10000).slideDown('slow'); +}); +jQuery(document).ready(function () { + jQuery('.close_dp_help').on('click', function (e) { + var what_to_do = jQuery(this).data('ct'); + var nonce = dt_params.nonce + jQuery.ajax({ + type: "post", + url: dt_params.ajax_url, + data: { + action: "mk_dp_close_dp_help", + what_to_do: what_to_do, + nonce:nonce + }, + success: function (response) { + jQuery('.dpmrs').slideUp('slow'); + } + }); + }); +}); +jQuery(document).ready(function() { + var admin_page_url = "options-general.php?page=duplicate_page_settings"; + window.history.replaceState({}, document.title, admin_page_url); +}); +jQuery(document).on('click', '.button-custom-dismiss', function(e) { + jQuery(this).parent().hide(); +}) \ No newline at end of file diff --git a/wp-content/plugins/duplicate-page/js/editor-script.js b/wp-content/plugins/duplicate-page/js/editor-script.js new file mode 100644 index 0000000..ad49c74 --- /dev/null +++ b/wp-content/plugins/duplicate-page/js/editor-script.js @@ -0,0 +1,28 @@ +var el = wp.element.createElement; + var __ = wp.i18n.__; + var registerPlugin = wp.plugins.registerPlugin; + var PluginPostStatusInfo = wp.editPost.PluginPostStatusInfo; + var buttonControl = wp.components.Button; + + function dpGutenButton({}) { + return el( + PluginPostStatusInfo, + { + className: 'dt-duplicate-post-status-info' + }, + el( + buttonControl, + { + isTertiary: true, + name: 'duplicate_page_link_guten', + isLink: true, + title: dt_params.dp_post_title, + href : dt_params.dp_duplicate_link+"&post="+dt_params.dp_post_id+"&nonce="+dt_params.dtnonce + }, dt_params.dp_post_text + ) + ); + } + + registerPlugin( 'dt-duplicate-post-status-info-plugin', { + render: dpGutenButton + } ); \ No newline at end of file diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page-cs_CZ.mo b/wp-content/plugins/duplicate-page/languages/duplicate-page-cs_CZ.mo new file mode 100644 index 0000000000000000000000000000000000000000..6e8aaba7e879c9d74568422b832a5218b02c72b8 GIT binary patch literal 3859 zcmd5;&5s;M74Lv!lpz5nBH}|39*bnHmFf9%KFsXSm}J&QmhEKaU0aDSp|-nbwzj*g zT2HGry_o*ROu> zyQz0g?|LDVf`1NvwQa0((XIJ?_*uB@JfZh1b&G910V;UJ?nXwfHCkz z;2(gF^J8Eg_&1;rJo63Ddmh*U{uP`r0sn*b3(tApzk$!!JZ}|v_M4vf5wHmy0{;Yj z3HVdo{0i`m3U2{_jI{-B0DldH3-2Gm9{~RaboQSCUH)Eq0l5IK0r!CK17qMZZ~$y0 zc$b$9==^>NtOI`!^nrf|!j*US+xS@zMNUD?jOnd#t(7Ljtrc=){BkLk6#*w<{7{%g z7$bIKzCt4GtyGq!p+CFtgDef1<>5-7YU^o#-B_*UsJ~UYB{(F*avnC;o7J`TChT@H zYn7aFDUY3~mvjV3no12EWC(hxccvosa~ zDot1fv67rpWh^m61C@^JG${7C4H|US(!PjeGP`P@*wAuKR@j&~yn&Kd3si)YQ3Q7QtzpjfA8`X_#0B^)={yl~Di%q-;zqQJJ))hBQ_gnCvQ7Y;R*uZrso_&hGCC=y;AzRzF` z2Ixg%B%jcjlhzlVx8c&)@NQP26@E?zFy}fKhN}c!M<8?B9%#P>otAaH4&rWSA*IWq zfJTab>@GKZT;2 z-txWPrdE3>mVY($Z*y%>wC)lkCqc^T_#-|&MB6@oK&yG@eC;MrmA3v3GZLZyc7|@g zt-4g(e0SR)pi#Qg`x_8XmpZNXn|`b9w>#ASS+{fH)mFRJf}wwt=fa(~u)FBDI)3YQ zYQNFF(0R4>`h`~QI+LRe6#Q+@k}h56Z?o(!t;c)^`14W1MBE5e(ywjCnP#znMd`$J zNg{GAP4B{*d%p3vw<>$R_IbKQE$Y&$?Dsl!?i|VW-fM2Njm^$l?Z(v`mls)RH(E8< zKOi!H8}p${uK739mPEb_%T`#(fpjoDjK zJUI*}hY87fg-#6GJ0a$rpk(?9s)ez5kgFJCOsDrJN2!uoog&OnH0!c^xC41N6o=S2zrk_cp6+ zu@kx2#hIn|qNPXK9`ak5I%auYQYiu%TJkfoM(`b@}3>uT>el#u6tNZj$2%+A&6T@pe^2cY?xfq|d3$ eJDYcU81Gu1J7w4f`$E~S-LpW<$Mn;l>Hh`tekvyb literal 0 HcmV?d00001 diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page-cs_CZ.po b/wp-content/plugins/duplicate-page/languages/duplicate-page-cs_CZ.po new file mode 100644 index 0000000..338e395 --- /dev/null +++ b/wp-content/plugins/duplicate-page/languages/duplicate-page-cs_CZ.po @@ -0,0 +1,142 @@ +msgid "" +msgstr "" +"Project-Id-Version: Duplicate Page v Češtině (v2)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 19:23+0100\n" +"PO-Revision-Date: 2018-02-05 16:32+0530\n" +"Language-Team: LeBaux \n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.4\n" +"Last-Translator: Pierre LeBaux (EN>SK>CS) \n" +"Language: cs_CZ\n" + +#: admin-settings.php:3 +msgid "Duplicate Page Settings" +msgstr "Nastavení duplikátoru obsahu" + +#: admin-settings.php:8 +msgid "Saving Please wait..." +msgstr "Ukládám nastavení..." + +#: admin-settings.php:27 +msgid "" +"
\n" +"

Settings saved.

" +msgstr "" +"
\n" +"

Nastavení uloženo.

" + +#: admin-settings.php:30 +msgid "" +"
\n" +"

Settings not saved.

" +msgstr "" +"
\n" +"

Nastavení nebylo uloženo!

" + +#: admin-settings.php:43 +msgid "Duplicate Post Status" +msgstr "Stav duplikátu po vytvoření" + +#: admin-settings.php:50 +msgid "" +"Please select any post status you want to assign for duplicate post. " +"Default: Draft." +msgstr "" +"Když se vytvoří duplikát, je potřeba mu nastavit stav publikovaní. " +"Výchozí: Koncept" + +#: admin-settings.php:54 +msgid "Redirect to after click on Duplicate This Link" +msgstr "Kam přesměrovat potom, co se vytvoří duplikát" + +#: admin-settings.php:56 +msgid "To All Posts List" +msgstr "Zůstat kde jste byli" + +#: admin-settings.php:57 +msgid "To Duplicate Edit Screen" +msgstr "Otevřít duplikát pro editaci" + +#: admin-settings.php:59 +msgid "" +"Please select any post redirection, redirect you to selected after click on " +"duplicate this link. Default: To current list." +msgstr "" +"Co se stane poté, co kliknete na tlačítko duplikovat. Výchozí: Zůstat kde jste byli" + +#: admin-settings.php:63 +msgid "Duplicate Post Suffix" +msgstr "Přípona duplikovaného obsahu" + +#: admin-settings.php:66 +msgid "" +"Add a suffix for duplicate or clone post as Copy, Clone etc. It will show " +"after title." +msgstr "" +"Zde si můžete zvolit příponu, kterou plugin připojí k názvu duplikované " +"položky. Může zůstat prázdné, nebo například: kopie." + +#: admin-settings.php:76 +msgid "" +"Contribute some donation, to make plugin more stable. You can pay amount of " +"your choice." +msgstr "" +"Pokud je pro vás tento plugin užitečný, můžete vývojářovi třeba přispět na " +"jedno orosené." + +#. Name of the plugin +msgid "Duplicate Page" +msgstr "Duplikátor obsahu" + +#. Description of the plugin +msgid "Duplicate Posts, Pages and Custom Posts using single click." +msgstr "Duplikujte Příspěvky, Stránky a Custom Posty jedním kliknutím." + +#. URI of the plugin +msgid "https://wordpress.org/plugins/duplicate-page/" +msgstr "https://wordpress.org/plugins/duplicate-page/" + +#. Author of the plugin +msgid "mndpsingh287" +msgstr "mndpsingh287" + +#. Author URI of the plugin +msgid "https://profiles.wordpress.org/mndpsingh287/" +msgstr "https://profiles.wordpress.org/mndpsingh287/" + +#. Post Links +msgid "Duplicate This" +msgstr "Duplikovat" + +#. Post Link title (status as draft) +msgid "Duplicate this as draft" +msgstr "Duplikujte to jako koncept" + +#. Post Link title (status as publish) +msgid "Duplicate this as publish" +msgstr "Duplikujte to jako publikovat" + +#. Post Link title (status as private) +msgid "Duplicate this as private" +msgstr "Duplikujte to jako soukromé" + +#. Post Link title (status as pending) +msgid "Duplicate this as pending" +msgstr "Duplikujte to jako čekající" \ No newline at end of file diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page-de_DE_formal.mo b/wp-content/plugins/duplicate-page/languages/duplicate-page-de_DE_formal.mo new file mode 100644 index 0000000000000000000000000000000000000000..0d28b0d2b58110ec926989f769d8bb83ebc21adf GIT binary patch literal 4062 zcmd5;O^+i-8Los)0Fw}bKzs_I7CstZZ?x(Bj z?W*Vfu77;;(i;rF&*J|D{Qn*X`2F&cB|d`pH}U@urrvs#v9AXF5MwU_{{nm&_{B?% zeH?fU{0#7Q;HQCa&hdA^4UFFd2D!%`tK>cf{2a#3IbNUR_klmf{3%cZAAg*&=Yc8k z6To+Xf%Bh$P2k^v5%AK78G8cQ0sbDGp9ek({MSbq`zY|y24l}+{fUn;_8RaikOS`l z!@f`B<89zNFz`3P&jViveh>IIFv$HINWiC_WbDhpbzqR|11|#&@IBx!fIk5yP`U^F zC-7-t`zgl00z3dVfyclI_-i1xW`6~;O`(n{Nx5@dYtmX{$w}{(9=WI*YU5QRNx4WU zmnrAeAeC#R#MatevJ#9I-`y#4!Mzk~+tk?1w>O=)Mvt}+=i3rCB*%}Xh&NmFwapgf z28H)VFSu04F3wydf0E0swMu3Uo94V0b%~WyM^x~aV0-iE}RGz!g2U& zd$U#Tf*0t%ea-@N>JQuo50(B42k~RLoeomToumm@K8}|zV%LNqPOcaZ)vGi_oQNV% zRRT{F21#nPq}(`9+|jPdPnxt_&Pkudbi>m`r75|wnGhd(X~`>}%9!mM?X7}GBsr5w z5=L{cjBb)Ql<^~MnieCaDKi!#o+J8V`mQM`K?LOdgm`8O?a2)3#1vpMHo@7fSJOM- zBYEGD7SXsmAIKki?hE(6*;4EKW?hrQ&W^Yiv|BiDGCIH>jtUnH86K&GWmIysN~e#I zT-mCOP}odZ*yV!xTxx-xE?Tkb80Nodr5L2jjoI9nPNp(}WAsVoAuENlm?_P?7zFDD zn^(dT&Mw_l(kJBQ(%mKFROzFb7RlX{Ltdo5TW2)&4JC!O5}pASAO9~d@F)yk9zNj^ z1_RV0HPZLRSO~2TIEem8BDd1H*w|4k(;^QcFz#IaMynP+FH?oKYt^=mazs>% zt$xc6toZ?)72Ocgi_$tct-Hb~gka;g%#HQYEjLmk+9^=G`=(2cgKzhvU6jS(=%|NK z=~8FC{q?BbiQ3i-E!SC()~`gJ=Ym{ky^`DK&PRRAwM)4- zwo6=ONX<1#fwt8>rJa{)TIi9~q*XHZgrby7yh-bq1^oZt zV{ge+;8@~?Ls8a3>W84kp0~%tXNg6#ojXXQ$I_1SXnzxK5$#KdvFm5|Mv|n`aO~l{ z@1EU5<3+b9OVX*5D6nL3?V+2Y+3Hf-(T-H!@)257>gcA)m28#*gl0@*rB92PdP+Kc zH&IrQ=E)ezm{DILme43h@>Hr3>gi!UpcS z40@KLXVVdkR+7_Hpu-QOF8ryqLJpON;X%3BRFyu1&rELCo+KR=fC?A_rI6&2L53!BH?*>sHb zty~NpplPb)07}$xGzmVkDW3CuuY5cS*3eX~j&R9\n" +"Language-Team: Hindi\n" +"Language: de_DE@formal\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.2\n" + +#: admin-settings.php:3 +msgid "Duplicate Page Settings " +msgstr "Duplicate Page Einstellungen " + +#: admin-settings.php:3 +msgid "Buy PRO" +msgstr "PRO-Version kaufen" + +#: admin-settings.php:8 +msgid "Saving Please wait..." +msgstr "Speichern... Bitte warten." + +#: admin-settings.php:27 +msgid "" +"
\n" +"

Settings saved.

" +msgstr "" +"
\n" +"

Einstellungen gespeichert.

" + +#: admin-settings.php:30 +msgid "" +"
\n" +"

Settings not saved.

" +msgstr "" +"
\n" +"

Einstellungen nicht gespeichert.

" + +#: admin-settings.php:42 +msgid "Duplicate Post Status" +msgstr "Duplicate Post Status" + +#: admin-settings.php:45 +msgid "Draft" +msgstr "Entwurf" + +#: admin-settings.php:46 +msgid "Publish" +msgstr "Veröffentlichen" + +#: admin-settings.php:47 +msgid "Private" +msgstr "Privat" + +#: admin-settings.php:48 +msgid "Pending" +msgstr "Ausstehend" + +#: admin-settings.php:50 +msgid "" +"Please select any post status you want to assign for duplicate post. " +"Default: Draft." +msgstr "" +"Bitte wählen Sie einen beliebigen Beitragsstatus, den Sie dem duplizierten " +"Beitrag zuweisen wollen. Standard: Entwurf." + +#: admin-settings.php:54 +msgid "Redirect to after click on Duplicate This Link" +msgstr "Weiterleiten nach Klick auf Diesen Link duplizieren" + +#: admin-settings.php:56 +msgid "To All Posts List" +msgstr "Zur Liste mit allen Beiträgen" + +#: admin-settings.php:57 +msgid "To Duplicate Edit Screen" +msgstr "Zum Duplizieren-Bildschirm-bearbeiten" + +#: admin-settings.php:59 +msgid "" +"Please select any post redirection, redirect you to selected after click on " +"duplicate this link. Default: To current list." +msgstr "" +"Bitte wählen Sie eine beliebige Beitragsweiterleitung aus. Sie werden " +"weitergeleitet, sobald sie auf die Auswahl für das Duplizieren des Links " +"klicken. Standard: Zur aktuellen Liste." + +#: admin-settings.php:63 +msgid "Duplicate Post Suffix" +msgstr "Beitragssuffix duplizieren" + +#: admin-settings.php:66 +msgid "" +"Add a suffix for duplicate or clone post as Copy, Clone etc. It will show " +"after title." +msgstr "" +"Füge einen Suffix für das Duplizieren oder Klonen eines Beitrags als Kopie, " +"Klon etc hinzu. Dieser wird nach dem Titel angezeigt." + +#: admin-settings.php:76 +msgid "" +"Contribute some donation, to make plugin more stable. You can pay amount of " +"your choice." +msgstr "" +"Spenden Sie etwas, um das Plugin stabiler zu machen. Sie können den Betrag " +"Ihrer Wahl bestimmen." + +#: duplicatepage.php:55 +msgid "Settings" +msgstr "Einstellungen" + +#: duplicatepage.php:56 +msgid "Donate" +msgstr "Spenden" + +#. Plugin Name of the plugin/theme +#: duplicatepage.php:67 +msgid "Duplicate Page" +msgstr "Seite duplizieren" + +#: duplicatepage.php:179 duplicatepage.php:192 +msgid "Duplicate This" +msgstr "Seite duplizieren" + +#: duplicatepage.php:214 +msgid "Duplicate This as " +msgstr "Duplizieren Sie dies als " + +#. Plugin URI of the plugin/theme +msgid "https://wordpress.org/plugins/duplicate-page/" +msgstr "https://wordpress.org/plugins/duplicate-page/" + +#. Description of the plugin/theme +msgid "Duplicate Posts, Pages and Custom Posts using single click." +msgstr "" +"Duplizieren Sie Beiträge, Seiten und benutzerdefinierte Beiträge mit einem " +"einzigen Klick." + +#. Author of the plugin/theme +msgid "mndpsingh287" +msgstr "mndpsingh287" + +#. Author URI of the plugin/theme +msgid "https://profiles.wordpress.org/mndpsingh287/" +msgstr "https://profiles.wordpress.org/mndpsingh287/" + +#. Post Link +msgid "Duplicate This" +msgstr "Seite duplizieren" + +#. Post Link title (status as draft) +msgid "Duplicate this as draft" +msgstr "Duplizieren Sie dies als Entwurf" + +#. Post Link title (status as publish) +msgid "Duplicate this as publish" +msgstr "Duplizieren Sie dies als veröffentlichen" + +#. Post Link title (status as private) +msgid "Duplicate this as private" +msgstr "Dupliziere dies als privat" + +#. Post Link title (status as pending) +msgid "Duplicate this as pending" +msgstr "Duplizieren Sie dies als ausstehend" diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page-fr_FR.mo b/wp-content/plugins/duplicate-page/languages/duplicate-page-fr_FR.mo new file mode 100644 index 0000000000000000000000000000000000000000..d8c0e77f54f317350586c744d6bc11b2f8350d68 GIT binary patch literal 3844 zcmds4%WoS+7@tC0z&s@0&!P_>CN>wXyqaq=d$?n*hX1%kWnRS{R z5SJn$4xBh3wJMc3G!o*%g;Ot*z*qWWNZ!i4e%`R*kQ&V0QP{7 z11|v|1zySVE8rx?H-S#>$dOF$5#W;;S8`m;@m=6YnBM^k;L)RuodAZw2Z3Jzoy|9Z z72pp*4|w=4#_j`-137Fy0sIZ)Yj2fZa33`Kl=aM+!Rs`i4Dow>RQ^sl)b!Jv`wFHG^cuxe?san1^RfF7mVy%h>wq(Z+ z&McGNj>U92lPN=K%nMQDYat>}3mypVS#i;pXXZ0o$!ZR);BKvq3l;nu2v_cWH zKqD>(%*P@Mpy{9$Eqe(6K`Y66D9r}Tb7@2ynCh0&L9B%_Ri!(%ZWP3>1UAMeUau9xdu6iHHnk$QUW|&WvC+M( zsnvNT%UcS(HK7fX))=wKm0)Q_#7bN5lHK(8fuw?S`8lxC?JCYp!d zqS9T{pa?!;Xr{*}-Oa_%=@%lJq56xHrBh3%7KT35t79d1`%xlZ3*Egzu65VqkjrQi z*O+TC%JiAmqBk*=(>yY5boqtISMFLgXkuO3(pm2f5edz$(hVdJMPR93ov7C9rDblQ z-|Y*tWz1w=G^nl5Ev}UIFu?za0~dwvqS1ytC%}K7|C(I$ZvVQ)B_R=M(ZL1N{asVs zzkmKA@OOidliM1m{^g3g-Lyo2# z3+{jd!G5Sv!V`*ktozpufgQktS`;LRZ1q2LYQcgy+tC?1XaM4aXx1zon1Tn_+;NcW z;VkUI6>ySW+$z^g17{EPr<`~(=OEbSgiJ2?*H;FhCWoQAq`h2gS12sB$0 zE=H)6z4p5rb`+deOYD5clMcR-^D3=oqmm6g2C);dbWb&Sot9?eUVO+Xti?8G`+#Cm zTSFshs)i%d{{iUaAX7P0%MO&~w_zj-m~>GXs2dhs9*v@3umk+YgJab1R01LI@A@Et QG#U8=0A3cne7i~f4;2^xF#rGn literal 0 HcmV?d00001 diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page-fr_FR.po b/wp-content/plugins/duplicate-page/languages/duplicate-page-fr_FR.po new file mode 100644 index 0000000..678d3ca --- /dev/null +++ b/wp-content/plugins/duplicate-page/languages/duplicate-page-fr_FR.po @@ -0,0 +1,144 @@ +msgid "" +msgstr "" +"Project-Id-Version: Duplicate Page\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-23 14:05+0100\n" +"PO-Revision-Date: 2018-02-23 14:16+0100\n" +"Language-Team: Hindi\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +"Last-Translator: \n" +"Language: fr_FR\n" + +#: admin-settings.php:3 +msgid "Duplicate Page Settings" +msgstr "Réglages \"DUPLICATE PAGE\"" + +#: admin-settings.php:8 +msgid "Saving Please wait..." +msgstr "Enregistrement, patientez..." + +#: admin-settings.php:27 +msgid "" +"
\n" +"

Settings saved.

" +msgstr "" +"
\n" +"

Paramètres enregistrés

" + +#: admin-settings.php:30 +msgid "" +"
\n" +"

Settings not saved.

" +msgstr "" +"
\n" +"

Settings not saved.

" + +#: admin-settings.php:43 +msgid "Duplicate Post Status" +msgstr "Statut \"DUPLICATE PAGE\"" + +#: admin-settings.php:50 +msgid "" +"Please select any post status you want to assign for duplicate post. " +"Default: Draft." +msgstr "" +"Veuillez sélectionner un statut de publication que vous souhaitez attribuer " +"pour une page dubliqué Par défaut: Brouillon." + +#: admin-settings.php:54 +msgid "Redirect to after click on Duplicate This Link" +msgstr "Rediriger après avoir cliquer sur Dupliquer ce lien" + +#: admin-settings.php:56 +msgid "To All Posts List" +msgstr "Sur la liste de tout les articles" + +#: admin-settings.php:57 +msgid "To Duplicate Edit Screen" +msgstr "Sur l’écran de duplication" + +#: admin-settings.php:59 +msgid "" +"Please select any post redirection, redirect you to selected after click on " +"duplicate this link. Default: To current list." +msgstr "" +"S'il vous plaît sélectionner chaque redirection d'article, afin de " +"déterminer l’action après avoir cliqué sur dupliquer ce lien. Par " +"défaut: Sur la liste de tous les articles" + +#: admin-settings.php:63 +msgid "Duplicate Post Suffix" +msgstr "Dupliquer le suffixe de l'article" + +#: admin-settings.php:66 +msgid "" +"Add a suffix for duplicate or clone post as Copy, Clone etc. It will show " +"after title." +msgstr "" +"Ajoute un suffixe lorsque vous dupliquez ou clonez. Il sera mis après le " +"titre" + +#: admin-settings.php:76 +msgid "" +"Contribute some donation, to make plugin more stable. You can pay amount of " +"your choice." +msgstr "" +"Contribuer à un don, pour rendre le plugin plus stable. Vous pouvez donner " +"le montant de votre choix." + +#. Name of the plugin +msgid "Duplicate Page" +msgstr "Dupliquer les Pages" + +#. Description of the plugin +msgid "Duplicate Posts, Pages and Custom Posts using single click." +msgstr "" +"Dupliquer les articles, pages, et articles personnalisé juste en cliquant" + +#. URI of the plugin +msgid "https://wordpress.org/plugins/duplicate-page/" +msgstr "https://wordpress.org/plugins/duplicate-page/" + +#. Author of the plugin +msgid "mndpsingh287" +msgstr "mndpsingh287" + +#. Author URI of the plugin +msgid "https://profiles.wordpress.org/mndpsingh287/" +msgstr "https://profiles.wordpress.org/mndpsingh287/" + +#. Post Links +msgid "Duplicate This" +msgstr "Dupliquer ceci" + +#. Post Link title (status as draft) +msgid "Duplicate this as draft" +msgstr "Dupliquer ceci comme brouillon" + +#. Post Link title (status as publish) +msgid "Duplicate this as publish" +msgstr "Dupliquer cela comme publier" + +#. Post Link title (status as private) +msgid "Duplicate this as private" +msgstr "Dupliquez cela comme privé" + +#. Post Link title (status as pending) +msgid "Duplicate this as pending" +msgstr "Dupliquer cela en attente" \ No newline at end of file diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page-hi_IN.mo b/wp-content/plugins/duplicate-page/languages/duplicate-page-hi_IN.mo new file mode 100644 index 0000000000000000000000000000000000000000..868495b53d770a4013b38816da7ca08e8d70c007 GIT binary patch literal 4652 zcmdUy&yO5O6~`+iK$t-IB?Jc!#Y%9=_N;d?$c$$fl3fQ@vSDRUqHv1Z)3v*ed%8#6 z)oZU1(qfb!U?E>Hk%C1C>M_WK*oqVqOZ++@PTV+fLk-vb1)SjXs(NO2)?VXCL_kZu zudDjitM~oB@2j5u>qj2AqPRZ9{Ymbt+#i?c`}o6k0ec_!F84nffAd{ReMap4N~Y2;>?Q2qum(GLw^Cok{u%pW>_^|D)F-f?#y-QI zE7*1HAKt6f6WE8}r_{H2AGMTvkn!KKZ!v!BA*CL{{^k9w!QTG?rA}ZU!_H%$$Nm`m zI`$mvdL;W0_V*uD>Nm{)2?8X)?~#P$^+znP74GiBO_8Ev8}*=@QHre;+dJ+A`}l$) z1s#)%lojbKptuX@N_C@nNB5JkD3<3;o@co(jJ0vPRRn&RW;X5{9T!0q7lXJc;au|iyL~|>;)g7*M3!7)@*2>`?gD;iOKY=q zoQvOfyyu*@yF;@)=Y8e~It(YSML#zt4RRAkCJ(H+VCPoWe6HGV$A#<&1lf*NE8PVj zg$J;&%rMZT{*H6-KZSo>pm2w>>y5;Oh0*83*tXl#5~)X{NQb&8H#g%8dJ~;Q z7umq*C`&^dXX(7QnI44a2%3~zajFMdj*AUZUt51YD|H_Q48vU=4ze<}I@{E{SxF|_ znG{>CP14&4x6FZ|9;=gc_7_Y+Giff}%XGiYa|209T-ZZ%fn2b=&CiE8lL5yo~V+g7I=XfDny zfJv^C8ug@4PXc6;wj%9Ek&LJGB#Fz+w5lhfm~y$+R~vcu4M+^uqu@!C7m(T6=P6Zc zoi@WPx524mD~^K4N{+W)*3qqvul0geP7WzRu!fjBdg;jG=Yz$iVDSrjajA3kvyU9% z!ZA2)c4CQrN59W4dB2lkVS`>CrbQCkEbr(r8lc|ppiJXp+isi4?3g4Qn*8XoFKrFN zIBEB@!Ak37m~NFM8uUy!=;*J+X%tT;J9;~Qdi|@djik)OBzQc_2SrDxbOys>dFi+` z36IOE{?xKwJl;CBe(J=OipBPkmh>442zs2O9W96C!Y~Qr^f(O@=A7NjPxKxSj!pdp z!Y1eGiL{?ZNV%hrosDhlso={dHMz&Okx^r-m)b|#M_V%o={x!;!u*hQ>guLT z^{Sg@AlWy0{g*#Uw{uyKzV87w01guSLS5YuO#gqZHXk|%`P;50Km_a?t~gaw91PXE zt0`Ouyn}c+LCW!k|l< zr*hM;_;s^>lFeAYm+7%dcyaTaU*?HdS1|h-0T;>KVD_qm_i|nR+CxAz%B2X3AMu_& zXbypY!+EkvGbI#Fa54=@aeJn&e&%sA;1po1ksIG+3`V+M0(#61^d?vK#^+g2DRHPK zetXREgvcRV=wXq}QCkB2ir8+>QTt2BKFN62Bp)d@hUGjV2H{3DR@g;V+*6uRO}*JH$!l z4hYcNtYW9lNk0Y?t%_p^FmPY@dxcuyX}1)7pm;q8^0wW7cd3#t0; z>SN~L)qR{UA@0_hx2tnncCx4E_Vvc36+t8YGE@H9Lb$aeBo7=)_Q2xS$mt3z5JiRV K0m)qesDA-a&8(mR literal 0 HcmV?d00001 diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page-hi_IN.po b/wp-content/plugins/duplicate-page/languages/duplicate-page-hi_IN.po new file mode 100644 index 0000000..d30c3f5 --- /dev/null +++ b/wp-content/plugins/duplicate-page/languages/duplicate-page-hi_IN.po @@ -0,0 +1,124 @@ +msgid "" +msgstr "" +"Project-Id-Version: Duplicate Page\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-19 12:43+0000\n" +"PO-Revision-Date: 2016-12-19 12:52+0000\n" +"Last-Translator: admin \n" +"Language-Team: Hindi\n" +"Language: hi-IN\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco - https://localise.biz/" + +#: admin-settings.php:3 +msgid "Duplicate Page Settings" +msgstr "डुप्लिकेट पृष्ठ सेटिंग" + +#: admin-settings.php:8 +msgid "Saving Please wait..." +msgstr "सुरक्षित कर रहा है कृपया प्रतीक्षा करें..." + +#: admin-settings.php:27 +msgid "" +"
\n" +"

Settings saved.

" +msgstr "" +"
\n" +"

सेटिंग्स को सहेजा गया।

" + +#: admin-settings.php:30 +msgid "" +"
\n" +"

Settings not saved.

" +msgstr "" +"
\n" +"

सेटिंग सहेजा नहीं।

" + +#: admin-settings.php:43 +msgid "Duplicate Post Status" +msgstr "पोस्ट की स्थिति डुप्लिकेट" + +#: admin-settings.php:50 +msgid "" +"Please select any post status you want to assign for duplicate post. " +"Default: Draft." +msgstr "" +"कृपया किसी भी पोस्ट की स्थिति आप दोहरे पद के लिए प्रदान करना चाहते हैं का " +"चयन करें।चूक: प्रारूप।" + +#: admin-settings.php:54 +msgid "Redirect to after click on Duplicate This Link" +msgstr "" +"पर क्लिक करने के बाद पुन: निर्देशित करने के लिए डुप्लिकेट इस लिंक " +"" + +#: admin-settings.php:56 +msgid "To All Posts List" +msgstr "सभी पदों की सूची के लिए" + +#: admin-settings.php:57 +msgid "To Duplicate Edit Screen" +msgstr "स्क्रीन संपादित करने के लिए डुप्लिकेट" + +#: admin-settings.php:59 +msgid "" +"Please select any post redirection, redirect you to selected after click on " +"duplicate this link. Default: To current list." +msgstr "" +"कृपया किसी भी पद पुनर्निर्देशन का चयन करें, आप इस लिंक पर क्लिक करने के बाद " +"नकल चयनित करने के लिए भेज दें। डिफ़ॉल्ट: वर्तमान सूची पर।" + +#: admin-settings.php:63 +msgid "Duplicate Post Suffix" +msgstr "दोहरे पद प्रत्यय" + +#: admin-settings.php:66 +msgid "" +"Add a suffix for duplicate or clone post as Copy, Clone etc. It will show " +"after title." +msgstr "" +"कॉपी, क्लोन आदि के रूप में डुप्लिकेट या क्लोन के बाद यह खिताब के बाद दिखाएगा " +"के लिए एक प्रत्यय जोड़ें।" + +#: admin-settings.php:76 +msgid "" +"Contribute some donation, to make plugin more stable. You can pay amount of " +"your choice." +msgstr "" +"कुछ दान योगदान, प्लगइन अधिक स्थिर बनाने के लिए। आप अपनी पसंद की राशि का " +"भुगतान कर सकते हैं।" + +#. Name of the plugin +msgid "Duplicate Page" +msgstr "डुप्लिकेट पृष्ठ" + +#. Description of the plugin +msgid "Duplicate Posts, Pages and Custom Posts using single click." +msgstr "डुप्लिकेट पोस्ट, पन्ने और कस्टम पदों सिंगल क्लिक का उपयोग कर" + +#. URI of the plugin +msgid "https://wordpress.org/plugins/duplicate-page/" +msgstr "" + +#. Author of the plugin +msgid "mndpsingh287" +msgstr "" + +#. Author URI of the plugin +msgid "https://profiles.wordpress.org/mndpsingh287/" +msgstr "" diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page.mo b/wp-content/plugins/duplicate-page/languages/duplicate-page.mo new file mode 100644 index 0000000000000000000000000000000000000000..ff04eec9642b072739789cb0d3d19ba17b30d298 GIT binary patch literal 292 zcmYk0u};H442Fwfy0J6E4U9M~s6z;1DiNxbsHZBT-H=J#aH#mIi(8ck;q`a`o&raR z!Y_S;fB)9+&*9m}Ky{*=D;LVCa;fx6l`rK+=`%-70}HW0^}eOd3LRv$-Js`NTfboJ zNbYvBhSVH$5xHAagq-Wpcy2SBK6^1PhF7WuW(_=2?0n$NE?rqXnR>9Gz3;=nR)L-V(syi7Lex-!-0rX?s0iQw&6y=O<*dyA`mU0(S-}G_#h+sr NsPSU2lW{UJgKrS1QE&hN literal 0 HcmV?d00001 diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page.po b/wp-content/plugins/duplicate-page/languages/duplicate-page.po new file mode 100644 index 0000000..1752a86 --- /dev/null +++ b/wp-content/plugins/duplicate-page/languages/duplicate-page.po @@ -0,0 +1,121 @@ +# This file was generated by WPML +# WPML is a WordPress plugin that can turn any WordPress site into a full featured multilingual content management system. +# https://wpml.org +msgid "" +msgstr "" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Project-Id-Version: WPML_EXPORT\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en\n" +"MIME-Version: 1.0\n" +"X-Generator: Poedit 2.0.4\n" + +#
+#

+# Saving Please wait...
", 'duplicate-page'); +# $needToUnset = array('submit_duplicate_page');//no need to save in Database +msgid "Saving Please wait..." +msgstr "" + +# if(!empty($msg) && $msg == 1): +# _e( '
+#

Settings saved.

', 'duplicate-page'); +msgid "" +"
\r\n" +"

Settings saved.

" +msgstr "" + +# elseif(!empty($msg) && $msg == 2): +# _e( '
+#

Settings not saved.

', 'duplicate-page'); +msgid "" +"
\r\n" +"

Settings not saved.

" +msgstr "" + +# +# +# +#

Default: Draft.', 'duplicate-page')?>

+# +msgid "Please select any post status you want to assign for duplicate post. Default: Draft." +msgstr "" + +# +#
', 'duplicate-page')?> +# +# +# +msgid "To All Posts List" +msgstr "" + +# +# +# +msgid "To Duplicate Edit Screen" +msgstr "" + +# +#

Default: To current list.', 'duplicate-page')?>

+# +msgid "Please select any post redirection, redirect you to selected after click on duplicate this link. Default: To current list." +msgstr "" + +# +# +# +msgid "Duplicate Post Suffix" +msgstr "" + +# +#

+# +msgid "Add a suffix for duplicate or clone post as Copy, Clone etc. It will show after title." +msgstr "" + +#
+#

+#
+msgid "Contribute some donation, to make plugin more stable. You can pay amount of your choice." +msgstr "" + +# if ( $file == plugin_basename( __FILE__ ) ) { +# $duplicate_page_links = ''.__('Settings', 'duplicate-page').''; +# $duplicate_page_donate = ''.__('Donate', 'duplicate-page').''; +msgid "Settings" +msgstr "" + +# $duplicate_page_links = ''.__('Settings', 'duplicate-page').''; +# $duplicate_page_donate = ''.__('Donate', 'duplicate-page').''; +# array_unshift( $links, $duplicate_page_donate ); +msgid "Donate" +msgstr "" + +# public function duplicate_page_options_page(){ +# add_options_page( __( 'Duplicate Page', 'duplicate-page' ), __( 'Duplicate Page', 'duplicate-page' ), 'manage_options', 'duplicate_page_settings',array(&$this, 'duplicate_page_settings')); +# } +msgid "Duplicate Page" +msgstr "" + +# if (current_user_can('edit_posts')) { +# $actions['duplicate'] = ''.__( "Duplicate This", "duplicate-page" ).''; +# } +msgid "Duplicate This" +msgstr "" diff --git a/wp-content/plugins/duplicate-page/languages/duplicate-page.pot b/wp-content/plugins/duplicate-page/languages/duplicate-page.pot new file mode 100644 index 0000000..319b1a0 --- /dev/null +++ b/wp-content/plugins/duplicate-page/languages/duplicate-page.pot @@ -0,0 +1,125 @@ + +msgid "" +msgstr "" +"Project-Id-Version: Duplicate Page\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-19 12:43+0000\n" +"PO-Revision-Date: 2016-12-19 12:52+0000\n" +"Last-Translator: admin \n" +"Language-Team: Hindi\n" +"Language: hi-IN\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco - https://localise.biz/" +#: admin-settings.php:3 +msgid "Duplicate Page Settings" +msgstr "डुप्लिकेट पृष्ठ सेटिंग" +#: admin-settings.php:8 +msgid "Saving Please wait..." +msgstr "सुरक्षित कर रहा है कृपया प्रतीक्षा करें..." +#: admin-settings.php:27 +msgid "" +"
\n" +"

Settings saved.

" +msgstr "" +"
\n" +"

सेटिंग्स को सहेजा गया।

" +#: admin-settings.php:30 +msgid "" +"
\n" +"

Settings not saved.

" +msgstr "" +"
\n" +"

सेटिंग सहेजा नहीं।

" +#: admin-settings.php:43 +msgid "Duplicate Post Status" +msgstr "पोस्ट की स्थिति डुप्लिकेट" +#: admin-settings.php:50 +msgid "" +"Please select any post status you want to assign for duplicate post. " +"Default: Draft." +msgstr "" +"कृपया किसी भी पोस्ट की स्थिति आप दोहरे पद के लिए प्रदान करना चाहते हैं का " +"चयन करें।चूक: प्रारूप।" +#: admin-settings.php:54 +msgid "Redirect to after click on Duplicate This Link" +msgstr "" +"पर क्लिक करने के बाद पुन: निर्देशित करने के लिए डुप्लिकेट इस लिंक " +"" +#: admin-settings.php:56 +msgid "To All Posts List" +msgstr "सभी पदों की सूची के लिए" +#: admin-settings.php:57 +msgid "To Duplicate Edit Screen" +msgstr "स्क्रीन संपादित करने के लिए डुप्लिकेट" +#: admin-settings.php:59 +msgid "" +"Please select any post redirection, redirect you to selected after click on " +"duplicate this link. Default: To current list." +msgstr "" +"कृपया किसी भी पद पुनर्निर्देशन का चयन करें, आप इस लिंक पर क्लिक करने के बाद " +"नकल चयनित करने के लिए भेज दें। डिफ़ॉल्ट: वर्तमान सूची पर।" +#: admin-settings.php:63 +msgid "Duplicate Post Suffix" +msgstr "दोहरे पद प्रत्यय" +#: admin-settings.php:66 +msgid "" +"Add a suffix for duplicate or clone post as Copy, Clone etc. It will show " +"after title." +msgstr "" +"कॉपी, क्लोन आदि के रूप में डुप्लिकेट या क्लोन के बाद यह खिताब के बाद दिखाएगा " +"के लिए एक प्रत्यय जोड़ें।" +#: admin-settings.php:76 +msgid "" +"Contribute some donation, to make plugin more stable. You can pay amount of " +"your choice." +msgstr "" +"कुछ दान योगदान, प्लगइन अधिक स्थिर बनाने के लिए। आप अपनी पसंद की राशि का " +"भुगतान कर सकते हैं।" +#. Name of the plugin +msgid "Duplicate Page" +msgstr "डुप्लिकेट पृष्ठ" +#. Description of the plugin +msgid "Duplicate Posts, Pages and Custom Posts using single click." +msgstr "डुप्लिकेट पोस्ट, पन्ने और कस्टम पदों सिंगल क्लिक का उपयोग कर" +#. URI of the plugin +msgid "https://wordpress.org/plugins/duplicate-page/" +msgstr "" +#. Author of the plugin +msgid "mndpsingh287" +msgstr "" +#. Author URI of the plugin +msgid "https://profiles.wordpress.org/mndpsingh287/" +msgstr "" +#. Post link +msgid "Duplicate This" +msgstr "" +#. Post Link title (status as draft) +msgid "Duplicate this as draft" +msgstr "" + +#. Post Link title (status as publish) +msgid "Duplicate this as publish" +msgstr "" + +#. Post Link title (status as private) +msgid "Duplicate this as private" +msgstr "" + +#. Post Link title (status as pending) +msgid "Duplicate this as pending" +msgstr "" \ No newline at end of file diff --git a/wp-content/plugins/duplicate-page/readme.txt b/wp-content/plugins/duplicate-page/readme.txt new file mode 100644 index 0000000..4e61bc9 --- /dev/null +++ b/wp-content/plugins/duplicate-page/readme.txt @@ -0,0 +1,253 @@ +=== Duplicate Page === +Contributors: mndpsingh287 +Tags: Page Duplicate, Post duplicate, duplicate custom posts, duplicate page, duplicate post, duplicate ,custom posts, post, page, duplicate this, duplicate, content duplicate, duplicate content, data duplicate, duplicate data, copy page, clone page,wordpress page duplicate, wordpress post duplicate, Copy post, wordpress page duplicator, wordpress post duplicator, Cloner, duplicate post +Requires at least: 3.4 +Tested up to: 6.9.4 +Stable tag: 4.5.9 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +Duplicate Posts, Pages and Custom Posts easily using single click + +== Description == + +Duplicate Posts, Pages and Custom Posts easily using single click. You can duplicate your pages, posts and custom post by just one click and it will save as your selected options (draft, private, public, pending). + += Key Features in Duplicate Page Pro Editions = + +* **User Roles:** Allow User Roles To access Duplicate Page. +* **Post Types:** Filter to show Duplicate Page link in post types. +* **Clone Link Location:** Option where to show clone link. +* **Status:** Option to select Duplicate Posts Status. +* **Redirection:** Option to Redirect after click on clone link.. +* **Clone Link Title:** Option to change Duplicate Post Link Title. +* **Post Prefix:** Option to add Post Prefix. +* **Post Suffix:** Option to add Post Suffix. +* **Editor**: And Many More Filters and Features. + +> [Buy Pro Version](https://duplicatepro.com/pro/?utm_source=Wordpress.org&utm_medium=Website&utm_campaign=Duplicate%20Page%20Pro) with various features & support. + +> [Contact us](https://duplicatepro.com/contact/?utm_source=Wordpress.org&utm_medium=Website&utm_campaign=Duplicate%20Page%20Pro) for Support Only Pro Version Users. + +**[Upgrade to Pro Version](https://duplicatepro.com/pro/?utm_source=Wordpress.org&utm_medium=Website&utm_campaign=Duplicate%20Page%20Pro)** + +https://www.youtube.com/watch?v=Fj8BHxvebXs&feature=youtu.be + +== Installation == + +1. Upload the `duplicate-page` folder to the directory `/wp-content/plugins/`. +2. Activate the plugin using the 'Plugins' menu in WordPress. + +== Frequently asked questions == + +## How to use + +1. First Activate Plugin. +2. Go Select to Duplicate Page settings Menu from Settings Tab and savings settings. +1. Then Create New Post/Page or Use old. +2. After click on duplicate this link, then duplicate post/ page will be created and saved as draft,publish,pending,private depending upon settings. + +== Screenshots == + +1. Activate Screen +2. Duplicate Page Settings Screen +3. Select Option from Settings Page. +4. Click on Duplicate This. +5. Duplicate Post / Page will Appear. + +== Changelog == += 4.5.9 (8th May, 2026) = +* Security Fix: Replaced role-based check (contributor) with capability-based check (edit_posts) per WordPress coding standards. +* Bug Fix: Resolved Elementor and page builder layout not preserved after duplication. +* Bug Fix: Switched from add_post_meta() to update_post_meta() to prevent duplicate meta entries on duplicated posts. +* Bug Fix: Added wp_slash() to meta values before saving to prevent double-unslashing which corrupted page builder JSON data. + += 4.5.8 (21st Apr, 2026) = +* Security fixes + += 4.5.7 (2nd March, 2026) = +* Compatible with WordPress 6.9.4 + += 4.5.6 (16th Oct, 2025) = +* Compatible with WordPress 6.8.3 + += 4.5.5 (9th June, 2025) = +* Compatible with WordPress 6.8.1 + + += 4.5.4 (29th July, 2024) = +* Compatible with WordPress 6.6.1 + += 4.5.3(11th Sept, 2023) + +* Compatible with wordpress 6.3.1 + += 4.5.2(4th May, 2023) + +* Compatible with wordpress 6.2 + += 4.5.1(8th Feb, 2023) + +* Fixes compatibility issues with event calendar plugin. +* Minor bug fixes + += 4.5(14th Dec, 2022) + +* Checked compatibility with wordpress v6.1.1 +* Fixes elementor sections compatibility issue + += 4.4.9(15th Jul, 2022) + +* Checked compatibility with wordpress v6.0.1 + += 4.4.8(27th Jan, 2022) + +* Checked compatibility with wordpress v5.9 + += 4.4.7(16th Dec, 2021) + +* Added editor role check + += 4.4.6(7th Dec, 2021) + +* Fixed security issues. + += 4.4.5(29th Sep, 2021) + +* Fixed the issue for content HTML displaying in the sidebar. + += 4.4.4(16th Sep, 2021) + +* Fixed sanitization Issues as per wordpress standards. + += 4.4.3(8th Sep, 2021) + +* Updated code sanitization process for secure data submission + += 4.4.2(6th Sep, 2021) + +* Added sanitization as per wordpress standards. + += 4.4.1(27th July, 2021) = + +* Checked compatibility with wordpress v5.8 +* Fixed php warnings + += 4.4(18th Mar, 2021) = + +* Tested upto wordpress v5.7 + += 4.3(28th Aug, 2020) = + +* Tested with wordpress v5.5 + += 4.2(26th March, 2020) = + +* Fixed Translations string issue + += 4.1(20th Feb, 2020) = + +* Fixed Translations issue + += 4.0(20th Sep, 2019) = + +* Fixed slug duplication issue + += 3.9 (6th Aug, 2019) = + +* Fixed some compatibility issues + += 3.8 (18th July, 2019) = + +* Fixed compatibility issues with GT3 editor + += 3.7 (18th July, 2019) = + +* Fixed compatibility issues with other editors + += 3.6 (16th July, 2019) = + +* Security fixes addressed by wordpress + += 3.5 (2nd Apr, 2019) = + +* Gutenberg and advanced custom fields compatibility + += 3.4 (1st Apr, 2019) = + +* Security issues fixes addressed by Securi + += 3.3 (14th March, 2019) = + +* Compatible with WordPress 5.1.1 + += 3.2 (25th Dec, 2018) = + +* Gutenberg Compatible + += 3.1 (5th Dec, 2018) = + +* removed nag + += 3.0 (3rd Dec, 2018) = + +* German Formal lang added + += 2.9 (16th Nov, 2018) = + +* Minor bug fixes + += 2.8 (20th Oct, 2018) = + +* Compatible with php 7.3 and wordpress 5.0 + += 2.7 (28th July, 2018) = + +* removed useless adsense code + += 2.6 (24th March, 2018) = + +* Added signup popup and minor fixes. + += 2.5 (5th Feb, 2018) = + +* Translations issue resolve. + += 2.4 (29th Nov, 2017) = + +* Duplicate Page appends original post name issue fixed. + += 2.3 (27st april, 2017) = + +* Minor Fixes + += 2.2 (28th Jan, 2017) = + +* Strings Translations + += 2.1 (25th Aug, 2016) = + +* New Text field added in settings page for duplicate post title suffix to remove confusion of currently duplicate page. + += 1.4 (18th Jun, 2016) = + +* New Features added + += 1.3 (23th May, 2016) = + +* New Features added + += 1.2 (05th May, 2016) = + +* Duplicate Page Settings Menu Added. + += 1.1 (04th May ,2016) = + +* fix some Bug in 1.0 + +== Other Notes == + +== Minimum requirements for Duplicate Page == +* Wordpress 3.3+ +* PHP 5.x +* MySQL 5.x diff --git a/wp-content/plugins/polylang-pro/LICENSE b/wp-content/plugins/polylang-pro/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/wp-content/plugins/polylang-pro/changelog.txt b/wp-content/plugins/polylang-pro/changelog.txt new file mode 100644 index 0000000..d6e4452 --- /dev/null +++ b/wp-content/plugins/polylang-pro/changelog.txt @@ -0,0 +1,2510 @@ +== Changelog == + +This file contains only old changelog. See readme.txt for newer versions. + += 3.7.8 (2026-02-23) = + +* Pro: Add 'pll_create_post_translation' filter #2890 +* Pro: Fix ACF's layout fields instructions #2889 + += 3.7.7 (2026-01-26) = + +* Pro: Add DeepL support for 70 new languages. #1793 #2871 +* Fix advanced menu properties not displayed in customizer. Props Viktor Szépe. #1722 +* Fix incorrect slug when changing the language of a term. #1790 + += 3.7.6 (2026-01-06) = + +* Pro: Add support for WP 6.9 new blocks #2790 +* Pro: Fix insertion of navigation language switcher block in WP 6.9 #2847 +* Pro: Fix current post URL in site editor for WP 6.8+ #2843 +* Pro: Fix a conflict with Sensei LMS #2845 +* Fix categories not filtered per post language in quick edit #1785 + += 3.7.5 (2025-11-10) = + +* Pro: Updated DeepL supported languages list +* Pro: Fix a regression in cross domain login +* Pro: Fix post object field not correctly translated +* Pro: Fix a fatal error in EDD plugin updater when the request to the server fails +* Pro: Fix locale fallback in WP 6.8+ +* Pro: Add `pll_enable_acf_labels_translation` filter allowing to disable the translation of ACF labels +* Pro: Fix ACF image field not correctly translated when media translation is active +* Pro: Fix ACF image field in repeater not copied +* Pro: Fix ACF ajax request unexpectedly filtered by language when editing a field group +* Pro: Fix ACF blocks not translated when included inside a non-ACF block +* Pro: Add compatibility of the duplicate tool with Divi +* Fix Undefined array key "terms" in canonical.php #1691 +* Fix some regressions in the WPML API used by YITH WooCommerce Wishlist #1684 +* Fix LinkedIn site title preview with Yoast SEO #1686 +* Fix HTML language attribute on login page #1601 +* Fix conflict with WP Job Manager Application #1749 + += 3.7.4 (2025-10-28) = + +* Pro: Security: Fix a ReDoS vulnerability reported by Janine Moreira. +* Security: Fix deserialization of untrusted data reported by Phat RiO – BlueRock via Patchstack. + += 3.7.3 (2025-06-16) = + +* Pro: Always display ACF translation settings for field groups formerly translated in versions older than 3.7 +* Pro: Fix translation displayed in child fields of ACF layout fields when they should not +* Pro: Fix translation of the ACF field "Choice" when the translation is set to "Copy once" or "Synchronize" +* Pro: Fix a PHP warning when translating some blocks +* Pro: Fix impossibility to change the language of an empty post in the block editor +* Fix duplicate values in options #1672 +* Fix JS error in media library (grid view) #1674 +* Fix language dropdown not present in the media modal accessible from the media library grid view #1675 +* Fix DB error introduce by WooCommerce 9.9 #1681 + += 3.7.2 (2025-05-27) = + +* Pro: Require ACF 6.0+ to activate the integration to avoid fatal errors with older versions +* Pro: Add a new ACF field group setting to decide if translations instructions must be displayed +* Pro: Fix a fatal error when using ACF blocks with ACF < 6.3.0 +* Pro: Fix regression preventing to translate Oembed, URL and Email ACF fields +* Pro: Fix ACF fields not translated when they have a default value +* Pro: Fix empty ACF fields values not copied when the field has a default value +* Pro: Fix ACF field default values not translated when copying a post +* Pro: Fix possible fatal error if invalid types of data are sent for machine translation +* Pro: Fix term meta removed when a term is machine translated +* Fix nav menu locations not saved if invalid data are stored in database #1659 +* Fix parent relationship removed when a new translated term is created without parent #1671 + += 3.7.1 (2025-05-05) = + +* Pro: Do not display ACF fields translations settings when language location is set. +* Pro: Fix ACF taxonomy field terms not synchronized when "Save Terms" and "load terms" settings are activated. +* Pro: Fix duplicate options when using numeric keys for ACF choice fields. + += 3.7 (2025-04-22) = + +* Requires PHP 7.2 as minimum version +* Pro: Add DeepL machine translation for strings +* Pro: Consider Polylang Pro as equivalent to Polylang for plugin dependencies +* Pro: Add the details block and several labels in other blocks to XLIFF files and machine translation +* Pro: Allow to translate metas stored as objects +* Pro: Enhanced multilingual support of archive template hierarchy +* Pro: Wrap the language switcher block in a nav tag +* Pro: Support automatic IDs translation in blocks with new filters `pll_sync_block_rules_for_attributes` and `pll_sync_blocks_xpath_rules` +* Pro: Complete rewrite of ACF integration +* Pro: Add support for ACF blocks, post types and taxonomies. +* Pro: Remove the possibility to translate ACF field groups +* Pro: Add languages in ACF locations +* Pro: Add translation of ACF labels in the strings translations page +* Pro: Fix incorrect count of translated strings when importing strings translations +* Pro: Fix incorrect translation when an XLIFF import updates a term sharing its slug +* Pro: Fix term hierarchy with machine translation +* Pro: Fix indented items of a list block not translated with machine translation +* Pro: Fix navigation block inserted in the wrong language +* Update plugin updater to 1.9.4 +* Add translation of widgets custom html in strings translations #1423 +* Refactor core to manage the plugin options in an object #1451 +* Refactor core to give access to languages management in all contexts #1503 +* Remove the language set from the content option for new installs #1517 +* Allow numbers in language codes #1546 +* Display empty fields in the translations table for untranslated strings (instead of duplicating the original) #1574 +* Add REST API endpoints to manage options and languages #1505 #1569 +* Improve performance by registering the language taxonomy only once #1359 +* Add new API functions to insert and update posts and terms in a given language #1500 #1520 +* Add compatibility with jQuery 4 (planned in core for WP 6.8) #1612 +* Fix translations not loaded when the language is set from the content #1395 +* Fix possible term duplication #1490 +* Fix sanitization of translated options that may impact other strings #1571 +* Fix home link block not translated #1647 +* Fix a conflict with WooCommerce Price Based on Country #1638 + += 3.6.7 (2025-03-11) = + +* Pro: Security: Fix private content disclosure. +* Fix links wrongly removed in notices #1627 +* Fix all categories assigned when the default category is missing #1617 + += 3.6.6 (2025-01-13) = + +* Pro: Fix character encoding in the autocomplete field in the block editor languages panel +* Pro: Fix navigation language switcher block allowing a dropdown to hide the current language +* Pro: Fix translation of Media and text block when the media is shown on right +* Pro: Fix translation of the Cover block when fixed background is enabled +* Fix redirect of translated attachment page when attachment pages are disabled #1605 + += 3.6.5 (2024-11-05) = + +* Add compatibility with WP 6.7 +* Pro: Prevent infinite loop when the locale fallbacks reference each other +* Pro: Set canResegment attribute to no in XLIFF files +* Fix empty notice displayed if the plugin upgrade notice is set but empty + += 3.6.4 (2024-07-29) = + +* Pro: Fix infinite loop with WP 6.6 when the locale fallbacks include the main locale of a language +* Pro: Prevent saving the main locale among the locale fallbacks of a language +* Pro: Hide the characters consumption graph when the DeepL cost control is deactivated +* Add Yoast SEO social title and social description to the strings translations +* Fix incorrect page on front and page for posts translations when the option is saved with admin language filter active + += 3.6.3 (2024-06-18) = + +* Pro: Fix locale fallback for translations loaded just in time (requires WP 6.6) +* Allow to pass an array as context to icl_register_string() #1497 +* Fix admin bar search menu in WP 6.6 #1496 +* Fix a regression in the usage of the filter pll_flag #1489 + += 3.6.2 (2024-06-03) = + +* Pro: Fix XLIFF files not correctly imported when exported from older version than 3.6 +* Pro: Fix translated categories not assigned to translated post when using machine translation +* Pro: Fix 'lang' param not applied for secondary queries during a REST request +* Pro: Fix newlines for content edited in classic editor and translated with DeepL +* Pro: Fix a conflict with the Stream plugin on multisite + += 3.6.1 (2024-04-09) = + +* Pro: Fix ACF fields not shown after a post was translated with DeepL +* Remove rewrite when registering the language taxonomy #1457 +* Fix search block not filtered when displayed as button only #1459 +* Fix current language not kept when using switch_to_blog() in multisite #1458 + += 3.6 (2024-03-18) = + +* Requires WP 6.2 as minimum version +* Add compatibility with WP 6.5 +* Pro: Add DeepL machine translation for posts +* Pro: Add export and import in XLIFF 2.0/2.1 formats +* Pro: Improve translator comments in exported PO files +* Pro: Allow to export JSON encoded post and term metas in XLIFF files +* Pro: Allow to export block sub-attributes in XLIFF files +* Pro: Add footer notes block to XLIFF files +* Pro: Single files are now exported directly instead of inside a zip +* Pro: Reworked the language switcher navigation block +* Pro: Fix language switcher navigation block justification not aligned with core settings in overlay menu (requires WP 6.5) +* Pro: Fix a race condition which could lead to display a notice to the wrong user +* Pro: Fix a conflict with ACF when rewrite rules are flushed with WP-CLI on a multisite +* Pro: Fix import of several metas with same sources but different translations +* Add filter `pll_cookie_args` to filter the Polylang cookie arguments #1406 +* Fix wrong translated post types and taxononies after a `switch_to_blog()` #1415 +* Fix a minor performance issue for the page for posts #1412 +* Fix a JS errors after quick edit. Props @mcguffin #1435, #1444 +* Fix a possible warning in view-translations-post.php #1439 + += 3.5.4 (2024-02-06) = + +* Pro: Fix an accessibility issue int the navigation language switcher block +* Pro: Fix featured image not exported for posts with blocks +* Pro: Fix a conflict with the Flatsome builder +* Fix a notice when using system CRON. Props arielruminski #1397 +* Fix an edge case where a wrong post tag may be assigned to a post #1418 + += 3.5.3 (2023-12-11) = + +* Pro: Fix fatal error with The Events Calendar when rewrite param of event category is set to false +* Remove flag alt text in the language switcher when both the flag and language name are displayed #1393 +* Fix incorrect string translations when 2 languages are sharing the same locale in a multisite #1378 +* Fix posts lists not filtered by the current language when editing a post in the block editor #1386 +* Fix error when a tax query is filled with unexpected data #1396 + += 3.5.2 (2023-10-25) = + +* Pro: Fix terms not filtered by the current language in the block editor custom taxonomy component panel +* Fix incorrect rewrite rules leading to error 404 for the main site on multisite #1375 + += 3.5.1 (2023-10-17) = + +* Pro: Fix terms not filtered by the current language in the block editor custom taxonomy component panel +* Pro: Fix fatal error when using plain permalinks on multisite +* Pro: Fix rewrite rules incorrectly refreshed when saving strings translations +* Fix incorrect rewrite rules leading to error 404 on multisite #1366 +* Fix fatal error when using symlinked MU plugins that are not in open_basedir #1368 + += 3.5 (2023-10-09) = + +* Requires WordPress 5.9 as minimum version +* Pro: Manage navigation blocks translations in the site editor (requires WP 6.3) +* Pro: Manage pages translations in the site editor (requires WP 6.3) +* Pro: Manage patterns translations in the site editor (requires WP 6.3) +* Pro: Remove compatibility with the navigation screen removed from Gütenberg 15.1 +* Pro: Add filter 'pll_export_post_fields' to control post fields exported to XLIFF files +* Pro: Do not set default translation option to "translate" for ACF fields created before Polylang Pro is activated +* Pro: Fix Polylang not set as recently active when automatically deactivated by Polylang Pro +* Don't output javascript type for themes supporting html5 #1332 +* Hook WP_Query automatic translation to 'parse_query' instead of 'pre_get_posts' #1339 +* Improve preload paths management for the block editor #1341 +* Fix rewrite rules in WP 6.4 #1345 +* Fix: always assign the default language to new posts and terms if no language is specified #1351 +* Fix 'polylang' option not correctly created when a new site is created on a multisite #1319 +* Fix front page display switched to "Your latest posts" when deleting a static home page translation #1311 +* Fix wrong language assigned to terms #1336 +* Fix error when updating a translated option while the blog is switched on a multisite #1342 + += 3.4.6 (2023-09-13) = + +* Pro: Security: Fix unsafe custom style injection in navigation language switcher block + += 3.4.5 (2023-08-07) = + +* Requires PHP 7.0 as minimum version +* Pro: Fix error in site editor with WP 6.3 +* Pro: Remove usage of block_core_navigation_submenu_build_css_colors() deprecated in WP 6.3 +* Pro: Fix categories and tags kept in old language after the language of a post has been changed +* Add 'pll_admin_ajax_params' filter #1326 +* Fix error when changing the language of a post and the post type doesn't support excerpts #1323 + += 3.4.4 (2023-07-18) = + +* Pro: Register a default (empty) value for the "lang" param when listing posts and terms in REST API +* Pro: Fix categories list refresh when the language of a post is changed in the block editor +* Pro: Fix store "pll/metabox" is already registered +* Add Kirghiz to the predefined list of languages #1308 +* Fix incorrect flag url when WordPress is installed in a subfolder #1296 +* Fix wrong home page url in multisite #1300 + += 3.4.3 (2023-06-13) = + +* Adapt the language filter for `get_pages()` for WP 6.3 #1268 +* Fix static front page displaying latest posts when it is not translated #1295 +* Fix a database error in ANSI mode #1297 +* Fix a database error when accessing posts from another site in multisite #1301 + += 3.4.2 (2023-05-30) = + +* Fix empty languages displayed when Falang data are remaining in the database #1286 +* Fix PHP warning on term_props #1288 +* Fix blog page displayed in the customizer instead of the static front page when changing a setting #1289 + += 3.4.1 (2023-05-25) = + +* Fix incorrect site titles in My Site admin bar menu on multisites #1284 +* Fix incorrect home url when using multiple domains or subdomain and a static front page #1285 + += 3.4 (2023-05-23) = + +* Requires WP 5.8 as minimum version +* Pro: Language fallbacks are now stored in language description instead of a term meta. +* Pro: Add more error messages when doing wrong when importing or exporting translations +* Pro: Avoid to check for translations files existence if no language fallbacks are defined. +* Pro: Reduce the number of DB queries when exporting posts for translation +* Pro: Fix incorrect post slug after XLIFF import +* Pro: Fix a performance issue with the autocomplete field in the block editor languages panel +* Pro: Fix translations not refreshed when switching the language in the block editor sidebar +* Pro: Fix a performance issue in Site editor +* Pro: Fix a possible bug in Site editor when language term_id and term_taxonomy_id are different +* Pro: Fix deactivated language re-activated when it is edited. +* Pro: Fix language switcher in legacy widget menu not correctly rendered in widget block editor +* Pro: Fix error 404 for untranslated attached attachment +* Pro: Fix a deprecated notice in ACF integration +* Pro: Fix update compatibility with WP Umbrella +* Refactor core to allow to easily translate contents stored in custom tables +* Strings translations are now stored in a language term meta instead of post meta of specific post type #1209 +* Deprecate the filters `pll_languages_list` and `pll_after_languages_cache` #1210 +* Add a new property `PLL_Language::$is_default` #1228 +* Add a custom admin body class `pll-lang-{$language_code}` #1190 +* Add support for new WPML API filters #1266 +* Fix languages metabox autocomplete field not always returning expected results #1187 +* Fix language not displayed if the transient has been saved with an empty array #1247 +* Fix a PHP warning `Attempt to read property "home_url" on bool` #1206 +* Fix a conflict leading to a performance issue when translating the theme Astra options #1196 +* Fix related translations reset when updating Yoast SEO titles settings #1111 +* Fix a fatal error in case the registered strings option is corrupted #1264 +* Fix the language extraction from the URL in plain permalinks #1270 +* Fix content cleared when switching the language of a new post in the block editor #1272 +* Fix: Prevent saving strings translations with an empty source #1273 + += 3.3.3 (2023-04-11) = + +* Pro: Adapt the submenu colors of the navigation language switcher block to WP 6.2 +* Pro: Fix the dropdown setting in the navigation language switcher block +* Add Amharic, Aragonese and Spanish from Dominican Republic to the list of predefined languages #1248 +* Fix a deprecated notice in WP 6.2 when using multiple domains without the Internationalization PHP extension (intl) #1245 + += 3.3.2 (2023-03-06) = + +* Pro: Add compatibility with FSE changes introduced by WP 6.2 +* Pro: Adapt the navigation language switcher block for consistency with WP 6.2 +* Only store term ids in taxonomy relationships cache for WP 6.0+. Props @ocean90 #1154 +* Remove usage of `get_page_by_title()` deprecated in WP 6.2 #1213 +* Fix fatal error if the mu-plugins folder is not readable #1217 +* Fix a compatibility issue with plugins not expecting a null 'update_plugins' transient #1224 + += 3.3.1 (2023-01-09) = + +* Pro: Allow to translate Oembed, URL and Email ACF fields +* Pro: Fix ACF REST API mixing fields +* Pro: Fix ACF compatibility loaded when no language exist +* Pro: Fix headers of exported PO files. +* Pro: Fix spacing in language switcher navigation block preview +* Work around a bug in Sendinblue for WooCommerce causing a fatal error. #1156 +* Fix a regression with WooCommerce Product Add-Ons Ultimate. #1186 + += 3.3 (2022-11-28) = + +* Requires WP 5.7 as minimum version +* Pro: Allow to export and import XLIFF files for posts +* Pro: Honor the provided context for the navigation language switcher block. +* Pro: Remove the parent hyperlink in the navigation language switcher block. +* Pro: Add spacing between flag and name in the navigation language switcher block. +* Pro: Disallow some special characters in translated slugs to avoid 404 errors. +* Pro: Fix string translation not imported when the original is registered but has never been saved in database. +* Pro: Fix string translation not imported when it includes an html entity. +* Pro: Fix navigation language switcher block rendering in block editor. +* Pro: Fix navigation language switcher may be displayed wrong color. +* Translate the post pages in get_post_type_archive_link() on admin side too. #1000 +* Enable the block editor in page for posts translations to match the WordPress behavior since version 5.8 #1002 +* Improve the site health report #1062 #1076 +* Set the current language when saving a post #1065 +* The search block is now filtered by language #1081 +* Display slug of CPT and taxonomies in Custom post types and Taxonomies settings. Props @nicomollet #1112 +* Add support for wpml-config.xml to MU plugins #1140 Props Jeremy Simkins +* Fix some deprecated notices fired by PHP 8.1 #975 +* Fix some missing canonical redirect taxonomies #1074 +* Fix redirect when permalink structure has no trailing slash #1080 +* Fix language switcher in legacy navigation menu widget not rendered in widgets block editor #1083 +* Fix language in tax query when an OR relation is used #1098 +* Fix parent of translated category removed when assigning an untranslated parent #1105 +* Fix is_front_page() when a static front page is not translated #1123 +* Yoast SEO: Fix posts without language displayed in the sitemap #1103 +* Yoast SEO: Avoid syncing robots meta. #1118 + += 3.2.8 (2022-10-17) = + +* Fix PHP warning when a filtered taxonomy has no query var #1124 +* Fix SQL error when attempting to get objects without languages and no language exist #1126 +* Fix error when term slugs are provided as array in WP_Query #1119, #1132 Props Susanna Häggblom +* Fix a CSS regression in the wizard causing the default language icon to be removed #1137 + += 3.2.7 (2022-09-20) = + +* Work around a WooCommerce 6.9.x bug causing a fatal error in the wizard. #1116 + += 3.2.6 (2022-09-06) = + +* Pro: Fix a conflict with Kadence blocks +* Pro: Fix a conflict with Flatsome builder +* Fix media translation setting having no effect + += 3.2.5 (2022-06-28) = + +* Pro: Fix creation of WC product categories with shared slug via REST API +* Pro: Fix conflict with WooBuilder when editing a WC product +* Fix: Force empty string translation to empty string #1058 +* Fix CSS conflict with Dynamic content for Elementor #1060 + += 3.2.4 (2022-06-07) = + +* Pro: Remove "Navigation menus" from the post type settings list +* Pro: Fix block editor languages panel missing in WordPress 5.6 +* Pro: Fix wrongly indexed languages list returned by REST API when the first language is deactivated. +* Revert fix for category feed not redirected when the language code is wrong #1054 +* Fix wrong redirect of category when the url includes a query string #1048 +* Fix querying multiple categories failing + += 3.2.3 (2022-05-17) = + +* Pro: Fix a fatal error when inserting a term +* Pro: Fix translation of the block cover when duplicating a post +* Pro: Fix a CSS issue in bulk translate form introduced by WP 6.0 +* Pro: Fix a CSS issue in string import/export metaboxes. +* Prevent random languages order in WP 6.0 #1041 +* Translate site title in retrieve password email #1042 +* Fix 'lang' attribute in language widget dropdown #1039 + += 3.2.2 (2022-04-25) = + +* Pro: Fix redirect occurring for tags sharing the same slug as their translations +* Fix quick edit allowing to modify the language of the default category when it should not #1018 + += 3.2.1 (2022-04-14) = + +* Pro: Fix users with editor role not able to save or publish posts +* Pro: Fix FSE compatibility not loaded when the plugin Gütenberg is active +* Pro: Fix a fatal error occurring with Yoast SEO Premium +* Pro: Fix a fatal error with ACF when no language is defined + += 3.2 (2022-04-12) = + +* Requires WP 5.6 as minimum version +* Pro: Add compatibility with the full site editing introduced in WP 5.9 +* Pro: Add a language switcher block for the navigation block introduced in WP 5.9 +* Pro: Add compatibility with the new gallery block introduced in WP 5.9 +* Pro: Make the language switcher block available in the widget section of the customizer +* Pro: Fix wrong category when translating the latest posts block +* Pro: Fix the language switcher block when using the dropdown option +* Pro: Fix some edge cases with locale fallback +* Pro: Fix post template replacing the post content when duplicating a post +* Pro: Fix synchronization groups not correctly cleaned up when a language is deleted +* Pro: Fix incorrect sticky property when duplicating / synchronizing posts +* Pro: Fix "Page for posts" label after the page has been bulk translated +* Pro: Fix translated slug when the url includes a query string +* Pro: Synchronize ACF layout fields if a child field is synchronized or translatable +* Pro: Fix wrong field group translation displayed when using object cache with ACF +* Update plugin updater to 1.9.1 +* Add compatibility with the block site title introduced in WP 5.9 +* Add the list of wpml-config.xml files in the site health information +* Improve the performance of the get_pages() filter #980 +* Improve the compatibility of 'wpml_object_id' with the original filter #972 +* Prevent term_exists to be filtered by language in WP 6.0 +* Fix some PHP 8.1 deprecations #949 #985 +* Fix a fatal error in PHP 8.1 #987 +* Fix category feed not redirected when the language code is wrong #887 +* Fix default category not created for secondary languages (introduced in 3.1) #997 +* Fix parent page when the parent post type is not translatable #1001 +* Fix the Yoast SEO breadcrumb when it includes a non-synchronized taxonomy #1005 +* Fix a PHP Notice when adding a new language and Yoast SEO is active #979 +* Fix a PHP warning in Yoast SEO compatibility #954 + += 3.1.4 (2022-01-31) = + +* Pro: Adapt duplication and synchronization of the gallery block refactored in WP 5.9 +* Fix UI glitch in the classic editor custom fields form when changing a post language in WP 5.9 #970 + += 3.1.3 (2021-12-14) = + +* Fix user description escaping #934 +* Fix dismissable notice when creating a term in WP 5.9 #936 +* Fix empty search not handled correctly. Props Dominik Schilling #937 +* Fix warning occurring when a 3rd party plugin attempts to register anything else than a string using the WPML API #942 +* Fix Yoast SEO columns not correctly drawn when quick editing a post #943 + += 3.1.2 (2021-10-11) = + +* Pro: Fix parent page not filtered by language in the block editor since WP 5.6 +* Pro: Fix XLIFF mime type for PHP 7.0 and PHP 7.1 +* Fix settings page displaying the media modules when no language are defined +* Enforce Yoast SEO to use dynamic permalinks #882 +* Yoast SEO: Fix static front page and blog page breadcrumb + += 3.1.1 (2021-08-16) = + +* Pro: Fix a fatal error with The Events Calendar +* Allow to remove the cookie with the pll_cookie_expiration filter #905 + += 3.1 (2021-07-27) = + +* Add compatibility with WordPress 5.8 +* Raise Minimum WordPress version to 5.4 +* Pro: Allow to filter blocks by language in the widget block editor +* Pro: Allow to export and import XLIFF files for string translations +* Pro: Add the language switcher in the navigation block (experimental) +* Pro: Replace dashicons by svg icons in the block editor +* Pro: The Events Calendar: Add compatibility with Views V2 (only for sites using only one domain) +* Pro: Fix + icon displayed in the block editor sidebar when the user cannot create a translation +* Add a warning section to the site health for posts and terms without languages #825 +* Require the simplexml extension in the site health if a wpml-config.xml is found #827 +* Remove the information about the WPML compatibility mode in settings #843 +* The browser preferred language detection is now deactivated by default +* The media are now untranslated by default +* Highlight the language filter in the admin toolbar when it's active #821 +* Allow to query comments in multiple languages (just as posts and terms) #840 +* Don't disable the translation input field in the classic metabox #841 Props Onatcer +* Optimize all images including flags #848 Props lowwebtech +* Don't redirect if WordPress doesn't validate the redirect url to avoid redirects to /wp-admin/ #879 +* Fix media appearing to have a language after the language is changed in the media library grid view #807 +* Fix media not all deleted when bulk deleting from the grid view of the media library #830 +* Fix when more than one language switcher are added to the same menu #853 +* Fix PHP notice when adding a CPT archive link to a menu #868 Props davidwebca + += 3.0.6 (2021-06-22) = + +* Fix a conflict with the WooCommerce cart translation and cache plugins #876 + += 3.0.5 (2021-06-08) = + +* Pro: fix original post not assigned to a new translation when the languages sidebar is closed +* Pro: Attempt to fix zip file corrupted on some installations when exporting string translations +* Support session cookie with the pll_cookie_expiration filter #835 +* Fix javascript error when a plugin defines its own editor for translated post types #837 +* Fix languages displayed in screen options when editing a term #850 +* Cache: fix post type archive cache not cleared when saving a post #828 + += 3.0.4 (2021-04-27) = + +* Improve performance in the pages (or hierarchical post types) list table +* Fix an ajax conflict with WooCommerce License manager + += 3.0.3 (2021-03-23) = + +* Fix a warning when a language is corrupted in database (term_language missing) +* Fix confirmation modal with WooCommerce and WordPress < 5.6 +* Fix an ajax conflict with WooCommerce Tree Table Rate Shipping and HubSpot All-In-One Marketing + += 3.0.2 (2021-03-16) = + +* Move hreflang attributes higher in the head section #771 +* Fix custom flags not working (introduced in 3.0) +* Fix translation of the confirmation modal when changing the language of a post +* Fix js and css not loaded when Polylang is used as a mu-plugin (introduced in 3.0) +* Fix support for html5 stylesheet link tags #775 +* Fix possible warning in frontend-filters-links.php +* Yoast SEO Premium: Take over the multilingual compatibility removed in Yoast SEO Premium 15.8 #796 +* Yoast SEO: Fix CPT breadcrumb title when the option is left empty #794 +* Yoast SEO: Fix sitemap.xml not redirected on secondary domains #789 + += 3.0.1 (2021-03-10) = + +* Fix media gallery messed when editing a post in the classic editor +* Fix missing script dependency on old WP versions +* Fix CSS conflict with WooCommerce Bookings for WP < 5.6 +* Fix conflict resulting in '__' already defined in block-editor.js. #779 +* Fix search form removed for some themes. Props Marián Kadaňka. #780 +* Fix fatal error with very old versions of Yoast SEO. Props Nicola Peluchetti. #781 + += 3.0 (2021-03-08) = + +* Add compatibility with WordPress 5.7 +* Remove upgrades from Polylang older than 1.8 +* Remove deprecated class PLL_Pointer +* Pro: Hide the license keys +* Pro: Fix redirect to the home page of a deactivated language +* Pro: Fix synchronization of post status not working +* Pro: Fix language switcher block not working in a post retrieved in REST API +* Pro: Fix PO export of strings with line breaks +* Pro: Fix file block title customization lost +* Add a dialog box to ask a confirmation about a language change in classic and block editors +* Improve browser language detection #591 +* Improve robustness and documentation of code +* Fix media library after the language has been changed in the editor metabox +* Fix duplicated title attribute on flag link in posts list +* Fix legacy block editor language metabox compatibility with WordPress 5.6 +* Fix uploaded theme and plugin files in media library +* Fix site title not translated in email change confirmation email +* Fix remaining deprecated jQuery notices #741 +* Fix compatibility with GN publisher +* Fix compatibility with Woodmart theme search form +* Fix compatibility issue with 3rd party ajax requests since jQuery 3.3 #744 +* Fix CSS conflict with WooCommerce Bookings +* Fix browser error when displaying an embed and using a cache plugin #757 +* Fix post type archive title and metadesc not translated in Yoast SEO +* Fix PHP notice in REST API + += 2.9.2 (2021-02-02) = + +* Pro: Fix translation of CPTUI plural label and description not working +* Add Spanish (Ecuador) to the list of predefined languages +* Fix typo in "WordPress" string translation group. Props Viktor Szépe #682 + += 2.9.1 (2020-12-15) = + +* Fix PHP notice: Undefined property: PLL_Cache_Compat::$options with cache plugins. Props bahaa-almahamid. #658 +* Fix title of the search results page with Yoast SEO > 14.0 + += 2.9 (2020-12-07) = + +* Add compatibility with WordPress 5.6 +* Pro: Add locale fallback used when the theme or plugins translations are not available +* Pro: Fix SSO and browser preferred language redirect when using multiple domains +* Pro: Fix post slugs for German and Danish in the REST API +* Pro: Fix a fatal error in ACF integration when saving url modifications with multiple domains +* Pro: Fix a deprecated notice fired by ACF since the version 5.9.2 +* Pro: Fix ACF relationship fields not reloaded when changing the language in the classic editor +* Update plugin updater to version 1.8 +* Add Lower Sorbian to the list of predefined language +* Options are now translated on backend when using the admin language filter +* Keep previous translations when modifying an option value +* Add navigation markup to the language switcher widget +* Fix canonical redirect for taxonomy terms +* Fix a fatal error when deleting a post with a translation group corrupted in the database +* Fix a fatal error when switching to plain permalinks and using multiple domains +* Fix a conflict with WP Sweep which could corrupt languages +* Fix title displayed instead of meta description with Yoast SEO > 14.0 +* Fix PHP Notice: Undefined index: wp_the_query in /frontend/choose-lang-content.php on line 92 + += 2.8.4 (2020-11-03) = + +* Pro: Remove useless bulk translate action for ACF fields groups +* Pro: Fix the translation of the CPTUI labels when the language is set from the content +* Fix sitemaps redirected to the default language since WP 5.5.1 +* Fix object cache not flushed for sticky posts #601 +* Fix blog page broken when trashing a page and the blog page is not translated in all languages +* Fix custom flags ignored in WPML compatibility mode +* Fix breadcrumb for untranslated post types in Yoast SEO + += 2.8.3 (2020-10-13) = + +* Honor install_languages capability to download language packs +* Pro: Fix integrations not loaded (with The Events Calendar, CPTUI, Content blocks) +* Pro: Fix fatal error with ACF if a flexible content includes a repeater and a relationship +* Pro: Fix terms sharing their slug impossible to update without changing the slug +* When available, use wpcom_vip_get_page_by_path() instead of get_page_by_path() +* Fix queries filtered when editing a post that was declared untranslatable after it got a language +* Fix issues with Yoast SEO 14.0+ (breadcrumbs, canonical, title and description) + += 2.8.2 (2020-09-08) = + +* Pro: Fix posts sharing the same slug displayed on the same page +* Fix: Don't use a javascript localized string removed in WP 5.5 #568 +* Fix fatal error in site health when no language is defined #563 +* Fix various issues with Yoast SEO 14.x #65, #503, #505 +* Fix fatal error with MU Domain Mapping when saving domains in Polylang settings #569 + += 2.8.1 (2020-08-25) = + +* Pro: Fix fatal error with WP 4.9 +* Fix pll_the_languages() with 'raw' option returning html flag instead of flag url #558 +* Fix compatibility with Duplicate Posts not correctly loaded #557 +* Fix custom flag size in admin bar language switcher #559 +* Fix tag clouds mixed in the classic editor #561 + += 2.8 (2020-08-17) = + +* Pro: Add a language switcher block +* Pro: Add compatibility with block image edition introduced in WP 5.5 +* Pro: Fix our private taxonomies being displayed in the ACF field group rules. +* Pro: Fix incorrect flags loaded from the block editor +* Pro: Fix SSO causing a wrong redirect when using subdomains (introduced in 2.7.4) +* Pro: Fix a performance issue on the plugins list +* Pro: Fix option to automatically duplicate media in all languages when uploading a new file not honored in block image +* Use composer for autoload and Polylang Pro dependency on Polylang +* Display a flag for each post in the posts list tables (same for terms). #515 +* Add test for the homepage translations to Site Health +* Add debug information to Site Health +* Add compatibility with the sitemaps introduced in WP 5.5 #451 +* Always filter WP_Query by the current language +* Support wildcards in "admin-texts" parent keys in wpml-config.xml +* Fix sticky posts showed for all languages when the admin language filter is active #469 +* Fix a performance issue on the pages list +* Fix dependency to jQuery Migrate removed from WP 5.5 #539 +* Fix: output secure cookie when using a cache plugin and ssl #542 +* Fix the possibility to create 2 terms with the same name in the same language, without specifying the second slug. +* Fix sticky posts appearing 2 times in WP 5.5 + += 2.7.4 (2020-06-29) = + +* Pro: Allow using our /untranslated-posts REST endpoint for non-public post types +* Pro: Fix broken display in the block editor sidebar when a language has no flag +* Pro: Fix SSO breaking the preview on secondary domains +* Pro: Fix ACF translation option not working for term custom fields +* Pro: Fix a styling issue in the fields group list table in ACF 5.9 +* Add Spanish from Puerto Rico to the predefined list of languages + += 2.7.3 (2020-05-26) = + +* Security: Slash metas +* Pro: Fix categories not savedafter the language has been switched in the block editor +* Pro: Fix ACF fields stored as integers instead of strings +* Pro: Fix ACF untranslated posts or terms being copied when creating a new translation +* Pro: Fix PHP notice with ACF when a repeater or group is included in a flexible content +* Pro: Fix "DevTools failed to load SourceMap" warning in browser console +* Update plugin updater to 1.7.1 +* Honor the filter "pll_the_language_link" when the language switcher displays a dropdown #506 +* Fix "Something went wrong" message when quick editing untranslated post types #508 +* Fix wpseo_opengraph deprecated warning #509 + += 2.7.2 (2020-04-27) = + +* Pro: Re-allow to modify the capability for strings translations +* Pro: Fix redirect for posts having the same slug as a media +* Pro: Fix PHP notice with ACF flexible content +* Pro: Fix a fatal error with InfiniteWP +* Update plugin updater to 1.7 +* Fix font in setup wizard + += 2.7.1 (2020-04-09) = + +* Pro: Fix untranslated post types filtered by the parameter in the REST API #493 +* Fix fatal error when the function idn_to_ascii is not available +* Fix PHP warning warning when a 3rd party plugin declares options not stored in DB in wpml-config.xml #492 +* Fix fatal error when a 3rd party plugin declares options stored as objects in wpml-config.xml #494 + += 2.7 (2020-04-06) = + +* Minimum WordPress version is now 4.9 +* Pro: Strings translations can now be exported and imported (in PO format) +* Pro: Allow to decide individually which ACF fields to copy or synchronize +* Pro: Add action pll_inactive_language_requested +* Pro; Fix fatal error in The Events Calendar compatibility when no language is defined yet +* Pro: Fix bulk translate when a post has no language +* Pro: Fix reusable block saved without language +* Pro: Fix post requested by slug not filtered in REST API, when the slug is shared +* Add a setup wizard +* Add Swahili, Upper Sorbian, Sindhi and Spanish from Uruguay to the list of predefined languages +* Add flags in the predefined list of languages +* Allow to hide the metaboxes from the screen options +* The deletion of the plugin's data at uninstall is now controlled by a PHP constant instead of an option #456 +* Add parent in ajax response when selecting a term in autocomplete field #328 +* Add Vary: Accept-Language http header in home page redirect. Props @chesio #452 +* Improve performance to register/unregister WPML strings +* Add support for the action wpml_switch_language +* Add post_status to the list of accepted args of pll_count_posts() +* Apply the filter pll_preferred_language in wp-login.php +* Use filtered wrappers to create meta when creating media translations #231 +* Allow to translate the Twenty Seventeen header video Youtube url #460 +* Notices are now dismissed per site instead of per user #478 +* Fix terms not visible in the quick edit when only one language is defined and the admin language filter is active +* Fix post state not displayed for translations of the privacy policy page #395 +* Fix wildcards not correctly interpreted in wpml-config.xml +* Fix product categories with special characters duplicated when importing WooCommerce products #474 + += 2.6.10 (2020-02-19) = + +* Pro: Fix sticky posts not filtered in REST API (introduced in 2.6.9) +* Fix wrong language detected if a child page uses the slug of another language +* Fix a PHP notice with PHP 7.4. #438 +* Fix lang-item-first class in language switcher when the current language is hidden. #445 +* Fix partially a conflict with Fusion Builder (the other part of the conflict being in Fusion Builder). + += 2.6.9 (2020-01-15) = + +* Pro: Use 'parse_query' rather than 'rest_{$type}_query' to filter REST requests. +* Pro: Filter the comments REST endpoint. +* Pro: Fix duplication of terms without language. +* Pro: Fix fatal error when Admin Columns is activated and no language is defined yet. +* Fix shortlink when using one subdomain or domain per language + += 2.6.8 (2019-12-11) = + +* Pro: Fix conflict with JetThemesCore from Crocoblock +* Fix: better detection of REST requests when using plain permalinks +* Fix usage of deprecated action wpmu_new_blog in WP 5.1+ +* Fix PHP notices with PHP 7.4 + += 2.6.7 (2019-11-14) = + +* Require PHP 5.6 +* Fix PHP warning in WP 5.3 + += 2.6.6 (2019-11-12) = + +* Pro: Fix wrong ajax url when using one domain per language +* Pro: Fix conflict with user switching plugin when using multiple domains +* Pro: Fix latest posts block in WP 5.3 +* Fix database error when attempting to sync an untranslated page parent +* Fix a conflict with the theme Neptune by Osetin + += 2.6.5 (2019-10-09) = + +* Pro: Require ACF 5.7.11+ to activate the compatibility to avoid fatal errors with older versions +* Pro: Avoid translating empty front slug (could cause a wrong redirect to /wp-admin) +* Pro: Fix filter wp_unique_term_slug not always correctly applied. +* Pro: Fix a conflict with Divi causing post synchronization buttons to be displayed multiple times +* Avoid notice in WP CLI context + += 2.6.4 (2019-08-27) = + +* Pro: Fix a conflict preventing meta synchronization when ACF is active +* Pro: Fix post metas not correctly copied when translating a Beaver Builder page +* Pro: Fix a fatal error when posts made with Elementor are synchronized +* Pro: Fix Prewiew button not working correctly when using one domain per language +* Pro: Fix post synchronization not available for WP CRON and WP CLI +* Fix future posts not available in the autocomplete input field of the languages metabox +* Fix translations files not loaded on REST requests +* Fix deleted term parent not synchronized + += 2.6.3 (2019-08-06) = + +* Pro: Fix fatal error when updating an ACF field from frontend +* Pro: Add action 'pll_post_synchronized' +* Allow to get the current or default language object using the API. Props Jory Hogeveen. #359 +* Fix empty span in languages switcher widget when showing only flags +* Fix wpml_register_single_string when updating the original string + += 2.6.2 (2019-07-16) = + +* Pro: Fix slow admin in case the translations update server can't be reached +* Pro: Fix value not correctly translated for ACF clone fields in repeater +* Fix strings translations mixed when registered via the WPML compatibility. #381 + += 2.6.1 (2019-07-03) = + +* Pro: Fix Yoast SEO sitemap for inactive languages when using subdomains or multiple domains +* Fix fatal error in combination with Yoast SEO and Social Warfare +* Fix post type archive url in Yoast SEO sitemap + += 2.6 (2019-06-26) = + +* Pro: Remove all languages files. All translations are now maintained on TranslationsPress +* Pro: Move the languages metabox to a block editor plugin +* Pro: Better management of user capabilities when synchronizing posts +* Pro: Separate REST requests from the frontend +* Pro: Copy the post slug when duplicating a post +* Pro: Duplicate ACF term metas when terms are automatically duplicated when creating a new post translation +* Pro: Fix hierarchy lost when duplicating terms +* Pro: Fix page shared slugs with special characters +* Pro: Fix synchronized posts sharing their slug when the language is set from the content +* Pro: Fix PHP warning with ACF Pro 5.8.1 +* Pro: Fix ACF clone fields not translated in repeaters +* Better management of user capabilities when synchronizing taxonomies terms and custom fields +* Extend string translations search to translated strings #207 +* Update plugin updater to 1.6.18 +* Honor the filter `pll_flag` when performing the flag validation when creating a new language +* Modify the title and the label for the language switcher menu items #307 +* Add support for international domain names +* Add a title to the link icon used to add a translation #325 +* Add a notice when a static front page is not translated in a language +* Add support for custom term fields in wpml-config.xml +* Add filter `pll_admin_languages_filter` for the list of items the admin bar language filter +* Add compatibility with WP Offload Media Lite. Props Daniel Berkman +* Yoast SEO: Add post type archive url in all languages to the sitemap +* Fix www. not redirected to not www. for the home page in multiple domains #311 +* Fix cropped images not being synchronized +* Fix auto added page to menus when the page is created with the block editor +* Fix embed of translated static front page #318 +* Fix a possible infinite redirect if the static front page is not translated +* Fix incorrect behavior of action 'wpml_register_single_string' when updating the string source +* Fix fatal error with Jetpack when no languages has been defined yet #330 +* Fix a conflict with Laravel Valet. Props @chesio. #250 +* Fix a conflict with Thesis. +* Fix a conflict with Pods in the block editor. Props Jory Hogeveen. #369 +* Fix fatal error with Twenty Fourteen introduced in version 2.5.4. #374 + += 2.5.4 (2019-05-28) = + +* Add Kannada to the predefined languages list +* Yoast SEO: Fix primary product cat not copied or synchronized +* WPMU Domain Mapping: Fix incorrect domain used for the theme +* Fix style-rtl.css not loaded when the language is set from the content #356 +* Fix Jetpack featured pages not working. Props Anis Ladram. #357 +* Fix Call to undefined function wp_generate_attachment_metadata() + += 2.5.3 (2019-04-16) = + +* Add de_AT and pt_AO to the predefined languages list +* Pro: Add filter pll_translate_blocks +* Pro: fix PHP notice when the queried post type has been modified to an array +* Pro: fix PHP warning when combined with The Event Calendar and Page builder by SiteOrigin + += 2.5.2 (2019-02-12) = + +* Pro: Fix translated slugs not accepting forward slashes +* Pro: Fix fatal error with ACF Pro 5.7.11 +* Fix parent categories incorrectly synchronized #327 + += 2.5.1 (2019-01-16) = + +* Security: Fix categories and media duplication not protected from CSRF +* Pro: Allow to update the plugin with WP CLI +* Pro: Fix search in the button block not filtered in the correct language (needs WP 5.1) +* Add Saraiki to the predefined languages list +* Fix a conflict causing a blank page with Divi + += 2.5 (2018-12-06) = + +* Add compatibility with WP 5.0 +* Fix custom flags when the WP content folder is not in the WP install folder +* Fix PHP notice if a language has no flag + += 2.4.1 (2018-11-27) = + +* Pro: Add compatibility with REST API changes made in WP 5.0 +* Pro: Fix sticky posts in the REST API +* Pro: Fix overwritten custom post slug when the post is updated with the REST API +* Pro: Fix bulk translate for media +* Fix a conflict with Custom sidebars and Content aware sidebars +* Fix a conflict with the theme Pokemania +* Fix PHP notices when using the function 'icl_link_to_element' for terms +* Fix title slugs for posts written in German + += 2.4 (2018-11-12) = + +* Minimum WordPress version is now 4.7 +* Pro: Add the possibility to bulk duplicate or bulk synchronize posts. +* Pro: Add compatibility with Admin Columns +* Pro: Add synchronized posts to the REST API +* Pro: Fix variations messed when changing WooCommerce attributes slugs +* Pro: Fix incorrect language for ajax requests made on front by The Events Calendar +* Pro: Fix term not duplicated correctly when the language is set from the content +* Refactor the core to activate on front and for the REST api actions that were previously available only in the backend (language checks, synchronizations...). +* Add flags to widgets displayed in only one language (Props Jory Hogeveen) #257 +* Honor the filter 'pll_the_language_args' for all options in menus #237 +* Add better filters for default flags and custom flags +* Custom flags can now be stored in the polylang directory in the theme +* Custom flags can now use SVG +* Add compatibility with Jetpack featured content module +* Fix Twenty Fourteen featured posts possibly not filtered per language +* Fix home url not working with WordPress MU Domain mapping +* Fix Assigning a parent category breaking the hierarchy of translated category +* Fix: Accept 0,1 and 1.0 as q factors in browser preferred language detection (Props Dominic Rubas) +* Fix performance issue when using hundreds of widgets +* Fix translations possibly wrong if the post language is changed without saving the post after + += 2.3.11 (2018-10-03) = + +* Pro: Add action 'pll_created_sync_post' +* Pro: Fix language and translations not included for tags in the REST API +* Fix Assigning a parent category breaking the hierarchy of translated category + += 2.3.10 (2018-08-16) = + +* Fix Lingotek notice not dismissable +* Fix fatal error with the widget calendar + += 2.3.9 (2018-08-14) = + +* Add a notice to inform about Polylang for WooCommerce +* Deprecate PLL_Pointer +* Fix bulk editing pages with no language breaking hierarchy #281 +* Fix an edge case where rewrite rules could be messed on a multisite +* MU Domain Mapping: fix secondary domain redirected to primary domain + += 2.3.8 (2018-07-16) = + +* Pro: Duplicate term meta when duplicating a post creates new terms +* Pro: Add compatibility with ACF Pro when it's bundled with the theme +* Pro: Fix a fatal error when duplicating posts +* Set cookie during the home redirect +* Accept a port in the url to detect the site home +* Add filter 'pll_is_cache_active' to allow to load the cache compatibility #270 #274 +* Fix potential fatal error when a 3rd party misuses the 'wpml_active_languages' filter #268 +* Fix Uncaught TypeError: s.split is not a function. Props Wouter Van Vliet #262 +* Fix text alignment for RTL scripts in Lingotek panel #247 +* Fix html language attribute filter on admin +* Fix cookie expiration time when set in js. Props Jens Nachtigall #271 +* Fix fatal error when a 3rd party misuses the WP_Query tax_query param. Props JanneAalto #252 +* Fix an edge case which could mess home pages on a multisite + + += 2.3.7 (2018-06-07) = + +* Pro: The Events Calendar: Fix untranslated events shown in all languages +* Avoid displaying edit links of translations of the privacy policy page to non-admin +* Fix draft created when creating a new page on multisite +* Do not prevent using the cache for home when using WP Rocket 3.0.5 or later #236 +* Fix language filter applied to wrong queries on admin side + += 2.3.6 (2018-05-17) = + +* Pro: Fix post type archive slug not translated in ACF page link fields +* WP 4.9.6: Translate the privacy policy page +* WP 4.9.6: Add the translated user descriptions to exported personal data +* Update Plugin updater to version 1.6.16 +* Fix conflict with the plugin View Admin As. Props Jory Hogeveen. #253 + += 2.3.5 (2018-05-08) = + +* Pro: Fix translated CPT slugs when one CPT name is a substring of another one. Props Steve Reimer. +* Pro: Fix canonical redirection for post types archives when the CPT slug is translated +* Pro: Fix ACF private key uselessly synchronized when the public custom field is not synchronized +* Add filter 'pll_filter_query_excluded_query_vars' +* Redirect www. to non www. when using multiple domains +* Fix Yoast SEO category sitemap not filtered by language when using multiple domains +* Fix PLL_COOKIE === false not honored when using a cache plugin. #248 +* Fix empty predefined languages list + += 2.3.4 (2018-03-27) = + +* Pro: Fix conflict with Pods related to translated slugs for custom post types +* Add Friulian to the predefined languages list +* Fix conflict (javascript error) with Gütenberg #225 +* Fix conflict on ajax requests introduced by WooCommerce 3.3.4 +* Fix queries by 'category_name' not auto translated #238 + += 2.3.3 (2018-03-15) = + +* Pro: Fix tax query using a term sharing slugs (fix a conflict with Fusion Builder) +* Restore Polylang (free) on REST requests, while disabling the language filter as in v2.3 +* Rework auto translated query with taxonomy in different language #223 +* Synchronize Yoast SEO primary category (needs Yoast SEO 7.0+) +* Fix PHP warning introduced by Yoast SEO 7.0 #229 +* Fix tax query when using the relation 'OR' +* Fix a conflict with the combination of Barrel + WP Bakery Page Builder +* Fix broken redirect with MU domain mapping #226 +* Fix site title not translated in password change email + += 2.3.2 (2018-03-05) = + +* Pro: Fix REST requests not filtered by the requested language (introduced in 2.3). +* Pro: Fix error 404 on single posts if posts are untranslatable +* Deactivate Polylang (free) on REST requests by default. +* Fix translated terms unassigned from posts when deleting a term +* Fix auto translated query with taxonomy in different language returning empty results since WP 4.9 #223 +* Fix conflict with a homepage option of the theme Extra +* Fix warning when filtering get_pages() + += 2.3.1 (2018-02-15) = + +* Pro: Fix GET REST request with slug parameter deleting the post slug +* Fix http request with a custom query var being redirected to the home page #216 + += 2.3 (2018-01-30) = + +* Pro: Duplicating a post now duplicates untranslated terms and the featured image (if media are translatable) +* Pro: Add filter 'pll_sync_post_fields' +* Pro: Translate ACF Pro clone fields when creating a new field group translation +* Pro: Allow to share slugs when creating a post or term with the REST API +* Pro: Load asynchronously the script added on front for multiple domains and subdomains +* Pro: Fix 'lang' parameter not interpreted when the query includes 'name' +* Refactor the synchronization of metas for better synchronization and performance improvement +* Refactor the synchronization of taxonomy terms for performance improvement +* Refactor language and translations saving for performance improvement +* Refactor the synchronization of sticky posts +* Remove all languages files. All translations are now maintained on https://translate.wordpress.org/projects/wp-plugins/polylang #199 +* Refactor the list of languages to merge predefined languages, Facebook locales and fixes for W3C locales +* Automatically deactivate Polylang when activating Polylang Pro +* Disable programmatically translated post types and taxonomies in settings. Props Ulrich Pogson. #180 +* Set the cookie language in Javascript when a cache plugin is active +* Automatically remove the home page from cache when requesting the detection of the browser preferred language +* Use relative urls for the admin language filter in admin bar. #209 +* Disable auto translation of WP_Term_Query if it has a 'lang' parameter +* Don't filter REST requests by default. #211 +* Fix Yoast SEO statistics in dashboard showing only the default language. #211 +* Fix WP Rocket clearing the cache of the wrong adjacent post +* Fix random header image +* Fix home page not correctly loaded when adding a query var +* Fix: Impossible to change the language code when the language code is also a WordPress locale. + += 2.2.8 (2018-01-09) = + +* Pro: Fix: Impossible to link past events by translation in The Events Calendar +* Disallow to delete translations of the default term for all taxonomies +* Fix: Auto add pages adds WooCommerce pages in default language to menus in all languages +* Fix most used tag cloud in Tags metabox in WP4.9+. Props Pär Thernström. #208 + += 2.2.7 (2017-11-30) = + +* Fix queries by taxonomy broken since WP 4.9 +* Fix PHP notice in icl_object_id() + += 2.2.6 (2017-11-22) = + +* Pro: Fix query by post name and alternative language always returning the post in current language (when sharing slugs) +* Pro: Fix query by taxonomy and alternative language returning empty results +* Rework how translation files are loaded in ajax on front when the user is logged (in WP 4.7+) +* Add filter 'get_objects_with_no_lang_limit' +* Force loading the admin side when using WP CLI (Props chrisschrijver) +* Fix check for terms with no language not scaling +* Fix pll_count_posts not working with multiple post types +* Fix inconsistent spacing between flag and language name in language switcher parent menu item (Props Amit Tal) +* Fix spacing between flag and language name when displaying an RTL language +* Fix get_terms not accepting comma separated values for 'lang' parameter (Props Pavlo Zhukov) +* Fix possible wrong language detected in url when using subdomains (Props Pavlo Zhukov) +* Fix double escaped query + += 2.2.5 (2017-11-09) = + +* Update plugin updater class to 1.6.15 +* Add $link in cache key of links filters +* Add support for 'nav_menu' post type in wpml_object_id +* Fix conflict with Timber (introduced in 2.2.4) + += 2.2.4 (2017-10-26) = + +* Pro: Fix unknown language not redirected to default when using multiple domains +* Pro: Fix empty 'lang' query var not deactivating the language query filter +* Pro: Fix conflict with The Events Calendar and Visual Composer when used together +* Add new filter `pll_hide_archive_translation_url` #174 +* Add support for undocumented and deprecated WPML functions `wpml_object_id_filter` and `icl_get_current_language` +* Fix 'orderby' and 'order' in `wpml_active_languages`. Needs WP 4.7+ +* Fix `icl_get_languages` not returning all languages when skip_missing = 0. Props Loïc Blascos +* Fix `pll_translate_string` not working on admin #178 +* Fix PHP Warning in widget video in WP 4.9 +* Fix query using 'any' post type not filtered per language (introduced in 2.2) +* Fix untranslatable string in About metabox. Props Farhad Sakhaei +* Fix error with PHP 7.1 and Duplicate Post. Props Enea Scerba +* Fix query auto translation not active in ajax requests on frontend +* Fix query auto translation for 'postname' and 'pagename' +* Fix terms query auto translation not working for 'include' when no taxonomy is provided (WP 4.5+) + += 2.2.3 (2017-09-24) = + +* Fix editor removed on pages (introduced in 2.2.2) + += 2.2.2 (2017-09-22) = + +* Pro: Fix Duplicate post button not working when the user meta has been corrupted +* Fix PHP notice with the plugin Members #175 +* Fix page template select displayed when editing a translated page for posts +* Fix incompatibility with WP 4.8.2 (placeholder %1$s in prepare) + += 2.2.1 (2017-08-30) = + +* Pro: partially refactor REST API classes +* Pro: Fix duplicate content user meta not removed from DB when uninstalling the plugin +* Fix strings translations not removed from DB when uninstalling the plugin +* Fix incorrect translation files loaded in ajax on front when the user is logged in (WP 4.7+) +* Fix widget language dropdown removed when saving a widget (introduced in 2.2) +* Fix queries with negative values for the 'cat' parameter (introduced in 2.2 for queries made on frontend) +* Fix performance issue in combination with some plugins when the language is set from the content (introduced in 2.2) + += 2.2 (2017-08-16) = + +* Pro: Add support for the REST API +* Pro: Add integration with The Events Calendar +* Pro: Refactor ACF Pro integration for post metas and integrate term metas +* Pro: Ask confirmation if synchronizing a post overwrites an existing translation +* Pro: Separate sync post logic from interface +* Pro: Fix 'Detect browser language' option automatically deactivated +* Pro: Fix redirect to 404 when the 'page' slug translation includes non alphanumeric characters. +* Pro: Fix untranslated post type archive slug +* Pro: Fix ACF taxonomy fields not copied when the taxonomy is not translated #156 +* Pro: Fix fatal error with ACF4 +* Support a different content text direction in admin #45 +* Add support for wildcards and 'copy-once' attribute in wpml-config.xml +* Add minimal support for the filters 'wpml_display_language_names' and 'icl_ls_languages' +* Improve compatibility with the plugin WordPress MU Domain Mapping #116 +* Improve speed of the sticky posts filter #41 +* Remove redirect_lang option for multiple domains and subdomains +* Use secure cookie when using SSL +* Allow to copy/sync term metas with the filter 'pll_copy_term_metas' +* Filter ajax requests in term.php according to the term language +* Add error message in customizer when setting an untranslated static front page #47 +* Load static page class only if we are using a static front page +* Refactor parse_query filters to use the same code on frontend and admin +* Don't use add_language_to_link in filters +* Move ajaxPrefilter footer script on top +* Use wp_doing_ajax() instead of DOING_AJAX constant +* Fix queries custom tax not excluded from language filter on admin +* Fix WP translation not loaded when the language is set from the content on multisite. +* Fix the list of core post types in PLL_OLT_Manager for WP 4.7+ +* Fix post name and tag slug incorrectly sanitized for German and Danish +* Fix lang attribute in dropdowns +* Fix wpml_permalink filter #139 +* Fix WPML constants undefined on backend #151 +* Fix a conflict with the plugin Custom Permalinks #143 +* Fix menu location unexpectedly unset + += 2.1.6 (2017-07-17) = + +* Pro: fix duplicate post button not working in PHP 7.1 +* Pro: fix CPTUI untranslated labels on admin +* Adapt related posts filter to use slug instead of name to follow changes made on Jetpack server ( Props Steve Kaeser ) +* Fix PHP notices when translating CPT and custom tax titles in Yoast SEO +* Fix PHP warning when all plugins are networked activated + += 2.1.5 (2017-05-31) = + +* Add compatibility with new media widgets introduced in WP 4.8 +* Removing the language information in URL for the default language is now default +* Update plugin updater class to 1.6.12 +* Pro: fix PHP notices when duplicating the content +* Fix: test existence of `twentyseventeen_panel_count` instead of relying only on the active template +* Fix: set current property to false when removing the current-menu-item class #134 props @mowar +* Fix PHP notice when editing a term without language +* Fix possible PHP notice when deleting a category +* Fix fatal error with Gantry 5 + += 2.1.4 (2017-05-16) = + +* Pro: fix user not logged in on secondary domain when previewing changes +* Pro: fix archive links without language code in ACF link field (ACF 5.4.0+) +* Fix redirection from www subdomain to wrong language domain. +* Fix: selecting "Front page displays latest posts" in the customizer not cleaning the languages cache +* Fix accessibility of the admin language switcher + += 2.1.3 (2017-04-11) = + +* Pro: Fix translated slug of 'page' if it is translated to an empty string +* Update plugin updater class to 1.6.11 +* Strings registered with a wpml-config.xml file or WPML functions are now multiline by default +* Translate the site title in emails sent to the user +* Fix sanitize_user for specific locales +* Fix deprecation notice in Yoast SEO integration +* Fix: Clean term cache after the language has been set in mass #119 + += 2.1.2 (2017-03-09) = + +* Pro: Add filter 'pll_xdata_nonce_life' +* Pro: Fix translation of WooCommerce product attribute slug +* Pro: Fix product synchronization in WooCommerce 2.7 +* Pro: Fix error message when bulk trashing synchronized posts +* Add option to discard item spacing in the output of pll_the_languages() ( Props Ceslav Przywara ) #93 #95 +* Add as, dzo, kab, km, ml_IN, nl_BE, pa_IN, rhg, sah, ta_IN, tah, te, tt_RU to the predefined list of languages +* Update plugin updater class to 1.6.10 +* Fix: Remove the dependency to is_ssl() to detect the language in the url ( language set from the directory name ) +* Fix issue with secondary level domains +* Fix strings not translated in emails +* Fix incorrect usage of add_action() ( Props Peter J. Herrel ) #103 +* Fix wrong redirect in customizer in WP 4.7 + += 2.1.1 (2017-02-15) = + +* Pro: Add filter 'pll_enable_duplicate_media' for a fine control of automatic media duplication +* Add filter 'pll_links_model' for the links model class name +* Trim any starting ^ from modified rewrite rules +* Pro: Fix wrong count of plugins to update +* Fix slashed strings translations not saved #94 + += 2.1 (2017-01-25) = + +* Minimum WordPress version is now 4.4 +* Pro: Add support for synchronized posts (same post in multiple languages) +* Pro: Add support for custom post type UI and the Divi Builder +* Improve support of Yoast SEO (no category base and post type archive breadcrumb title) +* Move Languages menu at top level instead of submenu of the WordPress settings +* Copy the original post date when creating a translation and when the date is synchronized (Props Jory Hogeveen) #32 +* Remove hreflang attributes on paged pages and paged posts +* Add label to widget language dropdown for better accessibility (Props Lawrence Francell) #53 #56 +* Remove constants POLYLANG_URL and PLL_LOCAL_URL +* wp_get_sidebars_widgets() and is_active_sidebar() are now filtered according to widgets languages #54 +* Add functions pll_esc_html__(), pll_esc_html_e(), pll_esc_attr__() and pll_esc_attr_e() to the API (Props jegbagus) #83 +* Pro: Fix conflict between WooCommerce shop on front and translated shop base slug +* Pro: Fix $wp_rewrite search base and author_base not translated #68 +* Pro: Fix page preview does not log in the user when using subdomains +* Fix: avoid setting the language cookie on 404 pages +* Fix: rewrite rules order modified for custom post types archives +* Fix: conflict with WP All Import causing our filters to fail in "Add Media" modal when editing a post +* Fix: auto add pages not working for nav menus assigned to several locations +* Fix: Jetpack infinite scroll for multiple domains #58 #74 +* Fix: serialize error in Strings translations when balanceTags option is active #63 +* Fix: static front page preview when redirected from the languages page #49 +* Fix: Auto add pages not working for nav menus assigned to several locations +* Fix: Conflict with Woocommerce Show Single Variation +* Fix: Parent page not synchronized in Quick edit (introduced in 2.0.8) +* Fix: WPML API wpml_element_has_translations and wpml_post_language_details +* Fix: unattached media translations not in language switcher +* Fix: Conflict with WP Residence advanced search + += 2.0.12 (2016-12-19) = + +* Fix plugin not loaded first (introduced in 2.0.11) +* Fix wrong translations files loaded when the language is set from the content in WP 4.7 #76 +* Fix notice when a tax query has no terms (using EXISTS or NOT EXISTS) + += 2.0.11 (2016-12-12) = + +* Pro: Fix shared term slugs broken by a late change in WP 4.7 #73 +* Pro: Fix media taxonomies lost when creating a media translation when taxonomies sync is activated #72 +* Fix fatal error in customizer when Twenty Seventeen is activated and another theme is previewed #71 +* Fix wrong plugin language on admin if user locale is different from site locale in WP 4.7 + += 2.0.10 (2016-12-05) = + +* Add support for front page panels of Twenty Seventeen +* Remove draft posts from the language switcher even when the user is logged in +* Fix: Make argument 2 of icl_object_id optional +* Fix a conflict with the Divi theme (#67) + += 2.0.9 (2016-11-15) = + +* Fix javascript error in some ajax requests + += 2.0.8 (2016-11-14) = + +* Disable admin language feature in WP 4.7+ +* Pro: fix case where a media could lose its parent post when translated on the fly by the content duplication +* Pro: fix on the fly media created at content duplication attached to parent page instead of child page +* Fix translations input fields not populated in languages metabox when creating a new translation in WP 4.7 +* Fix possibility to delete the translations of the default category in WP 4.7 +* Fix tag search not filtered per language in Quick edit in WP 4.7 +* Fix dropdown language switcher not working for untranslated pages + += 2.0.7 (2016-10-18) = + +* Fix issues with static front pages introduced in version 2.0.6 + += 2.0.6 (2016-10-17) = + +* Pro: Fix translated paged slug not working on paged static front page +* Add support for WPML filter 'wpml_language_form_input_field' +* Fix PHP notice when using the WPML filter 'wpml_current_language' +* Fix cases where the admin language filter is not correctly taken into account +* Fix paged static front pages in plain permalinks +* Fix paged static front pages for multiple domains (#43) +* Fix warning occurring when a 3rd party plugin attempts to register anything but a string in the strings translations panel +* Fix cross domain http request for media when using multiple domains or subdomains +* Fix error 404 on pages when no language has been created yet + += 2.0.5 (2016-09-22) Five years after! = + +* Pro: Fix conflict with WPBakery Visual Composer +* Pro: Fix conflict between multiple domains SSO and FORCE_SSL_ADMIN +* Pro: Fix duplicated fields not displayed in new translation in ACF Pro 5.4+ +* Add Tibetan and Silesian to the predefined languages list +* Remove duplicated strings from the strings translations (even when they have a different name or group) +* The languages and translations of custom post types and taxonomies are no more activated by default at activation +* Allow to deactivate auto translation in secondary by setting 'lang' to an empty value +* Fix: invalidate the cache of PLL_MO ids when adding a new language +* Fix: don't filter secondary queries when editing a post in an untranslated post type + += 2.0.4 (2016-09-06) = + +* Add Gujarati to the predefined languages list +* Fix conflict with Page Builder. Other parts of the conflict are fixed in Page Builder 2.4.14 +* Fix plugins translations incorrectly loaded in WP 4.6 +* Fix error 404 on paged urls when using a non standard port + += 2.0.3 (2016-08-16) = + +* Pro: Fix PHP notice when hiding the language code in url and the language is set from subdomains +* Pro: Fix one more media being created when the duplicate media in all languages is activated (introduced in 2.0) +* Pro: Fix shared term slugs not working on PHP 7 +* Pro: Fix Polylang storing integers in some ACF Pro fields where ACF Pro stores strings +* Pro: Fix ACF Pro custom fields synchronized even when the custom fields synchronization option is deactivated (#40) +* Fix PHP notice: Undefined variable: original_value in /modules/wpml/wpml-api.php on line 168 +* Fix translations loaded too soon by plugins not correctly reloaded since WP 4.6 (#39) +* Fix: Remove the delete link for translations of the default category on PHP 7 +* Fix unescaped i18n strings in Lingotek presentation + += 2.0.2 (2016-08-03) = + +* Avoid fatal error when a 3rd party theme or plugin has a malformed wpml-config.xml file: the malformed wpml-config.xml file is simply ignored + += 2.0.1 (2016-08-02) = + +* Fix fatal error on PHP < 5.4 (introduced in 2.0) +* Fix custom flags not being loaded (introduced in 2.0) + += 2.0 (2016-08-02) = + +* Pro: Improve integration with ACF Pro +* Pro: Add support for single sign on across multiple domains or subdomains +* Pro: Add support for browser language detection when using multiple domains +* Pro: Add support for translation of the static portion of the post permalink structure +* Pro: Fix deactivated languages appearing in Yoast SEO sitemaps +* Pro: Fix impossibility to visit a deactivated language when using subdomains or multiple domains (#10) +* Pro: Fix when sharing slug on the page for posts, only one of them is accessible (#33) +* Add the possibility to use the language switcher as dropdown in menu +* Add support for custom logo introduced in WP 4.5 (#6) +* The backend current language ( PLL()->curlang ) is now equal to the language of current post or term being edited (#19) +* The sample permalink is now updated when changing the language in the Languages metabox +* Revamp the wpml-config.xml reader to use simplexml instead of our custom xml parser +* Improve support for the WPML API (including Hook API introduced in WPML 3.2) +* Add support for translation of meta titles and descriptions of custom post types and custom taxonomies in Yoast SEO +* Replace uncached functions by WPCOM VIP functions when available +* Improve compatibility with WP 4.6 +* Fix parent category wrongly assigned to post when synchronizing children categories (#21) +* Fix custom fonts not loaded when using multiple domains or subdomains +* Fix remove_accents() not working for German and Danish (#24) +* Fix incorrect static front pages urls on backend +* Fix impossible to directly enter the page number in strings translation table (introduced in 1.9.3) +* Fix conflict with WP Sweep (needs WP Sweep 1.0.8+) +* Fix potential performance issue by querying only taxonomies to show in quick edit to filter the category checklist +* Fix conflict (database error) with ReOrder-posts-within-categories plugin +* Fix languages per page option not saved + += 1.9.3 (2016-06-28) = + +* Pro: Allow to add slashes in url slugs translations +* Pro: Fix archive links not using translated slugs +* Pro: Fix visitor being redirected to 404 if his browser preference is set to an inactive language +* Fix strings translations table always back to page 1 when submitting the form (#14) +* Fix get_pages( array( 'lang' => '' ) ) not querying all the languages +* Fix switching the admin language filter can override the static front page settings (#16) + += 1.9.2 (2016-06-06) = + +* Pro: fix unreachable hierarchical custom post type posts when they are sharing slugs across languages +* Fix missing argument 3 in icl_t +* Fix conflict with WooCommerce product variations + += 1.9.1 (2016-05-23) = + +* Pro: add compatibility with Beaver Builder +* Pro: fix media wrongly created when adding a new media translation +* Add azb, ceb, de_CH_informal, es_GT, mr, nl_NL_formal to the predefined list of languages +* Fix the language switcher not linking to media translations for anonymous visitors + += 1.9 (2016-04-27) = + +* Pro: add the possibility to translate custom post types slugs, taxonomies slugs and more +* Pro: add the possibility to share the same post or term slug across languages +* Pro: add the possibility to duplicate the content when creating a new translation +* Pro: add the possibility to create all translations at once when uploading a media +* Pro: add the possibility to disable a language +* Add license and update management +* Add inline docs for all filters and actions +* When possible, the rel alternate hreflang now display only the language code (without the country code) +* When combined with flags in the language switcher, wrap the language name inside tags +* Add customizer selective refresh support for the language switcher widget ( needs WP 4.5+ ) +* Fix dynamic options of the language switcher widget not working in the customizer +* Fix possible error 404 on page shortlink when using subdomains or multiple domains +* Fix get_adjacent_post() and wp_get_archives() for untranslated post types ( needs WP 4.4+ ) +* Fix language homepage urls not present in Yoast SEO sitemap (when the homepages display posts) + += 1.8.5 (2016-04-03) = + +* Revert from $_SERVER['PHP_SELF'] to $_SERVER['SCRIPT_FILENAME'] to detect if the user is on login/register/signup page +* Fix incompatibility introduced by WP 4.5 in Edit single taxonomy term screen +* Fix existing post overridden when creating a language and a conflicting plugin sets the global $post on languages pages + += 1.8.4 (2016-03-06) = + +* Revert canonical redirection of static front page when combining plain permalinks + default language hidden in url (introduced in 1.8.2) + += 1.8.3 (2016-03-04) = + +* fix: All pages are redirected to the home page on some installations (introduced in 1.8.2) + += 1.8.2 (2016-03-02) = + +* Add support for the 'wpml_get_default_language()' function from the WPML API +* Stop blocking saving settings when errors are detected (invalid domains) +* Use publicly_queryable => true instead of public => true for the language taxonomy (WP 4.5+) +* fix: PHP notice when pll_default_language() is called before a language is created +* fix: PHP notice undefined property PLL_Language::$page_on_front +* fix: canonical redirection of static front page when combining plain permalinks + default language hidden in url +* fix: YARPP compatibility broken in v1.8 +* fix: Remove the delete link for translations of the default category (introduced back by WP 4.3) +* fix: settings not displayed with WP 4.1 or older + += 1.8.1 (2016-01-31) = + +* Update the list of Facebook locales used for Opengraph support with Yoast SEO and Jetpack +* fix: secondary query with translated post type and untranslated taxonomy mixes languages (introduced in 1.8) +* fix: issue with paged static front page when hiding the default language in url +* fix: potential issue with cache after synchronizations +* fix: trailing slash added to canonical home url outputted by Yoast SEO when using default permalinks + += 1.8 (2016-01-19) = + +* Minimum WordPress version is now 4.0 +* Add ary, bn_BD, en_ZA, es_AR, fr_CA and fr_BE to the predefined languages list +* Adopt WordPress coding standards +* New structure for translated posts and terms (=> several methods of PLL_Model are deprecated). +* Revamp the management of the static front page and page for posts +* Improve performance for navigation menus with a lot of pages +* The Polylang and WPML API are now loaded when 'plugins_loaded' is fired (on frontend only if at least one language has been defined) +* Add 'pll_get_post_translations()' and 'pll_get_term_translations()' to the API +* Add filter 'pll_cookie_expiration' to change the cookie expiration time +* Add support for 'wpml_get_language_information()' function from the WPML API +* The default language is now managed directly from the languages list table +* Various accessibility improvements +* It is now possible to choose the languages flags from the available list (custom flags on frontend still work as previously) +* Revamp the settings page (now a list table with inline configuration) +* Add an option to remove all data when uninstalling the plugin +* Add test of subdomains and domains accessibility +* Add post state for translations of the front page and posts page +* Add better support of the customizer menus introduced in WP 4.3 +* Media taxonomies (created by 3rd party plugins) are now filtered by language when editing a media +* Synchronization of taxonomies (created by 3rd party plugins) and meta are now enabled for media +* The 'hreflang' tag now refers to the locale instead of the 2-letters language code +* Workaround for WordPress locales not being W3C valid (see #33511) +* Workaround a bug in Nextgen Gallery causing redirect on album +* Add compatibility with Duplicate Post plugin to avoid duplicated post keeping the link to translations +* Add compatibility with Jetpack Related Posts +* fix: incorrect rewrite rules after changing how the language is set (need to flush rewrite rules after this) +* fix: password protected pages don't work on multiple domains +* fix: ensure that the page parent is in the correct language when using bulk edit +* fix: is_tax set on category and post tags archives when it should not +* fix: automatically added new top-level pages to menus are not filtered by language +* fix: nav menus locations are messed when changing the default language +* fix: error 404 for untranslated taxonomies pages +* fix: single posts and pages links do not include the language code when using the default permalinks and forcing the language code in url +* fix: missing trailing slash on home url when using default permalinks or a static front page +* fix: sticky visibility is copied to new translation only if the synchronization is activated +* fix: remove "» Languages » [language name]" from the feed title +* fix: spaces are not honored when searching strings translations +* fix: default language not set and terms translations not correctly imported when using WordPress Importer +* fix: the browser language detection does not differentiate 'en_US' and 'en_GB' +* fix: non alphanumeric characters query vars values lead to an infinite redirection loop on static front pages +* fix: user profile not saved for a language when the language code contains a "-" +* fix: non translated posts page always link to the static front page even when they should not +* fix: remove hreflang="x-default" when using one domain per language +* fix: deprecated function notice in WP 4.5 alpha +* fix: wrong url for attachments when media are translated and using subdomains +* fix: wrong url for unattached attachments when using subdirectories (since WP 4.4) +* fix: wrong url scheme for custom flags + += 1.7.12 (2015-11-13) = + +* The language taxonomy is now public for compatibility with WP 4.4 +* fix: nav menus locations are not correctly populated in customizer in WP 4.4 +* fix: the termmeta table was still deleted at upgrade +* fix: fatal error when using the argument 'post_id' in 'pll_the_languages()' (introduced in 1.7.11) [props EKesty](https://wordpress.org/support/topic/bug-on) +* fix: potential notice in 'pll_the_languages()' [props mattkeys](https://wordpress.org/support/topic/bug-on) + += 1.7.11 (2015-10-15) = + +* fix: conflict with GET ajax requests sent by the jquery method load +* fix: notice in frontend-nav-menu.php at line 211 (introduced in 1.7.10) [props Jesse Graupmann](https://wordpress.org/support/topic/warning-and-notice-on-upgrade) +* fix: the parent list in page attributes metabox is not in the correct language (introduced in 1.7.10) +* fix: error 404 for attachments +* fix: the language switcher is not displayed when combining "Forces link to front page" and "Hides languages with no translation" + += 1.7.10 (2015-09-28) = + +* Add Occitan translation contributed by [Cédric Valmary](http://www.totenoc.eu/) +* Add de_DE_formal, en_NZ, es_CO, hy, oci, ps and tl to the predefined languages list +* Add the filter 'pll_predefined_languages' and the actions 'pll_language_edit_form_fields' and 'pll_language_add_form_fields' +* the termmeta table (used in Polylang < 1.2) is no more deleted when uninstalling the plugin (as it will soon be included in WP) +* fix: prevent creating a media translation if one already exists +* fix: Attempt to translate the nav menus for themes registering a theme location but not using it in wp_nav_menu() +* fix: Jetpack infinite scroll +* fix: issue with terms languages when two languages have the same name +* fix: notices when deleting a tag and Lingotek is active +* fix: the languages cache is not cleaned when updating the site home url +* fix: conflict with the theme Ambition +* fix: front page canonical url displayed by Yoast SEO +* fix: typo in options definition at install [props null.bit](https://wordpress.org/support/topic/suggestions-for-two-new-filters?replies=5#post-7466159) +* fix: error when adding a term in a non-translated taxonomy + += 1.7.9 (2015-08-17) = + +* Minimum WordPress version is now v3.9 +* Add: hreflang="x-default" on front page when the default language code is not hidden in urls +* fix: remove hreflang links in html head section of paged archives to please Google +* fix: conflict with WPSEO sitemap caching when using multiple domains. [props Junaid Bhura](https://wordpress.org/support/topic/wp-seo-sitemap-and-translation-subdomain-issue?replies=8#post-7113817) +* fix: change the order of strings translations columns for better display on mobile devices in WP 4.3 +* fix: various issues with nav menus and customizer in WP 4.3 +* fix: correctly disallow unchecking both show names and show flags in the language switcher form + += 1.7.8 (2015-07-21) = + +* fix: conflict with PHP < 5.4 introduced in 1.7.7 + += 1.7.7 (2015-07-20) = + +* Add Romanian translation contributed by uskro +* Add Japanese translation contributed by [Eiko Toda](http://www.eikotoda.com) +* Update French translation contributed by [fxbenard](http://fxbenard.com/) +* The language locale is now validated with the same pattern as in WP 4.3. See #28303 +* fix: make sure that the language switcher never finds translations for untranslated post types (could occur when the post type was previously translated) +* fix: display the default category according to the admin language filter in settings->writing +* fix: flushing rewrite rules at network activation and de-activation is back. [props RavanH](https://polylang.wordpress.com/2015/06/10/polylang-1-7-6-and-multisite/comment-page-1/#comment-1138) +* fix: avoid a conflict with WP Super Cache preloading (loading 'polylang_mo' posts which are 404). [props ecdltf](https://wordpress.org/support/topic/polylang_mo-and-404s-take-2) +* fix: customizer menus issues introduced by changes in WP 4.1 +* fix: strings translations are not saved when pressing enter +* fix: it is not possible to de-activate the translation for custom post types and taxonomies from wpml-config.xml +* fix: conflict with plugins using stringified json in ajax requests + += 1.7.6 (2015-06-10) = + +* Add Galician translation contributed by [Toño Calo](http://fedellar.wordpress.com/) +* fix: incorrect post type archive link for untranslated post types +* fix: notices in wp-import.php +* fix: avoid flushing rewrite rules at network activation and de-activation +* fix: the note below the category list table displays the default category according to the admin language filter +* fix: wrong future posts permalinks +* fix: deleting a media translation deletes the file too +* fix: when using persistent object cache, get_terms is not always filtered by the correct language on admin side +* fix: it is possible to create two categories having the same translation +* fix: fatal error when using the dropdown language switcher in WP < 4.1 + += 1.7.5 (2015-05-11) = + +* Add 'pll_languages_list' filter +* fix: warning when a plugin calls 'icl_object_id' with an untranslated post type (seen in ACF 4.4.1) +* fix: the language is not correctly set from the url when using PATHINFO permalinks (introduced in 1.6!) +* fix: notice when a search is filtered by a taxonomy term in a different language + += 1.7.4 (2015-05-03) = + +* fix: translated taxonomies and post types from wpml-config.xml are not filtered on frontend (introduced in 1.7.2) +* fix: WPML strings translations not always loaded (introduced in 1.7) +* fix: $.ajaxPrefilter() may not work as expected [props ScreenfeedFr](https://wordpress.org/support/topic/ajaxprefilter-may-not-work-as-expected) +* fix: can't hide the language code for the default language when using subdomains +* fix: incorrect static front page url when hiding the default language information +* fix: an untranslated posts page may display posts in all languages +* fix: javascript error when changing the language of a hierarchical post type from the languages metabox in WP 4.2 +* fix: subdomains urls are malformed when the main site uses www. +* fix: suggest tags are not filtered in quick edit +* fix: parent page dropdown list not filtered in quick edit + += 1.7.3 (2015-04-11) = + +* the transient 'pll_languages_list' now stores an array of arrays instead of an array of PLL_Language objects +* fix: fatal error for users hosted at GoDaddy (due to PLL_Language objects stored in a transient) +* fix: additional query vars are removed from home page +* fix: categories are not filtered by the admin language switcher in posts list table (introduced in 1.7) +* fix: when using multiple domains, the domain url is lost when modifying the language slug +* fix: the queried object is incorrectly set for author archives (introduced in 1.6.5) +* fix: notice when a nav menu assigned to a translated nav menu location has been deleted +* fix: no canonical redirection when using pretty permalinks and querying default permalinks + += 1.7.2 (2015-03-23) = + +* fix: comments are filtered for posts in a post type not managed by Polylang +* fix: translated static front page don't work when setting PLL_CACHE_HOME_URL to false (introduced in 1.7) +* fix: the query for taxonomies on custom post types is broken (when adding the language code to the url) + += 1.7.1 (2015-03-20) = + +* fix: wrong redirection when using a static front page and replacing the page name by the language code (introduced in 1.7) + += 1.7 (2015-03-19) = + +* Minimum WordPress version is now v3.8 +* Add new languages to the predefined languages list: Swiss German, Hazaragi +* Add compatibility with nested tax queries introduced in WP 4.1 +* Add compatibility with splitting shared terms to be introduced in WP 4.2 +* Add the possibility to change the domain in the default language when using multiple domains (avoids a conflict with the domain mapping plugin) +* Add the possibility to set the language from the code in url when using default permalinks +* Adding the language code in url is now default at first activation (should improve the out of the box compatibility with other plugins and themes) +* Add new language switcher option to hide a language with no translation +* pll_the_languages() now outputs the js code to handle language change in dropdown list (as done by the widget) +* Improve performance by using base64 encoded flags + various slight optimizations +* Improve protection against chained redirects +* The find posts list is now filtered per media language when clicking on attach link in Media library +* Copy alternative text when creating a media translation +* The category checklist in quick edit is now filtered per post language instead of admin language filter +* Quick and bulk language edit don't break translations anymore if the new language is free +* Make it impossible to change the language of the default categories +* Make sure that a default category defined in settings->writing is translated in all languages +* Tweak css for mobiles in add and edit term form +* Tweak the query getting the list of available posts in the autocomplete input field in the post languages metabox +* fix: after adding a term translation, need to refresh the page before adding a new term +* fix: term translations rows are not modified in list table when a term is added / deleted or inline edited +* fix: post translations rows are not modified in list table when a post is inline edited +* fix: using brackets in language name breaks strings translations +* fix: quick edit may conflict with other plugins +* fix: impossible to use several dropdown languages widgets +* fix: pll_the_languages() may display a dropdown with empty options +* fix: the categories widget does not work correctly with dropdown +* fix: autosave post always created after manual save +* fix: tax query not filtered by language when using 'NOT IN' operator on a translated taxonomy +* fix: incorrect translation url for searches filtered by taxonomy +* fix: backward incompatibility for edited_term_taxonomy action introduced in WP 4.2 +* fix: the home link may be incorrect on MS Windows +* fix: tags in wrong language may be assigned when bulk editing posts in several languages +* fix: tags created when bulk editing posts are not assigned any language +* fix: Illegal string offset 'taxonomy' introduced in v1.6.5 +* fix: Undefined property: WP_Query::$queried_object_id when calling pll_the_languages(array('raw' => 1)) in a function hooked to 'wp'. props [KLicheR](https://wordpress.org/support/profile/klicher) +* fix: Notice in admin.php when used with MailPoet plugin + += 1.6.5 (2015-02-18) = + +* Add new correspondences between WordPress locales and Facebook locales (for WPSEO and Jetpack users) +* fix: quick draft posts are always assigned the default category in the default language +* fix: Notice: Undefined offset: 0 in wp-includes/query.php introduced in WP 4.1 +* fix: is_tax and is_archive are not correctly set when a custom taxonomy term is queried +* fix: conflict introduced by WPSEO 1.7.2+ + += 1.6.4 (2015-02-01) = + +* Add es_MX to predefined languages list +* Add compatibility with WordPress SEO sitemaps for multiple domains and subdomains +* fix: a new post is assigned the wrong (untranslated) default category if no category is assigned by the user +* fix: the home links now have the right scheme even if PLL_CACHE_HOME_URL is not set to false +* fix: fatal error when using old versions of WPSEO (I should do what I tell other to do!) +* fix: strings translations are not switched when using switch_to_blog + += 1.6.3 (2015-01-09) = + +* Add Georgian translation contributed by [Tours in Georgia](http://www.georgia-tours.eu/) +* fix: WXR export does not include the language of untranslated terms (will now work only for newly saved terms) +* fix: better cleaning of DB when translated objects are deleted +* fix: incorrect (ajax) translations links when modifying a term language +* fix: warning: Illegal string offset 'taxonomy' introduced by the combination of WP 4.1 and some plugins. + += 1.6.2 (2014-12-14) = + +* fix: bugs and inconsistencies compared to WPML in 'icl_get_languages' (should fix a conflict with Avada) +* fix: https issue +* fix: stop displaying an error when adding en_US as new language (translation not downloaded) +* fix: infinite redirect loop on (unattached) attachment links +* fix: impossible to add tags in post quick edit (introduced in 1.5) +* fix: the customizer does not land to the right page when cumulating: static front page + page name in url + default language code not hidden +* fix: read parent theme wpml-config.xml before child theme +* fix: add protection to avoid empty language +* fix: page preview link again + += 1.6.1 (2014-11-19) = + +* Add Brazilian Portuguese translation contributed by [Henrique Vianna](http://henriquevianna.com/) +* Improve compatibility with Types: allow custom fields to be populated when creating a new translation +* Make it impossible to remove the translations of the default category +* Fix: possibility to add a path when using multiple domains (same path for all languages) broken since v1.5.6 +* Fix: preview link for non default language when using multiple domains +* Fix: error displayed when setting the static front page and only one language has been defined +* Fix: revert changes on rewrite rules with front introduced in 1.6 +* Fix: conflict with WordPress SEO when no language has been created + += 1.6 (2014-10-27) = + +* Add Croatian translation contributed by Bajro +* Add new languages to predefined languages list: Azerbaijani, English (Australia), English (UK), Basque +* Add flag in front of the language select dropdown for posts and terms +* Add widget text translation +* Add opengraph support for locale and translations when WordPress SEO or Jetpack are activated +* Add error message if attempting to assign an untranslated page as static front page +* Add 'pll_sanitize_string_translation' filter to sanitize registered strings translations when saved +* Fix: change the en_US flag to US flag. The UK flag is now associated to en_GB +* Fix: change Belarusian locale from be_BY to bel to in agreement with translate.wordpress.org +* Fix home pages duplicate urls when using domains or subdomains +* Fix rewrite rules with front +* Fix: terms are always in default language when created from post bulk edit + += 1.5.6 (2014-10-11) = + +* Fix: the admin language filter is not active for paginated taxonomy in nav menu admin panel +* Fix: wrong redirection if a domain is a substring of another domain (ex: mysite.com and mysite.co) +* Fix: impossible to translate numeric values in options defined in wpml-config.xml +* Fix: call to undefined method PLL_Links::get_translation_url() with Avada theme +* Fix: manage_{$this->screen->taxonomy}_custom_icolumn is a filter and not an action + += 1.5.5 (2014-09-10) = + +* Fix: missing argument 4 in icl_translate +* Fix: conflict with Vantage theme +* Fix: possible issue with cookie domain on 'localhost' +* Fix: filtering string translations does not work when the group name contains a space +* Fix: Possible 404 error for attachments +* Fix: PHP notice when a shared term is not translated in all taxonomies + += 1.5.4 (2014-08-13) = + +* Add new API functions: pll_get_post_language, pll_get_term_language, pll_translate_string +* Add better compatibility with Jetpack 3 +* Fix: attachments don't get any language when uploaded from frontend +* Fix: authors cannot create tags +* Fix: too restrictive capability checks for some edge cases +* Fix: conflict with WPSEO: taxonomy metas cannot be saved + += 1.5.3 (2014-07-12) = + +* Add: Capability check before creating links in post list table +* Add: Possibility not to cache languages objects with option PLL_CACHE_LANGUAGES (for GoDaddy users) +* Fix: Saving a header or a background in menu Appearance resets nav menus locations (introduced in 1.5) +* Fix: sub-sub-options and deeper levels defined in wpml-config.xml are not translated +* Fix: Fatal error when creating a new site when Polylang is network activated (introduced in v1.5.1) +* Fix: Admin language forced to English when activating Polylang (before creating any new language) +* Fix: 'pll_count_posts' second parameter not taken into account +* Fix: 'edit-post' and 'create-posts' capabilities are not differentiated when saving a post + += 1.5.2 (2014-06-24) = + +* Fix: Revert post translations terms cleaning introduced in 1.5 as it seems to cause problems +* Fix: Impossible to delete a biographical info (introduced in 1.5) +* Fix: Security issue reported by [Gregory Viguier](http://www.screenfeed.fr/) + += 1.5.1 (2014-06-19) = + +* Add: filter 'pll_settings_tabs' and action 'pll_settings_active_tab_{$tab}' +* Add: possibility to add a path when using multiple domains (same path for all languages) +* Fix: Bad redirection if /language/ is added to urls (introduced in 1.5) +* Fix: Nav menu locations are not saved in customizer (introduced in 1.4) +* Fix: Unable to unset nav menu locations +* Fix: Incorrect link for date archives in language switcher (introduced in 1.5) +* Fix: Fatal error when using featured content in Twenty Fourteen +* Fix: Posts bulk edit broken (introduced in 1.5) +* Fix: Polylang does not play nice with switch_to_blog +* Fix: Warning: reset() expects parameter 1 to be array, null given in admin-filters-columns.php on line 81 + += 1.5 (2014-05-29) = + +* Add Ukrainian translation contributed by [http://getvoip.com/](http://getvoip.com/) +* Refresh translation metaboxes (again): now translated posts are chosen from an autocomplete input field +* Categories and post tags translations are also chosen in an autocomplete input field +* Better error management on languages pages +* Use Dashicons instead of Icomoon icons for WP 3.8+ +* Check if translated post is readable by the current user before displaying the language switcher +* Minimum Twenty Fourteen version is now 1.1 +* Code cleaning +* Add support for Quick draft introduced in WP 3.8 +* Add support for object cache plugins for recent posts and recent comments widgets +* Add support for pages with modified query in the language switcher (ex: when multiple post types queried on the same page) +* Add new API functions: pll_languages_list, pll_set_post_language, pll_set_term_language, pll_save_post_translations, pll_save_term_translations, pll_count_posts +* Add new filter pll_the_languages_args +* Add support for ICL_LANGUAGE_CODE == 'all' on admin side +* Fix: Galician flag +* Fix: static page on front pagination is broken +* Fix: search url may be broken +* Fix: PHP notice in icl_get_languages +* Fix: more robust way of detecting language in url when using directory +* Fix: delete translations terms orphans in database +* Fix: inconsistent behavior when setting page on front from customizer +* Fix: deleting a category assigns posts to wrong default category +* Fix: quick edit breaks synchronization +* Fix: some security issues + += 1.4.5 (2014-04-19) = + +* Fix: Notice when combined with WPSEO 1.5+ +* Fix: Impossible to disable a widget language filter once set (introduced in 1.4.4) +* Fix: Unexpected redirection of the homepage with language code when permalink structure has no trailing slash (introduced in 1.4.4) +* Fix: Some installs lead to wrong redirection when using domains (introduced in 1.4.4) +* Fix: Possible infinite redirection while previewing posts (introduced in 1.4.4) +* Fix: Uploaded medias don't get a language since WP 3.9 +* Fix: Compatibility with Twenty Fourteen Ephemera widget in the version shipped with WP 3.9 + += 1.4.4 (2014-04-09) = + +* Add: Compatibility with widgets customizer introduced in WP 3.9 +* Fix: No post in translation dropdown after switching the language in edit post (introduced in 1.4.3) +* Fix: No canonical redirection when there is no language code in url and the language code is not hidden for the default language +* Fix: Suppress language cookie when using multiple domains + += 1.4.3 (2014-03-22) = + +* Add: Serbian translation contributed by Sinisa +* Add: Myanmar translation contributed by Sithu Thwin +* Fix: comment form redirects to wp-admin when using multiple domains or subdomains. +* Fix: fatal error with old versions of PHP (tested on PHP 5.2.4) +* Fix: Bad gateway experienced by users hosted by wpengine.com +* Fix: links got from tiny MCE link button are filtered with admin language filter instead of current post language +* Fix: possibly wrong redirection in check_language_code_in_url when using multiple domains or subdomains + += 1.4.2 (2014-02-24) = + +* Add: check multiple post types in PLL_Model::count_posts +* Fix: error 404 on category links when setting the language by content (introduced in 1.4.1) +* Fix: PHP notices in frontend-nav-menu.php with Artisteer themes +* Fix: decrease the memory usage of untranslated posts list +* Fix: home page not correctly redirected to canonical when using page on front and page name is kept in url + += 1.4.1 (2014-02-16) = + +* Add: Czech translation contributed by [Přemysl Karbula](http://www.premyslkarbula.cz) +* Fix: the displayed language is not correct in quick edit for categories and post tags +* Fix: the language switcher does not display the correct link for translated parent categories if only children have posts +* Fix: 3rd parameter of icl_object_id is not optional +* Fix: issue when combining multiple domains and browser detection -> the combination is now forbidden +* Fix: conflict Shiba Media Library: link between media translations is lost when using media quick edit +* Fix: notice when using taxonomies in wpml-config.xml +* Fix: incorrect post format link +* Fix: Twenty Fourteen Ephemera widget strings are not translated + += 1.4 (2014-01-22) = + +* Add Traditional Chinese translation contributed by [香腸](http://sofree.cc/) +* Minimum WordPress version is now v3.5 +* Refresh translations metaboxes: now translated posts are chosen in a dropdown list +* Check if translated archives for category, tag and post format are empty before displaying the language switcher +* Add specific management of translated featured tag in Twenty Fourteen +* Add the possibility not to cache homepage urls with option PLL_CACHE_HOME_URL (for users having several domains). +* The function get_pages is now filtered by language +* Ajax requests on frontend are now automatically detected. It is no more necessary to set 'pll_load_front' :) +* Various performance improvements +* 'pll_get_post_types' and 'pll_get_taxonomies' filters must be added *before* 'after_setup_theme' is fired +* Pre 1.2 data will be removed from DB at first upgrade at least 60 days after upgrade to 1.4 +* Removed some duplicate code between admin and frontend +* Bug correction: incorrect pagination when using domains or subdomains +* Bug correction: post format link not translated +* Bug correction: impossible to use child terms with same name in hierarchical taxonomies +* Bug correction: the terms list table is filtered according to new translation language instead of admin language filter + += 1.3.1 (2013-12-13) = + +* Bug correction: fatal error on settings page if a static front page without language is set +* Bug correction: wrong home url when using different domains per language + += 1.3 (2013-12-11) = + +* Refresh admin UI for better look in WP 3.8 and more dynamic comportment +* The "Detect browser language" option does now also controls returning visits (based on cookie). +* Improved performance by optimizing some queries for WP 3.5+ +* The user biography in default language is now stored in default WordPress usermeta +* Add language parameter in API function pll_home_url and allow to call it on admin side +* Calling 'get_terms' with the 'lang' parameter now uses a cache object per language +* Bug correction: conflict with unstranslated taxonomies +* Bug correction: possible malformed translation archive url in language switcher +* Bug correction: a wrong language may be displayed in quick edit dropdown +* Bug correction: it is possible to add multiple translations (in the same language) for a single taxonomy term +* Bug correction: non public post types and taxonomies are visible in Polylang settings +* Bug correction: the language is always chosen from cookie (or browser preferences) in some installations +* Bug correction: Firefox language preference is not recognized when comparison is made on locale (instead of ISO 639-1 language code) +* Bug correction: incorrect tax_query in PLL_Auto_Translate + += 1.2.4 (2013-11-28) = + +* Better support for theme customizer +* Bug correction: admin bar search does not filter by language +* Bug correction: possible conflict on secondary query when querying taxonomies or single page +* Bug correction: post type is not included in url when editing or adding a term translation +* Bug correction: various warnings and PHP notices + += 1.2.3 (2013-11-17) = + +* Avoid fatal error when upgrading with Nextgen Gallery active +* Bug correction: menus locations of non default language are lost at theme deactivation +* Bug correction: impossible to set menus locations of non default language in some specific cases +* Bug correction: bbpress admin is broken + += 1.2.2 (2013-11-14) = + +* Updated Polish translation thanks to [Bartosz](http://www.dfactory.eu/) +* Delay strings translations upgrade from 'wp_loaded' to 'admin_init' to avoid fatal error when wp-ecommerce is active +* Remove Jetpack infinite scroll compatibility code as it seems useless with new Polylang 1.2 code structure +* Bug correction: fatal error when doing ajax on frontend +* Bug correction: ICL_LANGUAGE_CODE incorrectly defined when doing ajax on frontend +* Bug correction: ['current_lang'] and ['no-translation'] indexes disappeared from pll_the_languages raw output +* Bug correction: invalid argument supplied for foreach() in /polylang/include/mo.php on line 57 +* Bug correction: cookie may not be correctly set +* Bug correction: languages columns may not be displayed in custom post types and custom taxonomies tables + += 1.2.1 (2013-11-11) = + +* Update badly encoded Latvian translation +* Suppress one query in PLL_WPML_Config when not in multisite +* Bug correction: strings translations are not correctly upgraded +* Bug correction: nav menus locations are not correctly upgraded for non default language + += 1.2 (2013-11-10) = + +This version does include important changes in database. More than ever, make a database backup before upgrading + +* Add Arabic translation contributed by [Anas Sulaiman](http://ahs.pw/) +* Major rewrite with new structure +* Change the language and translations model from meta to taxonomy (no extra termmeta table created anymore) +* Move the strings translations from option to a custom post type +* Add support for language code in subdomain and for one different domain per language (experimental) +* Add support of WordPress Importer plugin. Export must have been done with Polylang 1.2+ (experimental) +* Add support for theme navigation customizer (was de-activated by Polylang since WP 3.4) +* Request confirmation for deleting a language +* Better management of default category for each language +* Now check if date and post type archives are translated before displaying the language switcher +* Update management of the 'copy' action of the custom fields section in wpml-config.xml +* Add support for ICL_LANGUAGE_CODE and ICL_LANGUAGE_NAME of the WPML API on admin side +* Add support of WPSEO custom strings translations when the language is set from content +* Modify admin language filter for valid html and better visibility +* Synchronization is now disabled by default (due to too much conflicts / questions on the forum) +* Include rel="alternate" hreflang="x" selflink per google recommendation +* Improve inline documentation +* Bug correction: wrong datatype for second argument in polylang/include/auto-translate.php (introduced in 1.1.6) +* Bug correction: same id is used for all language items in menu +* Bug correction: wpml-config.xml file not loaded for sitewide active plugins on network installations +* Bug correction: page parent dropdown list (in page attributes metabox) not correctly displayed when switching from a language with empty list + += 1.1.6 (2013-10-13) = + +* Add the possibility to display the upgrade notice on plugins page +* Bug correction: Illegal string offset 'taxonomy' in polylang/include/auto-translate.php +* Bug correction: user defined strings translations are not loaded on admin side +* Bug correction: untranslated post types are auto translated +* Bug correction: tags are not added to post when the name exists in several languages and they are not translations of each other + += 1.1.5 (2013-09-15) = + +* Add compatibility with Aqua Resizer (often used in portfolio themes) +* Add support of 'icl_get_default_language' function from the WPML API +* Remove the 3 characters limitation for the language code +* Change default names for zh_CN, zh_HK, zh_TW +* Bug correction: urls are modified in search forms + += 1.1.4 (2013-08-16) = + +* Add simplified Chinese language contributed by [Changmeng Hu](http://www.wpdaxue.com) +* Add Indonesian language contributed by [ajoull](http://www.ajoull.com/) +* Bug correction: nav menu locations are lost when using the admin language filter +* Bug correction: the cookie is not set when adding the language code to all urls (introduced in 1.1.3) + += 1.1.3 (2013-07-21) = + +* Add Venetian language contributed by Michele Brunelli +* Bug correction: wrong rewrite rules for non translated custom post type archives +* Bug correction: 'post_id' parameter of pll_the_languages does not work +* Bug correction: warning in wp_nav_menu_objects with Artisteer generated themes +* Bug correction: warning when used together with theme my login plugin +* Bug correction: language slug is modified and translations are lost when creating a nav menu with the same name as a language + += 1.1.2 (2013-06-18) = + +* Posts and terms now inherit parent's language if created outside the standard WordPress ui +* Improve the compatibility with the plugins Types and The Events Calendar, and again with WordPress SEO +* Improve performance +* Improve html validation +* Add 'raw' argument to 'pll_the_languages' +* Add the filter 'pll_translation_url' +* Bug correction: no language is set for a (translated custom taxonomy) term when added from a (non translated) custom post type edit page +* Bug correction: warning if 'get_terms' is called with a non-array 'include' argument (introduced in 1.1.1) +* Bug correction: warning if the menu language switcher has nothing to display + += 1.1.1 (2013-05-20) = + +* Move nav menu language switcher split from 'wp_nav_menu_objects' to 'wp_get_nav_menu_items' filter +* Add the filter 'pll_redirect_home' +* Automatically translate ids in 'include' argument of 'get_terms' (useful for the menus in the Suffusion theme) +* Add compatibility with Jetpack infinite scroll +* Bug correction: rtl text direction not set when adding the language code to all urls (introduced in 1.1) +* Bug correction: hide again navigation panel in theme customizer as it still doesn't work +* Bug correction: is_home not set on translated page when searching an empty string +* Bug correction: fatal error when creating a post or term from frontend (introduced in 1.1) +* Bug correction: attachments may load a wrong language when media translation was enabled then disabled +* Bug correction: warning when querying posts before the action 'wp_loaded' has been fired (in auto-translate.php) +* Bug correction: potential issue if other plugins use the filter 'get_nav_menu' +* Bug correction: interference between language inline edit and search in admin list tables +* Bug correction: auto-translate breaks queries tax_query when the 'field' is set to 'id' +* Bug correction: search is not filtered by language for default permalinks (introduced in 1.1) +* Tests done with WP 3.6 beta 3 and Twenty thirteen + += 1.1 (2013-05-10) = + +* When adding the language to all urls, the language is now defined in (plugins_loaded, 1) for better compatibility with some plugins (WordPress SEO) +* When querying posts and terms, ids are now automatically translated +* Add the possibility to group string translations +* Add the possibility to delete strings registered with 'icl_register_string' +* Move the option 'polylang_widgets' in general polylang options +* Better integration of the multilingual nav menus (everything is now integrated in the menus page of WordPress +* The language switcher is now a menu item which can be placed everywhere in a nav menu +* Posts or terms created from frontend are now assigned the current language (or another one if specified in the variable 'lang') +* Bug correction: continents-cities-xx_XX.mo not downloaded +* Bug correction: a gzipped 404 page is downloaded when a mo file does not exist on WordPress languages files repository +* Bug correction: post_date_gmt not synchronized together with post_date +* Tests done with WP 3.6 beta 2 and Twenty thirteen + += 1.0.4 (2013-04-08) = + +* Add Estonian translation contributed by [Ahto Naris](http://profiles.wordpress.org/ahtonaris/) +* Now compatible with languages files stored in wp-content/languages/themes +* Bug correction: page preview does not work when adding the language code to all urls +* Bug correction: error when a post type or taxonomy label is not a string +* Bug correction: admin text section of wpml-config.xml (introduced in 1.0.3) +* Bug correction: infinite redirect loop when querying an unattached media and the language code is added to all urls +* Bug correction: the text direction is not set from Polylang options when the language code is added to all urls +* Bug correction: get_adjacent_post is filtered by language even for post types without language +* Bug correction: the home url is not not in the correct language in wp-login.php +* Bug correction: the language is not correctly set when using date and name permalinks (introduced in 1.0.3) + += 1.0.3 (2013-03-17) = + +* Add Catalan translation contributed by [Núria Martínez Berenguer](http://nuriamb.capa.webfactional.com) +* Add Ukrainian translation contributed by [cmd soft](http://www.cmd-soft.com/) +* Improve compatibility with WordPress SEO (sitemap for categories and tags) +* A query is no more filtered by language when setting the parameter 'lang' to an empty value +* Add the possibility to create a custom wpml-config.xml file in wp-content/polylang/ +* Bug correction: custom menus are not displayed on search page (introduced in 1.0.2) +* Bug correction: sql error when filtering terms by language (introduced in 1.0.2) +* Bug correction: SSL doesn't work properly +* Bug correction: php notice on IIS servers +* Bug correction: clicking on the radio buttons in the admin language switcher does not work in Chrome +* Bug correction: on multisite, the signup page is redirected to the home page +* Bug correction: date archives are not correctly filtered for the default language when hiding the language code and using date and name permalinks +* Bug correction: only one wpml-config.xml file is parsed + += 1.0.2 (2013-02-26) = + +* Add the possibility to query comments by language +* Add the possibility not to set a cookie by defining PLL_COOKIE to false (Polylang may not work as expected on some pages) +* Now a returning visitor is redirected to its preferred language when visiting the front page in the default language +* Add compatibility with the plugin Custom field template (copy and synchronize custom fields) +* Improve compatibility with plugins or themes which overwrite columns in posts list table +* Add the filter 'pll_get_flag' +* Add support of 'icl_unregister_string' function from the WPML API +* Bug correction: synchronizing custom fields breaks the plugin Advanced Custom Fields +* Bug correction: 'pll_default_language' broken +* Bug correction: rewrite rules are not flushed when re-activating the plugin +* Bug correction: feed urls are not correctly escaped when using default permalinks +* Bug correction: notice Undefined index: media_support +* Bug correction: custom post types and taxonomies set in wpml-config.xml are not hidden +* Bug correction: get_terms cannot query multiple languages +* Bug correction: 'icl_register_string' is now persistent as in WPML (fixes Nextgen gallery translations which were not working) + += 1.0.1 (2013-01-28) = + +* Add Swedish translation contributed by [matsii](http://wordpress.org/support/profile/matsii) +* Add 2 new API functions : 'pll_is_translated_post_type' and 'pll_is_translated_taxonomy' +* Bug correction: when using a static front page, the posts page is not filtered by language (introduced in 1.0) +* Bug correction: disable translation for hard coded menu as it creates more problems than it solves (introduced in 1.0) + += 1.0 (2013-01-24) = + +* Add Hungarian translation contributed by Csaba Erdei +* Add Norwegian translation contributed by [Tom Boersma](http://www.oransje.com/) +* Add Slovak translation contributed by [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/user-reviews/) +* Code cleaning -> remove compatibility with versions older than 0.8 +* Add search in the string translations list table +* Add options to better control the synchronization of various metas for posts +* It is now possible to synchronize sticky posts and publication dates +* Add option to disable the multilingual support of media +* Add options to better control the multilingual capability of custom post types and taxonomies +* Better integration with new media management in WP 3.5 +* Improve menu translation for themes which register a theme location but don't use it in wp_nav_menu (hard coded menu) +* Add the pll_preferred_language filter allowing plugins to modify the language set by browser preferences detection +* Add support of the WPML config file +* Add support of 'icl_get_languages' and 'icl_link_to_element' functions from the WPML API +* Add compatibility with YARPP and improve compatibility with WordPress SEO +* Change cookie name which conflicts with Quick cache and allow users to overwrite it by defining the constant PLL_COOKIE +* Bug correction: again the canonical redirection +* Bug correction: the languages are not correctly displayed after they have been modified using quick edit +* Bug correction: undefined index notice when saving strings translation when the admin language filter is active +* Bug correction: rewrite rules are not correctly flushed when adding / deleting a language (introduced in 0.9.2) +* Bug correction: the list of pages is displayed when a static font page translation is not translated (now replaced by the list of posts) +* Bug correction: permalinks are not modified when doing cron and the language code is added to all urls +* Bug correction: creating a new term with the same name as a language may modify the language code (slug) + += 0.9.8 (2012-12-05) = + +* Bug correction: ajax on frontend does not work when adding the language code to all urls +* Bug correction: search forms using the get_search_form filter do not work + += 0.9.7 (2012-12-04) = + +* Bug correction: the admin language filter does filter non translatable post types +* Bug correction: again the canonical redirection +* Bug correction: fatal error when Polylang is used together with 'Author Avatars List' +* Bug correction: widget titles uselessly appear in the strings translations table when the widget is set for only one language +* Tests done with WordPress 3.5 RC3 and Twenty Twelve + += 0.9.6 (2012-11-26) = + +* It is now possible to query the terms by language using the WordPress function 'get_terms' +* Bug correction: search for empty string in default language displays posts in all languages when hiding the URL language information for default language +* Bug correction: completely reworked the canonical redirection introduced in 0.9.5 which created more problems than it solved +* Bug correction: ajax for media translations does not work +* Started tests with WordPress 3.5 RC1 and Twenty Twelve + += 0.9.5 (2012-11-13) = + +* The user can now choose the number of languages and strings translations to display +* Add compatibility with the 'icl_object_id' function and ICL_LANGUAGE_CODE and ICL_LANGUAGE_NAME constants from the WPML API +* Add 17 languages to the predefined list (automatic download and update of language files won't work) +* Bug correction: post preview does not work when adding the language code to all urls +* Bug correction: redirect to front page in default language when posting a comment on static front page +* Bug correction: impossible to create terms with the same name in different languages +* Bug correction: query string added by other plugins is erased when adding the language code to all urls +* Bug correction: redirect erase 'POST' variables on homepage when adding the language code to all urls +* Bug correction: English (en_US) loads rtl style when using a localized WordPress package with an rtl language +* Bug correction: on some installation strings translations do not work with some special characters +* Bug correction: incoming links are not redirected to canonical url when adding the language code to all urls and hiding the code for the default language +* Bug correction: search form does not work in non default language when using permalinks without trailing slash + += 0.9.4 (2012-10-23) = + +* Add Afrikaans translation contributed by [Kobus Joubert](http://translate3d.com/) +* Add Belarusian translation contributed by [Alexander Markevitch](http://fourfeathers.by/) +* Add Afrikaans (af) and Belarusian (be_BY) to predefined languages list (automatic download and update of language files won't work) +* Add the possibility to translate the date format and time format +* Add compatibility with the 'icl_get_home_url' function from the WPML API +* Bug correction: still some issues with string translations +* Bug correction: search is not filtered by the (default) language when the language is set by content and the language code is hidden for the default language +* Bug correction: posts & pages preview urls are broken when adding the language code to all urls +* Bug correction: automatically added new top-level pages to menus are not filtered by language +* Bug correction: the admin language filter messes the categories languages when editing a post and the parent dropdown list when editing a category +* Bug correction: search form does not work when using a static front page (introduced in 0.9.2) +* Bug correction: can't set languages for categories and post tags on blogs created after polylang has been activated at network level +* Bug correction: menus don't work with catch box theme ('has_nav_menu' not correctly filtered) + += 0.9.3 (2012-10-08) = + +* Add Bulgarian translation contributed by [pavelsof](http://wordpress.org/support/profile/pavelsof) +* Add compatibility with WPML API for strings translations +* Bug correction: dates are not translated (introduced in 0.9.2) +* Bug correction: the language is lost when keeping - No change - for language in bulk edit +* Bug correction: categories and tags are duplicate (when default language is set automatically to existing content and categories and tags share the same name) + += 0.9.2 (2012-09-30) = + +* Support new WordPress (WP 3.5+) convention for js and css files naming +* Improve performance, mainly on frontend +* Bug correction: the category language is not set when creating it in the post editor (introduced in 0.9) +* Bug correction: unable to add a query string when using a static front page +* Bug correction: ajax tag suggestion in "edit post" conflicts with the admin content language filter +* Bug correction: ugly notices when trying to access a static front page which has not been translated +* Bug correction: the language code is added to custom post types and taxonomies permalinks even if they are not translatable +* Bug correction: some arrays in wp_locale mix English and other language +* Bug correction: the media language is not correctly set when uploading from post if the post has not been saved after choosing the language + += 0.9.1 (2012-09-20) = + +* Add Finnish translation contributed by [Jani Alha](http://www.wysiwyg.fi) +* Bug correction: improve the robustness of the admin content language filter +* Bug correction: the language switcher displays languages which have no posts or pages (introduced in 0.9) +* Bug correction: wrong default language when adding a new media +* Bug correction: the dropdown language switcher does not switch language when there is no post translation +* Bug correction: issue with translations when using category quick edit +* Bug correction: home redirects to 404 when combining static front page + force_lang = 1 + hide_default = 0 + += 0.9 (2012-09-12) = + +* Add Turkish translation contributed by [darchws](http://darch.ws/) +* Add media translation support +* Add a persistent content language filter on admin side (WP 3.2+ required) +* Add biographical info translation +* Add multiline support for string translations +* Add the possibility to clean the strings translation database +* Add quick edit and bulk edit support for posts and pages +* Add quick edit support for categories and tags +* The language is now loaded with 'setup_theme' action instead of 'wp' action when always adding language information url +* Search form now does use javascript only for searchform.php when pretty permalinks are not used +* Add the option PLL_SEARCH_FORM_JS to disable the js code used to modify the search form +* Suppress the option PLL_SYNC, replaced by an option in the language settings ui +* Suppress the PLL_DISPLAY_ALL option +* Suppress the template tag 'the_languages' (replaced by 'pll_the_languages' since v0.5) +* Suppress the function 'pll_is_front_page' (useless since 0.8.2) +* Bug correction: the browser language is sometimes not correctly detected by Android +* Bug correction: the rtl text direction is not correct when editing an existing language +* Bug correction: rss feed does not work if translated site title or tagline contains special characters +* Bug correction: post types and taxonomies labels are not translated on frontend +* Bug correction: the filter 'pll_copy_post_metas' does not work for metas with multiple values +* Bug correction: translations table for post and terms are uselessly serialized two times +* Bug correction: attempt to suppress conflict with themes which hardcode the name of nav menus (but do define a theme location) +* Bug correction: homepage displays all posts when the front page displays a static page and no page is selected for front page (but one is selected for posts page) +* Bug correction: widgets disappear when Polylang is enabled + += 0.8.10 (2012-08-06) = + +* Add Lithuanian (lt_LT) to predefined languages list (automatic download and update of language files won't work) +* Add Lithuanian translation contributed by [Naglis Jonaitis](http://najo.lt/) +* Bug correction: empty string translation issue +* Bug correction: 'wp_list_pages' does not filter custom post types +* Bug correction: warning if posts are queried before the action 'wp_loaded' has been fired +* Bug correction: notice in twentyten when requesting a date archive with no posts + += 0.8.9 (2012-07-20) = + +* Add Portuguese translation contributed by [Vitor Carvalho](http://vcarvalho.com/) + += 0.8.8 (2012-07-18) = + +* Validation improvement thanks to kg69design +* Bug correction: custom post types rewrite rules are broken when registered with query_var=>false +* Bug correction: user admin language not deleted when uninstalling the plugin +* Bug correction: pll_current_language('name') returns locale instead of language name +* Bug correction: ajax on frontend does not work +* Bug correction: homepage pagination broken when redirecting the language page to a static front page +* Bug correction: taxonomies conflicts on custom post types +* Bug correction: the admin language is not updated when edited by other users + += 0.8.7 (2012-06-10) = + +* Add the possibility to load Polylang API for ajax requests on frontend +* Bug correction: search form is broken when using a static front page +* Bug correction: admin bar search does not work +* Tests done with WordPress 3.4 RC2 + += 0.8.6 (2012-05-23) = + +* Add the possibility to use a local config file to set options +* Improve robustness (less PHP notices) +* Bug correction: Menus not showing in preview mode +* Bug correction: fatal error when customizing a theme in WP 3.4 beta 4 +* Bug correction: second page of search results returns 404 when using pretty permalinks + += 0.8.5 (2012-05-14) = + +* Bug correction : sites using static front page are messed in v0.8.4 + += 0.8.4 (2012-05-13) = + +* Add a new argument 'post_id' to the function pll_the_languages to display posts translations within the loop +* Bug correction: every posts in every languages are shown on the homepage when requesting the wrong one with or without 'www.' +* Bug correction: every posts in every languages are shown when requesting /?p=string +* Bug correction: the language is not correctly set for wp-signup.php and wp-activate.php +* Bug correction: wrong home links when using permalinks with front with WP 3.3 and older +* Bug correction: wrong redirection after posting a comment when adding the language information to all urls +* Bug correction: term language may be lost in some situations +* Bug correction: post language is set to default if updated outside the edit post page +* Bug correction: javascript error in WP 3.1 +* Bug correction: can't toggle visibility of tags metabox in edit post panel +* Tests done with WordPress 3.4 beta 4 + += 0.8.3 (2012-04-10) = + +* Add Danish translation contributed by [Compute](http://wordpress.org/support/profile/compute) +* Add Spanish translation contributed by Curro +* Add the possibility to add a content in a different language than the current one by setting explicitly the lang parameter in the secondary query +* Add support of PATHINFO permalinks +* Bug correction: secondary queries not correctly filtered by language +* Bug correction: wrong archives links when using permalinks with front +* Bug correction: wrong homepage link when keeping 'language' in permalinks with front +* Bug correction: flush_rewrite_rules notice when setting up a static front page (introduced in 0.8.2) +* Bug correction: every posts in every languages are shown when hitting the homepage with a query string unknown to WP (thanks to Gonçalo Peres) +* Bug correction: every posts in every languages are shown on the homepage when PHP adds index.php to the url +* Tests done with WordPress 3.4 beta 1 + + += 0.8.2 (2012-03-20) = + +* Add Italian translation contributed by [Luca Barbetti](http://wordpress.org/support/profile/lucabarbetti) +* Improve performance on admin side +* Comment status and ping status are now copied when adding a new translation +* Deprecated API function 'pll_is_front_page' as it is now useless +* Bug correction: Wrong translation url for taxonomies when adding the language information to all urls +* Bug correction: "translation" of search page does not work if the site is only made of pages +* Bug correction: wrong language permalink structure introduced in 0.8.1 +* Bug correction: wrong language set when clicking on "add new" translation in edit category and edit tags panels +* Bug correction: site does not display if no languages are set +* Bug correction: get_author_posts_url is 404 +* Bug correction: homepage is 404 when using a static front page and adding the language information to all urls + += 0.8.1 (2012-03-11) = + +* Add Latvian translation contributed by [@AndyDeGroo](http://twitter.com/AndyDeGroo) +* It is now possible to synchronize multiple values for custom fields +* Add new API function pll_current_language +* Add the pll_rewrite_rules filter allowing plugins to filter rewrite rules by language +* WP 3.4 preparation: disable the menu section in the customize theme admin panel (unusable with Polylang) +* Bug correction: removing 'language' in permalinks does not work in WP 3.4 alpha +* Bug correction: problems with custom post type archives when 'has_archive' is set (thanks to AndyDeGroo) +* Bug correction: 404 error when combining %postname% permastructure with "Add language information to all URL" option +* Bug correction: translated custom strings are duplicated if registered several times +* Bug correction: queries with an array of post types are not correctly filtered +* Bug correction: wp-login.php always in English + += 0.8 (2012-02-29) = + +* Sticky posts are now filtered by language +* It is now possible to use the language page as home page +* Add an "About Polylang" metabox on the languages admin page +* Add the pll_the_languages filter allowing to filter the whole output of the language switcher +* Add a new argument 'display_names_as' to the function pll_the_languages +* Add pll_get_post_types & pll_get_taxonomies filters allowing to enable / disable the language filter for post types & taxonomies +* Add ckb to predefined languages list +* Completely reworked the string translation storage in the database +* Some performance improvements on admin side +* Improve compatibility with other plugins broken by the home url filter +* Add an option to disable the home url filter +* Add an option to disable synchronization of metas between translations +* Bug correction: body class 'home' is not set on translated homepage +* Bug correction: robots.txt is broken when adding the language code to all urls (including default language) +* Bug correction: bad name for the Czech flag +* Bug correction: bad language information in rss feed for WP < 3.4 +* Bug correction: signup broken on multisite +* Bug correction: the translation url is set to self when using a static front page and no page for posts and there is no translation +* Bug correction: problems with custom post type archive titles +* Bug correction: problems with custom post type if rewrite slug is different from post_type (thanks to AndyDeGroo) +* Bug correction: quick edit still breaks translation linking of pages (thanks to AndyDeGroo) +* Bug correction: bad rewrite rules for feeds (introduced in 0.7.2) +* Bug correction: the order is not saved when creating a language +* Bug correction: the categories list is not updated when adding a new category (ajax broken) + += 0.7.2 (2012-02-15) = + +* Add Polish translation contributed by [Peter Paciorkiewicz](http://www.paciorkiewicz.pl) +* Add 5 new languages to predefined list +* completely reworked rewrite rules +* WP 3.4 preparation: add new WordPress languages files to download when creating a new language +* Bug correction: custom nav menus do not work in Artisteer generated themes +* Bug correction: having a single language causes multiple warnings while saving post/page. +* Bug correction: custom nav menu broken on archives pages +* Bug correction: the language switcher does not link to translated post type archive when using pretty permalinks +* Bug correction: the tags are not saved in the right language when translated tags have the same name +* Bug correction: bad link in post preview when adding language code to all urls +* Bug correction: feed not filtered by language when adding language code to all urls +* Bug correction: duplicate canonical link when used together with WordPress SEO by Yoast +* Bug correction: the all posts admin page is messed if another plugin adds a column +* Bug correction: 404 error on static front page when adding language code to all urls (including default language) + += 0.7.1 (2012-02-06) = + +* Allow using 3 characters languages codes (ISO 639-2 or 639-3) +* The predefined languages dropdown list now displays the locale to help differentiate some languages +* Add 5 new languages to predefined list +* Bug correction: the filter 'pll_copy_post_metas' does not work +* Bug correction: impossible to add a tag in the edit post panel +* Bug correction: rewrite rules not correct +* Bug correction: cache issue with css and js files + += 0.7 (2012-01-30) = + +* Add Hebrew translation contributed by [ArielK](http://www.arielk.net) +* Add support for RTL languages for both frontend and admin +* Twenty Ten and Twenty Eleven languages files are now automatically downloaded when creating a new language +* Improve filtering tags by language in the edit post panel +* Category parent dropdown list is now filtered by language +* Category parents are now synchronized between translations +* Add the possibility to have the language information in all URL +* Add support for post formats +* Add option allowing not to show the current language in the language switcher (for both menu and widget) +* Add a title attribute (and the possibility to personalize it with a filter) to flags +* pll_get_post and pll_get_term second parameter is now optional and defaults to current language +* Add pll_the_language_link filter allowing to filter translation links outputted by the language switcher +* The option PLL_DISPLAY_ALL is no longer supported +* Bug correction: Autosave reset to default language +* Bug correction: blog info not translated in feeds +* Bug correction: post comments feed always in default language +* Bug correction: undefined index notice when setting up a custom menu widget +* Bug correction: rewrite rules are not correctly reset when deactivating the plugin +* Bug correction: is_home not correctly set on pages 2, 3... +* Bug correction: avoid naming conflicts (in sql queries) with other themes / plugins +* Bug correction: bad language detection and url rewriting of custom post types archives + += 0.6.1 (2012-01-12) = + +* Add Dutch translation contributed by [AlbertGn](http://wordpress.org/support/profile/albertgn) +* Disable everything except the languages management panel while no language has been created +* Bug correction: can't have the same featured image in translated posts +* Bug correction: parent page dropdown does appear only after the page has been saved +* Bug correction: archives widget not working anymore +* Bug correction: string translations does not work for WP < 3.3 +* Bug correction: fix fatal error in string translations caused by widgets using the old API +* Bug correction: the strings translation panel is unable to translate strings with special characters +* Bug correction: Polylang "is_front_page" returns true on archives pages + += 0.6 (2012-01-07) = + +* Add Greek translation contributed by [theodotos](http://www.ubuntucy.org) +* WordPress languages files are now automatically downloaded when creating a new language (and updated when updating WordPress) +* Add the possibility to change the order of the languages in the language switcher +* Add the possibility to translate the site title, tagline and widgets titles +* Categories, post tags, featured image, page parent, page template and menu order are now copied when adding a new translation +* Translations are now accessibles in the "Posts", "Pages", "Categories" and "Post tags" admin panels +* Improve the dropdown language switcher widget (sends now to translated page or home page based on options) +* Move custom flags from polylang/local_flags to wp_content/polylang +* Add two options to "pll_the_languages" ('hide_if_no_translation' and 'hide_current'). *The function does not output ul tag anymore* +* Improve API +* Bug correction: Twenty eleven custom Header problem with v0.5.1 +* Bug correction: front-page.php not loaded for translated front page + += 0.5.1 (2011-12-18) = + +* Improved German translation contributed by [Christian Ries](http://www.singbyfoot.lu) +* Bug correction: translated homepage not recognized as home page when it displays posts +* Bug correction: predefined language list does not work on IE8 +* Bug correction: on some installations, "Add New" post doesn't keep intended language +* Bug correction: fatal error when Polylang is used together with the plugin Tabbed Widgets +* Bug correction: language Switcher points sometimes to wrong places + += 0.5 (2011-12-07) = + +* Add multisite support +* Rework the Polylang admin panel. There is now a set of predefined languages +* Improve categories and tags language filter in the edit post panel +* Categories and tags created in the edit post panel are now created with the same language as the post +* The language switcher can now force the link to the front page instead of the translated page +* The nav menus can now display a language switcher +* Improved performance +* Optimized the calendar widget (less code and sql queries executed) +* Added the possibility to display posts and terms with no language set (see the documentation to know how to enable this functionality) +* Started the creation of a small API for theme and plugin programmers +* Bug correction: when using a static front page, the page for posts does not work when using the default permalink settings +* Bug correction: the search form does not work if a static front page is used +* Bug correction: quick edit breaks translations +* Bug correction: categories and post tags translations don't work for more than 2 languages +* Bug correction: the output of wp_page_menu is not correct for non default languages + += 0.4.4 (2011-11-28) = + +* Bug correction: When using a static front page, the translated home page displays posts instead of the translated page +* Bug correction: Automatic language setting of existing categories and post tags does not work correctly + += 0.4.3 (2011-11-19) = + +* Add Russian translation contributed by [yoyurec](http://yoyurec.in.ua) +* Bug correction: impossible to suppress the language name in the language switcher widget settings +* Bug correction: post's page does not work when using a static front page +* Bug correction: flags in local_flags directory are removed after an automatic upgrade (now works for an upgrade from 0.4.3+ to a higher version) +* Bug correction: switching to default language displays a 404 Error when hiding the default language in url and displaying the language switcher as dropdown +* Other minor bug corrections +* Tests done with WordPress 3.3 beta 3 + += 0.4.2 (2011-11-16) = + +* Bug correction: language settings page is broken in v0.4.1 + += 0.4.1 (2011-11-16) = + +* Bug correction: flags shows even when you set doesn't to show +* Bug correction: custom taxonomies do not work +* Bug correction: some users get the fatal error: call to undefined function wp_get_current_user() in /wp-includes/user.php on line 227 + += 0.4 (2011-11-10) = + +* Add a documentation (in English only) +* Add the possibility to hide the url language information for the default language +* Add the possibility to set the admin language in the user profile +* Add the possibility to fill existing posts, pages, categories & tags with the default language +* Add support for custom post types and custom taxonomies +* Add the possibility to display flags in the language switcher +* Add CSS classes to customize rendering of the language switcher +* Add the possibility to display the language switcher as a dropdown list +* Add support for calendar widget +* Improve performance: less sql queries +* Improve data validation when creating or updating languages +* Bug correction: 'wp_list_pages' page order is ignored when the plugin is enabled +* Bug correction: when using 'edit' or 'add new' (translation) for posts, the categories appear in the wrong language +* Bug correction: pages are not included in language post count +* Bug correction: the language switcher does not display languages if there are only pages +* Bug correction: the widget filter does not allow to come back to 'all languages' once a language has been set +* Other minor bug corrections + += 0.3.2 (2011-10-20) = + +* Bug correction: authors pages are not filtered by language +* Bug correction: language pages use the archive template +* Bug correction: database error for comments on posts and pages +* Bug correction: "Add new" translation for pages creates a post instead of a page +* Bug correction: the search query does not look into pages + += 0.3.1 (2011-10-16) = + +* Bug correction: the widget settings cannot be saved when activating Polylang +* Bug correction: the archives widget does not display any links +* Bug correction: ajax form for translations not working in the 'Categories' and 'Post tags' admin panels + += 0.3 (2011-10-07) = + +* Add language filter for widgets +* Improved performance for filtering pages by language +* Improved security +* Minor bug correction with versions management + += 0.2 (2011-10-05) = + +* Add language filter for nav menus +* Add German translation +* Add language filter for recent comments +* Add ajax to term edit form +* Add ajax to post metabox +* Improved performance for filtering terms by language +* Bugs correction + += 0.1 (2011-09-22) = +* Initial release diff --git a/wp-content/plugins/polylang-pro/css/build/admin.css b/wp-content/plugins/polylang-pro/css/build/admin.css new file mode 100644 index 0000000..97e3565 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/admin.css @@ -0,0 +1,475 @@ +/* languages admin panel */ +#add-lang select { + width: 95%; +} + +#add-lang label { + margin: 0.35em 0 0.5em; +} + +.pll-legend { + display: block; + padding: 2px 0; + color: #1d2327; + font-weight: 400; + text-shadow: none; + margin: 0.35em 0 0.5em; +} + +.column-locale, +.languages .column-slug { + width : 15% +} + +.column-default_lang { + width : 5%; +} + +.column-term_group, +.column-flag, .column-count { + width : 10%; +} + +td.column-default_lang .icon-default-lang:before, +.pll-wizard-content .icon-default-lang:before { + font-family: 'dashicons'; + content: "\f155"; +} + +.pll-icon:before{ + display: inline-block; + text-align: left; + width: 15px; +} +.pll-circle:before{ + content: "\25cf"; +} + +/* about Polylang metabox */ +#pll-about-box p, +#pll-recommended p { + text-align: justify; +} + +#pll-about-box input { + margin: 0; + padding: 0; + float: right; +} + +/* strings translation table */ +.stringstranslations .column-name, +.stringstranslations .column-context { + width: 10%; +} + +.stringstranslations .column-string { + width: 33%; +} + +.translation label { + display: inline-block; + width: 23%; + vertical-align: top; +} + +.translation { + display: flex; /* fix #691 to remove default margin bottom */ +} +@media screen and (max-width: 782px) { /* reset default display property for small device */ + .translation{ + display: block; + } +} +.translation textarea{ + display: block; /* fix #691 to remove default margin bottom */ +} +.translation input, +.translation textarea { + width: 72%; + box-sizing: border-box; /* to be sure field don't overrun outside their wrapper */ + margin-bottom: 4px; /* fix #691 set the same margin bottom for both textarea and input tags */ +} + +/* settings */ +.pll-settings { + margin-top: 20px; +} + +.pll-settings .plugin-title { + width: 25%; +} + +#wpbody-content .pll-settings .pll-configure tr { + display: table-row; +} + +#wpbody-content .pll-settings .pll-configure td { + display: table-cell; +} + +#wpbody-content .pll-settings .pll-configure > td { + padding: 20px 20px 20px 40px; +} + +.pll-configure legend { + font-size: 14px; + font-weight: 600; + margin-bottom: 0.5em; +} + +.pll-configure td .description { + margin-top: 2px; + margin-bottom: 0.5em; +} + +.pll-configure p.submit { + margin-top: 20px; +} + +.pll-configure .button { + margin-right: 20px; +} + +.pll-configure fieldset { + margin-bottom: 1.5em; +} + +.pll-inline-block-list { + margin: 0; +} + +.pll-inline-block-list li { + display: inline-block; + margin: 0; + width: 250px; +} + +/* settings URL modifications */ +#pll-domains-table td { + padding: 2px 2px 2px 1.5em; + -webkit-box-shadow: none; + box-shadow: none; + border: none; +} + +.pll-settings-url-col { + display: inline-block; + width: 49%; + vertical-align: top; +} + +/* settings Activation keys */ +.pll-table-top td { + vertical-align: top; +} + +#pll-licenses-table label { + font-size: 1em; + font-weight: 600; +} + +.pll-configure .pll-deactivate-license { + margin: 0 0 0 20px; +} + +/* language columns in edit.php and edit-tags.php */ +.wp-list-table th[class*='column-language_'], +.wp-list-table td[class*='column-language_'] { + width: 1.5em; + box-sizing: content-box; /* Override ACF 5.9.0 styles */ +} + +/* Text direction in post.php and edit-tags.php */ +.pll-dir-rtl textarea, +.pll-dir-rtl input[type="text"] { + direction: rtl; +} + +.pll-dir-ltr textarea, +.pll-dir-ltr input[type="text"] { + direction: ltr; +} + +.pll-dir-ltr .tr_lang, +.pll-dir-rtl .tr_lang { + direction: inherit; +} + +/* languages metabox in post.php */ +#ml_box p { + margin-top: 1em; +} + +#post-translations p { + float: left; + margin-top: 1em; +} + +.rtl #post-translations p { + float: right; +} + +#post-translations table { + table-layout: fixed; + width: 100%; + clear: both; +} + +#post-translations a { + text-decoration: none; +} + +#post-translations .pll-language-column, +#post-translations .pll-column-icon { + width: 20px; +} + +#post-translations .tr_lang { + width: 100%; +} + +#post-translations td { + padding: 2px; +} + +#post-translations .spinner, +#term-translations .spinner { + float: none; + margin: 0; + background-position: center; + width: auto; +} + +#select-post-language .pll-select-flag { + padding: 4px; + margin-right: 10px; +} + +.rtl #select-post-language .pll-select-flag { + padding: 4px; + margin-right: 0px; + margin-left: 10px; +} + +/* specific cases for media */ +#select-media-language .pll-select-flag { + padding: 4px; + margin-right: 10px; +} + +.pll-media-edit-column { + float: right; +} + +/* language and translations in edit-tags.php */ +.pll-translation-flag { /* also for media */ + margin-right: 14px; +} + +#select-add-term-language .pll-select-flag { + padding: 11px; + margin-right: 13px; +} + +#select-edit-term-language .pll-select-flag { + padding: 11px; + margin-right: 4px; +} + +#term-translations p { + /* same style as label */ + font-weight: 400; + font-style: normal; + padding: 2px; + color: #23282d; +} + +#add-term-translations, +#edit-term-translations { + width: 95%; +} + +#term-translations .pll-language-column { + line-height: 28px; + width: 20%; +} + +#term-translations .pll-edit-column, +#add-term-translations .pll-language-column { + width: 20px; +} + +#edit-term-translations .pll-language-column { + padding: 15px 10px; + font-weight: normal; +} + +/* icon fonts */ +.pll_icon_add:before { + content: "\f132"; +} + +.pll_icon_edit:before { + content: "\f464"; +} + +[class^="pll_icon_"] { + font: 20px/1 'dashicons'; + vertical-align: middle; +} + +/* admin bar */ +#wpadminbar #wp-admin-bar-languages .ab-item img { + margin: 0 8px 0 2px; +} + +#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon { + float: none; + top: 4px; +} + +#wpadminbar #wp-admin-bar-languages .ab-icon:before { + content: "\f326"; + top: 1px; +} + +#wp-admin-bar-languages.pll-filtered-languages { + background-color:var(--wp-admin-theme-color); +} + +.admin-color-coffee #wp-admin-bar-languages.pll-filtered-languages { + background-color: #c7a589; +} + +.admin-color-ectoplasm #wp-admin-bar-languages.pll-filtered-languages { + background-color: #a3b745; +} + +.admin-color-light #wp-admin-bar-languages.pll-filtered-languages { + background-color: #888; +} + +.admin-color-light #wpadminbar #wp-admin-bar-languages.pll-filtered-languages span.ab-label { + color: #fff; +} + +.admin-color-ocean #wp-admin-bar-languages.pll-filtered-languages { + background-color: #9ebaa0; +} + +/* Notices */ +.pll-notice.notice { + padding-right: 38px; + position: relative; +} + +.pll-notice a.notice-dismiss { + text-decoration: none; +} + +.pll-notice .button { + margin-right: 10px; +} + +@media screen and ( max-width: 782px ) { + /* settings */ + #wpbody-content .pll-settings .pll-configure > td { + padding: 20px; + } + + #wpbody-content .pll-settings #cb { + padding: 20px 9px; + } + + /* settings URL modifications */ + .pll-inline-block { + width: auto; + } + + .pll-settings-url-col { + display: block; + width: 100%; + } + + /* settings licenses */ + #wpbody-content .pll-settings #pll-licenses-table td { + display: block; + } + + .pll-configure .pll-deactivate-license { + margin: 10px 0 5px; + } + + /* strings translations table */ + .translation label { + display: block; + width: 95%; + padding-left: 0; + } + + .translation input, + .translation textarea { + width: 95%; + } + + /* hide selected language flag and translations language name */ + #select-add-term-language .pll-select-flag, + #select-edit-term-language .pll-select-flag, + #edit-term-translations .pll-language-name { + display: none; + } + + #edit-term-translations { + width: 100%; + } + + #add-term-translations .pll-language-column { + line-height: 38px; + } + + #edit-term-translations td { + padding: 8px 10px; + } + + #edit-term-translations .pll-language-column, + #edit-term-translations .pll-edit-column { + width: 20px; + } + + /* translations tables should be kept as table */ + .term-translations .pll-language-column, + .term-translations .pll-edit-column, + .term-translations .pll-translation-column { + display: table-cell; + } + + .term-translations .hidden { + display: none; + } + + /* admin bar */ + #wpadminbar #wp-admin-bar-languages { + display: block; /*shows our menu on mobile devices */ + } + + #wpadminbar #wp-admin-bar-languages > .ab-item { + width: 50px; + text-align: center; + } + + #wpadminbar #wp-admin-bar-languages > .ab-item .ab-icon:before { + font: 32px/1 'dashicons'; + top: -1px; + } + + #wpadminbar #wp-admin-bar-languages > .ab-item img { + margin: 19px 0; + } + + #wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon { + margin-right: 6px; + font-size: 20px !important; + line-height: 20px !important; + } +} diff --git a/wp-content/plugins/polylang-pro/css/build/admin.min.css b/wp-content/plugins/polylang-pro/css/build/admin.min.css new file mode 100644 index 0000000..fb77aa1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/admin.min.css @@ -0,0 +1 @@ +#add-lang select{width:95%}#add-lang label,.pll-legend{margin:.35em 0 .5em}.pll-legend{color:#1d2327;display:block;font-weight:400;padding:2px 0;text-shadow:none}.column-locale,.languages .column-slug{width:15%}.column-default_lang{width:5%}.column-count,.column-flag,.column-term_group{width:10%}.pll-wizard-content .icon-default-lang:before,td.column-default_lang .icon-default-lang:before{content:"\f155";font-family:dashicons}.pll-icon:before{display:inline-block;text-align:left;width:15px}.pll-circle:before{content:"\25cf"}#pll-about-box p,#pll-recommended p{text-align:justify}#pll-about-box input{float:right;margin:0;padding:0}.stringstranslations .column-context,.stringstranslations .column-name{width:10%}.stringstranslations .column-string{width:33%}.translation label{display:inline-block;vertical-align:top;width:23%}.translation{display:flex}@media screen and (max-width:782px){.translation{display:block}}.translation textarea{display:block}.translation input,.translation textarea{box-sizing:border-box;margin-bottom:4px;width:72%}.pll-settings{margin-top:20px}.pll-settings .plugin-title{width:25%}#wpbody-content .pll-settings .pll-configure tr{display:table-row}#wpbody-content .pll-settings .pll-configure td{display:table-cell}#wpbody-content .pll-settings .pll-configure>td{padding:20px 20px 20px 40px}.pll-configure legend{font-size:14px;font-weight:600;margin-bottom:.5em}.pll-configure td .description{margin-bottom:.5em;margin-top:2px}.pll-configure p.submit{margin-top:20px}.pll-configure .button{margin-right:20px}.pll-configure fieldset{margin-bottom:1.5em}.pll-inline-block-list{margin:0}.pll-inline-block-list li{display:inline-block;margin:0;width:250px}#pll-domains-table td{border:none;-webkit-box-shadow:none;box-shadow:none;padding:2px 2px 2px 1.5em}.pll-settings-url-col{display:inline-block;vertical-align:top;width:49%}.pll-table-top td{vertical-align:top}#pll-licenses-table label{font-size:1em;font-weight:600}.pll-configure .pll-deactivate-license{margin:0 0 0 20px}.wp-list-table td[class*=column-language_],.wp-list-table th[class*=column-language_]{box-sizing:content-box;width:1.5em}.pll-dir-rtl input[type=text],.pll-dir-rtl textarea{direction:rtl}.pll-dir-ltr input[type=text],.pll-dir-ltr textarea{direction:ltr}.pll-dir-ltr .tr_lang,.pll-dir-rtl .tr_lang{direction:inherit}#ml_box p{margin-top:1em}#post-translations p{float:left;margin-top:1em}.rtl #post-translations p{float:right}#post-translations table{clear:both;table-layout:fixed;width:100%}#post-translations a{text-decoration:none}#post-translations .pll-column-icon,#post-translations .pll-language-column{width:20px}#post-translations .tr_lang{width:100%}#post-translations td{padding:2px}#post-translations .spinner,#term-translations .spinner{background-position:50%;float:none;margin:0;width:auto}#select-post-language .pll-select-flag{margin-right:10px;padding:4px}.rtl #select-post-language .pll-select-flag{margin-left:10px;margin-right:0;padding:4px}#select-media-language .pll-select-flag{margin-right:10px;padding:4px}.pll-media-edit-column{float:right}.pll-translation-flag{margin-right:14px}#select-add-term-language .pll-select-flag{margin-right:13px;padding:11px}#select-edit-term-language .pll-select-flag{margin-right:4px;padding:11px}#term-translations p{color:#23282d;font-style:normal;font-weight:400;padding:2px}#add-term-translations,#edit-term-translations{width:95%}#term-translations .pll-language-column{line-height:28px;width:20%}#add-term-translations .pll-language-column,#term-translations .pll-edit-column{width:20px}#edit-term-translations .pll-language-column{font-weight:400;padding:15px 10px}.pll_icon_add:before{content:"\f132"}.pll_icon_edit:before{content:"\f464"}[class^=pll_icon_]{font:20px/1 dashicons;vertical-align:middle}#wpadminbar #wp-admin-bar-languages .ab-item img{margin:0 8px 0 2px}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{float:none;top:4px}#wpadminbar #wp-admin-bar-languages .ab-icon:before{content:"\f326";top:1px}#wp-admin-bar-languages.pll-filtered-languages{background-color:var(--wp-admin-theme-color)}.admin-color-coffee #wp-admin-bar-languages.pll-filtered-languages{background-color:#c7a589}.admin-color-ectoplasm #wp-admin-bar-languages.pll-filtered-languages{background-color:#a3b745}.admin-color-light #wp-admin-bar-languages.pll-filtered-languages{background-color:#888}.admin-color-light #wpadminbar #wp-admin-bar-languages.pll-filtered-languages span.ab-label{color:#fff}.admin-color-ocean #wp-admin-bar-languages.pll-filtered-languages{background-color:#9ebaa0}.pll-notice.notice{padding-right:38px;position:relative}.pll-notice a.notice-dismiss{text-decoration:none}.pll-notice .button{margin-right:10px}@media screen and (max-width:782px){#wpbody-content .pll-settings .pll-configure>td{padding:20px}#wpbody-content .pll-settings #cb{padding:20px 9px}.pll-inline-block{width:auto}.pll-settings-url-col{display:block;width:100%}#wpbody-content .pll-settings #pll-licenses-table td{display:block}.pll-configure .pll-deactivate-license{margin:10px 0 5px}.translation label{display:block;padding-left:0;width:95%}.translation input,.translation textarea{width:95%}#edit-term-translations .pll-language-name,#select-add-term-language .pll-select-flag,#select-edit-term-language .pll-select-flag{display:none}#edit-term-translations{width:100%}#add-term-translations .pll-language-column{line-height:38px}#edit-term-translations td{padding:8px 10px}#edit-term-translations .pll-edit-column,#edit-term-translations .pll-language-column{width:20px}.term-translations .pll-edit-column,.term-translations .pll-language-column,.term-translations .pll-translation-column{display:table-cell}.term-translations .hidden{display:none}#wpadminbar #wp-admin-bar-languages{display:block}#wpadminbar #wp-admin-bar-languages>.ab-item{text-align:center;width:50px}#wpadminbar #wp-admin-bar-languages>.ab-item .ab-icon:before{font:32px/1 dashicons;top:-1px}#wpadminbar #wp-admin-bar-languages>.ab-item img{margin:19px 0}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{font-size:20px!important;line-height:20px!important;margin-right:6px}} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/css/build/bulk-translate.css b/wp-content/plugins/polylang-pro/css/build/bulk-translate.css new file mode 100644 index 0000000..1821966 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/bulk-translate.css @@ -0,0 +1,57 @@ +.bulk-translate-save .button { + margin-right: 20px; +} + +#wpbody-content #pll-translate .pll-bulk-translate-fields-wrapper { + display: flex; +} + +#wpbody-content #pll-translate fieldset { + flex-basis: fit-content; + margin-right: 10%; +} + +#pll-translate .pll-translation-flag { + margin: auto 10px auto 7px; +} + +.rtl #pll-translate .pll-translation-flag { + margin: auto 7px auto 10px; +} + +#pll-translate .title { + display: block; + line-height: 2.5; +} + +#pll-translate label { + display: flex; + align-items: center; +} + +#pll-translate label span.description{ + line-height: normal; +} + +#pll-translate label[for="pll-select-format"] { + padding-left: 18px; +} + +#pll-translate #pll-select-format { + margin-left: 0.5rem; +} + +@supports(selector(:has(*))) { + #pll-translate label[for="pll-select-format"] { + display: none; + } + #pll-translate label:has([name="translate"][value="pll_export_post"]:checked) ~ [for="pll-select-format"] { + display: flex; + } +} + +@media screen and ( max-width: 782px ) { + #wpbody-content #pll-translate .pll-bulk-translate-fields-wrapper { + flex-direction: column; + } +} diff --git a/wp-content/plugins/polylang-pro/css/build/bulk-translate.min.css b/wp-content/plugins/polylang-pro/css/build/bulk-translate.min.css new file mode 100644 index 0000000..1408b15 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/bulk-translate.min.css @@ -0,0 +1 @@ +.bulk-translate-save .button{margin-right:20px}#wpbody-content #pll-translate .pll-bulk-translate-fields-wrapper{display:flex}#wpbody-content #pll-translate fieldset{flex-basis:fit-content;margin-right:10%}#pll-translate .pll-translation-flag{margin:auto 10px auto 7px}.rtl #pll-translate .pll-translation-flag{margin:auto 7px auto 10px}#pll-translate .title{display:block;line-height:2.5}#pll-translate label{align-items:center;display:flex}#pll-translate label span.description{line-height:normal}#pll-translate label[for=pll-select-format]{padding-left:18px}#pll-translate #pll-select-format{margin-left:.5rem}@supports(selector(:has(*))){#pll-translate label[for=pll-select-format]{display:none}#pll-translate label:has([name=translate][value=pll_export_post]:checked)~[for=pll-select-format]{display:flex}}@media screen and (max-width:782px){#wpbody-content #pll-translate .pll-bulk-translate-fields-wrapper{flex-direction:column}} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/css/build/dialog.css b/wp-content/plugins/polylang-pro/css/build/dialog.css new file mode 100644 index 0000000..103d15a --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/dialog.css @@ -0,0 +1,85 @@ +/* By default Polylang dialog box use WordPress jQuery UI dialog styles. + However WooCommerce loads its own jQuery UI dialog styles and we need to override them by ours + to revert to the default WordPress ones. +*/ +.pll-confirmation-modal.ui-widget, +.pll-confirmation-modal.ui-widget .ui-widget, +.pll-confirmation-modal .ui-widget { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 13px; +} +.pll-confirmation-modal.ui-dialog { + padding: 0; + z-index: 100102; + background: #fff; + border: 0; + color: #444; + border-radius: 0; /* Override WooCommerce dialog styles - jQuery UI 1.11.4 - WP < 5.6 */ +} +.ui-dialog.pll-confirmation-modal .ui-dialog-titlebar { + background: #fcfcfc; + border-radius: 0; + border: 0; + border-bottom: 1px solid #dfdfdf; + height: 36px; + font-size: 18px; + font-weight: 600; + line-height: 2; + padding: 0 36px 0 16px; + color: #444; + position: static; +} +.ui-dialog.pll-confirmation-modal .ui-dialog-title { + float: none; + width: auto; + margin: 0; +} +.pll-confirmation-modal .ui-widget-header .ui-icon { + background: none; + position: static; +} +.pll-confirmation-modal .ui-button.ui-dialog-titlebar-close { + padding: 0; + margin: 0; + top: 0; + right: 0; + width: 36px; + height: 36px; + border: 0; /* Override WooCommerce dialog styles - jQuery UI 1.11.4 - WP < 5.6 */ + background: none; /* Override WooCommerce dialog styles - jQuery UI 1.11.4 - WP < 5.6 */ +} +.ui-dialog.pll-confirmation-modal .ui-dialog-content { + border: 0; + padding: 16px; + color: #444; + position: static; + box-sizing: border-box; +} +.ui-dialog.pll-confirmation-modal .ui-dialog-buttonpane{ + margin: 0; + padding: 16px; + border: 0; + background: #fcfcfc; + border-top: 1px solid #dfdfdf; +} +.ui-dialog.pll-confirmation-modal .ui-dialog-buttonpane .ui-button{ + margin: 0 0 0 16px; + padding: 0 10px 1px; + background: #f7f7f7; + border: 1px solid #cccccc; + border-radius: 3px; + position: static; + line-height: 2; + vertical-align: top; +} +.ui-dialog.pll-confirmation-modal .ui-button:hover, +.ui-dialog.pll-confirmation-modal .ui-button:focus { + background: #fafafa; + border-color: #999; + color: #23282d; +} +.pll-confirmation-modal + .ui-widget-overlay { + background: #000; + opacity: 0.7; + z-index: 100101; +} diff --git a/wp-content/plugins/polylang-pro/css/build/dialog.min.css b/wp-content/plugins/polylang-pro/css/build/dialog.min.css new file mode 100644 index 0000000..b5bd718 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/dialog.min.css @@ -0,0 +1 @@ +.pll-confirmation-modal .ui-widget,.pll-confirmation-modal.ui-widget,.pll-confirmation-modal.ui-widget .ui-widget{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.pll-confirmation-modal.ui-dialog{background:#fff;border:0;border-radius:0;color:#444;padding:0;z-index:100102}.ui-dialog.pll-confirmation-modal .ui-dialog-titlebar{background:#fcfcfc;border:0;border-bottom:1px solid #dfdfdf;border-radius:0;color:#444;font-size:18px;font-weight:600;height:36px;line-height:2;padding:0 36px 0 16px;position:static}.ui-dialog.pll-confirmation-modal .ui-dialog-title{float:none;margin:0;width:auto}.pll-confirmation-modal .ui-widget-header .ui-icon{background:none;position:static}.pll-confirmation-modal .ui-button.ui-dialog-titlebar-close{background:none;border:0;height:36px;margin:0;padding:0;right:0;top:0;width:36px}.ui-dialog.pll-confirmation-modal .ui-dialog-content{border:0;box-sizing:border-box;color:#444;padding:16px;position:static}.ui-dialog.pll-confirmation-modal .ui-dialog-buttonpane{background:#fcfcfc;border:0;border-top:1px solid #dfdfdf;margin:0;padding:16px}.ui-dialog.pll-confirmation-modal .ui-dialog-buttonpane .ui-button{background:#f7f7f7;border:1px solid #ccc;border-radius:3px;line-height:2;margin:0 0 0 16px;padding:0 10px 1px;position:static;vertical-align:top}.ui-dialog.pll-confirmation-modal .ui-button:focus,.ui-dialog.pll-confirmation-modal .ui-button:hover{background:#fafafa;border-color:#999;color:#23282d}.pll-confirmation-modal+.ui-widget-overlay{background:#000;opacity:.7;z-index:100101} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/css/build/machine-translation-settings.css b/wp-content/plugins/polylang-pro/css/build/machine-translation-settings.css new file mode 100644 index 0000000..3ef7a7a --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/machine-translation-settings.css @@ -0,0 +1,102 @@ +.pll-settings .pll-inner-notice { + margin: 5px 0 15px; + border: 1px solid #c3c4c7; + border-left-width: 4px; + padding: 1px 12px; + background: #fff; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); +} + +.form-table .pll-inner-notice { + margin-bottom: 5px; +} + +.pll-settings .notice-success { + border-left-color: #00a32a; +} + +.pll-settings .notice-warning { + border-left-color: #dba617; +} + +.pll-settings .notice-error { + border-left-color: #d63638; +} + +.pll-settings .pll-inner-notice p { + margin: 0.5em 0; + padding: 2px; +} + +.pll-settings .pll-message:not(.pll-origin-message), +.pll-settings .notice-success .pll-origin-message, +.pll-settings .notice-warning .pll-origin-message, +.pll-settings .notice-error .pll-origin-message { + display: none; +} + +.pll-settings .notice-success .pll-success-message, +.pll-settings .notice-warning .pll-warning-message.pll-message-shown, +.pll-settings .notice-error .pll-error-message.pll-message-shown { + display: block; +} + +.pll-settings [disabled] + .spinner, +.pll-progress-bar-wrapper .spinner { + visibility: visible; +} + +.pll-success-message .pll-icon { + color: rgb(18, 91, 145); +} + +.pll-error-message .pll-icon, +.pll-warning-message .pll-icon { + color: rgb(145, 30, 31); +} + +.pll-icon { + font-size: 1.8em; + margin-right: 3px; + margin-left: 1px; + vertical-align: -2px; +} + +.pll-progress-bar-wrapper { + position: relative; + max-width: 500px; + height: 2em; + line-height: 2em; + vertical-align: middle; + text-align: left; + font-size: 2em; + border: 1px solid rgb(64, 70, 72); + border-radius: 4px; + overflow: hidden; + white-space: nowrap; + color: rgb(23, 114, 181); + text-indent: 1em; +} + +.pll-progress-bar-wrapper div { + position: absolute; + height: 100%; + top: 0; + left: 0; + overflow: hidden; + background-color: rgb(23, 114, 181); + color: rgb(232, 230, 227); +} + +.pll-settings [type="password"] + .button { + margin-left: 20px; + margin-right: 0; +} + +.pll-settings .pll-spinner-inline { + float: none; +} + +.pll-progress-bar-wrapper .spinner { + margin: 0; +} diff --git a/wp-content/plugins/polylang-pro/css/build/machine-translation-settings.min.css b/wp-content/plugins/polylang-pro/css/build/machine-translation-settings.min.css new file mode 100644 index 0000000..473c648 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/machine-translation-settings.min.css @@ -0,0 +1 @@ +.pll-settings .pll-inner-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.04);margin:5px 0 15px;padding:1px 12px}.form-table .pll-inner-notice{margin-bottom:5px}.pll-settings .notice-success{border-left-color:#00a32a}.pll-settings .notice-warning{border-left-color:#dba617}.pll-settings .notice-error{border-left-color:#d63638}.pll-settings .pll-inner-notice p{margin:.5em 0;padding:2px}.pll-settings .notice-error .pll-origin-message,.pll-settings .notice-success .pll-origin-message,.pll-settings .notice-warning .pll-origin-message,.pll-settings .pll-message:not(.pll-origin-message){display:none}.pll-settings .notice-error .pll-error-message.pll-message-shown,.pll-settings .notice-success .pll-success-message,.pll-settings .notice-warning .pll-warning-message.pll-message-shown{display:block}.pll-progress-bar-wrapper .spinner,.pll-settings [disabled]+.spinner{visibility:visible}.pll-success-message .pll-icon{color:#125b91}.pll-error-message .pll-icon,.pll-warning-message .pll-icon{color:#911e1f}.pll-icon{font-size:1.8em;margin-left:1px;margin-right:3px;vertical-align:-2px}.pll-progress-bar-wrapper{border:1px solid #404648;border-radius:4px;color:#1772b5;font-size:2em;height:2em;line-height:2em;max-width:500px;overflow:hidden;position:relative;text-align:left;text-indent:1em;vertical-align:middle;white-space:nowrap}.pll-progress-bar-wrapper div{background-color:#1772b5;color:#e8e6e3;height:100%;left:0;overflow:hidden;position:absolute;top:0}.pll-settings [type=password]+.button{margin-left:20px;margin-right:0}.pll-settings .pll-spinner-inline{float:none}.pll-progress-bar-wrapper .spinner{margin:0} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/css/build/metabox-button.css b/wp-content/plugins/polylang-pro/css/build/metabox-button.css new file mode 100644 index 0000000..04df336 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/metabox-button.css @@ -0,0 +1,25 @@ +.pll-button { + padding: 0; + height: 20px; + background: none; + border: none; + font-size: 20px; + cursor: pointer; +} + +.pll-button:not(.wp-ui-text-highlight) { + color: #DDDDDD; +} + +.pll-button svg { + fill: currentColor; +} + +.pll-before-post-translations-button { + float: right; + margin: 13px 7px; +} + +.rtl .pll-before-post-translations-button { + float: left; +} diff --git a/wp-content/plugins/polylang-pro/css/build/metabox-button.min.css b/wp-content/plugins/polylang-pro/css/build/metabox-button.min.css new file mode 100644 index 0000000..422452d --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/metabox-button.min.css @@ -0,0 +1 @@ +.pll-button{background:none;border:none;cursor:pointer;font-size:20px;height:20px;padding:0}.pll-button:not(.wp-ui-text-highlight){color:#ddd}.pll-button svg{fill:currentColor}.pll-before-post-translations-button{float:right;margin:13px 7px}.rtl .pll-before-post-translations-button{float:left} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/css/build/navigation-language-switcher-editor-style.css b/wp-content/plugins/polylang-pro/css/build/navigation-language-switcher-editor-style.css new file mode 100644 index 0000000..763996a --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/navigation-language-switcher-editor-style.css @@ -0,0 +1,3 @@ +.wp-block-polylang-navigation-language-switcher a:not(:first-child) { + margin-left: 1rem; +} diff --git a/wp-content/plugins/polylang-pro/css/build/navigation-language-switcher-editor-style.min.css b/wp-content/plugins/polylang-pro/css/build/navigation-language-switcher-editor-style.min.css new file mode 100644 index 0000000..eee4ead --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/navigation-language-switcher-editor-style.min.css @@ -0,0 +1 @@ +.wp-block-polylang-navigation-language-switcher a:not(:first-child){margin-left:1rem} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/css/build/selectmenu.css b/wp-content/plugins/polylang-pro/css/build/selectmenu.css new file mode 100644 index 0000000..ed0e9c2 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/selectmenu.css @@ -0,0 +1,239 @@ +/* Greatly modified version of the jquery-ui.css */ + +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} + +.ui-menu .ui-menu { + position: absolute; +} + +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} + +/* for jQuery UI 1.12 which introduces a wrapper */ +.ui-menu .ui-menu-item:not([role]) { + padding: 0; +} + +.ui-menu-item-wrapper { + padding: 3px 1em 3px 2em; +} +.rtl .ui-menu .ui-menu-item { + text-align: right; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} + +.ui-menu-icons .ui-menu-item[role] { + padding-left: 2em; +} + +.rtl .ui-menu-item-wrapper, /* for jQuery UI 1.12 which introduces a wrapper */ +.rtl .ui-menu-icons .ui-menu-item[role] { + padding-left: 1em; + padding-right: 2em; +} + +/* left-aligned */ +.ui-selectmenu-text .ui-icon, +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .3em; + margin: auto 0; +} + +.rtl .ui-selectmenu-text .ui-icon, +.rtl .ui-menu .ui-icon { + right: .3em; + left: auto; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} + +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} + +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} + +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 23px; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} + +.ui-selectmenu-open { + display: block; +} + +.ui-selectmenu-button, /* jQuery UI 1.11.4 - WP < 5.6 */ +.ui-selectmenu-button.ui-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + box-sizing: border-box; /* To keep width calculation in percent since WP 5.6 */ + text-align: left; + white-space: nowrap; + vertical-align: top; + padding: 0; + line-height: normal; /* Override WC Bookings styles with WP < 5.6 */ + height: 28px; /* Override WC Bookings styles with WP < 5.6 */ +} + +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + position: absolute; + top: 26%; + width: 16px; + height: 16px; + text-indent: 0; /* due to text-indent for jquery ui-dialog in wizard */ + background: none; +} + +.rtl .ui-selectmenu-button span.ui-icon { + left: 0.5em; + right: auto; +} + + +.ui-selectmenu-button.ui-widget span.ui-selectmenu-text, /* Override WC Bookings styles with WP < 5.6 */ +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.1em 2.1em 0.2em 2em; + display: block; + line-height: 23px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin: 0; +} + +.rtl .ui-selectmenu-button span.ui-selectmenu-text { + text-align: right; + padding: 0.2em 2em 0.2em 2.1em; +} + +.ui-widget-content, +.ui-state-default, +.ui-selectmenu-button.ui-state-default, /* Override WC Bookings styles with WP < 5.6 */ +.ui-button.ui-selectmenu-button-closed, /* To be compatible jQuery UI 1.12.1 since WordPress 5.6 */ +.ui-button.ui-selectmenu-button-open, /* To be compatible jQuery UI 1.12.1 since WordPress 5.6 */ +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + background: #fff; + border: 1px solid #ddd; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset; + color: #32373c; +} +/* Override to have same styles as WP form styles since WordPress 5.4 */ +.languages_page_mlang .ui-selectmenu-button.ui-state-default, +.languages_page_mlang .ui-selectmenu-button.ui-selectmenu-button-closed, /* To be compatible jQuery UI 1.12.1 since WordPress 5.6 */ +.languages_page_mlang .ui-selectmenu-button.ui-selectmenu-button-open{ /* To be compatible jQuery UI 1.12.1 since WordPress 5.6 */ + box-shadow: 0 0 0 transparent; + border-radius: 4px; + border: 1px solid #7e8993; +} + +/* From this line and below: override WooCommerce bookings plugin styles which overrides default WordPress styles */ +.pll-selectmenu-menu .ui-widget, +.pll-selectmenu-button.ui-widget { + font-size: 13px; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; +} + +.languages_page_mlang .ui-button.ui-selectmenu-button:focus{ + color: #016087; /* Same color as WordPress focused select HTML tag */ + border-color: #007cba; + box-shadow: 0 0 0 1px #007cba; + outline: 2px solid transparent; + background: #fff; /* Override bookings plugin styles which overrides default WordPress styles */ +} + +.languages_page_mlang .ui-menu-item, +.languages_page_mlang .ui-widget-content .ui-state-hover, +.languages_page_mlang .ui-widget-content .ui-state-focus, +.languages_page_mlang .ui-widget-content .ui-state-active { + color: #016087; /* Same color as option in a WordPress focused select HTML tag */ + margin: 0; +} + +.ui-selectmenu-open .ui-widget-content .ui-state-hover, /* Override WC Bookings styles with WP < 5.6 */ +.ui-selectmenu-open .ui-widget-content .ui-state-focus, /* Override WC Bookings styles with WP < 5.6 */ +.ui-selectmenu-open .ui-widget-content .ui-state-active, /* Override WC Bookings styles with WP < 5.6 */ +.pll-selectmenu-menu .ui-widget-content .ui-state-hover, +.pll-selectmenu-menu .ui-widget-content .ui-state-focus, +.pll-selectmenu-menu .ui-widget-content .ui-state-active { /* To be compatible jQuery UI 1.12.1 since WordPress 5.6 */ + background: #d5d5d5; + border: 0; +} + +.ui-selectmenu-button.ui-state-focus { + border: 1px solid #5b9dd9; + box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); +} + +.ui-icon-triangle-1-s:before { + content: ""; + background: #fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat right 0px top 55%; + background-size: 16px 16px; + box-sizing: border-box; + position: absolute; + width: 16px; + height: 16px; +} + +.pll-selectmenu-button.ui-button:hover, +.pll-wizard .ui-button:hover, +.pll-wizard .ui-button:focus { + background: #fff; /* To override jQuery ui-dialog styles provided by WordPress */ +} + +.ui-widget-content { + max-height: 231px; + box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); +} diff --git a/wp-content/plugins/polylang-pro/css/build/selectmenu.min.css b/wp-content/plugins/polylang-pro/css/build/selectmenu.min.css new file mode 100644 index 0000000..b435f1b --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/selectmenu.min.css @@ -0,0 +1 @@ +.ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}.ui-menu{display:block;list-style:none;margin:0;outline:none;padding:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{cursor:pointer;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);margin:0;min-height:0;padding:3px 1em 3px .4em;position:relative}.ui-menu .ui-menu-item:not([role]){padding:0}.ui-menu-item-wrapper{padding:3px 1em 3px 2em}.rtl .ui-menu .ui-menu-item{text-align:right}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item[role]{padding-left:2em}.rtl .ui-menu-icons .ui-menu-item[role],.rtl .ui-menu-item-wrapper{padding-left:1em;padding-right:2em}.ui-menu .ui-icon,.ui-selectmenu-text .ui-icon{bottom:0;left:.3em;margin:auto 0;position:absolute;top:0}.rtl .ui-menu .ui-icon,.rtl .ui-selectmenu-text .ui-icon{left:auto;right:.3em}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-selectmenu-menu{display:none;left:0;margin:0;padding:0;position:absolute;top:0}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{border:0;font-size:1em;font-weight:700;height:auto;line-height:23px;margin:.5em 0 0;padding:2px .4em}.ui-selectmenu-open{display:block}.ui-selectmenu-button,.ui-selectmenu-button.ui-button{box-sizing:border-box;display:inline-block;height:28px;line-height:normal;overflow:hidden;padding:0;position:relative;text-align:left;text-decoration:none;vertical-align:top;white-space:nowrap}.ui-selectmenu-button span.ui-icon{background:none;height:16px;left:auto;position:absolute;right:.5em;text-indent:0;top:26%;width:16px}.rtl .ui-selectmenu-button span.ui-icon{left:.5em;right:auto}.ui-selectmenu-button span.ui-selectmenu-text,.ui-selectmenu-button.ui-widget span.ui-selectmenu-text{display:block;line-height:23px;margin:0;overflow:hidden;padding:.1em 2.1em .2em 2em;text-align:left;text-overflow:ellipsis;white-space:nowrap}.rtl .ui-selectmenu-button span.ui-selectmenu-text{padding:.2em 2em .2em 2.1em;text-align:right}.ui-button.ui-selectmenu-button-closed,.ui-button.ui-selectmenu-button-open,.ui-selectmenu-button.ui-state-default,.ui-state-default,.ui-widget-content,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{background:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);color:#32373c}.languages_page_mlang .ui-selectmenu-button.ui-selectmenu-button-closed,.languages_page_mlang .ui-selectmenu-button.ui-selectmenu-button-open,.languages_page_mlang .ui-selectmenu-button.ui-state-default{border:1px solid #7e8993;border-radius:4px;box-shadow:0 0 0 transparent}.pll-selectmenu-button.ui-widget,.pll-selectmenu-menu .ui-widget{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.languages_page_mlang .ui-button.ui-selectmenu-button:focus{background:#fff;border-color:#007cba;box-shadow:0 0 0 1px #007cba;color:#016087;outline:2px solid transparent}.languages_page_mlang .ui-menu-item,.languages_page_mlang .ui-widget-content .ui-state-active,.languages_page_mlang .ui-widget-content .ui-state-focus,.languages_page_mlang .ui-widget-content .ui-state-hover{color:#016087;margin:0}.pll-selectmenu-menu .ui-widget-content .ui-state-active,.pll-selectmenu-menu .ui-widget-content .ui-state-focus,.pll-selectmenu-menu .ui-widget-content .ui-state-hover,.ui-selectmenu-open .ui-widget-content .ui-state-active,.ui-selectmenu-open .ui-widget-content .ui-state-focus,.ui-selectmenu-open .ui-widget-content .ui-state-hover{background:#d5d5d5;border:0}.ui-selectmenu-button.ui-state-focus{border:1px solid #5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.ui-icon-triangle-1-s:before{background:#fff url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 0 top 55%;background-size:16px 16px;box-sizing:border-box;content:"";height:16px;position:absolute;width:16px}.pll-selectmenu-button.ui-button:hover,.pll-wizard .ui-button:focus,.pll-wizard .ui-button:hover{background:#fff}.ui-widget-content{box-shadow:0 2px 6px hsla(0,0%,39%,.3);max-height:231px} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/css/build/style.css b/wp-content/plugins/polylang-pro/css/build/style.css new file mode 100644 index 0000000..bb66af9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/style.css @@ -0,0 +1 @@ +.flag{width:16px;height:11px;display:inline-block}.components-modal__frame.confirmBox{height:auto}.components-modal__frame.confirmBox .buttons{display:block;text-align:right}.components-modal__frame.confirmBox .buttons button:first-child{margin-right:1rem}.translations p{margin-top:1em}.translations td span{box-sizing:border-box}.translations .pll-column-icon:not(.pll-delete-column)>a{color:var(--wp-admin-theme-color);width:20px;padding:2px 0 0}.translations .pll-column-icon>button{padding:0}.translations .pll-column-icon.pll-delete-column>.pll-button:not(:disabled){color:#cc1818}.translations .pll-feature-button-row-container{width:calc(26px*var(--pll-icon-count, 1))}.translations .pll-feature-button-row-container:has(.pll-column-icon){--pll-icon-count: 1}.translations .pll-feature-button-row-container:has(.pll-column-icon+.pll-column-icon){--pll-icon-count: 2}.translations .pll-feature-button-row-container:has(.pll-column-icon+.pll-column-icon+.pll-column-icon){--pll-icon-count: 3}body:not(.rtl) .translations .pll-translation-language{margin-left:10px}.rtl .translations .pll-translation-language{margin-right:10px}:not(.pll-delete-column)>.components-button.pll-button,:not(.pll-delete-column)>.components-button.pll-button:focus:enabled:not(.wp-ui-text-highlight),:not(.pll-delete-column)>.components-button.pll-button,:not(.pll-delete-column)>.components-button.pll-button:focus:enabled:not(.wp-ui-text-highlight){color:#ccc}:not(.pll-delete-column)>.components-button.pll-button.wp-ui-text-highlight,:not(.pll-delete-column)>.components-button.pll-button.wp-ui-text-highlight:focus:enabled,:not(.pll-delete-column)>.components-button.pll-button.wp-ui-text-highlight,:not(.pll-delete-column)>.components-button.pll-button.wp-ui-text-highlight:focus:enabled{color:var(--wp-admin-theme-color)}.pll-delete-column>.components-button.pll-button:disabled:hover{color:#1e1e1e}.rtl .pll-before-post-translations-button{float:left}.pll-button{height:auto}.pll-button.has-icon.has-text svg{margin:0}.pll-metabox-location .components-button.has-icon{min-width:auto}.pll-metabox-error.components-notice{margin:0}.components-panel #post-translations .pll-language-column{width:21px;padding-right:4px}.components-panel #post-translations .pll-column-icon{width:26px;padding:1px;text-align:center}.pll-translations-table-header{display:flex;flex-direction:row;gap:1rem}.pll-translations-table-header-title{flex:1}.pll-plugin-feature-button-container{margin-left:auto;display:flex}.pll-translation-column{position:relative}.pll-translation-column ul{position:absolute;top:41px;left:0;z-index:10;width:100%}.pll-translation-column li.is-empty,.pll-translation-column li[aria-selected=false]{background-color:var(--wp--preset--color--white);border:1px solid #949494}#pll-language-select-control{display:flex;align-items:center;gap:10px}#pll-language-select-control .pll-translation-icon{width:16px;display:inline-block;vertical-align:middle}.pll-language-item{margin:10px auto 5px auto}.pll-language-item .pll-select-flag{margin-right:10px;margin-left:3px;padding:2px;display:inline-block}.pll-language-item .pll-language-name{font-size:1.1em}.pll-metabox-info{font-style:italic;color:#757575;font-size:.9em}.pll-default-lang-icon{width:15px;height:15px}.pll-default-lang-icon path{fill:var(--wp-admin-theme-color)}.pll-language-item .pll-default-lang-icon{vertical-align:text-top}body:not(.rtl) .pll-language-item .pll-default-lang-icon{margin-left:5px}.rtl .pll-language-item .pll-default-lang-icon{margin-right:5px}.pll-default-lang-column .pll-default-lang-icon{margin-top:2px} diff --git a/wp-content/plugins/polylang-pro/css/build/style.min.css b/wp-content/plugins/polylang-pro/css/build/style.min.css new file mode 100644 index 0000000..bb66af9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/style.min.css @@ -0,0 +1 @@ +.flag{width:16px;height:11px;display:inline-block}.components-modal__frame.confirmBox{height:auto}.components-modal__frame.confirmBox .buttons{display:block;text-align:right}.components-modal__frame.confirmBox .buttons button:first-child{margin-right:1rem}.translations p{margin-top:1em}.translations td span{box-sizing:border-box}.translations .pll-column-icon:not(.pll-delete-column)>a{color:var(--wp-admin-theme-color);width:20px;padding:2px 0 0}.translations .pll-column-icon>button{padding:0}.translations .pll-column-icon.pll-delete-column>.pll-button:not(:disabled){color:#cc1818}.translations .pll-feature-button-row-container{width:calc(26px*var(--pll-icon-count, 1))}.translations .pll-feature-button-row-container:has(.pll-column-icon){--pll-icon-count: 1}.translations .pll-feature-button-row-container:has(.pll-column-icon+.pll-column-icon){--pll-icon-count: 2}.translations .pll-feature-button-row-container:has(.pll-column-icon+.pll-column-icon+.pll-column-icon){--pll-icon-count: 3}body:not(.rtl) .translations .pll-translation-language{margin-left:10px}.rtl .translations .pll-translation-language{margin-right:10px}:not(.pll-delete-column)>.components-button.pll-button,:not(.pll-delete-column)>.components-button.pll-button:focus:enabled:not(.wp-ui-text-highlight),:not(.pll-delete-column)>.components-button.pll-button,:not(.pll-delete-column)>.components-button.pll-button:focus:enabled:not(.wp-ui-text-highlight){color:#ccc}:not(.pll-delete-column)>.components-button.pll-button.wp-ui-text-highlight,:not(.pll-delete-column)>.components-button.pll-button.wp-ui-text-highlight:focus:enabled,:not(.pll-delete-column)>.components-button.pll-button.wp-ui-text-highlight,:not(.pll-delete-column)>.components-button.pll-button.wp-ui-text-highlight:focus:enabled{color:var(--wp-admin-theme-color)}.pll-delete-column>.components-button.pll-button:disabled:hover{color:#1e1e1e}.rtl .pll-before-post-translations-button{float:left}.pll-button{height:auto}.pll-button.has-icon.has-text svg{margin:0}.pll-metabox-location .components-button.has-icon{min-width:auto}.pll-metabox-error.components-notice{margin:0}.components-panel #post-translations .pll-language-column{width:21px;padding-right:4px}.components-panel #post-translations .pll-column-icon{width:26px;padding:1px;text-align:center}.pll-translations-table-header{display:flex;flex-direction:row;gap:1rem}.pll-translations-table-header-title{flex:1}.pll-plugin-feature-button-container{margin-left:auto;display:flex}.pll-translation-column{position:relative}.pll-translation-column ul{position:absolute;top:41px;left:0;z-index:10;width:100%}.pll-translation-column li.is-empty,.pll-translation-column li[aria-selected=false]{background-color:var(--wp--preset--color--white);border:1px solid #949494}#pll-language-select-control{display:flex;align-items:center;gap:10px}#pll-language-select-control .pll-translation-icon{width:16px;display:inline-block;vertical-align:middle}.pll-language-item{margin:10px auto 5px auto}.pll-language-item .pll-select-flag{margin-right:10px;margin-left:3px;padding:2px;display:inline-block}.pll-language-item .pll-language-name{font-size:1.1em}.pll-metabox-info{font-style:italic;color:#757575;font-size:.9em}.pll-default-lang-icon{width:15px;height:15px}.pll-default-lang-icon path{fill:var(--wp-admin-theme-color)}.pll-language-item .pll-default-lang-icon{vertical-align:text-top}body:not(.rtl) .pll-language-item .pll-default-lang-icon{margin-left:5px}.rtl .pll-language-item .pll-default-lang-icon{margin-right:5px}.pll-default-lang-column .pll-default-lang-icon{margin-top:2px} diff --git a/wp-content/plugins/polylang-pro/css/build/translations-dashboard.css b/wp-content/plugins/polylang-pro/css/build/translations-dashboard.css new file mode 100644 index 0000000..d1408b4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/translations-dashboard.css @@ -0,0 +1,63 @@ +/* Metaboxes holder in Strings translations screen */ +.languages_page_mlang_strings .metabox-holder > div { + display: flex; + flex-wrap: wrap; +} +.languages_page_mlang_strings .metabox-holder > div > div { + display: flex; + flex-direction: column; + flex-basis: 0; + flex-grow: 1; +} +.languages_page_mlang_strings .metabox-holder > div > div:not(:first-child) { + margin-left: 1rem; +} +.languages_page_mlang_strings .metabox-holder > div > div.closed { + border:0; + background: none; +} +.languages_page_mlang_strings .metabox-holder > div > div.closed .postbox-header{ + border: 1px solid #ccd0d4; + background: #fff; +} + +#pll-export-strings-box.postbox .submit, /* Override WordPress styles */ +#pll-import-translations-box.postbox .submit, +#pll-machine-strings-translations.postbox .submit { + float: none; + padding: 0; +} +.postbox .inside { + margin: 0; +} + +#pll-machine-strings-translations .pll-translation-flag, #export-string-translation .pll-translation-flag { + margin: auto 10px auto 7px; +} + +#export-string-translation label, +#export-string-translation label[for="pll-select-format"] span, +#import-translation label, +#pll-machine-strings-translations label { + display: block; + margin: 0.35em 0 0.5em; +} + +.pll-legend { + display: block; + padding: 2px 0; + color: #1d2327; + font-weight: 400; + text-shadow: none; + margin: 0.35em 0 0.5em; +} + +/* Narrow devices */ +@media screen and ( max-width: 1024px ) { + .languages_page_mlang_strings .metabox-holder > div { + flex-direction: column; + } + .languages_page_mlang_strings .metabox-holder > div > div:not(:first-child) { + margin-left: 0; + } +} diff --git a/wp-content/plugins/polylang-pro/css/build/translations-dashboard.min.css b/wp-content/plugins/polylang-pro/css/build/translations-dashboard.min.css new file mode 100644 index 0000000..3de7306 --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/translations-dashboard.min.css @@ -0,0 +1 @@ +.languages_page_mlang_strings .metabox-holder>div{display:flex;flex-wrap:wrap}.languages_page_mlang_strings .metabox-holder>div>div{display:flex;flex-basis:0;flex-direction:column;flex-grow:1}.languages_page_mlang_strings .metabox-holder>div>div:not(:first-child){margin-left:1rem}.languages_page_mlang_strings .metabox-holder>div>div.closed{background:none;border:0}.languages_page_mlang_strings .metabox-holder>div>div.closed .postbox-header{background:#fff;border:1px solid #ccd0d4}#pll-export-strings-box.postbox .submit,#pll-import-translations-box.postbox .submit,#pll-machine-strings-translations.postbox .submit{float:none;padding:0}.postbox .inside{margin:0}#export-string-translation .pll-translation-flag,#pll-machine-strings-translations .pll-translation-flag{margin:auto 10px auto 7px}#export-string-translation label,#export-string-translation label[for=pll-select-format] span,#import-translation label,#pll-machine-strings-translations label,.pll-legend{display:block;margin:.35em 0 .5em}.pll-legend{color:#1d2327;font-weight:400;padding:2px 0;text-shadow:none}@media screen and (max-width:1024px){.languages_page_mlang_strings .metabox-holder>div{flex-direction:column}.languages_page_mlang_strings .metabox-holder>div>div:not(:first-child){margin-left:0}} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/css/build/wizard.css b/wp-content/plugins/polylang-pro/css/build/wizard.css new file mode 100644 index 0000000..b52e24c --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/wizard.css @@ -0,0 +1,952 @@ +@charset "UTF-8"; +body { + margin: 65px auto 24px; + box-shadow: none; + background: #f1f1f1; + padding: 0; + border: 0; /* fix-pro #856 override WP install.css */ +} + +#pll-logo { + border: 0; + margin: 0 0 24px; + padding: 0; + text-align: center; + font-family: sans-serif; + font-size: 64px; + text-transform: uppercase; + color: #000; + line-height: normal; +} +#pll-logo a { + display: flex; + justify-content: center; + color: #000; + text-decoration: none; +} + +#pll-logo img { + max-width: 100%; + margin-right: 16px; +} +.rtl #pll-logo img { + margin-right: 0; + margin-left: 16px; +} + +.pll-wizard-footer { + text-align: center +} + +.pll-wizard .select2-container { + text-align: left; + width: auto +} + +.pll-wizard .hidden { + display: none +} + +.pll-wizard-content { + box-shadow: 0 1px 3px rgba(0, 0, 0, .13); + padding: 2em; + margin: 0 0 20px; + background: #fff; + overflow: hidden; + zoom: 1; + text-align: left; +} +.rtl .pll-wizard-content{ + text-align: right; +} + +.pll-wizard-content h1, +.pll-wizard-content h2, +.pll-wizard-content h3, +.pll-wizard-content table { + margin: 0 0 20px; + border: 0; + padding: 0; + color: #666; + clear: none; + font-weight: 500 +} + +.pll-wizard-content p { + margin: 20px 0; + font-size: 1em; + line-height: 1.75em; + color: #666 +} + +.pll-wizard-content table { + font-size: 1em; + line-height: 1.75em; + color: #666; + width: 100%; + margin-top: 20px; +} +.pll-wizard-content table td span{ + display: inline-block; +} + +.pll-wizard-content table caption { + caption-side: bottom; + font-style: italic; + text-align: right; +} +.rtl .pll-wizard-content table caption { + text-align: left; +} + +.pll-wizard-content table caption .icon-default-lang{ + font-style: normal; +} + +.pll-wizard-content a { + color: #a03f3f; +} + +.pll-wizard-content a:focus, +.pll-wizard-content a:hover, +.pll-wizard-footer-links:hover { + color: #dd5454 +} + +.pll-wizard-content .pll-wizard-next-steps { + overflow: hidden; + margin: 0 0 24px; + padding-bottom: 2px +} + +.pll-wizard-content .pll-wizard-next-steps h2 { + margin-bottom: 12px +} + +.pll-wizard-content .pll-wizard-next-steps .pll-wizard-next-steps-first { + float: left; + width: 50%; + box-sizing: border-box +} + +.pll-wizard-content .pll-wizard-next-steps .pll-wizard-next-steps-last { + float: right; + width: 50%; + box-sizing: border-box +} + +.pll-wizard-content .pll-wizard-next-steps ul { + padding: 0 2em 0 0; + list-style: none outside; + margin: 0 +} + +.pll-wizard-content .pll-wizard-next-steps ul li a { + display: block; + padding: 0 0 .75em +} + +.pll-wizard-content .pll-wizard-next-steps ul li a::before { + color: #82878c; + font: normal 20px/1 dashicons; + speak: none; + display: inline-block; + padding: 0 10px 0 0; + top: 1px; + position: relative; + text-decoration: none!important; + vertical-align: top +} + +.pll-wizard-steps { + padding: 0 0 24px; + margin: 0; + list-style: none outside; + overflow: hidden; + color: #ccc; + width: 100%; + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: inline-flex +} + +.pll-wizard-steps li { + width: 100%; + float: left; + padding: 0 0 .8em; + margin: 0; + text-align: center; + position: relative; + border-bottom: 4px solid #ccc; + line-height: 1.4em +} + +.pll-wizard-steps li a { + color: #a03f3f; + text-decoration: none; + padding: 1.5em; + margin: -1.5em; + position: relative; + z-index: 1 +} + +.pll-wizard-steps li a:focus, +.pll-wizard-steps li a:hover { + color: #dd5454; + text-decoration: underline +} + +.pll-wizard-steps li::before { + content: ""; + border: 4px solid #ccc; + border-radius: 100%; + width: 4px; + height: 4px; + position: absolute; + bottom: 0; + left: 50%; + margin-left: -6px; + margin-bottom: -8px; + background: #fff +} + +.pll-wizard-steps li.active { + border-color: #a03f3f; + color: #a03f3f; + font-weight: 700 +} + +.pll-wizard-steps li.active::before { + border-color: #a03f3f +} + +.pll-wizard-steps li.done { + border-color: #a03f3f; + color: #a03f3f +} + +.pll-wizard-steps li.done::before { + border-color: #a03f3f; + background: #a03f3f +} + +.pll-wizard .pll-wizard-actions { + overflow: hidden; + margin: 20px 0 0; + position: relative +} + +.pll-wizard .pll-wizard-actions .button { + font-size: 16px; + font-weight: 300; + padding: 1em 2em; + line-height: 1em; + margin-right: .5em; + margin-bottom: 2px; + margin-top: 10px; + height: auto; + border-radius: 4px; + box-shadow: none; + min-width: auto; + border-color: #a03f3f; + color: #a03f3f; +} + +.pll-wizard .pll-wizard-content .button { + border-color: #a03f3f; + color: #a03f3f; +} + +.pll-wizard .pll-wizard-content .button-primary, +.pll-wizard .pll-wizard-actions .button-primary { + background-color: #a03f3f; + border-color: #a03f3f; + color: #fff; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #a03f3f; + text-shadow: 0 -1px 1px #a03f3f, 1px 0 1px #a03f3f, 0 1px 1px #a03f3f, -1px 0 1px #a03f3f; + margin: 0; + opacity: 1 +} + +.pll-wizard .pll-wizard-content .button-small .dashicons { + font-size: 15px; + height: auto; + vertical-align: middle; +} + +.pll-wizard .button-primary:active, +.pll-wizard .button-primary:focus, +.pll-wizard input[type="checkbox"]:focus + label.button-primary, +.pll-wizard .button-primary:hover { + background: #dd5454; + border-color: #dd5454; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #dd5454 +} +.pll-wizard .pll-wizard-actions .button-primary[disabled], +.pll-wizard .pll-wizard-actions .button-primary:disabled, +.pll-wizard .pll-wizard-actions .button-primary.disabled { + cursor: wait; + background-color: #bb5454 !important; + border-color: #bb5454 !important; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #bb5454 !important; + text-shadow: 0 -1px 1px #bb5454, 1px 0 1px #bb5454, 0 1px 1px #bb5454, -1px 0 1px #bb5454 !important; + color: #ffa3a3 !important; +} +.pll-wizard-content p:last-child { + margin-bottom: 0 +} + +.pll-wizard-footer-links { + font-size: .85em; + color: #7b7b7b; + margin: 1.18em auto; + display: inline-block; + text-align: center +} + +.pll-wizard-services { + border: 1px solid #eee; + padding: 0; + margin: 0 0 1em; + list-style: none outside; + border-radius: 4px; + overflow: hidden +} + +.pll-wizard-services p { + margin: 0 0 1em 0; + padding: 0; + font-size: 1em; + line-height: 1.5em +} + +.pll-wizard-service-item { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + padding: 0; + border-bottom: 1px solid #eee; + color: #666; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center +} + +.media-step .pll-wizard-service-item{ + border: 0; +} + +.media-step .pll-wizard-service-item:last-child{ + display: block; +} + +.media-step .pll-wizard-service-item .pll-wizard-service-enable{ + padding-bottom: 0; +} + +.pll-wizard-service-item:last-child { + border-bottom: 0 +} + +.pll-wizard-service-item .pll-wizard-service-name { + -webkit-flex-basis: 0; + flex-basis: 0; + min-width: 160px; + text-align: center; + font-weight: 700; + padding: 2em 0; + -webkit-align-self: stretch; + align-self: stretch; + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: baseline; + -webkit-align-items: baseline; + align-items: baseline +} + +.pll-wizard-service-item .pll-wizard-service-name img { + max-width: 75px +} + +.pll-wizard-service-item .pll-wizard-service-description { + -webkit-box-flex: 1; + -webkit-flex-grow: 1; + flex-grow: 1; + padding: 20px +} + +.pll-wizard-service-item .pll-wizard-service-example { + padding: 0 20px 20px +} + +.pll-wizard-service-item .pll-wizard-service-example p{ + text-align: right; +} +.rtl .pll-wizard-service-item .pll-wizard-service-example p{ + text-align: left; +} + +.pll-wizard-service-item .pll-wizard-service-description p { + margin-bottom: 1em +} + +.pll-wizard-service-item .pll-wizard-service-description p:last-child { + margin-bottom: 0 +} + +.pll-wizard-service-item .pll-wizard-service-description .pll-wizard-service-settings-description { + display: block; + font-style: italic; + color: #999 +} + +.pll-wizard-service-item .pll-wizard-service-enable { + -webkit-flex-basis: 0; + flex-basis: 0; + min-width: 75px; + text-align: center; + cursor: pointer; + padding: 2em 0; + position: relative; + max-height: 1.5em; + -webkit-align-self: flex-start; + align-self: flex-start; + -webkit-box-ordinal-group: 4; + -webkit-order: 3; + order: 3 +} + +.pll-wizard-service-item .pll-wizard-service-toggle { + position: relative +} + +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox] { + position:absolute; + opacity: 0; +} + +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox] + label { + position: relative; + display: inline-block; + width: 44px; + height: 20px; + border-radius: 10em; + cursor: pointer; + text-indent: -9999px; +} + +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]:focus + label { + border:1px dashed #777; +} + +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox] + label::before, +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox] + label::after { + content: ''; + position: absolute; +} + +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox] + label::before { + left: 0; + top: 0; + width: 44px; + height: 20px; + background: #ddd; + border-radius: 10em; + transition: background-color .2s; +} + +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox] + label::after { + width: 16px; + height: 16px; + transition: all .2s; + border-radius: 50%; + background: #fff; + margin: 2px; + top: 0; + left: 0; +} + +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]:checked + label::before { + background:#a03f3f; +} + +.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]:checked + label::after { + right: 0; + left:auto; +} + +.pll-wizard-service-item .pll-wizard-service-settings { + display: none; + margin-top: .75em; + margin-bottom: 0; + cursor: default +} + +.pll-wizard-service-item .pll-wizard-service-settings.hide { + display: none +} + +.pll-wizard-service-item.checked .pll-wizard-service-settings { + display: inline-block +} + +.pll-wizard-service-item.checked .pll-wizard-service-settings.hide { + display: none +} + +.pll-wizard-service-item.closed { + border-bottom: 0 +} + +.step { + text-align: center +} + +.pll-wizard .button .dashicons{ + vertical-align: middle; + line-height: 1; +} +.rtl .dashicons-arrow-right-alt2:before { + content: "\f341"; +} +.pll-wizard .pll-wizard-actions .button:active, +.pll-wizard .pll-wizard-actions .button:focus, +.pll-wizard .pll-wizard-actions .button:hover { + box-shadow: none +} + +.pll-wizard-next-steps { + border: 1px solid #eee; + border-radius: 4px; + list-style: none; + padding: 0 +} + +.pll-wizard-next-steps li { + padding: 0 +} + +.pll-wizard-next-steps .pll-wizard-next-step-item { + display: -webkit-box; + display: -webkit-flex; + display: flex; + border-top: 1px solid #eee +} + +.pll-wizard-next-steps .pll-wizard-next-step-item.no-border, +.pll-wizard-next-steps .pll-wizard-next-step-item:first-child { + border-top: 0 +} + +.pll-wizard-next-steps .pll-wizard-next-step-description { + -webkit-box-flex: 1; + -webkit-flex-grow: 1; + flex-grow: 1; + margin: 1.5em +} + +.pll-wizard-next-steps .pll-wizard-next-step-action { + -webkit-box-flex: 0; + -webkit-flex-grow: 0; + flex-grow: 0; + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center +} + +.pll-wizard-next-steps .pll-wizard-next-step-action .button { + margin: 1em 1.5em +} + +.pll-wizard-next-steps .pll-wizard-next-step-item.no-border .pll-wizard-next-step-description, +.pll-wizard-next-steps .pll-wizard-next-step-item.no-border .pll-wizard-actions, +.pll-wizard-next-steps .pll-wizard-next-step-item.no-border .pll-wizard-next-step-action .button{ + margin-top: 0; +} + + +.pll-wizard-next-steps p.next-step-heading { + margin: 0; + font-size: .95em; + font-weight: 400; + font-variant: all-petite-caps +} + +.pll-wizard-next-steps p.next-step-extra-info { + margin: 0 +} + +.pll-wizard-next-steps h3.next-step-description { + margin: 0; + font-size: 16px; + font-weight: 600; +} + +.pll-wizard-next-steps .pll-wizard-additional-steps { + border-top: 1px solid #eee; +} + +.pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-next-step-description { + margin-bottom: 0 +} + +.pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-actions { + margin: 0 0 1.5em 0; +} + +.pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-actions .button { + font-size: 15px; + margin: 1em 0 1em 1.5em; +} +.rtl .pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-actions .button { + margin: 1em 1.5em 1em 0; +} + +.pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-actions .button::last-child { + margin-right: 1.5em; +} + +.pll-wizard-content img{ + max-width: 100%; + margin-right: 0.5em; +} +.rtl .pll-wizard-content img{ + margin-left: 0.5em; +} + +.pll-wizard-content .form-field label{ + margin-bottom: 5px; + display: block; +} + +.pll-wizard-content .form-field select{ + padding: 3px; +} + +.pll-wizard-content .languages-step select, +.pll-wizard-content .untranslated-contents-step select{ + width: 100%; +} + +.languages-step .form-field .button{ + margin-left: 15px; +} +.languages-step .form-field .button > span{ + margin-right: 0.3em; +} +.rtl .languages-step .form-field .button{ + margin-left: 0; + margin-right: 15px; +} +.rtl .languages-step .form-field .button > span{ + margin-left: 0.3em; + margin-right: 0; +} + +.pll-wizard-content .languages-step .select-language-field{ + display: flex; +} + +.pll-wizard-content #languages{ + display: none; +} +.pll-wizard-content #languages tr th:first-child{ + width: 80%; +} +.pll-wizard-content #languages .dashicons{ + color: #a03f3f; +} +.pll-wizard-content #languages img{ + margin-right: 5px; +} +.pll-wizard-content .error{ + color: #a03f3f; + font-weight: bold; +} +.pll-wizard-content #messages .error{ + background: #fccfcf; + padding: 0.5rem; + border: 1px solid #a03f3f; + margin-bottom: 0.5rem; +} + +.pll-wizard-content #slide-toggle{ + position:absolute; + opacity: 0; +} + +.pll-wizard-content #slide-toggle + label{ + position:relative; +} +.pll-wizard-content #slide-toggle + label + span{ + display: block; +} + +.pll-wizard-content #slide-toggle + label .dashicons{ + margin-right: 0.3em; +} +.rtl .pll-wizard-content #slide-toggle + label .dashicons{ + margin-left: 0.3em; + margin-right: 0; +} +.pll-wizard-content #slide-toggle ~ #screenshot > img { + max-height: 500px; + margin-top: 10px; + -webkit-transition: all .5s cubic-bezier(0, 1, 0.5, 1); + transition: all .5s cubic-bezier(0, 1, 0.5, 1); +} +.pll-wizard-content #slide-toggle:checked ~ #screenshot > img { + max-height: 0; +} +.hide { + display: none; +} + +input[type="text"].field-in-error, +input[type="password"].field-in-error, +input[type="checkbox"].field-in-error, +input[type="color"].field-in-error, +input[type="date"].field-in-error, +input[type="datetime"].field-in-error, +input[type="datetime-local"].field-in-error, +input[type="email"].field-in-error, +input[type="month"].field-in-error, +input[type="number"].field-in-error, +input[type="search"].field-in-error, +input[type="radio"].field-in-error, +input[type="tel"].field-in-error, +input[type="text"].field-in-error, +input[type="time"].field-in-error, +input[type="url"].field-in-error, +input[type="week"].field-in-error, +select.field-in-error, +textarea.field-in-error, +span.field-in-error, +.field-in-error{ + border-color: #a03f3f; +} + +input[type="text"].field-in-error:focus, +input[type="password"].field-in-error:focus, +input[type="checkbox"].field-in-error:focus, +input[type="color"].field-in-error:focus, +input[type="date"].field-in-error:focus, +input[type="datetime"].field-in-error:focus, +input[type="datetime-local"].field-in-error:focus, +input[type="email"].field-in-error:focus, +input[type="month"].field-in-error:focus, +input[type="number"].field-in-error:focus, +input[type="search"].field-in-error:focus, +input[type="radio"].field-in-error:focus, +input[type="tel"].field-in-error:focus, +input[type="text"].field-in-error:focus, +input[type="time"].field-in-error:focus, +input[type="url"].field-in-error:focus, +input[type="week"].field-in-error:focus, +select.field-in-error:focus, +textarea.field-in-error:focus, +span.field-in-error:focus, +.field-in-error:focus{ + border: 1px solid #a03f3f; + box-shadow: 0 0 2px rgba(160, 63, 63, 0.8); + outline-color: #a03f3f; + outline-style: auto; + outline-width: thin; +} + +/* override install styles by returning back to forms styles */ +.form-table input.regular-text{ + width: 25em; +} +.form-table input.field-in-error{ + border-color: #a03f3f; +} +#pll-licenses-table td{ + padding: 10px 9px; +} +#pll-licenses-table .license-valid td p{ + min-width: 35em; +} +#pll-licenses-table .pll-deactivate-license{ + margin: 0 0 0 20px; +} +.rtl #pll-licenses-table .pll-deactivate-license{ + margin: 0 10px 0 0; +} +.pll-wizard-content .documentation { + padding: 24px 24px 0; + margin: 0 0 24px; + overflow: hidden; + background: #f5f5f5 +} + +.pll-wizard-content .documentation p { + padding: 0; + margin: 0 0 12px; +} +.documentation-container { + display: -webkit-box; + display: -webkit-flex; + display: flex; + justify-content: flex-end; +} + +.documentation-container .documentation-button-container { + -webkit-box-flex: 0; + -webkit-flex-grow: 0; + flex-grow: 0; +} + +.wc-setup .wc-setup-actions .button.documentation-button { + height: 42px; + padding: 0 1em; + margin: 0; +} +#dialog{ + display: none; +} +.pll-wizard .ui-dialog.ui-widget-content{ + max-height: none; +} +.pll-wizard .ui-dialog-title::before{ + content: "\f534"; + font-family: dashicons; + display: inline-block; + line-height: 1; + font-weight: 400; + font-style: normal; + speak: none; + text-decoration: inherit; + text-transform: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + width: 20px; + height: 20px; + font-size: 20px; + vertical-align: middle; + text-align: center; + margin: 0 5px 5px 0; + transition: color 0.1s ease-in; +} +.rtl.pll-wizard .ui-dialog-title::before{ + margin-right: 0; + margin-left: 5px; +} +.pll-wizard .ui-dialog ul{ + list-style: disc; + padding-left: 20px; +} +.rtl.pll-wizard .ui-dialog ul{ + padding-left: 0; + padding-right: 20px; +} +.pll-wizard li{ + margin-bottom: 0; +} +#translations{ + border-collapse: collapse; +} +#translations tbody:nth-child(odd){ + background-color: #f9f9f9; +} +#translations.striped > tbody > :nth-child(odd) { + background-color: transparent; /* Override common WordPress style */ +} +.pll-wizard-content mark{ + background: transparent none; +} +.pll-wizard-content mark{ + color: #7ad03a; +} +@media screen and (max-width: 782px) { + /* Override WordPress button css rules */ + .languages-step .form-field .button{ + font-size: 13px; + line-height: 26px; + height: 28px; + padding: 0 10px 1px; + vertical-align: top; + } + + #pll-licenses-table .pll-deactivate-license{ + margin: 10px 0 5px; + } +} +@media only screen and (max-width:620px) { + /* Override dialog width rule */ + .ui-dialog{ + width: 100% !important; + } + +} +@media only screen and (max-width:500px) { + #pll-logo a, + .select-language-field{ + flex-direction: column; + } + .select-language-field .action-buttons{ + display: flex; + justify-content: flex-end; + } + .languages-step .form-field .button{ + margin: 5px 0 0; + } +} +@media only screen and (max-width:400px) { + #pll-logo { + font-size: 56px; + } + .pll-wizard-steps { + display: none + } + .pll-wizard-service-item { + -webkit-flex-wrap: wrap; + flex-wrap: wrap + } + .pll-wizard-service-item .pll-wizard-service-enable { + -webkit-box-ordinal-group: 3; + -webkit-order: 2; + order: 2; + padding: 20px 0 0 + } + .pll-wizard-service-item .pll-wizard-service-description { + -webkit-box-ordinal-group: 4; + -webkit-order: 3; + order: 3 + } + .pll-wizard-service-item .pll-wizard-service-name { + padding: 20px 20px 0; + text-align: left; + -webkit-box-pack: justify!important; + -webkit-justify-content: space-between!important; + justify-content: space-between!important + } + .pll-wizard-service-item .pll-wizard-service-name img { + margin: 0 + } + .pll-wizard-next-steps .pll-wizard-next-step-item { + -webkit-flex-wrap: wrap; + flex-wrap: wrap + } + .pll-wizard-next-steps .pll-wizard-next-step-item .pll-wizard-next-step-description { + margin-bottom: 0 + } + .pll-wizard-next-steps .pll-wizard-next-step-item .pll-wizard-next-step-action p { + margin: 0 + } +} +@media only screen and (max-width:360px) { + #pll-logo { + font-size: 48px; + } +} diff --git a/wp-content/plugins/polylang-pro/css/build/wizard.min.css b/wp-content/plugins/polylang-pro/css/build/wizard.min.css new file mode 100644 index 0000000..b9b98fc --- /dev/null +++ b/wp-content/plugins/polylang-pro/css/build/wizard.min.css @@ -0,0 +1 @@ +body{background:#f1f1f1;box-shadow:none;margin:65px auto 24px}#pll-logo,body{border:0;padding:0}#pll-logo{color:#000;font-family:sans-serif;font-size:64px;line-height:normal;margin:0 0 24px;text-align:center;text-transform:uppercase}#pll-logo a{color:#000;display:flex;justify-content:center;text-decoration:none}#pll-logo img{margin-right:16px;max-width:100%}.rtl #pll-logo img{margin-left:16px;margin-right:0}.pll-wizard-footer{text-align:center}.pll-wizard .select2-container{text-align:left;width:auto}.pll-wizard .hidden{display:none}.pll-wizard-content{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.13);margin:0 0 20px;overflow:hidden;padding:2em;text-align:left;zoom:1}.rtl .pll-wizard-content{text-align:right}.pll-wizard-content h1,.pll-wizard-content h2,.pll-wizard-content h3,.pll-wizard-content table{border:0;clear:none;color:#666;font-weight:500;margin:0 0 20px;padding:0}.pll-wizard-content p{color:#666;font-size:1em;line-height:1.75em;margin:20px 0}.pll-wizard-content table{color:#666;font-size:1em;line-height:1.75em;margin-top:20px;width:100%}.pll-wizard-content table td span{display:inline-block}.pll-wizard-content table caption{caption-side:bottom;font-style:italic;text-align:right}.rtl .pll-wizard-content table caption{text-align:left}.pll-wizard-content table caption .icon-default-lang{font-style:normal}.pll-wizard-content a{color:#a03f3f}.pll-wizard-content a:focus,.pll-wizard-content a:hover,.pll-wizard-footer-links:hover{color:#dd5454}.pll-wizard-content .pll-wizard-next-steps{margin:0 0 24px;overflow:hidden;padding-bottom:2px}.pll-wizard-content .pll-wizard-next-steps h2{margin-bottom:12px}.pll-wizard-content .pll-wizard-next-steps .pll-wizard-next-steps-first{box-sizing:border-box;float:left;width:50%}.pll-wizard-content .pll-wizard-next-steps .pll-wizard-next-steps-last{box-sizing:border-box;float:right;width:50%}.pll-wizard-content .pll-wizard-next-steps ul{list-style:none outside;margin:0;padding:0 2em 0 0}.pll-wizard-content .pll-wizard-next-steps ul li a{display:block;padding:0 0 .75em}.pll-wizard-content .pll-wizard-next-steps ul li a:before{color:#82878c;font:normal 20px/1 dashicons;speak:none;display:inline-block;padding:0 10px 0 0;position:relative;text-decoration:none!important;top:1px;vertical-align:top}.pll-wizard-steps{color:#ccc;display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;list-style:none outside;margin:0;overflow:hidden;padding:0 0 24px;width:100%}.pll-wizard-steps li{border-bottom:4px solid #ccc;float:left;line-height:1.4em;margin:0;padding:0 0 .8em;position:relative;text-align:center;width:100%}.pll-wizard-steps li a{color:#a03f3f;margin:-1.5em;padding:1.5em;position:relative;text-decoration:none;z-index:1}.pll-wizard-steps li a:focus,.pll-wizard-steps li a:hover{color:#dd5454;text-decoration:underline}.pll-wizard-steps li:before{background:#fff;border:4px solid #ccc;border-radius:100%;bottom:0;content:"";height:4px;left:50%;margin-bottom:-8px;margin-left:-6px;position:absolute;width:4px}.pll-wizard-steps li.active{border-color:#a03f3f;color:#a03f3f;font-weight:700}.pll-wizard-steps li.active:before{border-color:#a03f3f}.pll-wizard-steps li.done{border-color:#a03f3f;color:#a03f3f}.pll-wizard-steps li.done:before{background:#a03f3f;border-color:#a03f3f}.pll-wizard .pll-wizard-actions{margin:20px 0 0;overflow:hidden;position:relative}.pll-wizard .pll-wizard-actions .button{border-color:#a03f3f;border-radius:4px;box-shadow:none;color:#a03f3f;font-size:16px;font-weight:300;height:auto;line-height:1em;margin-bottom:2px;margin-right:.5em;margin-top:10px;min-width:auto;padding:1em 2em}.pll-wizard .pll-wizard-content .button{border-color:#a03f3f;color:#a03f3f}.pll-wizard .pll-wizard-actions .button-primary,.pll-wizard .pll-wizard-content .button-primary{background-color:#a03f3f;border-color:#a03f3f;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.25),0 1px 0 #a03f3f;color:#fff;margin:0;opacity:1;text-shadow:0 -1px 1px #a03f3f,1px 0 1px #a03f3f,0 1px 1px #a03f3f,-1px 0 1px #a03f3f}.pll-wizard .pll-wizard-content .button-small .dashicons{font-size:15px;height:auto;vertical-align:middle}.pll-wizard .button-primary:active,.pll-wizard .button-primary:focus,.pll-wizard .button-primary:hover,.pll-wizard input[type=checkbox]:focus+label.button-primary{background:#dd5454;border-color:#dd5454;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.25),0 1px 0 #dd5454}.pll-wizard .pll-wizard-actions .button-primary.disabled,.pll-wizard .pll-wizard-actions .button-primary:disabled,.pll-wizard .pll-wizard-actions .button-primary[disabled]{background-color:#bb5454!important;border-color:#bb5454!important;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.25),0 1px 0 #bb5454!important;color:#ffa3a3!important;cursor:wait;text-shadow:0 -1px 1px #bb5454,1px 0 1px #bb5454,0 1px 1px #bb5454,-1px 0 1px #bb5454!important}.pll-wizard-content p:last-child{margin-bottom:0}.pll-wizard-footer-links{color:#7b7b7b;display:inline-block;font-size:.85em;margin:1.18em auto;text-align:center}.pll-wizard-services{border:1px solid #eee;border-radius:4px;list-style:none outside;margin:0 0 1em;overflow:hidden;padding:0}.pll-wizard-services p{font-size:1em;line-height:1.5em;margin:0 0 1em;padding:0}.pll-wizard-service-item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:justify;border-bottom:1px solid #eee;color:#666;-webkit-justify-content:space-between;justify-content:space-between;padding:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.media-step .pll-wizard-service-item{border:0}.media-step .pll-wizard-service-item:last-child{display:block}.media-step .pll-wizard-service-item .pll-wizard-service-enable{padding-bottom:0}.pll-wizard-service-item:last-child{border-bottom:0}.pll-wizard-service-item .pll-wizard-service-name{-webkit-align-self:stretch;align-self:stretch;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-basis:0;flex-basis:0;font-weight:700;min-width:160px;padding:2em 0;text-align:center;-webkit-box-align:baseline;-webkit-align-items:baseline;align-items:baseline}.pll-wizard-service-item .pll-wizard-service-name img{max-width:75px}.pll-wizard-service-item .pll-wizard-service-description{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;padding:20px}.pll-wizard-service-item .pll-wizard-service-example{padding:0 20px 20px}.pll-wizard-service-item .pll-wizard-service-example p{text-align:right}.rtl .pll-wizard-service-item .pll-wizard-service-example p{text-align:left}.pll-wizard-service-item .pll-wizard-service-description p{margin-bottom:1em}.pll-wizard-service-item .pll-wizard-service-description p:last-child{margin-bottom:0}.pll-wizard-service-item .pll-wizard-service-description .pll-wizard-service-settings-description{color:#999;display:block;font-style:italic}.pll-wizard-service-item .pll-wizard-service-enable{-webkit-align-self:flex-start;align-self:flex-start;cursor:pointer;-webkit-flex-basis:0;flex-basis:0;max-height:1.5em;min-width:75px;padding:2em 0;position:relative;text-align:center;-webkit-box-ordinal-group:4;-webkit-order:3;order:3}.pll-wizard-service-item .pll-wizard-service-toggle{position:relative}.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]{opacity:0;position:absolute}.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]+label{border-radius:10em;cursor:pointer;display:inline-block;height:20px;position:relative;text-indent:-9999px;width:44px}.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]:focus+label{border:1px dashed #777}.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]+label:after,.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]+label:before{content:"";position:absolute}.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]+label:before{background:#ddd;border-radius:10em;height:20px;left:0;top:0;transition:background-color .2s;width:44px}.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]+label:after{background:#fff;border-radius:50%;height:16px;left:0;margin:2px;top:0;transition:all .2s;width:16px}.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]:checked+label:before{background:#a03f3f}.pll-wizard-service-item .pll-wizard-service-toggle input[type=checkbox]:checked+label:after{left:auto;right:0}.pll-wizard-service-item .pll-wizard-service-settings{cursor:default;display:none;margin-bottom:0;margin-top:.75em}.pll-wizard-service-item .pll-wizard-service-settings.hide{display:none}.pll-wizard-service-item.checked .pll-wizard-service-settings{display:inline-block}.pll-wizard-service-item.checked .pll-wizard-service-settings.hide{display:none}.pll-wizard-service-item.closed{border-bottom:0}.step{text-align:center}.pll-wizard .button .dashicons{line-height:1;vertical-align:middle}.rtl .dashicons-arrow-right-alt2:before{content:"\f341"}.pll-wizard .pll-wizard-actions .button:active,.pll-wizard .pll-wizard-actions .button:focus,.pll-wizard .pll-wizard-actions .button:hover{box-shadow:none}.pll-wizard-next-steps{border:1px solid #eee;border-radius:4px;list-style:none;padding:0}.pll-wizard-next-steps li{padding:0}.pll-wizard-next-steps .pll-wizard-next-step-item{border-top:1px solid #eee;display:-webkit-box;display:-webkit-flex;display:flex}.pll-wizard-next-steps .pll-wizard-next-step-item.no-border,.pll-wizard-next-steps .pll-wizard-next-step-item:first-child{border-top:0}.pll-wizard-next-steps .pll-wizard-next-step-description{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;margin:1.5em}.pll-wizard-next-steps .pll-wizard-next-step-action{-webkit-box-flex:0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-grow:0;flex-grow:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.pll-wizard-next-steps .pll-wizard-next-step-action .button{margin:1em 1.5em}.pll-wizard-next-steps .pll-wizard-next-step-item.no-border .pll-wizard-actions,.pll-wizard-next-steps .pll-wizard-next-step-item.no-border .pll-wizard-next-step-action .button,.pll-wizard-next-steps .pll-wizard-next-step-item.no-border .pll-wizard-next-step-description{margin-top:0}.pll-wizard-next-steps p.next-step-heading{font-size:.95em;font-variant:all-petite-caps;font-weight:400;margin:0}.pll-wizard-next-steps p.next-step-extra-info{margin:0}.pll-wizard-next-steps h3.next-step-description{font-size:16px;font-weight:600;margin:0}.pll-wizard-next-steps .pll-wizard-additional-steps{border-top:1px solid #eee}.pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-next-step-description{margin-bottom:0}.pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-actions{margin:0 0 1.5em}.pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-actions .button{font-size:15px;margin:1em 0 1em 1.5em}.rtl .pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-actions .button{margin:1em 1.5em 1em 0}.pll-wizard-next-steps .pll-wizard-additional-steps .pll-wizard-actions .button::last-child{margin-right:1.5em}.pll-wizard-content img{margin-right:.5em;max-width:100%}.rtl .pll-wizard-content img{margin-left:.5em}.pll-wizard-content .form-field label{display:block;margin-bottom:5px}.pll-wizard-content .form-field select{padding:3px}.pll-wizard-content .languages-step select,.pll-wizard-content .untranslated-contents-step select{width:100%}.languages-step .form-field .button{margin-left:15px}.languages-step .form-field .button>span{margin-right:.3em}.rtl .languages-step .form-field .button{margin-left:0;margin-right:15px}.rtl .languages-step .form-field .button>span{margin-left:.3em;margin-right:0}.pll-wizard-content .languages-step .select-language-field{display:flex}.pll-wizard-content #languages{display:none}.pll-wizard-content #languages tr th:first-child{width:80%}.pll-wizard-content #languages .dashicons{color:#a03f3f}.pll-wizard-content #languages img{margin-right:5px}.pll-wizard-content .error{color:#a03f3f;font-weight:700}.pll-wizard-content #messages .error{background:#fccfcf;border:1px solid #a03f3f;margin-bottom:.5rem;padding:.5rem}.pll-wizard-content #slide-toggle{opacity:0;position:absolute}.pll-wizard-content #slide-toggle+label{position:relative}.pll-wizard-content #slide-toggle+label+span{display:block}.pll-wizard-content #slide-toggle+label .dashicons{margin-right:.3em}.rtl .pll-wizard-content #slide-toggle+label .dashicons{margin-left:.3em;margin-right:0}.pll-wizard-content #slide-toggle~#screenshot>img{margin-top:10px;max-height:500px;-webkit-transition:all .5s cubic-bezier(0,1,.5,1);transition:all .5s cubic-bezier(0,1,.5,1)}.pll-wizard-content #slide-toggle:checked~#screenshot>img{max-height:0}.hide{display:none}.field-in-error,input[type=checkbox].field-in-error,input[type=color].field-in-error,input[type=date].field-in-error,input[type=datetime-local].field-in-error,input[type=datetime].field-in-error,input[type=email].field-in-error,input[type=month].field-in-error,input[type=number].field-in-error,input[type=password].field-in-error,input[type=radio].field-in-error,input[type=search].field-in-error,input[type=tel].field-in-error,input[type=text].field-in-error,input[type=time].field-in-error,input[type=url].field-in-error,input[type=week].field-in-error,select.field-in-error,span.field-in-error,textarea.field-in-error{border-color:#a03f3f}.field-in-error:focus,input[type=checkbox].field-in-error:focus,input[type=color].field-in-error:focus,input[type=date].field-in-error:focus,input[type=datetime-local].field-in-error:focus,input[type=datetime].field-in-error:focus,input[type=email].field-in-error:focus,input[type=month].field-in-error:focus,input[type=number].field-in-error:focus,input[type=password].field-in-error:focus,input[type=radio].field-in-error:focus,input[type=search].field-in-error:focus,input[type=tel].field-in-error:focus,input[type=text].field-in-error:focus,input[type=time].field-in-error:focus,input[type=url].field-in-error:focus,input[type=week].field-in-error:focus,select.field-in-error:focus,span.field-in-error:focus,textarea.field-in-error:focus{border:1px solid #a03f3f;box-shadow:0 0 2px rgba(160,63,63,.8);outline-color:#a03f3f;outline-style:auto;outline-width:thin}.form-table input.regular-text{width:25em}.form-table input.field-in-error{border-color:#a03f3f}#pll-licenses-table td{padding:10px 9px}#pll-licenses-table .license-valid td p{min-width:35em}#pll-licenses-table .pll-deactivate-license{margin:0 0 0 20px}.rtl #pll-licenses-table .pll-deactivate-license{margin:0 10px 0 0}.pll-wizard-content .documentation{background:#f5f5f5;margin:0 0 24px;overflow:hidden;padding:24px 24px 0}.pll-wizard-content .documentation p{margin:0 0 12px;padding:0}.documentation-container{display:-webkit-box;display:-webkit-flex;display:flex;justify-content:flex-end}.documentation-container .documentation-button-container{-webkit-box-flex:0;-webkit-flex-grow:0;flex-grow:0}.wc-setup .wc-setup-actions .button.documentation-button{height:42px;margin:0;padding:0 1em}#dialog{display:none}.pll-wizard .ui-dialog.ui-widget-content{max-height:none}.pll-wizard .ui-dialog-title:before{content:"\f534";display:inline-block;font-family:dashicons;font-style:normal;font-weight:400;line-height:1;speak:none;text-decoration:inherit;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:20px;height:20px;margin:0 5px 5px 0;text-align:center;transition:color .1s ease-in;vertical-align:middle;width:20px}.rtl.pll-wizard .ui-dialog-title:before{margin-left:5px;margin-right:0}.pll-wizard .ui-dialog ul{list-style:disc;padding-left:20px}.rtl.pll-wizard .ui-dialog ul{padding-left:0;padding-right:20px}.pll-wizard li{margin-bottom:0}#translations{border-collapse:collapse}#translations tbody:nth-child(odd){background-color:#f9f9f9}#translations.striped>tbody>:nth-child(odd){background-color:transparent}.pll-wizard-content mark{background:transparent none;color:#7ad03a}@media screen and (max-width:782px){.languages-step .form-field .button{font-size:13px;height:28px;line-height:26px;padding:0 10px 1px;vertical-align:top}#pll-licenses-table .pll-deactivate-license{margin:10px 0 5px}}@media only screen and (max-width:620px){.ui-dialog{width:100%!important}}@media only screen and (max-width:500px){#pll-logo a,.select-language-field{flex-direction:column}.select-language-field .action-buttons{display:flex;justify-content:flex-end}.languages-step .form-field .button{margin:5px 0 0}}@media only screen and (max-width:400px){#pll-logo{font-size:56px}.pll-wizard-steps{display:none}.pll-wizard-service-item{-webkit-flex-wrap:wrap;flex-wrap:wrap}.pll-wizard-service-item .pll-wizard-service-enable{-webkit-box-ordinal-group:3;-webkit-order:2;order:2;padding:20px 0 0}.pll-wizard-service-item .pll-wizard-service-description{-webkit-box-ordinal-group:4;-webkit-order:3;order:3}.pll-wizard-service-item .pll-wizard-service-name{padding:20px 20px 0;text-align:left;-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;justify-content:space-between!important}.pll-wizard-service-item .pll-wizard-service-name img{margin:0}.pll-wizard-next-steps .pll-wizard-next-step-item{-webkit-flex-wrap:wrap;flex-wrap:wrap}.pll-wizard-next-steps .pll-wizard-next-step-item .pll-wizard-next-step-description{margin-bottom:0}.pll-wizard-next-steps .pll-wizard-next-step-item .pll-wizard-next-step-action p{margin:0}}@media only screen and (max-width:360px){#pll-logo{font-size:48px}} \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/css/build/license.css b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/css/build/license.css new file mode 100644 index 0000000..e5760df --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/css/build/license.css @@ -0,0 +1,34 @@ +/* Settings */ +#pllu-licenses-table label { + font-size: 1em; + font-weight: 600; +} + +/* Wizard */ +#pllu-licenses-table td { + padding: 10px 9px; +} + +#pllu-licenses-table .license-valid td p { + min-width: 35em; +} + +#pllu-licenses-table .pllu-deactivate-license { + margin: 0 0 0 20px; +} + +.rtl #pllu-licenses-table .pllu-deactivate-license { + margin: 0 10px 0 0; +} + +@media screen and (max-width: 782px) { + /* Settings */ + #wpbody-content .pll-settings #pllu-licenses-table td { + display: block; + } + + /* Wizard */ + #pllu-licenses-table .pllu-deactivate-license { + margin: 10px 0 5px; + } +} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/css/build/license.min.css b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/css/build/license.min.css new file mode 100644 index 0000000..29d9461 --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/css/build/license.min.css @@ -0,0 +1 @@ +#pllu-licenses-table label{font-size:1em;font-weight:600}#pllu-licenses-table td{padding:10px 9px}#pllu-licenses-table .license-valid td p{min-width:35em}#pllu-licenses-table .pllu-deactivate-license{margin:0 0 0 20px}.rtl #pllu-licenses-table .pllu-deactivate-license{margin:0 10px 0 0}@media screen and (max-width:782px){#wpbody-content .pll-settings #pllu-licenses-table td{display:block}#pllu-licenses-table .pllu-deactivate-license{margin:10px 0 5px}} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/js/build/license.js b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/js/build/license.js new file mode 100644 index 0000000..2f0453c --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/js/build/license.js @@ -0,0 +1,89 @@ +const pllSettingsLicenses = { + /** + * Init. + */ + init: () => { + if (document.readyState !== 'loading') { + pllSettingsLicenses.ready(); + } else { + document.addEventListener('DOMContentLoaded', pllSettingsLicenses.ready); + } + }, + ready: () => { + wp.hooks.addAction('pll_settings_saved', 'polylang-updater', pllSettingsLicenses.manageLicenses.onUpdate); + pllSettingsLicenses.manageLicenses.display(); + }, + manageLicenses: { + display: () => { + const table = document.getElementById('pllu-licenses-table'); + if (!table) { + return; + } + const action = table.getAttribute('data-action'); + const nonce = table.getAttribute('data-nonce'); + if (!action || !nonce) { + return; + } + const urlParams = { + action, + _pll_nonce: nonce, + pll_ajax_settings: 1 + }; + const url = wp.url.addQueryArgs(ajaxurl, urlParams); + fetch(url).then(response => { + return response.json(); + }).then(json => { + if (!json.success) { + return; + } + json.data.row.forEach(item => { + table.insertAdjacentHTML('beforeend', item); + }); + pllSettingsLicenses.manageLicenses.attachDeactivationEvent(); + }); + }, + attachDeactivationEvent: () => { + let table = document.querySelector('#pllu-licenses-table'); + if (!table) { + return; + } + table.addEventListener('click', el => { + if (!el.target.classList.contains('pllu-deactivate-license')) { + return; + } + const data = new FormData(); + data.set('action', 'pllu_deactivate_license'); + data.set('pll_ajax_settings', 1); + data.set('id', el.target.id); + data.set('_pll_nonce', document.querySelector('#_pll_nonce').value); + + // POST request using fetch(). + fetch(ajaxurl, { + method: "POST", + body: data + }).then(response => { + return response.json(); + }).then(json => { + if (!json.success) { + return; + } + + // Data comes from `License::get_form_field()`, where everything is escaped. + const license = document.querySelector('#pllu-license-' + json.data.id); + if (license) { + license.outerHTML = json.data.html; + } + }); + }); + }, + onUpdate: response => { + if ('pllu-license-update' === response.what) { + const license = document.querySelector(`#pllu-license-${response.data}`); + if (license) { + license.outerHTML = response.supplemental.html; + } + } + } + } +}; +pllSettingsLicenses.init(); diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/js/build/license.min.js b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/js/build/license.min.js new file mode 100644 index 0000000..24fb30b --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/js/build/license.min.js @@ -0,0 +1 @@ +const pllSettingsLicenses={init:()=>{"loading"!==document.readyState?pllSettingsLicenses.ready():document.addEventListener("DOMContentLoaded",pllSettingsLicenses.ready)},ready:()=>{wp.hooks.addAction("pll_settings_saved","polylang-updater",pllSettingsLicenses.manageLicenses.onUpdate),pllSettingsLicenses.manageLicenses.display()},manageLicenses:{display:()=>{const e=document.getElementById("pllu-licenses-table");if(!e)return;const t=e.getAttribute("data-action"),n=e.getAttribute("data-nonce");if(!t||!n)return;const s={action:t,_pll_nonce:n,pll_ajax_settings:1},a=wp.url.addQueryArgs(ajaxurl,s);fetch(a).then((e=>e.json())).then((t=>{t.success&&(t.data.row.forEach((t=>{e.insertAdjacentHTML("beforeend",t)})),pllSettingsLicenses.manageLicenses.attachDeactivationEvent())}))},attachDeactivationEvent:()=>{let e=document.querySelector("#pllu-licenses-table");e&&e.addEventListener("click",(e=>{if(!e.target.classList.contains("pllu-deactivate-license"))return;const t=new FormData;t.set("action","pllu_deactivate_license"),t.set("pll_ajax_settings",1),t.set("id",e.target.id),t.set("_pll_nonce",document.querySelector("#_pll_nonce").value),fetch(ajaxurl,{method:"POST",body:t}).then((e=>e.json())).then((e=>{if(!e.success)return;const t=document.querySelector("#pllu-license-"+e.data.id);t&&(t.outerHTML=e.data.html)}))}))},onUpdate:e=>{if("pllu-license-update"===e.what){const t=document.querySelector(`#pllu-license-${e.data}`);t&&(t.outerHTML=e.supplemental.html)}}}};pllSettingsLicenses.init(); diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Common_Trait.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Common_Trait.php new file mode 100644 index 0000000..2accaae --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Common_Trait.php @@ -0,0 +1,123 @@ +items ) ) { + return $this->items; + } + + /** + * Filters the list of Polylang licenses. + * + * @since 1.0 + * + * @param (License|PLL_License)[] $licenses Array of instances of `WP_Syntex\Polylang_Pro\Updater\License` + * or `PLL_License`, keyed by string IDs. + */ + $this->items = (array) apply_filters( 'pll_settings_licenses', array() ); + return $this->items; + } + + /** + * Launches hooks. + * + * @since 1.0 + * + * @return void + */ + private function hooks(): void { + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + add_action( 'wp_ajax_pllu_deactivate_license', array( $this, 'deactivate_license' ) ); + } + + /** + * Enqueues styles and scripts. + * + * @since 1.0 + * + * @return void + */ + public function enqueue_scripts(): void { + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + /* + * Use `__DIR__` in `plugins_url()` to get the path to a "file" located at the root of this package. Keep that + * in mind if this file is moved. + */ + $style_url = plugins_url( "/css/build/license{$suffix}.css", __DIR__ ); + wp_enqueue_style( 'pll_license', $style_url, array(), Updater::get_version() ); + + $script_url = plugins_url( "/js/build/license{$suffix}.js", __DIR__ ); + wp_enqueue_script( 'pll_license', $script_url, array( 'wp-api-fetch' ), Updater::get_version(), true ); + } + + /** + * Ajax method to deactivate a license. + * Hooked to `wp_ajax_pllu_deactivate_license`. + * + * Requires the class constant `DEACTIVATE_LICENSE_NONCE_ACTION`. + * + * @since 1.0 + * + * @return void + * + * @phpstan-return never + */ + public function deactivate_license(): void { + check_ajax_referer( self::DEACTIVATE_LICENSE_NONCE_ACTION, '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( ! isset( $_POST['id'] ) ) { + wp_die( 0 ); + } + + $id = substr( sanitize_text_field( wp_unslash( $_POST['id'] ) ), 11 ); + $licenses = $this->get_licenses(); + + if ( ! isset( $licenses[ $id ] ) ) { + wp_die( 0 ); + } + + $license = $licenses[ $id ]->deactivate_license(); + + wp_send_json_success( + array( + 'id' => $id, + 'html' => $license->get_form_field(), + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/EDD_SL_Plugin_Updater.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/EDD_SL_Plugin_Updater.php new file mode 100644 index 0000000..d45e7a8 --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/EDD_SL_Plugin_Updater.php @@ -0,0 +1,737 @@ +api_url = trailingslashit( $_api_url ); + $this->api_data = $_api_data; + $this->plugin_file = $_plugin_file; + $this->name = plugin_basename( $_plugin_file ); + $this->slug = basename( dirname( $_plugin_file ) ); + $this->version = $_api_data['version']; + $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false; + $this->beta = ! empty( $this->api_data['beta'] ) ? true : false; + $this->failed_request_cache_key = 'edd_sl_failed_http_' . md5( $this->api_url ); + + $edd_plugin_data[ $this->slug ] = $this->api_data; + + /** + * Fires after the $edd_plugin_data is setup. + * + * @since x.x.x + * + * @param array $edd_plugin_data Array of EDD SL plugin data. + */ + do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data ); + + // Set up hooks. + $this->init(); + } + + /** + * Set up WordPress filters to hook into WP's update process. + * + * @uses add_filter() + * + * @return void + */ + public function init() { + + add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) ); + add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 ); + add_action( 'after_plugin_row', array( $this, 'show_update_notification' ), 10, 2 ); + add_action( 'admin_init', array( $this, 'show_changelog' ) ); + } + + /** + * Check for Updates at the defined API endpoint and modify the update array. + * + * This function dives into the update API just when WordPress creates its update array, + * then adds a custom API call and injects the custom plugin data retrieved from the API. + * It is reassembled from parts of the native WordPress plugin update code. + * See wp-includes/update.php line 121 for the original wp_update_plugins() function. + * + * @uses api_request() + * + * @param array $_transient_data Update array build by WordPress. + * @return array Modified update array with custom plugin data. + */ + public function check_update( $_transient_data ) { + + if ( ! is_object( $_transient_data ) ) { + $_transient_data = new stdClass(); + } + + if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) { + return $_transient_data; + } + + $current = $this->get_update_transient_data(); + if ( false !== $current && is_object( $current ) && isset( $current->new_version ) ) { + if ( version_compare( $this->version, $current->new_version, '<' ) ) { + $_transient_data->response[ $this->name ] = $current; + } else { + // Populating the no_update information is required to support auto-updates in WordPress 5.5. + $_transient_data->no_update[ $this->name ] = $current; + } + } + $_transient_data->last_checked = time(); + $_transient_data->checked[ $this->name ] = $this->version; + + return $_transient_data; + } + + /** + * Get repo API data from store. + * Save to cache. + * + * @return \stdClass + */ + public function get_repo_api_data() { + $version_info = $this->get_cached_version_info(); + + if ( false === $version_info ) { + $version_info = $this->api_request( + 'plugin_latest_version', + array( + 'slug' => $this->slug, + 'beta' => $this->beta, + ) + ); + if ( ! $version_info ) { + return false; + } + + // This is required for your plugin to support auto-updates in WordPress 5.5. + $version_info->plugin = $this->name; + $version_info->id = $this->name; + $version_info->tested = $this->get_tested_version( $version_info ); + if ( ! isset( $version_info->requires ) ) { + $version_info->requires = ''; + } + if ( ! isset( $version_info->requires_php ) ) { + $version_info->requires_php = ''; + } + + $this->set_version_info_cache( $version_info ); + } + + // Added by Polylang. + $defaults = array( + 'url' => '', + 'package' => '', + 'new_version' => '', + 'tested' => '', + 'requires' => '', + 'requires_php' => '', + 'icons' => new stdClass(), + 'banners' => new stdClass(), + ); + + $version_info = (object) array_merge( $defaults, (array) $version_info ); + // End of added by Polylang. + + return $version_info; + } + + /** + * Gets a limited set of data from the API response. + * This is used for the update_plugins transient. + * + * @since 3.8.12 + * @return \stdClass|false + */ + private function get_update_transient_data() { + $version_info = $this->get_repo_api_data(); + + if ( ! $version_info ) { + return false; + } + + $limited_data = new \stdClass(); + $limited_data->slug = $this->slug; + $limited_data->plugin = $this->name; + $limited_data->url = $version_info->url; + $limited_data->package = $version_info->package; + $limited_data->icons = $this->convert_object_to_array( $version_info->icons ); + $limited_data->banners = $this->convert_object_to_array( $version_info->banners ); + $limited_data->new_version = $version_info->new_version; + $limited_data->tested = $version_info->tested; + $limited_data->requires = $version_info->requires; + $limited_data->requires_php = $version_info->requires_php; + + return $limited_data; + } + + /** + * Gets the plugin's tested version. + * + * @since 1.9.2 + * @param object $version_info + * @return null|string + */ + private function get_tested_version( $version_info ) { + + // There is no tested version. + if ( empty( $version_info->tested ) ) { + return null; + } + + // Strip off extra version data so the result is x.y or x.y.z. + list( $current_wp_version ) = explode( '-', get_bloginfo( 'version' ) ); + + // The tested version is greater than or equal to the current WP version, no need to do anything. + if ( version_compare( $version_info->tested, $current_wp_version, '>=' ) ) { + return $version_info->tested; + } + $current_version_parts = explode( '.', $current_wp_version ); + $tested_parts = explode( '.', $version_info->tested ); + + // The current WordPress version is x.y.z, so update the tested version to match it. + if ( isset( $current_version_parts[2] ) && $current_version_parts[0] === $tested_parts[0] && $current_version_parts[1] === $tested_parts[1] ) { + $tested_parts[2] = $current_version_parts[2]; + } + + return implode( '.', $tested_parts ); + } + + /** + * Show the update notification on multisite subsites. + * + * @param string $file + * @param array $plugin + */ + public function show_update_notification( $file, $plugin ) { + + // Return early if in the network admin, or if this is not a multisite install. + if ( is_network_admin() || ! is_multisite() ) { + return; + } + + // Allow single site admins to see that an update is available. + if ( ! current_user_can( 'activate_plugins' ) ) { + return; + } + + if ( $this->name !== $file ) { + return; + } + + // Do not print any message if update does not exist. + $update_cache = get_site_transient( 'update_plugins' ); + + if ( ! isset( $update_cache->response[ $this->name ] ) ) { + if ( ! is_object( $update_cache ) ) { + $update_cache = new stdClass(); + } + $update_cache->response[ $this->name ] = $this->get_repo_api_data(); + } + + // Return early if this plugin isn't in the transient->response or if the site is running the current or newer version of the plugin. + if ( empty( $update_cache->response[ $this->name ] ) || version_compare( $this->version, $update_cache->response[ $this->name ]->new_version, '>=' ) ) { + return; + } + + printf( + '', + $this->slug, + $file, + in_array( $this->name, $this->get_active_plugins(), true ) ? 'active' : 'inactive' + ); + + echo ''; + echo '

'; + + $changelog_link = ''; + if ( ! empty( $update_cache->response[ $this->name ]->sections->changelog ) ) { + $changelog_link = add_query_arg( + array( + 'edd_sl_action' => 'view_plugin_changelog', + 'plugin' => urlencode( $this->name ), + 'slug' => urlencode( $this->slug ), + 'TB_iframe' => 'true', + 'width' => 77, + 'height' => 911, + ), + self_admin_url( 'index.php' ) + ); + } + $update_link = add_query_arg( + array( + 'action' => 'upgrade-plugin', + 'plugin' => urlencode( $this->name ), + ), + self_admin_url( 'update.php' ) + ); + + printf( + /* translators: the plugin name. */ + esc_html__( 'There is a new version of %1$s available.', 'polylang-pro' ), + esc_html( $plugin['Name'] ) + ); + + if ( ! current_user_can( 'update_plugins' ) ) { + echo ' '; + esc_html_e( 'Contact your network administrator to install the update.', 'polylang-pro' ); + } elseif ( empty( $update_cache->response[ $this->name ]->package ) && ! empty( $changelog_link ) ) { + echo ' '; + printf( + /* translators: 1. opening anchor tag, do not translate 2. the new plugin version 3. closing anchor tag, do not translate. */ + __( '%1$sView version %2$s details%3$s.', 'polylang-pro' ), + '', + esc_html( $update_cache->response[ $this->name ]->new_version ), + '' + ); + } elseif ( ! empty( $changelog_link ) ) { + echo ' '; + printf( + /* translators: 1. and 4. are opening anchor tags 2. the new plugin version 3. and 5. are closing anchor tags. */ + __( '%1$sView version %2$s details%3$s or %4$supdate now%5$s.', 'polylang-pro' ), + '', + esc_html( $update_cache->response[ $this->name ]->new_version ), + '', + '', + '' + ); + } else { + printf( + ' %1$s%2$s%3$s', + '', + esc_html__( 'Update now.', 'polylang-pro' ), + '' + ); + } + + do_action( "in_plugin_update_message-{$file}", $plugin, $plugin ); + + echo '

'; + } + + /** + * Gets the plugins active in a multisite network. + * + * @return array + */ + private function get_active_plugins() { + $active_plugins = (array) get_option( 'active_plugins' ); + $active_network_plugins = (array) get_site_option( 'active_sitewide_plugins' ); + + return array_merge( $active_plugins, array_keys( $active_network_plugins ) ); + } + + /** + * Updates information on the "View version x.x details" page with custom data. + * + * @uses api_request() + * + * @param mixed $_data + * @param string $_action + * @param object $_args + * @return object $_data + */ + public function plugins_api_filter( $_data, $_action = '', $_args = null ) { + + if ( 'plugin_information' !== $_action ) { + + return $_data; + + } + + if ( ! isset( $_args->slug ) || ( $_args->slug !== $this->slug ) ) { + + return $_data; + + } + + $to_send = array( + 'slug' => $this->slug, + 'is_ssl' => is_ssl(), + 'fields' => array( + 'banners' => array(), + 'reviews' => false, + 'icons' => array(), + ), + ); + + // Get the transient where we store the api request for this plugin for 24 hours + $edd_api_request_transient = $this->get_cached_version_info(); + + //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now. + if ( empty( $edd_api_request_transient ) ) { + + $api_response = $this->api_request( 'plugin_information', $to_send ); + if ( empty( $api_response ) ) { + return $_data; + } + + // Expires in 3 hours + $this->set_version_info_cache( $api_response ); + + $_data = $api_response; + } else { + $_data = $edd_api_request_transient; + } + + // Convert sections into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) { + $_data->sections = $this->convert_object_to_array( $_data->sections ); + } + + // Convert banners into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) { + $_data->banners = $this->convert_object_to_array( $_data->banners ); + } + + // Convert icons into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) { + $_data->icons = $this->convert_object_to_array( $_data->icons ); + } + + // Convert contributors into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->contributors ) && ! is_array( $_data->contributors ) ) { + $_data->contributors = $this->convert_object_to_array( $_data->contributors ); + } + + if ( ! isset( $_data->plugin ) ) { + $_data->plugin = $this->name; + } + + if ( ! isset( $_data->version ) && ! empty( $_data->new_version ) ) { + $_data->version = $_data->new_version; + } + + return $_data; + } + + /** + * Convert some objects to arrays when injecting data into the update API + * + * Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON + * decoding, they are objects. This method allows us to pass in the object and return an associative array. + * + * @since 3.6.5 + * + * @param stdClass $data + * + * @return array + */ + private function convert_object_to_array( $data ) { + if ( ! is_array( $data ) && ! is_object( $data ) ) { + return array(); + } + $new_data = array(); + foreach ( $data as $key => $value ) { + $new_data[ $key ] = is_object( $value ) ? $this->convert_object_to_array( $value ) : $value; + } + + return $new_data; + } + + /** + * Disable SSL verification in order to prevent download update failures + * + * @param array $args + * @param string $url + * @return object $array + */ + public function http_request_args( $args, $url ) { + + if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) { + $args['sslverify'] = $this->verify_ssl(); + } + return $args; + } + + /** + * Calls the API and, if successfull, returns the object delivered by the API. + * + * @uses get_bloginfo() + * @uses wp_remote_post() + * @uses is_wp_error() + * + * @param string $_action The requested action. + * @param array $_data Parameters for the API action. + * @return false|object|void + */ + private function api_request( $_action, $_data ) { + $data = array_merge( $this->api_data, $_data ); + + if ( $data['slug'] !== $this->slug ) { + return; + } + + // Don't allow a plugin to ping itself + if ( trailingslashit( home_url() ) === $this->api_url ) { + return false; + } + + if ( $this->request_recently_failed() ) { + return false; + } + + return $this->get_version_from_remote(); + } + + /** + * Determines if a request has recently failed. + * + * @since 1.9.1 + * + * @return bool + */ + private function request_recently_failed() { + $failed_request_details = get_option( $this->failed_request_cache_key ); + + // Request has never failed. + if ( empty( $failed_request_details ) || ! is_numeric( $failed_request_details ) ) { + return false; + } + + /* + * Request previously failed, but the timeout has expired. + * This means we're allowed to try again. + */ + if ( time() > $failed_request_details ) { + delete_option( $this->failed_request_cache_key ); + + return false; + } + + return true; + } + + /** + * Logs a failed HTTP request for this API URL. + * We set a timestamp for 1 hour from now. This prevents future API requests from being + * made to this domain for 1 hour. Once the timestamp is in the past, API requests + * will be allowed again. This way if the site is down for some reason we don't bombard + * it with failed API requests. + * + * @see EDD_SL_Plugin_Updater::request_recently_failed + * + * @since 1.9.1 + */ + private function log_failed_request() { + update_option( $this->failed_request_cache_key, strtotime( '+1 hour' ) ); + } + + /** + * If available, show the changelog for sites in a multisite install. + */ + public function show_changelog() { + + if ( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' !== $_REQUEST['edd_sl_action'] ) { + return; + } + + if ( empty( $_REQUEST['plugin'] ) ) { + return; + } + + if ( empty( $_REQUEST['slug'] ) || $this->slug !== $_REQUEST['slug'] ) { + return; + } + + if ( ! current_user_can( 'update_plugins' ) ) { + wp_die( esc_html__( 'You do not have permission to install plugin updates', 'polylang-pro' ), esc_html__( 'Error', 'polylang-pro' ), array( 'response' => 403 ) ); + } + + $version_info = $this->get_repo_api_data(); + if ( isset( $version_info->sections ) ) { + $sections = $this->convert_object_to_array( $version_info->sections ); + if ( ! empty( $sections['changelog'] ) ) { + echo '
' . wp_kses_post( $sections['changelog'] ) . '
'; + } + } + + exit; + } + + /** + * Gets the current version information from the remote site. + * + * @return array|false + */ + private function get_version_from_remote() { + $api_params = array( + 'edd_action' => 'get_version', + 'license' => ! empty( $this->api_data['license'] ) ? $this->api_data['license'] : '', + 'item_name' => isset( $this->api_data['item_name'] ) ? $this->api_data['item_name'] : false, + 'item_id' => isset( $this->api_data['item_id'] ) ? $this->api_data['item_id'] : false, + 'version' => isset( $this->api_data['version'] ) ? $this->api_data['version'] : false, + 'slug' => $this->slug, + 'author' => $this->api_data['author'], + 'url' => home_url(), + 'beta' => $this->beta, + 'php_version' => phpversion(), + 'wp_version' => get_bloginfo( 'version' ), + ); + + /** + * Filters the parameters sent in the API request. + * + * @param array $api_params The array of data sent in the request. + * @param array $this->api_data The array of data set up in the class constructor. + * @param string $this->plugin_file The full path and filename of the file. + */ + $api_params = apply_filters( 'edd_sl_plugin_updater_api_params', $api_params, $this->api_data, $this->plugin_file ); + + $request = wp_remote_post( + $this->api_url, + array( + 'timeout' => 15, + 'sslverify' => $this->verify_ssl(), + 'body' => $api_params, + ) + ); + + if ( is_wp_error( $request ) || ( 200 !== wp_remote_retrieve_response_code( $request ) ) ) { + $this->log_failed_request(); + + return false; + } + + $request = json_decode( wp_remote_retrieve_body( $request ) ); + + if ( $request && isset( $request->sections ) ) { + $request->sections = maybe_unserialize( $request->sections ); + } else { + $request = false; + } + + if ( $request && isset( $request->banners ) ) { + $request->banners = maybe_unserialize( $request->banners ); + } + + if ( $request && isset( $request->icons ) ) { + $request->icons = maybe_unserialize( $request->icons ); + } + + if ( ! empty( $request->sections ) ) { + foreach ( $request->sections as $key => $section ) { + $request->$key = (array) $section; + } + } + + return $request; + } + + /** + * Get the version info from the cache, if it exists. + * + * @param string $cache_key + * @return object + */ + public function get_cached_version_info( $cache_key = '' ) { + + if ( empty( $cache_key ) ) { + $cache_key = $this->get_cache_key(); + } + + $cache = get_option( $cache_key ); + + // Cache is expired + if ( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) { + return false; + } + + // We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point. + $cache['value'] = json_decode( $cache['value'] ); + if ( ! empty( $cache['value']->icons ) ) { + $cache['value']->icons = (array) $cache['value']->icons; + } + + return $cache['value']; + } + + /** + * Adds the plugin version information to the database. + * + * @param string $value + * @param string $cache_key + */ + public function set_version_info_cache( $value = '', $cache_key = '' ) { + + if ( empty( $cache_key ) ) { + $cache_key = $this->get_cache_key(); + } + + $data = array( + 'timeout' => strtotime( '+3 hours', time() ), + 'value' => wp_json_encode( $value ), + ); + + update_option( $cache_key, $data, 'no' ); + + // Delete the duplicate option + delete_option( 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ) ); + } + + /** + * Returns if the SSL of the store should be verified. + * + * @since 1.6.13 + * @return bool + */ + private function verify_ssl() { + return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this ); + } + + /** + * Gets the unique key (option name) for a plugin. + * + * @since 1.9.0 + * @return string + */ + private function get_cache_key() { + $string = $this->slug . $this->api_data['license'] . $this->beta; + + return 'edd_sl_' . md5( serialize( $string ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/License.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/License.php new file mode 100644 index 0000000..c5de4be --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/License.php @@ -0,0 +1,393 @@ +id = sanitize_title( $item_name ); + $this->file = $file; + $this->name = $item_name; + $this->version = $version; + + $licenses = (array) get_option( 'polylang_licenses', array() ); + $license = isset( $licenses[ $this->id ] ) && is_array( $licenses[ $this->id ] ) ? $licenses[ $this->id ] : array(); + $this->license_key = ! empty( $license['key'] ) ? (string) $license['key'] : ''; + + if ( ! empty( $license['data'] ) ) { + $this->license_data = (object) $license['data']; + } + + // Updater. + $this->auto_updater(); + + // Register settings. + add_filter( 'pll_settings_modules', array( $this, 'settings_module' ) ); + add_filter( 'pll_settings_licenses', array( $this, 'settings' ) ); + + // Weekly schedule. + if ( ! wp_next_scheduled( 'polylang_check_licenses' ) ) { + wp_schedule_event( time(), 'weekly', 'polylang_check_licenses' ); + } + + add_action( 'polylang_check_licenses', array( $this, 'check_license' ) ); + } + + /** + * Creates a new instance of the auto-updater. + * + * @since 1.0 + * + * @return void + */ + public function auto_updater(): void { + $args = array( + 'version' => $this->version, + 'license' => $this->license_key, + 'author' => $this->author, + 'item_name' => $this->name, + ); + + // Setup the updater. + new EDD_SL_Plugin_Updater( $this->api_url, $this->file, $args ); + } + + /** + * Registers the settings module. + * Hooked to `pll_settings_modules`. + * + * @since 1.0 + * + * @param string[] $modules The list of module classes. + * @return string[] + */ + public function settings_module( $modules ) { + /* + * Backward compatibility with Polylang < 3.7. + * Remove old license settings class to avoid duplicate. + */ + $modules = array_diff( $modules, array( 'PLL_Settings_Licenses' ) ); + + if ( empty( $modules['licenses'] ) ) { + $modules['licenses'] = Settings::class; + } + return $modules; + } + + /** + * Registers the licence in the Settings. + * Hooked to `pll_settings_licenses`. + * + * @since 1.0 + * + * @param License[] $items Array of objects allowing to manage a license. + * @return License[] + */ + public function settings( $items ) { + $items[ $this->id ] = $this; + return $items; + } + + /** + * Activates the license key. + * + * @since 1.0 + * + * @param string $license_key Activation key. + * @return self Updated License object. + */ + public function activate_license( + #[\SensitiveParameter] + string $license_key + ): self { + $this->license_key = $license_key; + $this->api_request( 'activate_license' ); + + // Tell WordPress to look for updates. + delete_site_transient( 'update_plugins' ); + return $this; + } + + + /** + * Deactivates the license key. + * + * @since 1.0 + * + * @return self Updated License object. + */ + public function deactivate_license(): self { + $this->api_request( 'deactivate_license' ); + return $this; + } + + /** + * Checks if the license key is valid. + * Hooked to `polylang_check_licenses`. + * + * @since 1.0 + * + * @return void + */ + public function check_license(): void { + $this->api_request( 'check_license' ); + } + + /** + * Sends an API request to check, activate or deactivate the license. + * Updates the licenses option according to the status. + * + * @since 1.0 + * + * @param string $request Type of request: check_license | activate_license | deactivate_license. + * @return void + * + * @phpstan-param 'check_license'|'activate_license'|'deactivate_license' $request + */ + private function api_request( string $request ): void { + $licenses = get_option( 'polylang_licenses' ); + + if ( is_array( $licenses ) ) { + unset( $licenses[ $this->id ] ); + } else { + $licenses = array(); + } + unset( $this->license_data ); + + if ( ! empty( $this->license_key ) ) { + // Data to send in our API request. + $api_params = array( + 'edd_action' => $request, + 'license' => $this->license_key, + 'item_name' => rawurlencode( $this->name ), + 'url' => home_url(), + ); + + // Call the API. + $response = wp_remote_post( + $this->api_url, + array( + 'timeout' => 3, + 'sslverify' => false, + 'body' => $api_params, + ) + ); + + // Update the option only if we got a response. + if ( is_wp_error( $response ) ) { + return; + } + + // Save new license info. + $licenses[ $this->id ] = array( 'key' => $this->license_key ); + + $data = (object) json_decode( wp_remote_retrieve_body( $response ) ); + + if ( isset( $data->license ) && 'deactivated' !== $data->license ) { + $licenses[ $this->id ]['data'] = $data; + $this->license_data = $data; + } + } + + update_option( 'polylang_licenses', $licenses ); // FIXME called multiple times when saving all licenses. + } + + /** + * Returns the HTML form field in a table row (one per license key) for display. + * + * @since 1.0 + * + * @return string + */ + public function get_form_field(): string { + if ( ! empty( $this->license_data ) ) { + $license = $this->license_data; + } + + $atts = array( + 'id' => $this->id, + 'name' => $this->name, + 'license_key' => $this->license_key, + 'row_class' => 'license-null', + 'button_text' => '', + 'message' => '', + ); + + if ( ! empty( $license ) && is_object( $license ) ) { + $now = time(); + $expiration = isset( $license->expires ) ? strtotime( $license->expires ) : false; + + // Special case: the license expired after the last check. + if ( $license->success && $expiration && $expiration < $now ) { + $license->success = false; + $license->error = 'expired'; + } + + if ( false === $license->success ) { + $atts['row_class'] = 'notice-error notice-alt'; + + if ( empty( $license->error ) && ! empty( $license->license ) ) { + $license->error = $license->license; + } + + switch ( $license->error ) { + case 'expired': + $atts['message'] = sprintf( + /* translators: %1$s is a date, %2$s is link start tag, %3$s is link end tag. */ + __( 'Your license key expired on %1$s. Please %2$srenew your license key%3$s.', 'polylang-pro' ), + date_i18n( get_option( 'date_format' ), $expiration ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + break; + + case 'disabled': + case 'revoked': + $atts['message'] = __( 'Your license key has been disabled.', 'polylang-pro' ); + break; + + case 'missing': + $atts['message'] = sprintf( + /* translators: %1$s is link start tag, %2$s is link end tag. */ + __( 'Invalid license. Please %1$svisit your account page%2$s and verify it.', 'polylang-pro' ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + break; + + case 'invalid': + case 'site_inactive': + $atts['message'] = sprintf( + /* translators: %1$s is a product name, %2$s is link start tag, %3$s is link end tag. */ + __( 'Your %1$s license key is not active for this URL. Please %2$svisit your account page%3$s to manage your license key URLs.', 'polylang-pro' ), + $this->name, + sprintf( '', self::ACCOUNT_URL ), + '' + ); + break; + + case 'item_name_mismatch': + /* translators: %s is a product name */ + $atts['message'] = sprintf( __( 'This is not a %s license key.', 'polylang-pro' ), $this->name ); + break; + + case 'no_activations_left': + $atts['message'] = sprintf( + /* translators: %1$s is link start tag, %2$s is link end tag */ + __( 'Your license key has reached its activation limit. %1$sView possible upgrades%2$s now.', 'polylang-pro' ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + break; + } + } else { + $atts['row_class'] = 'license-valid'; + $atts['button_text'] = __( 'Deactivate', 'polylang-pro' ); + + if ( 'lifetime' === $license->expires ) { + $atts['message'] = __( 'The license key never expires.', 'polylang-pro' ); + } elseif ( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) { + $atts['row_class'] = 'notice-warning notice-alt'; + $atts['message'] = sprintf( + /* translators: %1$s is a date, %2$s is link start tag, %3$s is link end tag. */ + __( 'Your license key will expire soon! Precisely, it will expire on %1$s. %2$sRenew your license key today!%3$s', 'polylang-pro' ), + date_i18n( get_option( 'date_format' ), $expiration ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + } else { + $atts['message'] = sprintf( + /* translators: %s is a date */ + __( 'Your license key expires on %s.', 'polylang-pro' ), + date_i18n( get_option( 'date_format' ), $expiration ) + ); + } + } + } + + ob_start(); + include __DIR__ . '/views/view-field-row.php'; + return (string) ob_get_clean(); + } +} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Settings.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Settings.php new file mode 100644 index 0000000..e4526c9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Settings.php @@ -0,0 +1,198 @@ + 'licenses', + 'title' => __( 'License keys', 'polylang-pro' ), + 'description' => __( 'Manage licenses for Polylang Pro and add-ons.', 'polylang-pro' ), + ) + ); + + $this->buttons['cancel'] = sprintf( '', __( 'Close', 'polylang-pro' ) ); + + $this->hooks(); + + /* + * Useless because replaced by the following hook, so let's remove it so it doesn't clutter + * the global `$wp_filter`. + */ + remove_action( 'wp_ajax_pll_save_options', array( $this, 'save_options' ) ); + + /* + * Before `PLL_Settings_Module::save_options()`, to ensure that our response to + * ajax action is executed and not the Polylang legacy licenses system. + */ + add_action( 'wp_ajax_pll_save_options', array( $this, 'save_options' ), 5 ); + + add_action( 'wp_ajax_' . self::GET_LICENSES_DATA_ACTION, array( $this, 'display_licenses' ) ); + } + + /** + * Tells if the module is active. + * + * @since 1.0 + * + * @return bool + */ + public function is_active(): bool { + return ! empty( $this->get_licenses() ); + } + + /** + * Displays the settings form. + * + * @since 1.0 + */ + protected function form(): void { + if ( ! $this->is_active() ) { + return; + } + + $atts = array( + 'action' => self::GET_LICENSES_DATA_ACTION, + 'nonce' => wp_create_nonce( self::GET_LICENSES_DATA_ACTION ), + ); + + include __DIR__ . '/views/view-settings-licenses.php'; + } + + /** + * Ajax method to save the license keys and activate the licenses at the same time. + * Overrides the parent's method. + * + * @since 1.0 + * + * @return void + */ + public function save_options(): void { + check_ajax_referer( 'pll_options', '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( ! isset( $_POST['module'] ) || $this->module !== $_POST['module'] || empty( $_POST['licenses'] ) ) { + return; + } + + $response = new WP_Ajax_Response(); + $what = 'success'; + + foreach ( $this->get_licenses() as $item ) { + if ( ! isset( $_POST['licenses'][ $item->id ] ) ) { + continue; + } + + $updated_item = $item->activate_license( sanitize_key( $_POST['licenses'][ $item->id ] ) ); + $response->Add( + array( + 'what' => 'pllu-license-update', + 'data' => $item->id, + 'supplemental' => array( 'html' => $updated_item->get_form_field() ), + ) + ); + + if ( empty( $updated_item->license_data->success ) ) { + $what = 'error'; + } + } + + // Updated message. + pll_add_notice( new WP_Error( 'settings_updated', __( 'Settings saved.', 'polylang-pro' ), 'success' ) ); + + ob_start(); + settings_errors( 'polylang' ); + $response->Add( + array( + 'what' => $what, + 'data' => (string) ob_get_clean(), + ) + ); + $response->send(); + } + + /** + * Ajax method to display licenses with their data (deactivation, expiration date). + * Hooked to `wp_ajax_pllu_get_licenses_data`. + * + * @since 1.0 + * + * @return void + * + * @phpstan-return never + */ + public function display_licenses(): void { + check_ajax_referer( self::GET_LICENSES_DATA_ACTION, '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + $rows = array(); + foreach ( $this->get_licenses() as $license ) { + $license->check_license(); // Get the license information from the server to ensure it's up to date. + $rows[] = $license->get_form_field(); + } + + wp_send_json_success( + array( + 'row' => $rows, + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Translations.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Translations.php new file mode 100644 index 0000000..74062c0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Translations.php @@ -0,0 +1,250 @@ +slug = $slug; + + add_action( 'init', array( self::class, 'register_clean_translations_cache' ), 9999 ); + add_filter( 'translations_api', array( $this, 'translations_api' ), 10, 3 ); + add_filter( 'site_transient_update_plugins', array( $this, 'site_transient_update_plugins' ) ); + } + + /** + * Short-circuits translations API requests for private projects. + * Hooked to `translations_api`. + * + * @since 1.0 + * + * @param bool|array $result The result object. Default false. + * @param string $requested_type The type of translations being requested. + * @param object $args Translation API arguments. + * @return bool|array + */ + public function translations_api( $result, $requested_type, $args ) { + $args = (array) $args; // The type of this param ins not clear in WP (object|array|null). + if ( 'plugins' === $requested_type && $this->slug === $args['slug'] ) { + return self::get_translations( $args['slug'] ); + } + + return $result; + } + + /** + * Filters the translations transients to include the private plugin. + * Hooked to `site_transient_update_plugins`. + * + * @see wp_get_translation_updates(). + * + * @since 1.0 + * + * @param stdClass|false $value The transient value. + * @return stdClass|false + */ + public function site_transient_update_plugins( $value ) { + if ( ! $value instanceof stdClass ) { + $value = new stdClass(); + } + + if ( ! isset( $value->translations ) ) { + $value->translations = array(); + } + + $translations = self::get_translations( $this->slug ); + + if ( ! isset( $translations['translations'] ) ) { + return $value; + } + + $installed_translations = self::get_installed_translations(); + + foreach ( (array) $translations['translations'] as $translation ) { + if ( in_array( $translation['language'], self::get_available_languages(), true ) ) { + if ( isset( $installed_translations[ $this->slug ][ $translation['language'] ] ) && $translation['updated'] ) { + $local = new DateTime( $installed_translations[ $this->slug ][ $translation['language'] ]['PO-Revision-Date'] ); + $remote = new DateTime( $translation['updated'] ); + + if ( $local >= $remote ) { + continue; + } + } + + $translation['type'] = 'plugin'; + $translation['slug'] = $this->slug; + + $value->translations[] = $translation; + } + } + + return $value; + } + + /** + * Registers actions for clearing translation caches. + * Hooked to `init`. + * + * @since 1.0 + * + * @return void + */ + public static function register_clean_translations_cache(): void { + add_action( 'set_site_transient_update_plugins', array( self::class, 'clean_translations_cache' ) ); + add_action( 'delete_site_transient_update_plugins', array( self::class, 'clean_translations_cache' ) ); + } + + /** + * Clears existing translation cache. + * + * @since 1.0 + * + * @return void + */ + public static function clean_translations_cache(): void { + $translations = get_site_transient( self::TRANSIENT_KEY ); + + if ( ! is_object( $translations ) ) { + return; + } + + /* + * Don't delete the cache if the transient gets changed multiple times + * during a single request. Set cache lifetime to maximum 15 seconds. + */ + $cache_lifespan = 15; + $time_not_changed = isset( $translations->_last_checked ) && ( time() - $translations->_last_checked ) > $cache_lifespan; + + if ( ! $time_not_changed ) { + return; + } + + delete_site_transient( self::TRANSIENT_KEY ); + } + + /** + * Returns the translations for a given project. + * + * @since 1.0 + * + * @param string $slug Project directory slug. + * @return array Translation data. + */ + private static function get_translations( string $slug ): array { + $translations = get_site_transient( self::TRANSIENT_KEY ); + + if ( ! $translations instanceof stdClass ) { + $translations = new stdClass(); + } + + if ( isset( $translations->{$slug} ) && is_array( $translations->{$slug} ) ) { + return $translations->{$slug}; + } + + $translations = json_decode( wp_remote_retrieve_body( wp_remote_get( self::API_URL, array( 'timeout' => 3 ) ) ), true ); + + if ( is_array( $translations ) ) { + $translations = (object) $translations; + } else { + $translations = new stdClass(); + } + + $translations->_last_checked = time(); + + set_site_transient( self::TRANSIENT_KEY, $translations ); + + if ( isset( $translations->{$slug} ) && is_array( $translations->{$slug} ) ) { + return $translations->{$slug}; + } + + return array(); + } + + /** + * Returns installed translations. + * + * Used to cache the result of `wp_get_installed_translations()` as it is very expensive. + * + * @since 1.0 + * + * @return array + */ + private static function get_installed_translations(): array { + if ( null === self::$installed_translations ) { + self::$installed_translations = wp_get_installed_translations( 'plugins' ); + } + return self::$installed_translations; + } + + /** + * Returns available languages. + * + * Used to cache the result of `get_available_languages()` as it is very expensive. + * + * @since 1.0 + * + * @return array + */ + private static function get_available_languages(): array { + if ( null === self::$available_languages ) { + self::$available_languages = (array) get_available_languages(); + } + return self::$available_languages; + } +} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Updater.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Updater.php new file mode 100644 index 0000000..73cc485 --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Updater.php @@ -0,0 +1,83 @@ +license = new License( $file, $name, $version ); + $this->translations = new Translations( $text_domain ); + add_action( 'pll_init', array( $this, 'load_wizard' ) ); + } + + /** + * Loads the wizard's step. + * + * @since 1.0 + * + * @param PLL_Base $polylang Polylang object. + * @return void + */ + public function load_wizard( $polylang ): void { + if ( ! empty( $polylang->wizard ) ) { + $this->wizard_licenses_step = new Wizard_Licenses_Step( $polylang->wizard ); + } + } + + /** + * Returns the updater version. + * + * @since 1.0 + * + * @return string + */ + public static function get_version(): string { + // Cache the version to avoid reading the file multiple times. + static $version = null; + + if ( null === $version ) { + $version = require __DIR__ . '/../version.php'; + } + + return $version; + } +} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Wizard_Licenses_Step.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Wizard_Licenses_Step.php new file mode 100644 index 0000000..f5b7d15 --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/Wizard_Licenses_Step.php @@ -0,0 +1,177 @@ + + */ +class Wizard_Licenses_Step { + use Common_Trait; + + /** + * Name of the action to create the nonce required to deactivate a license. + * + * @since 1.0 + * + * @var string + */ + const DEACTIVATE_LICENSE_NONCE_ACTION = 'pll-wizard'; + + /** + * Instance of the wizard. + * + * @var PLL_Wizard + */ + private $wizard; + + /** + * Constructor. + * + * @since 1.0 + * + * @param PLL_Wizard $wizard Instance of the wizard. + */ + public function __construct( PLL_Wizard $wizard ) { + $this->wizard = $wizard; + + add_filter( 'pll_wizard_steps', array( $this, 'add' ), 101 ); // After `PLL_Wizard::add_step_licenses()`, so this can override it. + } + + /** + * Adds licenses step to the wizard. + * + * @since 1.0 + * + * @param array $steps List of steps. + * @return array List of steps updated. + * + * @phpstan-param Steps $steps + * @phpstan-return Steps + */ + public function add( $steps ) { + if ( isset( $steps['licenses']['view'] ) && is_array( $steps['licenses']['view'] ) && isset( $steps['licenses']['view'][0] ) ) { + $first_step = $steps['licenses']['view'][0]; + if ( $first_step instanceof self ) { + // No need to execute this several times. + return $steps; + } + if ( $first_step instanceof PLL_Wizard ) { + // Remove the old system, so we don't send 2 AJAX requests for the same action (deactivate license). + remove_action( 'wp_ajax_pll_deactivate_license', array( $first_step, 'deactivate_license' ) ); + wp_dequeue_script( 'pll_settings' ); + } + } + + $this->hooks(); + + if ( ! empty( $this->get_licenses() ) ) { + $steps['licenses'] = array( + 'name' => esc_html__( 'Licenses', 'polylang-pro' ), + 'view' => array( $this, 'display' ), + 'handler' => array( $this, 'save' ), + 'scripts' => array( 'pll_license' ), + 'styles' => array( 'pll_license' ), + ); + } + + return $steps; + } + + /** + * Displays the languages step form. + * + * @since 1.0 + * + * @return void + */ + public function display(): void { + $atts = array( + 'license_rows' => array(), + 'is_error' => isset( $_GET['activate_error'] ) && 'i18n_license_key_error' === sanitize_key( $_GET['activate_error'] ), // phpcs:ignore WordPress.Security.NonceVerification.Recommended + ); + foreach ( $this->get_licenses() as $license ) { + $atts['license_rows'][] = $license->get_form_field(); + } + + include __DIR__ . '/views/view-wizard-step-licenses.php'; + } + + /** + * Executes the languages step. + * + * @since 1.0 + * + * @return void + * + * @phpstan-return never + */ + public function save(): void { + // User capabilities verified in `PLL_Wizard::setup_wizard_page()`. + check_admin_referer( 'pll-wizard', '_pll_nonce' ); + + $redirect = $this->wizard->get_next_step_link(); + + foreach ( $this->get_licenses() as $license ) { + if ( ! isset( $_POST['licenses'][ $license->id ] ) ) { + continue; + } + + $updated_license = $license->activate_license( sanitize_key( $_POST['licenses'][ $license->id ] ) ); + + if ( empty( $updated_license->license_data ) || false !== $updated_license->license_data->success ) { + // Success. + continue; + } + + // Stay on this step with an error. + $redirect = add_query_arg( + array( + 'step' => $this->get_current_step(), + 'activate_error' => 'i18n_license_key_error', + ) + ); + } + + wp_safe_redirect( sanitize_url( $redirect ) ); + exit; + } + + /** + * Returns the current step. + * + * @since 1.0 + * @see PLL_Wizard::setup_wizard_page() + * + * @return string + */ + private function get_current_step(): string { + /** This filter is documented in `PLL_Wizard::setup_wizard_page()`. */ + $steps = apply_filters( 'pll_wizard_steps', array() ); + $step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification + + // @phpstan-var non-empty-array $steps + // @phpstan-var string|false $step + return $step && array_key_exists( $step, $steps ) ? $step : key( $steps ); + } +} diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-field-row.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-field-row.php new file mode 100644 index 0000000..67f47b4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-field-row.php @@ -0,0 +1,51 @@ + array( + 'href' => array( + 'values' => array( License::ACCOUNT_URL ), + ), + 'target' => true, + ), +); + +?> + + + + + + +

+ + diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-settings-licenses.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-settings-licenses.php new file mode 100644 index 0000000..c1cf29d --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-settings-licenses.php @@ -0,0 +1,18 @@ + +
diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-wizard-step-licenses.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-wizard-step-licenses.php new file mode 100644 index 0000000..da9767c --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/src/views/view-wizard-step-licenses.php @@ -0,0 +1,37 @@ + +

+ + +

+

+
+ +

+ +
+
+ + + + +
+
diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/uninstall.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/uninstall.php new file mode 100644 index 0000000..20735ee --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/uninstall.php @@ -0,0 +1,15 @@ +query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'edd\_sl\_%'" ); diff --git a/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/version.php b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/version.php new file mode 100644 index 0000000..1db9c73 --- /dev/null +++ b/wp-content/plugins/polylang-pro/dependencies/wpsyntex/updater/version.php @@ -0,0 +1,8 @@ + { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 631 +(module) { + +module.exports = (function() { return this["wp"]["apiFetch"]; }()); + +/***/ } + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. +(() => { +"use strict"; + +;// ./vendor/wpsyntex/polylang/js/src/lib/confirmation-modal.js +/** + * @package Polylang + */ + +const languagesList = jQuery('.post_lang_choice'); + +// Dialog box for alerting the user about a risky changing. +const initializeConfirmationModal = () => { + // We can't use underscore or lodash in this common code because it depends of the context classic or block editor. + // Classic editor underscore is loaded, Block editor lodash is loaded. + const { + __ + } = wp.i18n; + + // Create dialog container. + const dialogContainer = jQuery('
', { + id: 'pll-dialog', + style: 'display:none;' + }).text(__('Are you sure you want to change the language of the current content?', 'polylang')); + + // Put it after languages list dropdown. + // PHPCS ignore dialogContainer is a new safe HTML code generated above. + languagesList.after(dialogContainer); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.after + + const dialogResult = new Promise((confirm, cancel) => { + const confirmDialog = what => { + // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + switch (what) { + // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + case 'yes': + // Confirm the new language. + languagesList.data('old-value', languagesList.children(':selected').first().val()); + confirm(); + break; + case 'no': + // Revert to the old language. + languagesList.val(languagesList.data('old-value')); + cancel('Cancel'); + break; + } + dialogContainer.dialog('close'); // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + }; // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + + // Initialize dialog box in the case a language is selected but not added in the list. + const dialogOptions = { + autoOpen: false, + modal: true, + draggable: false, + resizable: false, + title: __('Change language', 'polylang'), + minWidth: 600, + maxWidth: '100%', + open: function (event, ui) { + // Change dialog box position for rtl language + if (jQuery('body').hasClass('rtl')) { + jQuery(this).parent().css({ + right: jQuery(this).parent().css('left'), + left: 'auto' + }); + } + }, + close: function (event, ui) { + // When we're closing the dialog box we need to cancel the language change as we click on Cancel button. + confirmDialog('no'); + }, + buttons: [{ + text: __('OK', 'polylang'), + click: function (event) { + confirmDialog('yes'); + } + }, { + text: __('Cancel', 'polylang'), + click: function (event) { + confirmDialog('no'); + } + }] + }; + if (jQuery.ui.version >= '1.12.0') { + Object.assign(dialogOptions, { + classes: { + 'ui-dialog': 'pll-confirmation-modal' + } + }); + } else { + Object.assign(dialogOptions, { + dialogClass: 'pll-confirmation-modal' + }); // jQuery UI 1.11.4 - WP < 5.6 + } + dialogContainer.dialog(dialogOptions); + }); + return { + dialogContainer, + dialogResult + }; +}; +const initializeLanguageOldValue = () => { + // Keep the old language value to be able to compare to the new one and revert to it if necessary. + languagesList.attr('data-old-value', languagesList.children(':selected').first().val()); +}; +;// ./vendor/wpsyntex/polylang/js/src/lib/metabox-autocomplete.js +/** + * @package Polylang + */ + +// Translations autocomplete input box. +function initMetaboxAutoComplete() { + jQuery('.tr_lang').each(function () { + var tr_lang = jQuery(this).attr('id').substring(8); + var td = jQuery(this).parent().parent().siblings('.pll-edit-column'); + jQuery(this).autocomplete({ + minLength: 0, + source: ajaxurl + '?action=pll_posts_not_translated' + '&post_language=' + jQuery('.post_lang_choice').val() + '&translation_language=' + tr_lang + '&post_type=' + jQuery('#post_type').val() + '&_pll_nonce=' + jQuery('#_pll_nonce').val(), + select: function (event, ui) { + jQuery('#htr_lang_' + tr_lang).val(ui.item.id); + // ui.item.link is built and come from server side and is well escaped when necessary + td.html(ui.item.link); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + } + }); + + // when the input box is emptied + jQuery(this).on('blur', function () { + if (!jQuery(this).val()) { + jQuery('#htr_lang_' + tr_lang).val(0); + // Value is retrieved from HTML already generated server side + td.html(td.siblings('.hidden').children().clone()); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + } + }); + }); +} +// EXTERNAL MODULE: external {"this":["wp","apiFetch"]} +var external_this_wp_apiFetch_ = __webpack_require__(631); +var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_); +;// ./node_modules/@wpsyntex/polylang-react-library/build/middlewares/filter-path.js +/** + * Filters requests for translatable entities. + * This logic is shared across all Polylang plugins. + * + * @since 3.5 + * + * @param {Object} options - API fetch options object. + * @param {Array} filteredRoutes - Array of route paths to filter. + * @param {Function} filter - Function to filter matching routes. + * @return {Object} Modified REST request options. + */ +const filterPathMiddleware = (options, filteredRoutes, filter) => { + const cleanPath = options.path.split('?')[0].replace(/^\/+|\/+$/g, ''); // Get path without query parameters and trim '/'. + + return Object.values(filteredRoutes).find(path => cleanPath === path) ? filter(options) : options; +}; +/* harmony default export */ const filter_path = (filterPathMiddleware); +;// ./node_modules/@wpsyntex/polylang-react-library/build/middlewares/editors-requests-filter.js +/** + * WordPress dependencies. + */ + + +/* + * Internal dependencies. + */ + + +/** + * Safely filters requests for translatable entities in block editor type screens. + * Ensures that `pllFilteredRoutes` has been well defined on server side and + * that the filtered request is a REST one. + * + * @param {Function} filterCallback - Function to filter API fetch options. + */ +const editorsRequestsFilter = filterCallback => { + external_this_wp_apiFetch_default().use((options, next) => { + /* + * If options.url is defined, this is not a REST request but a direct call to post.php for legacy metaboxes. + * If `filteredRoutes` is not defined, return early. + */ + if ('undefined' !== typeof options.url || 'undefined' === typeof window.pllFilteredRoutes) { + return next(options); + } + return next(filter_path(options, window.pllFilteredRoutes, filterCallback)); + }); +}; +/* harmony default export */ const editors_requests_filter = (editorsRequestsFilter); +;// ./vendor/wpsyntex/polylang/js/src/block-editor.js +/** + * @package Polylang + */ + + + + + +/** + * Gets the language of the currently edited post, fallback to default language if none is found. + * + * @since 2.5 + * + * @return {Element.value} + */ +function getCurrentLanguage() { + const lang = document.querySelector('[name=post_lang_choice]'); + if (null === lang) { + return pllDefaultLanguage; + } + return lang.value; +} + +/** + * Adds language parameter according to the current one (query string for GET, body for PUT and POST). + * + * @since 3.5 + * + * @param {APIFetchOptions} options + * @returns {APIFetchOptions} + */ +function addLanguageParameter(options) { + if ('undefined' === typeof options.data || null === options.data) { + // GET + options.path += (options.path.indexOf('?') >= 0 ? '&lang=' : '?lang=') + getCurrentLanguage(); + } else { + // PUT, POST + options.data.lang = getCurrentLanguage(); + } + return options; +} + +/** + * Filter REST API requests to add the language in the request + * + * @since 2.5 + */ +editors_requests_filter(addLanguageParameter); + +/** + * Handles internals of the metabox: + * Language select, autocomplete input field. + * + * @since 1.5 + * + * Save post after lang choice is done and redirect to the same page for refreshing all the data. + * + * @since 2.5 + * + * Link post saving after refreshing the metabox. + * + * @since 3.0 + */ +jQuery(function ($) { + // Initialize current language to be able to compare if it changes. + initializeLanguageOldValue(); + + // Ajax for changing the post's language in the languages metabox + $('.post_lang_choice').on('change', function (event) { + const { + select, + dispatch, + subscribe + } = wp.data; + const emptyPost = isEmptyPost(); + const { + addQueryArgs + } = wp.url; + + // Initialize the confirmation dialog box. + const confirmationModal = initializeConfirmationModal(); + const { + dialogContainer: dialog + } = confirmationModal; + let { + dialogResult + } = confirmationModal; + const selectedOption = event.target; // The selected option in the dropdown list. + + // Specific case for empty posts. + // Place at the beginning because window.location change triggers automatically page reloading. + if (location.pathname.match(/post-new.php/gi) && emptyPost) { + reloadPageForEmptyPost(selectedOption.value); + } + + // Otherwise send an ajax request to refresh the legacy metabox and set the post language with the new language. + // It needs a confirmation of the user before changing the language. + // Need to wait the ajax response before triggering the block editor post save action. + if ($(this).data('old-value') !== selectedOption.value && !emptyPost) { + dialog.dialog('open'); + } else { + // Update the old language with the new one to be able to compare it in the next change. + // Because the page isn't reloaded in this case. + initializeLanguageOldValue(); + dialogResult = Promise.resolve(); + } + dialogResult.then(() => { + let data = { + // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + action: 'post_lang_choice', + lang: selectedOption.value, + post_type: $('#post_type').val(), + post_id: $('#post_ID').val(), + _pll_nonce: $('#_pll_nonce').val() + }; + + // Update post language in database as soon as possible. + // Because, in addition of the block editor save process, the legacy metabox uses a post.php process to update the language and is too late compared to the page reload. + $.post(ajaxurl, data, function () { + blockEditorSavePostAndReloadPage(); + }); + }, () => {} // Do nothing when promise is rejected by clicking the Cancel dialog button. + ); + function isEmptyPost() { + const editor = select('core/editor'); + return !editor.getEditedPostAttribute('title')?.trim() && !editor.getEditedPostContent() && !editor.getEditedPostAttribute('excerpt')?.trim(); + } + + /** + * Reload the block editor page for empty posts. + * + * @param {string} lang The target language code. + */ + function reloadPageForEmptyPost(lang) { + // Change the new_lang parameter with the new language value for reloading the page + // WPCS location.search is never written in the page, just used to reload page with the right value of new_lang + // new_lang input is controlled server side in PHP. The value come from the dropdown list of language returned and escaped server side. + // Notice that window.location changing triggers automatically page reloading. + if (-1 != location.search.indexOf('new_lang')) { + // use regexp non capturing group to replace new_lang parameter no matter where it is and capture other parameters which can be behind it + window.location.search = window.location.search.replace(/(?:new_lang=[^&]*)(&)?(.*)/, 'new_lang=' + lang + '$1$2'); // phpcs:ignore WordPressVIPMinimum.JS.Window.location, WordPressVIPMinimum.JS.Window.VarAssignment + } else { + window.location.search = window.location.search + (-1 != window.location.search.indexOf('?') ? '&' : '?') + 'new_lang=' + lang; // phpcs:ignore WordPressVIPMinimum.JS.Window.location, WordPressVIPMinimum.JS.Window.VarAssignment + } + } + ; + + /** + * Triggers block editor post save and reload the block editor page when everything is ok. + */ + function blockEditorSavePostAndReloadPage() { + let unsubscribe = null; + const previousPost = select('core/editor').getCurrentPost(); + + // Listen if the savePost is completely done by subscribing to its events. + const savePostIsDone = new Promise(function (resolve, reject) { + unsubscribe = subscribe(function () { + const post = select('core/editor').getCurrentPost(); + const { + id, + status, + type + } = post; + const error = select('core').getLastEntitySaveError('postType', type, id); + if (error) { + reject(); + } + if (previousPost.modified !== post.modified) { + if (location.pathname.match(/post-new.php/gi) && status !== 'auto-draft' && id) { + window.history.replaceState({ + id + }, 'Post ' + id, addQueryArgs('post.php', { + post: id, + action: 'edit' + })); + } + resolve(); + } + }); + }); + + // Triggers the post save. + dispatch('core/editor').savePost(); + + // Process + savePostIsDone.then(function () { + // If the post is well saved, we can reload the page + window.location.reload(); + }, function () { + // If the post save failed + unsubscribe(); + }).catch(function () { + // If an exception is thrown + unsubscribe(); + }); + } + ; + }); + initMetaboxAutoComplete(); +}); +})(); + +this["polylang-pro"] = __webpack_exports__; +/******/ })() +; \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/block-editor.min.js b/wp-content/plugins/polylang-pro/js/build/block-editor.min.js new file mode 100644 index 0000000..4410ff3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/block-editor.min.js @@ -0,0 +1 @@ +(()=>{var t={631(t){t.exports=function(){return this.wp.apiFetch}()}},e={};function n(o){var a=e[o];if(void 0!==a)return a.exports;var l=e[o]={exports:{}};return t[o](l,l.exports,n),l.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);(()=>{"use strict";const t=jQuery(".post_lang_choice"),e=()=>{const{__:e}=wp.i18n,n=jQuery("
",{id:"pll-dialog",style:"display:none;"}).text(e("Are you sure you want to change the language of the current content?","polylang"));t.after(n);const o=new Promise(((o,a)=>{const l=e=>{switch(e){case"yes":t.data("old-value",t.children(":selected").first().val()),o();break;case"no":t.val(t.data("old-value")),a("Cancel")}n.dialog("close")},i={autoOpen:!1,modal:!0,draggable:!1,resizable:!1,title:e("Change language","polylang"),minWidth:600,maxWidth:"100%",open:function(t,e){jQuery("body").hasClass("rtl")&&jQuery(this).parent().css({right:jQuery(this).parent().css("left"),left:"auto"})},close:function(t,e){l("no")},buttons:[{text:e("OK","polylang"),click:function(t){l("yes")}},{text:e("Cancel","polylang"),click:function(t){l("no")}}]};jQuery.ui.version>="1.12.0"?Object.assign(i,{classes:{"ui-dialog":"pll-confirmation-modal"}}):Object.assign(i,{dialogClass:"pll-confirmation-modal"}),n.dialog(i)}));return{dialogContainer:n,dialogResult:o}},o=()=>{t.attr("data-old-value",t.children(":selected").first().val())};var a=n(631),l=n.n(a);const i=(t,e,n)=>{const o=t.path.split("?")[0].replace(/^\/+|\/+$/g,"");return Object.values(e).find((t=>o===t))?n(t):t};function r(){const t=document.querySelector("[name=post_lang_choice]");return null===t?pllDefaultLanguage:t.value}(t=>{l().use(((e,n)=>void 0!==e.url||void 0===window.pllFilteredRoutes?n(e):n(i(e,window.pllFilteredRoutes,t))))})((function(t){return void 0===t.data||null===t.data?t.path+=(t.path.indexOf("?")>=0?"&lang=":"?lang=")+r():t.data.lang=r(),t})),jQuery((function(t){o(),t(".post_lang_choice").on("change",(function(n){const{select:a,dispatch:l,subscribe:i}=wp.data,r=function(){const t=a("core/editor");return!t.getEditedPostAttribute("title")?.trim()&&!t.getEditedPostContent()&&!t.getEditedPostAttribute("excerpt")?.trim()}(),{addQueryArgs:s}=wp.url,c=e(),{dialogContainer:u}=c;let{dialogResult:d}=c;const p=n.target;var g;location.pathname.match(/post-new.php/gi)&&r&&(g=p.value,-1!=location.search.indexOf("new_lang")?window.location.search=window.location.search.replace(/(?:new_lang=[^&]*)(&)?(.*)/,"new_lang="+g+"$1$2"):window.location.search=window.location.search+(-1!=window.location.search.indexOf("?")?"&":"?")+"new_lang="+g),t(this).data("old-value")===p.value||r?(o(),d=Promise.resolve()):u.dialog("open"),d.then((()=>{let e={action:"post_lang_choice",lang:p.value,post_type:t("#post_type").val(),post_id:t("#post_ID").val(),_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,e,(function(){!function(){let t=null;const e=a("core/editor").getCurrentPost(),n=new Promise((function(n,o){t=i((function(){const t=a("core/editor").getCurrentPost(),{id:l,status:i,type:r}=t;a("core").getLastEntitySaveError("postType",r,l)&&o(),e.modified!==t.modified&&(location.pathname.match(/post-new.php/gi)&&"auto-draft"!==i&&l&&window.history.replaceState({id:l},"Post "+l,s("post.php",{post:l,action:"edit"})),n())}))}));l("core/editor").savePost(),n.then((function(){window.location.reload()}),(function(){t()})).catch((function(){t()}))}()}))}),(()=>{}))})),jQuery(".tr_lang").each((function(){var t=jQuery(this).attr("id").substring(8),e=jQuery(this).parent().parent().siblings(".pll-edit-column");jQuery(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_posts_not_translated&post_language="+jQuery(".post_lang_choice").val()+"&translation_language="+t+"&post_type="+jQuery("#post_type").val()+"&_pll_nonce="+jQuery("#_pll_nonce").val(),select:function(n,o){jQuery("#htr_lang_"+t).val(o.item.id),e.html(o.item.link)}}),jQuery(this).on("blur",(function(){jQuery(this).val()||(jQuery("#htr_lang_"+t).val(0),e.html(e.siblings(".hidden").children().clone()))}))}))}))})(),this["polylang-pro"]={}})(); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/blocks.js b/wp-content/plugins/polylang-pro/js/build/blocks.js new file mode 100644 index 0000000..24a933c --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/blocks.js @@ -0,0 +1,1010 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 20 +(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var f=__webpack_require__(677),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0}; +function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q; + + +/***/ }, + +/***/ 848 +(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(20); +} else // removed by dead control flow +{} + + +/***/ }, + +/***/ 677 +(module) { + +module.exports = (function() { return this["React"]; }()); + +/***/ }, + +/***/ 419 +(module) { + +module.exports = (function() { return this["lodash"]; }()); + +/***/ }, + +/***/ 631 +(module) { + +module.exports = (function() { return this["wp"]["apiFetch"]; }()); + +/***/ }, + +/***/ 89 +(module) { + +module.exports = (function() { return this["wp"]["blockEditor"]; }()); + +/***/ }, + +/***/ 545 +(module) { + +module.exports = (function() { return this["wp"]["blocks"]; }()); + +/***/ }, + +/***/ 959 +(module) { + +module.exports = (function() { return this["wp"]["components"]; }()); + +/***/ }, + +/***/ 987 +(module) { + +module.exports = (function() { return this["wp"]["data"]; }()); + +/***/ }, + +/***/ 2 +(module) { + +module.exports = (function() { return this["wp"]["editor"]; }()); + +/***/ }, + +/***/ 601 +(module) { + +module.exports = (function() { return this["wp"]["element"]; }()); + +/***/ }, + +/***/ 873 +(module) { + +module.exports = (function() { return this["wp"]["hooks"]; }()); + +/***/ }, + +/***/ 75 +(module) { + +module.exports = (function() { return this["wp"]["i18n"]; }()); + +/***/ }, + +/***/ 933 +(module) { + +module.exports = (function() { return this["wp"]["primitives"]; }()); + +/***/ } + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. +(() => { +"use strict"; + +// EXTERNAL MODULE: external {"this":["wp","blocks"]} +var external_this_wp_blocks_ = __webpack_require__(545); +// EXTERNAL MODULE: external {"this":["wp","primitives"]} +var external_this_wp_primitives_ = __webpack_require__(933); +// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js +var jsx_runtime = __webpack_require__(848); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/translation.js +/** + * Translation icon - translation Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const translation = isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z" + }) +}) : 'translation'; +/* harmony default export */ const icons_translation = (translation); +// EXTERNAL MODULE: external {"this":["wp","i18n"]} +var external_this_wp_i18n_ = __webpack_require__(75); +// EXTERNAL MODULE: external {"this":["wp","blockEditor"]} +var external_this_wp_blockEditor_ = __webpack_require__(89); +// EXTERNAL MODULE: external {"this":["wp","components"]} +var external_this_wp_components_ = __webpack_require__(959); +// EXTERNAL MODULE: external "lodash" +var external_lodash_ = __webpack_require__(419); +;// ./vendor/wpsyntex/polylang/js/src/blocks/language-switcher-edit.js +/** + * Language switcher block edit. + */ + +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + +const i18nAttributeStrings = pll_block_editor_blocks_settings; +function createLanguageSwitcherEdit(props) { + const createToggleAttribute = function (propName) { + return () => { + const value = props.attributes[propName]; + const { + setAttributes + } = props; + let updatedAttributes = { + [propName]: !value + }; + let forcedAttributeName; + let forcedAttributeUnchecked; + + // Both show_names and show_flags attributes can't be unchecked together. + switch (propName) { + case 'show_names': + forcedAttributeName = 'show_flags'; + forcedAttributeUnchecked = !props.attributes[forcedAttributeName]; + break; + case 'show_flags': + forcedAttributeName = 'show_names'; + forcedAttributeUnchecked = !props.attributes[forcedAttributeName]; + break; + } + if ('show_names' === propName || 'show_flags' === propName) { + if (value && forcedAttributeUnchecked) { + updatedAttributes = (0,external_lodash_.assign)(updatedAttributes, { + [forcedAttributeName]: forcedAttributeUnchecked + }); + } + } + setAttributes(updatedAttributes); + }; + }; + const toggleDropdown = createToggleAttribute('dropdown'); + const toggleShowNames = createToggleAttribute('show_names'); + const toggleShowFlags = createToggleAttribute('show_flags'); + const toggleForceHome = createToggleAttribute('force_home'); + const toggleHideCurrent = createToggleAttribute('hide_current'); + const toggleHideIfNoTranslation = createToggleAttribute('hide_if_no_translation'); + const { + dropdown, + show_names, + show_flags, + force_home, + hide_current, + hide_if_no_translation + } = props.attributes; + function ToggleControlDropdown() { + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { + label: i18nAttributeStrings.dropdown, + checked: dropdown, + onChange: toggleDropdown + }); + } + function ToggleControlShowNames() { + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { + label: i18nAttributeStrings.show_names, + checked: show_names // eslint-disable-line camelcase + , + onChange: toggleShowNames + }); + } + function ToggleControlShowFlags() { + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { + label: i18nAttributeStrings.show_flags, + checked: show_flags // eslint-disable-line camelcase + , + onChange: toggleShowFlags + }); + } + function ToggleControlForceHome() { + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { + label: i18nAttributeStrings.force_home, + checked: force_home // eslint-disable-line camelcase + , + onChange: toggleForceHome + }); + } + function ToggleControlHideCurrent() { + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { + label: i18nAttributeStrings.hide_current, + checked: hide_current // eslint-disable-line camelcase + , + onChange: toggleHideCurrent + }); + } + function ToggleControlHideIfNoTranslations() { + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { + label: i18nAttributeStrings.hide_if_no_translation, + checked: hide_if_no_translation // eslint-disable-line camelcase + , + onChange: toggleHideIfNoTranslation + }); + } + return { + ToggleControlDropdown, + ToggleControlShowNames, + ToggleControlShowFlags, + ToggleControlForceHome, + ToggleControlHideCurrent, + ToggleControlHideIfNoTranslations + }; +} +// EXTERNAL MODULE: external {"this":["wp","element"]} +var external_this_wp_element_ = __webpack_require__(601); +;// ./vendor/wpsyntex/polylang/js/src/blocks/languages-context.js +/** + * WordPress dependencies. + */ + + +/** + * Context for the languages. + * + * @type {React.Context} + */ +const LanguagesContext = (0,external_this_wp_element_.createContext)(null); +;// ./vendor/wpsyntex/polylang/js/src/blocks/hooks/use-memoized-switcher-label.js +/** + * WordPress dependencies + */ +// '@wordpress/element' is provided by WordPress core. +// eslint-disable-next-line import/no-extraneous-dependencies + + +/** + * Hook to memoize the switcher label. + * + * @param {Object} language The language object. + * @param {boolean} showFlags Whether to show the flags. + * @param {boolean} showNames Whether to show the names. + * @return {Object} The memoized switcher label containing the text and the flag. + */ +const useMemoizedSwitcherLabel = (language, showFlags, showNames) => { + const { + text, + flag + } = (0,external_this_wp_element_.useMemo)(() => { + let memoizedText = ''; + if (showNames) { + if (showFlags) { + memoizedText = ` ${language.name}`; + } else { + memoizedText = language.name; + } + } + const memoizedFlag = showFlags ? language.flag : ''; + return { + text: memoizedText, + flag: memoizedFlag + }; + }, [language, showFlags, showNames]); + return { + text, + flag + }; +}; +;// ./vendor/wpsyntex/polylang/js/src/blocks/language-switcher/components/switcher-list-element.js +/** + * Internal dependencies + */ + + +/** + * Switcher list element component. + * + * @param {Object} props Component props. + * @param {Object} props.language Language object. + * @param {boolean} props.showFlags Whether to show the flags. + * @param {boolean} props.showNames Whether to show the names. + * @return {ReactElement} The Switcher element component. + */ + +const SwitcherListElement = ({ + language, + showFlags, + showNames +}) => { + const { + text, + flag + } = useMemoizedSwitcherLabel(language, showFlags, showNames); + return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { + dangerouslySetInnerHTML: { + __html: flag + } + }), " ", text, " "] + }); +}; +;// ./vendor/wpsyntex/polylang/js/src/blocks/language-switcher/components/switcher-ui.js +/** + * Internal dependencies + */ + + +/** + * Switcher UI component. + * + * @param {Object} props The component props. + * @param {Array} props.languages The languages to display. + * @param {boolean} props.showFlags Whether to show the flags. + * @param {boolean} props.showNames Whether to show the names. + * @param {boolean} props.isDropdown Whether to show the dropdown. + * @return {ReactElement} The Switcher UI component. + */ + +const SwitcherUI = ({ + languages, + showFlags, + showNames, + isDropdown +}) => { + if (isDropdown) { + return /*#__PURE__*/(0,jsx_runtime.jsx)("select", { + children: languages.map(language => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("option", { + value: language.slug, + children: language.name + }, language.slug); + }) + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", { + children: languages.map(language => { + return /*#__PURE__*/(0,jsx_runtime.jsx)(SwitcherListElement, { + language: language, + showFlags: showFlags, + showNames: showNames + }, language.slug); + }) + }); +}; +// EXTERNAL MODULE: external {"this":["wp","data"]} +var external_this_wp_data_ = __webpack_require__(987); +// EXTERNAL MODULE: external {"this":["wp","editor"]} +var external_this_wp_editor_ = __webpack_require__(2); +;// ./node_modules/@wpsyntex/polylang-react-library/build/hooks/use-current-language.js +/** + * WordPress dependencies + */ + +// This package is not found in `@wordpress/scripts` like others (peer dependency). +// eslint-disable-next-line import/no-unresolved + + +/** + * Custom hook to get the current language from the editor. + * + * @param {Array} languages The languages list. + * @return {Object|null} The current language, `null` if not found. + */ +const useCurrentLanguage = languages => { + const currentPost = (0,external_this_wp_data_.useSelect)(select => select(external_this_wp_editor_.store).getCurrentPost()); + if (!languages || !currentPost) { + return null; + } + const currentLanguageSlug = currentPost.lang ?? pllEditorCurrentLanguageSlug; // eslint-disable-line no-undef + + const currentLanguage = languages.find(language => { + return language.slug === currentLanguageSlug; + }); + return currentLanguage ? currentLanguage : null; +}; +;// ./node_modules/@wpsyntex/polylang-react-library/build/hooks/use-curated-languages.js +/** + * WordPress dependencies + */ + + +/** + * Hook to curate the languages. + * Returns an array of languages ensuring that the current language is always the first one. + * + * @param {Object[]} languages The languages. + * @param {Object} currentLanguage The current language. + * @param {boolean} reduceToOneItem Whether to reduce the languages to one item. + * @return {Object[]} The curated languages. + */ +const useCuratedLanguages = (languages, currentLanguage, reduceToOneItem) => { + const curatedLanguages = (0,external_this_wp_element_.useMemo)(() => { + if (!currentLanguage) { + return []; + } + if (reduceToOneItem) { + return [currentLanguage]; + } + return [currentLanguage, ...languages.filter(language => { + return language.slug !== currentLanguage.slug; + })]; + }, [languages, currentLanguage, reduceToOneItem]); + return curatedLanguages; +}; +;// ./vendor/wpsyntex/polylang/js/src/blocks/language-switcher/components/switcher-container.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + + +/** + * Switcher container component. + * + * @param {Object} props The component props. + * @param {Object} props.attributes The block attributes. + * @return {ReactElement} The Switcher component. + */ + +const SwitcherContainer = ({ + attributes +}) => { + const { + dropdown, + show_flags, + show_names + } = attributes; + const { + languages + } = (0,external_this_wp_element_.useContext)(LanguagesContext); + const currentLanguage = useCurrentLanguage(languages); + const curatedLanguages = useCuratedLanguages(languages, currentLanguage, dropdown); + return /*#__PURE__*/(0,jsx_runtime.jsx)(SwitcherUI, { + languages: curatedLanguages, + showFlags: show_flags, + showNames: show_names, + isDropdown: dropdown + }); +}; +// EXTERNAL MODULE: external {"this":["wp","apiFetch"]} +var external_this_wp_apiFetch_ = __webpack_require__(631); +var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_); +;// ./node_modules/@wpsyntex/polylang-react-library/build/hooks/use-languages-list.js +/** + * WordPress dependencies + */ + + + +/** + * Custom hook to get the languages list. + * + * @return {Array|null} The languages list, `null` if not loaded yet. + */ +const useLanguagesList = () => { + const [languages, setLanguages] = (0,external_this_wp_element_.useState)(null); + (0,external_this_wp_element_.useEffect)(() => { + external_this_wp_apiFetch_default()({ + path: '/pll/v1/languages', + method: 'GET' + }).then(response => setLanguages(response)); + }, []); + return languages; +}; +;// ./vendor/wpsyntex/polylang/js/src/blocks/language-switcher/edit.js +/** + * Edit callback for language switcher block. + */ + +/** + * WordPress dependencies + */ + + + + +/** + * Internal dependencies + */ + + + + + +/** + * Edit callback for language switcher block. + * + * @param {Object} props Block properties. + * @return {ReactElement} The block content and controls. + */ + +const Edit = props => { + const { + dropdown + } = props.attributes; + const languages = useLanguagesList(); + const { + ToggleControlDropdown, + ToggleControlShowNames, + ToggleControlShowFlags, + ToggleControlForceHome, + ToggleControlHideCurrent, + ToggleControlHideIfNoTranslations + } = createLanguageSwitcherEdit(props); + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + ...(0,external_this_wp_blockEditor_.useBlockProps)(), + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_blockEditor_.InspectorControls, { + children: /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_components_.PanelBody, { + title: (0,external_this_wp_i18n_.__)('Language switcher settings', 'polylang'), + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlDropdown, {}), !dropdown && /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlShowNames, {}), !dropdown && /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlShowFlags, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlForceHome, {}), !dropdown && /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlHideCurrent, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlHideIfNoTranslations, {})] + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Disabled, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(LanguagesContext.Provider, { + value: { + languages + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)(SwitcherContainer, { + attributes: props.attributes + }) + }) + })] + }); +}; +;// ./vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/block.json +const block_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"polylang/language-switcher"}'); +;// ./vendor/wpsyntex/polylang/js/src/blocks/language-switcher/index.js +/** + * Register language switcher block. + */ + +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + +(0,external_this_wp_blocks_.registerBlockType)(block_namespaceObject.UU, { + icon: icons_translation, + edit: Edit +}); +// EXTERNAL MODULE: external {"this":["wp","hooks"]} +var external_this_wp_hooks_ = __webpack_require__(873); +;// ./vendor/wpsyntex/polylang/js/src/blocks/navigation-language-switcher/components/switcher-link-element.js +/** + * Internal dependencies + */ + + +/** + * Switcher link element component. + * + * @param {Object} props Component props. + * @param {Object} props.language Language object. + * @param {boolean} props.isTopLevel Whether the language is the top level language. + * @param {boolean} props.showFlags Whether to show the flags. + * @param {boolean} props.showNames Whether to show the names. + * @return {ReactElement} The Switcher element component. + */ + +const SwitcherLinkElement = ({ + language, + isTopLevel, + showFlags, + showNames +}) => { + const { + text, + flag + } = useMemoizedSwitcherLabel(language, showFlags, showNames); + const prefix = isTopLevel ? '' : ' '; + return ( + /*#__PURE__*/ + // eslint-disable-next-line jsx-a11y/anchor-is-valid + (0,jsx_runtime.jsxs)("a", { + href: '#', + children: [prefix, /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + dangerouslySetInnerHTML: { + __html: flag + } + }), " ", text, " "] + }) + ); +}; +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/submenu.js +/** + * Submenu icon + */ + +/** + * WordPress dependencies + */ + + +const submenu_isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const SubmenuIcon = () => submenu_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + xmlns: "http://www.w3.org/2000/svg", + width: "12", + height: "12", + viewBox: "0 0 12 12", + fill: "none", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M1.50002 4L6.00002 8L10.5 4", + strokeWidth: "1.5" + }) +}) : 'submenu'; +/* harmony default export */ const submenu = (SubmenuIcon); +;// ./vendor/wpsyntex/polylang/js/src/blocks/navigation-language-switcher/components/switcher-ui.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + +/** + * Switcher UI component. + * + * @param {Object} props The component props. + * @param {Array} props.languages The languages to display. + * @param {boolean} props.showFlags Whether to show the flags. + * @param {boolean} props.showNames Whether to show the names. + * @param {boolean} props.withSubmenuIcon Whether to show the submenu icon. + * @return {ReactElement} The Switcher UI component. + */ + +const switcher_ui_SwitcherUI = ({ + languages, + showFlags, + showNames, + withSubmenuIcon +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: languages && languages.map(language => { + return /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_element_.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SwitcherLinkElement, { + language: language, + isTopLevel: languages.indexOf(language) === 0, + showFlags: showFlags, + showNames: showNames + }), withSubmenuIcon && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "wp-block-navigation__submenu-icon", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(submenu, {}) + })] + }, language.slug); + }) + }); +}; +;// ./vendor/wpsyntex/polylang/js/src/blocks/navigation-language-switcher/components/navigation-switcher-container.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + + +/** + * Switcher container component. + * + * @param {Object} props The component props. + * @param {Object} props.attributes The block attributes. + * @param {Object} props.context The block context. + * @return {ReactElement} The Switcher component. + */ + +const NavigationSwitcherContainer = ({ + attributes, + context +}) => { + const { + dropdown, + show_flags, + show_names + } = attributes; + const { + showSubmenuIcon, + openSubmenusOnClick + } = context; + const { + languages + } = (0,external_this_wp_element_.useContext)(LanguagesContext); + const currentLanguage = useCurrentLanguage(languages); + const curatedLanguages = useCuratedLanguages(languages, currentLanguage, dropdown); + return /*#__PURE__*/(0,jsx_runtime.jsx)(switcher_ui_SwitcherUI, { + languages: curatedLanguages, + showFlags: Boolean(show_flags), + showNames: Boolean(show_names), + withSubmenuIcon: Boolean((showSubmenuIcon || openSubmenusOnClick) && dropdown) + }); +}; +;// ./vendor/wpsyntex/polylang/js/src/blocks/navigation-language-switcher/edit.js +/** + * Edit callback for navigation language switcher block. + */ + +/** + * WordPress dependencies + */ + + + + +/** + * Internal dependencies + */ + + + + + +/** + * Edit callback for navigation language switcher block. + * + * @param {Object} props Block properties. + * @return {ReactElement} The block content and controls. + */ + +const edit_Edit = props => { + const { + dropdown + } = props.attributes; + const languages = useLanguagesList(); + const { + ToggleControlDropdown, + ToggleControlShowNames, + ToggleControlShowFlags, + ToggleControlForceHome, + ToggleControlHideCurrent, + ToggleControlHideIfNoTranslations + } = createLanguageSwitcherEdit(props); + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + ...(0,external_this_wp_blockEditor_.useBlockProps)(), + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_blockEditor_.InspectorControls, { + children: /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_components_.PanelBody, { + title: (0,external_this_wp_i18n_.__)('Language switcher settings', 'polylang'), + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlDropdown, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlShowNames, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlShowFlags, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlForceHome, {}), !dropdown && /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlHideCurrent, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlHideIfNoTranslations, {})] + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Disabled, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(LanguagesContext.Provider, { + value: { + languages + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)(NavigationSwitcherContainer, { + attributes: props.attributes, + context: props.context + }) + }) + })] + }); +}; +;// ./vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/block.json +const Navigation_block_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"polylang/navigation-language-switcher"}'); +;// ./vendor/wpsyntex/polylang/js/src/blocks/navigation-language-switcher/menu-items-converter.js +/** + * Menu items converter + */ + +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + +/** + * Apply a callback function on each block of the blocks list. + * + * @param {Array} blocks The list of blocks to process. + * @param {Array} menuItems The initial menu items from where the blocks are converted to. + * @param {Object} blocksMapping The mapping between the menu items and their corresponding blocks. + * @param {mapper} mapper A callback to change the converted block by another one if necessary + * @return {Array} Array of blocks updated. + */ +function mapBlockTree(blocks, menuItems, blocksMapping, mapper) { + /** + * A function to apply to each block to convert it if necessary by applying the `mapper` filter. + * + * @param {Object} block The block to replace or not. + * @return {Object} The new block potentially replaced by the `mapper`. + */ + const convertBlock = block => ({ + ...mapper(block, menuItems, blocksMapping), + innerBlocks: mapBlockTree(block.innerBlocks, menuItems, blocksMapping, mapper) + }); + return blocks.map(convertBlock); +} + +/** + * A filter to detect the `core/navigation-link` block not correctly converted from the language switcher menu item + * and convert it to its corresponding `polylang/navigation-language-switcher` block. + * + * @callback mapper + * @param {Object} block The block converted from the menu item. + * @param {Array} menuItems The initial menu items from where the blocks are converted to. + * @param {Object} blocksMapping The mapping between the menu items and their corresponding blocks. + * @return {Object} The block correctly converted. + */ +const blocksFilter = (block, menuItems, blocksMapping) => { + if (block.name === 'core/navigation-link' && block.attributes?.url === '#pll_switcher') { + const menuItem = menuItems.find(item => item.url === '#pll_switcher'); // Get the corresponding menu item. + const attributes = menuItem.meta._pll_menu_item; // Get its options. + const newBlock = (0,external_this_wp_blocks_.createBlock)(Navigation_block_namespaceObject.UU, attributes); + blocksMapping[menuItem.id] = newBlock.clientId; // Update the blocks mapping. + return newBlock; + } + return block; +}; + +/** + * A filter callback hooked to `blocks.navigation.__unstableMenuItemsToBlocks`. + * + * @param {Array} blocks The list of blocks to process. + * @param {Array} menuItems The initial menu items from where the blocks are converted to. + * @return {Array} Array of blocks updated. + */ +const menuItemsToBlocksFilter = (blocks, menuItems) => ({ + ...blocks, + innerBlocks: mapBlockTree(blocks.innerBlocks, menuItems, blocks.mapping, blocksFilter) +}); +;// ./vendor/wpsyntex/polylang/js/src/blocks/navigation-language-switcher/index.js +/** + * Register navigation language switcher block. + */ + +/** + * WordPress Dependencies + */ + + + +/** + * Internal dependencies + */ + + + + +(0,external_this_wp_blocks_.registerBlockType)(Navigation_block_namespaceObject.UU, { + icon: icons_translation, + transforms: { + from: [{ + type: 'block', + blocks: ['core/navigation-link'], + transform: () => (0,external_this_wp_blocks_.createBlock)(Navigation_block_namespaceObject.UU) + }] + }, + edit: edit_Edit +}); + +/** + * Hooks to the classic menu conversion to core/navigation block to be able to convert + * the language switcher menu item to its corresponding block. + */ +(0,external_this_wp_hooks_.addFilter)('blocks.navigation.__unstableMenuItemsToBlocks', 'polylang/include-language-switcher', menuItemsToBlocksFilter); +;// ./vendor/wpsyntex/polylang/js/src/blocks/index.js +/** + * Registers Polylang blocks in the editors and enables attributes controls. + */ + + +})(); + +this["polylang-pro"] = __webpack_exports__; +/******/ })() +; \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/blocks.min.js b/wp-content/plugins/polylang-pro/js/build/blocks.min.js new file mode 100644 index 0000000..7cc15a9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/blocks.min.js @@ -0,0 +1 @@ +(()=>{var e={20(e,o,n){"use strict";var t=n(677),s=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,o,n){var t,r={},c=null,u=null;for(t in void 0!==n&&(c=""+n),void 0!==o.key&&(c=""+o.key),void 0!==o.ref&&(u=o.ref),o)l.call(o,t)&&!i.hasOwnProperty(t)&&(r[t]=o[t]);if(e&&e.defaultProps)for(t in o=e.defaultProps)void 0===r[t]&&(r[t]=o[t]);return{$$typeof:s,type:e,key:c,ref:u,props:r,_owner:a.current}}o.Fragment=r,o.jsx=c,o.jsxs=c},848(e,o,n){"use strict";e.exports=n(20)},677(e){e.exports=function(){return this.React}()},419(e){e.exports=function(){return this.lodash}()},631(e){e.exports=function(){return this.wp.apiFetch}()},89(e){e.exports=function(){return this.wp.blockEditor}()},545(e){e.exports=function(){return this.wp.blocks}()},959(e){e.exports=function(){return this.wp.components}()},987(e){e.exports=function(){return this.wp.data}()},2(e){e.exports=function(){return this.wp.editor}()},601(e){e.exports=function(){return this.wp.element}()},873(e){e.exports=function(){return this.wp.hooks}()},75(e){e.exports=function(){return this.wp.i18n}()},933(e){e.exports=function(){return this.wp.primitives}()}},o={};function n(t){var s=o[t];if(void 0!==s)return s.exports;var r=o[t]={exports:{}};return e[t](r,r.exports,n),r.exports}n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o);(()=>{"use strict";var e=n(545),o=n(933),t=n(848);const s=void 0!==wp.primitives?(0,t.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,t.jsx)(o.Path,{d:"M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z"})}):"translation";var r=n(75),l=n(89),a=n(959),i=n(419);const c=pll_block_editor_blocks_settings;function u(e){const o=function(o){return()=>{const n=e.attributes[o],{setAttributes:t}=e;let s,r,l={[o]:!n};switch(o){case"show_names":s="show_flags",r=!e.attributes[s];break;case"show_flags":s="show_names",r=!e.attributes[s]}"show_names"!==o&&"show_flags"!==o||n&&r&&(l=(0,i.assign)(l,{[s]:r})),t(l)}},n=o("dropdown"),s=o("show_names"),r=o("show_flags"),l=o("force_home"),u=o("hide_current"),g=o("hide_if_no_translation"),{dropdown:h,show_names:d,show_flags:p,force_home:w,hide_current:x,hide_if_no_translation:f}=e.attributes;return{ToggleControlDropdown:function(){return(0,t.jsx)(a.ToggleControl,{label:c.dropdown,checked:h,onChange:n})},ToggleControlShowNames:function(){return(0,t.jsx)(a.ToggleControl,{label:c.show_names,checked:d,onChange:s})},ToggleControlShowFlags:function(){return(0,t.jsx)(a.ToggleControl,{label:c.show_flags,checked:p,onChange:r})},ToggleControlForceHome:function(){return(0,t.jsx)(a.ToggleControl,{label:c.force_home,checked:w,onChange:l})},ToggleControlHideCurrent:function(){return(0,t.jsx)(a.ToggleControl,{label:c.hide_current,checked:x,onChange:u})},ToggleControlHideIfNoTranslations:function(){return(0,t.jsx)(a.ToggleControl,{label:c.hide_if_no_translation,checked:f,onChange:g})}}}var g=n(601);const h=(0,g.createContext)(null),d=(e,o,n)=>{const{text:t,flag:s}=(0,g.useMemo)((()=>{let t="";n&&(t=o?` ${e.name}`:e.name);return{text:t,flag:o?e.flag:""}}),[e,o,n]);return{text:t,flag:s}},p=({language:e,showFlags:o,showNames:n})=>{const{text:s,flag:r}=d(e,o,n);return(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:r}})," ",s," "]})},w=({languages:e,showFlags:o,showNames:n,isDropdown:s})=>s?(0,t.jsx)("select",{children:e.map((e=>(0,t.jsx)("option",{value:e.slug,children:e.name},e.slug)))}):(0,t.jsx)("ul",{children:e.map((e=>(0,t.jsx)(p,{language:e,showFlags:o,showNames:n},e.slug)))});var x=n(987),f=n(2);const m=e=>{const o=(0,x.useSelect)((e=>e(f.store).getCurrentPost()));if(!e||!o)return null;const n=o.lang??pllEditorCurrentLanguageSlug,t=e.find((e=>e.slug===n));return t||null},_=(e,o,n)=>(0,g.useMemo)((()=>o?n?[o]:[o,...e.filter((e=>e.slug!==o.slug))]:[]),[e,o,n]),j=({attributes:e})=>{const{dropdown:o,show_flags:n,show_names:s}=e,{languages:r}=(0,g.useContext)(h),l=m(r),a=_(r,l,o);return(0,t.jsx)(w,{languages:a,showFlags:n,showNames:s,isDropdown:o})};var v=n(631),b=n.n(v);const C=()=>{const[e,o]=(0,g.useState)(null);return(0,g.useEffect)((()=>{b()({path:"/pll/v1/languages",method:"GET"}).then((e=>o(e)))}),[]),e},T=JSON.parse('{"UU":"polylang/language-switcher"}');(0,e.registerBlockType)(T.UU,{icon:s,edit:e=>{const{dropdown:o}=e.attributes,n=C(),{ToggleControlDropdown:s,ToggleControlShowNames:i,ToggleControlShowFlags:c,ToggleControlForceHome:g,ToggleControlHideCurrent:d,ToggleControlHideIfNoTranslations:p}=u(e);return(0,t.jsxs)("div",{...(0,l.useBlockProps)(),children:[(0,t.jsx)(l.InspectorControls,{children:(0,t.jsxs)(a.PanelBody,{title:(0,r.__)("Language switcher settings","polylang"),children:[(0,t.jsx)(s,{}),!o&&(0,t.jsx)(i,{}),!o&&(0,t.jsx)(c,{}),(0,t.jsx)(g,{}),!o&&(0,t.jsx)(d,{}),(0,t.jsx)(p,{})]})}),(0,t.jsx)(a.Disabled,{children:(0,t.jsx)(h.Provider,{value:{languages:n},children:(0,t.jsx)(j,{attributes:e.attributes})})})]})}});var k=n(873);const y=({language:e,isTopLevel:o,showFlags:n,showNames:s})=>{const{text:r,flag:l}=d(e,n,s),a=o?"":" ";return(0,t.jsxs)("a",{href:"#",children:[a,(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:l}})," ",r," "]})},S=void 0!==wp.primitives,F=()=>S?(0,t.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)(o.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})}):"submenu",N=({languages:e,showFlags:o,showNames:n,withSubmenuIcon:s})=>(0,t.jsx)(t.Fragment,{children:e&&e.map((r=>(0,t.jsxs)(g.Fragment,{children:[(0,t.jsx)(y,{language:r,isTopLevel:0===e.indexOf(r),showFlags:o,showNames:n}),s&&(0,t.jsx)("span",{className:"wp-block-navigation__submenu-icon",children:(0,t.jsx)(F,{})})]},r.slug)))}),B=({attributes:e,context:o})=>{const{dropdown:n,show_flags:s,show_names:r}=e,{showSubmenuIcon:l,openSubmenusOnClick:a}=o,{languages:i}=(0,g.useContext)(h),c=m(i),u=_(i,c,n);return(0,t.jsx)(N,{languages:u,showFlags:Boolean(s),showNames:Boolean(r),withSubmenuIcon:Boolean((l||a)&&n)})},H=JSON.parse('{"UU":"polylang/navigation-language-switcher"}');function I(e,o,n,t){return e.map((e=>({...t(e,o,n),innerBlocks:I(e.innerBlocks,o,n,t)})))}const O=(o,n,t)=>{if("core/navigation-link"===o.name&&"#pll_switcher"===o.attributes?.url){const o=n.find((e=>"#pll_switcher"===e.url)),s=o.meta._pll_menu_item,r=(0,e.createBlock)(H.UU,s);return t[o.id]=r.clientId,r}return o};(0,e.registerBlockType)(H.UU,{icon:s,transforms:{from:[{type:"block",blocks:["core/navigation-link"],transform:()=>(0,e.createBlock)(H.UU)}]},edit:e=>{const{dropdown:o}=e.attributes,n=C(),{ToggleControlDropdown:s,ToggleControlShowNames:i,ToggleControlShowFlags:c,ToggleControlForceHome:g,ToggleControlHideCurrent:d,ToggleControlHideIfNoTranslations:p}=u(e);return(0,t.jsxs)("div",{...(0,l.useBlockProps)(),children:[(0,t.jsx)(l.InspectorControls,{children:(0,t.jsxs)(a.PanelBody,{title:(0,r.__)("Language switcher settings","polylang"),children:[(0,t.jsx)(s,{}),(0,t.jsx)(i,{}),(0,t.jsx)(c,{}),(0,t.jsx)(g,{}),!o&&(0,t.jsx)(d,{}),(0,t.jsx)(p,{})]})}),(0,t.jsx)(a.Disabled,{children:(0,t.jsx)(h.Provider,{value:{languages:n},children:(0,t.jsx)(B,{attributes:e.attributes,context:e.context})})})]})}}),(0,k.addFilter)("blocks.navigation.__unstableMenuItemsToBlocks","polylang/include-language-switcher",((e,o)=>({...e,innerBlocks:I(e.innerBlocks,o,e.mapping,O)})))})(),this["polylang-pro"]={}})(); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/bulk-translate.js b/wp-content/plugins/polylang-pro/js/build/bulk-translate.js new file mode 100644 index 0000000..0162bb1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/bulk-translate.js @@ -0,0 +1,91 @@ +/** + * Bulk translate + * + * @package Polylang-Pro + */ + +jQuery( + function ( $ ) { + var t = this; + + $( '.editinline' ).on( + 'click', + function () { + $( '#pll-translate' ).find( '.cancel' ).trigger( 'click' ); // Close the form on quick edit + } + ); + + $( '#doaction, #doaction2' ).on( + 'click', + function ( e ) { + t.whichBulkButtonId = $( this ).attr( 'id' ); + var n = t.whichBulkButtonId.substr( 2 ); + + if ( 'pll_translate' === $( 'select[name="' + n + '"]' ).val() ) { + e.preventDefault(); + + if ( typeof inlineEditPost !== 'undefined' ) { // Not available for media. + inlineEditPost.revert(); // Close Bulk edit and Quick edit if open. + } + + $( '#pll-translate td' ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length ); + // The hidden tr allows to keep the background color. + // HTML prepended is hardcoded. So prepend is safe and as no need to be escaped. + $( 'table.widefat tbody' ).prepend( $( '#pll-translate' ) ).prepend( '' ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend + // Set initial focus on the Bulk translate region. + $( '#pll-translate .inline-edit-wrapper' ).attr( 'tabindex', '-1' ).focus(); + // Scrolls to the top of the table where the editor is rendered. + $('html, body').animate( { scrollTop: 0 }, 'fast' ); + } else { + $( '#pll-translate' ).find( '.cancel' ).trigger( 'click' ); + } + } + ); + + // Cancel + $( '#pll-translate' ).on( + 'click', + '.cancel', + function () { + // Close the form on any other bulk action + $( '#pll-translate' ).siblings( '.hidden' ).remove(); + // #pll-translate is built and come from server side and is well escaped when necessary + $( '#pll-bulk-translate' ).append( $( '#pll-translate' ) ); //phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + + // Move focus back to the Bulk Action button that was activated. + $( '#' + t.whichBulkButtonId ).trigger( 'focus' ); + } + ); + + // Act when pressing enter or esc + $( '#pll-translate' ).on( + 'keydown', + function ( event ) { + if ( 'Enter' === event.key && ! $( event.target ).hasClass( 'cancel' ) ) { + event.preventDefault(); + $( this ).find( 'input[type=submit]' ).trigger( 'click' ); + } + if ( 'Escape' === event.key ) { + event.preventDefault(); + $( this ).find( '.cancel' ).trigger( 'click' ); + } + } + ); + + // Clean DOM in case of file download + $( '#posts-filter' ).on( + 'submit', + function () { + $( '.settings-error' ).remove(); + setTimeout( + function () { + $( 'input[type=checkbox]:checked' ).attr( 'checked', false ); + $( '#pll-translate' ).find( '.cancel' ).trigger( 'click' ); + }, + 500 + ); + } + ); + } +); + diff --git a/wp-content/plugins/polylang-pro/js/build/bulk-translate.min.js b/wp-content/plugins/polylang-pro/js/build/bulk-translate.min.js new file mode 100644 index 0000000..eef1add --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/bulk-translate.min.js @@ -0,0 +1 @@ +jQuery((function(t){var e=this;t(".editinline").on("click",(function(){t("#pll-translate").find(".cancel").trigger("click")})),t("#doaction, #doaction2").on("click",(function(n){e.whichBulkButtonId=t(this).attr("id");var l=e.whichBulkButtonId.substr(2);"pll_translate"===t('select[name="'+l+'"]').val()?(n.preventDefault(),"undefined"!=typeof inlineEditPost&&inlineEditPost.revert(),t("#pll-translate td").attr("colspan",t("th:visible, td:visible",".widefat:first thead").length),t("table.widefat tbody").prepend(t("#pll-translate")).prepend(''),t("#pll-translate .inline-edit-wrapper").attr("tabindex","-1").focus(),t("html, body").animate({scrollTop:0},"fast")):t("#pll-translate").find(".cancel").trigger("click")})),t("#pll-translate").on("click",".cancel",(function(){t("#pll-translate").siblings(".hidden").remove(),t("#pll-bulk-translate").append(t("#pll-translate")),t("#"+e.whichBulkButtonId).trigger("focus")})),t("#pll-translate").on("keydown",(function(e){"Enter"!==e.key||t(e.target).hasClass("cancel")||(e.preventDefault(),t(this).find("input[type=submit]").trigger("click")),"Escape"===e.key&&(e.preventDefault(),t(this).find(".cancel").trigger("click"))})),t("#posts-filter").on("submit",(function(){t(".settings-error").remove(),setTimeout((function(){t("input[type=checkbox]:checked").attr("checked",!1),t("#pll-translate").find(".cancel").trigger("click")}),500)}))})); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/classic-editor.js b/wp-content/plugins/polylang-pro/js/build/classic-editor.js new file mode 100644 index 0000000..cd82ff5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/classic-editor.js @@ -0,0 +1,466 @@ +/******/ "use strict"; + +;// ./vendor/wpsyntex/polylang/js/src/lib/confirmation-modal.js +/** + * @package Polylang + */ + +const languagesList = jQuery( '.post_lang_choice' ); + +// Dialog box for alerting the user about a risky changing. +const initializeConfirmationModal = () => { + // We can't use underscore or lodash in this common code because it depends of the context classic or block editor. + // Classic editor underscore is loaded, Block editor lodash is loaded. + const { __ } = wp.i18n; + + // Create dialog container. + const dialogContainer = jQuery( + '
', + { + id: 'pll-dialog', + style: 'display:none;' + } + ).text( __( 'Are you sure you want to change the language of the current content?', 'polylang' ) ); + + // Put it after languages list dropdown. + // PHPCS ignore dialogContainer is a new safe HTML code generated above. + languagesList.after( dialogContainer ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.after + + const dialogResult = new Promise( + ( confirm, cancel ) => { + const confirmDialog = ( what ) => { // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + switch ( what ) { // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + case 'yes': + // Confirm the new language. + languagesList.data( 'old-value', languagesList.children( ':selected' ).first().val() ); + confirm(); + break; + case 'no': + // Revert to the old language. + languagesList.val( languagesList.data( 'old-value' ) ); + cancel( 'Cancel' ); + break; + } + dialogContainer.dialog( 'close' ); // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + } // phpcs:ignore PEAR.Functions.FunctionCallSignature.Indent + + // Initialize dialog box in the case a language is selected but not added in the list. + const dialogOptions = { + autoOpen: false, + modal: true, + draggable: false, + resizable: false, + title: __( 'Change language', 'polylang' ), + minWidth: 600, + maxWidth: '100%', + open: function ( event, ui ) { + // Change dialog box position for rtl language + if ( jQuery( 'body' ).hasClass( 'rtl' ) ) { + jQuery( this ).parent().css( + { + right: jQuery( this ).parent().css( 'left' ), + left: 'auto' + } + ); + } + }, + close: function ( event, ui ) { + // When we're closing the dialog box we need to cancel the language change as we click on Cancel button. + confirmDialog( 'no' ); + }, + buttons: [ + { + text: __( 'OK', 'polylang' ), + click: function ( event ) { + confirmDialog( 'yes' ); + } + }, + { + text: __( 'Cancel', 'polylang' ), + click: function ( event ) { + confirmDialog( 'no' ); + } + } + ] + }; + + if ( jQuery.ui.version >= '1.12.0' ) { + Object.assign( dialogOptions, { classes: { 'ui-dialog': 'pll-confirmation-modal' } } ); + } else { + Object.assign( dialogOptions, { dialogClass: 'pll-confirmation-modal' } ); // jQuery UI 1.11.4 - WP < 5.6 + } + + dialogContainer.dialog( dialogOptions ); + } + ); + return { dialogContainer, dialogResult }; +} + +const initializeLanguageOldValue = () => { + // Keep the old language value to be able to compare to the new one and revert to it if necessary. + languagesList.attr( 'data-old-value', languagesList.children( ':selected' ).first().val() ); +}; + +;// ./vendor/wpsyntex/polylang/js/src/lib/metabox-autocomplete.js +/** + * @package Polylang + */ + +// Translations autocomplete input box. +function initMetaboxAutoComplete() { + jQuery('.tr_lang').each( + function () { + var tr_lang = jQuery(this).attr('id').substring(8); + var td = jQuery(this).parent().parent().siblings('.pll-edit-column'); + + jQuery(this).autocomplete( + { + minLength: 0, + source: ajaxurl + '?action=pll_posts_not_translated' + + '&post_language=' + jQuery('.post_lang_choice').val() + + '&translation_language=' + tr_lang + + '&post_type=' + jQuery('#post_type').val() + + '&_pll_nonce=' + jQuery('#_pll_nonce').val(), + select: function (event, ui) { + jQuery('#htr_lang_' + tr_lang).val(ui.item.id); + // ui.item.link is built and come from server side and is well escaped when necessary + td.html(ui.item.link); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + }, + } + ); + + // when the input box is emptied + jQuery(this).on( + 'blur', + function () { + if ( ! jQuery(this).val() ) { + jQuery('#htr_lang_' + tr_lang).val(0); + // Value is retrieved from HTML already generated server side + td.html(td.siblings('.hidden').children().clone()); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + } + } + ); + } + ); +} + +;// ./vendor/wpsyntex/polylang/js/src/classic-editor.js +/** + * @package Polylang + */ + + + + + +// tag suggest in metabox +jQuery( + function ( $ ) { + $.ajaxPrefilter( + function ( options, originalOptions, jqXHR ) { + var lang = $( '.post_lang_choice' ).val(); + if ( 'string' === typeof options.data && -1 !== options.url.indexOf( 'action=ajax-tag-search' ) && lang ) { + options.data = 'lang=' + lang + '&' + options.data; + } + } + ); + } +); + +// overrides tagBox.get +jQuery( + function ( $ ) { + // overrides function to add the language + tagBox.get = function ( id ) { + var tax = id.substr( id.indexOf( '-' ) + 1 ); + + // add the language in the $_POST variable + var data = { + action: 'get-tagcloud', + lang: $( '.post_lang_choice' ).val(), + tax: tax + } + + $.post( + ajaxurl, + data, + function ( r, stat ) { + if ( 0 == r || 'success' != stat ) { + r = wpAjax.broken; + } + + // @see code from WordPress core https://github.com/WordPress/WordPress/blob/5.2.2/wp-admin/js/tags-box.js#L291 + // @see wp_generate_tag_cloud function which generate the escaped HTML https://github.com/WordPress/WordPress/blob/a02b5cc2a8eecb8e076fbb7cf4de7bd2ec8a8eb1/wp-includes/category-template.php#L966-L975 + r = $( '
' ).addClass( 'the-tagcloud' ).attr( 'id', 'tagcloud-' + tax ).html( r ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + $( 'a', r ).on( + 'click', + function () { + tagBox.flushTags( $( this ).closest( '.inside' ).children( '.tagsdiv' ), this ); + return false; + } + ); + + var tagCloud = $( '#tagcloud-' + tax ); + // add an if else condition to allow modifying the tags outputted when switching the language + var v = tagCloud.css( 'display' ); + if ( v ) { + // See the comment above when r variable is created. + $( '#tagcloud-' + tax ).replaceWith( r ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith + $( '#tagcloud-' + tax ).css( 'display', v ); + } + else { + // See the comment above when r variable is created. + $( '#' + id ).after( r ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.after + } + } + ); + } + } +); + +jQuery( + function ( $ ) { + // collect taxonomies - code partly copied from WordPress + var taxonomies = new Array(); + $( '.categorydiv' ).each( + function () { + var this_id = $( this ).attr( 'id' ), taxonomyParts, taxonomy; + + taxonomyParts = this_id.split( '-' ); + taxonomyParts.shift(); + taxonomy = taxonomyParts.join( '-' ); + taxonomies.push( taxonomy ); // store the taxonomy for future use + + // add our hidden field in the new category form - for each hierarchical taxonomy + // to set the language when creating a new category + // html code inserted come from html code itself. + $( '#' + taxonomy + '-add-submit' ).before( // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.before + $( '' ).attr( 'type', 'hidden' ) + .attr( 'id', taxonomy + '-lang' ) + .attr( 'name', 'term_lang_choice' ) + .attr( 'value', $( '.post_lang_choice' ).val() ) + ); + } + ); + + // Initialize current language to be able to compare if it changes. + initializeLanguageOldValue(); + + // ajax for changing the post's language in the languages metabox + $( '.post_lang_choice' ).on( + 'change', + function ( event ) { + // Initialize the confirmation dialog box. + const confirmationModal = initializeConfirmationModal(); + const { dialogContainer: dialog } = confirmationModal; + let { dialogResult } = confirmationModal; + // The selected option in the dropdown list. + const selectedOption = event.target; + + if ( $( this ).data( 'old-value' ) !== selectedOption.value && ! isEmptyPost() ) { + dialog.dialog( 'open' ); + } else { + dialogResult = Promise.resolve(); + } + + dialogResult.then( + () => { + var data = { + action: 'post_lang_choice', + lang: selectedOption.value, + post_type: $( '#post_type' ).val(), + taxonomies: taxonomies, + post_id: $( '#post_ID' ).val(), + _pll_nonce: $( '#_pll_nonce' ).val() + } + + $.post( + ajaxurl, + data, + function ( response ) { + // Target a non existing WP HTML id to avoid a conflict with WP ajax requests. + var res = wpAjax.parseAjaxResponse( response, 'pll-ajax-response' ); + $.each( + res.responses, + function () { + switch ( this.what ) { + case 'translations': // translations fields + // Data is built and come from server side and is well escaped when necessary + $( '.translations' ).html( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + initMetaboxAutoComplete(); + break; + case 'taxonomy': // categories metabox for posts + var tax = this.data; + // @see wp_terms_checklist https://github.com/WordPress/WordPress/blob/5.2.2/wp-admin/includes/template.php#L175 + // @see https://github.com/WordPress/WordPress/blob/5.2.2/wp-admin/includes/class-walker-category-checklist.php#L89-L111 + $( '#' + tax + 'checklist' ).html( this.supplemental.all ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + // @see wp_popular_terms_checklist https://github.com/WordPress/WordPress/blob/5.2.2/wp-admin/includes/template.php#L236 + $( '#' + tax + 'checklist-pop' ).html( this.supplemental.populars ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + // @see wp_dropdown_categories https://github.com/WordPress/WordPress/blob/5.5.1/wp-includes/category-template.php#L336 + // which is called by PLL_Admin_Classic_Editor::post_lang_choice to generate supplemental.dropdown + $( '#new' + tax + '_parent' ).replaceWith( this.supplemental.dropdown ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith + $( '#' + tax + '-lang' ).val( $( '.post_lang_choice' ).val() ); // hidden field + break; + case 'pages': // parent dropdown list for pages + // @see wp_dropdown_pages https://github.com/WordPress/WordPress/blob/5.2.2/wp-includes/post-template.php#L1186-L1208 + // @see https://github.com/WordPress/WordPress/blob/5.2.2/wp-includes/class-walker-page-dropdown.php#L88 + $( '#parent_id' ).html( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + break; + case 'flag': // flag in front of the select dropdown + // Data is built and come from server side and is well escaped when necessary + $( '.pll-select-flag' ).html( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + break; + case 'permalink': // Sample permalink + var div = $( '#edit-slug-box' ); + if ( '-1' != this.data && div.children().length ) { + // @see get_sample_permalink_html https://github.com/WordPress/WordPress/blob/5.2.2/wp-admin/includes/post.php#L1425-L1454 + div.html( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + } + break; + } + } + ); + + // Creates an event once the language has been successfully changed. + const onPostLangChoice = new CustomEvent( + "onPostLangChoice", + { + detail: { + lang: JSON.parse( selectedOption.options[selectedOption.options.selectedIndex].getAttribute( 'data-lang' ) ) + }, + } + ); + document.dispatchEvent( onPostLangChoice ); + } + ) + }, + () => {} // Do nothing when promise is rejected by clicking the Cancel dialog button. + ); + + function isEmptyPost() { + const title = $( 'input#title' ).val(); + const content = $( 'textarea#content' ).val(); + const excerpt = $( 'textarea#excerpt' ).val(); + + return ! title && ! content && ! excerpt; + } + } + ); + + // Listen to `onPostLangChoice` to perform actions after the language has been changed. + document.addEventListener( + 'onPostLangChoice', + ( e ) => { + // Update the old language with the new one to be able to compare it in the next changing. + initializeLanguageOldValue(); + + // Modifies the language in the tag cloud. + $( '.tagcloud-link' ).each( + function () { + var id = $( this ).attr( 'id' ); + tagBox.get( id ); + } + ); + + // Modifies the text direction. + let dir = e.detail.lang.is_rtl ? 'rtl' : 'ltr' + $( 'body' ).removeClass( 'pll-dir-rtl' ).removeClass( 'pll-dir-ltr' ).addClass( 'pll-dir-' + dir ); + $( '#content_ifr' ).contents().find( 'html' ).attr( 'lang', e.detail.lang.locale ).attr( 'dir', dir ); + $( '#content_ifr' ).contents().find( 'body' ).attr( 'dir', dir ); + + // Refresh media libraries. + pll.media.resetAllAttachmentsCollections(); + } + ); + + initMetaboxAutoComplete(); + } +); + +/** + * @since 3.0 + * + * @namespace pll + */ +var pll = window.pll || {}; + +/** + * @since 3.0 + * + * @namespace pll.media + */ +_.extend( pll, { media: {} } ); + +/** + * @since 3.0 + * + * @alias pll.media + * @memberOf pll + * @namespace + */ +var media = _.extend( + pll.media, /** @lends pll.media.prototype */ + { + /** + * TODO: Find a way to delete references to Attachments collections that are not used anywhere else. + * + * @type {wp.media.model.Attachments} + */ + attachmentsCollections : [], + + /** + * Imitates { @see wp.media.query } but log all Attachments collections created. + * + * @param {Object} [props] + * @return {wp.media.model.Attachments} + */ + query: function ( props ) { + var attachments = pll.media.query.delegate( props ); + + pll.media.attachmentsCollections.push( attachments ); + + return attachments; + }, + + resetAllAttachmentsCollections: function () { + this.attachmentsCollections.forEach( + function ( attachmentsCollection ) { + /** + * First reset the { @see wp.media.model.Attachments } collection. + * Then, if it is mirroring a { @see wp.media.model.Query } collection, + * refresh this one too, so it will fetch new data from the server, + * and then the wp.media.model.Attachments collection will synchronize with the new data. + */ + attachmentsCollection.reset(); + if (attachmentsCollection.mirroring) { + attachmentsCollection.mirroring._hasMore = true; + attachmentsCollection.mirroring.reset(); + } + } + ); + } + } +); + +if ( 'undefined' !== typeof wp && 'undefined' !== typeof wp.media ) { + + /** + * @since 3.0 + * + * @memberOf pll.media + */ + media.query = _.extend( + media.query, /** @lends pll.media.query prototype */ + { + /** + * @type Function References WordPress { @see wp.media.query } constructor + */ + delegate: wp.media.query + } + ) + + // Substitute WordPress media query shortcut with our decorated function. + wp.media.query = media.query + +} + diff --git a/wp-content/plugins/polylang-pro/js/build/classic-editor.min.js b/wp-content/plugins/polylang-pro/js/build/classic-editor.min.js new file mode 100644 index 0000000..7859cd5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/classic-editor.min.js @@ -0,0 +1 @@ +"use strict";const languagesList=jQuery(".post_lang_choice"),initializeConfirmationModal=()=>{const{__:t}=wp.i18n,a=jQuery("
",{id:"pll-dialog",style:"display:none;"}).text(t("Are you sure you want to change the language of the current content?","polylang"));languagesList.after(a);const e=new Promise(((e,l)=>{const n=t=>{switch(t){case"yes":languagesList.data("old-value",languagesList.children(":selected").first().val()),e();break;case"no":languagesList.val(languagesList.data("old-value")),l("Cancel")}a.dialog("close")},i={autoOpen:!1,modal:!0,draggable:!1,resizable:!1,title:t("Change language","polylang"),minWidth:600,maxWidth:"100%",open:function(t,a){jQuery("body").hasClass("rtl")&&jQuery(this).parent().css({right:jQuery(this).parent().css("left"),left:"auto"})},close:function(t,a){n("no")},buttons:[{text:t("OK","polylang"),click:function(t){n("yes")}},{text:t("Cancel","polylang"),click:function(t){n("no")}}]};jQuery.ui.version>="1.12.0"?Object.assign(i,{classes:{"ui-dialog":"pll-confirmation-modal"}}):Object.assign(i,{dialogClass:"pll-confirmation-modal"}),a.dialog(i)}));return{dialogContainer:a,dialogResult:e}},initializeLanguageOldValue=()=>{languagesList.attr("data-old-value",languagesList.children(":selected").first().val())};function initMetaboxAutoComplete(){jQuery(".tr_lang").each((function(){var t=jQuery(this).attr("id").substring(8),a=jQuery(this).parent().parent().siblings(".pll-edit-column");jQuery(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_posts_not_translated&post_language="+jQuery(".post_lang_choice").val()+"&translation_language="+t+"&post_type="+jQuery("#post_type").val()+"&_pll_nonce="+jQuery("#_pll_nonce").val(),select:function(e,l){jQuery("#htr_lang_"+t).val(l.item.id),a.html(l.item.link)}}),jQuery(this).on("blur",(function(){jQuery(this).val()||(jQuery("#htr_lang_"+t).val(0),a.html(a.siblings(".hidden").children().clone()))}))}))}jQuery((function(t){t.ajaxPrefilter((function(a,e,l){var n=t(".post_lang_choice").val();"string"==typeof a.data&&-1!==a.url.indexOf("action=ajax-tag-search")&&n&&(a.data="lang="+n+"&"+a.data)}))})),jQuery((function(t){tagBox.get=function(a){var e=a.substr(a.indexOf("-")+1),l={action:"get-tagcloud",lang:t(".post_lang_choice").val(),tax:e};t.post(ajaxurl,l,(function(l,n){0!=l&&"success"==n||(l=wpAjax.broken),l=t("
").addClass("the-tagcloud").attr("id","tagcloud-"+e).html(l),t("a",l).on("click",(function(){return tagBox.flushTags(t(this).closest(".inside").children(".tagsdiv"),this),!1}));var i=t("#tagcloud-"+e).css("display");i?(t("#tagcloud-"+e).replaceWith(l),t("#tagcloud-"+e).css("display",i)):t("#"+a).after(l)}))}})),jQuery((function(t){var a=new Array;t(".categorydiv").each((function(){var e,l;(e=t(this).attr("id").split("-")).shift(),l=e.join("-"),a.push(l),t("#"+l+"-add-submit").before(t("").attr("type","hidden").attr("id",l+"-lang").attr("name","term_lang_choice").attr("value",t(".post_lang_choice").val()))})),initializeLanguageOldValue(),t(".post_lang_choice").on("change",(function(e){const l=initializeConfirmationModal(),{dialogContainer:n}=l;let{dialogResult:i}=l;const o=e.target;t(this).data("old-value")===o.value||function(){const a=t("input#title").val(),e=t("textarea#content").val(),l=t("textarea#excerpt").val();return!a&&!e&&!l}()?i=Promise.resolve():n.dialog("open"),i.then((()=>{var e={action:"post_lang_choice",lang:o.value,post_type:t("#post_type").val(),taxonomies:a,post_id:t("#post_ID").val(),_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,e,(function(a){var e=wpAjax.parseAjaxResponse(a,"pll-ajax-response");t.each(e.responses,(function(){switch(this.what){case"translations":t(".translations").html(this.data),initMetaboxAutoComplete();break;case"taxonomy":var a=this.data;t("#"+a+"checklist").html(this.supplemental.all),t("#"+a+"checklist-pop").html(this.supplemental.populars),t("#new"+a+"_parent").replaceWith(this.supplemental.dropdown),t("#"+a+"-lang").val(t(".post_lang_choice").val());break;case"pages":t("#parent_id").html(this.data);break;case"flag":t(".pll-select-flag").html(this.data);break;case"permalink":var e=t("#edit-slug-box");"-1"!=this.data&&e.children().length&&e.html(this.data)}}));const l=new CustomEvent("onPostLangChoice",{detail:{lang:JSON.parse(o.options[o.options.selectedIndex].getAttribute("data-lang"))}});document.dispatchEvent(l)}))}),(()=>{}))})),document.addEventListener("onPostLangChoice",(a=>{initializeLanguageOldValue(),t(".tagcloud-link").each((function(){var a=t(this).attr("id");tagBox.get(a)}));let e=a.detail.lang.is_rtl?"rtl":"ltr";t("body").removeClass("pll-dir-rtl").removeClass("pll-dir-ltr").addClass("pll-dir-"+e),t("#content_ifr").contents().find("html").attr("lang",a.detail.lang.locale).attr("dir",e),t("#content_ifr").contents().find("body").attr("dir",e),pll.media.resetAllAttachmentsCollections()})),initMetaboxAutoComplete()}));var pll=window.pll||{};_.extend(pll,{media:{}});var media=_.extend(pll.media,{attachmentsCollections:[],query:function(t){var a=pll.media.query.delegate(t);return pll.media.attachmentsCollections.push(a),a},resetAllAttachmentsCollections:function(){this.attachmentsCollections.forEach((function(t){t.reset(),t.mirroring&&(t.mirroring._hasMore=!0,t.mirroring.reset())}))}});"undefined"!=typeof wp&&void 0!==wp.media&&(media.query=_.extend(media.query,{delegate:wp.media.query}),wp.media.query=media.query); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/editors/post.js b/wp-content/plugins/polylang-pro/js/build/editors/post.js new file mode 100644 index 0000000..08307b8 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/editors/post.js @@ -0,0 +1,3641 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 20 +(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var f=__webpack_require__(677),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0}; +function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q; + + +/***/ }, + +/***/ 848 +(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(20); +} else // removed by dead control flow +{} + + +/***/ }, + +/***/ 677 +(module) { + +module.exports = (function() { return this["React"]; }()); + +/***/ }, + +/***/ 419 +(module) { + +module.exports = (function() { return this["lodash"]; }()); + +/***/ }, + +/***/ 631 +(module) { + +module.exports = (function() { return this["wp"]["apiFetch"]; }()); + +/***/ }, + +/***/ 959 +(module) { + +module.exports = (function() { return this["wp"]["components"]; }()); + +/***/ }, + +/***/ 488 +(module) { + +module.exports = (function() { return this["wp"]["coreData"]; }()); + +/***/ }, + +/***/ 987 +(module) { + +module.exports = (function() { return this["wp"]["data"]; }()); + +/***/ }, + +/***/ 53 +(module) { + +module.exports = (function() { return this["wp"]["editPost"]; }()); + +/***/ }, + +/***/ 2 +(module) { + +module.exports = (function() { return this["wp"]["editor"]; }()); + +/***/ }, + +/***/ 601 +(module) { + +module.exports = (function() { return this["wp"]["element"]; }()); + +/***/ }, + +/***/ 989 +(module) { + +module.exports = (function() { return this["wp"]["htmlEntities"]; }()); + +/***/ }, + +/***/ 75 +(module) { + +module.exports = (function() { return this["wp"]["i18n"]; }()); + +/***/ }, + +/***/ 672 +(module) { + +module.exports = (function() { return this["wp"]["notices"]; }()); + +/***/ }, + +/***/ 125 +(module) { + +module.exports = (function() { return this["wp"]["plugins"]; }()); + +/***/ }, + +/***/ 933 +(module) { + +module.exports = (function() { return this["wp"]["primitives"]; }()); + +/***/ }, + +/***/ 172 +(module) { + +module.exports = (function() { return this["wp"]["url"]; }()); + +/***/ } + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. +(() => { +"use strict"; + +// EXTERNAL MODULE: external {"this":["wp","apiFetch"]} +var external_this_wp_apiFetch_ = __webpack_require__(631); +var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_); +;// ./node_modules/@wpsyntex/polylang-react-library/build/middlewares/filter-path.js +/** + * Filters requests for translatable entities. + * This logic is shared across all Polylang plugins. + * + * @since 3.5 + * + * @param {Object} options - API fetch options object. + * @param {Array} filteredRoutes - Array of route paths to filter. + * @param {Function} filter - Function to filter matching routes. + * @return {Object} Modified REST request options. + */ +const filterPathMiddleware = (options, filteredRoutes, filter) => { + const cleanPath = options.path.split('?')[0].replace(/^\/+|\/+$/g, ''); // Get path without query parameters and trim '/'. + + return Object.values(filteredRoutes).find(path => cleanPath === path) ? filter(options) : options; +}; +/* harmony default export */ const filter_path = (filterPathMiddleware); +;// ./node_modules/@wpsyntex/polylang-react-library/build/middlewares/editors-requests-filter.js +/** + * WordPress dependencies. + */ + + +/* + * Internal dependencies. + */ + + +/** + * Safely filters requests for translatable entities in block editor type screens. + * Ensures that `pllFilteredRoutes` has been well defined on server side and + * that the filtered request is a REST one. + * + * @param {Function} filterCallback - Function to filter API fetch options. + */ +const editorsRequestsFilter = filterCallback => { + external_this_wp_apiFetch_default().use((options, next) => { + /* + * If options.url is defined, this is not a REST request but a direct call to post.php for legacy metaboxes. + * If `filteredRoutes` is not defined, return early. + */ + if ('undefined' !== typeof options.url || 'undefined' === typeof window.pllFilteredRoutes) { + return next(options); + } + return next(filter_path(options, window.pllFilteredRoutes, filterCallback)); + }); +}; +/* harmony default export */ const editors_requests_filter = (editorsRequestsFilter); +// EXTERNAL MODULE: external {"this":["wp","editPost"]} +var external_this_wp_editPost_ = __webpack_require__(53); +// EXTERNAL MODULE: external {"this":["wp","element"]} +var external_this_wp_element_ = __webpack_require__(601); +// EXTERNAL MODULE: external {"this":["wp","primitives"]} +var external_this_wp_primitives_ = __webpack_require__(933); +// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js +var jsx_runtime = __webpack_require__(848); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/translation.js +/** + * Translation icon - translation Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const translation = isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z" + }) +}) : 'translation'; +/* harmony default export */ const icons_translation = (translation); +// EXTERNAL MODULE: external {"this":["wp","plugins"]} +var external_this_wp_plugins_ = __webpack_require__(125); +;// ./js/src/editors/common/app.js +/** + * External dependencies + */ + + +/** + * WordPress Dependencies. + */ + + +const App = ({ + sidebar, + sidebarName, + onPromise, + children +}) => { + onPromise().then(() => { + (0,external_this_wp_plugins_.registerPlugin)(sidebarName, { + icon: icons_translation, + render: sidebar + }); + }, reason => { + console.info(reason); // eslint-disable-line no-console + }); + return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: children + }); +}; +/* harmony default export */ const app = (App); +// EXTERNAL MODULE: external {"this":["wp","data"]} +var external_this_wp_data_ = __webpack_require__(987); +// EXTERNAL MODULE: external {"this":["wp","notices"]} +var external_this_wp_notices_ = __webpack_require__(672); +;// ./js/src/editors/common/components/display-notices/index.js +/** + * WordPress Dependencies. + */ + + +const { + stripTags +} = wp.sanitize; +const DisplayNotices = ({ + notices +}) => { + const { + createErrorNotice, + createInfoNotice, + createSuccessNotice, + createWarningNotice + } = (0,external_this_wp_data_.useDispatch)(external_this_wp_notices_.store); + if (!notices) { + return null; + } + notices.forEach(notice => { + const noticeOptions = { + type: 'snackbar', + explicitDismiss: true + }; + const message = stripTags(notice.message); + switch (notice.type) { + case 'error': + createErrorNotice(message, noticeOptions); + break; + case 'info': + createInfoNotice(message, noticeOptions); + break; + case 'success': + createSuccessNotice(message, noticeOptions); + break; + case 'warning': + createWarningNotice(message, noticeOptions); + break; + } + }); + + /** + * Renderless component. + */ + return null; +}; +/* harmony default export */ const display_notices = (DisplayNotices); +// EXTERNAL MODULE: external {"this":["wp","i18n"]} +var external_this_wp_i18n_ = __webpack_require__(75); +;// ./js/src/editors/common/components/sidebar/index.js +/** + * WordPress dependencies + */ + + +const Sidebar = ({ + SidebarSlot, + MoreMenuItemSlot, + sidebarName, + children +}) => { + const title = (0,external_this_wp_i18n_.__)('Languages', 'polylang-pro'); + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SidebarSlot, { + name: sidebarName, + title: title, + children: children + }), /*#__PURE__*/(0,jsx_runtime.jsx)(MoreMenuItemSlot, { + target: sidebarName, + children: title + })] + }); +}; +/* harmony default export */ const sidebar = (Sidebar); +// EXTERNAL MODULE: external {"this":["wp","url"]} +var external_this_wp_url_ = __webpack_require__(172); +// EXTERNAL MODULE: external {"this":["wp","coreData"]} +var external_this_wp_coreData_ = __webpack_require__(488); +;// ./js/src/editors/common/settings.js +/** + * Module Constants + */ + +const MODULE_KEY = 'pll/metabox'; +const MODULE_CORE_EDITOR_KEY = 'core/editor'; +const MODULE_SITE_EDITOR_KEY = 'core/edit-site'; +const MODULE_POST_EDITOR_KEY = 'core/edit-post'; +const MODULE_CORE_KEY = 'core'; +const DEFAULT_STATE = { + languages: [], + selectedLanguage: {}, + translatedPosts: {}, + fromPost: null, + currentTemplatePart: {} +}; +const UNTRANSLATABLE_POST_TYPE = ['wp_template', 'wp_global_styles']; +const POST_TYPE_WITH_TRASH = (/* unused pure expression or super */ null && (['page'])); +const TEMPLATE_PART_SLUG_SEPARATOR = '___'; // Its value must be synchronized with its equivalent in PHP @see PLL_FSE_Template_Slug::SEPARATOR. +const TEMPLATE_PART_SLUG_CHECK_LANGUAGE_PATTERN = '[a-z][a-z0-9_-]*'; // Its value must be synchronized with it equivalent in PHP @see PLL_FSE_Template_Slug::SEPARATOR. + +// EXTERNAL MODULE: external "lodash" +var external_lodash_ = __webpack_require__(419); +;// ./js/src/editors/common/components/language-flag/index.js +/* eslint-disable import/no-extraneous-dependencies */ +/** + * External dependencies. + */ + + + +/** + * Displays a flag icon for a given language. + * + * @since 3.1 + * @since 3.2 Now its own component. + * + * @param {Object} props LanguageFlag props. + * @param {Object} props.language Language object for the flag. + * + * @return {React.ReactElement} Flag component. + */ + +function LanguageFlag({ + language +}) { + if (!(0,external_lodash_.isNil)(language)) { + return !(0,external_lodash_.isEmpty)(language.flag_url) ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-select-flag", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { + src: language.flag_url, + alt: language.name, + title: language.name, + className: "flag" + }) + }) : /*#__PURE__*/(0,jsx_runtime.jsxs)("abbr", { + children: [language.slug, /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: language.name + })] + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-translation-icon", + children: icons_translation + }); +} +/* harmony default export */ const language_flag = (LanguageFlag); +// EXTERNAL MODULE: external {"this":["wp","components"]} +var external_this_wp_components_ = __webpack_require__(959); +;// ./js/src/editors/common/components/default-lang-icon/index.js +/* unused harmony import specifier */ var star; +/* unused harmony import specifier */ var Icon; +/* unused harmony import specifier */ var __; +/* unused harmony import specifier */ var _jsxs; +/* unused harmony import specifier */ var _Fragment; +/* unused harmony import specifier */ var _jsx; +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +const DefaultLangIcon = () => /*#__PURE__*/_jsxs(_Fragment, { + children: [/*#__PURE__*/_jsx(Icon, { + icon: star, + className: "pll-default-lang-icon" + }), /*#__PURE__*/_jsx("span", { + className: "screen-reader-text", + children: __('Default language.', 'polylang-pro') + })] +}); +/* harmony default export */ const default_lang_icon = ((/* unused pure expression or super */ null && (DefaultLangIcon))); +;// ./js/src/editors/common/components/language-item/index.js +/* unused harmony import specifier */ var useSelect; +/* unused harmony import specifier */ var language_item_; +/* unused harmony import specifier */ var language_item_MODULE_CORE_KEY; +/* unused harmony import specifier */ var language_item_LanguageFlag; +/* unused harmony import specifier */ var language_item_DefaultLangIcon; +/* unused harmony import specifier */ var language_item_jsxs; +/* unused harmony import specifier */ var language_item_Fragment; +/* unused harmony import specifier */ var language_item_jsx; +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + + + +const LanguageItem = ({ + language, + currentPost +}) => { + const postType = useSelect(select => select(language_item_MODULE_CORE_KEY).getPostType(currentPost.type), [currentPost]); + return /*#__PURE__*/language_item_jsxs(language_item_Fragment, { + children: [/*#__PURE__*/language_item_jsx("p", { + children: /*#__PURE__*/language_item_jsx("strong", { + children: language_item_('Language', 'polylang-pro') + }) + }), /*#__PURE__*/language_item_jsxs("div", { + className: "pll-language-item", + children: [/*#__PURE__*/language_item_jsx(language_item_LanguageFlag, { + language: language + }), /*#__PURE__*/language_item_jsx("span", { + className: "pll-language-name", + children: language.name + }), language.is_default && /*#__PURE__*/language_item_jsx(language_item_DefaultLangIcon, {})] + }), language.is_default && /*#__PURE__*/language_item_jsx("div", { + children: /*#__PURE__*/language_item_jsx("span", { + className: "pll-metabox-info", + children: 'wp_template_part' === postType?.slug ?? language_item_('This template part is used for languages that have not yet been translated.', 'polylang-pro') + }) + })] + }); +}; +/* harmony default export */ const language_item = ((/* unused pure expression or super */ null && (LanguageItem))); +;// ./js/src/editors/common/components/metaboxes/wrapper/index.js + +const MetaboxWrapper = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "components-panel__body is-opened", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-metabox-location", + children: children + }) + }); +}; +/* harmony default export */ const wrapper = (MetaboxWrapper); +;// ./js/src/editors/common/components/not-translatable-notice/index.js +/** + * WordPress Dependencies. + */ + + +const NotTranslatableNotice = ({ + postType +}) => { + if ('wp_template' === postType) { + return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-metabox-error components-notice is-warning", + children: (0,external_this_wp_i18n_.__)('Templates are not translatable, only template parts are.', 'polylang-pro') + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-metabox-error components-notice is-warning", + children: (0,external_this_wp_i18n_.__)('This entity is not translatable.', 'polylang-pro') + }); +}; +/* harmony default export */ const not_translatable_notice = (NotTranslatableNotice); +;// ./js/src/editors/common/components/metaboxes/container/index.js +/** + * WordPress Dependencies. + */ + + +/** + * Internal Dependencies. + */ + + + +const MetaboxContainer = ({ + isError, + isAllowedPostType, + postType, + children +}) => { + if (!isAllowedPostType) { + return /*#__PURE__*/(0,jsx_runtime.jsx)(wrapper, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(not_translatable_notice, { + postType: postType + }) + }); + } + if (isError) { + return /*#__PURE__*/(0,jsx_runtime.jsx)(wrapper, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-metabox-error components-notice is-error", + children: (0,external_this_wp_i18n_.__)('Unable to retrieve the content language', 'polylang-pro') + }) + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)(wrapper, { + children: children + }); +}; +/* harmony default export */ const container = (MetaboxContainer); +;// ./js/src/editors/common/components/translations-table/cells/add-or-edit/index.js + +const AddOrEditCell = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("td", { + className: "pll-edit-column pll-column-icon", + children: children + }); +}; +/* harmony default export */ const add_or_edit = (AddOrEditCell); +;// ./js/src/editors/common/components/translations-table/cells/default-language/index.js +/* unused harmony import specifier */ var default_language_DefaultLangIcon; +/* unused harmony import specifier */ var default_language_jsx; +/** + * Internal dependencies + */ + + +const DefaultLanguageCell = ({ + isDefault +}) => { + return /*#__PURE__*/default_language_jsx("td", { + className: "pll-default-lang-column pll-column-icon", + children: isDefault && /*#__PURE__*/default_language_jsx(default_language_DefaultLangIcon, {}) + }); +}; +/* harmony default export */ const default_language = ((/* unused pure expression or super */ null && (DefaultLanguageCell))); +;// ./js/src/editors/common/components/translations-table/cells/delete/index.js +/* unused harmony import specifier */ var delete_jsx; + +const DeleteCell = ({ + children +}) => { + return /*#__PURE__*/delete_jsx("td", { + className: "pll-delete-column pll-column-icon", + children: children + }); +}; +/* harmony default export */ const cells_delete = ((/* unused pure expression or super */ null && (DeleteCell))); +;// ./js/src/editors/common/components/translations-table/cells/flag/index.js +/** + * External dependencies. + */ + + +const FlagCell = ({ + language +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("th", { + className: "pll-language-column", + children: !(0,external_lodash_.isEmpty)(language.flag) ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-select-flag flag", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { + src: language.flag_url, + alt: language.name, + title: language.name + }) + }) : /*#__PURE__*/(0,jsx_runtime.jsxs)("abbr", { + children: [language.slug, /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: language.name + })] + }) + }); +}; +/* harmony default export */ const flag = (FlagCell); +;// ./js/src/editors/common/components/translations-table/cells/translation-input/index.js + +const TranslationInputCell = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("td", { + className: "pll-translation-column", + children: children + }); +}; +/* harmony default export */ const translation_input = (TranslationInputCell); +;// ./js/src/editors/common/components/translations-table/cells/index.js +/** + * Cells components for translations table. + */ + + + + + + +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/plus.js +/** + * Plus icon - plus Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const plus_isPrimitivesComponents = 'undefined' !== typeof wp.primitive; +const plus = plus_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M17 7v3h-5v5h-3v-5h-5v-3h5v-5h3v5h5z" + }) +}) : 'plus'; +/* harmony default export */ const icons_plus = (plus); +;// ./js/src/editors/common/components/buttons/add/index.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +/** + * Renders a button to add new translation. + * + * @param {Object} props Component props. + * @param {Object} props.language Language of the new translation. + * @param {string} props.href URL to add a new translation, pass '#' if managed in REST. + * @param {boolean} props.disabled Whether the button is disabled. + * @param {Function} props.handleAddClick Callback to add a translation, default to null. Useful only if the button is not a link. + * @return {React.ReactElement} Button component. + */ + +const AddButton = ({ + language, + href, + disabled, + handleAddClick = null +}) => { + const accessibilityText = (0,external_this_wp_i18n_.sprintf)( + // translators: %s is a native language name. + (0,external_this_wp_i18n_.__)('Add a translation in %s', 'polylang-pro'), language.name); + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + href: href, + disabled: disabled, + icon: icons_plus, + label: accessibilityText, + className: `pll-button`, + onClick: handleAddClick, + "data-target-language": language.slug // Store the target language to retrieve it through the click event. + , + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: accessibilityText + }) + }); +}; +/* harmony default export */ const add = (AddButton); +;// ./js/src/editors/common/components/buttons/delete/index.js +/* unused harmony import specifier */ var trash; +/* unused harmony import specifier */ var Button; +/* unused harmony import specifier */ var sprintf; +/* unused harmony import specifier */ var delete_; +/* unused harmony import specifier */ var buttons_delete_jsx; +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +/** + * Renders a button to delete a translation. + * + * @param {Object} props Component props. + * @param {Object} props.language Language of the existing translation. + * @param {boolean} props.disabled Whether the button is disabled. + * @param {Function} props.onClick Callback to delete a translation. + * @return {React.ReactElement} Button component. + */ + +const DeleteButton = ({ + language, + disabled, + onClick +}) => { + const translationScreenReaderText = sprintf( + // translators: %s is a native language name. + delete_('Delete the translation in %s', 'polylang-pro'), language.name); + return /*#__PURE__*/buttons_delete_jsx(Button, { + icon: trash, + label: translationScreenReaderText, + disabled: disabled, + className: "pll-button", + onClick: onClick, + children: /*#__PURE__*/buttons_delete_jsx("span", { + className: "screen-reader-text", + children: translationScreenReaderText + }) + }); +}; +/* harmony default export */ const buttons_delete = ((/* unused pure expression or super */ null && (DeleteButton))); +;// ./js/src/editors/common/components/buttons/persisting-user-data/index.js +/** + * WordPress dependencies + */ + + + + + + + +/** + * Prepares user preference data for API call. + * + * @param {Object} currentUser The current user object. + * @param {string} userPreferenceName The user preference name. + * @param {string} postType The post type. + * @param {boolean} isActive Current active state. + * @return {Object} Prepared data for API call. + */ + +const prepareUserPreferenceData = (currentUser, userPreferenceName, postType, isActive) => { + /* + * If the user meta is an empty array, it has never been created. + * So we convert it as an object to be able to update correctly its value in DB. + */ + if (undefined === currentUser[userPreferenceName] || Array.isArray(currentUser[userPreferenceName]) && currentUser[userPreferenceName].length === 0) { + currentUser[userPreferenceName] = {}; + } + + // Updates currentUser preference. + currentUser[userPreferenceName][postType] = !isActive; + return { + [userPreferenceName]: currentUser[userPreferenceName] + }; +}; + +/** + * Button to persist user data per post type. + * + * @param {Object} props The component props. + * @param {string} props.id The button id attribute. + * @param {string} props.postType The post type. + * @param {string} props.userPreferenceName The user preference name. + * @param {string} props.activeLabel The active label. + * @param {string} props.inactiveLabel The inactive label. + * @param {Object} props.icon The icon. + * + * @return {React.ReactNode} The Persisting User Data Button. + */ +const PersistingUserDataButton = ({ + id, + postType, + userPreferenceName, + activeLabel, + inactiveLabel, + icon +}) => { + const currentUser = (0,external_this_wp_data_.useSelect)(select => select(external_this_wp_coreData_.store).getCurrentUser(), []); + const [isLoading, setIsLoading] = (0,external_this_wp_element_.useState)(false); + const { + createErrorNotice + } = (0,external_this_wp_data_.useDispatch)(external_this_wp_notices_.store); + const buttonInitialState = () => { + if (undefined === currentUser || undefined === currentUser[userPreferenceName] || undefined === currentUser[userPreferenceName][postType]) { + return false; + } + return currentUser[userPreferenceName][postType]; + }; + const [isActive, setIsActive] = (0,external_this_wp_element_.useState)(buttonInitialState); + const saveStateInUserPreferences = () => { + setIsLoading(true); + const data = prepareUserPreferenceData(currentUser, userPreferenceName, postType, isActive); + + // Saves the preference. + external_this_wp_apiFetch_default()({ + path: '/wp/v2/users/me', + data, + method: 'POST' + }).then(() => { + // Update component state only on successful API call. + setIsActive(prevIsActive => !prevIsActive); + }).catch(error => { + createErrorNotice(error.message, { + type: 'snackbar' + }); + }).finally(() => { + // Always reset loading state. + setIsLoading(false); + }); + }; + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + id: id, + className: `pll-button pll-before-post-translations-button ${isActive && `wp-ui-text-highlight`}`, + onClick: saveStateInUserPreferences, + icon: icon, + label: isActive ? activeLabel : inactiveLabel, + isBusy: isLoading, + disabled: isLoading, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: isActive ? activeLabel : inactiveLabel + }) + }); +}; +/* harmony default export */ const persisting_user_data = (PersistingUserDataButton); +;// ./js/src/editors/common/components/buttons/machine-translation/index.js +/** + * WordPress dependencies + */ + + + + +/** + * Internal dependencies + */ + + + +/** + * Machine Translation Button + * + * @return {React.ReactNode|null} The Machine Translation Button, `null` if disabled. + */ + +const MachineTranslationButton = () => { + const postType = (0,external_this_wp_data_.useSelect)(select => select(MODULE_CORE_EDITOR_KEY).getCurrentPostType(), []); + const machineTranslation = pll_block_editor_plugin_settings?.machine_translation; + if (!machineTranslation || !machineTranslation.isActive) { + return null; + } + const { + path_d, + ...iconProps + } = machineTranslation.icon; // eslint-disable-line camelcase + + const icon = { + type: 'svg', + props: { + ...iconProps, + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: path_d + }) // eslint-disable-line camelcase + } + }; + return /*#__PURE__*/(0,jsx_runtime.jsx)(persisting_user_data, { + id: 'pll-machine-translation', + postType, + userPreferenceName: `pll_machine_translation_${machineTranslation.slug}`, + activeLabel: (0,external_this_wp_i18n_.sprintf)(/* translators: %s is the name of the machine translation service. */ + (0,external_this_wp_i18n_.__)('Deactivate %s machine translation', 'polylang-pro'), machineTranslation.name), + inactiveLabel: (0,external_this_wp_i18n_.sprintf)(/* translators: %s is the name of the machine translation service. */ + (0,external_this_wp_i18n_.__)('Activate %s machine translation', 'polylang-pro'), machineTranslation.name), + icon + }); +}; +/* harmony default export */ const machine_translation = (MachineTranslationButton); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/duplication.js +/** + * Duplication icon - admin-page Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const duplication_isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const duplication = duplication_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M6 15v-13h10v13h-10zM5 16h8v2h-10v-13h2v11z" + }) +}) : 'admin-page'; +/* harmony default export */ const icons_duplication = (duplication); +;// ./js/src/editors/common/components/buttons/duplicate/index.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + + +/** + * Duplicate Button + * + * @param {Object} props The component props. + * + * @return {React.ReactNode|null} The Duplicate Button, `null` if loading. + */ + +const DuplicateButton = props => { + const postType = (0,external_this_wp_data_.useSelect)(select => select(MODULE_CORE_EDITOR_KEY).getCurrentPostType(), []); + if (!postType) { + return null; + } + const newProps = { + ...props, + id: 'pll-duplicate', + userPreferenceName: 'pll_duplicate_content', + /* translators: accessibility text */ + activeLabel: (0,external_this_wp_i18n_.__)('Deactivate the content duplication', 'polylang-pro'), + /* translators: accessibility text */ + inactiveLabel: (0,external_this_wp_i18n_.__)('Activate the content duplication', 'polylang-pro'), + icon: icons_duplication, + postType + }; + return /*#__PURE__*/(0,jsx_runtime.jsx)(persisting_user_data, { + ...newProps + }); +}; +/* harmony default export */ const duplicate = (DuplicateButton); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/pencil.js +/** + * Pencil icon - edit Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const pencil_isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const pencil = pencil_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M13.89 3.39l2.71 2.72c0.46 0.46 0.42 1.24 0.030 1.64l-8.010 8.020-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.030c0.39-0.39 1.22-0.39 1.68 0.070zM11.16 6.18l-5.59 5.61 1.11 1.11 5.54-5.65zM8.19 14.41l5.58-5.6-1.070-1.080-5.59 5.6z" + }) +}) : 'edit'; +/* harmony default export */ const icons_pencil = (pencil); +;// ./js/src/editors/common/components/buttons/edit/index.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +/** + * Renders a button to edit existing translation. + * + * @param {Object} props Component props. + * @param {Object} props.language Language of the existing translation. + * @param {string} props.href URL to edit a new translation, pass '#' if managed in REST. + * @param {boolean} props.disabled Whether the button is disabled. + * @param {Function} props.handleEditClick Callback to edit a translation, default to null. Useful only if the button is not a link. + * @return {React.ReactElement} Button component. + */ + +const EditButton = ({ + language, + href, + disabled, + handleEditClick = null +}) => { + const accessibilityText = (0,external_this_wp_i18n_.sprintf)(/* translators: accessibility text, %s is a native language name. For example Deutsch for German or Français for french. */ + (0,external_this_wp_i18n_.__)('Edit the translation in %s', 'polylang-pro'), language.name); + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + href: href, + disabled: disabled, + icon: icons_pencil, + label: accessibilityText, + className: `pll-button`, + onClick: handleEditClick, + "data-target-language": language.slug // Store the target language to retrieve it through the click event. + , + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: accessibilityText + }) + }); +}; +/* harmony default export */ const edit = (EditButton); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/synchronization.js +/** + * Synchronization icon - controls-repeat Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const synchronization_isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const synchronization = synchronization_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M5 7v3l-2 1.5v-6.5h11v-2l4 3.010-4 2.99v-2h-9zM15 13v-3l2-1.5v6.5h-11v2l-4-3.010 4-2.99v2h9z" + }) +}) : 'controls-repeat'; +/* harmony default export */ const icons_synchronization = (synchronization); +// EXTERNAL MODULE: external {"this":["wp","editor"]} +var external_this_wp_editor_ = __webpack_require__(2); +;// ./js/src/editors/common/components/buttons/synchronization/use-dispatch-current-post-title.js +/** + * WordPress dependencies + */ + + +/** + * Custom hook to dispatch the current post title to the translation table reducer. + * + * @param {Object} language The language object. + * @param {Function} translationTableReducer The translation table reducer. + * @param {Object} sourcePost The source post object. + * @param {Object|null} post The post object, null when no translation. + * @return {void} + */ +const useDispatchCurrentPostTitle = (language, translationTableReducer, sourcePost, post) => { + (0,external_this_wp_element_.useEffect)(() => { + if (sourcePost.pll_sync_post[language.slug] && sourcePost.translations[language.slug] && sourcePost.title !== post?.title) { + const translatedPost = { + ...sourcePost, + // Keep synchronized post title up to date. + title: sourcePost.title + }; + translatedPost.id = post?.id ?? 0; + translationTableReducer({ + type: 'add_translation', + lang: language, + post: { + ...translatedPost + } + }); + } + }, [language, translationTableReducer, sourcePost, post]); +}; +/* harmony default export */ const use_dispatch_current_post_title = (useDispatchCurrentPostTitle); +;// ./js/src/editors/common/components/buttons/synchronization/index.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + + + + + +/** + * Internal dependencies + */ + + + +/** + * Prepares the sync posts object to be stored with a REST field. + * + * @param {Object} syncPosts The sync posts object. + * @return {Object} The prepared sync posts object, with boolean values converted to strings. + */ + +const prepareSyncPosts = syncPosts => { + return Object.fromEntries(Object.entries(syncPosts).map(([key, value]) => [key, value.toString()])); +}; + +/** + * Synchronization button component. + * + * @param {Object} props The props object. + * @param {Object} props.post The post object. + * @param {Object} props.language The language object. + * @param {Object} props.translationTableReducer The translation table reducer. + * @param {boolean} props.disabled Whether the button is disabled. + * @return {React.Component} The synchronization button component. + */ +const SynchronizationButton = ({ + post, + language, + translationTableReducer, + disabled +}) => { + const [isSynchronized, setIsSynchronized] = (0,external_this_wp_element_.useState)(false); + const [isTranslated, setIsTranslated] = (0,external_this_wp_element_.useState)(false); + const [isModalOpen, setIsModalOpen] = (0,external_this_wp_element_.useState)(false); + const sourcePost = (0,external_this_wp_data_.useSelect)(() => { + return (0,external_this_wp_data_.select)(external_this_wp_editor_.store).getCurrentPost(); + }, []); + use_dispatch_current_post_title(language, translationTableReducer, sourcePost, post); + const buttonLabel = (0,external_this_wp_element_.useMemo)(() => { + return isSynchronized ? (0,external_this_wp_i18n_.__)('Unsynchronize this post', 'polylang-pro') : (0,external_this_wp_i18n_.__)('Synchronize this post', 'polylang-pro'); + }, [isSynchronized]); + const toggleSynchronizationStatus = () => { + const syncPosts = sourcePost.pll_sync_post; + if (isSynchronized) { + delete syncPosts[language.slug]; + setIsSynchronized(false); + } else { + syncPosts[language.slug] = true; + setIsSynchronized(true); + setIsTranslated(true); + if (!post) { + post = { + id: 0 + }; + } + translationTableReducer({ + type: 'add_translation', + lang: language, + post: { + // Optimistic rendering. + ...post, + title: sourcePost.title + } + }); + (0,external_this_wp_data_.dispatch)(external_this_wp_coreData_.store).invalidateResolution('getEntityRecord', ['postType', post.type, post.id]); + } + (0,external_this_wp_data_.dispatch)(MODULE_CORE_EDITOR_KEY).editPost({ + pll_sync_post: prepareSyncPosts(syncPosts) + }); + }; + (0,external_this_wp_element_.useEffect)(() => { + setIsTranslated(post?.id !== undefined); + setIsSynchronized(sourcePost.pll_sync_post[language.slug] !== undefined); + }, [sourcePost, language, post]); + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + icon: icons_synchronization, + label: buttonLabel, + id: `pll_sync_post[${language.slug}]`, + className: `pll-button ${isSynchronized && 'wp-ui-text-highlight'}`, + onClick: () => { + if (!isSynchronized && isTranslated) { + setIsModalOpen(true); + } else { + toggleSynchronizationStatus(); + } + }, + disabled: disabled, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: buttonLabel + }) + }), isModalOpen && /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_components_.Modal, { + title: (0,external_this_wp_i18n_.__)('Synchronize this post', 'polylang-pro'), + onRequestClose: () => { + setIsModalOpen(false); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { + children: (0,external_this_wp_i18n_.__)('You are about to overwrite an existing translation. Are you sure you want to proceed?', 'polylang-pro') + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + role: "group", + className: "components-button-group buttons", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + variant: "tertiary", + onClick: () => { + setIsModalOpen(false); + }, + type: "button", + children: (0,external_this_wp_i18n_.__)('Cancel', 'polylang-pro') + }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + children: "\xA0" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + variant: "primary", + onClick: () => { + toggleSynchronizationStatus(); + setIsModalOpen(false); + }, + type: "submit", + children: (0,external_this_wp_i18n_.__)('Synchronize', 'polylang-pro') + })] + })] + })] + }); +}; +/* harmony default export */ const buttons_synchronization = (SynchronizationButton); +;// ./js/src/editors/common/components/buttons/index.js +/** + * Buttons components. + */ + + + + + + + +// EXTERNAL MODULE: external {"this":["wp","htmlEntities"]} +var external_this_wp_htmlEntities_ = __webpack_require__(989); +;// ./js/src/editors/common/components/translations-table/input/index.js +/** + * WordPress dependencies + */ + + + + + + + + +/** + * Internal dependencies + */ + + +/** + * Translation input component. + * + * @param {Object} props The component props. + * @param {Object} props.language The language object. + * @param {Object} props.source The source post object. + * @param {Object} props.translation The translation post object. + * @param {Object} props.tableDispatch The table dispatch function. + * @param {Map} props.translationsTable The translations table object. + * @return {React.Component} The translation input component. + */ + +const TranslationInput = ({ + language, + source, + translation, + tableDispatch, + translationsTable +}) => { + const [options, setOptions] = (0,external_this_wp_element_.useState)(translation ? [{ + value: translation.id, + label: getPostTitle(translation) + }] : []); + const [value, setValue] = (0,external_this_wp_element_.useState)(translation ? translation.id : null); + const [isLoading, setIsLoading] = (0,external_this_wp_element_.useState)(false); + (0,external_this_wp_element_.useEffect)(() => { + if (translation && options.length === 0) { + setOptions([{ + value: translation.id, + label: getPostTitle(translation) + }]); + } + }, [translation, options]); + (0,external_this_wp_element_.useEffect)(() => { + if (translation) { + if (options.find(option => option.value === translation.id && option.label !== getPostTitle(translation) || option.value !== translation.id && 0 === option.value && option.label === getPostTitle(translation))) { + // Set options for optimistically rendered translation. + setOptions([{ + value: translation.id, + label: getPostTitle(translation) + }]); + } + setValue(translation.id); + } else { + setValue(null); + } + }, [translation, options]); // eslint-disable-line react-hooks/exhaustive-deps + + const onInputChange = nextValue => { + setValue(nextValue); + if ((0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY).isEditedPostNew()) { + (0,external_this_wp_data_.dispatch)(MODULE_CORE_EDITOR_KEY).savePost(); + } + if (!nextValue) { + tableDispatch({ + type: 'remove_translation', + lang: language + }); + const newTranslations = { + ...transformTranslationsTableToObject(translationsTable) + }; + delete newTranslations[language.slug]; + (0,external_this_wp_data_.dispatch)(MODULE_CORE_EDITOR_KEY).editPost({ + translations: newTranslations + }); + return; + } + const postToRender = getPostToRender(options, nextValue); + if (!postToRender) { + return; + } + tableDispatch({ + type: 'add_translation', + lang: language, + post: postToRender // Optimistically rendered post. + }); + (0,external_this_wp_data_.dispatch)(MODULE_CORE_EDITOR_KEY).editPost({ + translations: { + ...transformTranslationsTableToObject(translationsTable), + [language.slug]: parseInt(nextValue, 10) + } + }); + }; + const fetchUntranslatedPosts = (0,external_this_wp_element_.useCallback)(search => { + if ('' === search) { + return []; + } + setIsLoading(true); + external_this_wp_apiFetch_default()({ + path: (0,external_this_wp_url_.addQueryArgs)('/pll/v1/untranslated-posts', { + search, + include: source.id, + untranslated_in: source.lang, + lang: language.slug, + type: source.type, + context: 'edit' + }) + }).then(posts => { + setOptions(posts.map(post => { + return { + value: parseInt(post.id, 10), + label: getPostTitle(post) + }; + })); + }).finally(() => { + setIsLoading(false); + }); + }, [source, language, setOptions]); + const debounce = (0,external_this_wp_element_.useCallback)(callback => { + let timeoutId; + return (...args) => { + clearTimeout(timeoutId); + timeoutId = setTimeout(() => callback(...args), 300); + }; + }, []); + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ComboboxControl, { + value: value, + options: options, + isLoading: isLoading, + onChange: onInputChange, + placeholder: (0,external_this_wp_i18n_.__)('Search for a post', 'polylang-pro'), + onFilterValueChange: debounce(fetchUntranslatedPosts), + __next40pxDefaultSize: true + }); +}; + +/** + * Gets the post title. + * + * @param {Object} post The post object. + * @return {string} The post title, or an empty string if the post has no title. + */ +const getPostTitle = post => { + /** + * @member {{rendered: ?string, raw: ?string}|string} post.title + */ + return (0,external_this_wp_htmlEntities_.decodeEntities)(post.title?.rendered ?? post.title?.raw ?? post.title ?? ''); +}; + +/** + * Gets the post to render. + * + * @param {Object} options The options object. + * @param {string} nextValue The next value. + * @return {Object|null} The post to render, or null if the post is not found. + */ +const getPostToRender = (options, nextValue) => { + const value = options.find(option => option.value === nextValue); + if (!value) { + return null; + } + return { + id: value.value, + title: value.label + }; +}; + +/** + * Transforms the translations table to an object. + * + * @param {Map} translationsTable The translations table. + * @return {Object} The translations object. + */ +const transformTranslationsTableToObject = translationsTable => { + const translationsObject = {}; + translationsTable.forEach((translationPost, lang) => { + if (!translationPost || !translationPost.id) { + return; + } + translationsObject[lang.slug] = translationPost.id; + }); + return translationsObject; +}; +/* harmony default export */ const input = (TranslationInput); +;// ./js/src/editors/common/components/translations-table/rows/index.js +/** + * Internal dependencies. + */ + + +const TranslationRow = ({ + language, + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(flag, { + language: language + }), children] + }); +}; +/* harmony default export */ const rows = (TranslationRow); +;// ./js/src/editors/common/components/plugin-feature-flag-button/index.js +/** + * Defines as extensibility slot for the metabox . + */ + +/** + * WordPress dependencies + */ + + +const { + Fill, + Slot +} = (0,external_this_wp_components_.createSlotFill)('PluginFeatureFlagButton'); + +/** + * Plugin feature flag button. + * + * @example + * ```js + * import { registerPlugin } from '@wordpress/plugins'; + * import { PluginFeatureFlagButton } from '@wpsyntex/polylang'; + * import { YourCustomButton } from './your-custom-button'; + * + * registerPlugin( 'pll-plugin-feature-flag-button', { + * render: () => ( + * + * + * + * ), + * } ); + * ``` + * + * @param {Object} props The component props. + * @param {React.ReactNode} props.children The children. + * @param {string} props.className The class name. + * + * @return {React.ReactNode} The Plugin Feature Flag Button. + */ +const PluginFeatureFlagButton = ({ + children, + className +}) => /*#__PURE__*/(0,jsx_runtime.jsx)(Fill, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: className, + children: children + }) +}); +PluginFeatureFlagButton.Slot = Slot; +/* harmony default export */ const plugin_feature_flag_button = (PluginFeatureFlagButton); +;// ./js/src/editors/common/components/translations-table/wrapper/index.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + +const TranslationsTableWrapper = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + id: "post-translations", + className: "translations", + children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: "pll-translations-table-header", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { + className: "pll-translations-table-header-title", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", { + children: (0,external_this_wp_i18n_.__)('Translations', 'polylang-pro') + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(plugin_feature_flag_button.Slot, { + children: fills => fills.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-plugin-feature-button-container", + children: fills + }) + }) + })] + }), /*#__PURE__*/(0,jsx_runtime.jsx)("table", { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", { + children: children + }) + })] + }); +}; +/* harmony default export */ const translations_table_wrapper = (TranslationsTableWrapper); +;// ./js/src/editors/common/components/translations-table/plugin-feature-table-row-button/index.js +/** + * Defines as extensibility slot for the translations table row. + */ + +/** + * WordPress dependencies + */ + + + +const createSlotFillWithId = id => (0,external_this_wp_components_.createSlotFill)(`PluginFeatureTableRowButton_${id}`); + +/** + * Plugin feature table row button fill. + * Ideally one per language. + * + * @example + * ```js + * import { registerPlugin } from '@wordpress/plugins'; + * import { PluginFeatureTableRowButtonFill } from '@wpsyntex/polylang'; + * import { YourCustomButton } from './your-custom-button'; + * + * // You may want to loop through the languages and register one fill per language. + * registerPlugin( 'pll-plugin-feature-table-row-button-fill', { + * render: () => ( + * + * + * + * ), + * } ); + * ``` + * + * @param {Object} props The component props. + * @param {React.ReactNode} props.children The children. + * @param {string} props.className The class name. + * @param {string} props.languageSlug The language slug, used to generate a unique slot fill. + * + * @return {React.ReactNode} The plugin feature table row button fill. + */ +const PluginFeatureTableRowButtonFill = ({ + children, + className, + languageSlug +}) => { + const { + Fill + } = createSlotFillWithId(languageSlug); + return /*#__PURE__*/(0,jsx_runtime.jsx)(Fill, { + children: drilledProps => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: className, + children: external_this_wp_element_.Children.map(children, child => (0,external_this_wp_element_.cloneElement)(child, { + language: drilledProps.language, + translation: drilledProps.translation, + translationTableReducer: drilledProps.translationTableReducer + })) + }); + } + }); +}; + +/** + * Plugin feature table row button slot. + * Ideally one per language. + * + * @param {Object} props The component props. + * @param {string} props.language The language object, used to generate a unique slot fill. + * @param {Object} props.translation The translated object. + * @param {Object} props.translationTableReducer The table dispatch object. + * + * @return {React.ReactNode} The plugin feature table row button slot. + */ +const PluginFeatureTableRowButtonSlot = ({ + language, + translation, + translationTableReducer +}) => { + const { + Slot + } = createSlotFillWithId(language.slug); + return /*#__PURE__*/(0,jsx_runtime.jsx)(Slot, { + bubblesVirtually: true, + as: "td", + fillProps: { + language, + translation, + translationTableReducer + }, + className: "pll-feature-button-row-container" + }); +}; + +;// ./js/src/editors/common/hooks/use-authorized-languages.js +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + +/** + * Custom hook to get the memoized authorized languages. + * + * @return {Map} The memoized authorized languages. + */ +const useAuthorizedLanguages = () => { + /** + * @type {Map} + */ + const languages = (0,external_this_wp_data_.useSelect)(select => select(MODULE_KEY).getLanguages()); + const authorizedLanguagesSlugs = pll_block_editor_plugin_settings?.authorizedLanguagesSlugs; + return (0,external_this_wp_element_.useMemo)(() => { + if (!authorizedLanguagesSlugs) { + return languages; + } + return new Map(authorizedLanguagesSlugs.map(languageSlug => { + const language = languages.get(languageSlug); + if (language) { + return [languageSlug, language]; + } + return null; + }).filter(Boolean)); + }, [languages, authorizedLanguagesSlugs]); +}; +/* harmony default export */ const use_authorized_languages = (useAuthorizedLanguages); +;// ./js/src/editors/common/components/translations-table/post-editor/index.js +/** + * WordPress dependencies + */ + + + + + +/** + * Internal dependencies + */ + + + + + + + + +/** + * Add or edit button component, used in post editor because of clickable links. + * + * @param {Object} props The props object. + * @param {boolean} props.canUpdate Whether the user can update the translation. + * @param {boolean} props.canCreate Whether the user can create the translation. + * @param {boolean} props.canRead Whether the user can read the translation. + * @param {Object} props.language The language object. + * @param {Object} props.currentPost The current post object. + * @return {React.ReactNode} The add or edit button component. + */ + +const AddOrEditButton = ({ + canUpdate, + canCreate, + canRead, + language, + currentPost +}) => { + const [translationId, setTranslationId] = (0,external_this_wp_element_.useState)(currentPost.translations[language.slug] ? currentPost.translations[language.slug] : null); + (0,external_this_wp_element_.useEffect)(() => { + setTranslationId(currentPost.translations[language.slug] ? currentPost.translations[language.slug] : null); + }, [currentPost, language, setTranslationId]); + if (canUpdate || canRead) { + // Show Edit button for existing translations (disabled if user can only read). + // eslint-disable-next-line prettier/prettier + const baseEditUrl = `${location.origin}/${(0,external_this_wp_url_.getPath)(location.href)}`.replace('post-new.php', 'post.php'); + const editUrl = `${baseEditUrl}?post=${translationId}&action=edit`; + return /*#__PURE__*/(0,jsx_runtime.jsx)(edit, { + href: editUrl, + language: language, + disabled: !canUpdate + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)(add, { + href: pll_block_editor_plugin_settings.new_post_translation_links[language.slug], + language: language, + disabled: !canCreate + }); +}; + +/** + * Post Editor Translations Table component. + * + * @param {Object} props The component props. + * @param {Object} props.currentPost The current post. + * @param {Map} props.translationsTable The translations table, contains language object as key and post object as value. + * @param {Function} props.tableDispatch The translations table dispatch function. + * @return {React.Component} The Post Editor Translations Table component. + */ +const PostEditorTranslationsTable = ({ + currentPost, + translationsTable, + tableDispatch +}) => { + const table = []; + const authorizedLanguages = use_authorized_languages(); + translationsTable.forEach((translation, language) => { + // Don't display current post in the translation table. + if (currentPost.lang === language.slug) { + return null; + } + const canCreate = !translation && authorizedLanguages.has(language.slug) && (0,external_this_wp_data_.select)(external_this_wp_coreData_.store).canUser('create', { + kind: 'postType', + name: currentPost.type, + lang: language.slug + }); + const canUpdate = translation && (0,external_this_wp_data_.select)(external_this_wp_coreData_.store).canUser('update', { + kind: 'postType', + name: currentPost.type, + id: translation.id + }); + table.push(/*#__PURE__*/(0,jsx_runtime.jsx)("tr", { + children: /*#__PURE__*/(0,jsx_runtime.jsxs)(rows, { + language: language, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(add_or_edit, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(AddOrEditButton, { + canUpdate: canUpdate, + canCreate: canCreate, + canRead: !!translation, + language: language, + currentPost: currentPost + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(PluginFeatureTableRowButtonSlot, { + language: language, + translation: translation, + translationTableReducer: tableDispatch + }), /*#__PURE__*/(0,jsx_runtime.jsx)(translation_input, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(input, { + language: language, + source: currentPost, + translation: translation, + tableDispatch: tableDispatch, + translationsTable: translationsTable + }) + })] + }) + }, language.slug)); + }); + return /*#__PURE__*/(0,jsx_runtime.jsx)(translations_table_wrapper, { + children: table + }); +}; +/* harmony default export */ const post_editor = (PostEditorTranslationsTable); +;// ./js/src/editors/common/components/delete-modal-body/index.js +/* unused harmony import specifier */ var delete_modal_body_; +/* unused harmony import specifier */ var delete_modal_body_jsxs; +/* unused harmony import specifier */ var delete_modal_body_jsx; +/* unused harmony import specifier */ var delete_modal_body_Fragment; +/** + * WordPress dependencies + */ + + +const DeleteModalBody = ({ + isDefaultLang +}) => { + const defaultLangText = () => { + if (!isDefaultLang) { + return null; + } + return /*#__PURE__*/delete_modal_body_jsxs("p", { + children: [delete_modal_body_('You are about to delete an entity in the default language.', 'polylang-pro'), /*#__PURE__*/delete_modal_body_jsx("br", {}), delete_modal_body_('This will delete its customizations and all its corresponding translations.', 'polylang-pro')] + }); + }; + return /*#__PURE__*/delete_modal_body_jsxs(delete_modal_body_Fragment, { + children: [defaultLangText(), /*#__PURE__*/delete_modal_body_jsx("p", { + children: delete_modal_body_('Are you sure you want to delete this translation?', 'polylang-pro') + })] + }); +}; +/* harmony default export */ const delete_modal_body = ((/* unused pure expression or super */ null && (DeleteModalBody))); +;// ./js/src/editors/common/components/delete-with-confirmation/use-delete-post.js +/* unused harmony import specifier */ var coreStore; +/* unused harmony import specifier */ var use_delete_post_; +/* unused harmony import specifier */ var use_delete_post_sprintf; +/* unused harmony import specifier */ var useDispatch; +/* unused harmony import specifier */ var noticesStore; +/* unused harmony import specifier */ var use_delete_post_POST_TYPE_WITH_TRASH; +/** + * WordPress dependencies + * + */ + + + + + +const useDeletePost = () => { + const { + deleteEntityRecord + } = useDispatch(coreStore); + const { + createSuccessNotice, + createErrorNotice + } = useDispatch(noticesStore); + const handleDelete = async post => { + try { + const forceDelete = !use_delete_post_POST_TYPE_WITH_TRASH.includes(post.type); + await deleteEntityRecord('postType', post.type, post.id, { + force: forceDelete + }, { + throwOnError: true + }); + createSuccessNotice(use_delete_post_('The translation has been deleted.', 'polylang-pro'), { + type: 'snackbar' + }); + } catch (error) { + createErrorNotice(use_delete_post_sprintf(/* translators: %s: Error message describing why the post could not be deleted. */ + use_delete_post_('Unable to delete the translation. %s', 'polylang-pro'), error?.message), { + type: 'snackbar' + }); + } + }; + return { + handleDelete + }; +}; +/* harmony default export */ const use_delete_post = ((/* unused pure expression or super */ null && (useDeletePost))); +;// ./js/src/editors/common/components/delete-with-confirmation/maybe-redirect.js +/* unused harmony import specifier */ var addQueryArgs; +/** + * WordPress dependencies + * + */ + +const maybeRedirect = (postLang, postType) => { + if (!postLang.is_default || 'page' === postType) { + return; + } + const newUrl = window.location.origin + wp.sanitize.stripTags(window.location.pathname); // phpcs:ignore WordPressVIPMinimum.JS.Window.location + + const queryString = {}; + switch (postType) { + case 'wp_navigation': + queryString.path = '/navigation'; + break; + case 'wp_block': + queryString.path = '/patterns'; + queryString.categoryType = postType; + break; + case 'wp_template_part': + queryString.path = '/' + postType + '/all'; + break; + } + location.href = addQueryArgs(newUrl, queryString); // eslint-disable-line no-undef +}; +/* harmony default export */ const maybe_redirect = ((/* unused pure expression or super */ null && (maybeRedirect))); +;// ./js/src/editors/common/components/delete-with-confirmation/index.js +/* unused harmony import specifier */ var Modal; +/* unused harmony import specifier */ var delete_with_confirmation_Button; +/* unused harmony import specifier */ var delete_with_confirmation_; +/* unused harmony import specifier */ var useState; +/* unused harmony import specifier */ var delete_with_confirmation_useSelect; +/* unused harmony import specifier */ var coreDataStore; +/* unused harmony import specifier */ var delete_with_confirmation_DeleteButton; +/* unused harmony import specifier */ var delete_with_confirmation_DeleteModalBody; +/* unused harmony import specifier */ var delete_with_confirmation_useDeletePost; +/* unused harmony import specifier */ var delete_with_confirmation_maybeRedirect; +/* unused harmony import specifier */ var delete_with_confirmation_useAuthorizedLanguages; +/* unused harmony import specifier */ var delete_with_confirmation_jsxs; +/* unused harmony import specifier */ var delete_with_confirmation_Fragment; +/* unused harmony import specifier */ var delete_with_confirmation_jsx; +/** + * WordPress Dependencies. + * + */ + + + + + + +/** + * Internal Dependencies. + */ + + + + + + +/** + * Delete with confirmation component. + * + * @param {Object} props The component props. + * @param {Object} props.post The post object. + * @param {Object} props.language The language object. + * @param {Function} props.onDeleteSuccess The on delete success function. + * @return {React.Component} The Delete with confirmation component. + */ + +const DeleteWithConfirmation = ({ + post, + language, + onDeleteSuccess +}) => { + const [isOpen, setOpen] = useState(false); + const openModal = () => setOpen(true); + const closeModal = () => setOpen(false); + const authorizedLanguages = delete_with_confirmation_useAuthorizedLanguages(); + const canTrash = delete_with_confirmation_useSelect(select => { + return post && select(coreDataStore).canUser('delete', { + kind: 'postType', + name: post.type, + id: post.id + }); + }, [post]); + const { + handleDelete + } = delete_with_confirmation_useDeletePost(); + return /*#__PURE__*/delete_with_confirmation_jsxs(delete_with_confirmation_Fragment, { + children: [/*#__PURE__*/delete_with_confirmation_jsx(delete_with_confirmation_DeleteButton, { + onClick: openModal, + language: language, + disabled: !canTrash || !authorizedLanguages.has(language.slug) + }), isOpen && /*#__PURE__*/delete_with_confirmation_jsxs(Modal, { + title: "Delete", + onRequestClose: closeModal, + children: [/*#__PURE__*/delete_with_confirmation_jsx(delete_with_confirmation_DeleteModalBody, { + isDefaultLang: language.is_default && 'page' !== post?.type // No message for default language deletion with a page. + }), /*#__PURE__*/delete_with_confirmation_jsxs("div", { + role: "group", + className: "components-button-group buttons", + children: [/*#__PURE__*/delete_with_confirmation_jsx(delete_with_confirmation_Button, { + variant: "tertiary", + onClick: closeModal, + type: "button", + children: delete_with_confirmation_('Cancel', 'polylang-pro') + }), /*#__PURE__*/delete_with_confirmation_jsx("span", { + children: "\xA0" + }), /*#__PURE__*/delete_with_confirmation_jsx(delete_with_confirmation_Button, { + variant: "primary", + onClick: () => { + handleDelete(post, post.type).then(() => onDeleteSuccess()); + closeModal(); + delete_with_confirmation_maybeRedirect(language, post.type); + }, + type: "submit", + children: delete_with_confirmation_('Delete', 'polylang-pro') + })] + })] + })] + }); +}; +/* harmony default export */ const delete_with_confirmation = ((/* unused pure expression or super */ null && (DeleteWithConfirmation))); +;// ./js/src/editors/common/hooks/use-default-language.js +/* unused harmony import specifier */ var use_default_language_select; +/* unused harmony import specifier */ var useMemo; +/* unused harmony import specifier */ var use_default_language_; +/* unused harmony import specifier */ var use_default_language_MODULE_KEY; +/** + * WordPress dependencies + */ + + + + +/** + * Internal dependencies + */ + + +/** + * Custom hook to get the default language and memoize it. + * + * @return {Object} The default language. + * @throws {Error} If the default language is not found. + */ +const useDefaultLanguage = () => { + return useMemo(() => { + const languages = use_default_language_select(use_default_language_MODULE_KEY).getLanguages(); + const defaultLanguage = Array.from(languages.values()).find(language => language.is_default); + if (!defaultLanguage) { + throw new Error(use_default_language_('Default language not found, please check your languages settings.', 'polylang-pro')); + } + return defaultLanguage; + }, []); +}; +/* harmony default export */ const use_default_language = ((/* unused pure expression or super */ null && (useDefaultLanguage))); +;// ./js/src/editors/common/components/translations-table/site-editor/use-create-translation.js +/* unused harmony import specifier */ var use_create_translation_; +/* unused harmony import specifier */ var use_create_translation_useDispatch; +/* unused harmony import specifier */ var use_create_translation_coreStore; +/* unused harmony import specifier */ var use_create_translation_noticesStore; +/* unused harmony import specifier */ var apiFetch; +/* unused harmony import specifier */ var useCallback; +/* unused harmony import specifier */ var use_create_translation_useDefaultLanguage; +/** + * WordPress dependencies + */ + + + + + + + +/** + * Internal dependencies + */ + +const useCreateTranslation = () => { + const { + createSuccessNotice, + createErrorNotice + } = use_create_translation_useDispatch(use_create_translation_noticesStore); + const { + saveEntityRecord + } = use_create_translation_useDispatch(use_create_translation_coreStore); + const defaultLanguage = use_create_translation_useDefaultLanguage(); + + /** + * Persists the default language template part. + * + * @param {Object} templatePart The template part object. + * @return {Promise} The persisted template part object. + */ + const persistDefaultLanguageTemplatePart = useCallback(templatePart => { + const promise = saveEntityRecord('postType', 'wp_template_part', { + id: templatePart.id, + lang: defaultLanguage.slug, + slug: templatePart.slug + }); + promise.catch(error => { + const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : use_create_translation_('An error occurred while persisting the default language template part.', 'polylang-pro'); + createErrorNotice(errorMessage, { + type: 'snackbar' + }); + }); + return promise; + }, [defaultLanguage, saveEntityRecord, createErrorNotice]); + + /** + * Handles the creation of a post translation using duplication method. + * + * @param {Object} language The language object. + * @param {Object} post The post object. + * @return {void} + */ + const handleCreateTranslation = async (language, post) => { + try { + const translation = await apiFetch({ + path: '/pll/v1/translation', + method: 'POST', + data: { + from_post: 'wp_template_part' === post.type || 'wp_template' === post.type ? post.wp_id : post.id, + lang: language.slug, + action: 'duplicate' + } + }); + createSuccessNotice(use_create_translation_('The translation is created, you will be redirected.', 'polylang-pro'), { + type: 'snackbar' + }); + const previousIdInUrl = 'wp_template_part' === post.type || 'wp_template' === post.type ? post.slug : post.id; + const nextIdInUrl = 'wp_template_part' === translation.type || 'wp_template' === translation.type ? translation.slug : translation.id; + location.href = location.href.replace(encodeURIComponent(previousIdInUrl), encodeURIComponent(nextIdInUrl)); + } catch (error) { + const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : use_create_translation_('An error occurred while creating the translation.', 'polylang-pro'); + createErrorNotice(errorMessage, { + type: 'snackbar' + }); + } + }; + return { + handleCreateTranslation, + persistDefaultLanguageTemplatePart + }; +}; +/* harmony default export */ const use_create_translation = ((/* unused pure expression or super */ null && (useCreateTranslation))); +;// ./js/src/editors/common/components/translations-table/site-editor/index.js +/* unused harmony import specifier */ var site_editor_coreDataStore; +/* unused harmony import specifier */ var site_editor_select; +/* unused harmony import specifier */ var site_editor_TranslationInputCell; +/* unused harmony import specifier */ var site_editor_AddOrEditCell; +/* unused harmony import specifier */ var site_editor_DeleteCell; +/* unused harmony import specifier */ var site_editor_DefaultLanguageCell; +/* unused harmony import specifier */ var site_editor_EditButton; +/* unused harmony import specifier */ var site_editor_AddButton; +/* unused harmony import specifier */ var site_editor_DeleteWithConfirmation; +/* unused harmony import specifier */ var site_editor_TranslationRow; +/* unused harmony import specifier */ var site_editor_useCreateTranslation; +/* unused harmony import specifier */ var site_editor_TranslationsTableWrapper; +/* unused harmony import specifier */ var site_editor_jsx; +/* unused harmony import specifier */ var site_editor_jsxs; +/** + * WordPress Dependencies. + */ + + + +/** + * Internal Dependencies. + */ + + + + + + + +/** + * Add or edit button component. + * + * @param {Object} props The component props. + * @param {boolean} props.canUpdate Whether the user can update the translation. + * @param {boolean} props.canCreate Whether the user can create the translation. + * @param {boolean} props.canRead Whether the user can read the translation. + * @param {Object} props.language The language object. + * @param {Object} props.currentPost The current post. + * @param {Object} props.translation The translation post object. + * @param {Function} props.handleCreateTranslation The function to handle the create translation. + * @return {React.Component} The Add or Edit button component. + */ + +const site_editor_AddOrEditButton = ({ + canUpdate, + canCreate, + canRead, + language, + currentPost, + translation, + handleCreateTranslation +}) => { + if (canUpdate || canRead) { + // Show Edit button for existing translations (disabled if user can only read). + return /*#__PURE__*/site_editor_jsx(site_editor_EditButton, { + href: `#`, + disabled: !canUpdate, + language: language, + handleEditClick: () => { + location.href = location.href.replace(encodeURIComponent(currentPost.id), encodeURIComponent(translation.id)); + } + }); + } + return /*#__PURE__*/site_editor_jsx(site_editor_AddButton, { + href: `#`, + disabled: !canCreate, + language: language, + handleAddClick: () => { + handleCreateTranslation(); + } + }); +}; + +/** + * Site Editor Translations Table component. + * + * @param {Object} props The component props. + * @param {Map} props.translationsTable The translations table, contains language object as key and post object as value. + * @param {Object} props.currentPost The current post. + * @param {Function} props.translationsTableDispatch The translations table dispatch function. + * @return {React.Component} The Site Editor Translations Table component. + */ +const SiteEditorTranslationsTable = ({ + translationsTable, + currentPost, + translationsTableDispatch +}) => { + const { + handleCreateTranslation, + persistDefaultLanguageTemplatePart + } = site_editor_useCreateTranslation(); + const table = []; + translationsTable.forEach((translation, language) => { + // Don't display current post in the translation table. + if (currentPost?.lang === language.slug) { + return; + } + function onDeleteSuccess() { + translationsTableDispatch({ + type: 'remove_translation', + lang: language + }); + } + const canCreate = site_editor_select(site_editor_coreDataStore).canUser('create', { + kind: 'postType', + name: currentPost.type + }); + const canUpdate = translation && site_editor_select(site_editor_coreDataStore).canUser('update', { + kind: 'postType', + name: currentPost.type, + id: currentPost.id + }); + table.push(/*#__PURE__*/site_editor_jsx("tr", { + children: /*#__PURE__*/site_editor_jsxs(site_editor_TranslationRow, { + language: language, + children: [/*#__PURE__*/site_editor_jsx(site_editor_TranslationInputCell, { + children: /*#__PURE__*/site_editor_jsx("span", { + className: "pll-translation-language", + children: language.name + }) + }), /*#__PURE__*/site_editor_jsx(site_editor_AddOrEditCell, { + children: /*#__PURE__*/site_editor_jsx(site_editor_AddOrEditButton, { + canUpdate: canUpdate, + canCreate: canCreate, + canRead: !!translation, + language: language, + currentPost: currentPost, + translation: translation, + handleCreateTranslation: () => { + if (!language.is_default && 'wp_template_part' === currentPost.type && !currentPost.wp_id) { + // Ensure the template part in default language exists before creating the translation. + persistDefaultLanguageTemplatePart(currentPost).then(defaultLangTemplatePart => { + handleCreateTranslation(language, defaultLangTemplatePart); + }); + return; + } + handleCreateTranslation(language, currentPost); + } + }) + }), /*#__PURE__*/site_editor_jsx(site_editor_DeleteCell, { + children: /*#__PURE__*/site_editor_jsx(site_editor_DeleteWithConfirmation, { + post: translation, + language: language, + onDeleteSuccess: onDeleteSuccess + }) + }), /*#__PURE__*/site_editor_jsx(site_editor_DefaultLanguageCell, { + isDefault: language.is_default + })] + }) + }, language.slug)); + }); + return /*#__PURE__*/site_editor_jsx(site_editor_TranslationsTableWrapper, { + children: table + }); +}; +/* harmony default export */ const site_editor = ((/* unused pure expression or super */ null && (SiteEditorTranslationsTable))); +;// ./js/src/editors/common/components/translations-table/index.js +/** + * Translations table components. + */ + + + +;// ./js/src/editors/common/store/utils.js +/* unused harmony import specifier */ var subscribe; +/* unused harmony import specifier */ var utils_select; +/* unused harmony import specifier */ var utils_MODULE_SITE_EDITOR_KEY; +/** + * WordPress Dependencies + */ + + + +/** + * Internal dependencies + */ + + + +/** + * Wait for the whole post block editor context has been initialized: current post loaded and languages list initialized. + */ +const isBlockPostEditorContextInitialized = () => { + if ((0,external_lodash_.isNil)((0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY))) { + return Promise.reject("Polylang languages panel can't be initialized because block editor isn't fully initialized."); + } + + // save url params especially when a new translation is creating + saveURLParams(); + + /** + * Set a promise fulfilled with the current post. + */ + const isCurrentPostLoaded = new Promise(function (resolve) { + const unsubscribe = (0,external_this_wp_data_.subscribe)(function () { + const currentPost = (0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY).getCurrentPost(); + if (!(0,external_lodash_.isEmpty)(currentPost)) { + unsubscribe(); + resolve(currentPost); + } + }); + }); + + /** + * Set a promise fulfilled with the source post when a new draft is created from a source, null otherwise. + */ + const isFromPostLoaded = new Promise(function (resolve) { + const unsubscribe = (0,external_this_wp_data_.subscribe)(function () { + const fromPostUrlParams = (0,external_this_wp_data_.select)(MODULE_KEY).getFromPost(); + if (!fromPostUrlParams || !fromPostUrlParams.id || !fromPostUrlParams.postType) { + unsubscribe(); + resolve(null); + return; + } + const fromPost = (0,external_this_wp_data_.select)(MODULE_CORE_KEY).getEntityRecord('postType', fromPostUrlParams.postType, fromPostUrlParams.id, { + context: 'view' + } // Use 'view' context so translators can read posts they cannot edit. + ); + if (fromPost && fromPost.id) { + unsubscribe(); + resolve(fromPost); + } + }); + }); + return Promise.all([isCurrentPostLoaded, isFromPostLoaded, isLanguagesinitialized()]).then(function (resolvedValues) { + const [currentPost, fromPost] = resolvedValues; + + // Force update translations when creating a draft from a source post. + if (fromPost && fromPost.id && currentPost.lang) { + (0,external_this_wp_data_.dispatch)(MODULE_CORE_EDITOR_KEY).editPost({ + translations: { + ...fromPost.translations, + [currentPost.lang]: currentPost.id + } + }); + } + }); +}; + +/** + * Wait for the whole site editor context to be initialized: current template loaded and languages list initialized. + */ +const isSiteEditorContextInitialized = () => { + // save url params especially when a new translation is creating + saveURLParams(); + + /** + * Set a promise to wait for the current template to be fully loaded before making other processes. + * It allows to see if both Site Editor and Core stores are available (@see getCurrentPostFromDataStore()). + */ + const isTemplatePartLoaded = new Promise(function (resolve) { + const unsubscribe = subscribe(function () { + const store = utils_select(utils_MODULE_SITE_EDITOR_KEY); + if (store) { + unsubscribe(); + resolve(); + } + }); + }); + return Promise.all([isTemplatePartLoaded, isLanguagesinitialized()]); +}; + +/** + * Returns a promise fulfilled when the languages list is correctly initialized before making other processes. + * + * @return {Promise} A promise fulfilled with the languages list. + */ +const isLanguagesinitialized = () => new Promise(function (resolve) { + const unsubscribe = (0,external_this_wp_data_.subscribe)(function () { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY)?.getLanguages(); + if (languages?.size > 0) { + unsubscribe(); + resolve(languages); + } + }); +}); + +/** + * Save query string parameters from URL. They could be needed after + * They could be null if they does not exist + */ +function saveURLParams() { + // Variable window.location.search isn't use directly + // Function getSearchParams return an URLSearchParams object for manipulating each parameter + // Each of them are sanitized below + const searchParams = getSearchParams(); + const fromPost = searchParams && searchParams.get('from_post'); + const postType = searchParams && searchParams.get('post_type'); + const newLanguage = searchParams && searchParams.get('new_lang'); + if (fromPost && postType && newLanguage) { + (0,external_this_wp_data_.dispatch)(MODULE_KEY).setFromPost({ + id: wp.sanitize.stripTagsAndEncodeText(fromPost), + postType: wp.sanitize.stripTagsAndEncodeText(postType), + newLanguage: wp.sanitize.stripTagsAndEncodeText(newLanguage) + }); + } +} + +/** + * Gets the current post using the Site Editor store and the Core store. + * + * @return {object|null} The current post object, `null` if none found. + */ +const getCurrentPostFromDataStore = () => { + const siteEditorSelector = (0,external_this_wp_data_.select)(MODULE_SITE_EDITOR_KEY); + + /** + * Return null when called from our apiFetch middleware without a properly loaded store. + */ + if (!siteEditorSelector) { + return null; + } + const context = siteEditorSelector.getEditedPostContext(); + const editedContext = context?.postType && context?.postId ? context : { + postId: siteEditorSelector.getEditedPostId(), + postType: siteEditorSelector.getEditedPostType() + }; + return null === editedContext ? null : (0,external_this_wp_data_.select)(MODULE_CORE_KEY).getEntityRecord('postType', editedContext.postType, editedContext.postId); +}; +;// ./js/src/editors/common/utils.js +/* unused harmony import specifier */ var isBoolean; +/** + * WordPress Dependencies + */ + + + + +/** + * Internal dependencies + */ + + + +/** + * Converts array of object to a map. + * + * @param {Array} array Array to convert. + * @param {*} key The key in the object used as key to build the map. + * @return {Map} Converted array. + */ +function convertArrayToMap(array, key) { + const arrayMap = new Map(); + array.reduce(function (accumulator, currentValue) { + accumulator.set(currentValue[key], currentValue); + return accumulator; + }, arrayMap); + return arrayMap; +} + +/** + * Converts map to an associative array. + * + * @param {Map} mapToConvert The map to convert. + * @return {Object} Converted map. + */ +function convertMapToObject(mapToConvert) { + const object = {}; + mapToConvert.forEach(function (value, key) { + this[key] = isBoolean(value) ? value.toString() : value; + }, object); + return object; +} + +/** + * Checks whether the current screen is the site editor. + * Takes in account if Gutenberg is activated. + * + * @return {boolean} True if site editor screen, false otherwise. + */ +function isSiteBlockEditor() { + return !!(document.getElementById('site-editor') || document.getElementById('edit-site-editor')); +} + +/** + * Returns the post type URL for REST API calls or undefined if the user hasn't the rights. + * + * @param {string} name The post type name. + * @return {string|undefined} URL of the given post type, undefined if not available. + */ +function getPostsUrl(name) { + const postTypes = (0,external_this_wp_data_.select)('core').getEntitiesConfig('postType'); + const postType = (0,external_lodash_.find)(postTypes, { + name + }); + return postType?.baseURL; +} + +/** + * Gets all query string parameters and convert them in a URLSearchParams object. + * + * @return {URLSearchParams|null} Search parameters object, null if none. + */ +function getSearchParams() { + // Variable window.location.search is just read for creating and returning a URLSearchParams object to be able to manipulate it more easily. + // eslint-disable-next-line prettier/prettier + if (!(0,external_lodash_.isEmpty)(window.location.search)) { + // phpcs:ignore WordPressVIPMinimum.JS.Window.location + return new URLSearchParams(window.location.search); // phpcs:ignore WordPressVIPMinimum.JS.Window.location + } + return null; +} + +/** + * Gets selected language. + * + * @param {string} lang The post language code. + * @return {Object|null} The selected language, null otherwise. + */ +function getSelectedLanguage(lang) { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + // Pick up this language as selected in languages list + if (languages) { + return languages.get(lang); + } + return null; +} + +/** + * Gets the default language. + * + * @return {Object} The default Language. + */ +function getDefaultLanguage() { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + return Array.from(languages.values()).find(lang => lang.is_default); +} + +/** + * Checks if the given language is the default one. + * + * @param {string} lang The language code to compare with. + * @return {boolean} True if the given language is the default one. + */ +function isDefaultLanguage(lang) { + return lang === getDefaultLanguage().slug; +} + +/** + * Checks if the given request is for saving. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request is for saving. + */ +function isSaveRequest(options) { + // If data is defined we are in a PUT or POST request method otherwise a GET request method + // Test options.method property isn't efficient because most of REST request which use fetch API doesn't pass this property. + // So, test options.data is necessary to know if the REST request is to save data. + // However test if options.data is undefined isn't sufficient because some REST request pass a null value as the ServerSideRender Gutenberg component. + if (!(0,external_lodash_.isNil)(options.data)) { + return true; + } + return false; +} + +/** + * Checks if the given request concerns the current post type. + * + * Useful when saving a reusable block contained in another post type. + * Indeed a reusable block is also a post, but its saving request doesn't concern the post currently edited. + * As we don't know the language of the reusable block when the user triggers the reusable block saving action, + * we need to pass the current post language to be sure that the reusable block will have a language. + * + * @see https://github.com/polylang/polylang/issues/437 - Reusable block has no language when it's saved from another post type editing. + * + * @param {Object} options the initial request + * @return {boolean} True if the request concerns the current post. + */ +function isCurrentPostRequest(options) { + // Saving translation data is needed only for all post types. + // It's done by verifying options.path matches with one of baseURL of all post types + // and compare current post id with this sent in the request. + + // List of post type baseURLs. + const postTypeURLs = (0,external_lodash_.map)((0,external_this_wp_data_.select)('core').getEntitiesConfig('postType'), (0,external_lodash_.property)('baseURL')); + + // Id from the post currently edited. + const postId = (0,external_this_wp_data_.select)('core/editor').getCurrentPostId(); + + // Id from the REST request. + // options.data never isNil here because it's already verified before in isSaveRequest() function. + const id = options.data.id; + + // Return true + // if REST request baseURL matches with one of the known post type baseURLs + // and the id from the post currently edited corresponds on the id passed to the REST request + // Return false otherwise + return -1 !== postTypeURLs.findIndex(function (element) { + return new RegExp(`${(0,external_lodash_.escapeRegExp)(element)}`).test(options.path); + }) && postId === id; +} + +/** + * Checks if the given REST request is for the creation of a new template part translation. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request concerns a template part translation creation. + */ +function isTemplatePartTranslationCreationRequest(options) { + return 'POST' === options.method && options.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/) && !(0,external_lodash_.isNil)(options.data.from_post) && !(0,external_lodash_.isNil)(options.data.lang); +} + +/** + * Checks if the given REST request is for the creation of a new template part. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request concerns a template part creation. + */ +function isNewTemplatePartCreationRequest(options) { + return 'POST' === options.method && options.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/) && (0,external_lodash_.isNil)(options.data.from_post) && (0,external_lodash_.isNil)(options.data.lang); +} + +/** + * Adds language as query string parameter to the given request. + * + * @param {Object} options The initial request. + * @param {string} currentLanguage The language code to add to the request. + */ +function addLanguageToRequest(options, currentLanguage) { + const hasLangArg = (0,external_this_wp_url_.hasQueryArg)(options.path, 'lang'); + const filterLang = (0,external_lodash_.isUndefined)(options.filterLang) || options.filterLang; + if (filterLang && !hasLangArg) { + options.path = (0,external_this_wp_url_.addQueryArgs)(options.path, { + lang: currentLanguage + }); + } +} + +/** + * Adds `include_untranslated` parameter to the request. + * + * @param {Object} options The initial request. + * @return {void} + */ +function addIncludeUntranslatedParam(options) { + options.path = (0,external_this_wp_url_.addQueryArgs)(options.path, { + include_untranslated: true + }); +} + +/** + * Use addIncludeUntranslatedParam if the given page is a template part page. + * Or if the template editing mode is enabled inside post editing. + * + * @param {Object} options The initial request. + * @return {void} + */ +function maybeRequireIncludeUntranslatedTemplate(options) { + const params = new URL(document.location).searchParams; + const postType = params.get('postType'); + const postId = params.get('postId'); + const isEditingTemplate = (0,external_this_wp_data_.select)(MODULE_POST_EDITOR_KEY)?.isEditingTemplate(); + if ('wp_template_part' === postType && !(0,external_lodash_.isNil)(postId) || isEditingTemplate) { + addIncludeUntranslatedParam(options); + } +} + +/** + * Returns true if the given post is a template part, false otherwise. + * + * @param {Object} post A post object. + * @return {boolean} Whether it is a template part or not. + */ +function isTemplatePart(post) { + return 'wp_template_part' === post.type; +} + +/** + * Returns the current post type considering the Site Editor or Post Editor. + * + * @return {string} The current post type. + */ +function getCurrentPostType() { + if (isSiteBlockEditor()) { + return (0,external_this_wp_data_.select)(MODULE_SITE_EDITOR_KEY).getEditedPostType(); + } + return (0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY).getCurrentPostType(); +} + +/** + * Adds parameters according to the context of the request. + * + * @since 3.5 + * + * @param {APIFetchOptions} options The options of the request. + * @return {APIFetchOptions} The modified options of the request. + */ +function addParametersToRequest(options) { + const currentLangSlug = getCurrentLanguageSlug(); + + // `POST` or `PUT` request. + if (isSaveRequest(options)) { + /** + * Use default language for new template part that doesn't exist in any language, + * otherwise use the current language. + */ + if (isNewTemplatePartCreationRequest(options)) { + addLanguageToRequest(options, getDefaultLanguage()?.slug); + } + if (!isCurrentPostRequest(options) && !isTemplatePartTranslationCreationRequest(options)) { + addLanguageToRequest(options, currentLangSlug); + } + maybeAddLangSuffixToTemplatePart(options, currentLangSlug); + return options; + } + const currentPostType = getCurrentPostType(); + + // Current language is set to default when editing templates. + if ('wp_template' === currentPostType) { + addLanguageToRequest(options, getDefaultLanguage()?.slug); + } + const templatePartListRegex = new RegExp(/^\/wp\/v2\/template-parts\/?(?:\?.*)?$/); + + // Template part list request. + if (templatePartListRegex.test(options.path)) { + maybeRequireIncludeUntranslatedTemplate(options); + } + + // All kinds of requests. + addLanguageToRequest(options, currentLangSlug); + return options; +} + +/** + * Gets language from store or a fallback javascript global variable. + * + * @return {string} The language slug. + */ +function getCurrentLanguageSlug() { + if ((0,external_lodash_.isUndefined)((0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY))) { + // Return ASAP to avoid issues later. + return pll_block_editor_plugin_settings.lang.slug; + } + + // Post block editor case. + const postLanguage = (0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY).getEditedPostAttribute('lang'); + if (!(0,external_lodash_.isUndefined)(postLanguage) && postLanguage) { + return postLanguage; + } + + // Returns the default lang if the current location is a template part list + // and update pll_block_editor_plugin_settings at the same time. + const params = new URL(document.location).searchParams; + const postType = params.get('postType'); + const postId = params.get('postId'); + if ('wp_template_part' === postType && (0,external_lodash_.isNil)(postId)) { + pll_block_editor_plugin_settings.lang = getDefaultLanguage(); + return pll_block_editor_plugin_settings.lang.slug; + } + + // FSE template editor case. + const template = getCurrentPostFromDataStore(); + const templateLanguage = template?.lang; + if (!(0,external_lodash_.isUndefined)(templateLanguage) && templateLanguage) { + return templateLanguage; + } + + // For the first requests block editor isn't initialized yet. + // So language is retrieved from a javascript global variable initialized server-side. + return pll_block_editor_plugin_settings.lang.slug; +} + +/** + * Adds the language suffix to a template part only during creation. + * + * @param {Object} options Object representing a REST request. + * @param {string} langSlug The Language slug to add. + * @return {void} + */ +function maybeAddLangSuffixToTemplatePart(options, langSlug) { + const restBaseUrl = getPostsUrl('wp_template_part'); + if ((0,external_lodash_.isUndefined)(restBaseUrl)) { + // The user hasn't the rights to edit template part. + return; + } + const templatePartURLRegExp = new RegExp((0,external_lodash_.escapeRegExp)(restBaseUrl)); + if ('POST' === options.method && templatePartURLRegExp.test(options.path)) { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + const language = languages.get(langSlug); + if (!language.is_default) { + // No suffix for default language. + const langSuffix = TEMPLATE_PART_SLUG_SEPARATOR + langSlug; + options.data.slug += langSuffix; + } + } +} +;// ./js/src/editors/common/components/metaboxes/site-editor/index.js +/* unused harmony import specifier */ var useReducer; +/* unused harmony import specifier */ var site_editor_useState; +/* unused harmony import specifier */ var useEffect; +/* unused harmony import specifier */ var site_editor_useSelect; +/* unused harmony import specifier */ var getQueryArg; +/* unused harmony import specifier */ var metaboxes_site_editor_coreDataStore; +/* unused harmony import specifier */ var site_editor_LanguageItem; +/* unused harmony import specifier */ var site_editor_MetaboxContainer; +/* unused harmony import specifier */ var site_editor_SiteEditorTranslationsTable; +/* unused harmony import specifier */ var site_editor_getSelectedLanguage; +/* unused harmony import specifier */ var site_editor_getCurrentPostFromDataStore; +/* unused harmony import specifier */ var site_editor_MODULE_KEY; +/* unused harmony import specifier */ var site_editor_UNTRANSLATABLE_POST_TYPE; +/* unused harmony import specifier */ var translationsTableReducer; +/* unused harmony import specifier */ var metaboxes_site_editor_jsxs; +/* unused harmony import specifier */ var metaboxes_site_editor_jsx; +/** + * WordPress Dependencies. + */ + + + + + +/** + * Internal Dependencies. + */ + + + + + + + + +/** + * Site Editor Metabox component. + * + * @return {React.Component} The Site Editor Metabox component. + */ + +const SiteEditorMetabox = () => { + const [translationTable, tableDispatch] = useReducer(translationsTableReducer, new Map()); + const [currentPost, setCurrentPost] = site_editor_useState({}); + const [selectedLanguage, setSelectedLanguage] = site_editor_useState({}); + const [currentPostType, setCurrentPostType] = site_editor_useState(''); + const languages = site_editor_useSelect(select => select(site_editor_MODULE_KEY).getLanguages()); + useEffect(() => { + let currentType; + // Global Styles screen doesn't provide `wp_global_style` as current edited post type. + if ('/wp_global_styles' === wp.sanitize.stripTagsAndEncodeText(getQueryArg(window.location.href, 'path') // phpcs:ignore WordPressVIPMinimum.JS.Window.location + )) { + currentType = 'wp_global_styles'; + } + // Template context can return a page. So, we need to check post type from the URL. + if ('wp_template' === wp.sanitize.stripTagsAndEncodeText(getQueryArg(window.location.href, 'postType') // phpcs:ignore WordPressVIPMinimum.JS.Window.location + )) { + currentType = 'wp_template'; + } + if (currentType) { + setCurrentPostType(currentType); + return; + } + const post = site_editor_getCurrentPostFromDataStore(); + setCurrentPost(post); + setCurrentPostType(post?.type); + const language = site_editor_getSelectedLanguage(post?.lang); + setSelectedLanguage(language); + }, [setCurrentPost, setCurrentPostType, setSelectedLanguage, languages, translationTable]); + const translationsData = site_editor_useSelect(select => { + if (!currentPost || !currentPost.translations) { + return {}; + } + const results = {}; + if ('wp_template_part' !== currentPost.type) { + const translatedPosts = select(metaboxes_site_editor_coreDataStore).getEntityRecords('postType', currentPost.type, { + include: Object.values(currentPost.translations), + context: 'view', + per_page: Object.values(currentPost.translations).length, + lang: '' // Disables language filter middleware. + }); + translatedPosts?.forEach(post => { + results[post.lang] = post; + }); + } else { + // Template parts cannot be fetched all at once. + new Map(Object.entries(currentPost.translations)).forEach((translationId, lang) => { + const postsData = select(metaboxes_site_editor_coreDataStore).getEntityRecords('postType', 'wp_template_part', { + wp_id: translationId + }); + if (postsData && postsData.length > 0) { + results[lang] = postsData[0]; + } + }); + } + return results; + }, [currentPost]); + useEffect(() => { + tableDispatch({ + type: 'set_table', + languages, + translations: translationsData + }); + }, [translationsData, languages, tableDispatch]); + if (translationTable.size === 0) { + return null; + } + return /*#__PURE__*/metaboxes_site_editor_jsxs(site_editor_MetaboxContainer, { + isError: !selectedLanguage, + isAllowedPostType: !site_editor_UNTRANSLATABLE_POST_TYPE.includes(currentPostType), + postType: currentPostType, + children: [/*#__PURE__*/metaboxes_site_editor_jsx(site_editor_LanguageItem, { + language: selectedLanguage, + currentPost: currentPost + }), /*#__PURE__*/metaboxes_site_editor_jsx(site_editor_SiteEditorTranslationsTable, { + translationsTable: translationTable, + currentPost: currentPost, + translationsTableDispatch: tableDispatch + })] + }); +}; +/* harmony default export */ const metaboxes_site_editor = ((/* unused pure expression or super */ null && (SiteEditorMetabox))); +;// ./js/src/editors/common/components/language-dropdown/index.js +/** + * WordPress dependencies. + */ + + + +/** + * Internal dependencies. + */ + + +/** + * Displays a dropdown to select a language. + * + * @since 3.1 + * + * @param {Object} props LanguageDropdown props. + * @param {Function} props.handleChange Callback to be executed when language changes. + * @param {Object} props.languages An iterable object containing languages objects. + * @param {Object} props.selectedLanguage An object representing a Polylang Language. Default to null. + * @param {string} props.defaultValue Value to be selected if the selected language is not provided. Default to an empty string. + * + * @return {Object} A dropdown selector for languages. + */ + +function LanguageDropdown({ + handleChange, + languages, + selectedLanguage = null, + defaultValue = '' +}) { + const selectedLanguageSlug = selectedLanguage?.slug ? selectedLanguage.slug : defaultValue; + const normalizedLanguagesForSelectControl = (0,external_this_wp_element_.useMemo)(() => { + return Array.from(languages.values()).map(({ + slug, + name + }) => ({ + value: slug, + label: name + })); + }, [languages]); + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + id: "pll-language-select-control", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(language_flag, { + language: selectedLanguage + }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.SelectControl, { + value: selectedLanguageSlug, + onChange: newLangSlug => handleChange(newLangSlug), + options: normalizedLanguagesForSelectControl, + id: "pll_post_lang_choice", + name: "pll_post_lang_choice", + className: "post_lang_choice", + __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true + })] + }); +} + +;// ./js/src/editors/common/components/switcher/utils.js +/** + * WordPress dependencies + */ + + + + + +/** + * Internal dependencies + */ + + +/** + * Persists language change. + * + * @param {Object} newLanguage New language. + * @param {Object} newTranslationsData New translations data. + * @return {Promise} Save post promise. + */ +const saveLanguageChange = (newLanguage, newTranslationsData) => { + return Promise.allSettled([(0,external_this_wp_data_.dispatch)(MODULE_CORE_EDITOR_KEY).editPost(newTranslationsData), (0,external_this_wp_data_.dispatch)(MODULE_CORE_EDITOR_KEY).savePost(), + // Need to save post to recalculate permalink. + forceLanguageSave(newLanguage.slug)]).then(() => { + (0,external_this_wp_data_.dispatch)(external_this_wp_coreData_.store).invalidateResolutionForStoreSelector('getEntityRecord'); + (0,external_this_wp_data_.dispatch)(external_this_wp_coreData_.store).invalidateResolutionForStoreSelector('getEntityRecords'); + (0,external_this_wp_data_.dispatch)(external_this_wp_coreData_.store).invalidateResolutionForStoreSelector('getMedia'); + }); +}; + +/** + * Tells whether the edited post is empty. + * + * @return {boolean} True if the edited post is empty, false otherwise. + */ +const isEditedPostEmpty = () => { + const editor = (0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY); + return !editor.getEditedPostAttribute('title') && !editor.getEditedPostContent() && !editor.getEditedPostAttribute('excerpt'); +}; + +/** + * Forces the save of the post in the new language even if no content has been written. + * So the post metadata are correctly updated (e.g.: Attachable Medias). + * + * @since 3.0 + * + * @param {string} lang A language slug. + * @return {Promise} Save post promise. + */ +const forceLanguageSave = lang => { + const editor = (0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY); + if (isEditedPostEmpty()) { + return external_this_wp_apiFetch_default()({ + path: (0,external_this_wp_url_.addQueryArgs)(`wp/v2/posts/${editor.getCurrentPostId()}`, { + lang + }), + method: 'POST' + }); + } + return Promise.reject('Force save not required.'); +}; +;// ./js/src/editors/common/components/switcher/index.js +/** + * Internal dependencies + */ + + +/** + * WordPress dependencies + */ + + + + + + +/** + * Internal dependencies + */ + + + +const Switcher = ({ + currentPost +}) => { + const [isOpen, setOpen] = (0,external_this_wp_element_.useState)(false); + const [selectedLang, setSelectedLang] = (0,external_this_wp_element_.useState)(null); + const { + createSuccessNotice, + createErrorNotice + } = (0,external_this_wp_data_.useDispatch)(external_this_wp_notices_.store); + const languages = use_authorized_languages(); + (0,external_this_wp_element_.useEffect)(() => { + setSelectedLang(languages.get(currentPost.lang)); + }, [currentPost, languages]); + const prevLangRef = (0,external_this_wp_element_.useRef)(selectedLang); + (0,external_this_wp_element_.useEffect)(() => { + prevLangRef.current = languages.get(currentPost.lang); + }, [languages, currentPost]); + const openModal = newLangSlug => { + const newLang = languages.get(newLangSlug); + setSelectedLang(newLang); + if (isEditedPostEmpty()) { + confirmChange(newLang); + return; + } + setOpen(true); + }; + const closeModal = () => setOpen(false); + const confirmChange = _selectedLang => { + closeModal(); + if (!_selectedLang) { + createErrorNotice((0,external_this_wp_i18n_.__)('Failed to save selected language', 'polylang-pro'), { + type: 'snackbar' + }); + return; + } + const newTranslations = { + ...currentPost.translations + }; + delete newTranslations[prevLangRef.current.slug]; + + // Only add the new language if it is not already assigned. + if (!newTranslations.hasOwnProperty(selectedLang.slug)) { + newTranslations[selectedLang.slug] = currentPost.id; + } + const synchronizedPosts = { + ...currentPost.synchronizedPosts + }; + delete synchronizedPosts[prevLangRef.current.slug]; + saveLanguageChange(_selectedLang, { + lang: _selectedLang.slug, + translations: newTranslations, + pll_sync_post: synchronizedPosts + }).then(() => { + createSuccessNotice((0,external_this_wp_i18n_.__)('Language changed', 'polylang-pro'), { + type: 'snackbar' + }); + pll_block_editor_plugin_settings.lang = _selectedLang; + document.dispatchEvent(new CustomEvent('onPostLangChoice', { + detail: { + lang: _selectedLang + } + })); + }); + }; + const abortChange = () => { + setSelectedLang(prevLangRef.current); + closeModal(); + }; + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", { + children: (0,external_this_wp_i18n_.__)('Language', 'polylang-pro') + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)("label", { + className: "screen-reader-text", + htmlFor: "pll_post_lang_choice", + children: (0,external_this_wp_i18n_.__)('Language', 'polylang-pro') + }), /*#__PURE__*/(0,jsx_runtime.jsx)(LanguageDropdown, { + selectedLanguage: selectedLang, + handleChange: openModal, + languages: languages + }), isOpen && /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_components_.Modal, { + title: (0,external_this_wp_i18n_.__)('Change language', 'polylang-pro'), + onRequestClose: abortChange, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { + children: (0,external_this_wp_i18n_.__)('Are you sure you want to change the language of the current content?', 'polylang-pro') + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + role: "group", + className: "components-button-group buttons", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + variant: "tertiary", + onClick: abortChange, + type: "button", + children: (0,external_this_wp_i18n_.__)('Cancel', 'polylang-pro') + }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + children: "\xA0" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + variant: "primary", + onClick: () => confirmChange(selectedLang), + type: "submit", + children: (0,external_this_wp_i18n_.__)('Change', 'polylang-pro') + })] + })] + })] + }); +}; +/* harmony default export */ const switcher = (Switcher); +;// ./js/src/editors/common/components/metaboxes/translations-table-reducer/index.js +/** + * Reducer for the translations table. + * + * @param {Map} state The current state. + * @param {Object} action The action to perform. + * @return {Map} The new state. + */ +const translations_table_reducer_translationsTableReducer = (state, action) => { + switch (action.type) { + case 'add_translation': + state.set(action.lang, action.post); + return new Map(state); + case 'remove_translation': + state.set(action.lang, null); + return new Map(state); + case 'set_table': + return normalizeTranslations(action.languages, action.translations); + default: + throw new Error('Invalid action'); + } +}; + +/** + * Normalizes the translations table. + * + * @param {Array} languages The list of language objects. + * @param {Object} translations The translations IDs keyed by language slug. + * @return {Map} The normalized translations table. + */ +const normalizeTranslations = (languages, translations) => { + const translationsTable = new Map(); + languages.forEach(language => { + translationsTable.set(language, translations[language.slug] ?? null); + }); + return translationsTable; +}; +;// ./js/src/editors/common/components/metaboxes/post-editor/index.js +/** + * WordPress Dependencies. + */ + + + +/** + * Internal Dependencies. + */ + + + + + + + +const PostEditorMetabox = () => { + const [translationsTable, tableDispatch] = (0,external_this_wp_element_.useReducer)(translations_table_reducer_translationsTableReducer, new Map()); + const languages = (0,external_this_wp_data_.useSelect)(select => select(MODULE_KEY).getLanguages()); + const { + currentPost, + selectedLanguage, + isAllowedPostType + } = (0,external_this_wp_data_.useSelect)(select => { + const post = select(MODULE_CORE_EDITOR_KEY).getCurrentPost(); + const lang = select(MODULE_CORE_EDITOR_KEY).getEditedPostAttribute('lang'); + const isAllowed = !UNTRANSLATABLE_POST_TYPE.includes(post?.type); + const language = getSelectedLanguage(lang); + return { + currentPost: post, + selectedLanguage: language, + isAllowedPostType: isAllowed + }; + }, []); + const translationsData = (0,external_this_wp_data_.useSelect)(select => { + if (!currentPost || !currentPost.translations) { + return {}; + } + if ('auto-draft' === currentPost.status) { + const fromPostUrlParams = select(MODULE_KEY).getFromPost(); + if (fromPostUrlParams) { + const fromPostData = select(external_this_wp_coreData_.store).getEntityRecord('postType', currentPost.type, fromPostUrlParams.id, { + context: 'view' + } // Use 'view' context so translators can read posts they cannot edit. + ); + if (fromPostData) { + currentPost.translations = { + ...fromPostData.translations, + [currentPost.lang]: currentPost.id + }; + } + } + } + const results = {}; + const translatedPosts = select(external_this_wp_coreData_.store).getEntityRecords('postType', currentPost.type, { + include: Object.values(currentPost.translations), + context: 'view', + per_page: Object.values(currentPost.translations).length, + lang: '' // Disables language filter middleware. + }); + translatedPosts?.forEach(post => { + const translationData = getTranslationData(post.lang, translationsTable); + + /* + * Preserve the optimistic placeholder (id: 0) until the server returns the real translation ID, + * then let the real entity record be fetched. + */ + if (translationData && translationData.id === post.id) { + results[post.lang] = translationData; + return; + } + results[post.lang] = post; + }); + return results; + }, [currentPost, translationsTable]); + (0,external_this_wp_element_.useEffect)(() => { + tableDispatch({ + type: 'set_table', + languages, + translations: translationsData + }); + }, [translationsData, languages, tableDispatch]); + if (translationsTable.size === 0) { + return null; + } + return /*#__PURE__*/(0,jsx_runtime.jsxs)(container, { + isError: !selectedLanguage, + isAllowedPostType: isAllowedPostType, + postType: currentPost?.type, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(switcher, { + currentPost: currentPost + }), /*#__PURE__*/(0,jsx_runtime.jsx)(post_editor, { + currentPost: currentPost, + translationsTable: translationsTable, + selectedLanguage: selectedLanguage, + tableDispatch: tableDispatch + })] + }); +}; + +/** + * Gets data from the translations table map for a given language. + * + * @param {string} langSlug The language slug. + * @param {Map} translationsTable The translations table. + * @return {Object|null} The translation data or null if not found. + */ +const getTranslationData = (langSlug, translationsTable) => { + for (const [lang, post] of translationsTable) { + if (lang.slug === langSlug) { + return post; + } + } + return null; +}; +/* harmony default export */ const metaboxes_post_editor = (PostEditorMetabox); +;// ./js/src/editors/common/components/metaboxes/index.js +/** + * Metabox components. + */ + + + +;// ./js/src/editors/common/store/index.js +/** + * WordPress Dependencies + */ + + + +/** + * Internal dependencies + */ + + +const actions = { + setLanguages(languages) { + return { + type: 'SET_LANGUAGES', + languages + }; + }, + setFromPost(fromPost) { + return { + type: 'SET_FROM_POST', + fromPost + }; + }, + fetchFromAPI(options) { + return { + type: 'FETCH_FROM_API', + options + }; + } +}; +const store = (0,external_this_wp_data_.createReduxStore)(MODULE_KEY, { + reducer(state = DEFAULT_STATE, action) { + switch (action.type) { + case 'SET_LANGUAGES': + return { + ...state, + languages: action.languages + }; + case 'SET_FROM_POST': + return { + ...state, + fromPost: action.fromPost + }; + case 'SET_CURRENT_TEMPLATE_PART': + return { + ...state, + currentTemplatePart: action.currentTemplatePart + }; + default: + return state; + } + }, + selectors: { + getLanguages(state) { + return state.languages; + }, + getFromPost(state) { + return state.fromPost; + } + }, + actions, + controls: { + FETCH_FROM_API(action) { + return external_this_wp_apiFetch_default()({ + ...action.options + }); + } + }, + resolvers: { + *getLanguages() { + const path = '/pll/v1/languages'; + const languages = yield actions.fetchFromAPI({ + path, + filterLang: false + }); + return actions.setLanguages(convertArrayToMap(languages, 'slug')); + } + } +}); +(0,external_this_wp_data_.register)(store); +;// ./js/src/editors/post/pro-features/index.js +/** + * Registers Polylang Pro features for the metabox in the post editor. + */ + +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + + + + + +/** + * Registers the Pro features for the post editor metabox. + * + * @return {void} + */ + +const registerProFeatures = () => { + (0,external_this_wp_plugins_.registerPlugin)('pll-machine-translation', { + render: () => /*#__PURE__*/(0,jsx_runtime.jsx)(plugin_feature_flag_button, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(machine_translation, {}) + }) + }); + (0,external_this_wp_plugins_.registerPlugin)('pll-duplicate-content', { + render: () => /*#__PURE__*/(0,jsx_runtime.jsx)(plugin_feature_flag_button, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(duplicate, {}) + }) + }); + const SynchronizationFeatureButton = fillProps => { + const authorizedLanguages = use_authorized_languages(); + if (!fillProps) { + return null; + } + return /*#__PURE__*/(0,jsx_runtime.jsx)(buttons_synchronization, { + post: fillProps.translation, + language: fillProps.language, + translationTableReducer: fillProps.translationTableReducer, + disabled: !authorizedLanguages.has(fillProps.language.slug) + }); + }; + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + if (!languages || languages.length === 0) { + return; + } + languages.forEach(language => { + (0,external_this_wp_plugins_.registerPlugin)(`pll-synchronization-${language.slug}`, { + render: ({ + fillProps + }) => /*#__PURE__*/(0,jsx_runtime.jsx)(PluginFeatureTableRowButtonFill, { + className: "pll-sync-column pll-column-icon", + languageSlug: language.slug, + children: /*#__PURE__*/(0,jsx_runtime.jsx)(SynchronizationFeatureButton, { + fillProps: fillProps + }) + }) + }); + }); +}; +;// ./js/src/editors/post/index.js +/** + * Import styles + */ + + +/** + * External dependencies + */ + + +/** + * WordPress Dependencies. + */ + + + +/** + * Internal Dependencies. + */ + + + + + + + + + +editors_requests_filter(addParametersToRequest); +const sidebarName = 'polylang-sidebar'; +const settingsErrors = pll_block_editor_plugin_settings?.machine_translation?.errors; // eslint-disable-line no-undef, camelcase + +const _root = document.createElement('div'); +_root.id = 'pll-root'; +const root = document.body.appendChild(_root); +(0,external_this_wp_element_.createRoot)(root).render(/*#__PURE__*/(0,jsx_runtime.jsx)(app, { + sidebar: () => { + return /*#__PURE__*/(0,jsx_runtime.jsx)(sidebar, { + SidebarSlot: external_this_wp_editPost_.PluginSidebar, + MoreMenuItemSlot: external_this_wp_editPost_.PluginSidebarMoreMenuItem, + sidebarName: sidebarName, + children: /*#__PURE__*/(0,jsx_runtime.jsx)(metaboxes_post_editor, {}) + }); + }, + sidebarName: sidebarName, + onPromise: isBlockPostEditorContextInitialized, + children: undefined !== settingsErrors && /*#__PURE__*/(0,jsx_runtime.jsx)(display_notices, { + notices: settingsErrors + }) +})); +isBlockPostEditorContextInitialized().then(() => { + registerProFeatures(); +}); +})(); + +this["polylang-pro"] = __webpack_exports__; +/******/ })() +; \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/editors/post.min.js b/wp-content/plugins/polylang-pro/js/build/editors/post.min.js new file mode 100644 index 0000000..a6d789e --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/editors/post.min.js @@ -0,0 +1 @@ +(()=>{var e={20(e,t,n){"use strict";var s=n(677),l=Symbol.for("react.element"),a=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var s,a={},c=null,u=null;for(s in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)r.call(t,s)&&!i.hasOwnProperty(s)&&(a[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===a[s]&&(a[s]=t[s]);return{$$typeof:l,type:e,key:c,ref:u,props:a,_owner:o.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},848(e,t,n){"use strict";e.exports=n(20)},677(e){e.exports=function(){return this.React}()},419(e){e.exports=function(){return this.lodash}()},631(e){e.exports=function(){return this.wp.apiFetch}()},959(e){e.exports=function(){return this.wp.components}()},488(e){e.exports=function(){return this.wp.coreData}()},987(e){e.exports=function(){return this.wp.data}()},53(e){e.exports=function(){return this.wp.editPost}()},2(e){e.exports=function(){return this.wp.editor}()},601(e){e.exports=function(){return this.wp.element}()},989(e){e.exports=function(){return this.wp.htmlEntities}()},75(e){e.exports=function(){return this.wp.i18n}()},672(e){e.exports=function(){return this.wp.notices}()},125(e){e.exports=function(){return this.wp.plugins}()},933(e){e.exports=function(){return this.wp.primitives}()},172(e){e.exports=function(){return this.wp.url}()}},t={};function n(s){var l=t[s];if(void 0!==l)return l.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);(()=>{"use strict";var e=n(631),t=n.n(e);const s=(e,t,n)=>{const s=e.path.split("?")[0].replace(/^\/+|\/+$/g,"");return Object.values(t).find((e=>s===e))?n(e):e},l=e=>{t().use(((t,n)=>void 0!==t.url||void 0===window.pllFilteredRoutes?n(t):n(s(t,window.pllFilteredRoutes,e))))};var a=n(53),r=n(601),o=n(933),i=n(848);const c=void 0!==wp.primitives?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z"})}):"translation";var u=n(125);const p=({sidebar:e,sidebarName:t,onPromise:n,children:s})=>(n().then((()=>{(0,u.registerPlugin)(t,{icon:c,render:e})}),(e=>{console.info(e)})),(0,i.jsx)(i.Fragment,{children:s}));var d=n(987),g=n(672);const{stripTags:h}=wp.sanitize,m=({notices:e})=>{const{createErrorNotice:t,createInfoNotice:n,createSuccessNotice:s,createWarningNotice:l}=(0,d.useDispatch)(g.store);return e?(e.forEach((e=>{const a={type:"snackbar",explicitDismiss:!0},r=h(e.message);switch(e.type){case"error":t(r,a);break;case"info":n(r,a);break;case"success":s(r,a);break;case"warning":l(r,a)}})),null):null};var _=n(75);const f=({SidebarSlot:e,MoreMenuItemSlot:t,sidebarName:n,children:s})=>{const l=(0,_.__)("Languages","polylang-pro");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e,{name:n,title:l,children:s}),(0,i.jsx)(t,{target:n,children:l})]})};var x=n(172),y=n(488);const v="pll/metabox",b="core/editor",w="core/edit-site",j="core",P={languages:[],selectedLanguage:{},translatedPosts:{},fromPost:null,currentTemplatePart:{}},T=["wp_template","wp_global_styles"];var E=n(419);const S=function({language:e}){return(0,E.isNil)(e)?(0,i.jsx)("span",{className:"pll-translation-icon",children:c}):(0,E.isEmpty)(e.flag_url)?(0,i.jsxs)("abbr",{children:[e.slug,(0,i.jsx)("span",{className:"screen-reader-text",children:e.name})]}):(0,i.jsx)("span",{className:"pll-select-flag",children:(0,i.jsx)("img",{src:e.flag_url,alt:e.name,title:e.name,className:"flag"})})};var N=n(959);const R=({children:e})=>(0,i.jsx)("div",{className:"components-panel__body is-opened",children:(0,i.jsx)("div",{className:"pll-metabox-location",children:e})}),C=({postType:e})=>"wp_template"===e?(0,i.jsx)("div",{className:"pll-metabox-error components-notice is-warning",children:(0,_.__)("Templates are not translatable, only template parts are.","polylang-pro")}):(0,i.jsx)("div",{className:"pll-metabox-error components-notice is-warning",children:(0,_.__)("This entity is not translatable.","polylang-pro")}),L=({isError:e,isAllowedPostType:t,postType:n,children:s})=>t?e?(0,i.jsx)(R,{children:(0,i.jsx)("div",{className:"pll-metabox-error components-notice is-error",children:(0,_.__)("Unable to retrieve the content language","polylang-pro")})}):(0,i.jsx)(R,{children:s}):(0,i.jsx)(R,{children:(0,i.jsx)(C,{postType:n})}),A=({children:e})=>(0,i.jsx)("td",{className:"pll-edit-column pll-column-icon",children:e});const F=({language:e})=>(0,i.jsx)("th",{className:"pll-language-column",children:(0,E.isEmpty)(e.flag)?(0,i.jsxs)("abbr",{children:[e.slug,(0,i.jsx)("span",{className:"screen-reader-text",children:e.name})]}):(0,i.jsx)("span",{className:"pll-select-flag flag",children:(0,i.jsx)("img",{src:e.flag_url,alt:e.name,title:e.name})})}),k=({children:e})=>(0,i.jsx)("td",{className:"pll-translation-column",children:e}),M=void 0!==wp.primitive?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M17 7v3h-5v5h-3v-5h-5v-3h5v-5h3v5h5z"})}):"plus",z=({language:e,href:t,disabled:n,handleAddClick:s=null})=>{const l=(0,_.sprintf)((0,_.__)("Add a translation in %s","polylang-pro"),e.name);return(0,i.jsx)(N.Button,{href:t,disabled:n,icon:M,label:l,className:"pll-button",onClick:s,"data-target-language":e.slug,children:(0,i.jsx)("span",{className:"screen-reader-text",children:l})})};const O=({id:e,postType:n,userPreferenceName:s,activeLabel:l,inactiveLabel:a,icon:o})=>{const c=(0,d.useSelect)((e=>e(y.store).getCurrentUser()),[]),[u,p]=(0,r.useState)(!1),{createErrorNotice:h}=(0,d.useDispatch)(g.store),[m,_]=(0,r.useState)((()=>void 0!==c&&void 0!==c[s]&&void 0!==c[s][n]&&c[s][n]));return(0,i.jsx)(N.Button,{id:e,className:`pll-button pll-before-post-translations-button ${m&&"wp-ui-text-highlight"}`,onClick:()=>{p(!0);const e=((e,t,n,s)=>((void 0===e[t]||Array.isArray(e[t])&&0===e[t].length)&&(e[t]={}),e[t][n]=!s,{[t]:e[t]}))(c,s,n,m);t()({path:"/wp/v2/users/me",data:e,method:"POST"}).then((()=>{_((e=>!e))})).catch((e=>{h(e.message,{type:"snackbar"})})).finally((()=>{p(!1)}))},icon:o,label:m?l:a,isBusy:u,disabled:u,children:(0,i.jsx)("span",{className:"screen-reader-text",children:m?l:a})})},I=()=>{const e=(0,d.useSelect)((e=>e(b).getCurrentPostType()),[]),t=pll_block_editor_plugin_settings?.machine_translation;if(!t||!t.isActive)return null;const{path_d:n,...s}=t.icon,l={type:"svg",props:{...s,children:(0,i.jsx)(o.Path,{d:n})}};return(0,i.jsx)(O,{id:"pll-machine-translation",postType:e,userPreferenceName:`pll_machine_translation_${t.slug}`,activeLabel:(0,_.sprintf)((0,_.__)("Deactivate %s machine translation","polylang-pro"),t.name),inactiveLabel:(0,_.sprintf)((0,_.__)("Activate %s machine translation","polylang-pro"),t.name),icon:l})},U=void 0!==wp.primitives?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M6 15v-13h10v13h-10zM5 16h8v2h-10v-13h2v11z"})}):"admin-page",B=e=>{const t=(0,d.useSelect)((e=>e(b).getCurrentPostType()),[]);if(!t)return null;const n={...e,id:"pll-duplicate",userPreferenceName:"pll_duplicate_content",activeLabel:(0,_.__)("Deactivate the content duplication","polylang-pro"),inactiveLabel:(0,_.__)("Activate the content duplication","polylang-pro"),icon:U,postType:t};return(0,i.jsx)(O,{...n})},$=void 0!==wp.primitives?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M13.89 3.39l2.71 2.72c0.46 0.46 0.42 1.24 0.030 1.64l-8.010 8.020-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.030c0.39-0.39 1.22-0.39 1.68 0.070zM11.16 6.18l-5.59 5.61 1.11 1.11 5.54-5.65zM8.19 14.41l5.58-5.6-1.070-1.080-5.59 5.6z"})}):"edit",D=({language:e,href:t,disabled:n,handleEditClick:s=null})=>{const l=(0,_.sprintf)((0,_.__)("Edit the translation in %s","polylang-pro"),e.name);return(0,i.jsx)(N.Button,{href:t,disabled:n,icon:$,label:l,className:"pll-button",onClick:s,"data-target-language":e.slug,children:(0,i.jsx)("span",{className:"screen-reader-text",children:l})})},V=void 0!==wp.primitives?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M5 7v3l-2 1.5v-6.5h11v-2l4 3.010-4 2.99v-2h-9zM15 13v-3l2-1.5v6.5h-11v2l-4-3.010 4-2.99v2h9z"})}):"controls-repeat";var G=n(2);const H=(e,t,n,s)=>{(0,r.useEffect)((()=>{if(n.pll_sync_post[e.slug]&&n.translations[e.slug]&&n.title!==s?.title){const l={...n,title:n.title};l.id=s?.id??0,t({type:"add_translation",lang:e,post:{...l}})}}),[e,t,n,s])},Q=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,t.toString()]))),q=({post:e,language:t,translationTableReducer:n,disabled:s})=>{const[l,a]=(0,r.useState)(!1),[o,c]=(0,r.useState)(!1),[u,p]=(0,r.useState)(!1),g=(0,d.useSelect)((()=>(0,d.select)(G.store).getCurrentPost()),[]);H(t,n,g,e);const h=(0,r.useMemo)((()=>l?(0,_.__)("Unsynchronize this post","polylang-pro"):(0,_.__)("Synchronize this post","polylang-pro")),[l]),m=()=>{const s=g.pll_sync_post;l?(delete s[t.slug],a(!1)):(s[t.slug]=!0,a(!0),c(!0),e||(e={id:0}),n({type:"add_translation",lang:t,post:{...e,title:g.title}}),(0,d.dispatch)(y.store).invalidateResolution("getEntityRecord",["postType",e.type,e.id])),(0,d.dispatch)(b).editPost({pll_sync_post:Q(s)})};return(0,r.useEffect)((()=>{c(void 0!==e?.id),a(void 0!==g.pll_sync_post[t.slug])}),[g,t,e]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(N.Button,{icon:V,label:h,id:`pll_sync_post[${t.slug}]`,className:`pll-button ${l&&"wp-ui-text-highlight"}`,onClick:()=>{!l&&o?p(!0):m()},disabled:s,children:(0,i.jsx)("span",{className:"screen-reader-text",children:h})}),u&&(0,i.jsxs)(N.Modal,{title:(0,_.__)("Synchronize this post","polylang-pro"),onRequestClose:()=>{p(!1)},children:[(0,i.jsx)("p",{children:(0,_.__)("You are about to overwrite an existing translation. Are you sure you want to proceed?","polylang-pro")}),(0,i.jsxs)("div",{role:"group",className:"components-button-group buttons",children:[(0,i.jsx)(N.Button,{variant:"tertiary",onClick:()=>{p(!1)},type:"button",children:(0,_.__)("Cancel","polylang-pro")}),(0,i.jsx)("span",{children:" "}),(0,i.jsx)(N.Button,{variant:"primary",onClick:()=>{m(),p(!1)},type:"submit",children:(0,_.__)("Synchronize","polylang-pro")})]})]})]})};var W=n(989);const Y=e=>(0,W.decodeEntities)(e.title?.rendered??e.title?.raw??e.title??""),J=(e,t)=>{const n=e.find((e=>e.value===t));return n?{id:n.value,title:n.label}:null},K=e=>{const t={};return e.forEach(((e,n)=>{e&&e.id&&(t[n.slug]=e.id)})),t},X=({language:e,source:n,translation:s,tableDispatch:l,translationsTable:a})=>{const[o,c]=(0,r.useState)(s?[{value:s.id,label:Y(s)}]:[]),[u,p]=(0,r.useState)(s?s.id:null),[g,h]=(0,r.useState)(!1);(0,r.useEffect)((()=>{s&&0===o.length&&c([{value:s.id,label:Y(s)}])}),[s,o]),(0,r.useEffect)((()=>{s?(o.find((e=>e.value===s.id&&e.label!==Y(s)||e.value!==s.id&&0===e.value&&e.label===Y(s)))&&c([{value:s.id,label:Y(s)}]),p(s.id)):p(null)}),[s,o]);const m=(0,r.useCallback)((s=>{if(""===s)return[];h(!0),t()({path:(0,x.addQueryArgs)("/pll/v1/untranslated-posts",{search:s,include:n.id,untranslated_in:n.lang,lang:e.slug,type:n.type,context:"edit"})}).then((e=>{c(e.map((e=>({value:parseInt(e.id,10),label:Y(e)}))))})).finally((()=>{h(!1)}))}),[n,e,c]),f=(0,r.useCallback)((e=>{let t;return(...n)=>{clearTimeout(t),t=setTimeout((()=>e(...n)),300)}}),[]);return(0,i.jsx)(N.ComboboxControl,{value:u,options:o,isLoading:g,onChange:t=>{if(p(t),(0,d.select)(b).isEditedPostNew()&&(0,d.dispatch)(b).savePost(),!t){l({type:"remove_translation",lang:e});const t={...K(a)};return delete t[e.slug],void(0,d.dispatch)(b).editPost({translations:t})}const n=J(o,t);n&&(l({type:"add_translation",lang:e,post:n}),(0,d.dispatch)(b).editPost({translations:{...K(a),[e.slug]:parseInt(t,10)}}))},placeholder:(0,_.__)("Search for a post","polylang-pro"),onFilterValueChange:f(m),__next40pxDefaultSize:!0})},Z=({language:e,children:t})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(F,{language:e}),t]}),{Fill:ee,Slot:te}=(0,N.createSlotFill)("PluginFeatureFlagButton"),ne=({children:e,className:t})=>(0,i.jsx)(ee,{children:(0,i.jsx)("div",{className:t,children:e})});ne.Slot=te;const se=ne,le=({children:e})=>(0,i.jsxs)("div",{id:"post-translations",className:"translations",children:[(0,i.jsxs)("div",{className:"pll-translations-table-header",children:[(0,i.jsx)("p",{className:"pll-translations-table-header-title",children:(0,i.jsx)("strong",{children:(0,_.__)("Translations","polylang-pro")})}),(0,i.jsx)(se.Slot,{children:e=>e.length>0&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:"pll-plugin-feature-button-container",children:e})})})]}),(0,i.jsx)("table",{children:(0,i.jsx)("tbody",{children:e})})]}),ae=e=>(0,N.createSlotFill)(`PluginFeatureTableRowButton_${e}`),re=({children:e,className:t,languageSlug:n})=>{const{Fill:s}=ae(n);return(0,i.jsx)(s,{children:n=>(0,i.jsx)("div",{className:t,children:r.Children.map(e,(e=>(0,r.cloneElement)(e,{language:n.language,translation:n.translation,translationTableReducer:n.translationTableReducer})))})})},oe=({language:e,translation:t,translationTableReducer:n})=>{const{Slot:s}=ae(e.slug);return(0,i.jsx)(s,{bubblesVirtually:!0,as:"td",fillProps:{language:e,translation:t,translationTableReducer:n},className:"pll-feature-button-row-container"})},ie=()=>{const e=(0,d.useSelect)((e=>e(v).getLanguages())),t=pll_block_editor_plugin_settings?.authorizedLanguagesSlugs;return(0,r.useMemo)((()=>t?new Map(t.map((t=>{const n=e.get(t);return n?[t,n]:null})).filter(Boolean)):e),[e,t])},ce=({canUpdate:e,canCreate:t,canRead:n,language:s,currentPost:l})=>{const[a,o]=(0,r.useState)(l.translations[s.slug]?l.translations[s.slug]:null);if((0,r.useEffect)((()=>{o(l.translations[s.slug]?l.translations[s.slug]:null)}),[l,s,o]),e||n){const t=`${`${location.origin}/${(0,x.getPath)(location.href)}`.replace("post-new.php","post.php")}?post=${a}&action=edit`;return(0,i.jsx)(D,{href:t,language:s,disabled:!e})}return(0,i.jsx)(z,{href:pll_block_editor_plugin_settings.new_post_translation_links[s.slug],language:s,disabled:!t})},ue=({currentPost:e,translationsTable:t,tableDispatch:n})=>{const s=[],l=ie();return t.forEach(((a,r)=>{if(e.lang===r.slug)return null;const o=!a&&l.has(r.slug)&&(0,d.select)(y.store).canUser("create",{kind:"postType",name:e.type,lang:r.slug}),c=a&&(0,d.select)(y.store).canUser("update",{kind:"postType",name:e.type,id:a.id});s.push((0,i.jsx)("tr",{children:(0,i.jsxs)(Z,{language:r,children:[(0,i.jsx)(A,{children:(0,i.jsx)(ce,{canUpdate:c,canCreate:o,canRead:!!a,language:r,currentPost:e})}),(0,i.jsx)(oe,{language:r,translation:a,translationTableReducer:n}),(0,i.jsx)(k,{children:(0,i.jsx)(X,{language:r,source:e,translation:a,tableDispatch:n,translationsTable:t})})]})},r.slug))})),(0,i.jsx)(le,{children:s})};const pe=()=>{if((0,E.isNil)((0,d.select)(b)))return Promise.reject("Polylang languages panel can't be initialized because block editor isn't fully initialized.");ge();const e=new Promise((function(e){const t=(0,d.subscribe)((function(){const n=(0,d.select)(b).getCurrentPost();(0,E.isEmpty)(n)||(t(),e(n))}))})),t=new Promise((function(e){const t=(0,d.subscribe)((function(){const n=(0,d.select)(v).getFromPost();if(!n||!n.id||!n.postType)return t(),void e(null);const s=(0,d.select)(j).getEntityRecord("postType",n.postType,n.id,{context:"view"});s&&s.id&&(t(),e(s))}))}));return Promise.all([e,t,de()]).then((function(e){const[t,n]=e;n&&n.id&&t.lang&&(0,d.dispatch)(b).editPost({translations:{...n.translations,[t.lang]:t.id}})}))},de=()=>new Promise((function(e){const t=(0,d.subscribe)((function(){const n=(0,d.select)(v)?.getLanguages();n?.size>0&&(t(),e(n))}))}));function ge(){const e=function(){if(!(0,E.isEmpty)(window.location.search))return new URLSearchParams(window.location.search);return null}(),t=e&&e.get("from_post"),n=e&&e.get("post_type"),s=e&&e.get("new_lang");t&&n&&s&&(0,d.dispatch)(v).setFromPost({id:wp.sanitize.stripTagsAndEncodeText(t),postType:wp.sanitize.stripTagsAndEncodeText(n),newLanguage:wp.sanitize.stripTagsAndEncodeText(s)})}function he(){const e=(0,d.select)(v).getLanguages();return Array.from(e.values()).find((e=>e.is_default))}function me(e,t){const n=(0,x.hasQueryArg)(e.path,"lang");((0,E.isUndefined)(e.filterLang)||e.filterLang)&&!n&&(e.path=(0,x.addQueryArgs)(e.path,{lang:t}))}function _e(e){const t=new URL(document.location).searchParams,n=t.get("postType"),s=t.get("postId"),l=(0,d.select)("core/edit-post")?.isEditingTemplate();("wp_template_part"===n&&!(0,E.isNil)(s)||l)&&function(e){e.path=(0,x.addQueryArgs)(e.path,{include_untranslated:!0})}(e)}function fe(){return document.getElementById("site-editor")||document.getElementById("edit-site-editor")?(0,d.select)(w).getEditedPostType():(0,d.select)(b).getCurrentPostType()}function xe({handleChange:e,languages:t,selectedLanguage:n=null,defaultValue:s=""}){const l=n?.slug?n.slug:s,a=(0,r.useMemo)((()=>Array.from(t.values()).map((({slug:e,name:t})=>({value:e,label:t})))),[t]);return(0,i.jsxs)("div",{id:"pll-language-select-control",children:[(0,i.jsx)(S,{language:n}),(0,i.jsx)(N.SelectControl,{value:l,onChange:t=>e(t),options:a,id:"pll_post_lang_choice",name:"pll_post_lang_choice",className:"post_lang_choice",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})}const ye=()=>{const e=(0,d.select)(b);return!e.getEditedPostAttribute("title")&&!e.getEditedPostContent()&&!e.getEditedPostAttribute("excerpt")},ve=e=>{const n=(0,d.select)(b);return ye()?t()({path:(0,x.addQueryArgs)(`wp/v2/posts/${n.getCurrentPostId()}`,{lang:e}),method:"POST"}):Promise.reject("Force save not required.")},be=({currentPost:e})=>{const[t,n]=(0,r.useState)(!1),[s,l]=(0,r.useState)(null),{createSuccessNotice:a,createErrorNotice:o}=(0,d.useDispatch)(g.store),c=ie();(0,r.useEffect)((()=>{l(c.get(e.lang))}),[e,c]);const u=(0,r.useRef)(s);(0,r.useEffect)((()=>{u.current=c.get(e.lang)}),[c,e]);const p=()=>n(!1),h=t=>{if(p(),!t)return void o((0,_.__)("Failed to save selected language","polylang-pro"),{type:"snackbar"});const n={...e.translations};delete n[u.current.slug],n.hasOwnProperty(s.slug)||(n[s.slug]=e.id);const l={...e.synchronizedPosts};var r,i;delete l[u.current.slug],(r=t,i={lang:t.slug,translations:n,pll_sync_post:l},Promise.allSettled([(0,d.dispatch)(b).editPost(i),(0,d.dispatch)(b).savePost(),ve(r.slug)]).then((()=>{(0,d.dispatch)(y.store).invalidateResolutionForStoreSelector("getEntityRecord"),(0,d.dispatch)(y.store).invalidateResolutionForStoreSelector("getEntityRecords"),(0,d.dispatch)(y.store).invalidateResolutionForStoreSelector("getMedia")}))).then((()=>{a((0,_.__)("Language changed","polylang-pro"),{type:"snackbar"}),pll_block_editor_plugin_settings.lang=t,document.dispatchEvent(new CustomEvent("onPostLangChoice",{detail:{lang:t}}))}))},m=()=>{l(u.current),p()};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:(0,i.jsx)("strong",{children:(0,_.__)("Language","polylang-pro")})}),(0,i.jsx)("label",{className:"screen-reader-text",htmlFor:"pll_post_lang_choice",children:(0,_.__)("Language","polylang-pro")}),(0,i.jsx)(xe,{selectedLanguage:s,handleChange:e=>{const t=c.get(e);l(t),ye()?h(t):n(!0)},languages:c}),t&&(0,i.jsxs)(N.Modal,{title:(0,_.__)("Change language","polylang-pro"),onRequestClose:m,children:[(0,i.jsx)("p",{children:(0,_.__)("Are you sure you want to change the language of the current content?","polylang-pro")}),(0,i.jsxs)("div",{role:"group",className:"components-button-group buttons",children:[(0,i.jsx)(N.Button,{variant:"tertiary",onClick:m,type:"button",children:(0,_.__)("Cancel","polylang-pro")}),(0,i.jsx)("span",{children:" "}),(0,i.jsx)(N.Button,{variant:"primary",onClick:()=>h(s),type:"submit",children:(0,_.__)("Change","polylang-pro")})]})]})]})},we=(e,t)=>{switch(t.type){case"add_translation":return e.set(t.lang,t.post),new Map(e);case"remove_translation":return e.set(t.lang,null),new Map(e);case"set_table":return je(t.languages,t.translations);default:throw new Error("Invalid action")}},je=(e,t)=>{const n=new Map;return e.forEach((e=>{n.set(e,t[e.slug]??null)})),n},Pe=(e,t)=>{for(const[n,s]of t)if(n.slug===e)return s;return null},Te=()=>{const[e,t]=(0,r.useReducer)(we,new Map),n=(0,d.useSelect)((e=>e(v).getLanguages())),{currentPost:s,selectedLanguage:l,isAllowedPostType:a}=(0,d.useSelect)((e=>{const t=e(b).getCurrentPost(),n=e(b).getEditedPostAttribute("lang"),s=!T.includes(t?.type),l=function(e){const t=(0,d.select)(v).getLanguages();return t?t.get(e):null}(n);return{currentPost:t,selectedLanguage:l,isAllowedPostType:s}}),[]),o=(0,d.useSelect)((t=>{if(!s||!s.translations)return{};if("auto-draft"===s.status){const e=t(v).getFromPost();if(e){const n=t(y.store).getEntityRecord("postType",s.type,e.id,{context:"view"});n&&(s.translations={...n.translations,[s.lang]:s.id})}}const n={},l=t(y.store).getEntityRecords("postType",s.type,{include:Object.values(s.translations),context:"view",per_page:Object.values(s.translations).length,lang:""});return l?.forEach((t=>{const s=Pe(t.lang,e);s&&s.id===t.id?n[t.lang]=s:n[t.lang]=t})),n}),[s,e]);return(0,r.useEffect)((()=>{t({type:"set_table",languages:n,translations:o})}),[o,n,t]),0===e.size?null:(0,i.jsxs)(L,{isError:!l,isAllowedPostType:a,postType:s?.type,children:[(0,i.jsx)(be,{currentPost:s}),(0,i.jsx)(ue,{currentPost:s,translationsTable:e,selectedLanguage:l,tableDispatch:t})]})},Ee={setLanguages:e=>({type:"SET_LANGUAGES",languages:e}),setFromPost:e=>({type:"SET_FROM_POST",fromPost:e}),fetchFromAPI:e=>({type:"FETCH_FROM_API",options:e})},Se=(0,d.createReduxStore)(v,{reducer(e=P,t){switch(t.type){case"SET_LANGUAGES":return{...e,languages:t.languages};case"SET_FROM_POST":return{...e,fromPost:t.fromPost};case"SET_CURRENT_TEMPLATE_PART":return{...e,currentTemplatePart:t.currentTemplatePart};default:return e}},selectors:{getLanguages:e=>e.languages,getFromPost:e=>e.fromPost},actions:Ee,controls:{FETCH_FROM_API:e=>t()({...e.options})},resolvers:{*getLanguages(){const e=yield Ee.fetchFromAPI({path:"/pll/v1/languages",filterLang:!1});return Ee.setLanguages(function(e,t){const n=new Map;return e.reduce((function(e,n){return e.set(n[t],n),e}),n),n}(e,"slug"))}}});(0,d.register)(Se);l((function(e){const t=function(){if((0,E.isUndefined)((0,d.select)(b)))return pll_block_editor_plugin_settings.lang.slug;const e=(0,d.select)(b).getEditedPostAttribute("lang");if(!(0,E.isUndefined)(e)&&e)return e;const t=new URL(document.location).searchParams,n=t.get("postType"),s=t.get("postId");if("wp_template_part"===n&&(0,E.isNil)(s))return pll_block_editor_plugin_settings.lang=he(),pll_block_editor_plugin_settings.lang.slug;const l=(()=>{const e=(0,d.select)(w);if(!e)return null;const t=e.getEditedPostContext(),n=t?.postType&&t?.postId?t:{postId:e.getEditedPostId(),postType:e.getEditedPostType()};return null===n?null:(0,d.select)(j).getEntityRecord("postType",n.postType,n.postId)})(),a=l?.lang;if(!(0,E.isUndefined)(a)&&a)return a;return pll_block_editor_plugin_settings.lang.slug}();return function(e){return!(0,E.isNil)(e.data)}(e)?(function(e){return"POST"===e.method&&e.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/)&&(0,E.isNil)(e.data.from_post)&&(0,E.isNil)(e.data.lang)}(e)&&me(e,he()?.slug),function(e){const t=(0,E.map)((0,d.select)("core").getEntitiesConfig("postType"),(0,E.property)("baseURL")),n=(0,d.select)("core/editor").getCurrentPostId(),s=e.data.id;return-1!==t.findIndex((function(t){return new RegExp(`${(0,E.escapeRegExp)(t)}`).test(e.path)}))&&n===s}(e)||function(e){return"POST"===e.method&&e.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/)&&!(0,E.isNil)(e.data.from_post)&&!(0,E.isNil)(e.data.lang)}(e)||me(e,t),function(e,t){const n=function(e){const t=(0,d.select)("core").getEntitiesConfig("postType"),n=(0,E.find)(t,{name:e});return n?.baseURL}("wp_template_part");if((0,E.isUndefined)(n))return;const s=new RegExp((0,E.escapeRegExp)(n));if("POST"===e.method&&s.test(e.path)){if(!(0,d.select)(v).getLanguages().get(t).is_default){const n="___"+t;e.data.slug+=n}}}(e,t),e):("wp_template"===fe()&&me(e,he()?.slug),new RegExp(/^\/wp\/v2\/template-parts\/?(?:\?.*)?$/).test(e.path)&&_e(e),me(e,t),e)}));const Ne="polylang-sidebar",Re=pll_block_editor_plugin_settings?.machine_translation?.errors,Ce=document.createElement("div");Ce.id="pll-root";const Le=document.body.appendChild(Ce);(0,r.createRoot)(Le).render((0,i.jsx)(p,{sidebar:()=>(0,i.jsx)(f,{SidebarSlot:a.PluginSidebar,MoreMenuItemSlot:a.PluginSidebarMoreMenuItem,sidebarName:Ne,children:(0,i.jsx)(Te,{})}),sidebarName:Ne,onPromise:pe,children:void 0!==Re&&(0,i.jsx)(m,{notices:Re})})),pe().then((()=>{(()=>{(0,u.registerPlugin)("pll-machine-translation",{render:()=>(0,i.jsx)(se,{children:(0,i.jsx)(I,{})})}),(0,u.registerPlugin)("pll-duplicate-content",{render:()=>(0,i.jsx)(se,{children:(0,i.jsx)(B,{})})});const e=e=>{const t=ie();return e?(0,i.jsx)(q,{post:e.translation,language:e.language,translationTableReducer:e.translationTableReducer,disabled:!t.has(e.language.slug)}):null},t=(0,d.select)(v).getLanguages();t&&0!==t.length&&t.forEach((t=>{(0,u.registerPlugin)(`pll-synchronization-${t.slug}`,{render:({fillProps:n})=>(0,i.jsx)(re,{className:"pll-sync-column pll-column-icon",languageSlug:t.slug,children:(0,i.jsx)(e,{fillProps:n})})})}))})()}))})(),this["polylang-pro"]={}})(); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/editors/site.js b/wp-content/plugins/polylang-pro/js/build/editors/site.js new file mode 100644 index 0000000..7be5832 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/editors/site.js @@ -0,0 +1,3614 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 20 +(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var f=__webpack_require__(677),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0}; +function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q; + + +/***/ }, + +/***/ 848 +(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(20); +} else // removed by dead control flow +{} + + +/***/ }, + +/***/ 677 +(module) { + +module.exports = (function() { return this["React"]; }()); + +/***/ }, + +/***/ 419 +(module) { + +module.exports = (function() { return this["lodash"]; }()); + +/***/ }, + +/***/ 631 +(module) { + +module.exports = (function() { return this["wp"]["apiFetch"]; }()); + +/***/ }, + +/***/ 959 +(module) { + +module.exports = (function() { return this["wp"]["components"]; }()); + +/***/ }, + +/***/ 488 +(module) { + +module.exports = (function() { return this["wp"]["coreData"]; }()); + +/***/ }, + +/***/ 987 +(module) { + +module.exports = (function() { return this["wp"]["data"]; }()); + +/***/ }, + +/***/ 324 +(module) { + +module.exports = (function() { return this["wp"]["editSite"]; }()); + +/***/ }, + +/***/ 2 +(module) { + +module.exports = (function() { return this["wp"]["editor"]; }()); + +/***/ }, + +/***/ 601 +(module) { + +module.exports = (function() { return this["wp"]["element"]; }()); + +/***/ }, + +/***/ 989 +(module) { + +module.exports = (function() { return this["wp"]["htmlEntities"]; }()); + +/***/ }, + +/***/ 75 +(module) { + +module.exports = (function() { return this["wp"]["i18n"]; }()); + +/***/ }, + +/***/ 672 +(module) { + +module.exports = (function() { return this["wp"]["notices"]; }()); + +/***/ }, + +/***/ 125 +(module) { + +module.exports = (function() { return this["wp"]["plugins"]; }()); + +/***/ }, + +/***/ 933 +(module) { + +module.exports = (function() { return this["wp"]["primitives"]; }()); + +/***/ }, + +/***/ 172 +(module) { + +module.exports = (function() { return this["wp"]["url"]; }()); + +/***/ } + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. +(() => { +"use strict"; + +// EXTERNAL MODULE: external {"this":["wp","apiFetch"]} +var external_this_wp_apiFetch_ = __webpack_require__(631); +var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_); +;// ./node_modules/@wpsyntex/polylang-react-library/build/middlewares/filter-path.js +/** + * Filters requests for translatable entities. + * This logic is shared across all Polylang plugins. + * + * @since 3.5 + * + * @param {Object} options - API fetch options object. + * @param {Array} filteredRoutes - Array of route paths to filter. + * @param {Function} filter - Function to filter matching routes. + * @return {Object} Modified REST request options. + */ +const filterPathMiddleware = (options, filteredRoutes, filter) => { + const cleanPath = options.path.split('?')[0].replace(/^\/+|\/+$/g, ''); // Get path without query parameters and trim '/'. + + return Object.values(filteredRoutes).find(path => cleanPath === path) ? filter(options) : options; +}; +/* harmony default export */ const filter_path = (filterPathMiddleware); +;// ./node_modules/@wpsyntex/polylang-react-library/build/middlewares/editors-requests-filter.js +/** + * WordPress dependencies. + */ + + +/* + * Internal dependencies. + */ + + +/** + * Safely filters requests for translatable entities in block editor type screens. + * Ensures that `pllFilteredRoutes` has been well defined on server side and + * that the filtered request is a REST one. + * + * @param {Function} filterCallback - Function to filter API fetch options. + */ +const editorsRequestsFilter = filterCallback => { + external_this_wp_apiFetch_default().use((options, next) => { + /* + * If options.url is defined, this is not a REST request but a direct call to post.php for legacy metaboxes. + * If `filteredRoutes` is not defined, return early. + */ + if ('undefined' !== typeof options.url || 'undefined' === typeof window.pllFilteredRoutes) { + return next(options); + } + return next(filter_path(options, window.pllFilteredRoutes, filterCallback)); + }); +}; +/* harmony default export */ const editors_requests_filter = (editorsRequestsFilter); +// EXTERNAL MODULE: external {"this":["wp","editSite"]} +var external_this_wp_editSite_ = __webpack_require__(324); +// EXTERNAL MODULE: external {"this":["wp","element"]} +var external_this_wp_element_ = __webpack_require__(601); +// EXTERNAL MODULE: external {"this":["wp","primitives"]} +var external_this_wp_primitives_ = __webpack_require__(933); +// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js +var jsx_runtime = __webpack_require__(848); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/translation.js +/** + * Translation icon - translation Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const translation = isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z" + }) +}) : 'translation'; +/* harmony default export */ const icons_translation = (translation); +// EXTERNAL MODULE: external {"this":["wp","plugins"]} +var external_this_wp_plugins_ = __webpack_require__(125); +;// ./js/src/editors/common/app.js +/** + * External dependencies + */ + + +/** + * WordPress Dependencies. + */ + + +const App = ({ + sidebar, + sidebarName, + onPromise, + children +}) => { + onPromise().then(() => { + (0,external_this_wp_plugins_.registerPlugin)(sidebarName, { + icon: icons_translation, + render: sidebar + }); + }, reason => { + console.info(reason); // eslint-disable-line no-console + }); + return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: children + }); +}; +/* harmony default export */ const app = (App); +// EXTERNAL MODULE: external {"this":["wp","data"]} +var external_this_wp_data_ = __webpack_require__(987); +;// ./js/src/editors/common/settings.js +/** + * Module Constants + */ + +const MODULE_KEY = 'pll/metabox'; +const MODULE_CORE_EDITOR_KEY = 'core/editor'; +const MODULE_SITE_EDITOR_KEY = 'core/edit-site'; +const MODULE_POST_EDITOR_KEY = 'core/edit-post'; +const MODULE_CORE_KEY = 'core'; +const DEFAULT_STATE = { + languages: [], + selectedLanguage: {}, + translatedPosts: {}, + fromPost: null, + currentTemplatePart: {} +}; +const UNTRANSLATABLE_POST_TYPE = ['wp_template', 'wp_global_styles']; +const POST_TYPE_WITH_TRASH = ['page']; +const TEMPLATE_PART_SLUG_SEPARATOR = '___'; // Its value must be synchronized with its equivalent in PHP @see PLL_FSE_Template_Slug::SEPARATOR. +const TEMPLATE_PART_SLUG_CHECK_LANGUAGE_PATTERN = '[a-z][a-z0-9_-]*'; // Its value must be synchronized with it equivalent in PHP @see PLL_FSE_Template_Slug::SEPARATOR. + +// EXTERNAL MODULE: external "lodash" +var external_lodash_ = __webpack_require__(419); +// EXTERNAL MODULE: external {"this":["wp","url"]} +var external_this_wp_url_ = __webpack_require__(172); +;// ./js/src/editors/common/utils.js +/* unused harmony import specifier */ var isBoolean; +/** + * WordPress Dependencies + */ + + + + +/** + * Internal dependencies + */ + + + +/** + * Converts array of object to a map. + * + * @param {Array} array Array to convert. + * @param {*} key The key in the object used as key to build the map. + * @return {Map} Converted array. + */ +function convertArrayToMap(array, key) { + const arrayMap = new Map(); + array.reduce(function (accumulator, currentValue) { + accumulator.set(currentValue[key], currentValue); + return accumulator; + }, arrayMap); + return arrayMap; +} + +/** + * Converts map to an associative array. + * + * @param {Map} mapToConvert The map to convert. + * @return {Object} Converted map. + */ +function convertMapToObject(mapToConvert) { + const object = {}; + mapToConvert.forEach(function (value, key) { + this[key] = isBoolean(value) ? value.toString() : value; + }, object); + return object; +} + +/** + * Checks whether the current screen is the site editor. + * Takes in account if Gutenberg is activated. + * + * @return {boolean} True if site editor screen, false otherwise. + */ +function isSiteBlockEditor() { + return !!(document.getElementById('site-editor') || document.getElementById('edit-site-editor')); +} + +/** + * Returns the post type URL for REST API calls or undefined if the user hasn't the rights. + * + * @param {string} name The post type name. + * @return {string|undefined} URL of the given post type, undefined if not available. + */ +function getPostsUrl(name) { + const postTypes = (0,external_this_wp_data_.select)('core').getEntitiesConfig('postType'); + const postType = (0,external_lodash_.find)(postTypes, { + name + }); + return postType?.baseURL; +} + +/** + * Gets all query string parameters and convert them in a URLSearchParams object. + * + * @return {URLSearchParams|null} Search parameters object, null if none. + */ +function getSearchParams() { + // Variable window.location.search is just read for creating and returning a URLSearchParams object to be able to manipulate it more easily. + // eslint-disable-next-line prettier/prettier + if (!(0,external_lodash_.isEmpty)(window.location.search)) { + // phpcs:ignore WordPressVIPMinimum.JS.Window.location + return new URLSearchParams(window.location.search); // phpcs:ignore WordPressVIPMinimum.JS.Window.location + } + return null; +} + +/** + * Gets selected language. + * + * @param {string} lang The post language code. + * @return {Object|null} The selected language, null otherwise. + */ +function getSelectedLanguage(lang) { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + // Pick up this language as selected in languages list + if (languages) { + return languages.get(lang); + } + return null; +} + +/** + * Gets the default language. + * + * @return {Object} The default Language. + */ +function getDefaultLanguage() { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + return Array.from(languages.values()).find(lang => lang.is_default); +} + +/** + * Checks if the given language is the default one. + * + * @param {string} lang The language code to compare with. + * @return {boolean} True if the given language is the default one. + */ +function isDefaultLanguage(lang) { + return lang === getDefaultLanguage().slug; +} + +/** + * Checks if the given request is for saving. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request is for saving. + */ +function isSaveRequest(options) { + // If data is defined we are in a PUT or POST request method otherwise a GET request method + // Test options.method property isn't efficient because most of REST request which use fetch API doesn't pass this property. + // So, test options.data is necessary to know if the REST request is to save data. + // However test if options.data is undefined isn't sufficient because some REST request pass a null value as the ServerSideRender Gutenberg component. + if (!(0,external_lodash_.isNil)(options.data)) { + return true; + } + return false; +} + +/** + * Checks if the given request concerns the current post type. + * + * Useful when saving a reusable block contained in another post type. + * Indeed a reusable block is also a post, but its saving request doesn't concern the post currently edited. + * As we don't know the language of the reusable block when the user triggers the reusable block saving action, + * we need to pass the current post language to be sure that the reusable block will have a language. + * + * @see https://github.com/polylang/polylang/issues/437 - Reusable block has no language when it's saved from another post type editing. + * + * @param {Object} options the initial request + * @return {boolean} True if the request concerns the current post. + */ +function isCurrentPostRequest(options) { + // Saving translation data is needed only for all post types. + // It's done by verifying options.path matches with one of baseURL of all post types + // and compare current post id with this sent in the request. + + // List of post type baseURLs. + const postTypeURLs = (0,external_lodash_.map)((0,external_this_wp_data_.select)('core').getEntitiesConfig('postType'), (0,external_lodash_.property)('baseURL')); + + // Id from the post currently edited. + const postId = (0,external_this_wp_data_.select)('core/editor').getCurrentPostId(); + + // Id from the REST request. + // options.data never isNil here because it's already verified before in isSaveRequest() function. + const id = options.data.id; + + // Return true + // if REST request baseURL matches with one of the known post type baseURLs + // and the id from the post currently edited corresponds on the id passed to the REST request + // Return false otherwise + return -1 !== postTypeURLs.findIndex(function (element) { + return new RegExp(`${(0,external_lodash_.escapeRegExp)(element)}`).test(options.path); + }) && postId === id; +} + +/** + * Checks if the given REST request is for the creation of a new template part translation. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request concerns a template part translation creation. + */ +function isTemplatePartTranslationCreationRequest(options) { + return 'POST' === options.method && options.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/) && !(0,external_lodash_.isNil)(options.data.from_post) && !(0,external_lodash_.isNil)(options.data.lang); +} + +/** + * Checks if the given REST request is for the creation of a new template part. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request concerns a template part creation. + */ +function isNewTemplatePartCreationRequest(options) { + return 'POST' === options.method && options.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/) && (0,external_lodash_.isNil)(options.data.from_post) && (0,external_lodash_.isNil)(options.data.lang); +} + +/** + * Adds language as query string parameter to the given request. + * + * @param {Object} options The initial request. + * @param {string} currentLanguage The language code to add to the request. + */ +function addLanguageToRequest(options, currentLanguage) { + const hasLangArg = (0,external_this_wp_url_.hasQueryArg)(options.path, 'lang'); + const filterLang = (0,external_lodash_.isUndefined)(options.filterLang) || options.filterLang; + if (filterLang && !hasLangArg) { + options.path = (0,external_this_wp_url_.addQueryArgs)(options.path, { + lang: currentLanguage + }); + } +} + +/** + * Adds `include_untranslated` parameter to the request. + * + * @param {Object} options The initial request. + * @return {void} + */ +function addIncludeUntranslatedParam(options) { + options.path = (0,external_this_wp_url_.addQueryArgs)(options.path, { + include_untranslated: true + }); +} + +/** + * Use addIncludeUntranslatedParam if the given page is a template part page. + * Or if the template editing mode is enabled inside post editing. + * + * @param {Object} options The initial request. + * @return {void} + */ +function maybeRequireIncludeUntranslatedTemplate(options) { + const params = new URL(document.location).searchParams; + const postType = params.get('postType'); + const postId = params.get('postId'); + const isEditingTemplate = (0,external_this_wp_data_.select)(MODULE_POST_EDITOR_KEY)?.isEditingTemplate(); + if ('wp_template_part' === postType && !(0,external_lodash_.isNil)(postId) || isEditingTemplate) { + addIncludeUntranslatedParam(options); + } +} + +/** + * Returns true if the given post is a template part, false otherwise. + * + * @param {Object} post A post object. + * @return {boolean} Whether it is a template part or not. + */ +function isTemplatePart(post) { + return 'wp_template_part' === post.type; +} + +/** + * Returns the current post type considering the Site Editor or Post Editor. + * + * @return {string} The current post type. + */ +function getCurrentPostType() { + if (isSiteBlockEditor()) { + return (0,external_this_wp_data_.select)(MODULE_SITE_EDITOR_KEY).getEditedPostType(); + } + return (0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY).getCurrentPostType(); +} + +/** + * Adds parameters according to the context of the request. + * + * @since 3.5 + * + * @param {APIFetchOptions} options The options of the request. + * @return {APIFetchOptions} The modified options of the request. + */ +function addParametersToRequest(options) { + const currentLangSlug = getCurrentLanguageSlug(); + + // `POST` or `PUT` request. + if (isSaveRequest(options)) { + /** + * Use default language for new template part that doesn't exist in any language, + * otherwise use the current language. + */ + if (isNewTemplatePartCreationRequest(options)) { + addLanguageToRequest(options, getDefaultLanguage()?.slug); + } + if (!isCurrentPostRequest(options) && !isTemplatePartTranslationCreationRequest(options)) { + addLanguageToRequest(options, currentLangSlug); + } + maybeAddLangSuffixToTemplatePart(options, currentLangSlug); + return options; + } + const currentPostType = getCurrentPostType(); + + // Current language is set to default when editing templates. + if ('wp_template' === currentPostType) { + addLanguageToRequest(options, getDefaultLanguage()?.slug); + } + const templatePartListRegex = new RegExp(/^\/wp\/v2\/template-parts\/?(?:\?.*)?$/); + + // Template part list request. + if (templatePartListRegex.test(options.path)) { + maybeRequireIncludeUntranslatedTemplate(options); + } + + // All kinds of requests. + addLanguageToRequest(options, currentLangSlug); + return options; +} + +/** + * Gets language from store or a fallback javascript global variable. + * + * @return {string} The language slug. + */ +function getCurrentLanguageSlug() { + if ((0,external_lodash_.isUndefined)((0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY))) { + // Return ASAP to avoid issues later. + return pll_block_editor_plugin_settings.lang.slug; + } + + // Post block editor case. + const postLanguage = (0,external_this_wp_data_.select)(MODULE_CORE_EDITOR_KEY).getEditedPostAttribute('lang'); + if (!(0,external_lodash_.isUndefined)(postLanguage) && postLanguage) { + return postLanguage; + } + + // Returns the default lang if the current location is a template part list + // and update pll_block_editor_plugin_settings at the same time. + const params = new URL(document.location).searchParams; + const postType = params.get('postType'); + const postId = params.get('postId'); + if ('wp_template_part' === postType && (0,external_lodash_.isNil)(postId)) { + pll_block_editor_plugin_settings.lang = getDefaultLanguage(); + return pll_block_editor_plugin_settings.lang.slug; + } + + // FSE template editor case. + const template = getCurrentPostFromDataStore(); + const templateLanguage = template?.lang; + if (!(0,external_lodash_.isUndefined)(templateLanguage) && templateLanguage) { + return templateLanguage; + } + + // For the first requests block editor isn't initialized yet. + // So language is retrieved from a javascript global variable initialized server-side. + return pll_block_editor_plugin_settings.lang.slug; +} + +/** + * Adds the language suffix to a template part only during creation. + * + * @param {Object} options Object representing a REST request. + * @param {string} langSlug The Language slug to add. + * @return {void} + */ +function maybeAddLangSuffixToTemplatePart(options, langSlug) { + const restBaseUrl = getPostsUrl('wp_template_part'); + if ((0,external_lodash_.isUndefined)(restBaseUrl)) { + // The user hasn't the rights to edit template part. + return; + } + const templatePartURLRegExp = new RegExp((0,external_lodash_.escapeRegExp)(restBaseUrl)); + if ('POST' === options.method && templatePartURLRegExp.test(options.path)) { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + const language = languages.get(langSlug); + if (!language.is_default) { + // No suffix for default language. + const langSuffix = TEMPLATE_PART_SLUG_SEPARATOR + langSlug; + options.data.slug += langSuffix; + } + } +} +;// ./js/src/editors/common/store/utils.js +/* unused harmony import specifier */ var utils_select; +/* unused harmony import specifier */ var subscribe; +/* unused harmony import specifier */ var dispatch; +/* unused harmony import specifier */ var isNil; +/* unused harmony import specifier */ var isEmpty; +/* unused harmony import specifier */ var utils_MODULE_CORE_EDITOR_KEY; +/* unused harmony import specifier */ var utils_MODULE_KEY; +/* unused harmony import specifier */ var utils_MODULE_CORE_KEY; +/** + * WordPress Dependencies + */ + + + +/** + * Internal dependencies + */ + + + +/** + * Wait for the whole post block editor context has been initialized: current post loaded and languages list initialized. + */ +const isBlockPostEditorContextInitialized = () => { + if (isNil(utils_select(utils_MODULE_CORE_EDITOR_KEY))) { + return Promise.reject("Polylang languages panel can't be initialized because block editor isn't fully initialized."); + } + + // save url params especially when a new translation is creating + saveURLParams(); + + /** + * Set a promise fulfilled with the current post. + */ + const isCurrentPostLoaded = new Promise(function (resolve) { + const unsubscribe = subscribe(function () { + const currentPost = utils_select(utils_MODULE_CORE_EDITOR_KEY).getCurrentPost(); + if (!isEmpty(currentPost)) { + unsubscribe(); + resolve(currentPost); + } + }); + }); + + /** + * Set a promise fulfilled with the source post when a new draft is created from a source, null otherwise. + */ + const isFromPostLoaded = new Promise(function (resolve) { + const unsubscribe = subscribe(function () { + const fromPostUrlParams = utils_select(utils_MODULE_KEY).getFromPost(); + if (!fromPostUrlParams || !fromPostUrlParams.id || !fromPostUrlParams.postType) { + unsubscribe(); + resolve(null); + return; + } + const fromPost = utils_select(utils_MODULE_CORE_KEY).getEntityRecord('postType', fromPostUrlParams.postType, fromPostUrlParams.id, { + context: 'view' + } // Use 'view' context so translators can read posts they cannot edit. + ); + if (fromPost && fromPost.id) { + unsubscribe(); + resolve(fromPost); + } + }); + }); + return Promise.all([isCurrentPostLoaded, isFromPostLoaded, isLanguagesinitialized()]).then(function (resolvedValues) { + const [currentPost, fromPost] = resolvedValues; + + // Force update translations when creating a draft from a source post. + if (fromPost && fromPost.id && currentPost.lang) { + dispatch(utils_MODULE_CORE_EDITOR_KEY).editPost({ + translations: { + ...fromPost.translations, + [currentPost.lang]: currentPost.id + } + }); + } + }); +}; + +/** + * Wait for the whole site editor context to be initialized: current template loaded and languages list initialized. + */ +const isSiteEditorContextInitialized = () => { + // save url params especially when a new translation is creating + saveURLParams(); + + /** + * Set a promise to wait for the current template to be fully loaded before making other processes. + * It allows to see if both Site Editor and Core stores are available (@see getCurrentPostFromDataStore()). + */ + const isTemplatePartLoaded = new Promise(function (resolve) { + const unsubscribe = (0,external_this_wp_data_.subscribe)(function () { + const store = (0,external_this_wp_data_.select)(MODULE_SITE_EDITOR_KEY); + if (store) { + unsubscribe(); + resolve(); + } + }); + }); + return Promise.all([isTemplatePartLoaded, isLanguagesinitialized()]); +}; + +/** + * Returns a promise fulfilled when the languages list is correctly initialized before making other processes. + * + * @return {Promise} A promise fulfilled with the languages list. + */ +const isLanguagesinitialized = () => new Promise(function (resolve) { + const unsubscribe = (0,external_this_wp_data_.subscribe)(function () { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY)?.getLanguages(); + if (languages?.size > 0) { + unsubscribe(); + resolve(languages); + } + }); +}); + +/** + * Save query string parameters from URL. They could be needed after + * They could be null if they does not exist + */ +function saveURLParams() { + // Variable window.location.search isn't use directly + // Function getSearchParams return an URLSearchParams object for manipulating each parameter + // Each of them are sanitized below + const searchParams = getSearchParams(); + const fromPost = searchParams && searchParams.get('from_post'); + const postType = searchParams && searchParams.get('post_type'); + const newLanguage = searchParams && searchParams.get('new_lang'); + if (fromPost && postType && newLanguage) { + (0,external_this_wp_data_.dispatch)(MODULE_KEY).setFromPost({ + id: wp.sanitize.stripTagsAndEncodeText(fromPost), + postType: wp.sanitize.stripTagsAndEncodeText(postType), + newLanguage: wp.sanitize.stripTagsAndEncodeText(newLanguage) + }); + } +} + +/** + * Gets the current post using the Site Editor store and the Core store. + * + * @return {object|null} The current post object, `null` if none found. + */ +const getCurrentPostFromDataStore = () => { + const siteEditorSelector = (0,external_this_wp_data_.select)(MODULE_SITE_EDITOR_KEY); + + /** + * Return null when called from our apiFetch middleware without a properly loaded store. + */ + if (!siteEditorSelector) { + return null; + } + const context = siteEditorSelector.getEditedPostContext(); + const editedContext = context?.postType && context?.postId ? context : { + postId: siteEditorSelector.getEditedPostId(), + postType: siteEditorSelector.getEditedPostType() + }; + return null === editedContext ? null : (0,external_this_wp_data_.select)(MODULE_CORE_KEY).getEntityRecord('postType', editedContext.postType, editedContext.postId); +}; +;// ./js/src/editors/common/components/cache-flush-provider/index.js +/** + * WordPress Dependencies. + */ + + + + +/** + * Internal Dependencies. + */ + + +const CacheFlushProvider = ({ + onPromise +}) => { + const currentLanguageRef = (0,external_this_wp_element_.useRef)({}); + const getCurrentLanguage = () => { + const currentPost = getCurrentPostFromDataStore(); + return getSelectedLanguage(currentPost?.lang) ?? 'default'; + }; + (0,external_this_wp_element_.useEffect)(() => { + const maybeInvalidateCache = nextLocation => { + currentLanguageRef.current = getCurrentLanguage(); + if (currentLanguageRef?.current.is_default || 'default' === currentLanguageRef?.current) { + /** + * Current language is the default one or assimilated as it (i.e. Global Styles or main menu). + */ + return; + } + const currentQuery = new URL(document.location.href).searchParams; + const nextQuery = new URL(nextLocation).searchParams; + if (currentQuery.get('postId') === nextQuery.get('postId')) { + /** + * Current language is not changing (i.e. only edit mode is changing). + */ + return; + } + + /** + * Current language is changing (i.e. navigate to a untranslatable post type screen or main menu). + */ + (0,external_this_wp_data_.dispatch)(MODULE_CORE_KEY).invalidateResolutionForStore(); + }; + onPromise().then(() => { + currentLanguageRef.current = getCurrentLanguage(); + }); + (history => { + const originalPushState = history.pushState; + const originalReplaceState = history.replaceState; + history.pushState = (state, key, path) => { + maybeInvalidateCache(path); + return originalPushState.apply(history, [state, key, path]); + }; + history.replaceState = (state, key, path) => { + maybeInvalidateCache(path); + return originalReplaceState.apply(history, [state, key, path]); + }; + })(window.history); + }, [onPromise]); + + /** + * Renderless component. + */ + return null; +}; +/* harmony default export */ const cache_flush_provider = (CacheFlushProvider); +// EXTERNAL MODULE: external {"this":["wp","i18n"]} +var external_this_wp_i18n_ = __webpack_require__(75); +;// ./js/src/editors/common/components/sidebar/index.js +/** + * WordPress dependencies + */ + + +const Sidebar = ({ + SidebarSlot, + MoreMenuItemSlot, + sidebarName, + children +}) => { + const title = (0,external_this_wp_i18n_.__)('Languages', 'polylang-pro'); + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SidebarSlot, { + name: sidebarName, + title: title, + children: children + }), /*#__PURE__*/(0,jsx_runtime.jsx)(MoreMenuItemSlot, { + target: sidebarName, + children: title + })] + }); +}; +/* harmony default export */ const sidebar = (Sidebar); +// EXTERNAL MODULE: external {"this":["wp","coreData"]} +var external_this_wp_coreData_ = __webpack_require__(488); +;// ./js/src/editors/common/components/language-flag/index.js +/* eslint-disable import/no-extraneous-dependencies */ +/** + * External dependencies. + */ + + + +/** + * Displays a flag icon for a given language. + * + * @since 3.1 + * @since 3.2 Now its own component. + * + * @param {Object} props LanguageFlag props. + * @param {Object} props.language Language object for the flag. + * + * @return {React.ReactElement} Flag component. + */ + +function LanguageFlag({ + language +}) { + if (!(0,external_lodash_.isNil)(language)) { + return !(0,external_lodash_.isEmpty)(language.flag_url) ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-select-flag", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { + src: language.flag_url, + alt: language.name, + title: language.name, + className: "flag" + }) + }) : /*#__PURE__*/(0,jsx_runtime.jsxs)("abbr", { + children: [language.slug, /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: language.name + })] + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-translation-icon", + children: icons_translation + }); +} +/* harmony default export */ const language_flag = (LanguageFlag); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/star.js +/** + * Star icon - star-filled Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const star_isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const star = star_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "m10 1 3 6 6 .75-4.12 4.62L16 19l-6-3-6 3 1.13-6.63L1 7.75 7 7z" + }) +}) : 'star-filled'; +/* harmony default export */ const icons_star = (star); +// EXTERNAL MODULE: external {"this":["wp","components"]} +var external_this_wp_components_ = __webpack_require__(959); +;// ./js/src/editors/common/components/default-lang-icon/index.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +const DefaultLangIcon = () => /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Icon, { + icon: icons_star, + className: "pll-default-lang-icon" + }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: (0,external_this_wp_i18n_.__)('Default language.', 'polylang-pro') + })] +}); +/* harmony default export */ const default_lang_icon = (DefaultLangIcon); +;// ./js/src/editors/common/components/language-item/index.js +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + + + +const LanguageItem = ({ + language, + currentPost +}) => { + const postType = (0,external_this_wp_data_.useSelect)(select => select(MODULE_CORE_KEY).getPostType(currentPost.type), [currentPost]); + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", { + children: (0,external_this_wp_i18n_.__)('Language', 'polylang-pro') + }) + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: "pll-language-item", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(language_flag, { + language: language + }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-language-name", + children: language.name + }), language.is_default && /*#__PURE__*/(0,jsx_runtime.jsx)(default_lang_icon, {})] + }), language.is_default && /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-metabox-info", + children: 'wp_template_part' === postType?.slug ?? (0,external_this_wp_i18n_.__)('This template part is used for languages that have not yet been translated.', 'polylang-pro') + }) + })] + }); +}; +/* harmony default export */ const language_item = (LanguageItem); +;// ./js/src/editors/common/components/metaboxes/wrapper/index.js + +const MetaboxWrapper = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "components-panel__body is-opened", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-metabox-location", + children: children + }) + }); +}; +/* harmony default export */ const wrapper = (MetaboxWrapper); +;// ./js/src/editors/common/components/not-translatable-notice/index.js +/** + * WordPress Dependencies. + */ + + +const NotTranslatableNotice = ({ + postType +}) => { + if ('wp_template' === postType) { + return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-metabox-error components-notice is-warning", + children: (0,external_this_wp_i18n_.__)('Templates are not translatable, only template parts are.', 'polylang-pro') + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-metabox-error components-notice is-warning", + children: (0,external_this_wp_i18n_.__)('This entity is not translatable.', 'polylang-pro') + }); +}; +/* harmony default export */ const not_translatable_notice = (NotTranslatableNotice); +;// ./js/src/editors/common/components/metaboxes/container/index.js +/** + * WordPress Dependencies. + */ + + +/** + * Internal Dependencies. + */ + + + +const MetaboxContainer = ({ + isError, + isAllowedPostType, + postType, + children +}) => { + if (!isAllowedPostType) { + return /*#__PURE__*/(0,jsx_runtime.jsx)(wrapper, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(not_translatable_notice, { + postType: postType + }) + }); + } + if (isError) { + return /*#__PURE__*/(0,jsx_runtime.jsx)(wrapper, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-metabox-error components-notice is-error", + children: (0,external_this_wp_i18n_.__)('Unable to retrieve the content language', 'polylang-pro') + }) + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)(wrapper, { + children: children + }); +}; +/* harmony default export */ const container = (MetaboxContainer); +;// ./js/src/editors/common/components/translations-table/cells/add-or-edit/index.js + +const AddOrEditCell = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("td", { + className: "pll-edit-column pll-column-icon", + children: children + }); +}; +/* harmony default export */ const add_or_edit = (AddOrEditCell); +;// ./js/src/editors/common/components/translations-table/cells/default-language/index.js +/** + * Internal dependencies + */ + + +const DefaultLanguageCell = ({ + isDefault +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("td", { + className: "pll-default-lang-column pll-column-icon", + children: isDefault && /*#__PURE__*/(0,jsx_runtime.jsx)(default_lang_icon, {}) + }); +}; +/* harmony default export */ const default_language = (DefaultLanguageCell); +;// ./js/src/editors/common/components/translations-table/cells/delete/index.js + +const DeleteCell = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("td", { + className: "pll-delete-column pll-column-icon", + children: children + }); +}; +/* harmony default export */ const cells_delete = (DeleteCell); +;// ./js/src/editors/common/components/translations-table/cells/flag/index.js +/** + * External dependencies. + */ + + +const FlagCell = ({ + language +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("th", { + className: "pll-language-column", + children: !(0,external_lodash_.isEmpty)(language.flag) ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-select-flag flag", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { + src: language.flag_url, + alt: language.name, + title: language.name + }) + }) : /*#__PURE__*/(0,jsx_runtime.jsxs)("abbr", { + children: [language.slug, /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: language.name + })] + }) + }); +}; +/* harmony default export */ const flag = (FlagCell); +;// ./js/src/editors/common/components/translations-table/cells/translation-input/index.js + +const TranslationInputCell = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsx)("td", { + className: "pll-translation-column", + children: children + }); +}; +/* harmony default export */ const translation_input = (TranslationInputCell); +;// ./js/src/editors/common/components/translations-table/cells/index.js +/** + * Cells components for translations table. + */ + + + + + + +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/plus.js +/** + * Plus icon - plus Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const plus_isPrimitivesComponents = 'undefined' !== typeof wp.primitive; +const plus = plus_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M17 7v3h-5v5h-3v-5h-5v-3h5v-5h3v5h5z" + }) +}) : 'plus'; +/* harmony default export */ const icons_plus = (plus); +;// ./js/src/editors/common/components/buttons/add/index.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +/** + * Renders a button to add new translation. + * + * @param {Object} props Component props. + * @param {Object} props.language Language of the new translation. + * @param {string} props.href URL to add a new translation, pass '#' if managed in REST. + * @param {boolean} props.disabled Whether the button is disabled. + * @param {Function} props.handleAddClick Callback to add a translation, default to null. Useful only if the button is not a link. + * @return {React.ReactElement} Button component. + */ + +const AddButton = ({ + language, + href, + disabled, + handleAddClick = null +}) => { + const accessibilityText = (0,external_this_wp_i18n_.sprintf)( + // translators: %s is a native language name. + (0,external_this_wp_i18n_.__)('Add a translation in %s', 'polylang-pro'), language.name); + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + href: href, + disabled: disabled, + icon: icons_plus, + label: accessibilityText, + className: `pll-button`, + onClick: handleAddClick, + "data-target-language": language.slug // Store the target language to retrieve it through the click event. + , + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: accessibilityText + }) + }); +}; +/* harmony default export */ const add = (AddButton); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/trash.js +/** + * Trash icon - trash Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const trash_isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const trash = trash_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z" + }) +}) : 'trash'; +/* harmony default export */ const icons_trash = (trash); +;// ./js/src/editors/common/components/buttons/delete/index.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +/** + * Renders a button to delete a translation. + * + * @param {Object} props Component props. + * @param {Object} props.language Language of the existing translation. + * @param {boolean} props.disabled Whether the button is disabled. + * @param {Function} props.onClick Callback to delete a translation. + * @return {React.ReactElement} Button component. + */ + +const DeleteButton = ({ + language, + disabled, + onClick +}) => { + const translationScreenReaderText = (0,external_this_wp_i18n_.sprintf)( + // translators: %s is a native language name. + (0,external_this_wp_i18n_.__)('Delete the translation in %s', 'polylang-pro'), language.name); + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + icon: icons_trash, + label: translationScreenReaderText, + disabled: disabled, + className: "pll-button", + onClick: onClick, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: translationScreenReaderText + }) + }); +}; +/* harmony default export */ const buttons_delete = (DeleteButton); +// EXTERNAL MODULE: external {"this":["wp","notices"]} +var external_this_wp_notices_ = __webpack_require__(672); +;// ./js/src/editors/common/components/buttons/persisting-user-data/index.js +/* unused harmony import specifier */ var Button; +/* unused harmony import specifier */ var useSelect; +/* unused harmony import specifier */ var useDispatch; +/* unused harmony import specifier */ var useState; +/* unused harmony import specifier */ var noticesStore; +/* unused harmony import specifier */ var apiFetch; +/* unused harmony import specifier */ var coreStore; +/* unused harmony import specifier */ var _jsx; +/** + * WordPress dependencies + */ + + + + + + + +/** + * Prepares user preference data for API call. + * + * @param {Object} currentUser The current user object. + * @param {string} userPreferenceName The user preference name. + * @param {string} postType The post type. + * @param {boolean} isActive Current active state. + * @return {Object} Prepared data for API call. + */ + +const prepareUserPreferenceData = (currentUser, userPreferenceName, postType, isActive) => { + /* + * If the user meta is an empty array, it has never been created. + * So we convert it as an object to be able to update correctly its value in DB. + */ + if (undefined === currentUser[userPreferenceName] || Array.isArray(currentUser[userPreferenceName]) && currentUser[userPreferenceName].length === 0) { + currentUser[userPreferenceName] = {}; + } + + // Updates currentUser preference. + currentUser[userPreferenceName][postType] = !isActive; + return { + [userPreferenceName]: currentUser[userPreferenceName] + }; +}; + +/** + * Button to persist user data per post type. + * + * @param {Object} props The component props. + * @param {string} props.id The button id attribute. + * @param {string} props.postType The post type. + * @param {string} props.userPreferenceName The user preference name. + * @param {string} props.activeLabel The active label. + * @param {string} props.inactiveLabel The inactive label. + * @param {Object} props.icon The icon. + * + * @return {React.ReactNode} The Persisting User Data Button. + */ +const PersistingUserDataButton = ({ + id, + postType, + userPreferenceName, + activeLabel, + inactiveLabel, + icon +}) => { + const currentUser = useSelect(select => select(coreStore).getCurrentUser(), []); + const [isLoading, setIsLoading] = useState(false); + const { + createErrorNotice + } = useDispatch(noticesStore); + const buttonInitialState = () => { + if (undefined === currentUser || undefined === currentUser[userPreferenceName] || undefined === currentUser[userPreferenceName][postType]) { + return false; + } + return currentUser[userPreferenceName][postType]; + }; + const [isActive, setIsActive] = useState(buttonInitialState); + const saveStateInUserPreferences = () => { + setIsLoading(true); + const data = prepareUserPreferenceData(currentUser, userPreferenceName, postType, isActive); + + // Saves the preference. + apiFetch({ + path: '/wp/v2/users/me', + data, + method: 'POST' + }).then(() => { + // Update component state only on successful API call. + setIsActive(prevIsActive => !prevIsActive); + }).catch(error => { + createErrorNotice(error.message, { + type: 'snackbar' + }); + }).finally(() => { + // Always reset loading state. + setIsLoading(false); + }); + }; + return /*#__PURE__*/_jsx(Button, { + id: id, + className: `pll-button pll-before-post-translations-button ${isActive && `wp-ui-text-highlight`}`, + onClick: saveStateInUserPreferences, + icon: icon, + label: isActive ? activeLabel : inactiveLabel, + isBusy: isLoading, + disabled: isLoading, + children: /*#__PURE__*/_jsx("span", { + className: "screen-reader-text", + children: isActive ? activeLabel : inactiveLabel + }) + }); +}; +/* harmony default export */ const persisting_user_data = ((/* unused pure expression or super */ null && (PersistingUserDataButton))); +;// ./js/src/editors/common/components/buttons/machine-translation/index.js +/* unused harmony import specifier */ var sprintf; +/* unused harmony import specifier */ var __; +/* unused harmony import specifier */ var Path; +/* unused harmony import specifier */ var machine_translation_useSelect; +/* unused harmony import specifier */ var machine_translation_PersistingUserDataButton; +/* unused harmony import specifier */ var machine_translation_MODULE_CORE_EDITOR_KEY; +/* unused harmony import specifier */ var machine_translation_jsx; +/** + * WordPress dependencies + */ + + + + +/** + * Internal dependencies + */ + + + +/** + * Machine Translation Button + * + * @return {React.ReactNode|null} The Machine Translation Button, `null` if disabled. + */ + +const MachineTranslationButton = () => { + const postType = machine_translation_useSelect(select => select(machine_translation_MODULE_CORE_EDITOR_KEY).getCurrentPostType(), []); + const machineTranslation = pll_block_editor_plugin_settings?.machine_translation; + if (!machineTranslation || !machineTranslation.isActive) { + return null; + } + const { + path_d, + ...iconProps + } = machineTranslation.icon; // eslint-disable-line camelcase + + const icon = { + type: 'svg', + props: { + ...iconProps, + children: /*#__PURE__*/machine_translation_jsx(Path, { + d: path_d + }) // eslint-disable-line camelcase + } + }; + return /*#__PURE__*/machine_translation_jsx(machine_translation_PersistingUserDataButton, { + id: 'pll-machine-translation', + postType, + userPreferenceName: `pll_machine_translation_${machineTranslation.slug}`, + activeLabel: sprintf(/* translators: %s is the name of the machine translation service. */ + __('Deactivate %s machine translation', 'polylang-pro'), machineTranslation.name), + inactiveLabel: sprintf(/* translators: %s is the name of the machine translation service. */ + __('Activate %s machine translation', 'polylang-pro'), machineTranslation.name), + icon + }); +}; +/* harmony default export */ const machine_translation = ((/* unused pure expression or super */ null && (MachineTranslationButton))); +;// ./js/src/editors/common/components/buttons/duplicate/index.js +/* unused harmony import specifier */ var duplicationIcon; +/* unused harmony import specifier */ var duplicate_; +/* unused harmony import specifier */ var duplicate_useSelect; +/* unused harmony import specifier */ var duplicate_PersistingUserDataButton; +/* unused harmony import specifier */ var duplicate_MODULE_CORE_EDITOR_KEY; +/* unused harmony import specifier */ var duplicate_jsx; +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + + +/** + * Duplicate Button + * + * @param {Object} props The component props. + * + * @return {React.ReactNode|null} The Duplicate Button, `null` if loading. + */ + +const DuplicateButton = props => { + const postType = duplicate_useSelect(select => select(duplicate_MODULE_CORE_EDITOR_KEY).getCurrentPostType(), []); + if (!postType) { + return null; + } + const newProps = { + ...props, + id: 'pll-duplicate', + userPreferenceName: 'pll_duplicate_content', + /* translators: accessibility text */ + activeLabel: duplicate_('Deactivate the content duplication', 'polylang-pro'), + /* translators: accessibility text */ + inactiveLabel: duplicate_('Activate the content duplication', 'polylang-pro'), + icon: duplicationIcon, + postType + }; + return /*#__PURE__*/duplicate_jsx(duplicate_PersistingUserDataButton, { + ...newProps + }); +}; +/* harmony default export */ const duplicate = ((/* unused pure expression or super */ null && (DuplicateButton))); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/pencil.js +/** + * Pencil icon - edit Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const pencil_isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const pencil = pencil_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M13.89 3.39l2.71 2.72c0.46 0.46 0.42 1.24 0.030 1.64l-8.010 8.020-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.030c0.39-0.39 1.22-0.39 1.68 0.070zM11.16 6.18l-5.59 5.61 1.11 1.11 5.54-5.65zM8.19 14.41l5.58-5.6-1.070-1.080-5.59 5.6z" + }) +}) : 'edit'; +/* harmony default export */ const icons_pencil = (pencil); +;// ./js/src/editors/common/components/buttons/edit/index.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +/** + * Renders a button to edit existing translation. + * + * @param {Object} props Component props. + * @param {Object} props.language Language of the existing translation. + * @param {string} props.href URL to edit a new translation, pass '#' if managed in REST. + * @param {boolean} props.disabled Whether the button is disabled. + * @param {Function} props.handleEditClick Callback to edit a translation, default to null. Useful only if the button is not a link. + * @return {React.ReactElement} Button component. + */ + +const EditButton = ({ + language, + href, + disabled, + handleEditClick = null +}) => { + const accessibilityText = (0,external_this_wp_i18n_.sprintf)(/* translators: accessibility text, %s is a native language name. For example Deutsch for German or Français for french. */ + (0,external_this_wp_i18n_.__)('Edit the translation in %s', 'polylang-pro'), language.name); + return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + href: href, + disabled: disabled, + icon: icons_pencil, + label: accessibilityText, + className: `pll-button`, + onClick: handleEditClick, + "data-target-language": language.slug // Store the target language to retrieve it through the click event. + , + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: accessibilityText + }) + }); +}; +/* harmony default export */ const edit = (EditButton); +// EXTERNAL MODULE: external {"this":["wp","editor"]} +var external_this_wp_editor_ = __webpack_require__(2); +;// ./js/src/editors/common/components/buttons/synchronization/use-dispatch-current-post-title.js +/* unused harmony import specifier */ var useEffect; +/** + * WordPress dependencies + */ + + +/** + * Custom hook to dispatch the current post title to the translation table reducer. + * + * @param {Object} language The language object. + * @param {Function} translationTableReducer The translation table reducer. + * @param {Object} sourcePost The source post object. + * @param {Object|null} post The post object, null when no translation. + * @return {void} + */ +const useDispatchCurrentPostTitle = (language, translationTableReducer, sourcePost, post) => { + useEffect(() => { + if (sourcePost.pll_sync_post[language.slug] && sourcePost.translations[language.slug] && sourcePost.title !== post?.title) { + const translatedPost = { + ...sourcePost, + // Keep synchronized post title up to date. + title: sourcePost.title + }; + translatedPost.id = post?.id ?? 0; + translationTableReducer({ + type: 'add_translation', + lang: language, + post: { + ...translatedPost + } + }); + } + }, [language, translationTableReducer, sourcePost, post]); +}; +/* harmony default export */ const use_dispatch_current_post_title = ((/* unused pure expression or super */ null && (useDispatchCurrentPostTitle))); +;// ./js/src/editors/common/components/buttons/synchronization/index.js +/* unused harmony import specifier */ var synchronizationIcon; +/* unused harmony import specifier */ var synchronization_Button; +/* unused harmony import specifier */ var Modal; +/* unused harmony import specifier */ var synchronization_; +/* unused harmony import specifier */ var synchronization_useState; +/* unused harmony import specifier */ var useMemo; +/* unused harmony import specifier */ var synchronization_useEffect; +/* unused harmony import specifier */ var synchronization_useSelect; +/* unused harmony import specifier */ var synchronization_select; +/* unused harmony import specifier */ var synchronization_dispatch; +/* unused harmony import specifier */ var synchronization_coreStore; +/* unused harmony import specifier */ var coreEditorStore; +/* unused harmony import specifier */ var synchronization_MODULE_CORE_EDITOR_KEY; +/* unused harmony import specifier */ var synchronization_useDispatchCurrentPostTitle; +/* unused harmony import specifier */ var _jsxs; +/* unused harmony import specifier */ var _Fragment; +/* unused harmony import specifier */ var synchronization_jsx; +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + + + + + +/** + * Internal dependencies + */ + + + +/** + * Prepares the sync posts object to be stored with a REST field. + * + * @param {Object} syncPosts The sync posts object. + * @return {Object} The prepared sync posts object, with boolean values converted to strings. + */ + +const prepareSyncPosts = syncPosts => { + return Object.fromEntries(Object.entries(syncPosts).map(([key, value]) => [key, value.toString()])); +}; + +/** + * Synchronization button component. + * + * @param {Object} props The props object. + * @param {Object} props.post The post object. + * @param {Object} props.language The language object. + * @param {Object} props.translationTableReducer The translation table reducer. + * @param {boolean} props.disabled Whether the button is disabled. + * @return {React.Component} The synchronization button component. + */ +const SynchronizationButton = ({ + post, + language, + translationTableReducer, + disabled +}) => { + const [isSynchronized, setIsSynchronized] = synchronization_useState(false); + const [isTranslated, setIsTranslated] = synchronization_useState(false); + const [isModalOpen, setIsModalOpen] = synchronization_useState(false); + const sourcePost = synchronization_useSelect(() => { + return synchronization_select(coreEditorStore).getCurrentPost(); + }, []); + synchronization_useDispatchCurrentPostTitle(language, translationTableReducer, sourcePost, post); + const buttonLabel = useMemo(() => { + return isSynchronized ? synchronization_('Unsynchronize this post', 'polylang-pro') : synchronization_('Synchronize this post', 'polylang-pro'); + }, [isSynchronized]); + const toggleSynchronizationStatus = () => { + const syncPosts = sourcePost.pll_sync_post; + if (isSynchronized) { + delete syncPosts[language.slug]; + setIsSynchronized(false); + } else { + syncPosts[language.slug] = true; + setIsSynchronized(true); + setIsTranslated(true); + if (!post) { + post = { + id: 0 + }; + } + translationTableReducer({ + type: 'add_translation', + lang: language, + post: { + // Optimistic rendering. + ...post, + title: sourcePost.title + } + }); + synchronization_dispatch(synchronization_coreStore).invalidateResolution('getEntityRecord', ['postType', post.type, post.id]); + } + synchronization_dispatch(synchronization_MODULE_CORE_EDITOR_KEY).editPost({ + pll_sync_post: prepareSyncPosts(syncPosts) + }); + }; + synchronization_useEffect(() => { + setIsTranslated(post?.id !== undefined); + setIsSynchronized(sourcePost.pll_sync_post[language.slug] !== undefined); + }, [sourcePost, language, post]); + return /*#__PURE__*/_jsxs(_Fragment, { + children: [/*#__PURE__*/synchronization_jsx(synchronization_Button, { + icon: synchronizationIcon, + label: buttonLabel, + id: `pll_sync_post[${language.slug}]`, + className: `pll-button ${isSynchronized && 'wp-ui-text-highlight'}`, + onClick: () => { + if (!isSynchronized && isTranslated) { + setIsModalOpen(true); + } else { + toggleSynchronizationStatus(); + } + }, + disabled: disabled, + children: /*#__PURE__*/synchronization_jsx("span", { + className: "screen-reader-text", + children: buttonLabel + }) + }), isModalOpen && /*#__PURE__*/_jsxs(Modal, { + title: synchronization_('Synchronize this post', 'polylang-pro'), + onRequestClose: () => { + setIsModalOpen(false); + }, + children: [/*#__PURE__*/synchronization_jsx("p", { + children: synchronization_('You are about to overwrite an existing translation. Are you sure you want to proceed?', 'polylang-pro') + }), /*#__PURE__*/_jsxs("div", { + role: "group", + className: "components-button-group buttons", + children: [/*#__PURE__*/synchronization_jsx(synchronization_Button, { + variant: "tertiary", + onClick: () => { + setIsModalOpen(false); + }, + type: "button", + children: synchronization_('Cancel', 'polylang-pro') + }), /*#__PURE__*/synchronization_jsx("span", { + children: "\xA0" + }), /*#__PURE__*/synchronization_jsx(synchronization_Button, { + variant: "primary", + onClick: () => { + toggleSynchronizationStatus(); + setIsModalOpen(false); + }, + type: "submit", + children: synchronization_('Synchronize', 'polylang-pro') + })] + })] + })] + }); +}; +/* harmony default export */ const synchronization = ((/* unused pure expression or super */ null && (SynchronizationButton))); +;// ./js/src/editors/common/components/buttons/index.js +/** + * Buttons components. + */ + + + + + + + +// EXTERNAL MODULE: external {"this":["wp","htmlEntities"]} +var external_this_wp_htmlEntities_ = __webpack_require__(989); +;// ./js/src/editors/common/components/translations-table/input/index.js +/* unused harmony import specifier */ var ComboboxControl; +/* unused harmony import specifier */ var input_useState; +/* unused harmony import specifier */ var input_useEffect; +/* unused harmony import specifier */ var useCallback; +/* unused harmony import specifier */ var addQueryArgs; +/* unused harmony import specifier */ var input_apiFetch; +/* unused harmony import specifier */ var input_select; +/* unused harmony import specifier */ var input_dispatch; +/* unused harmony import specifier */ var input_; +/* unused harmony import specifier */ var decodeEntities; +/* unused harmony import specifier */ var input_MODULE_CORE_EDITOR_KEY; +/* unused harmony import specifier */ var input_jsx; +/** + * WordPress dependencies + */ + + + + + + + + +/** + * Internal dependencies + */ + + +/** + * Translation input component. + * + * @param {Object} props The component props. + * @param {Object} props.language The language object. + * @param {Object} props.source The source post object. + * @param {Object} props.translation The translation post object. + * @param {Object} props.tableDispatch The table dispatch function. + * @param {Map} props.translationsTable The translations table object. + * @return {React.Component} The translation input component. + */ + +const TranslationInput = ({ + language, + source, + translation, + tableDispatch, + translationsTable +}) => { + const [options, setOptions] = input_useState(translation ? [{ + value: translation.id, + label: getPostTitle(translation) + }] : []); + const [value, setValue] = input_useState(translation ? translation.id : null); + const [isLoading, setIsLoading] = input_useState(false); + input_useEffect(() => { + if (translation && options.length === 0) { + setOptions([{ + value: translation.id, + label: getPostTitle(translation) + }]); + } + }, [translation, options]); + input_useEffect(() => { + if (translation) { + if (options.find(option => option.value === translation.id && option.label !== getPostTitle(translation) || option.value !== translation.id && 0 === option.value && option.label === getPostTitle(translation))) { + // Set options for optimistically rendered translation. + setOptions([{ + value: translation.id, + label: getPostTitle(translation) + }]); + } + setValue(translation.id); + } else { + setValue(null); + } + }, [translation, options]); // eslint-disable-line react-hooks/exhaustive-deps + + const onInputChange = nextValue => { + setValue(nextValue); + if (input_select(input_MODULE_CORE_EDITOR_KEY).isEditedPostNew()) { + input_dispatch(input_MODULE_CORE_EDITOR_KEY).savePost(); + } + if (!nextValue) { + tableDispatch({ + type: 'remove_translation', + lang: language + }); + const newTranslations = { + ...transformTranslationsTableToObject(translationsTable) + }; + delete newTranslations[language.slug]; + input_dispatch(input_MODULE_CORE_EDITOR_KEY).editPost({ + translations: newTranslations + }); + return; + } + const postToRender = getPostToRender(options, nextValue); + if (!postToRender) { + return; + } + tableDispatch({ + type: 'add_translation', + lang: language, + post: postToRender // Optimistically rendered post. + }); + input_dispatch(input_MODULE_CORE_EDITOR_KEY).editPost({ + translations: { + ...transformTranslationsTableToObject(translationsTable), + [language.slug]: parseInt(nextValue, 10) + } + }); + }; + const fetchUntranslatedPosts = useCallback(search => { + if ('' === search) { + return []; + } + setIsLoading(true); + input_apiFetch({ + path: addQueryArgs('/pll/v1/untranslated-posts', { + search, + include: source.id, + untranslated_in: source.lang, + lang: language.slug, + type: source.type, + context: 'edit' + }) + }).then(posts => { + setOptions(posts.map(post => { + return { + value: parseInt(post.id, 10), + label: getPostTitle(post) + }; + })); + }).finally(() => { + setIsLoading(false); + }); + }, [source, language, setOptions]); + const debounce = useCallback(callback => { + let timeoutId; + return (...args) => { + clearTimeout(timeoutId); + timeoutId = setTimeout(() => callback(...args), 300); + }; + }, []); + return /*#__PURE__*/input_jsx(ComboboxControl, { + value: value, + options: options, + isLoading: isLoading, + onChange: onInputChange, + placeholder: input_('Search for a post', 'polylang-pro'), + onFilterValueChange: debounce(fetchUntranslatedPosts), + __next40pxDefaultSize: true + }); +}; + +/** + * Gets the post title. + * + * @param {Object} post The post object. + * @return {string} The post title, or an empty string if the post has no title. + */ +const getPostTitle = post => { + /** + * @member {{rendered: ?string, raw: ?string}|string} post.title + */ + return decodeEntities(post.title?.rendered ?? post.title?.raw ?? post.title ?? ''); +}; + +/** + * Gets the post to render. + * + * @param {Object} options The options object. + * @param {string} nextValue The next value. + * @return {Object|null} The post to render, or null if the post is not found. + */ +const getPostToRender = (options, nextValue) => { + const value = options.find(option => option.value === nextValue); + if (!value) { + return null; + } + return { + id: value.value, + title: value.label + }; +}; + +/** + * Transforms the translations table to an object. + * + * @param {Map} translationsTable The translations table. + * @return {Object} The translations object. + */ +const transformTranslationsTableToObject = translationsTable => { + const translationsObject = {}; + translationsTable.forEach((translationPost, lang) => { + if (!translationPost || !translationPost.id) { + return; + } + translationsObject[lang.slug] = translationPost.id; + }); + return translationsObject; +}; +/* harmony default export */ const input = ((/* unused pure expression or super */ null && (TranslationInput))); +;// ./js/src/editors/common/components/translations-table/rows/index.js +/** + * Internal dependencies. + */ + + +const TranslationRow = ({ + language, + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(flag, { + language: language + }), children] + }); +}; +/* harmony default export */ const rows = (TranslationRow); +;// ./js/src/editors/common/components/plugin-feature-flag-button/index.js +/** + * Defines as extensibility slot for the metabox . + */ + +/** + * WordPress dependencies + */ + + +const { + Fill, + Slot +} = (0,external_this_wp_components_.createSlotFill)('PluginFeatureFlagButton'); + +/** + * Plugin feature flag button. + * + * @example + * ```js + * import { registerPlugin } from '@wordpress/plugins'; + * import { PluginFeatureFlagButton } from '@wpsyntex/polylang'; + * import { YourCustomButton } from './your-custom-button'; + * + * registerPlugin( 'pll-plugin-feature-flag-button', { + * render: () => ( + * + * + * + * ), + * } ); + * ``` + * + * @param {Object} props The component props. + * @param {React.ReactNode} props.children The children. + * @param {string} props.className The class name. + * + * @return {React.ReactNode} The Plugin Feature Flag Button. + */ +const PluginFeatureFlagButton = ({ + children, + className +}) => /*#__PURE__*/(0,jsx_runtime.jsx)(Fill, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: className, + children: children + }) +}); +PluginFeatureFlagButton.Slot = Slot; +/* harmony default export */ const plugin_feature_flag_button = (PluginFeatureFlagButton); +;// ./js/src/editors/common/components/translations-table/wrapper/index.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + +const TranslationsTableWrapper = ({ + children +}) => { + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + id: "post-translations", + className: "translations", + children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: "pll-translations-table-header", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { + className: "pll-translations-table-header-title", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", { + children: (0,external_this_wp_i18n_.__)('Translations', 'polylang-pro') + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(plugin_feature_flag_button.Slot, { + children: fills => fills.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pll-plugin-feature-button-container", + children: fills + }) + }) + })] + }), /*#__PURE__*/(0,jsx_runtime.jsx)("table", { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", { + children: children + }) + })] + }); +}; +/* harmony default export */ const translations_table_wrapper = (TranslationsTableWrapper); +;// ./js/src/editors/common/components/translations-table/plugin-feature-table-row-button/index.js +/* unused harmony import specifier */ var createSlotFill; +/* unused harmony import specifier */ var Children; +/* unused harmony import specifier */ var cloneElement; +/* unused harmony import specifier */ var plugin_feature_table_row_button_jsx; +/** + * Defines as extensibility slot for the translations table row. + */ + +/** + * WordPress dependencies + */ + + + +const createSlotFillWithId = id => createSlotFill(`PluginFeatureTableRowButton_${id}`); + +/** + * Plugin feature table row button fill. + * Ideally one per language. + * + * @example + * ```js + * import { registerPlugin } from '@wordpress/plugins'; + * import { PluginFeatureTableRowButtonFill } from '@wpsyntex/polylang'; + * import { YourCustomButton } from './your-custom-button'; + * + * // You may want to loop through the languages and register one fill per language. + * registerPlugin( 'pll-plugin-feature-table-row-button-fill', { + * render: () => ( + * + * + * + * ), + * } ); + * ``` + * + * @param {Object} props The component props. + * @param {React.ReactNode} props.children The children. + * @param {string} props.className The class name. + * @param {string} props.languageSlug The language slug, used to generate a unique slot fill. + * + * @return {React.ReactNode} The plugin feature table row button fill. + */ +const PluginFeatureTableRowButtonFill = ({ + children, + className, + languageSlug +}) => { + const { + Fill + } = createSlotFillWithId(languageSlug); + return /*#__PURE__*/plugin_feature_table_row_button_jsx(Fill, { + children: drilledProps => { + return /*#__PURE__*/plugin_feature_table_row_button_jsx("div", { + className: className, + children: Children.map(children, child => cloneElement(child, { + language: drilledProps.language, + translation: drilledProps.translation, + translationTableReducer: drilledProps.translationTableReducer + })) + }); + } + }); +}; + +/** + * Plugin feature table row button slot. + * Ideally one per language. + * + * @param {Object} props The component props. + * @param {string} props.language The language object, used to generate a unique slot fill. + * @param {Object} props.translation The translated object. + * @param {Object} props.translationTableReducer The table dispatch object. + * + * @return {React.ReactNode} The plugin feature table row button slot. + */ +const PluginFeatureTableRowButtonSlot = ({ + language, + translation, + translationTableReducer +}) => { + const { + Slot + } = createSlotFillWithId(language.slug); + return /*#__PURE__*/plugin_feature_table_row_button_jsx(Slot, { + bubblesVirtually: true, + as: "td", + fillProps: { + language, + translation, + translationTableReducer + }, + className: "pll-feature-button-row-container" + }); +}; + +;// ./js/src/editors/common/hooks/use-authorized-languages.js +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + +/** + * Custom hook to get the memoized authorized languages. + * + * @return {Map} The memoized authorized languages. + */ +const useAuthorizedLanguages = () => { + /** + * @type {Map} + */ + const languages = (0,external_this_wp_data_.useSelect)(select => select(MODULE_KEY).getLanguages()); + const authorizedLanguagesSlugs = pll_block_editor_plugin_settings?.authorizedLanguagesSlugs; + return (0,external_this_wp_element_.useMemo)(() => { + if (!authorizedLanguagesSlugs) { + return languages; + } + return new Map(authorizedLanguagesSlugs.map(languageSlug => { + const language = languages.get(languageSlug); + if (language) { + return [languageSlug, language]; + } + return null; + }).filter(Boolean)); + }, [languages, authorizedLanguagesSlugs]); +}; +/* harmony default export */ const use_authorized_languages = (useAuthorizedLanguages); +;// ./js/src/editors/common/components/translations-table/post-editor/index.js +/* unused harmony import specifier */ var post_editor_select; +/* unused harmony import specifier */ var getPath; +/* unused harmony import specifier */ var coreDataStore; +/* unused harmony import specifier */ var post_editor_useState; +/* unused harmony import specifier */ var post_editor_useEffect; +/* unused harmony import specifier */ var post_editor_AddOrEditCell; +/* unused harmony import specifier */ var post_editor_TranslationInputCell; +/* unused harmony import specifier */ var post_editor_EditButton; +/* unused harmony import specifier */ var post_editor_AddButton; +/* unused harmony import specifier */ var post_editor_TranslationInput; +/* unused harmony import specifier */ var post_editor_TranslationRow; +/* unused harmony import specifier */ var post_editor_TranslationsTableWrapper; +/* unused harmony import specifier */ var post_editor_PluginFeatureTableRowButtonSlot; +/* unused harmony import specifier */ var post_editor_useAuthorizedLanguages; +/* unused harmony import specifier */ var post_editor_jsx; +/* unused harmony import specifier */ var post_editor_jsxs; +/** + * WordPress dependencies + */ + + + + + +/** + * Internal dependencies + */ + + + + + + + + +/** + * Add or edit button component, used in post editor because of clickable links. + * + * @param {Object} props The props object. + * @param {boolean} props.canUpdate Whether the user can update the translation. + * @param {boolean} props.canCreate Whether the user can create the translation. + * @param {boolean} props.canRead Whether the user can read the translation. + * @param {Object} props.language The language object. + * @param {Object} props.currentPost The current post object. + * @return {React.ReactNode} The add or edit button component. + */ + +const AddOrEditButton = ({ + canUpdate, + canCreate, + canRead, + language, + currentPost +}) => { + const [translationId, setTranslationId] = post_editor_useState(currentPost.translations[language.slug] ? currentPost.translations[language.slug] : null); + post_editor_useEffect(() => { + setTranslationId(currentPost.translations[language.slug] ? currentPost.translations[language.slug] : null); + }, [currentPost, language, setTranslationId]); + if (canUpdate || canRead) { + // Show Edit button for existing translations (disabled if user can only read). + // eslint-disable-next-line prettier/prettier + const baseEditUrl = `${location.origin}/${getPath(location.href)}`.replace('post-new.php', 'post.php'); + const editUrl = `${baseEditUrl}?post=${translationId}&action=edit`; + return /*#__PURE__*/post_editor_jsx(post_editor_EditButton, { + href: editUrl, + language: language, + disabled: !canUpdate + }); + } + return /*#__PURE__*/post_editor_jsx(post_editor_AddButton, { + href: pll_block_editor_plugin_settings.new_post_translation_links[language.slug], + language: language, + disabled: !canCreate + }); +}; + +/** + * Post Editor Translations Table component. + * + * @param {Object} props The component props. + * @param {Object} props.currentPost The current post. + * @param {Map} props.translationsTable The translations table, contains language object as key and post object as value. + * @param {Function} props.tableDispatch The translations table dispatch function. + * @return {React.Component} The Post Editor Translations Table component. + */ +const PostEditorTranslationsTable = ({ + currentPost, + translationsTable, + tableDispatch +}) => { + const table = []; + const authorizedLanguages = post_editor_useAuthorizedLanguages(); + translationsTable.forEach((translation, language) => { + // Don't display current post in the translation table. + if (currentPost.lang === language.slug) { + return null; + } + const canCreate = !translation && authorizedLanguages.has(language.slug) && post_editor_select(coreDataStore).canUser('create', { + kind: 'postType', + name: currentPost.type, + lang: language.slug + }); + const canUpdate = translation && post_editor_select(coreDataStore).canUser('update', { + kind: 'postType', + name: currentPost.type, + id: translation.id + }); + table.push(/*#__PURE__*/post_editor_jsx("tr", { + children: /*#__PURE__*/post_editor_jsxs(post_editor_TranslationRow, { + language: language, + children: [/*#__PURE__*/post_editor_jsx(post_editor_AddOrEditCell, { + children: /*#__PURE__*/post_editor_jsx(AddOrEditButton, { + canUpdate: canUpdate, + canCreate: canCreate, + canRead: !!translation, + language: language, + currentPost: currentPost + }) + }), /*#__PURE__*/post_editor_jsx(post_editor_PluginFeatureTableRowButtonSlot, { + language: language, + translation: translation, + translationTableReducer: tableDispatch + }), /*#__PURE__*/post_editor_jsx(post_editor_TranslationInputCell, { + children: /*#__PURE__*/post_editor_jsx(post_editor_TranslationInput, { + language: language, + source: currentPost, + translation: translation, + tableDispatch: tableDispatch, + translationsTable: translationsTable + }) + })] + }) + }, language.slug)); + }); + return /*#__PURE__*/post_editor_jsx(post_editor_TranslationsTableWrapper, { + children: table + }); +}; +/* harmony default export */ const post_editor = ((/* unused pure expression or super */ null && (PostEditorTranslationsTable))); +;// ./js/src/editors/common/components/delete-modal-body/index.js +/** + * WordPress dependencies + */ + + +const DeleteModalBody = ({ + isDefaultLang +}) => { + const defaultLangText = () => { + if (!isDefaultLang) { + return null; + } + return /*#__PURE__*/(0,jsx_runtime.jsxs)("p", { + children: [(0,external_this_wp_i18n_.__)('You are about to delete an entity in the default language.', 'polylang-pro'), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), (0,external_this_wp_i18n_.__)('This will delete its customizations and all its corresponding translations.', 'polylang-pro')] + }); + }; + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [defaultLangText(), /*#__PURE__*/(0,jsx_runtime.jsx)("p", { + children: (0,external_this_wp_i18n_.__)('Are you sure you want to delete this translation?', 'polylang-pro') + })] + }); +}; +/* harmony default export */ const delete_modal_body = (DeleteModalBody); +;// ./js/src/editors/common/components/delete-with-confirmation/use-delete-post.js +/** + * WordPress dependencies + * + */ + + + + + +const useDeletePost = () => { + const { + deleteEntityRecord + } = (0,external_this_wp_data_.useDispatch)(external_this_wp_coreData_.store); + const { + createSuccessNotice, + createErrorNotice + } = (0,external_this_wp_data_.useDispatch)(external_this_wp_notices_.store); + const handleDelete = async post => { + try { + const forceDelete = !POST_TYPE_WITH_TRASH.includes(post.type); + await deleteEntityRecord('postType', post.type, post.id, { + force: forceDelete + }, { + throwOnError: true + }); + createSuccessNotice((0,external_this_wp_i18n_.__)('The translation has been deleted.', 'polylang-pro'), { + type: 'snackbar' + }); + } catch (error) { + createErrorNotice((0,external_this_wp_i18n_.sprintf)(/* translators: %s: Error message describing why the post could not be deleted. */ + (0,external_this_wp_i18n_.__)('Unable to delete the translation. %s', 'polylang-pro'), error?.message), { + type: 'snackbar' + }); + } + }; + return { + handleDelete + }; +}; +/* harmony default export */ const use_delete_post = (useDeletePost); +;// ./js/src/editors/common/components/delete-with-confirmation/maybe-redirect.js +/** + * WordPress dependencies + * + */ + +const maybeRedirect = (postLang, postType) => { + if (!postLang.is_default || 'page' === postType) { + return; + } + const newUrl = window.location.origin + wp.sanitize.stripTags(window.location.pathname); // phpcs:ignore WordPressVIPMinimum.JS.Window.location + + const queryString = {}; + switch (postType) { + case 'wp_navigation': + queryString.path = '/navigation'; + break; + case 'wp_block': + queryString.path = '/patterns'; + queryString.categoryType = postType; + break; + case 'wp_template_part': + queryString.path = '/' + postType + '/all'; + break; + } + location.href = (0,external_this_wp_url_.addQueryArgs)(newUrl, queryString); // eslint-disable-line no-undef +}; +/* harmony default export */ const maybe_redirect = (maybeRedirect); +;// ./js/src/editors/common/components/delete-with-confirmation/index.js +/** + * WordPress Dependencies. + * + */ + + + + + + +/** + * Internal Dependencies. + */ + + + + + + +/** + * Delete with confirmation component. + * + * @param {Object} props The component props. + * @param {Object} props.post The post object. + * @param {Object} props.language The language object. + * @param {Function} props.onDeleteSuccess The on delete success function. + * @return {React.Component} The Delete with confirmation component. + */ + +const DeleteWithConfirmation = ({ + post, + language, + onDeleteSuccess +}) => { + const [isOpen, setOpen] = (0,external_this_wp_element_.useState)(false); + const openModal = () => setOpen(true); + const closeModal = () => setOpen(false); + const authorizedLanguages = use_authorized_languages(); + const canTrash = (0,external_this_wp_data_.useSelect)(select => { + return post && select(external_this_wp_coreData_.store).canUser('delete', { + kind: 'postType', + name: post.type, + id: post.id + }); + }, [post]); + const { + handleDelete + } = use_delete_post(); + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(buttons_delete, { + onClick: openModal, + language: language, + disabled: !canTrash || !authorizedLanguages.has(language.slug) + }), isOpen && /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_components_.Modal, { + title: "Delete", + onRequestClose: closeModal, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(delete_modal_body, { + isDefaultLang: language.is_default && 'page' !== post?.type // No message for default language deletion with a page. + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + role: "group", + className: "components-button-group buttons", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + variant: "tertiary", + onClick: closeModal, + type: "button", + children: (0,external_this_wp_i18n_.__)('Cancel', 'polylang-pro') + }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + children: "\xA0" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Button, { + variant: "primary", + onClick: () => { + handleDelete(post, post.type).then(() => onDeleteSuccess()); + closeModal(); + maybe_redirect(language, post.type); + }, + type: "submit", + children: (0,external_this_wp_i18n_.__)('Delete', 'polylang-pro') + })] + })] + })] + }); +}; +/* harmony default export */ const delete_with_confirmation = (DeleteWithConfirmation); +;// ./js/src/editors/common/hooks/use-default-language.js +/** + * WordPress dependencies + */ + + + + +/** + * Internal dependencies + */ + + +/** + * Custom hook to get the default language and memoize it. + * + * @return {Object} The default language. + * @throws {Error} If the default language is not found. + */ +const useDefaultLanguage = () => { + return (0,external_this_wp_element_.useMemo)(() => { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + const defaultLanguage = Array.from(languages.values()).find(language => language.is_default); + if (!defaultLanguage) { + throw new Error((0,external_this_wp_i18n_.__)('Default language not found, please check your languages settings.', 'polylang-pro')); + } + return defaultLanguage; + }, []); +}; +/* harmony default export */ const use_default_language = (useDefaultLanguage); +;// ./js/src/editors/common/components/translations-table/site-editor/use-create-translation.js +/** + * WordPress dependencies + */ + + + + + + + +/** + * Internal dependencies + */ + +const useCreateTranslation = () => { + const { + createSuccessNotice, + createErrorNotice + } = (0,external_this_wp_data_.useDispatch)(external_this_wp_notices_.store); + const { + saveEntityRecord + } = (0,external_this_wp_data_.useDispatch)(external_this_wp_coreData_.store); + const defaultLanguage = use_default_language(); + + /** + * Persists the default language template part. + * + * @param {Object} templatePart The template part object. + * @return {Promise} The persisted template part object. + */ + const persistDefaultLanguageTemplatePart = (0,external_this_wp_element_.useCallback)(templatePart => { + const promise = saveEntityRecord('postType', 'wp_template_part', { + id: templatePart.id, + lang: defaultLanguage.slug, + slug: templatePart.slug + }); + promise.catch(error => { + const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_this_wp_i18n_.__)('An error occurred while persisting the default language template part.', 'polylang-pro'); + createErrorNotice(errorMessage, { + type: 'snackbar' + }); + }); + return promise; + }, [defaultLanguage, saveEntityRecord, createErrorNotice]); + + /** + * Handles the creation of a post translation using duplication method. + * + * @param {Object} language The language object. + * @param {Object} post The post object. + * @return {void} + */ + const handleCreateTranslation = async (language, post) => { + try { + const translation = await external_this_wp_apiFetch_default()({ + path: '/pll/v1/translation', + method: 'POST', + data: { + from_post: 'wp_template_part' === post.type || 'wp_template' === post.type ? post.wp_id : post.id, + lang: language.slug, + action: 'duplicate' + } + }); + createSuccessNotice((0,external_this_wp_i18n_.__)('The translation is created, you will be redirected.', 'polylang-pro'), { + type: 'snackbar' + }); + const previousIdInUrl = 'wp_template_part' === post.type || 'wp_template' === post.type ? post.slug : post.id; + const nextIdInUrl = 'wp_template_part' === translation.type || 'wp_template' === translation.type ? translation.slug : translation.id; + location.href = location.href.replace(encodeURIComponent(previousIdInUrl), encodeURIComponent(nextIdInUrl)); + } catch (error) { + const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_this_wp_i18n_.__)('An error occurred while creating the translation.', 'polylang-pro'); + createErrorNotice(errorMessage, { + type: 'snackbar' + }); + } + }; + return { + handleCreateTranslation, + persistDefaultLanguageTemplatePart + }; +}; +/* harmony default export */ const use_create_translation = (useCreateTranslation); +;// ./js/src/editors/common/components/translations-table/site-editor/index.js +/** + * WordPress Dependencies. + */ + + + +/** + * Internal Dependencies. + */ + + + + + + + +/** + * Add or edit button component. + * + * @param {Object} props The component props. + * @param {boolean} props.canUpdate Whether the user can update the translation. + * @param {boolean} props.canCreate Whether the user can create the translation. + * @param {boolean} props.canRead Whether the user can read the translation. + * @param {Object} props.language The language object. + * @param {Object} props.currentPost The current post. + * @param {Object} props.translation The translation post object. + * @param {Function} props.handleCreateTranslation The function to handle the create translation. + * @return {React.Component} The Add or Edit button component. + */ + +const site_editor_AddOrEditButton = ({ + canUpdate, + canCreate, + canRead, + language, + currentPost, + translation, + handleCreateTranslation +}) => { + if (canUpdate || canRead) { + // Show Edit button for existing translations (disabled if user can only read). + return /*#__PURE__*/(0,jsx_runtime.jsx)(edit, { + href: `#`, + disabled: !canUpdate, + language: language, + handleEditClick: () => { + location.href = location.href.replace(encodeURIComponent(currentPost.id), encodeURIComponent(translation.id)); + } + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)(add, { + href: `#`, + disabled: !canCreate, + language: language, + handleAddClick: () => { + handleCreateTranslation(); + } + }); +}; + +/** + * Site Editor Translations Table component. + * + * @param {Object} props The component props. + * @param {Map} props.translationsTable The translations table, contains language object as key and post object as value. + * @param {Object} props.currentPost The current post. + * @param {Function} props.translationsTableDispatch The translations table dispatch function. + * @return {React.Component} The Site Editor Translations Table component. + */ +const SiteEditorTranslationsTable = ({ + translationsTable, + currentPost, + translationsTableDispatch +}) => { + const { + handleCreateTranslation, + persistDefaultLanguageTemplatePart + } = use_create_translation(); + const table = []; + translationsTable.forEach((translation, language) => { + // Don't display current post in the translation table. + if (currentPost?.lang === language.slug) { + return; + } + function onDeleteSuccess() { + translationsTableDispatch({ + type: 'remove_translation', + lang: language + }); + } + const canCreate = (0,external_this_wp_data_.select)(external_this_wp_coreData_.store).canUser('create', { + kind: 'postType', + name: currentPost.type + }); + const canUpdate = translation && (0,external_this_wp_data_.select)(external_this_wp_coreData_.store).canUser('update', { + kind: 'postType', + name: currentPost.type, + id: currentPost.id + }); + table.push(/*#__PURE__*/(0,jsx_runtime.jsx)("tr", { + children: /*#__PURE__*/(0,jsx_runtime.jsxs)(rows, { + language: language, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(translation_input, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-translation-language", + children: language.name + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(add_or_edit, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(site_editor_AddOrEditButton, { + canUpdate: canUpdate, + canCreate: canCreate, + canRead: !!translation, + language: language, + currentPost: currentPost, + translation: translation, + handleCreateTranslation: () => { + if (!language.is_default && 'wp_template_part' === currentPost.type && !currentPost.wp_id) { + // Ensure the template part in default language exists before creating the translation. + persistDefaultLanguageTemplatePart(currentPost).then(defaultLangTemplatePart => { + handleCreateTranslation(language, defaultLangTemplatePart); + }); + return; + } + handleCreateTranslation(language, currentPost); + } + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(cells_delete, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(delete_with_confirmation, { + post: translation, + language: language, + onDeleteSuccess: onDeleteSuccess + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(default_language, { + isDefault: language.is_default + })] + }) + }, language.slug)); + }); + return /*#__PURE__*/(0,jsx_runtime.jsx)(translations_table_wrapper, { + children: table + }); +}; +/* harmony default export */ const site_editor = (SiteEditorTranslationsTable); +;// ./js/src/editors/common/components/translations-table/index.js +/** + * Translations table components. + */ + + + +;// ./js/src/editors/common/components/metaboxes/translations-table-reducer/index.js +/** + * Reducer for the translations table. + * + * @param {Map} state The current state. + * @param {Object} action The action to perform. + * @return {Map} The new state. + */ +const translationsTableReducer = (state, action) => { + switch (action.type) { + case 'add_translation': + state.set(action.lang, action.post); + return new Map(state); + case 'remove_translation': + state.set(action.lang, null); + return new Map(state); + case 'set_table': + return normalizeTranslations(action.languages, action.translations); + default: + throw new Error('Invalid action'); + } +}; + +/** + * Normalizes the translations table. + * + * @param {Array} languages The list of language objects. + * @param {Object} translations The translations IDs keyed by language slug. + * @return {Map} The normalized translations table. + */ +const normalizeTranslations = (languages, translations) => { + const translationsTable = new Map(); + languages.forEach(language => { + translationsTable.set(language, translations[language.slug] ?? null); + }); + return translationsTable; +}; +;// ./js/src/editors/common/components/metaboxes/site-editor/index.js +/** + * WordPress Dependencies. + */ + + + + + +/** + * Internal Dependencies. + */ + + + + + + + + +/** + * Site Editor Metabox component. + * + * @return {React.Component} The Site Editor Metabox component. + */ + +const SiteEditorMetabox = () => { + const [translationTable, tableDispatch] = (0,external_this_wp_element_.useReducer)(translationsTableReducer, new Map()); + const [currentPost, setCurrentPost] = (0,external_this_wp_element_.useState)({}); + const [selectedLanguage, setSelectedLanguage] = (0,external_this_wp_element_.useState)({}); + const [currentPostType, setCurrentPostType] = (0,external_this_wp_element_.useState)(''); + const languages = (0,external_this_wp_data_.useSelect)(select => select(MODULE_KEY).getLanguages()); + (0,external_this_wp_element_.useEffect)(() => { + let currentType; + // Global Styles screen doesn't provide `wp_global_style` as current edited post type. + if ('/wp_global_styles' === wp.sanitize.stripTagsAndEncodeText((0,external_this_wp_url_.getQueryArg)(window.location.href, 'path') // phpcs:ignore WordPressVIPMinimum.JS.Window.location + )) { + currentType = 'wp_global_styles'; + } + // Template context can return a page. So, we need to check post type from the URL. + if ('wp_template' === wp.sanitize.stripTagsAndEncodeText((0,external_this_wp_url_.getQueryArg)(window.location.href, 'postType') // phpcs:ignore WordPressVIPMinimum.JS.Window.location + )) { + currentType = 'wp_template'; + } + if (currentType) { + setCurrentPostType(currentType); + return; + } + const post = getCurrentPostFromDataStore(); + setCurrentPost(post); + setCurrentPostType(post?.type); + const language = getSelectedLanguage(post?.lang); + setSelectedLanguage(language); + }, [setCurrentPost, setCurrentPostType, setSelectedLanguage, languages, translationTable]); + const translationsData = (0,external_this_wp_data_.useSelect)(select => { + if (!currentPost || !currentPost.translations) { + return {}; + } + const results = {}; + if ('wp_template_part' !== currentPost.type) { + const translatedPosts = select(external_this_wp_coreData_.store).getEntityRecords('postType', currentPost.type, { + include: Object.values(currentPost.translations), + context: 'view', + per_page: Object.values(currentPost.translations).length, + lang: '' // Disables language filter middleware. + }); + translatedPosts?.forEach(post => { + results[post.lang] = post; + }); + } else { + // Template parts cannot be fetched all at once. + new Map(Object.entries(currentPost.translations)).forEach((translationId, lang) => { + const postsData = select(external_this_wp_coreData_.store).getEntityRecords('postType', 'wp_template_part', { + wp_id: translationId + }); + if (postsData && postsData.length > 0) { + results[lang] = postsData[0]; + } + }); + } + return results; + }, [currentPost]); + (0,external_this_wp_element_.useEffect)(() => { + tableDispatch({ + type: 'set_table', + languages, + translations: translationsData + }); + }, [translationsData, languages, tableDispatch]); + if (translationTable.size === 0) { + return null; + } + return /*#__PURE__*/(0,jsx_runtime.jsxs)(container, { + isError: !selectedLanguage, + isAllowedPostType: !UNTRANSLATABLE_POST_TYPE.includes(currentPostType), + postType: currentPostType, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(language_item, { + language: selectedLanguage, + currentPost: currentPost + }), /*#__PURE__*/(0,jsx_runtime.jsx)(site_editor, { + translationsTable: translationTable, + currentPost: currentPost, + translationsTableDispatch: tableDispatch + })] + }); +}; +/* harmony default export */ const metaboxes_site_editor = (SiteEditorMetabox); +;// ./js/src/editors/common/components/language-dropdown/index.js +/* unused harmony import specifier */ var SelectControl; +/* unused harmony import specifier */ var language_dropdown_useMemo; +/* unused harmony import specifier */ var language_dropdown_LanguageFlag; +/* unused harmony import specifier */ var language_dropdown_jsxs; +/* unused harmony import specifier */ var language_dropdown_jsx; +/** + * WordPress dependencies. + */ + + + +/** + * Internal dependencies. + */ + + +/** + * Displays a dropdown to select a language. + * + * @since 3.1 + * + * @param {Object} props LanguageDropdown props. + * @param {Function} props.handleChange Callback to be executed when language changes. + * @param {Object} props.languages An iterable object containing languages objects. + * @param {Object} props.selectedLanguage An object representing a Polylang Language. Default to null. + * @param {string} props.defaultValue Value to be selected if the selected language is not provided. Default to an empty string. + * + * @return {Object} A dropdown selector for languages. + */ + +function LanguageDropdown({ + handleChange, + languages, + selectedLanguage = null, + defaultValue = '' +}) { + const selectedLanguageSlug = selectedLanguage?.slug ? selectedLanguage.slug : defaultValue; + const normalizedLanguagesForSelectControl = language_dropdown_useMemo(() => { + return Array.from(languages.values()).map(({ + slug, + name + }) => ({ + value: slug, + label: name + })); + }, [languages]); + return /*#__PURE__*/language_dropdown_jsxs("div", { + id: "pll-language-select-control", + children: [/*#__PURE__*/language_dropdown_jsx(language_dropdown_LanguageFlag, { + language: selectedLanguage + }), /*#__PURE__*/language_dropdown_jsx(SelectControl, { + value: selectedLanguageSlug, + onChange: newLangSlug => handleChange(newLangSlug), + options: normalizedLanguagesForSelectControl, + id: "pll_post_lang_choice", + name: "pll_post_lang_choice", + className: "post_lang_choice", + __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true + })] + }); +} + +;// ./js/src/editors/common/components/switcher/utils.js +/* unused harmony import specifier */ var utils_dispatch; +/* unused harmony import specifier */ var switcher_utils_select; +/* unused harmony import specifier */ var utils_addQueryArgs; +/* unused harmony import specifier */ var utils_apiFetch; +/* unused harmony import specifier */ var utils_coreStore; +/* unused harmony import specifier */ var switcher_utils_MODULE_CORE_EDITOR_KEY; +/** + * WordPress dependencies + */ + + + + + +/** + * Internal dependencies + */ + + +/** + * Persists language change. + * + * @param {Object} newLanguage New language. + * @param {Object} newTranslationsData New translations data. + * @return {Promise} Save post promise. + */ +const saveLanguageChange = (newLanguage, newTranslationsData) => { + return Promise.allSettled([utils_dispatch(switcher_utils_MODULE_CORE_EDITOR_KEY).editPost(newTranslationsData), utils_dispatch(switcher_utils_MODULE_CORE_EDITOR_KEY).savePost(), + // Need to save post to recalculate permalink. + forceLanguageSave(newLanguage.slug)]).then(() => { + utils_dispatch(utils_coreStore).invalidateResolutionForStoreSelector('getEntityRecord'); + utils_dispatch(utils_coreStore).invalidateResolutionForStoreSelector('getEntityRecords'); + utils_dispatch(utils_coreStore).invalidateResolutionForStoreSelector('getMedia'); + }); +}; + +/** + * Tells whether the edited post is empty. + * + * @return {boolean} True if the edited post is empty, false otherwise. + */ +const isEditedPostEmpty = () => { + const editor = switcher_utils_select(switcher_utils_MODULE_CORE_EDITOR_KEY); + return !editor.getEditedPostAttribute('title') && !editor.getEditedPostContent() && !editor.getEditedPostAttribute('excerpt'); +}; + +/** + * Forces the save of the post in the new language even if no content has been written. + * So the post metadata are correctly updated (e.g.: Attachable Medias). + * + * @since 3.0 + * + * @param {string} lang A language slug. + * @return {Promise} Save post promise. + */ +const forceLanguageSave = lang => { + const editor = switcher_utils_select(switcher_utils_MODULE_CORE_EDITOR_KEY); + if (isEditedPostEmpty()) { + return utils_apiFetch({ + path: utils_addQueryArgs(`wp/v2/posts/${editor.getCurrentPostId()}`, { + lang + }), + method: 'POST' + }); + } + return Promise.reject('Force save not required.'); +}; +;// ./js/src/editors/common/components/switcher/index.js +/* unused harmony import specifier */ var switcher_LanguageDropdown; +/* unused harmony import specifier */ var switcher_; +/* unused harmony import specifier */ var switcher_useDispatch; +/* unused harmony import specifier */ var switcher_useState; +/* unused harmony import specifier */ var switcher_useEffect; +/* unused harmony import specifier */ var useRef; +/* unused harmony import specifier */ var switcher_Modal; +/* unused harmony import specifier */ var switcher_Button; +/* unused harmony import specifier */ var switcher_noticesStore; +/* unused harmony import specifier */ var switcher_isEditedPostEmpty; +/* unused harmony import specifier */ var switcher_saveLanguageChange; +/* unused harmony import specifier */ var switcher_useAuthorizedLanguages; +/* unused harmony import specifier */ var switcher_jsxs; +/* unused harmony import specifier */ var switcher_Fragment; +/* unused harmony import specifier */ var switcher_jsx; +/** + * Internal dependencies + */ + + +/** + * WordPress dependencies + */ + + + + + + +/** + * Internal dependencies + */ + + + +const Switcher = ({ + currentPost +}) => { + const [isOpen, setOpen] = switcher_useState(false); + const [selectedLang, setSelectedLang] = switcher_useState(null); + const { + createSuccessNotice, + createErrorNotice + } = switcher_useDispatch(switcher_noticesStore); + const languages = switcher_useAuthorizedLanguages(); + switcher_useEffect(() => { + setSelectedLang(languages.get(currentPost.lang)); + }, [currentPost, languages]); + const prevLangRef = useRef(selectedLang); + switcher_useEffect(() => { + prevLangRef.current = languages.get(currentPost.lang); + }, [languages, currentPost]); + const openModal = newLangSlug => { + const newLang = languages.get(newLangSlug); + setSelectedLang(newLang); + if (switcher_isEditedPostEmpty()) { + confirmChange(newLang); + return; + } + setOpen(true); + }; + const closeModal = () => setOpen(false); + const confirmChange = _selectedLang => { + closeModal(); + if (!_selectedLang) { + createErrorNotice(switcher_('Failed to save selected language', 'polylang-pro'), { + type: 'snackbar' + }); + return; + } + const newTranslations = { + ...currentPost.translations + }; + delete newTranslations[prevLangRef.current.slug]; + + // Only add the new language if it is not already assigned. + if (!newTranslations.hasOwnProperty(selectedLang.slug)) { + newTranslations[selectedLang.slug] = currentPost.id; + } + const synchronizedPosts = { + ...currentPost.synchronizedPosts + }; + delete synchronizedPosts[prevLangRef.current.slug]; + switcher_saveLanguageChange(_selectedLang, { + lang: _selectedLang.slug, + translations: newTranslations, + pll_sync_post: synchronizedPosts + }).then(() => { + createSuccessNotice(switcher_('Language changed', 'polylang-pro'), { + type: 'snackbar' + }); + pll_block_editor_plugin_settings.lang = _selectedLang; + document.dispatchEvent(new CustomEvent('onPostLangChoice', { + detail: { + lang: _selectedLang + } + })); + }); + }; + const abortChange = () => { + setSelectedLang(prevLangRef.current); + closeModal(); + }; + return /*#__PURE__*/switcher_jsxs(switcher_Fragment, { + children: [/*#__PURE__*/switcher_jsx("p", { + children: /*#__PURE__*/switcher_jsx("strong", { + children: switcher_('Language', 'polylang-pro') + }) + }), /*#__PURE__*/switcher_jsx("label", { + className: "screen-reader-text", + htmlFor: "pll_post_lang_choice", + children: switcher_('Language', 'polylang-pro') + }), /*#__PURE__*/switcher_jsx(switcher_LanguageDropdown, { + selectedLanguage: selectedLang, + handleChange: openModal, + languages: languages + }), isOpen && /*#__PURE__*/switcher_jsxs(switcher_Modal, { + title: switcher_('Change language', 'polylang-pro'), + onRequestClose: abortChange, + children: [/*#__PURE__*/switcher_jsx("p", { + children: switcher_('Are you sure you want to change the language of the current content?', 'polylang-pro') + }), /*#__PURE__*/switcher_jsxs("div", { + role: "group", + className: "components-button-group buttons", + children: [/*#__PURE__*/switcher_jsx(switcher_Button, { + variant: "tertiary", + onClick: abortChange, + type: "button", + children: switcher_('Cancel', 'polylang-pro') + }), /*#__PURE__*/switcher_jsx("span", { + children: "\xA0" + }), /*#__PURE__*/switcher_jsx(switcher_Button, { + variant: "primary", + onClick: () => confirmChange(selectedLang), + type: "submit", + children: switcher_('Change', 'polylang-pro') + })] + })] + })] + }); +}; +/* harmony default export */ const switcher = ((/* unused pure expression or super */ null && (Switcher))); +;// ./js/src/editors/common/components/metaboxes/post-editor/index.js +/* unused harmony import specifier */ var post_editor_useSelect; +/* unused harmony import specifier */ var useReducer; +/* unused harmony import specifier */ var metaboxes_post_editor_useEffect; +/* unused harmony import specifier */ var post_editor_coreDataStore; +/* unused harmony import specifier */ var post_editor_Switcher; +/* unused harmony import specifier */ var post_editor_MetaboxContainer; +/* unused harmony import specifier */ var post_editor_PostEditorTranslationsTable; +/* unused harmony import specifier */ var post_editor_getSelectedLanguage; +/* unused harmony import specifier */ var post_editor_MODULE_KEY; +/* unused harmony import specifier */ var post_editor_MODULE_CORE_EDITOR_KEY; +/* unused harmony import specifier */ var post_editor_UNTRANSLATABLE_POST_TYPE; +/* unused harmony import specifier */ var post_editor_translationsTableReducer; +/* unused harmony import specifier */ var metaboxes_post_editor_jsxs; +/* unused harmony import specifier */ var metaboxes_post_editor_jsx; +/** + * WordPress Dependencies. + */ + + + +/** + * Internal Dependencies. + */ + + + + + + + +const PostEditorMetabox = () => { + const [translationsTable, tableDispatch] = useReducer(post_editor_translationsTableReducer, new Map()); + const languages = post_editor_useSelect(select => select(post_editor_MODULE_KEY).getLanguages()); + const { + currentPost, + selectedLanguage, + isAllowedPostType + } = post_editor_useSelect(select => { + const post = select(post_editor_MODULE_CORE_EDITOR_KEY).getCurrentPost(); + const lang = select(post_editor_MODULE_CORE_EDITOR_KEY).getEditedPostAttribute('lang'); + const isAllowed = !post_editor_UNTRANSLATABLE_POST_TYPE.includes(post?.type); + const language = post_editor_getSelectedLanguage(lang); + return { + currentPost: post, + selectedLanguage: language, + isAllowedPostType: isAllowed + }; + }, []); + const translationsData = post_editor_useSelect(select => { + if (!currentPost || !currentPost.translations) { + return {}; + } + if ('auto-draft' === currentPost.status) { + const fromPostUrlParams = select(post_editor_MODULE_KEY).getFromPost(); + if (fromPostUrlParams) { + const fromPostData = select(post_editor_coreDataStore).getEntityRecord('postType', currentPost.type, fromPostUrlParams.id, { + context: 'view' + } // Use 'view' context so translators can read posts they cannot edit. + ); + if (fromPostData) { + currentPost.translations = { + ...fromPostData.translations, + [currentPost.lang]: currentPost.id + }; + } + } + } + const results = {}; + const translatedPosts = select(post_editor_coreDataStore).getEntityRecords('postType', currentPost.type, { + include: Object.values(currentPost.translations), + context: 'view', + per_page: Object.values(currentPost.translations).length, + lang: '' // Disables language filter middleware. + }); + translatedPosts?.forEach(post => { + const translationData = getTranslationData(post.lang, translationsTable); + + /* + * Preserve the optimistic placeholder (id: 0) until the server returns the real translation ID, + * then let the real entity record be fetched. + */ + if (translationData && translationData.id === post.id) { + results[post.lang] = translationData; + return; + } + results[post.lang] = post; + }); + return results; + }, [currentPost, translationsTable]); + metaboxes_post_editor_useEffect(() => { + tableDispatch({ + type: 'set_table', + languages, + translations: translationsData + }); + }, [translationsData, languages, tableDispatch]); + if (translationsTable.size === 0) { + return null; + } + return /*#__PURE__*/metaboxes_post_editor_jsxs(post_editor_MetaboxContainer, { + isError: !selectedLanguage, + isAllowedPostType: isAllowedPostType, + postType: currentPost?.type, + children: [/*#__PURE__*/metaboxes_post_editor_jsx(post_editor_Switcher, { + currentPost: currentPost + }), /*#__PURE__*/metaboxes_post_editor_jsx(post_editor_PostEditorTranslationsTable, { + currentPost: currentPost, + translationsTable: translationsTable, + selectedLanguage: selectedLanguage, + tableDispatch: tableDispatch + })] + }); +}; + +/** + * Gets data from the translations table map for a given language. + * + * @param {string} langSlug The language slug. + * @param {Map} translationsTable The translations table. + * @return {Object|null} The translation data or null if not found. + */ +const getTranslationData = (langSlug, translationsTable) => { + for (const [lang, post] of translationsTable) { + if (lang.slug === langSlug) { + return post; + } + } + return null; +}; +/* harmony default export */ const metaboxes_post_editor = ((/* unused pure expression or super */ null && (PostEditorMetabox))); +;// ./js/src/editors/common/components/metaboxes/index.js +/** + * Metabox components. + */ + + + +;// ./js/src/editors/common/store/index.js +/** + * WordPress Dependencies + */ + + + +/** + * Internal dependencies + */ + + +const actions = { + setLanguages(languages) { + return { + type: 'SET_LANGUAGES', + languages + }; + }, + setFromPost(fromPost) { + return { + type: 'SET_FROM_POST', + fromPost + }; + }, + fetchFromAPI(options) { + return { + type: 'FETCH_FROM_API', + options + }; + } +}; +const store = (0,external_this_wp_data_.createReduxStore)(MODULE_KEY, { + reducer(state = DEFAULT_STATE, action) { + switch (action.type) { + case 'SET_LANGUAGES': + return { + ...state, + languages: action.languages + }; + case 'SET_FROM_POST': + return { + ...state, + fromPost: action.fromPost + }; + case 'SET_CURRENT_TEMPLATE_PART': + return { + ...state, + currentTemplatePart: action.currentTemplatePart + }; + default: + return state; + } + }, + selectors: { + getLanguages(state) { + return state.languages; + }, + getFromPost(state) { + return state.fromPost; + } + }, + actions, + controls: { + FETCH_FROM_API(action) { + return external_this_wp_apiFetch_default()({ + ...action.options + }); + } + }, + resolvers: { + *getLanguages() { + const path = '/pll/v1/languages'; + const languages = yield actions.fetchFromAPI({ + path, + filterLang: false + }); + return actions.setLanguages(convertArrayToMap(languages, 'slug')); + } + } +}); +(0,external_this_wp_data_.register)(store); +;// ./js/src/editors/site/index.js +/** + * Import styles + */ + + +/** + * External dependencies + */ + + +/** + * WordPress Dependencies. + */ + + + +/** + * Internal Dependencies. + */ + + + + + + + + +editors_requests_filter(addParametersToRequest); +const sidebarName = 'polylang-sidebar'; +const _root = document.createElement('div'); +_root.id = 'pll-root'; +const root = document.body.appendChild(_root); +(0,external_this_wp_element_.createRoot)(root).render(/*#__PURE__*/(0,jsx_runtime.jsx)(app, { + sidebar: () => { + return /*#__PURE__*/(0,jsx_runtime.jsx)(sidebar, { + SidebarSlot: external_this_wp_editSite_.PluginSidebar, + MoreMenuItemSlot: external_this_wp_editSite_.PluginSidebarMoreMenuItem, + sidebarName: sidebarName, + children: /*#__PURE__*/(0,jsx_runtime.jsx)(metaboxes_site_editor, {}) + }); + }, + sidebarName: sidebarName, + onPromise: isSiteEditorContextInitialized, + children: /*#__PURE__*/(0,jsx_runtime.jsx)(cache_flush_provider, { + onPromise: isSiteEditorContextInitialized + }) +})); +})(); + +this["polylang-pro"] = __webpack_exports__; +/******/ })() +; \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/editors/site.min.js b/wp-content/plugins/polylang-pro/js/build/editors/site.min.js new file mode 100644 index 0000000..c700ed4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/editors/site.min.js @@ -0,0 +1 @@ +(()=>{var e={20(e,t,n){"use strict";var s=n(677),a=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,o=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var s,r={},c=null,p=null;for(s in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(p=t.ref),t)l.call(t,s)&&!i.hasOwnProperty(s)&&(r[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===r[s]&&(r[s]=t[s]);return{$$typeof:a,type:e,key:c,ref:p,props:r,_owner:o.current}}t.Fragment=r,t.jsx=c,t.jsxs=c},848(e,t,n){"use strict";e.exports=n(20)},677(e){e.exports=function(){return this.React}()},419(e){e.exports=function(){return this.lodash}()},631(e){e.exports=function(){return this.wp.apiFetch}()},959(e){e.exports=function(){return this.wp.components}()},488(e){e.exports=function(){return this.wp.coreData}()},987(e){e.exports=function(){return this.wp.data}()},324(e){e.exports=function(){return this.wp.editSite}()},2(e){e.exports=function(){return this.wp.editor}()},601(e){e.exports=function(){return this.wp.element}()},989(e){e.exports=function(){return this.wp.htmlEntities}()},75(e){e.exports=function(){return this.wp.i18n}()},672(e){e.exports=function(){return this.wp.notices}()},125(e){e.exports=function(){return this.wp.plugins}()},933(e){e.exports=function(){return this.wp.primitives}()},172(e){e.exports=function(){return this.wp.url}()}},t={};function n(s){var a=t[s];if(void 0!==a)return a.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);(()=>{"use strict";var e=n(631),t=n.n(e);const s=(e,t,n)=>{const s=e.path.split("?")[0].replace(/^\/+|\/+$/g,"");return Object.values(t).find((e=>s===e))?n(e):e},a=e=>{t().use(((t,n)=>void 0!==t.url||void 0===window.pllFilteredRoutes?n(t):n(s(t,window.pllFilteredRoutes,e))))};var r=n(324),l=n(601),o=n(933),i=n(848);const c=void 0!==wp.primitives?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z"})}):"translation";var p=n(125);const d=({sidebar:e,sidebarName:t,onPromise:n,children:s})=>(n().then((()=>{(0,p.registerPlugin)(t,{icon:c,render:e})}),(e=>{console.info(e)})),(0,i.jsx)(i.Fragment,{children:s}));var u=n(987);const g="pll/metabox",h="core/editor",m="core/edit-site",f="core",_={languages:[],selectedLanguage:{},translatedPosts:{},fromPost:null,currentTemplatePart:{}},x=["wp_template","wp_global_styles"],w=["page"];var y=n(419),j=n(172);function b(e){const t=(0,u.select)(g).getLanguages();return t?t.get(e):null}function v(){const e=(0,u.select)(g).getLanguages();return Array.from(e.values()).find((e=>e.is_default))}function T(e,t){const n=(0,j.hasQueryArg)(e.path,"lang");((0,y.isUndefined)(e.filterLang)||e.filterLang)&&!n&&(e.path=(0,j.addQueryArgs)(e.path,{lang:t}))}function P(e){const t=new URL(document.location).searchParams,n=t.get("postType"),s=t.get("postId"),a=(0,u.select)("core/edit-post")?.isEditingTemplate();("wp_template_part"===n&&!(0,y.isNil)(s)||a)&&function(e){e.path=(0,j.addQueryArgs)(e.path,{include_untranslated:!0})}(e)}function E(){return document.getElementById("site-editor")||document.getElementById("edit-site-editor")?(0,u.select)(m).getEditedPostType():(0,u.select)(h).getCurrentPostType()}const S=()=>{R();const e=new Promise((function(e){const t=(0,u.subscribe)((function(){(0,u.select)(m)&&(t(),e())}))}));return Promise.all([e,N()])},N=()=>new Promise((function(e){const t=(0,u.subscribe)((function(){const n=(0,u.select)(g)?.getLanguages();n?.size>0&&(t(),e(n))}))}));function R(){const e=(0,y.isEmpty)(window.location.search)?null:new URLSearchParams(window.location.search),t=e&&e.get("from_post"),n=e&&e.get("post_type"),s=e&&e.get("new_lang");t&&n&&s&&(0,u.dispatch)(g).setFromPost({id:wp.sanitize.stripTagsAndEncodeText(t),postType:wp.sanitize.stripTagsAndEncodeText(n),newLanguage:wp.sanitize.stripTagsAndEncodeText(s)})}const L=()=>{const e=(0,u.select)(m);if(!e)return null;const t=e.getEditedPostContext(),n=t?.postType&&t?.postId?t:{postId:e.getEditedPostId(),postType:e.getEditedPostType()};return null===n?null:(0,u.select)(f).getEntityRecord("postType",n.postType,n.postId)},k=({onPromise:e})=>{const t=(0,l.useRef)({}),n=()=>{const e=L();return b(e?.lang)??"default"};return(0,l.useEffect)((()=>{const s=e=>{if(t.current=n(),t?.current.is_default||"default"===t?.current)return;const s=new URL(document.location.href).searchParams,a=new URL(e).searchParams;s.get("postId")!==a.get("postId")&&(0,u.dispatch)(f).invalidateResolutionForStore()};e().then((()=>{t.current=n()})),(e=>{const t=e.pushState,n=e.replaceState;e.pushState=(n,a,r)=>(s(r),t.apply(e,[n,a,r])),e.replaceState=(t,a,r)=>(s(r),n.apply(e,[t,a,r]))})(window.history)}),[e]),null};var C=n(75);const A=({SidebarSlot:e,MoreMenuItemSlot:t,sidebarName:n,children:s})=>{const a=(0,C.__)("Languages","polylang-pro");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e,{name:n,title:a,children:s}),(0,i.jsx)(t,{target:n,children:a})]})};var M=n(488);const F=function({language:e}){return(0,y.isNil)(e)?(0,i.jsx)("span",{className:"pll-translation-icon",children:c}):(0,y.isEmpty)(e.flag_url)?(0,i.jsxs)("abbr",{children:[e.slug,(0,i.jsx)("span",{className:"screen-reader-text",children:e.name})]}):(0,i.jsx)("span",{className:"pll-select-flag",children:(0,i.jsx)("img",{src:e.flag_url,alt:e.name,title:e.name,className:"flag"})})},I=void 0!==wp.primitives?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"m10 1 3 6 6 .75-4.12 4.62L16 19l-6-3-6 3 1.13-6.63L1 7.75 7 7z"})}):"star-filled";var U=n(959);const O=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(U.Icon,{icon:I,className:"pll-default-lang-icon"}),(0,i.jsx)("span",{className:"screen-reader-text",children:(0,C.__)("Default language.","polylang-pro")})]}),D=({language:e,currentPost:t})=>{const n=(0,u.useSelect)((e=>e(f).getPostType(t.type)),[t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:(0,i.jsx)("strong",{children:(0,C.__)("Language","polylang-pro")})}),(0,i.jsxs)("div",{className:"pll-language-item",children:[(0,i.jsx)(F,{language:e}),(0,i.jsx)("span",{className:"pll-language-name",children:e.name}),e.is_default&&(0,i.jsx)(O,{})]}),e.is_default&&(0,i.jsx)("div",{children:(0,i.jsx)("span",{className:"pll-metabox-info",children:"wp_template_part"===n?.slug??(0,C.__)("This template part is used for languages that have not yet been translated.","polylang-pro")})})]})},z=({children:e})=>(0,i.jsx)("div",{className:"components-panel__body is-opened",children:(0,i.jsx)("div",{className:"pll-metabox-location",children:e})}),B=({postType:e})=>"wp_template"===e?(0,i.jsx)("div",{className:"pll-metabox-error components-notice is-warning",children:(0,C.__)("Templates are not translatable, only template parts are.","polylang-pro")}):(0,i.jsx)("div",{className:"pll-metabox-error components-notice is-warning",children:(0,C.__)("This entity is not translatable.","polylang-pro")}),H=({isError:e,isAllowedPostType:t,postType:n,children:s})=>t?e?(0,i.jsx)(z,{children:(0,i.jsx)("div",{className:"pll-metabox-error components-notice is-error",children:(0,C.__)("Unable to retrieve the content language","polylang-pro")})}):(0,i.jsx)(z,{children:s}):(0,i.jsx)(z,{children:(0,i.jsx)(B,{postType:n})}),G=({children:e})=>(0,i.jsx)("td",{className:"pll-edit-column pll-column-icon",children:e}),V=({isDefault:e})=>(0,i.jsx)("td",{className:"pll-default-lang-column pll-column-icon",children:e&&(0,i.jsx)(O,{})}),$=({children:e})=>(0,i.jsx)("td",{className:"pll-delete-column pll-column-icon",children:e}),Q=({language:e})=>(0,i.jsx)("th",{className:"pll-language-column",children:(0,y.isEmpty)(e.flag)?(0,i.jsxs)("abbr",{children:[e.slug,(0,i.jsx)("span",{className:"screen-reader-text",children:e.name})]}):(0,i.jsx)("span",{className:"pll-select-flag flag",children:(0,i.jsx)("img",{src:e.flag_url,alt:e.name,title:e.name})})}),Y=({children:e})=>(0,i.jsx)("td",{className:"pll-translation-column",children:e}),q=void 0!==wp.primitive?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M17 7v3h-5v5h-3v-5h-5v-3h5v-5h3v5h5z"})}):"plus",W=({language:e,href:t,disabled:n,handleAddClick:s=null})=>{const a=(0,C.sprintf)((0,C.__)("Add a translation in %s","polylang-pro"),e.name);return(0,i.jsx)(U.Button,{href:t,disabled:n,icon:q,label:a,className:"pll-button",onClick:s,"data-target-language":e.slug,children:(0,i.jsx)("span",{className:"screen-reader-text",children:a})})},J=void 0!==wp.primitives?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"})}):"trash",K=({language:e,disabled:t,onClick:n})=>{const s=(0,C.sprintf)((0,C.__)("Delete the translation in %s","polylang-pro"),e.name);return(0,i.jsx)(U.Button,{icon:J,label:s,disabled:t,className:"pll-button",onClick:n,children:(0,i.jsx)("span",{className:"screen-reader-text",children:s})})};var X=n(672);const Z=void 0!==wp.primitives?(0,i.jsx)(o.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,i.jsx)(o.Path,{d:"M13.89 3.39l2.71 2.72c0.46 0.46 0.42 1.24 0.030 1.64l-8.010 8.020-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.030c0.39-0.39 1.22-0.39 1.68 0.070zM11.16 6.18l-5.59 5.61 1.11 1.11 5.54-5.65zM8.19 14.41l5.58-5.6-1.070-1.080-5.59 5.6z"})}):"edit",ee=({language:e,href:t,disabled:n,handleEditClick:s=null})=>{const a=(0,C.sprintf)((0,C.__)("Edit the translation in %s","polylang-pro"),e.name);return(0,i.jsx)(U.Button,{href:t,disabled:n,icon:Z,label:a,className:"pll-button",onClick:s,"data-target-language":e.slug,children:(0,i.jsx)("span",{className:"screen-reader-text",children:a})})};n(2);n(989);const te=({language:e,children:t})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Q,{language:e}),t]}),{Fill:ne,Slot:se}=(0,U.createSlotFill)("PluginFeatureFlagButton"),ae=({children:e,className:t})=>(0,i.jsx)(ne,{children:(0,i.jsx)("div",{className:t,children:e})});ae.Slot=se;const re=ae,le=({children:e})=>(0,i.jsxs)("div",{id:"post-translations",className:"translations",children:[(0,i.jsxs)("div",{className:"pll-translations-table-header",children:[(0,i.jsx)("p",{className:"pll-translations-table-header-title",children:(0,i.jsx)("strong",{children:(0,C.__)("Translations","polylang-pro")})}),(0,i.jsx)(re.Slot,{children:e=>e.length>0&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:"pll-plugin-feature-button-container",children:e})})})]}),(0,i.jsx)("table",{children:(0,i.jsx)("tbody",{children:e})})]});const oe=()=>{const e=(0,u.useSelect)((e=>e(g).getLanguages())),t=pll_block_editor_plugin_settings?.authorizedLanguagesSlugs;return(0,l.useMemo)((()=>t?new Map(t.map((t=>{const n=e.get(t);return n?[t,n]:null})).filter(Boolean)):e),[e,t])};const ie=({isDefaultLang:e})=>(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsxs)("p",{children:[(0,C.__)("You are about to delete an entity in the default language.","polylang-pro"),(0,i.jsx)("br",{}),(0,C.__)("This will delete its customizations and all its corresponding translations.","polylang-pro")]}):null,(0,i.jsx)("p",{children:(0,C.__)("Are you sure you want to delete this translation?","polylang-pro")})]}),ce=()=>{const{deleteEntityRecord:e}=(0,u.useDispatch)(M.store),{createSuccessNotice:t,createErrorNotice:n}=(0,u.useDispatch)(X.store);return{handleDelete:async s=>{try{const n=!w.includes(s.type);await e("postType",s.type,s.id,{force:n},{throwOnError:!0}),t((0,C.__)("The translation has been deleted.","polylang-pro"),{type:"snackbar"})}catch(e){n((0,C.sprintf)((0,C.__)("Unable to delete the translation. %s","polylang-pro"),e?.message),{type:"snackbar"})}}}},pe=(e,t)=>{if(!e.is_default||"page"===t)return;const n=window.location.origin+wp.sanitize.stripTags(window.location.pathname),s={};switch(t){case"wp_navigation":s.path="/navigation";break;case"wp_block":s.path="/patterns",s.categoryType=t;break;case"wp_template_part":s.path="/"+t+"/all"}location.href=(0,j.addQueryArgs)(n,s)},de=({post:e,language:t,onDeleteSuccess:n})=>{const[s,a]=(0,l.useState)(!1),r=()=>a(!1),o=oe(),c=(0,u.useSelect)((t=>e&&t(M.store).canUser("delete",{kind:"postType",name:e.type,id:e.id})),[e]),{handleDelete:p}=ce();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(K,{onClick:()=>a(!0),language:t,disabled:!c||!o.has(t.slug)}),s&&(0,i.jsxs)(U.Modal,{title:"Delete",onRequestClose:r,children:[(0,i.jsx)(ie,{isDefaultLang:t.is_default&&"page"!==e?.type}),(0,i.jsxs)("div",{role:"group",className:"components-button-group buttons",children:[(0,i.jsx)(U.Button,{variant:"tertiary",onClick:r,type:"button",children:(0,C.__)("Cancel","polylang-pro")}),(0,i.jsx)("span",{children:" "}),(0,i.jsx)(U.Button,{variant:"primary",onClick:()=>{p(e,e.type).then((()=>n())),r(),pe(t,e.type)},type:"submit",children:(0,C.__)("Delete","polylang-pro")})]})]})]})},ue=()=>(0,l.useMemo)((()=>{const e=(0,u.select)(g).getLanguages(),t=Array.from(e.values()).find((e=>e.is_default));if(!t)throw new Error((0,C.__)("Default language not found, please check your languages settings.","polylang-pro"));return t}),[]),ge=()=>{const{createSuccessNotice:e,createErrorNotice:n}=(0,u.useDispatch)(X.store),{saveEntityRecord:s}=(0,u.useDispatch)(M.store),a=ue();return{handleCreateTranslation:async(s,a)=>{try{const n=await t()({path:"/pll/v1/translation",method:"POST",data:{from_post:"wp_template_part"===a.type||"wp_template"===a.type?a.wp_id:a.id,lang:s.slug,action:"duplicate"}});e((0,C.__)("The translation is created, you will be redirected.","polylang-pro"),{type:"snackbar"});const r="wp_template_part"===a.type||"wp_template"===a.type?a.slug:a.id,l="wp_template_part"===n.type||"wp_template"===n.type?n.slug:n.id;location.href=location.href.replace(encodeURIComponent(r),encodeURIComponent(l))}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,C.__)("An error occurred while creating the translation.","polylang-pro");n(t,{type:"snackbar"})}},persistDefaultLanguageTemplatePart:(0,l.useCallback)((e=>{const t=s("postType","wp_template_part",{id:e.id,lang:a.slug,slug:e.slug});return t.catch((e=>{const t=e.message&&"unknown_error"!==e.code?e.message:(0,C.__)("An error occurred while persisting the default language template part.","polylang-pro");n(t,{type:"snackbar"})})),t}),[a,s,n])}},he=({canUpdate:e,canCreate:t,canRead:n,language:s,currentPost:a,translation:r,handleCreateTranslation:l})=>e||n?(0,i.jsx)(ee,{href:"#",disabled:!e,language:s,handleEditClick:()=>{location.href=location.href.replace(encodeURIComponent(a.id),encodeURIComponent(r.id))}}):(0,i.jsx)(W,{href:"#",disabled:!t,language:s,handleAddClick:()=>{l()}}),me=({translationsTable:e,currentPost:t,translationsTableDispatch:n})=>{const{handleCreateTranslation:s,persistDefaultLanguageTemplatePart:a}=ge(),r=[];return e.forEach(((e,l)=>{if(t?.lang===l.slug)return;const o=(0,u.select)(M.store).canUser("create",{kind:"postType",name:t.type}),c=e&&(0,u.select)(M.store).canUser("update",{kind:"postType",name:t.type,id:t.id});r.push((0,i.jsx)("tr",{children:(0,i.jsxs)(te,{language:l,children:[(0,i.jsx)(Y,{children:(0,i.jsx)("span",{className:"pll-translation-language",children:l.name})}),(0,i.jsx)(G,{children:(0,i.jsx)(he,{canUpdate:c,canCreate:o,canRead:!!e,language:l,currentPost:t,translation:e,handleCreateTranslation:()=>{l.is_default||"wp_template_part"!==t.type||t.wp_id?s(l,t):a(t).then((e=>{s(l,e)}))}})}),(0,i.jsx)($,{children:(0,i.jsx)(de,{post:e,language:l,onDeleteSuccess:function(){n({type:"remove_translation",lang:l})}})}),(0,i.jsx)(V,{isDefault:l.is_default})]})},l.slug))})),(0,i.jsx)(le,{children:r})},fe=(e,t)=>{switch(t.type){case"add_translation":return e.set(t.lang,t.post),new Map(e);case"remove_translation":return e.set(t.lang,null),new Map(e);case"set_table":return _e(t.languages,t.translations);default:throw new Error("Invalid action")}},_e=(e,t)=>{const n=new Map;return e.forEach((e=>{n.set(e,t[e.slug]??null)})),n},xe=()=>{const[e,t]=(0,l.useReducer)(fe,new Map),[n,s]=(0,l.useState)({}),[a,r]=(0,l.useState)({}),[o,c]=(0,l.useState)(""),p=(0,u.useSelect)((e=>e(g).getLanguages()));(0,l.useEffect)((()=>{let e;if("/wp_global_styles"===wp.sanitize.stripTagsAndEncodeText((0,j.getQueryArg)(window.location.href,"path"))&&(e="wp_global_styles"),"wp_template"===wp.sanitize.stripTagsAndEncodeText((0,j.getQueryArg)(window.location.href,"postType"))&&(e="wp_template"),e)return void c(e);const t=L();s(t),c(t?.type);const n=b(t?.lang);r(n)}),[s,c,r,p,e]);const d=(0,u.useSelect)((e=>{if(!n||!n.translations)return{};const t={};if("wp_template_part"!==n.type){const s=e(M.store).getEntityRecords("postType",n.type,{include:Object.values(n.translations),context:"view",per_page:Object.values(n.translations).length,lang:""});s?.forEach((e=>{t[e.lang]=e}))}else new Map(Object.entries(n.translations)).forEach(((n,s)=>{const a=e(M.store).getEntityRecords("postType","wp_template_part",{wp_id:n});a&&a.length>0&&(t[s]=a[0])}));return t}),[n]);return(0,l.useEffect)((()=>{t({type:"set_table",languages:p,translations:d})}),[d,p,t]),0===e.size?null:(0,i.jsxs)(H,{isError:!a,isAllowedPostType:!x.includes(o),postType:o,children:[(0,i.jsx)(D,{language:a,currentPost:n}),(0,i.jsx)(me,{translationsTable:e,currentPost:n,translationsTableDispatch:t})]})};const we={setLanguages:e=>({type:"SET_LANGUAGES",languages:e}),setFromPost:e=>({type:"SET_FROM_POST",fromPost:e}),fetchFromAPI:e=>({type:"FETCH_FROM_API",options:e})},ye=(0,u.createReduxStore)(g,{reducer(e=_,t){switch(t.type){case"SET_LANGUAGES":return{...e,languages:t.languages};case"SET_FROM_POST":return{...e,fromPost:t.fromPost};case"SET_CURRENT_TEMPLATE_PART":return{...e,currentTemplatePart:t.currentTemplatePart};default:return e}},selectors:{getLanguages:e=>e.languages,getFromPost:e=>e.fromPost},actions:we,controls:{FETCH_FROM_API:e=>t()({...e.options})},resolvers:{*getLanguages(){const e=yield we.fetchFromAPI({path:"/pll/v1/languages",filterLang:!1});return we.setLanguages(function(e,t){const n=new Map;return e.reduce((function(e,n){return e.set(n[t],n),e}),n),n}(e,"slug"))}}});(0,u.register)(ye),a((function(e){const t=function(){if((0,y.isUndefined)((0,u.select)(h)))return pll_block_editor_plugin_settings.lang.slug;const e=(0,u.select)(h).getEditedPostAttribute("lang");if(!(0,y.isUndefined)(e)&&e)return e;const t=new URL(document.location).searchParams,n=t.get("postType"),s=t.get("postId");if("wp_template_part"===n&&(0,y.isNil)(s))return pll_block_editor_plugin_settings.lang=v(),pll_block_editor_plugin_settings.lang.slug;const a=L(),r=a?.lang;if(!(0,y.isUndefined)(r)&&r)return r;return pll_block_editor_plugin_settings.lang.slug}();return function(e){return!(0,y.isNil)(e.data)}(e)?(function(e){return"POST"===e.method&&e.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/)&&(0,y.isNil)(e.data.from_post)&&(0,y.isNil)(e.data.lang)}(e)&&T(e,v()?.slug),function(e){const t=(0,y.map)((0,u.select)("core").getEntitiesConfig("postType"),(0,y.property)("baseURL")),n=(0,u.select)("core/editor").getCurrentPostId(),s=e.data.id;return-1!==t.findIndex((function(t){return new RegExp(`${(0,y.escapeRegExp)(t)}`).test(e.path)}))&&n===s}(e)||function(e){return"POST"===e.method&&e.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/)&&!(0,y.isNil)(e.data.from_post)&&!(0,y.isNil)(e.data.lang)}(e)||T(e,t),function(e,t){const n=function(e){const t=(0,u.select)("core").getEntitiesConfig("postType"),n=(0,y.find)(t,{name:e});return n?.baseURL}("wp_template_part");if((0,y.isUndefined)(n))return;const s=new RegExp((0,y.escapeRegExp)(n));if("POST"===e.method&&s.test(e.path)){if(!(0,u.select)(g).getLanguages().get(t).is_default){const n="___"+t;e.data.slug+=n}}}(e,t),e):("wp_template"===E()&&T(e,v()?.slug),new RegExp(/^\/wp\/v2\/template-parts\/?(?:\?.*)?$/).test(e.path)&&P(e),T(e,t),e)}));const je="polylang-sidebar",be=document.createElement("div");be.id="pll-root";const ve=document.body.appendChild(be);(0,l.createRoot)(ve).render((0,i.jsx)(d,{sidebar:()=>(0,i.jsx)(A,{SidebarSlot:r.PluginSidebar,MoreMenuItemSlot:r.PluginSidebarMoreMenuItem,sidebarName:je,children:(0,i.jsx)(xe,{})}),sidebarName:je,onPromise:S,children:(0,i.jsx)(k,{onPromise:S})}))})(),this["polylang-pro"]={}})(); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/editors/widget.js b/wp-content/plugins/polylang-pro/js/build/editors/widget.js new file mode 100644 index 0000000..436927d --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/editors/widget.js @@ -0,0 +1,1171 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 20 +(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +var __webpack_unused_export__; +/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var f=__webpack_require__(677),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0}; +function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}__webpack_unused_export__=l;exports.jsx=q;exports.jsxs=q; + + +/***/ }, + +/***/ 848 +(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(20); +} else // removed by dead control flow +{} + + +/***/ }, + +/***/ 677 +(module) { + +module.exports = (function() { return this["React"]; }()); + +/***/ }, + +/***/ 419 +(module) { + +module.exports = (function() { return this["lodash"]; }()); + +/***/ }, + +/***/ 631 +(module) { + +module.exports = (function() { return this["wp"]["apiFetch"]; }()); + +/***/ }, + +/***/ 89 +(module) { + +module.exports = (function() { return this["wp"]["blockEditor"]; }()); + +/***/ }, + +/***/ 959 +(module) { + +module.exports = (function() { return this["wp"]["components"]; }()); + +/***/ }, + +/***/ 897 +(module) { + +module.exports = (function() { return this["wp"]["compose"]; }()); + +/***/ }, + +/***/ 987 +(module) { + +module.exports = (function() { return this["wp"]["data"]; }()); + +/***/ }, + +/***/ 601 +(module) { + +module.exports = (function() { return this["wp"]["element"]; }()); + +/***/ }, + +/***/ 873 +(module) { + +module.exports = (function() { return this["wp"]["hooks"]; }()); + +/***/ }, + +/***/ 75 +(module) { + +module.exports = (function() { return this["wp"]["i18n"]; }()); + +/***/ }, + +/***/ 933 +(module) { + +module.exports = (function() { return this["wp"]["primitives"]; }()); + +/***/ }, + +/***/ 172 +(module) { + +module.exports = (function() { return this["wp"]["url"]; }()); + +/***/ } + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. +(() => { +"use strict"; + +// EXTERNAL MODULE: external {"this":["wp","apiFetch"]} +var external_this_wp_apiFetch_ = __webpack_require__(631); +var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_); +;// ./node_modules/@wpsyntex/polylang-react-library/build/middlewares/filter-path.js +/** + * Filters requests for translatable entities. + * This logic is shared across all Polylang plugins. + * + * @since 3.5 + * + * @param {Object} options - API fetch options object. + * @param {Array} filteredRoutes - Array of route paths to filter. + * @param {Function} filter - Function to filter matching routes. + * @return {Object} Modified REST request options. + */ +const filterPathMiddleware = (options, filteredRoutes, filter) => { + const cleanPath = options.path.split('?')[0].replace(/^\/+|\/+$/g, ''); // Get path without query parameters and trim '/'. + + return Object.values(filteredRoutes).find(path => cleanPath === path) ? filter(options) : options; +}; +/* harmony default export */ const filter_path = (filterPathMiddleware); +;// ./node_modules/@wpsyntex/polylang-react-library/build/middlewares/editors-requests-filter.js +/** + * WordPress dependencies. + */ + + +/* + * Internal dependencies. + */ + + +/** + * Safely filters requests for translatable entities in block editor type screens. + * Ensures that `pllFilteredRoutes` has been well defined on server side and + * that the filtered request is a REST one. + * + * @param {Function} filterCallback - Function to filter API fetch options. + */ +const editorsRequestsFilter = filterCallback => { + external_this_wp_apiFetch_default().use((options, next) => { + /* + * If options.url is defined, this is not a REST request but a direct call to post.php for legacy metaboxes. + * If `filteredRoutes` is not defined, return early. + */ + if ('undefined' !== typeof options.url || 'undefined' === typeof window.pllFilteredRoutes) { + return next(options); + } + return next(filter_path(options, window.pllFilteredRoutes, filterCallback)); + }); +}; +/* harmony default export */ const editors_requests_filter = (editorsRequestsFilter); +// EXTERNAL MODULE: external {"this":["wp","data"]} +var external_this_wp_data_ = __webpack_require__(987); +// EXTERNAL MODULE: external {"this":["wp","url"]} +var external_this_wp_url_ = __webpack_require__(172); +// EXTERNAL MODULE: external "lodash" +var external_lodash_ = __webpack_require__(419); +;// ./js/src/editors/common/settings.js +/** + * Module Constants + */ + +const MODULE_KEY = 'pll/metabox'; +const MODULE_CORE_EDITOR_KEY = 'core/editor'; +const MODULE_SITE_EDITOR_KEY = 'core/edit-site'; +const MODULE_POST_EDITOR_KEY = 'core/edit-post'; +const MODULE_CORE_KEY = 'core'; +const DEFAULT_STATE = { + languages: [], + selectedLanguage: {}, + translatedPosts: {}, + fromPost: null, + currentTemplatePart: {} +}; +const UNTRANSLATABLE_POST_TYPE = (/* unused pure expression or super */ null && (['wp_template', 'wp_global_styles'])); +const POST_TYPE_WITH_TRASH = (/* unused pure expression or super */ null && (['page'])); +const TEMPLATE_PART_SLUG_SEPARATOR = '___'; // Its value must be synchronized with its equivalent in PHP @see PLL_FSE_Template_Slug::SEPARATOR. +const TEMPLATE_PART_SLUG_CHECK_LANGUAGE_PATTERN = '[a-z][a-z0-9_-]*'; // Its value must be synchronized with it equivalent in PHP @see PLL_FSE_Template_Slug::SEPARATOR. + +;// ./js/src/editors/common/store/utils.js +/* unused harmony import specifier */ var utils_select; +/* unused harmony import specifier */ var subscribe; +/* unused harmony import specifier */ var dispatch; +/* unused harmony import specifier */ var isNil; +/* unused harmony import specifier */ var isEmpty; +/* unused harmony import specifier */ var getSearchParams; +/* unused harmony import specifier */ var utils_MODULE_CORE_EDITOR_KEY; +/* unused harmony import specifier */ var utils_MODULE_KEY; +/* unused harmony import specifier */ var utils_MODULE_CORE_KEY; +/* unused harmony import specifier */ var utils_MODULE_SITE_EDITOR_KEY; +/** + * WordPress Dependencies + */ + + + +/** + * Internal dependencies + */ + + + +/** + * Wait for the whole post block editor context has been initialized: current post loaded and languages list initialized. + */ +const isBlockPostEditorContextInitialized = () => { + if (isNil(utils_select(utils_MODULE_CORE_EDITOR_KEY))) { + return Promise.reject("Polylang languages panel can't be initialized because block editor isn't fully initialized."); + } + + // save url params especially when a new translation is creating + saveURLParams(); + + /** + * Set a promise fulfilled with the current post. + */ + const isCurrentPostLoaded = new Promise(function (resolve) { + const unsubscribe = subscribe(function () { + const currentPost = utils_select(utils_MODULE_CORE_EDITOR_KEY).getCurrentPost(); + if (!isEmpty(currentPost)) { + unsubscribe(); + resolve(currentPost); + } + }); + }); + + /** + * Set a promise fulfilled with the source post when a new draft is created from a source, null otherwise. + */ + const isFromPostLoaded = new Promise(function (resolve) { + const unsubscribe = subscribe(function () { + const fromPostUrlParams = utils_select(utils_MODULE_KEY).getFromPost(); + if (!fromPostUrlParams || !fromPostUrlParams.id || !fromPostUrlParams.postType) { + unsubscribe(); + resolve(null); + return; + } + const fromPost = utils_select(utils_MODULE_CORE_KEY).getEntityRecord('postType', fromPostUrlParams.postType, fromPostUrlParams.id, { + context: 'view' + } // Use 'view' context so translators can read posts they cannot edit. + ); + if (fromPost && fromPost.id) { + unsubscribe(); + resolve(fromPost); + } + }); + }); + return Promise.all([isCurrentPostLoaded, isFromPostLoaded, isLanguagesinitialized()]).then(function (resolvedValues) { + const [currentPost, fromPost] = resolvedValues; + + // Force update translations when creating a draft from a source post. + if (fromPost && fromPost.id && currentPost.lang) { + dispatch(utils_MODULE_CORE_EDITOR_KEY).editPost({ + translations: { + ...fromPost.translations, + [currentPost.lang]: currentPost.id + } + }); + } + }); +}; + +/** + * Wait for the whole site editor context to be initialized: current template loaded and languages list initialized. + */ +const isSiteEditorContextInitialized = () => { + // save url params especially when a new translation is creating + saveURLParams(); + + /** + * Set a promise to wait for the current template to be fully loaded before making other processes. + * It allows to see if both Site Editor and Core stores are available (@see getCurrentPostFromDataStore()). + */ + const isTemplatePartLoaded = new Promise(function (resolve) { + const unsubscribe = subscribe(function () { + const store = utils_select(utils_MODULE_SITE_EDITOR_KEY); + if (store) { + unsubscribe(); + resolve(); + } + }); + }); + return Promise.all([isTemplatePartLoaded, isLanguagesinitialized()]); +}; + +/** + * Returns a promise fulfilled when the languages list is correctly initialized before making other processes. + * + * @return {Promise} A promise fulfilled with the languages list. + */ +const isLanguagesinitialized = () => new Promise(function (resolve) { + const unsubscribe = (0,external_this_wp_data_.subscribe)(function () { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY)?.getLanguages(); + if (languages?.size > 0) { + unsubscribe(); + resolve(languages); + } + }); +}); + +/** + * Save query string parameters from URL. They could be needed after + * They could be null if they does not exist + */ +function saveURLParams() { + // Variable window.location.search isn't use directly + // Function getSearchParams return an URLSearchParams object for manipulating each parameter + // Each of them are sanitized below + const searchParams = getSearchParams(); + const fromPost = searchParams && searchParams.get('from_post'); + const postType = searchParams && searchParams.get('post_type'); + const newLanguage = searchParams && searchParams.get('new_lang'); + if (fromPost && postType && newLanguage) { + dispatch(utils_MODULE_KEY).setFromPost({ + id: wp.sanitize.stripTagsAndEncodeText(fromPost), + postType: wp.sanitize.stripTagsAndEncodeText(postType), + newLanguage: wp.sanitize.stripTagsAndEncodeText(newLanguage) + }); + } +} + +/** + * Gets the current post using the Site Editor store and the Core store. + * + * @return {object|null} The current post object, `null` if none found. + */ +const getCurrentPostFromDataStore = () => { + const siteEditorSelector = utils_select(utils_MODULE_SITE_EDITOR_KEY); + + /** + * Return null when called from our apiFetch middleware without a properly loaded store. + */ + if (!siteEditorSelector) { + return null; + } + const context = siteEditorSelector.getEditedPostContext(); + const editedContext = context?.postType && context?.postId ? context : { + postId: siteEditorSelector.getEditedPostId(), + postType: siteEditorSelector.getEditedPostType() + }; + return null === editedContext ? null : utils_select(utils_MODULE_CORE_KEY).getEntityRecord('postType', editedContext.postType, editedContext.postId); +}; +;// ./js/src/editors/common/utils.js +/* unused harmony import specifier */ var common_utils_select; +/* unused harmony import specifier */ var addQueryArgs; +/* unused harmony import specifier */ var isBoolean; +/* unused harmony import specifier */ var find; +/* unused harmony import specifier */ var utils_isEmpty; +/* unused harmony import specifier */ var utils_isNil; +/* unused harmony import specifier */ var map; +/* unused harmony import specifier */ var property; +/* unused harmony import specifier */ var escapeRegExp; +/* unused harmony import specifier */ var isUndefined; +/* unused harmony import specifier */ var common_utils_MODULE_KEY; +/* unused harmony import specifier */ var utils_MODULE_POST_EDITOR_KEY; +/* unused harmony import specifier */ var common_utils_MODULE_SITE_EDITOR_KEY; +/* unused harmony import specifier */ var common_utils_MODULE_CORE_EDITOR_KEY; +/* unused harmony import specifier */ var utils_TEMPLATE_PART_SLUG_SEPARATOR; +/* unused harmony import specifier */ var utils_getCurrentPostFromDataStore; +/** + * WordPress Dependencies + */ + + + + +/** + * Internal dependencies + */ + + + +/** + * Converts array of object to a map. + * + * @param {Array} array Array to convert. + * @param {*} key The key in the object used as key to build the map. + * @return {Map} Converted array. + */ +function convertArrayToMap(array, key) { + const arrayMap = new Map(); + array.reduce(function (accumulator, currentValue) { + accumulator.set(currentValue[key], currentValue); + return accumulator; + }, arrayMap); + return arrayMap; +} + +/** + * Converts map to an associative array. + * + * @param {Map} mapToConvert The map to convert. + * @return {Object} Converted map. + */ +function convertMapToObject(mapToConvert) { + const object = {}; + mapToConvert.forEach(function (value, key) { + this[key] = isBoolean(value) ? value.toString() : value; + }, object); + return object; +} + +/** + * Checks whether the current screen is the site editor. + * Takes in account if Gutenberg is activated. + * + * @return {boolean} True if site editor screen, false otherwise. + */ +function isSiteBlockEditor() { + return !!(document.getElementById('site-editor') || document.getElementById('edit-site-editor')); +} + +/** + * Returns the post type URL for REST API calls or undefined if the user hasn't the rights. + * + * @param {string} name The post type name. + * @return {string|undefined} URL of the given post type, undefined if not available. + */ +function getPostsUrl(name) { + const postTypes = common_utils_select('core').getEntitiesConfig('postType'); + const postType = find(postTypes, { + name + }); + return postType?.baseURL; +} + +/** + * Gets all query string parameters and convert them in a URLSearchParams object. + * + * @return {URLSearchParams|null} Search parameters object, null if none. + */ +function utils_getSearchParams() { + // Variable window.location.search is just read for creating and returning a URLSearchParams object to be able to manipulate it more easily. + // eslint-disable-next-line prettier/prettier + if (!utils_isEmpty(window.location.search)) { + // phpcs:ignore WordPressVIPMinimum.JS.Window.location + return new URLSearchParams(window.location.search); // phpcs:ignore WordPressVIPMinimum.JS.Window.location + } + return null; +} + +/** + * Gets selected language. + * + * @param {string} lang The post language code. + * @return {Object|null} The selected language, null otherwise. + */ +function getSelectedLanguage(lang) { + const languages = common_utils_select(common_utils_MODULE_KEY).getLanguages(); + // Pick up this language as selected in languages list + if (languages) { + return languages.get(lang); + } + return null; +} + +/** + * Gets the default language. + * + * @return {Object} The default Language. + */ +function getDefaultLanguage() { + const languages = common_utils_select(common_utils_MODULE_KEY).getLanguages(); + return Array.from(languages.values()).find(lang => lang.is_default); +} + +/** + * Checks if the given language is the default one. + * + * @param {string} lang The language code to compare with. + * @return {boolean} True if the given language is the default one. + */ +function isDefaultLanguage(lang) { + return lang === getDefaultLanguage().slug; +} + +/** + * Checks if the given request is for saving. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request is for saving. + */ +function isSaveRequest(options) { + // If data is defined we are in a PUT or POST request method otherwise a GET request method + // Test options.method property isn't efficient because most of REST request which use fetch API doesn't pass this property. + // So, test options.data is necessary to know if the REST request is to save data. + // However test if options.data is undefined isn't sufficient because some REST request pass a null value as the ServerSideRender Gutenberg component. + if (!utils_isNil(options.data)) { + return true; + } + return false; +} + +/** + * Checks if the given request concerns the current post type. + * + * Useful when saving a reusable block contained in another post type. + * Indeed a reusable block is also a post, but its saving request doesn't concern the post currently edited. + * As we don't know the language of the reusable block when the user triggers the reusable block saving action, + * we need to pass the current post language to be sure that the reusable block will have a language. + * + * @see https://github.com/polylang/polylang/issues/437 - Reusable block has no language when it's saved from another post type editing. + * + * @param {Object} options the initial request + * @return {boolean} True if the request concerns the current post. + */ +function isCurrentPostRequest(options) { + // Saving translation data is needed only for all post types. + // It's done by verifying options.path matches with one of baseURL of all post types + // and compare current post id with this sent in the request. + + // List of post type baseURLs. + const postTypeURLs = map(common_utils_select('core').getEntitiesConfig('postType'), property('baseURL')); + + // Id from the post currently edited. + const postId = common_utils_select('core/editor').getCurrentPostId(); + + // Id from the REST request. + // options.data never isNil here because it's already verified before in isSaveRequest() function. + const id = options.data.id; + + // Return true + // if REST request baseURL matches with one of the known post type baseURLs + // and the id from the post currently edited corresponds on the id passed to the REST request + // Return false otherwise + return -1 !== postTypeURLs.findIndex(function (element) { + return new RegExp(`${escapeRegExp(element)}`).test(options.path); + }) && postId === id; +} + +/** + * Checks if the given REST request is for the creation of a new template part translation. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request concerns a template part translation creation. + */ +function isTemplatePartTranslationCreationRequest(options) { + return 'POST' === options.method && options.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/) && !utils_isNil(options.data.from_post) && !utils_isNil(options.data.lang); +} + +/** + * Checks if the given REST request is for the creation of a new template part. + * + * @param {Object} options The initial request. + * @return {boolean} True if the request concerns a template part creation. + */ +function isNewTemplatePartCreationRequest(options) { + return 'POST' === options.method && options.path.match(/^\/wp\/v2\/template-parts(?:\/|\?|$)/) && utils_isNil(options.data.from_post) && utils_isNil(options.data.lang); +} + +/** + * Adds language as query string parameter to the given request. + * + * @param {Object} options The initial request. + * @param {string} currentLanguage The language code to add to the request. + */ +function addLanguageToRequest(options, currentLanguage) { + const hasLangArg = (0,external_this_wp_url_.hasQueryArg)(options.path, 'lang'); + const filterLang = (0,external_lodash_.isUndefined)(options.filterLang) || options.filterLang; + if (filterLang && !hasLangArg) { + options.path = (0,external_this_wp_url_.addQueryArgs)(options.path, { + lang: currentLanguage + }); + } +} + +/** + * Adds `include_untranslated` parameter to the request. + * + * @param {Object} options The initial request. + * @return {void} + */ +function addIncludeUntranslatedParam(options) { + options.path = addQueryArgs(options.path, { + include_untranslated: true + }); +} + +/** + * Use addIncludeUntranslatedParam if the given page is a template part page. + * Or if the template editing mode is enabled inside post editing. + * + * @param {Object} options The initial request. + * @return {void} + */ +function maybeRequireIncludeUntranslatedTemplate(options) { + const params = new URL(document.location).searchParams; + const postType = params.get('postType'); + const postId = params.get('postId'); + const isEditingTemplate = common_utils_select(utils_MODULE_POST_EDITOR_KEY)?.isEditingTemplate(); + if ('wp_template_part' === postType && !utils_isNil(postId) || isEditingTemplate) { + addIncludeUntranslatedParam(options); + } +} + +/** + * Returns true if the given post is a template part, false otherwise. + * + * @param {Object} post A post object. + * @return {boolean} Whether it is a template part or not. + */ +function isTemplatePart(post) { + return 'wp_template_part' === post.type; +} + +/** + * Returns the current post type considering the Site Editor or Post Editor. + * + * @return {string} The current post type. + */ +function getCurrentPostType() { + if (isSiteBlockEditor()) { + return common_utils_select(common_utils_MODULE_SITE_EDITOR_KEY).getEditedPostType(); + } + return common_utils_select(common_utils_MODULE_CORE_EDITOR_KEY).getCurrentPostType(); +} + +/** + * Adds parameters according to the context of the request. + * + * @since 3.5 + * + * @param {APIFetchOptions} options The options of the request. + * @return {APIFetchOptions} The modified options of the request. + */ +function addParametersToRequest(options) { + const currentLangSlug = getCurrentLanguageSlug(); + + // `POST` or `PUT` request. + if (isSaveRequest(options)) { + /** + * Use default language for new template part that doesn't exist in any language, + * otherwise use the current language. + */ + if (isNewTemplatePartCreationRequest(options)) { + addLanguageToRequest(options, getDefaultLanguage()?.slug); + } + if (!isCurrentPostRequest(options) && !isTemplatePartTranslationCreationRequest(options)) { + addLanguageToRequest(options, currentLangSlug); + } + maybeAddLangSuffixToTemplatePart(options, currentLangSlug); + return options; + } + const currentPostType = getCurrentPostType(); + + // Current language is set to default when editing templates. + if ('wp_template' === currentPostType) { + addLanguageToRequest(options, getDefaultLanguage()?.slug); + } + const templatePartListRegex = new RegExp(/^\/wp\/v2\/template-parts\/?(?:\?.*)?$/); + + // Template part list request. + if (templatePartListRegex.test(options.path)) { + maybeRequireIncludeUntranslatedTemplate(options); + } + + // All kinds of requests. + addLanguageToRequest(options, currentLangSlug); + return options; +} + +/** + * Gets language from store or a fallback javascript global variable. + * + * @return {string} The language slug. + */ +function getCurrentLanguageSlug() { + if (isUndefined(common_utils_select(common_utils_MODULE_CORE_EDITOR_KEY))) { + // Return ASAP to avoid issues later. + return pll_block_editor_plugin_settings.lang.slug; + } + + // Post block editor case. + const postLanguage = common_utils_select(common_utils_MODULE_CORE_EDITOR_KEY).getEditedPostAttribute('lang'); + if (!isUndefined(postLanguage) && postLanguage) { + return postLanguage; + } + + // Returns the default lang if the current location is a template part list + // and update pll_block_editor_plugin_settings at the same time. + const params = new URL(document.location).searchParams; + const postType = params.get('postType'); + const postId = params.get('postId'); + if ('wp_template_part' === postType && utils_isNil(postId)) { + pll_block_editor_plugin_settings.lang = getDefaultLanguage(); + return pll_block_editor_plugin_settings.lang.slug; + } + + // FSE template editor case. + const template = utils_getCurrentPostFromDataStore(); + const templateLanguage = template?.lang; + if (!isUndefined(templateLanguage) && templateLanguage) { + return templateLanguage; + } + + // For the first requests block editor isn't initialized yet. + // So language is retrieved from a javascript global variable initialized server-side. + return pll_block_editor_plugin_settings.lang.slug; +} + +/** + * Adds the language suffix to a template part only during creation. + * + * @param {Object} options Object representing a REST request. + * @param {string} langSlug The Language slug to add. + * @return {void} + */ +function maybeAddLangSuffixToTemplatePart(options, langSlug) { + const restBaseUrl = getPostsUrl('wp_template_part'); + if (isUndefined(restBaseUrl)) { + // The user hasn't the rights to edit template part. + return; + } + const templatePartURLRegExp = new RegExp(escapeRegExp(restBaseUrl)); + if ('POST' === options.method && templatePartURLRegExp.test(options.path)) { + const languages = common_utils_select(common_utils_MODULE_KEY).getLanguages(); + const language = languages.get(langSlug); + if (!language.is_default) { + // No suffix for default language. + const langSuffix = utils_TEMPLATE_PART_SLUG_SEPARATOR + langSlug; + options.data.slug += langSuffix; + } + } +} +// EXTERNAL MODULE: external {"this":["wp","i18n"]} +var external_this_wp_i18n_ = __webpack_require__(75); +// EXTERNAL MODULE: external {"this":["wp","compose"]} +var external_this_wp_compose_ = __webpack_require__(897); +// EXTERNAL MODULE: external {"this":["wp","hooks"]} +var external_this_wp_hooks_ = __webpack_require__(873); +// EXTERNAL MODULE: external {"this":["wp","element"]} +var external_this_wp_element_ = __webpack_require__(601); +// EXTERNAL MODULE: external {"this":["wp","blockEditor"]} +var external_this_wp_blockEditor_ = __webpack_require__(89); +// EXTERNAL MODULE: external {"this":["wp","components"]} +var external_this_wp_components_ = __webpack_require__(959); +// EXTERNAL MODULE: external {"this":["wp","primitives"]} +var external_this_wp_primitives_ = __webpack_require__(933); +// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js +var jsx_runtime = __webpack_require__(848); +;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/translation.js +/** + * Translation icon - translation Dashicon. + */ + +/** + * WordPress dependencies + */ + + +const isPrimitivesComponents = 'undefined' !== typeof wp.primitives; +const translation = isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { + width: "20", + height: "20", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { + d: "M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z" + }) +}) : 'translation'; +/* harmony default export */ const icons_translation = (translation); +;// ./js/src/editors/common/components/language-flag/index.js +/* eslint-disable import/no-extraneous-dependencies */ +/** + * External dependencies. + */ + + + +/** + * Displays a flag icon for a given language. + * + * @since 3.1 + * @since 3.2 Now its own component. + * + * @param {Object} props LanguageFlag props. + * @param {Object} props.language Language object for the flag. + * + * @return {React.ReactElement} Flag component. + */ + +function LanguageFlag({ + language +}) { + if (!(0,external_lodash_.isNil)(language)) { + return !(0,external_lodash_.isEmpty)(language.flag_url) ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-select-flag", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { + src: language.flag_url, + alt: language.name, + title: language.name, + className: "flag" + }) + }) : /*#__PURE__*/(0,jsx_runtime.jsxs)("abbr", { + children: [language.slug, /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "screen-reader-text", + children: language.name + })] + }); + } + return /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "pll-translation-icon", + children: icons_translation + }); +} +/* harmony default export */ const language_flag = (LanguageFlag); +;// ./js/src/editors/common/components/language-dropdown/index.js +/** + * WordPress dependencies. + */ + + + +/** + * Internal dependencies. + */ + + +/** + * Displays a dropdown to select a language. + * + * @since 3.1 + * + * @param {Object} props LanguageDropdown props. + * @param {Function} props.handleChange Callback to be executed when language changes. + * @param {Object} props.languages An iterable object containing languages objects. + * @param {Object} props.selectedLanguage An object representing a Polylang Language. Default to null. + * @param {string} props.defaultValue Value to be selected if the selected language is not provided. Default to an empty string. + * + * @return {Object} A dropdown selector for languages. + */ + +function LanguageDropdown({ + handleChange, + languages, + selectedLanguage = null, + defaultValue = '' +}) { + const selectedLanguageSlug = selectedLanguage?.slug ? selectedLanguage.slug : defaultValue; + const normalizedLanguagesForSelectControl = (0,external_this_wp_element_.useMemo)(() => { + return Array.from(languages.values()).map(({ + slug, + name + }) => ({ + value: slug, + label: name + })); + }, [languages]); + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + id: "pll-language-select-control", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(language_flag, { + language: selectedLanguage + }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.SelectControl, { + value: selectedLanguageSlug, + onChange: newLangSlug => handleChange(newLangSlug), + options: normalizedLanguagesForSelectControl, + id: "pll_post_lang_choice", + name: "pll_post_lang_choice", + className: "post_lang_choice", + __nextHasNoMarginBottom: true, + __next40pxDefaultSize: true + })] + }); +} + +;// ./js/src/editors/common/store/index.js +/** + * WordPress Dependencies + */ + + + +/** + * Internal dependencies + */ + + +const actions = { + setLanguages(languages) { + return { + type: 'SET_LANGUAGES', + languages + }; + }, + setFromPost(fromPost) { + return { + type: 'SET_FROM_POST', + fromPost + }; + }, + fetchFromAPI(options) { + return { + type: 'FETCH_FROM_API', + options + }; + } +}; +const store = (0,external_this_wp_data_.createReduxStore)(MODULE_KEY, { + reducer(state = DEFAULT_STATE, action) { + switch (action.type) { + case 'SET_LANGUAGES': + return { + ...state, + languages: action.languages + }; + case 'SET_FROM_POST': + return { + ...state, + fromPost: action.fromPost + }; + case 'SET_CURRENT_TEMPLATE_PART': + return { + ...state, + currentTemplatePart: action.currentTemplatePart + }; + default: + return state; + } + }, + selectors: { + getLanguages(state) { + return state.languages; + }, + getFromPost(state) { + return state.fromPost; + } + }, + actions, + controls: { + FETCH_FROM_API(action) { + return external_this_wp_apiFetch_default()({ + ...action.options + }); + } + }, + resolvers: { + *getLanguages() { + const path = '/pll/v1/languages'; + const languages = yield actions.fetchFromAPI({ + path, + filterLang: false + }); + return actions.setLanguages(convertArrayToMap(languages, 'slug')); + } + } +}); +(0,external_this_wp_data_.register)(store); +;// ./js/src/editors/widget/language-attribute-control.js +/** + * Add blocks attributes + */ + +/** + * WordPress Dependencies + */ + + + + + + + + + +/** + * Internal dependencies + */ + + + + +/* + * Loads Polylang Redux store, used for languages. + */ + + +const LanguageAttribute = { + type: 'string', + default: 'every' +}; +const addLangChoiceAttribute = function (settings, name) { + const unallowedBlockNames = ['core/widget-area', 'core/legacy-widget']; + if (unallowedBlockNames.find(element => element === name)) { + return settings; + } + settings.attributes = (0,external_lodash_.assign)(settings.attributes, { + pll_lang: LanguageAttribute + }); + return settings; +}; +(0,external_this_wp_hooks_.addFilter)('blocks.registerBlockType', 'pll/lang-choice', addLangChoiceAttribute); + +/** + * Determines if the language control should be shown for a block. + * Language control is only shown on outer blocks (without parents) that are language filterable (widget-area is excluded as it's just a container). + * + * @param {string} clientId Block client ID. + * @param {boolean} isLanguageFilterable Whether the block is language filterable. + * @return {boolean} True if language control should be shown. + */ +const useShouldShowLanguageControl = (clientId, isLanguageFilterable) => { + return (0,external_this_wp_data_.useSelect)(selectStore => { + if (!isLanguageFilterable) { + return false; + } + const blockParents = selectStore(external_this_wp_blockEditor_.store).getBlockParents(clientId).filter(parentId => { + const parentBlock = selectStore(external_this_wp_blockEditor_.store).getBlock(parentId); + return parentBlock && parentBlock.name !== 'core/widget-area'; + }); + return blockParents.length === 0; + }, [clientId, isLanguageFilterable]); +}; +const withInspectorControls = (0,external_this_wp_compose_.createHigherOrderComponent)(BlockEdit => { + return props => { + const languages = (0,external_this_wp_data_.select)(MODULE_KEY).getLanguages(); + const { + pll_lang + } = props.attributes; + const isLanguageFilterable = !(0,external_lodash_.isNil)(pll_lang); + const selectedLanguage = languages.get(pll_lang); + const withAllLanguages = languages.set('', { + slug: 'every', + name: (0,external_this_wp_i18n_.__)('All languages', 'polylang-pro') + }); + const shouldShowLanguageControl = useShouldShowLanguageControl(props.clientId, isLanguageFilterable); + return /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_element_.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(BlockEdit, { + ...props + }), shouldShowLanguageControl && /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_blockEditor_.InspectorControls, { + children: /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_components_.PanelBody, { + title: (0,external_this_wp_i18n_.__)('Languages', 'polylang-pro'), + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("label", { + htmlFor: "pll_post_lang_choice", + children: (0,external_this_wp_i18n_.__)('The block is displayed for:', 'polylang-pro') + }), /*#__PURE__*/(0,jsx_runtime.jsx)(LanguageDropdown, { + selectedLanguage: selectedLanguage, + handleChange: nextLangSlug => { + props.setAttributes({ + pll_lang: nextLangSlug + }); + }, + defaultValue: LanguageAttribute.default, + languages: withAllLanguages + })] + }) + })] + }); + }; +}, 'withInspectorControl'); +isLanguagesinitialized().then(function () { + (0,external_this_wp_hooks_.addFilter)('editor.BlockEdit', 'pll/lang-choice-with-inspector-controls', withInspectorControls); +}); +;// ./js/src/editors/widget/index.js +/** + * External dependencies + */ + + +/** + * Internal dependencies. + */ + + +/* + * Loads language attribute feature for widget blocks. + */ + +editors_requests_filter( +/** + * Adds default language parameter to a given request. + * + * @since 3.5 + * + * @param {APIFetchOptions} options REST request options. + * @return {APIFetchOptions} Modified REST request options. + */ +function (options) { + if ('undefined' !== typeof pll_block_editor_plugin_settings) { + addLanguageToRequest(options, pll_block_editor_plugin_settings.lang.slug); + } + return options; +}); +})(); + +this["polylang-pro"] = __webpack_exports__; +/******/ })() +; \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/editors/widget.min.js b/wp-content/plugins/polylang-pro/js/build/editors/widget.min.js new file mode 100644 index 0000000..4989deb --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/editors/widget.min.js @@ -0,0 +1 @@ +(()=>{var e={20(e,t,n){"use strict";var r=n(677),s=Symbol.for("react.element"),l=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,r)&&!i.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:s,type:e,key:c,ref:u,props:l,_owner:a.current}}t.jsx=c,t.jsxs=c},848(e,t,n){"use strict";e.exports=n(20)},677(e){e.exports=function(){return this.React}()},419(e){e.exports=function(){return this.lodash}()},631(e){e.exports=function(){return this.wp.apiFetch}()},89(e){e.exports=function(){return this.wp.blockEditor}()},959(e){e.exports=function(){return this.wp.components}()},897(e){e.exports=function(){return this.wp.compose}()},987(e){e.exports=function(){return this.wp.data}()},601(e){e.exports=function(){return this.wp.element}()},873(e){e.exports=function(){return this.wp.hooks}()},75(e){e.exports=function(){return this.wp.i18n}()},933(e){e.exports=function(){return this.wp.primitives}()},172(e){e.exports=function(){return this.wp.url}()}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var l=t[r]={exports:{}};return e[r](l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);(()=>{"use strict";var e=n(631),t=n.n(e);const r=(e,t,n)=>{const r=e.path.split("?")[0].replace(/^\/+|\/+$/g,"");return Object.values(t).find((e=>r===e))?n(e):e},s=e=>{t().use(((t,n)=>void 0!==t.url||void 0===window.pllFilteredRoutes?n(t):n(r(t,window.pllFilteredRoutes,e))))};var l=n(987),o=n(172),a=n(419);const i="pll/metabox",c={languages:[],selectedLanguage:{},translatedPosts:{},fromPost:null,currentTemplatePart:{}};const u=()=>new Promise((function(e){const t=(0,l.subscribe)((function(){const n=(0,l.select)(i)?.getLanguages();n?.size>0&&(t(),e(n))}))}));function p(e,t){const n=(0,o.hasQueryArg)(e.path,"lang");((0,a.isUndefined)(e.filterLang)||e.filterLang)&&!n&&(e.path=(0,o.addQueryArgs)(e.path,{lang:t}))}var g=n(75),d=n(897),f=n(873),h=n(601),_=n(89),m=n(959),x=n(933),v=n(848);const y=void 0!==wp.primitives?(0,v.jsx)(x.SVG,{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,v.jsx)(x.Path,{d:"M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z"})}):"translation";const w=function({language:e}){return(0,a.isNil)(e)?(0,v.jsx)("span",{className:"pll-translation-icon",children:y}):(0,a.isEmpty)(e.flag_url)?(0,v.jsxs)("abbr",{children:[e.slug,(0,v.jsx)("span",{className:"screen-reader-text",children:e.name})]}):(0,v.jsx)("span",{className:"pll-select-flag",children:(0,v.jsx)("img",{src:e.flag_url,alt:e.name,title:e.name,className:"flag"})})};function P({handleChange:e,languages:t,selectedLanguage:n=null,defaultValue:r=""}){const s=n?.slug?n.slug:r,l=(0,h.useMemo)((()=>Array.from(t.values()).map((({slug:e,name:t})=>({value:e,label:t})))),[t]);return(0,v.jsxs)("div",{id:"pll-language-select-control",children:[(0,v.jsx)(w,{language:n}),(0,v.jsx)(m.SelectControl,{value:s,onChange:t=>e(t),options:l,id:"pll_post_lang_choice",name:"pll_post_lang_choice",className:"post_lang_choice",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})}const b={setLanguages:e=>({type:"SET_LANGUAGES",languages:e}),setFromPost:e=>({type:"SET_FROM_POST",fromPost:e}),fetchFromAPI:e=>({type:"FETCH_FROM_API",options:e})},j=(0,l.createReduxStore)(i,{reducer(e=c,t){switch(t.type){case"SET_LANGUAGES":return{...e,languages:t.languages};case"SET_FROM_POST":return{...e,fromPost:t.fromPost};case"SET_CURRENT_TEMPLATE_PART":return{...e,currentTemplatePart:t.currentTemplatePart};default:return e}},selectors:{getLanguages:e=>e.languages,getFromPost:e=>e.fromPost},actions:b,controls:{FETCH_FROM_API:e=>t()({...e.options})},resolvers:{*getLanguages(){const e=yield b.fetchFromAPI({path:"/pll/v1/languages",filterLang:!1});return b.setLanguages(function(e,t){const n=new Map;return e.reduce((function(e,n){return e.set(n[t],n),e}),n),n}(e,"slug"))}}});(0,l.register)(j);const E={type:"string",default:"every"};(0,f.addFilter)("blocks.registerBlockType","pll/lang-choice",(function(e,t){return["core/widget-area","core/legacy-widget"].find((e=>e===t))||(e.attributes=(0,a.assign)(e.attributes,{pll_lang:E})),e}));const T=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,l.select)(i).getLanguages(),{pll_lang:r}=t.attributes,s=!(0,a.isNil)(r),o=n.get(r),c=n.set("",{slug:"every",name:(0,g.__)("All languages","polylang-pro")}),u=((e,t)=>(0,l.useSelect)((n=>!!t&&0===n(_.store).getBlockParents(e).filter((e=>{const t=n(_.store).getBlock(e);return t&&"core/widget-area"!==t.name})).length),[e,t]))(t.clientId,s);return(0,v.jsxs)(h.Fragment,{children:[(0,v.jsx)(e,{...t}),u&&(0,v.jsx)(_.InspectorControls,{children:(0,v.jsxs)(m.PanelBody,{title:(0,g.__)("Languages","polylang-pro"),children:[(0,v.jsx)("label",{htmlFor:"pll_post_lang_choice",children:(0,g.__)("The block is displayed for:","polylang-pro")}),(0,v.jsx)(P,{selectedLanguage:o,handleChange:e=>{t.setAttributes({pll_lang:e})},defaultValue:E.default,languages:c})]})})]})}),"withInspectorControl");u().then((function(){(0,f.addFilter)("editor.BlockEdit","pll/lang-choice-with-inspector-controls",T)})),s((function(e){return"undefined"!=typeof pll_block_editor_plugin_settings&&p(e,pll_block_editor_plugin_settings.lang.slug),e}))})(),this["polylang-pro"]={}})(); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/integrations/acf.js b/wp-content/plugins/polylang-pro/js/build/integrations/acf.js new file mode 100644 index 0000000..91c15a6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/integrations/acf.js @@ -0,0 +1,309 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 631 +(module) { + +module.exports = (function() { return this["wp"]["apiFetch"]; }()); + +/***/ } + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. +(() => { +"use strict"; + +// EXTERNAL MODULE: external {"this":["wp","apiFetch"]} +var external_this_wp_apiFetch_ = __webpack_require__(631); +var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_); +;// ./src/integrations/ACF/js/lib/object.js +/** + * Gets the keys of existing relational ACF fields in the DOM (`relationship`, `post_object` and `taxonomy`). + * + * @return {[]} An array of relational fields. + */ +function getRelationalFieldKeys() { + const fields = []; + + // Adds relationship, post object and taxonomy fields to the fields to be refreshed. + document.querySelectorAll('.acf-field-relationship, .acf-field-post-object, .acf-field-taxonomy').forEach(function (relationshipField) { + const field = relationshipField.getAttribute('data-key'); + fields.push(field); + }); + return fields; +} + +/** + * Updates the ACF field with the content translated into the new language selected in the switcher. + * + * @param {Object} fieldData ACF field data fetched using AJAX (key and content). + */ +function reloadField(fieldData) { + // Data comes from ACF field and server side. + const field = document.querySelector('.acf-' + fieldData.field_key); + field.outerHTML = fieldData.field_data; + + /** + * Triggers the action once the field has been refreshed, + * so that the actions hooked previously are re-launched on the newly refreshed field. + */ + acf.do_action('ready_field/type=' + field.getAttribute('data-type'), field); +} + +/** + * Refreshes `relationship` relational fields. + * We need to reload the choices list for relationship fields (otherwise it remains empty). + * + * @param {Array} relationshipFields The `relationship` fields. + */ +function refreshRelationShipFields(relationshipFields) { + relationshipFields.forEach(function (field) { + field.fetch(); + }); +} + +/** + * Gets the `post_object` and `relationship` relational fields. + * In addition, `acf.getFields` reloads the list of posts in `post_object` fields. + * + * @return {{postObject, relationShip}} `post_object` and `relationship` relational fields. + */ +function getRelationalFields() { + const relationshipFields = acf.getFields({ + type: 'relationship' + }); + + // Reloads the posts list in `post_object` fields. + const postObjectFields = acf.getFields({ + type: 'post_object' + }); + return { + relationShip: relationshipFields, + postObject: postObjectFields + }; +} +;// ./src/integrations/ACF/js/lib/post.js +/** + * WordPress dependencies. + */ + + +/** + * Internal dependencies + */ + + +/** + * Refreshes relational fields when switching languages on a post. + * + * @param {CustomEvent} e The event. + */ +function onPostLangChoice(e) { + const fieldKeys = getRelationalFieldKeys(); + if (0 === fieldKeys.length) { + return; + } + const postId = document.getElementById('post_ID').getAttribute('value'); + let nonce = document.querySelector('#_pll_nonce')?.value; // Classic editor. + if (undefined === nonce) { + // Block editor. + nonce = pll_block_editor_plugin_settings.nonce; + } + const data = new FormData(); + data.set('action', 'acf_post_lang_choice'); + data.set('lang', encodeURI(e.detail.lang.slug)); + data.set('fields', fieldKeys); + data.set('post_id', postId); + data.set('_pll_nonce', nonce); + external_this_wp_apiFetch_default()({ + url: ajaxurl, + method: 'POST', + body: data + }).then(response => { + response.fields.forEach(function (res) { + reloadField(res); + }); + const fields = getRelationalFields(); + refreshRelationShipFields(fields.relationShip); + }); +} +;// ./src/integrations/ACF/js/lib/term.js +/** + * WordPress dependencies. + */ + + +/** + * Internal dependencies + */ + + +/** + * Returns the selected language slug. + * + * @return {string} The selected language slug. + */ +function getSelectedLanguageSlug() { + const selectLang = document.querySelector('#term_lang_choice'); + return JSON.parse(selectLang.options.item(selectLang.selectedIndex).getAttribute('data-lang')).slug; +} + +/** + * Refreshes relational fields according to the selected language in the term creation page. + */ +function onTermCreationPageLoad() { + /* global adminpage */ + if ('edit-tags-php' === adminpage) { + /** + * When we're on a term creation page, we don't have a current language, so relational fields are loaded in all languages. + * We need to add the language slug fetched from the language selector to the AJAX request + * to load the relational field with the correct current language. + */ + acf.addFilter('relationship_ajax_data', function (param) { + param.lang = getSelectedLanguageSlug(); + return param; + }); + acf.addFilter('select2_ajax_data', function (param) { + // Post object. + param.lang = getSelectedLanguageSlug(); + return param; + }); + } +} + +/** + * Refreshes relational fields when switching languages on a term. + * + * @param {CustomEvent} e The event. + */ +function onTermLangChoice(e) { + const fieldKeys = getRelationalFieldKeys(); + if (0 === fieldKeys.length) { + return; + } + const termID = document.querySelector("input[name='tag_ID']") ? document.querySelector("input[name='tag_ID']").value : '0'; + let nonce = document.querySelector('#_pll_nonce')?.value; // Classic editor. + if (undefined === nonce) { + // Block editor. + nonce = pll_block_editor_plugin_settings.nonce; + } + const taxonomy = new URLSearchParams(wp.sanitize.stripTags(window.location.search) // phpcs:ignore WordPressVIPMinimum.JS.Window.location + ).get('taxonomy'); + const data = new FormData(); + data.set('action', 'acf_term_lang_choice'); + data.set('lang', encodeURI(e.detail.lang.slug)); + data.set('fields', fieldKeys); + data.set('term_id', termID); + data.set('_pll_nonce', nonce); + data.set('taxonomy', taxonomy); + external_this_wp_apiFetch_default()({ + url: ajaxurl, + method: 'POST', + body: data + }).then(response => { + response.fields.forEach(function (res) { + reloadField(res); + }); + const fields = getRelationalFields(); + if (fields.relationShip) { + /** + * Since the language is not saved when switching languages on a term, we need to add this `lang` parameter + * to the AJAX request to load the relational field with the correct current language. + */ + acf.addFilter('relationship_ajax_data', function (param) { + param.lang = response.lang; + return param; + }); + } + if (fields.postObject) { + /** + * Since the language is not saved when switching languages on a term, we need to add this `lang` parameter + * to the AJAX request to load the relational field with the correct current language. + */ + acf.addFilter('select2_ajax_data', function (param) { + param.lang = response.lang; + return param; + }); + } + refreshRelationShipFields(fields.relationShip); + }); +} +;// ./src/integrations/ACF/js/index.js +/** + * Internal dependencies. + */ + + + +/** + * Posts. + */ +document.addEventListener('onPostLangChoice', onPostLangChoice); + +/** + * Terms. + */ +document.addEventListener('DOMContentLoaded', onTermCreationPageLoad); +document.addEventListener('onTermLangChoice', onTermLangChoice); +})(); + +this["polylang-pro"] = __webpack_exports__; +/******/ })() +; \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/integrations/acf.min.js b/wp-content/plugins/polylang-pro/js/build/integrations/acf.min.js new file mode 100644 index 0000000..126064f --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/integrations/acf.min.js @@ -0,0 +1 @@ +(()=>{var t={631(t){t.exports=function(){return this.wp.apiFetch}()}},e={};function n(o){var a=e[o];if(void 0!==a)return a.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);(()=>{"use strict";var t=n(631),e=n.n(t);function o(){const t=[];return document.querySelectorAll(".acf-field-relationship, .acf-field-post-object, .acf-field-taxonomy").forEach((function(e){const n=e.getAttribute("data-key");t.push(n)})),t}function a(t){const e=document.querySelector(".acf-"+t.field_key);e.outerHTML=t.field_data,acf.do_action("ready_field/type="+e.getAttribute("data-type"),e)}function r(t){t.forEach((function(t){t.fetch()}))}function c(){return{relationShip:acf.getFields({type:"relationship"}),postObject:acf.getFields({type:"post_object"})}}function i(){const t=document.querySelector("#term_lang_choice");return JSON.parse(t.options.item(t.selectedIndex).getAttribute("data-lang")).slug}document.addEventListener("onPostLangChoice",(function(t){const n=o();if(0===n.length)return;const i=document.getElementById("post_ID").getAttribute("value");let l=document.querySelector("#_pll_nonce")?.value;void 0===l&&(l=pll_block_editor_plugin_settings.nonce);const d=new FormData;d.set("action","acf_post_lang_choice"),d.set("lang",encodeURI(t.detail.lang.slug)),d.set("fields",n),d.set("post_id",i),d.set("_pll_nonce",l),e()({url:ajaxurl,method:"POST",body:d}).then((t=>{t.fields.forEach((function(t){a(t)}));r(c().relationShip)}))})),document.addEventListener("DOMContentLoaded",(function(){"edit-tags-php"===adminpage&&(acf.addFilter("relationship_ajax_data",(function(t){return t.lang=i(),t})),acf.addFilter("select2_ajax_data",(function(t){return t.lang=i(),t})))})),document.addEventListener("onTermLangChoice",(function(t){const n=o();if(0===n.length)return;const i=document.querySelector("input[name='tag_ID']")?document.querySelector("input[name='tag_ID']").value:"0";let l=document.querySelector("#_pll_nonce")?.value;void 0===l&&(l=pll_block_editor_plugin_settings.nonce);const d=new URLSearchParams(wp.sanitize.stripTags(window.location.search)).get("taxonomy"),u=new FormData;u.set("action","acf_term_lang_choice"),u.set("lang",encodeURI(t.detail.lang.slug)),u.set("fields",n),u.set("term_id",i),u.set("_pll_nonce",l),u.set("taxonomy",d),e()({url:ajaxurl,method:"POST",body:u}).then((t=>{t.fields.forEach((function(t){a(t)}));const e=c();e.relationShip&&acf.addFilter("relationship_ajax_data",(function(e){return e.lang=t.lang,e})),e.postObject&&acf.addFilter("select2_ajax_data",(function(e){return e.lang=t.lang,e})),r(e.relationShip)}))}))})(),this["polylang-pro"]={}})(); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/languages-step.js b/wp-content/plugins/polylang-pro/js/build/languages-step.js new file mode 100644 index 0000000..8077fa9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/languages-step.js @@ -0,0 +1,303 @@ +/** + * @package Polylang + */ + +jQuery( + function ( $ ) { + var addLanguageForm = $( '.languages-step' ); // Form element. + var languageFields = $( '#language-fields' ); // Element where to append hidden fields for creating language. + var languagesTable = $( '#languages' ); // Table element contains languages list to create. + var languagesListTable = $( '#languages tbody' ); // Table rows with languages list to create. + var definedLanguagesListTable = $( '#defined-languages tbody' ); // Table rows with already defined languages list. + var languagesList = $( '#lang_list' ); // Select form element with predefined languages without already created languages. + var nextStepButton = $( '[name="save_step"]' ); // The button for continuing to the next step. + var messagesContainer = $( '#messages' ); // Element where to display error messages. + var languagesMap = new Map(); // Languages map object for managing the languages to create. + var dialog = $( '#dialog' ); // Dialog box for alerting the language selected has not been added to the list. + + /** + * Add a language in the list to create it in Polylang settings + * + * @param {object} language The language object + */ + function addLanguage( language ) { + // language properties come from the select dropdown which is built server side and well escaped. + // see template view-wizard-step-languages.php. + var languageValueHtml = $( '' ).text( language.text ).prepend( language.flagUrl ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend + var languageTrashIconHtml = $( '' ) + .append( // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + $( '' ) + .addClass( 'dashicons dashicons-trash' ) + .attr( 'data-language', language.locale ) + .append( // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + $( '' ) + .addClass( 'screen-reader-text' ) + .text( pll_wizard_params.i18n_remove_language_icon ) + ) + ); + // see the comment and the hardcoded code above. languageTrashIconHtml and languageValueHtml are safe. + var languageLineHtml = $( '' ).prepend( languageTrashIconHtml ).prepend( languageValueHtml ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend + var languageFieldHtml = $( '' ).attr( + { + type: 'hidden', + name: 'languages[]' + } + ).val( language.locale ); + + languagesList.val( '' ); + languagesList.selectmenu( 'refresh' ); // Refresh jQuery selectmenu widget after changing the value. + + languagesMap.set( language.locale, language ); + + // see above how languageLineHtml is built. + languagesListTable.append( languageLineHtml ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + // Bind click event on trash icon. + languagesListTable.on( + 'click', + 'span[data-language=' + language.locale + ']', + function ( event ) { + event.preventDefault(); + // Remove line in languages table. + $( this ).parents( 'tr' ).remove(); + // Remove input field. + var languageField = languageFields.children( 'input[value=' + $( this ).data( 'language' ) + ']' ).remove(); + // If there is no more languages hide languages table. + if ( languagesListTable.children().length <= 0 ) { + languagesTable.hide(); + } + // Remove language from the Map. + languagesMap.delete( $( this ).data( 'language' ) ); + // Hide error message. + hideError(); + } + ); + // see above how languageFieldHtml is built. + // Add hidden input field for posting the form. + languageFields.append( languageFieldHtml ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + + } + + /** + * Display an error message + * + * @param {string} message The message to display + */ + function showError( message ) { + messagesContainer.empty(); + // html is hardcoded and use of jQuery text method which is safe to add message value. + // In addition message is i18n value which is initialized server side in PLL_Wizard::add_step_languages and correctly escaped. + messagesContainer.prepend( $( '

' ).addClass( 'error' ).text( message ) ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend + } + + /** + * Hide all error messages and fields in error + */ + function hideError() { + messagesContainer.empty(); + addLanguageForm.find( '.error' ).removeClass( 'error field-in-error' ); + } + + /** + * Style the field to indicate where the error is + * + * @param {object} field The jQuery element which is in error + */ + function showFieldInError( field ) { + field.addClass( 'error field-in-error' ); + } + + /** + * Focus on a specific element + * + * @param {object} field The jQuery element which will be focused + */ + function focusOnField( field ) { + field.trigger( 'focus' ); + } + + /** + * Disable a specific button + * + * @param {object} button + */ + function disableButton( button ){ + button.prop( 'disabled', true ); + // Because the button is disabled we need to add the value of the button to ensure it will pass in the request. + addLanguageForm.append( // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + $( '' ).prop( + { + type: 'hidden', + name: button.prop( 'name' ), + value: button.prop( 'value' ) + } + ) + ); + } + + /** + * Remove error when a new selection is done in languages list. + */ + languagesList.on( + 'selectmenuchange', + function () { + hideError();; + } + ); + /** + * Bind click event on "Add language" button + */ + $( '#add-language' ).on( + 'click', + function ( event ) { + hideError(); + var selectedOption = event.currentTarget.form.lang_list.options[event.currentTarget.form.lang_list.selectedIndex]; + if ( '' !== selectedOption.value && ! languagesMap.has( selectedOption.value ) ) { + addLanguage( + { + locale: selectedOption.value, + text: selectedOption.innerText, + name: $( selectedOption ).data( 'language-name' ), + flagUrl: $( selectedOption ).data( 'flag-html' ) + } + ); + // Show table of languages. + languagesTable.show(); + // Put back the focus on the select language field after clicking on "Add language button". + focusOnField( $( '#lang_list-button' ) ); + } else { + var message = pll_wizard_params.i18n_no_language_selected; + if ( languagesMap.has( selectedOption.value ) ) { + message = pll_wizard_params.i18n_language_already_added; + } + showError( message ); + showFieldInError( languagesList.next( 'span.ui-selectmenu-button' ) ); + focusOnField( $( '#lang_list-button' ) ); + + } + } + ); + + /** + * Bind submit event on "add_lang" form + */ + addLanguageForm.on( + 'submit', + function ( event ) { + // Verify if there is at least one language. + var isLanguagesAlreadyDefined = definedLanguagesListTable.children().length > 0; + var selectedLanguage = $( '#lang_list' ).val(); + if ( languagesMap.size <= 0 && ! isLanguagesAlreadyDefined ) { + if ( '' === selectedLanguage ) { + showError( pll_wizard_params.i18n_no_language_added ); + showFieldInError( languagesList.next( 'span.ui-selectmenu-button' ) ); + focusOnField( $( '#lang_list-button' ) ); + } else { + showError( pll_wizard_params.i18n_add_language_needed ); + showFieldInError( languagesList.next( 'span.ui-selectmenu-button' ) ); + focusOnField( $( '#add-language' ) ); // Put the focus on the "Add language" button. + } + return false; + } + // Verify if the language has been added in the list otherwise display a dialog box to confirm what to do. + if ( '' !== selectedLanguage ) { + // Verify we don't add a duplicate language before opening the dialog box otherwise display an error message. + if ( ! languagesMap.has( selectedLanguage ) ) { + dialog.dialog( 'open' ); + } else { + showError( pll_wizard_params.i18n_language_already_added ); + showFieldInError( languagesList.next( 'span.ui-selectmenu-button' ) ); + focusOnField( $( '#lang_list-button' ) ); + } + return false; + } + disableButton( nextStepButton ); + } + ); + + // Is there an error return by PHP ? + var searchParams = new URLSearchParams( document.location.search ); + if ( searchParams.has( 'activate_error' ) ) { + // If the error code exists, display it. + if ( undefined !== pll_wizard_params[ searchParams.get( 'activate_error' ) ] ) { + showError( pll_wizard_params[ searchParams.get( 'activate_error' ) ] ); + } + } + + function confirmDialog( what ) { + switch ( what ) { + case 'yes': + var selectedOption = $( '#lang_list' ).children( ':selected' ); + addLanguage( + { + locale: selectedOption[0].value, + text: selectedOption[0].innerText, + name: $( selectedOption ).data( 'language-name' ), + flagUrl: $( selectedOption ).data( 'flag-html' ) + } + ); + break; + case 'no': + // Empty select form field and submit again the form. + languagesList.val( '' ); + break; + case 'ignore': + } + dialog.dialog( 'close' ); + if ( 'ignore' === what ) { + focusOnField( $( '#lang_list-button' ) ); + } else { + addLanguageForm.submit(); + } + } + + // Initialize dialog box in the case a language is selected but not added in the list. + dialog.dialog( + { + autoOpen: false, + modal: true, + draggable: false, + resizable: false, + title: pll_wizard_params.i18n_dialog_title, + minWidth: 600, + maxWidth: '100%', + open: function ( event, ui ) { + // Change dialog box position for rtl language + if ( $( 'body' ).hasClass( 'rtl' ) ) { + $( this ).parent().css( + { + right: $( this ).parent().css( 'left' ), + left: 'auto' + } + ); + } + // Display language name and flag information in dialog box. + $( this ).find( '#dialog-language' ).text( $( '#lang_list' ).children( ':selected' ).first().text() ); + // language properties come from the select dropdown #lang_list which is built server side and well escaped. + // see template view-wizard-step-languages.php. + $( this ).find( '#dialog-language-flag' ).empty().prepend( $( '#lang_list' ).children( ':selected' ).data( 'flag-html' ) ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend + }, + buttons: [ + { + text: pll_wizard_params.i18n_dialog_yes_button, + click: function ( event ) { + confirmDialog( 'yes' ); + } + }, + { + text: pll_wizard_params.i18n_dialog_no_button, + click: function ( event ) { + confirmDialog( 'no' ); + } + }, + { + text: pll_wizard_params.i18n_dialog_ignore_button, + click: function ( event ) { + confirmDialog( 'ignore' ); + } + } + ] + } + ) + } +); + diff --git a/wp-content/plugins/polylang-pro/js/build/languages-step.min.js b/wp-content/plugins/polylang-pro/js/build/languages-step.min.js new file mode 100644 index 0000000..64ce94e --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/languages-step.min.js @@ -0,0 +1 @@ +jQuery((function(a){var e=a(".languages-step"),n=a("#language-fields"),t=a("#languages"),l=a("#languages tbody"),i=a("#defined-languages tbody"),r=a("#lang_list"),d=a('[name="save_step"]'),s=a("#messages"),o=new Map,g=a("#dialog");function u(e){var i=a("").text(e.text).prepend(e.flagUrl),d=a("").append(a("").addClass("dashicons dashicons-trash").attr("data-language",e.locale).append(a("").addClass("screen-reader-text").text(pll_wizard_params.i18n_remove_language_icon))),s=a("").prepend(d).prepend(i),g=a("").attr({type:"hidden",name:"languages[]"}).val(e.locale);r.val(""),r.selectmenu("refresh"),o.set(e.locale,e),l.append(s),l.on("click","span[data-language="+e.locale+"]",(function(e){e.preventDefault(),a(this).parents("tr").remove();n.children("input[value="+a(this).data("language")+"]").remove();l.children().length<=0&&t.hide(),o.delete(a(this).data("language")),c()})),n.append(g)}function p(e){s.empty(),s.prepend(a("

").addClass("error").text(e))}function c(){s.empty(),e.find(".error").removeClass("error field-in-error")}function _(a){a.addClass("error field-in-error")}function m(a){a.trigger("focus")}r.on("selectmenuchange",(function(){c()})),a("#add-language").on("click",(function(e){c();var n=e.currentTarget.form.lang_list.options[e.currentTarget.form.lang_list.selectedIndex];if(""===n.value||o.has(n.value)){var l=pll_wizard_params.i18n_no_language_selected;o.has(n.value)&&(l=pll_wizard_params.i18n_language_already_added),p(l),_(r.next("span.ui-selectmenu-button")),m(a("#lang_list-button"))}else u({locale:n.value,text:n.innerText,name:a(n).data("language-name"),flagUrl:a(n).data("flag-html")}),t.show(),m(a("#lang_list-button"))})),e.on("submit",(function(n){var t,l=i.children().length>0,s=a("#lang_list").val();return o.size<=0&&!l?(""===s?(p(pll_wizard_params.i18n_no_language_added),_(r.next("span.ui-selectmenu-button")),m(a("#lang_list-button"))):(p(pll_wizard_params.i18n_add_language_needed),_(r.next("span.ui-selectmenu-button")),m(a("#add-language"))),!1):""!==s?(o.has(s)?(p(pll_wizard_params.i18n_language_already_added),_(r.next("span.ui-selectmenu-button")),m(a("#lang_list-button"))):g.dialog("open"),!1):((t=d).prop("disabled",!0),void e.append(a("").prop({type:"hidden",name:t.prop("name"),value:t.prop("value")})))}));var f=new URLSearchParams(document.location.search);function h(n){switch(n){case"yes":var t=a("#lang_list").children(":selected");u({locale:t[0].value,text:t[0].innerText,name:a(t).data("language-name"),flagUrl:a(t).data("flag-html")});break;case"no":r.val("")}g.dialog("close"),"ignore"===n?m(a("#lang_list-button")):e.submit()}f.has("activate_error")&&void 0!==pll_wizard_params[f.get("activate_error")]&&p(pll_wizard_params[f.get("activate_error")]),g.dialog({autoOpen:!1,modal:!0,draggable:!1,resizable:!1,title:pll_wizard_params.i18n_dialog_title,minWidth:600,maxWidth:"100%",open:function(e,n){a("body").hasClass("rtl")&&a(this).parent().css({right:a(this).parent().css("left"),left:"auto"}),a(this).find("#dialog-language").text(a("#lang_list").children(":selected").first().text()),a(this).find("#dialog-language-flag").empty().prepend(a("#lang_list").children(":selected").data("flag-html"))},buttons:[{text:pll_wizard_params.i18n_dialog_yes_button,click:function(a){h("yes")}},{text:pll_wizard_params.i18n_dialog_no_button,click:function(a){h("no")}},{text:pll_wizard_params.i18n_dialog_ignore_button,click:function(a){h("ignore")}}]})})); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/machine-translation-settings.js b/wp-content/plugins/polylang-pro/js/build/machine-translation-settings.js new file mode 100644 index 0000000..48d1f9a --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/machine-translation-settings.js @@ -0,0 +1,436 @@ +/** + * @package Polylang-Pro + */ + +const { addAction } = wp.hooks; + +const pllMachineTranslation = { + /** + * Init. + */ + init: () => { + if ( document.readyState !== 'loading' ) { + pllMachineTranslation.ajaxButton.attachEvent(); + pllMachineTranslation.dataUsage.fetchData(); + pllMachineTranslation.glossaries.init(); + } else { + document.addEventListener( 'DOMContentLoaded', pllMachineTranslation.ajaxButton.attachEvent ); + document.addEventListener( 'DOMContentLoaded', pllMachineTranslation.dataUsage.fetchData ); + document.addEventListener( 'DOMContentLoaded', pllMachineTranslation.glossaries.init ); + } + addAction( 'pll_settings_saved', 'polylang-pro', pllMachineTranslation.saveSettings.highlightRow ); + addAction( 'pll_settings_saved', 'polylang-pro', pllMachineTranslation.dataUsage.fetchData ); + addAction( 'pll_settings_saved', 'polylang-pro', pllMachineTranslation.glossaries.fetchDataOnSave ); + }, + + /** + * Resets a field's row. + * + * @param {HTMLElement} fieldRow Field's row. + */ + resetFieldRow: ( fieldRow ) => { + fieldRow.querySelectorAll( '.pll-message-shown' ).forEach( ( el ) => { + el.classList.remove( 'pll-message-shown' ); + } ); + fieldRow.classList.remove( 'notice-success', 'notice-warning', 'notice-error', 'notice-alt' ); + fieldRow.querySelectorAll( '.pll-error-message-text' ).forEach( ( el ) => { + el.textContent = ''; + } ); + }, + + /** + * Displays an error message under the field by adding HTML classes. + * + * @param {HTMLElement} fieldRow Field's row. + * @param {String} messageClass HTML class of the error message to display. + * @param {String} type Type of the error: `'error'` or `'warning'`. + */ + displayErrorMessage: ( fieldRow, messageClass, type = 'error' ) => { + if ( messageClass ) { + fieldRow.querySelectorAll( '.' + messageClass ).forEach( ( el ) => { + el.classList.add( 'pll-message-shown' ); + } ); + } + fieldRow.classList.add( 'notice-' + type, 'notice-alt' ); + }, + + ajaxButton: { + /** + * Attaches an event to `.pll-ajax-button` buttons to trigger AJAX requests. + */ + attachEvent: () => { + document.querySelectorAll( '.pll-ajax-button' ).forEach( ( el ) => { + el.addEventListener( 'click', ( event ) => { + const button = event.target; + const action = button.getAttribute( 'data-action' ); + const nonce = button.getAttribute( 'data-nonce' ); + const fieldRow = button.closest( 'tr' ); + const errorElms = fieldRow.querySelectorAll( '.pll-error-message-text' ); + + if ( ! action || ! nonce || ! fieldRow || ! errorElms.length || button.getAttribute( 'disabled' ) ) { + return; + } + + const urlParams = { 'action': action, '_pll_nonce': nonce, 'pll_ajax_settings': 1 }; + fieldRow.querySelectorAll( '[data-name]' ).forEach( ( el ) => { + urlParams[ el.getAttribute( 'data-name' ) ] = el.value; + } ); + const url = wp.url.addQueryArgs( ajaxurl, urlParams ); + + button.setAttribute( 'disabled', 'disabled' ); + pllMachineTranslation.resetFieldRow( fieldRow ); + + fetch( url ).then( ( response ) => { + return response.json(); + } ).then( ( json ) => { + button.removeAttribute( 'disabled' ); + + if ( json.success ) { + fieldRow.classList.add( 'notice-success', 'notice-alt' ); + } else { + errorElms[0].textContent = json.data && json.data.message ? json.data.message : ''; + pllMachineTranslation.displayErrorMessage( fieldRow, json.data ? json.data.message_class : '' ); + } + } ).catch( () => { + button.removeAttribute( 'disabled' ); + fieldRow.classList.add( 'notice-error', 'notice-alt' ); + } ); + } ); + } ); + } + }, + + saveSettings: { + /** + * Highlights a settings row in case of error when the settings are saved. + * Hooked to `'pll_settings_saved'`. + * + * @param {Object} response The response from the AJAX call. + * @param {HTMLElement} tr The HTML element containing the module's fields. + */ + highlightRow: ( response, tr ) => { + switch ( response.what ) { + case 'success': + tr.querySelectorAll( '.notice-alt, .pll-message-shown' ).forEach( ( el ) => { + el.classList.remove( 'notice-success', 'notice-warning', 'notice-error', 'notice-alt', 'pll-message-shown' ); + } ); + break; + + case 'error': + const noticeData = pllMachineTranslation.saveSettings.getNoticeData( response.data ); + + if ( ! noticeData.fieldId ) { + break; + } + + const field = document.getElementById( noticeData.fieldId ); + + if ( ! field ) { + break; + } + + const fieldRow = field.closest( 'tr' ); + + if ( ! fieldRow ) { + break; + } + + pllMachineTranslation.resetFieldRow( fieldRow ); + pllMachineTranslation.displayErrorMessage( fieldRow, noticeData.messageClass, noticeData.type ); + break; + } + }, + + /** + * Returns the data contained in the HTML classes of the given element. + * + * @param {String} htmlString HTML string. + * @returns {Object} + */ + getNoticeData: ( htmlString ) => { + const div = document.createElement( 'div' ); + div.innerHTML = htmlString.trim(); // phpcs:ignore WordPressVIPMinimum.JS.InnerHTML.Found + return { + type: pllMachineTranslation.saveSettings.find( div.firstChild.className, 'notice-(success|warning|error)', 'error' ), + fieldId: pllMachineTranslation.saveSettings.find( div.firstChild.className, 'pll-field-id-([^\\s]+)', '' ), // See `Settings\Deepl::is_api_key_valid()` and `Module_Settings::update()`. + messageClass: pllMachineTranslation.saveSettings.find( div.firstChild.className, 'pll-message-class-([^\\s]+)', '' ) // See `Settings\Deepl::is_api_key_valid()` and `Module_Settings::update()`. + }; + }, + + /** + * Returns the part of the given string matching the given pattern. + * + * @param {String} string A string. + * @param {String} pattern A regex pattern. + * @param {String} def String to return if nothing is found. + * @returns {String} + */ + find: ( string, pattern, def ) => { + const matches = ( ' ' + string + ' ' ).match( new RegExp( '\\s' + pattern + '\\s' ) ); + return matches && matches[1] ? matches[1] : def; + } + }, + + dataUsage: { + fetchData: () => { + document + .querySelectorAll( '.pll-progress-bar-wrapper' ) + .forEach( ( el ) => { + const action = el.getAttribute( 'data-action' ); + const nonce = el.getAttribute( 'data-nonce' ); + const progress = el.querySelectorAll( 'div' ).item( 0 ); + const dataUsageRow = el.closest( 'tr' ); + + if ( + ! action || + ! nonce || + ! progress || + ! dataUsageRow || + ! el.parentElement + ) { + return; + } + const description = el.parentElement + .querySelectorAll( '.description' ) + .item( 0 ); + if ( ! description ) { + return; + } + + // Reset the progress bar. + progress.style.width = '0%'; + progress.textContent = ''; + + let spinner = el.querySelectorAll( '.spinner' ).item( 0 ); + + // If the spinner no longer exists (replaced by text), recreate it. + if ( ! spinner ) { + spinner = document.createElement( 'span' ); + spinner.className = 'spinner pll-spinner-inline'; + // Delete the existing text (percentage) and add the spinner. + el.innerHTML = ''; + el.appendChild( spinner ); + el.appendChild( progress ); + } else { + // Display the spinner while loading. + spinner.style.visibility = 'visible'; + } + + const apiKey = document + .getElementById( 'pll-deepl-api-key' ) + .value.trim(); + if ( '' === apiKey ) { + // Do not display the row and do not make the AJAX call if the API key is empty. + dataUsageRow.style.display = 'none'; + return; + } + + // Show the data usage row and the progress bar (in case it was hidden before). + el.style.display = ''; + dataUsageRow.style.display = ''; + + const urlParams = { + action, + _pll_nonce: nonce, + pll_ajax_settings: 1, + }; + const url = wp.url.addQueryArgs( ajaxurl, urlParams ); + + fetch( url ) + .then( ( response ) => { + return response.json(); + } ) + .then( ( json ) => { + if ( ! json.success || ! json.data.percent ) { + // No data - show the message but keep the row visible. + el.style.display = 'none'; + description.textContent = json.data.message; + return; + } + + // Display a graphic. + el.replaceChild( + document.createTextNode( + json.data.percent_formatted + ), + spinner + ); + progress.textContent = json.data.percent_formatted; + progress.style.width = json.data.percent; + description.textContent = json.data.message; + } ) + .catch( () => { + dataUsageRow.remove(); + } ); + } ); + }, + }, + + glossaries: { + /** + * Init. + */ + init: () => { + const elems = pllMachineTranslation.glossaries.getElements(); + + if ( ! elems.action ) { + // Should not happen. + return; + } + + // On page load, refresh the `` tag. + elems.apiKeyInput.addEventListener( 'blur', () => { + const newApiKey = elems.apiKeyInput.value.trim(); + if ( newApiKey === elems.apiKey ) { + // The API key hasn't changed. + return; + } + elems.apiKey = newApiKey; + elems.hasNewApiKey = true; + pllMachineTranslation.glossaries.fetchData( elems ); + } ); + }, + + /** + * Refreshes the `` tag. + * + * @param {Object} elems An object containing data from the form. + * @param {HTMLElement} elems.glossaryInput The glossary selector. + * @param {string} elems.action The AJAX action. + * @param {string} elems.nonce The nonce for the AJAX request. + * @param {HTMLElement} elems.apiKeyInput The API key input. + * @param {string} elems.apiKey The API key. + * @param {boolean} [elems.hasNewApiKey=false] Optional. Tells if the given API key must be sent in the AJAX request. Default is `false`. + */ + fetchData: ( elems ) => { + if ( elems.hasNewApiKey && '' === elems.apiKey ) { + // No need to request the API. + pllMachineTranslation.glossaries.removeOptions( + elems.glossaryInput + ); + return; + } + + elems.glossaryInput.setAttribute( 'disabled', 'disabled' ); + + const urlParams = { + action: elems.action, + _pll_nonce: elems.nonce, + pll_ajax_settings: 1, + }; + if ( elems.hasNewApiKey ) { + urlParams.api_key = elems.apiKey; + } + const url = wp.url.addQueryArgs( ajaxurl, urlParams ); + + fetch( url ) + .then( ( response ) => { + return response.json(); + } ) + .then( ( json ) => { + // First, empty the selector. + pllMachineTranslation.glossaries.removeOptions( + elems.glossaryInput + ); + + if ( ! json.success || ! json.data.glossaries ) { + // `json.success` being `false` may mean the API key is invalid. + elems.glossaryInput.removeAttribute( 'disabled' ); + return; + } + + // Insert new choices. + Object.entries( json.data.glossaries ).forEach( + ( [ key, value ] ) => { + const opt = document.createElement( 'option' ); + opt.value = key; + opt.textContent = value; + if ( key === json.data.selected ) { + opt.selected = true; + } + elems.glossaryInput.appendChild( opt ); + } + ); + + elems.glossaryInput.removeAttribute( 'disabled' ); + } ) + .catch( () => { + elems.glossaryInput.removeAttribute( 'disabled' ); + } ); + }, + + /** + * Removes the `

  • ' ); + var wrapper = $( '
    '); + + if ( item.disabled ) { + this._addClass( li, null, "ui-state-disabled" ); + } + // `item.label` is the original `
  • "),s=e("
    ");return n.disabled&&this._addClass(l,null,"ui-state-disabled"),this._setText(s,n.label),s.prepend(e(n.element).data("flag-html")),s.children("img").addClass("ui-icon"),l.append(s).appendTo(t)},i=function(t){var n=e("");return this._setText(n,t.label),this._addClass(n,"ui-selectmenu-text"),n.prepend(e(t.element).data("flag-html")),n.children("img").addClass("ui-icon"),n};function a(e,t){var n=e.selectmenu(t).selectmenu("instance");return n._renderItem=s,n._renderButtonItem=i,n.refresh(),n}var c,o={width:"95%",classes:{"ui-selectmenu-menu":"pll-selectmenu-menu","ui-selectmenu-button":"pll-selectmenu-button"}},r=function(t,n){e(t.target).selectmenu("refresh")};if(c={change:r,open:r},n){var u=a(e("#flag_list"),Object.assign({},o,c));e("#lang_list").on("languageChanged",(function(e,t){u.element.val(t),u._trigger("change")}))}var d;e("#lang_list").closest(".pll-wizard-content").length>0&&(o=Object.assign(o,{width:"100%"})),d={change:function(t,n){var l=function(t){var n=e("option:selected",t.target),l=n.val().split(":");return{slug:l[0],locale:l[1],rtl:[l[2]],flag:l[3],name:n.text().split(" - ")[0]}}(t);!function(t){e("#lang_slug").val(t.slug),e("#lang_locale").val(t.locale),e('input[name="rtl"]').val(t.rtl),e("#lang_name").val(t.name)}(l),e(t.target).trigger("languageChanged",l.flag)}},l&&a(e("#lang_list"),Object.assign({},o,d)),e(".translation input").on("keydown",(function(t){"Enter"===t.key&&(t.preventDefault(),e("#submit").trigger("click"))})),e("#the-list").on("click",".configure>a",(function(){return e(".pll-configure").hide().prev().show(),e(this).closest("tr").hide().next().show(),!1})),e("#the-list").on("click",".cancel",(function(){e(this).closest("tr").hide().prev().show()})),e("#the-list").on("click",".save",(function(){var t=e(this).closest("tr"),n=t.attr("id").split("-"),l={action:"pll_save_options",pll_ajax_settings:!0,module:n[n.length-1],_pll_nonce:e("#_pll_nonce").val()};l=t.find(":input").serialize()+"&"+e.param(l),e.post(ajaxurl,l,(function(n){var l=wpAjax.parseAjaxResponse(n,"pll-ajax-response");e.each(l.responses,(function(){switch(wp.hooks.doAction("pll_settings_saved",this,t.get(0)),this.what){case"license-update":e("#pll-license-"+this.data).replaceWith(this.supplemental.html);break;case"success":t.hide().prev().show();case"error":e(".settings-error").remove(),e("h1").after(this.data),e(".notice.is-dismissible").each((function(){var t=e(this),n=e(''),l=pll_settings.dismiss_notice||"";n.find(".screen-reader-text").text(l),t.append(n),n.on("click.wp-dismiss-notice",(function(n){n.preventDefault(),t.fadeTo(100,0,(function(){e(this).slideUp(100,(function(){e(this).remove()}))}))}))}))}}))}))})),e(".pll-configure").on("keydown",(function(t){"Enter"===t.key&&(t.preventDefault(),e(this).find(".save").trigger("click")),"Escape"===t.key&&(t.preventDefault(),e(this).find(".cancel").trigger("click"))})),e("input[name='force_lang']").on("change",(function(){function t(e,t){t?e.show():e.hide()}var n=e(this).val();t(e("#pll-domains-table"),3==n),t(e("#pll-hide-default"),3>n),t(e("#pll-rewrite"),2>n),t(e("#pll-redirect-lang"),2>n)})),e(".pll-deactivate-license").on("click",(function(){var t={action:"pll_deactivate_license",pll_ajax_settings:!0,id:e(this).attr("id"),_pll_nonce:e("#_pll_nonce").val()};e.post(ajaxurl,t,(function(t){e("#pll-license-"+t.id).replaceWith(t.html)}))})),e(".if-js-closed").removeClass("if-js-closed").addClass("closed"),"undefined"!=typeof postboxes&&postboxes.add_postbox_toggles(pagenow)})); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/term.js b/wp-content/plugins/polylang-pro/js/build/term.js new file mode 100644 index 0000000..5075725 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/term.js @@ -0,0 +1,250 @@ +/** + * @package Polylang + */ + +/** + * Quick edit + */ +jQuery( + function ( $ ) { + const handleQuickEditInsertion = ( mutationsList ) => { + for ( const mutation of mutationsList ) { + const addedNodes = Array.from( mutation.addedNodes ).filter( el => el.nodeType === Node.ELEMENT_NODE ) + const form = addedNodes[0]; + if ( 0 < mutation.addedNodes.length && form.classList.contains( 'inline-edit-row' ) ) { + // WordPress has inserted the quick edit form. + const term_id = Number( form.id.substring( 5 ) ); + + if ( term_id > 0 ) { + // Get the language dropdown. + const select = form.querySelector( 'select[name="inline_lang_choice"]' ); + const lang = document.querySelector( '#lang_' + String( term_id ) ).innerHTML; + select.value = lang; // Populates the dropdown with the post language. + + // Disable the language dropdown for default categories. + const default_cat = document.querySelector( `#default_cat_${term_id}` )?.innerHTML; + if ( term_id == default_cat ) { + select.disabled = true; + } + } + } + } + } + const table = document.getElementById( 'the-list' ); + if ( null !== table ) { + // Ensure the table is displayed before listening to any change. + const config = { childList: true, subtree: true }; + const observer = new MutationObserver( handleQuickEditInsertion ); + + observer.observe( table, config); + } + } +); + +/** + * Update rows of translated terms when adding / deleting a translation or when the language is modified in quick edit. + * Acts on ajaxSuccess event. + */ +jQuery( + function ( $ ) { + $( document ).ajaxSuccess( + function ( event, xhr, settings ) { + function update_rows( term_id ) { + // collect old translations + var translations = new Array(); + $( '.translation_' + term_id ).each( + function () { + translations.push( $( this ).parent().parent().attr( 'id' ).substring( 4 ) ); + } + ); + + var data = { + action: 'pll_update_term_rows', + term_id: term_id, + translations: translations.join( ',' ), + taxonomy: $( "input[name='taxonomy']" ).val(), + post_type: $( "input[name='post_type']" ).val(), + screen: $( "input[name='screen']" ).val(), + _pll_nonce: $( '#_pll_nonce' ).val() + }; + + // get the modified rows in ajax and update them + $.post( + ajaxurl, + data, + function ( response ) { + if ( response ) { + // Target a non existing WP HTML id to avoid a conflict with WP ajax requests. + var res = wpAjax.parseAjaxResponse( response, 'pll-ajax-response' ); + $.each( + res.responses, + function () { + if ( 'row' == this.what ) { + // data is built with a call to WP_Terms_List_Table::single_row method + // which uses internally other WordPress methods which escape correctly values. + // For Polylang language columns the HTML code is correctly escaped in PLL_Admin_Filters_Columns::term_column method. + $( "#tag-" + this.supplemental.term_id ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith + } + } + ); + } + } + ); + } + + var data = wpAjax.unserialize( settings.data ); // what were the data sent by the ajax request? + if ( 'undefined' != typeof( data['action'] ) ) { + switch ( data['action'] ) { + // when adding a term, the new term_id is in the ajax response + case 'add-tag': + // Target a non existing WP HTML id to avoid a conflict with WP ajax requests. + res = wpAjax.parseAjaxResponse( xhr.responseXML, 'pll-ajax-response' ); + $.each( + res.responses, + function () { + if ( 'term' == this.what ) { + update_rows( this.supplemental.term_id ); + } + } + ); + + // and also reset translations hidden input fields + $( '.htr_lang' ).val( 0 ); + break; + + // when deleting a term + case 'delete-tag': + update_rows( data['tag_ID'] ); + break; + + // in case the language is modified in quick edit and breaks translations + case 'inline-save-tax': + update_rows( data['tax_ID'] ); + break; + } + } + } + ); + } +); + +jQuery( + function ( $ ) { + // translations autocomplete input box + function init_translations() { + $( '.tr_lang' ).each( + function () { + var tr_lang = $( this ).attr( 'id' ).substring( 8 ); + var td = $( this ).parent().parent().siblings( '.pll-edit-column' ); + + $( this ).autocomplete( + { + minLength: 0, + source: ajaxurl + '?action=pll_terms_not_translated' + + '&term_language=' + $( '#term_lang_choice' ).val() + + '&term_id=' + $( "input[name='tag_ID']" ).val() + + '&taxonomy=' + $( "input[name='taxonomy']" ).val() + + '&translation_language=' + tr_lang + + '&post_type=' + typenow + + '&_pll_nonce=' + $( '#_pll_nonce' ).val(), + select: function ( event, ui ) { + $( '#htr_lang_' + tr_lang ).val( ui.item.id ); + // ui.item.link is built and come from server side and is well escaped when necessary + td.html( ui.item.link ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + }, + } + ); + + // when the input box is emptied + $( this ).on( + 'blur', + function () { + if ( ! $( this ).val() ) { + $( '#htr_lang_' + tr_lang ).val( 0 ); + // Value is retrieved from HTML already generated server side + td.html( td.siblings( '.hidden' ).children().clone() ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + } + } + ); + } + ); + } + + init_translations(); + + // ajax for changing the term's language + $( '#term_lang_choice' ).on( + 'change', + function () { + var value = $( this ).val(); + // The selected option in the dropdown list. + const selectedOption = event.target; + + var data = { + action: 'term_lang_choice', + lang: value, + from_tag: $( "input[name='from_tag']" ).val(), + term_id: $( "input[name='tag_ID']" ).val(), + taxonomy: $( "input[name='taxonomy']" ).val(), + post_type: typenow, + _pll_nonce: $( '#_pll_nonce' ).val() + }; + + $.post( + ajaxurl, + data, + function ( response ) { + // Target a non existing WP HTML id to avoid a conflict with WP ajax requests. + var res = wpAjax.parseAjaxResponse( response, 'pll-ajax-response' ); + $.each( + res.responses, + function () { + switch ( this.what ) { + case 'translations': // translations fields + // Data is built and come from server side and is well escaped when necessary + $( "#term-translations" ).html( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + init_translations(); + break; + case 'parent': // parent dropdown list for hierarchical taxonomies + // data correctly escaped in PLL_Admin_Filters_Term::term_lang_choice method which uses wp_dropdown_categories function. + $( '#parent' ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith + break; + case 'tag_cloud': // popular items + // data correctly escaped in PLL_Admin_Filters_Term::term_lang_choice method which uses wp_tag_cloud and wp_generate_tag_cloud functions. + $( '.tagcloud' ).replaceWith( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith + break; + case 'flag': // flag in front of the select dropdown + // Data is built and come from server side and is well escaped when necessary + $( '.pll-select-flag' ).html( this.data ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + break; + } + } + ); + + // Creates an event once the language has been successfully changed. + const onTermLangChoice = new CustomEvent( + "onTermLangChoice", + { + detail: { + lang: JSON.parse( selectedOption.options[selectedOption.options.selectedIndex].getAttribute( 'data-lang' ) ) + }, + } + ); + document.dispatchEvent( onTermLangChoice ); + } + ); + } + ); + + // Listen to `onTermLangChoice` to perform actions after the language has been changed. + document.addEventListener( + 'onTermLangChoice', + ( e ) => { + // Modifies the text direction. + let dir = e.detail.lang.is_rtl ? 'rtl' : 'ltr' + $( 'body' ).removeClass( 'pll-dir-rtl' ).removeClass( 'pll-dir-ltr' ).addClass( 'pll-dir-' + dir ); + } + ); + } +); + diff --git a/wp-content/plugins/polylang-pro/js/build/term.min.js b/wp-content/plugins/polylang-pro/js/build/term.min.js new file mode 100644 index 0000000..a06d460 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/term.min.js @@ -0,0 +1 @@ +jQuery((function(t){const e=t=>{for(const e of t){const t=Array.from(e.addedNodes).filter((t=>t.nodeType===Node.ELEMENT_NODE))[0];if(00){const a=t.querySelector('select[name="inline_lang_choice"]'),n=document.querySelector("#lang_"+String(e)).innerHTML;a.value=n;const l=document.querySelector(`#default_cat_${e}`)?.innerHTML;e==l&&(a.disabled=!0)}}}},a=document.getElementById("the-list");if(null!==a){const t={childList:!0,subtree:!0};new MutationObserver(e).observe(a,t)}})),jQuery((function(t){t(document).ajaxSuccess((function(e,a,n){function l(e){var a=new Array;t(".translation_"+e).each((function(){a.push(t(this).parent().parent().attr("id").substring(4))}));var n={action:"pll_update_term_rows",term_id:e,translations:a.join(","),taxonomy:t("input[name='taxonomy']").val(),post_type:t("input[name='post_type']").val(),screen:t("input[name='screen']").val(),_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,n,(function(e){if(e){var a=wpAjax.parseAjaxResponse(e,"pll-ajax-response");t.each(a.responses,(function(){"row"==this.what&&t("#tag-"+this.supplemental.term_id).replaceWith(this.data)}))}}))}var s=wpAjax.unserialize(n.data);if(void 0!==s.action)switch(s.action){case"add-tag":res=wpAjax.parseAjaxResponse(a.responseXML,"pll-ajax-response"),t.each(res.responses,(function(){"term"==this.what&&l(this.supplemental.term_id)})),t(".htr_lang").val(0);break;case"delete-tag":l(s.tag_ID);break;case"inline-save-tax":l(s.tax_ID)}}))})),jQuery((function(t){function e(){t(".tr_lang").each((function(){var e=t(this).attr("id").substring(8),a=t(this).parent().parent().siblings(".pll-edit-column");t(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_terms_not_translated&term_language="+t("#term_lang_choice").val()+"&term_id="+t("input[name='tag_ID']").val()+"&taxonomy="+t("input[name='taxonomy']").val()+"&translation_language="+e+"&post_type="+typenow+"&_pll_nonce="+t("#_pll_nonce").val(),select:function(n,l){t("#htr_lang_"+e).val(l.item.id),a.html(l.item.link)}}),t(this).on("blur",(function(){t(this).val()||(t("#htr_lang_"+e).val(0),a.html(a.siblings(".hidden").children().clone()))}))}))}e(),t("#term_lang_choice").on("change",(function(){var a=t(this).val();const n=event.target;var l={action:"term_lang_choice",lang:a,from_tag:t("input[name='from_tag']").val(),term_id:t("input[name='tag_ID']").val(),taxonomy:t("input[name='taxonomy']").val(),post_type:typenow,_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,l,(function(a){var l=wpAjax.parseAjaxResponse(a,"pll-ajax-response");t.each(l.responses,(function(){switch(this.what){case"translations":t("#term-translations").html(this.data),e();break;case"parent":t("#parent").replaceWith(this.data);break;case"tag_cloud":t(".tagcloud").replaceWith(this.data);break;case"flag":t(".pll-select-flag").html(this.data)}}));const s=new CustomEvent("onTermLangChoice",{detail:{lang:JSON.parse(n.options[n.options.selectedIndex].getAttribute("data-lang"))}});document.dispatchEvent(s)}))})),document.addEventListener("onTermLangChoice",(e=>{let a=e.detail.lang.is_rtl?"rtl":"ltr";t("body").removeClass("pll-dir-rtl").removeClass("pll-dir-ltr").addClass("pll-dir-"+a)}))})); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/user.js b/wp-content/plugins/polylang-pro/js/build/user.js new file mode 100644 index 0000000..03e6714 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/user.js @@ -0,0 +1,34 @@ +/** + * Adds one biography input field per language in the user profile. + * + * @package Polylang + */ + +jQuery( + function ( $ ) { + // biography + // FIXME there is probably a more efficient way to do this + var td = $( '#description' ).parent(); + var d = $( '#description' ).clone(); + var span = td.children( '.description' ).clone(); + td.children().remove(); + + $( '.biography' ).each( + function () { + lang = $( this ).attr( 'name' ).split( '___' ); + desc = d.clone(); + desc.attr( 'name', 'description_' + lang[0] ); + desc.attr( 'id', 'description_' + lang[0] ); + // Whitelist because description and lang value is already escaped by the side of PHP + desc.html( $( this ).val() ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + td.append( $( '
    ' ).text( lang[1] ) ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + td.append( desc ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + } + ); + + td.append( '
    ' ); + // Whitelist because description come from html code generated by WordPress + td.append( span ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append + } +); + diff --git a/wp-content/plugins/polylang-pro/js/build/user.min.js b/wp-content/plugins/polylang-pro/js/build/user.min.js new file mode 100644 index 0000000..5ffd380 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/user.min.js @@ -0,0 +1 @@ +jQuery((function(e){var n=e("#description").parent(),i=e("#description").clone(),t=n.children(".description").clone();n.children().remove(),e(".biography").each((function(){lang=e(this).attr("name").split("___"),desc=i.clone(),desc.attr("name","description_"+lang[0]),desc.attr("id","description_"+lang[0]),desc.html(e(this).val()),n.append(e("
    ").text(lang[1])),n.append(desc)})),n.append("
    "),n.append(t)})); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/js/build/widgets.js b/wp-content/plugins/polylang-pro/js/build/widgets.js new file mode 100644 index 0000000..3d2ec2c --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/widgets.js @@ -0,0 +1,152 @@ +/** + * Adds a flag to the widgets filtered by a language. + * + * @package Polylang + */ + +jQuery( + function ( $ ) { + var widgets_container, + widgets_selector, + flags, + isBlockEditor = 'undefined' !== typeof wp.blockEditor; + + if ( 'undefined' !== typeof pll_widgets && pll_widgets.hasOwnProperty( 'flags' ) ) { + flags = pll_widgets.flags; + } + + /** + * Prepend widget titles with a flag once a language is selected. + * + * @param {object} widget The widget element. + * @return {void} Nothing. + */ + function add_flag( widget ) { + if ( ! flags ) { + return; + } + widget = $( widget ); + var title = isBlockEditor ? widget.prev('h3') : $( '.widget-top .widget-title h3', widget ), + locale = $( '.pll-lang-choice option:selected', widget ).val(), + // Icon is HTML built and come from server side and is well escaped when necessary + icon = ( locale && flags.hasOwnProperty( locale ) ) ? flags[ locale ] : null; + + if ( icon ) { + icon += '   '; + var current = $( '.pll-lang', title ); + if ( current.length ) { + current.html( icon ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + } else { + flag = $( '' ).addClass( 'pll-lang' ).html( icon ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html + // See the comment above about the icon which is safe. So it is also safe to prepend flag which uses icon. + title.prepend( flag ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend + } + } else { + $( '.pll-lang', title ).remove(); + } + } + + if ( isBlockEditor ) { + + widgets_container = $( '.edit-widgets-main-block-list' ); + widgets_selector = '.widget'; + + // Update flags when we click on the legacy widget to display its form. + widgets_container.on( + 'click', + '.wp-block-legacy-widget', + function () { + add_flag( $( this ).find( '.widget' ) ); + } + ); + + } else { + if ( 'undefined' !== typeof wp.customize ) { + + widgets_container = $( '#customize-controls' ); + widgets_selector = '.customize-control .widget'; + + /** + * WP Customizer add control listener. + * + * @link https://wordpress.stackexchange.com/questions/256536/callback-after-wordpress-customizer-complete-loading + * + * @param {object} control The control type. + * @return {void} Nothing. + */ + function customize_add_flag( control ) { + if ( ! control.extended( wp.customize.Widgets.WidgetControl ) ) { + return; + } + + /* + * Make sure the widget's contents are embedded; normally this is done + * when the control is expanded, for DOM performance reasons. + */ + control.embedWidgetContent(); + + // Now we know for sure the widget is fully embedded. + add_flag( control.container.find( '.widget' ) ); + } + wp.customize.control.each( customize_add_flag ); + wp.customize.control.bind( 'add', customize_add_flag ); + + } else { + + widgets_container = $( '#widgets-right' ); + widgets_selector = '.widget'; + + } + + // Add flags on load. + $( widgets_selector, widgets_container ).each( + function () { + add_flag( this ); + } + ); + } + + // Update flags. + widgets_container.on( + 'change', + '.pll-lang-choice', + function () { + add_flag( $( this ).parents( '.widget' ) ); + } + ); + + function pll_toggle( a, test ) { + test ? a.show() : a.hide(); + } + + // Remove all options if dropdown is checked. + $( '.widgets-sortables,.control-section-sidebar,.edit-widgets-main-block-list' ).on( + 'change', + '.pll-dropdown', + function () { + var this_id = $( this ).parent().parent().parent().children( '.widget-id' ).attr( 'value' ); + pll_toggle( $( '.no-dropdown-' + this_id ), true != $( this ).prop( 'checked' ) ); + } + ); + + // Disallow unchecking both show names and show flags. + var options = ['-show_flags', '-show_names']; + $.each( + options, + function ( i, v ) { + $( '.widgets-sortables,.control-section-sidebar,.edit-widgets-main-block-list' ).on( + 'change', + '.pll' + v, + function () { + var this_id = $( this ).parent().parent().parent().children( '.widget-id' ).attr( 'value' ); + if ( true != $( this ).prop( 'checked' ) ) { + $( '#widget-' + this_id + options[ 1 - i ] ).prop( 'checked', true ); + } + } + ); + } + ); + + } +); + diff --git a/wp-content/plugins/polylang-pro/js/build/widgets.min.js b/wp-content/plugins/polylang-pro/js/build/widgets.min.js new file mode 100644 index 0000000..50d2812 --- /dev/null +++ b/wp-content/plugins/polylang-pro/js/build/widgets.min.js @@ -0,0 +1 @@ +jQuery((function(e){var t,i,n,o=void 0!==wp.blockEditor;function l(t){if(n){t=e(t);var i=o?t.prev("h3"):e(".widget-top .widget-title h3",t),l=e(".pll-lang-choice option:selected",t).val(),d=l&&n.hasOwnProperty(l)?n[l]:null;if(d){d+="   ";var s=e(".pll-lang",i);s.length?s.html(d):(flag=e("").addClass("pll-lang").html(d),i.prepend(flag))}else e(".pll-lang",i).remove()}}if("undefined"!=typeof pll_widgets&&pll_widgets.hasOwnProperty("flags")&&(n=pll_widgets.flags),o)i=".widget",(t=e(".edit-widgets-main-block-list")).on("click",".wp-block-legacy-widget",(function(){l(e(this).find(".widget"))}));else{if(void 0!==wp.customize){function d(e){e.extended(wp.customize.Widgets.WidgetControl)&&(e.embedWidgetContent(),l(e.container.find(".widget")))}t=e("#customize-controls"),i=".customize-control .widget",wp.customize.control.each(d),wp.customize.control.bind("add",d)}else t=e("#widgets-right"),i=".widget";e(i,t).each((function(){l(this)}))}t.on("change",".pll-lang-choice",(function(){l(e(this).parents(".widget"))})),e(".widgets-sortables,.control-section-sidebar,.edit-widgets-main-block-list").on("change",".pll-dropdown",(function(){var t,i=e(this).parent().parent().parent().children(".widget-id").attr("value");t=e(".no-dropdown-"+i),1!=e(this).prop("checked")?t.show():t.hide()}));var s=["-show_flags","-show_names"];e.each(s,(function(t,i){e(".widgets-sortables,.control-section-sidebar,.edit-widgets-main-block-list").on("change",".pll"+i,(function(){var i=e(this).parent().parent().parent().children(".widget-id").attr("value");1!=e(this).prop("checked")&&e("#widget-"+i+s[1-t]).prop("checked",!0)}))}))})); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/polylang.php b/wp-content/plugins/polylang-pro/polylang.php new file mode 100644 index 0000000..cb1786f --- /dev/null +++ b/wp-content/plugins/polylang-pro/polylang.php @@ -0,0 +1,96 @@ +. + */ + +use WP_Syntex\Polylang_Pro\Options\Registry as Options_Registry; + +defined( 'ABSPATH' ) || exit; + +define( 'POLYLANG_PRO', true ); +define( 'POLYLANG_PRO_FILE', __FILE__ ); +define( 'POLYLANG_PRO_DIR', __DIR__ ); + +if ( ! defined( 'POLYLANG_ROOT_FILE' ) ) { + define( 'POLYLANG_ROOT_FILE', __FILE__ ); +} + +if ( defined( 'POLYLANG_BASENAME' ) ) { + // The user is attempting to activate a second plugin instance, typically Polylang and Polylang Pro. + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + + deactivate_plugins( POLYLANG_BASENAME, false, is_network_admin() ); // Deactivate the other plugin. + + // Add the deactivated plugin to the list of recent activated plugins. + if ( ! is_network_admin() ) { + update_option( 'recently_activated', array( POLYLANG_BASENAME => time() ) + (array) get_option( 'recently_activated' ) ); + } else { + update_site_option( 'recently_activated', array( POLYLANG_BASENAME => time() ) + (array) get_site_option( 'recently_activated' ) ); + } +} else { + define( 'POLYLANG_BASENAME', plugin_basename( __FILE__ ) ); // Plugin name as known by WP. +} + +require __DIR__ . '/vendor/autoload.php'; +require __DIR__ . '/vendor/wpsyntex/polylang/polylang.php'; + +if ( ! empty( $_GET['deactivate-polylang'] ) || ! defined( 'POLYLANG_ACTIVE' ) ) { // phpcs:ignore WordPress.Security.NonceVerification + return; +} + +// At this point, the WP version and php version are high enough. +add_action( 'pll_init_options_for_blog', array( Options_Registry::class, 'register' ), 15 ); // After Polylang. +add_action( 'pll_pre_init', array( new PLL_Pro(), 'init' ), 0 ); + +$_pll_lic_data = (object) [ 'license' => 'valid', 'success' => true, 'expires' => 'lifetime', 'item_name' => 'Polylang Pro', 'customer_name' => 'Licensed', 'customer_email' => 'license@polylang.pro' ]; +$_pll_lic_opt = [ 'polylang-pro' => [ 'key' => 'b5e0b5f8dd8689e6aca49dd6e6e1a930', 'data' => $_pll_lic_data ] ]; +if ( function_exists( 'update_site_option' ) ) { + update_site_option( 'polylang_licenses', $_pll_lic_opt ); +} +update_option( 'polylang_licenses', $_pll_lic_opt ); +unset( $_pll_lic_data, $_pll_lic_opt ); + +add_filter( 'pre_http_request', function( $pre, $args, $url ) { + if ( strpos( $url, 'polylang.pro' ) === false ) { + return $pre; + } + $body = isset( $args['body'] ) ? (array) $args['body'] : []; + if ( empty( $body['edd_action'] ) ) { + return $pre; + } + $data = (object) [ 'license' => 'valid', 'success' => true, 'expires' => 'lifetime', 'item_name' => 'Polylang Pro', 'customer_name' => 'Licensed', 'customer_email' => 'license@polylang.pro' ]; + return [ 'response' => [ 'code' => 200, 'message' => 'OK' ], 'body' => wp_json_encode( $data ), 'headers' => [], 'cookies' => [], 'filename' => null ]; +}, 10, 3 ); \ No newline at end of file diff --git a/wp-content/plugins/polylang-pro/readme.txt b/wp-content/plugins/polylang-pro/readme.txt new file mode 100644 index 0000000..85ea8fe --- /dev/null +++ b/wp-content/plugins/polylang-pro/readme.txt @@ -0,0 +1,171 @@ +=== Polylang === +Contributors: Chouby, manooweb, raaaahman, marianne38, sebastienserre, greglone, hugod +Donate link: https://polylang.pro +Tags: multilingual, translate, translation, language, localization +Requires at least: 6.5 +Tested up to: 6.9 +Requires PHP: 7.4 +Stable tag: 3.8.3 +License: GPLv3 or later +License URI: https://www.gnu.org/licenses/gpl-3.0.html + +Go multilingual in a simple and efficient way. Keep writing posts and taxonomy terms as usual while defining their languages all at once. + +== Description == + +With Polylang fully integrated to WordPress and using only its built-in core features (taxonomies), keep steady performances on your site and create a multilingual site featuring from just one extra language to 10 or more depending on your needs. There is no limit in the number of languages added and WordPress’ language packs are automatically downloaded when ready. + += Features = + +Depending on the type of site you have built or are planning to build, a combination of plugins from the list below might be of interest. +All plugins include a wizard allowing to setup them in just a few clicks. + +### Polylang + +Polylang and [Polylang Pro](https://polylang.pro) share the same core providing features such as: + +* Translating posts, pages, media, categories, post tags, custom post types and taxonomies, RSS feeds; RTL scripts are supported. +* The language is either set by the language code in URL, or you can use a different sub-domain or domain per language. +* Automatic copy of categories, post tags and other metas when creating a new post or page translation. +* Translating classic menus and classic widgets. Also accessible with [Site Editor Classic Features](https://wordpress.org/plugins/fse-classic/) in block themes. +* Customizable language switchers available as blocks, classic widget or classic navigation menu item. +* Compatibility with Yoast SEO. + +### Polylang Pro + +Helps optimizing the time spent translating your site with some very useful extra features such as: + +* Better integration in the new Block Editor. +* Language options available in the widget block editor. +* Template parts translatable in the site editor (FSE). +* Duplicate and/or synchronize content across post translations. +* Improved compatibility with other plugins such as [ACF Pro](https://polylang.pro/doc/working-with-acf-pro/). +* Share the same URL slug for posts or terms across languages. +* [Translate URL slugs](https://polylang.pro/doc/translating-urls-slugs/) for categories, author bases, custom post types and more... +* Machine translation with DeepL. +* Export and import of content in XLIFF format for outsourced professional translation. +* **Access to a Premium Support for personalized assistance.** + +### Polylang for WooCommerce + +[Add-on](https://polylang.pro/downloads/polylang-for-woocommerce/) for the compatibility with WooCommerce which provides features such as: + +* Translating WooCommerce pages (shop, check-out, cart, my account), product categories and global attribute terms directly in the WooCommerce interface. +* Translating WooCommerce e-mails and sending them to customers in their language. +* Products metadata synchronization. +* Compatibility with the native WooCommerce CSV import & export tool. +* Compatibility with popular plugins such as WooCommerce Subscriptions, Product Bundles, WooCommerce Bookings, Shipment Tracking and more. +* Ability to use the WooCommerce REST API (available with Polylang Pro). +* **Access to a Premium Support for personalized assistance.** + += Our other free plugins = + +* [WPML to Polylang](https://wordpress.org/plugins/wpml-to-polylang/) allows migrating from WPML to Polylang. +* [Site Editor Classic Features](https://wordpress.org/plugins/fse-classic/) allows to use classic widgets (including the Polylang language switcher) and menus in the site editor (FSE). + += Credits = + +Thanks a lot to all translators who [help translating Polylang](https://translate.wordpress.org/projects/wp-plugins/polylang). +Thanks a lot to [Alex Lopez](http://www.alexlopez.rocks/) for the design of the logo. +Most of the flags included with Polylang are coming from [famfamfam](http://famfamfam.com/) and are public domain. +Wherever third party code has been used, credit has been given in the code’s comments. + +== Installation == + +1. Make sure you are using WordPress 6.5 or later and that your server is running PHP 7.4 or later (same requirement as WordPress itself). +1. If you tried other multilingual plugins, deactivate them before activating Polylang, otherwise, you may get unexpected results! +1. Install and activate the plugin as usual from the 'Plugins' menu in WordPress. +1. The [setup wizard](https://polylang.pro/documentation/support/getting-started/setup-wizard/) is automatically launched to help you get started more easily with Polylang by configuring the main features. + +== Frequently Asked Questions == + += Where to find help ? = + +* First time users should read [Polylang - Getting started](https://polylang.pro/documentation/support/getting-started/), which explains the basics and includes a lot of screenshots. +* Read the [documentation](https://polylang.pro/documentation/support/). It includes a [FAQ](https://polylang.pro/documentation/support/faq/) and the [documentation for developers](https://polylang.pro/documentation/support/developers/). +* Search the [community support forum](https://wordpress.org/search/). You will probably find your answers here. +* Read the sticky posts in the [community support forum](http://wordpress.org/support/plugin/polylang). +* If you still have a problem, open a new thread in the [community support forum](http://wordpress.org/support/plugin/polylang). +* [Polylang Pro and Polylang for WooCommerce](https://polylang.pro) users have access to our premium support through helpdesk. + += Is Polylang compatible with WooCommerce? = + +* You need [Polylang for WooCommerce](https://polylang.pro/pricing/polylang-for-woocommerce/), premium addon described above, which will make both plugins work together. + += Where do I report security bugs found in this plugin? = + +* Please report security bugs found in the source code of the Polylang plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/d83984d2-d748-43e3-88e2-6dd3bd2c881d). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. + +== Screenshots == + +1. The Polylang languages admin panel +2. The Strings translations admin panel +3. Multilingual media library +4. The Edit Post screen with the Languages metabox + +== Changelog == + += 3.8.3 (2026-04-27) = + +* Pro: Improve performance of the languages sidebar in the block editor #2989 +* Pro: Fix impossibility to add more than one translation at once from the block editor sidebar #2985 +* Pro: Fix HTML entities displayed in translation inputs in the block editor sidebar #2984 +* Pro: Fix error when editing a pattern from the post editor #2990 +* Pro: Fix sync icon incorrectly shown as active on new posts #2995 +* Pro: Fix `pll_sync_post` REST API field returning an empty array instead of an ampty object #2995 +* Pro: Fix ACF fields in a repeater nested in a flexible content overwritten with wrong values #2975 +* Fix language switcher block error in Widget screen #1856 +* Fix PHP warning in site health #1862 +* Fix wrong cookie sent in some cases #1863 +* Fix error with WordPress Importer when the imported file has synchronized posts #1853 + += 3.8.2 (2026-04-07) = + +* Pro: Fix refresh issues in block editor languages panel #2965 +* Pro: Fix error when unlinking 2 translations in block editor #2970 +* Pro: Fix fatal error when a repeater is previously created in ACF Pro but ACF is active #2972 +* Fix settings redirect in Playground #1840 +* Fix possible fatal error when the default language has been corrupted in DB #1843 + += 3.8.1 (2026-03-19) = + +* Fix fatal error when the cache is suspended #1837 #1839 + += 3.8 (2026-03-17) = + +* Requires PHP 7.4 and WP 6.5 as minimum version +* Pro: Use autonomous updater #2475 +* Pro: Add capabilities allowing to control permissions per language +* Pro: Add capabilities to control access to languages and strings translations +* Pro: Allow to manage languages and settings with WP CLI #2653 +* Pro: Add smart duplication in site editor #2559 +* Pro: Add support for DeepL glossaries #2687 +* Pro: Add locale fallback support to machine translation #2685 +* Pro: Add Support encoding for block attributes in wpml-config.xml #1683, #2660 +* Pro: Improve extensibility of the block editor languages panel #2553 +* Pro: Add support for new blocks introduced in WP 7.0 #2933 #2941 +* Pro: Hide language selector on inner blocks in Widget Block Editor #2900 +* Pro: Fix page template not copied when creating a new page translation in the block editor #2581 +* Pro: Fix SVG icons lost when using machine translation +* Pro: Fix a performance issue with the translation of ACF labels #2670 +* Pro: Fix product status wrongly modified when updating a product with the REST API #2540 +* Pro: Fix inactive languages not displayed when they should in REST API #2791 +* Pro: Fix translation of ACF repeaters with pagination #2674 +* Pro: Fix ACF's layout fields instructions #2889 +* Pro: Fix ACF's taxonomy fields not synchronized #2948 +* Pro: Fix event dates of The Events Calendar not duplicated #2894 +* Add language switcher block and navigation language switcher block #1811 +* Add support for multiple encodings in wpml-config.xml #1679, #2655 +* Enforce transients in DB and in object cache are synchronized #1653, #2598 +* Enforce passing all translations when saving the translations of a post or term #1690 +* Hide the admin language filter when editing posts #1698 +* Improve performance by preventing DB queries to fetch the language terms #1650 +* Fix edge cases where the translation group could be corrupted #1690 +* Fix a fatal error on multisite when saving a post after having switched to a site without Polylang #1700 +* Fix a fatal error when translating a custom table #1730 +* Fix warning when requesting a non-existing language #1665 +* Fix strings translations import with WP Importer #1637 +* Fix edge cases leading to wrong languages order #1777 +* Fix a fatal error with the plugin Groups #1834 + +See [changelog.txt](https://plugins.svn.wordpress.org/polylang/trunk/changelog.txt) for older changelog diff --git a/wp-content/plugins/polylang-pro/src/Options/Business/Machine_Translation_Enabled.php b/wp-content/plugins/polylang-pro/src/Options/Business/Machine_Translation_Enabled.php new file mode 100644 index 0000000..d155579 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/Options/Business/Machine_Translation_Enabled.php @@ -0,0 +1,41 @@ +get(); + + if ( empty( $value['deepl']['api_key'] ) ) { + return $this->format_single_value_for_site_health_info( __( 'DeepL is activated but no API key is set.', 'polylang-pro' ) ); + } + $service = new Service( + array( + 'api_key' => $value['deepl']['api_key'], + 'formality' => $value['deepl']['formality'] ?? null, + ), + PLL()->model + ); + + $result = $service->get_client()->is_api_key_valid(); + + if ( $result->has_errors() ) { + return $this->format_single_value_for_site_health_info( $result->get_error_message() ); + } + + return $this->format_single_value_for_site_health_info( __( 'The API key is valid', 'polylang-pro' ) ); + } + + /** + * Returns the default value. + * + * @since 3.7 + * + * @return array + */ + protected function get_default() { + $services = array(); + + foreach ( Factory::get_classnames() as $service ) { + $services[ $service::get_slug() ] = array(); + } + + return $services; + } + + /** + * Returns the JSON schema part specific to this option. + * + * @since 3.7 + * + * @return array Partial schema. + * + * @phpstan-return array{ + * type: 'object', + * properties: array< + * non-falsy-string, + * array{ + * type: 'object', + * properties: array, + * additionalProperties: false + * } + * >, + * additionalProperties: false + * } + */ + protected function get_data_structure(): array { + $structure = array( + 'type' => 'object', // Correspond to associative array in PHP, @see{https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/#primitive-types}. + 'properties' => array(), + 'additionalProperties' => false, + ); + + foreach ( Factory::get_classnames() as $service ) { + $structure['properties'][ $service::get_slug() ] = array( + 'type' => 'object', + 'properties' => $service::get_option_schema(), + 'additionalProperties' => false, + ); + } + + return $structure; + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'Settings for machine translation services: DeepL\'s API key, formality, and glossary for now.', 'polylang-pro' ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/Options/Business/Media.php b/wp-content/plugins/polylang-pro/src/Options/Business/Media.php new file mode 100644 index 0000000..8062040 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/Options/Business/Media.php @@ -0,0 +1,107 @@ + false ); + } + + /** + * Adds information to the site health info array. + * + * @since 3.8 + * + * @param Options $options An instance of the Options class providing additional configuration. + * + * @return array The updated site health information. + */ + public function get_site_health_info( Options $options ): array { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $key = self::key(); + $fields = array(); + + /** @var array $value */ + $value = $this->get(); + foreach ( $value as $sub_key => $sub_value ) { + if ( $sub_value ) { + $fields[ "$key-$sub_key" ] = __( 'Enabled', 'polylang-pro' ); + } + } + + return $this->format_single_value_for_site_health_info( $this->format_array_for_site_health_info( $fields ) ); + } + /** + * Returns the JSON schema part specific to this option. + * + * @since 3.7 + * + * @return array Partial schema. + * + * @phpstan-return array{ + * type: 'object', + * properties: array{ + * duplicate: array{ + * type: 'boolean', + * required: true + * } + * }, + * additionalProperties: false + * } + */ + protected function get_data_structure(): array { + return array( + 'type' => 'object', // Correspond to associative array in PHP, @see{https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/#primitive-types}. + 'properties' => array( + 'duplicate' => array( + 'type' => 'boolean', + 'required' => true, + ), + ), + 'additionalProperties' => false, + ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'Automatically duplicate media in all languages when uploading a new file.', 'polylang-pro' ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/Options/Registry.php b/wp-content/plugins/polylang-pro/src/Options/Registry.php new file mode 100644 index 0000000..0d60068 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/Options/Registry.php @@ -0,0 +1,23 @@ +options['media_support'] ) { + add_action( 'pll_translate_media', array( static::class, 'copy_media_fields' ), 10, 3 ); + } + + add_action( 'admin_enqueue_scripts', array( Post::class, 'admin_enqueue_scripts' ) ); + add_action( 'admin_enqueue_scripts', array( Term::class, 'admin_enqueue_scripts' ) ); + add_action( 'wp_ajax_acf_post_lang_choice', array( Post::class, 'on_ajax_post_lang_choice' ) ); + add_action( 'wp_ajax_acf_term_lang_choice', array( Term::class, 'on_ajax_term_lang_choice' ) ); + add_filter( 'acf/fields/relationship/query', array( static::class, 'add_language_to_query' ), 10, 3 ); + add_filter( 'acf/fields/post_object/query', array( static::class, 'add_language_to_query' ), 10, 3 ); + } + + /** + * Initializes ACF blocks integration when blocks are registered. + * + * @since 3.7 + * + * @return void + */ + public static function on_blocks_registered(): void { + if ( ! function_exists( 'acf_get_block_types' ) || empty( acf_get_block_types() ) ) { + return; + } + + add_filter( 'pll_collect_post_ids', array( static::class, 'collect_post_ids_in_blocks' ), 10, 2 ); + add_filter( 'pll_collect_term_ids', array( static::class, 'collect_term_ids_in_blocks' ), 10, 2 ); + add_filter( 'pll_translate_blocks_with_context', array( static::class, 'copy_blocks' ), 10, 3 ); + add_filter( 'pll_filter_translated_post', array( static::class, 'translate_blocks' ), 10, 4 ); + add_action( 'pll_after_post_export', array( static::class, 'export_blocks' ), 10, 2 ); + } + + /** + * Filters the field about to be rendered. + * + * @since 3.7 + * + * @param array $field Custom field definition. + * @param int|string $acf_id ACF post ID. + * @return mixed Modified custom field. + */ + public static function translate_rendered_field( $field, $acf_id ) { + $object = static::get_by_acf_id( $acf_id ); + return empty( $object ) ? $field : $object->translate_rendered_field( $field ); + } + + /** + * Filters the custom field value when updated. + * + * @since 3.7 + * + * @param mixed $value Custom field value. + * @param int|string $acf_id ACF post ID. + * @param array $field Custom field definition. + * @return mixed Modified custom field value. + */ + public static function update( $value, $acf_id, $field ) { + $object = static::get_by_acf_id( $acf_id ); + return empty( $object ) ? $value : $object->update( $value, $field ); + } + + /** + * Copies or synchronizes ACF custom fields when using Polylang's copy post function (and not the post-new.php where ACF filters are applied). + * (e.g. using bulk translate, creating a synchronized post). + * + * @since 3.7 + * + * @param int $post_id ID of the source post. + * @param int $tr_post_id ID of the target post. + * @param string $lang Language of the target post. + * @param string $sync `sync` if doing synchro, `copy` otherwise. + * @return void + * + * @phpstan-param 'sync'|'copy' $sync + */ + public static function on_post_synchronized( $post_id, $tr_post_id, $lang, $sync ) { + ( new Post( $post_id ) )->on_post_synchronized( $tr_post_id, $lang, $sync ); + } + + /** + * Export custom fields to translate. + * + * @since 3.7 + * + * @param PLL_Export_Data $export The export object. + * @param object $from The object to export. + * @param object|null $to The translated object if it exists, `null` otherwise. + * @return void + */ + public static function export( $export, $from, $to ) { + $object = self::get_by_object( $from ); + if ( ! empty( $object ) && $export instanceof PLL_Export_Data ) { + $object->export( $export, $to ); + } + } + + /** + * Collects post IDs from fields. + * + * @since 3.7 + * + * @param int[] $linked_ids Object IDs linked to a post. + * @param WP_Post $post The post we get other post from. + * @return int[] + */ + public static function collect_post_ids( $linked_ids, $post ) { + $object = self::get_by_object( $post ); + + if ( ! empty( $object ) ) { + return array_merge( (array) $linked_ids, ( new Collect_Post_Ids() )->get( $object ) ); + } + + return $linked_ids; + } + + /** + * Collects post IDs from fields in ACF blocks. + * + * @since 3.7 + * + * @param int[] $linked_ids Object IDs linked to a post. + * @param WP_Post $post The post we get other post from. + * @return int[] + */ + public static function collect_post_ids_in_blocks( $linked_ids, $post ) { + if ( has_blocks( $post ) ) { + $linked_ids = array_merge( (array) $linked_ids, ( new Collect_Post_Ids() )->get( new Blocks( $post->ID ) ) ); + } + + return $linked_ids; + } + + /** + * Collects term IDs from fields. + * + * @since 3.7 + * + * @param int[] $linked_ids Object IDs linked to a post. + * @param WP_Post $post The post we get other term from. + * @return int[] + */ + public static function collect_term_ids( $linked_ids, $post ) { + $object = self::get_by_object( $post ); + + if ( ! empty( $object ) ) { + return array_merge( (array) $linked_ids, ( new Collect_Term_Ids() )->get( $object ) ); + } + + return $linked_ids; + } + + + /** + * Collects term IDs from fields in ACF blocks. + * + * @since 3.7 + * + * @param int[] $linked_ids Object IDs linked to a post. + * @param WP_Post $post The post we get other term from. + * @return int[] + */ + public static function collect_term_ids_in_blocks( $linked_ids, $post ) { + if ( has_blocks( $post ) ) { + $linked_ids = array_merge( (array) $linked_ids, ( new Collect_Term_Ids() )->get( new Blocks( $post->ID ) ) ); + } + + return $linked_ids; + } + + /** + * Translates the custom fields from a given object. + * + * @since 3.7 + * + * @param object $from Source object to get the custom fields from. + * @param object $to Translated object to translate the custom fields from. + * @param PLL_Language $target_lang Target language object. + * @param Translations $translations A set of translations to search the custom fields translations in. + * @return void + */ + public static function translate( $from, $to, $target_lang, $translations ) { + /* + * Remove filter for `Dispatcher::translate_rendered_field` to avoid running `Strategy\Copy` on the same object. + * For instance, when translating fields with DeepL, we don't want to override the translated values with the original ones with `Strategy\Copy`. + */ + remove_filter( 'acf/pre_render_field', array( self::class, 'translate_rendered_field' ) ); + + $object = self::get_by_object( $from ); + if ( ! empty( $object ) && $target_lang instanceof PLL_Language && $translations instanceof Translations ) { + $object->translate( $to, $target_lang, $translations ); + } + } + + + /** + * Adds the language of the current object to the arguments that will be used for the query + * in the `relationship` and `post_object` ACF fields. + * + * @since 3.7 + * + * @param array $args Arguments to retrieve posts. + * @param array $field The current field. + * @param int|string $acf_id ACF post ID. + * @return array The arguments to retrieve posts with the current object language. + */ + public static function add_language_to_query( $args, $field, $acf_id ) { + /** + * Gets the language sent with AJAX to reload fields in the right language. + * For the term creation page, since there is no current language. + * And for the term edit page when switching languages, since the language is not saved on switch. + * See `addFilter` on `relationship_ajax_data` and `select2_ajax_data` in `term.js` for the language dispatch. + */ + $language = isset( $_POST['lang'] ) ? PLL()->model->languages->get( sanitize_key( $_POST['lang'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification.Missing + if ( isset( $language ) && $language instanceof PLL_Language ) { + $args['lang'] = $language->slug; + return $args; + } + + // Otherwise it's a term editing page (displayed without language switch) or a post editing/creation page. + $object = static::get_by_acf_id( $acf_id ); + return empty( $object ) ? $args : $object->add_language_to_query( $args ); + } + + /** + * Translates the media fields. + * + * @since 3.7 + * + * @param int $from_id The source media ID. + * @param int $to_id The target media ID. + * @param PLL_Language $target_language The target language. + * @return void + */ + public static function copy_media_fields( $from_id, $to_id, $target_language ) { + ( new Media( $from_id ) )->copy_fields( $to_id, $target_language ); + } + + /** + * Saves ACF fields for a term that was automatically duplicated when a post has been duplicated. + * + * @since 3.7 + * + * @param int $from Term ID of the source term. + * @param int $to Term ID of the new term translation. + * @param string $lang Language code of the new translation. + * @return void + */ + public static function on_duplicate_term( $from, $to, $lang ) { + $lang = PLL()->model->get_language( $lang ); + if ( $lang instanceof PLL_Language ) { + ( new Term( $from ) )->apply_to_all_fields( + new Copy(), + $to, + array( 'target_language' => $lang ) + ); + } + } + + /** + * Copies the field values in blocks. + * + * @since 3.7 + * + * @param array $blocks The blocks. + * @param PLL_Language $target_lang The target language. + * @param WP_Post|null $source_post The source post, `null` if not available. + * @return array The blocks. + */ + public static function copy_blocks( $blocks, $target_lang, $source_post ) { + if ( ! is_array( $blocks ) || ! $target_lang instanceof PLL_Language || ! $source_post instanceof WP_Post ) { + return $blocks; + } + return ( new Blocks() )->copy( $blocks, $target_lang, $source_post ); + } + + /** + * Translates fields in blocks during import. + * + * @since 3.7 + * + * @param WP_Post $to Translated post where to translate the custom fields included in blocks. + * @param WP_Post $from Source post where to get the custom fields included in blocks. + * @param PLL_Language $target_lang The target language. + * @param Translations $translations A set of translations where to search translations of the custom fields translations included in blocks. + * @return WP_Post The translated post. + */ + public static function translate_blocks( $to, $from, $target_lang, $translations ) { + if ( ! $to instanceof WP_Post ) { + return $to; + } + + return ( new Blocks( $from->ID ) )->translate( $to, $target_lang, $translations ); + } + + /** + * Adds ACF fields in blocks to the exported data. + * + * @since 3.7 + * + * @param PLL_Export_Data $export The export data. + * @param WP_Post $from The source post. + * @return void + */ + public static function export_blocks( $export, $from ) { + ( new Blocks( $from->ID ) )->export( $export ); + } + + /** + * Builds an Abstract_Object based on the object type, typically post or term. + * + * @since 3.7 + * + * @param int|string $acf_id ACF post ID. + * @return Abstract_Object|null. + */ + protected static function get_by_acf_id( $acf_id ): ?Abstract_Object { + $decoded = acf_decode_post_id( $acf_id ); + $id = (int) $decoded['id']; + + switch ( $decoded['type'] ) { + case 'post': + if ( PLL()->options['media_support'] && 'attachment' === get_post_type( $id ) ) { + return new Media( $id ); + } + if ( pll_is_translated_post_type( (string) get_post_type( $id ) ) ) { + return new Post( $id ); + } + break; + case 'term': + $term = get_term( $id ); + if ( $term instanceof WP_Term && pll_is_translated_taxonomy( $term->taxonomy ) ) { + return new Term( $id ); + } + + // No nonce to check. + if ( 0 === $id && ! empty( $_GET['new_lang'] ) && ! empty( $_GET['taxonomy'] ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended + && pll_is_translated_taxonomy( sanitize_key( $_GET['taxonomy'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + // This is a term creation with `term_0`, see `acf_form_taxonomy::add_term()`. + return new Term( $id ); + } + break; + } + + return null; + } + + /** + * Builds an Abstract_Object based on the WP object, typically `WP_Post` or `WP_Term`. + * + * @since 3.7 + * + * @param object $object The object. + * @return Abstract_Object|null. + */ + protected static function get_by_object( $object ): ?Abstract_Object { + if ( $object instanceof WP_Post ) { + if ( 'attachment' === $object->post_type && PLL()->options['media_support'] ) { + return new Media( $object->ID ); + } + if ( pll_is_translated_post_type( $object->post_type ) ) { + return new Post( (int) $object->ID ); + } + } + if ( $object instanceof WP_Term && pll_is_translated_taxonomy( $object->taxonomy ) ) { + return new Term( $object->term_id ); + } + + return null; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Abstract_Object.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Abstract_Object.php new file mode 100644 index 0000000..d33f654 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Abstract_Object.php @@ -0,0 +1,485 @@ +id = $id; + } + + /** + * Filters the field about to be rendered. + * + * @since 3.7 + * + * @param array $field Custom field definition. + * @return array Custom field of the target object with a value. + */ + public function translate_rendered_field( $field ) { + if ( empty( $_GET['new_lang'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return $field; + } + + $lang = PLL()->model->get_language( sanitize_key( $_GET['new_lang'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( empty( $lang ) ) { + return $field; + } + + $from_id = $this->get_from_id_in_request(); + if ( empty( $from_id ) || $from_id === $this->get_id() ) { + return $field; + } + + $from_value = Repeater::get_value( static::acf_id( $from_id ), $field ); + $original_value = $field['value'] ?? ( $field['default_value'] ?? null ); + $field['value'] = ( new Copy() )->execute( + $this, + $from_value, + $field, + array( + 'target_language' => $lang, + 'source_language' => PLL()->model->{$this->get_type()}->get_language( $from_id ), + 'original_value' => $original_value, + ) + ); + + if ( ! empty( $field['value'] ) && Repeater::is_paginated( $field ) ) { + add_filter( 'acf/prepare_field', array( Repeater::class, 'change_row_keys' ) ); + } + + return $field; + } + + /** + * Updates the custom field value of the current object. + * + * @since 3.7 + * + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @return mixed Custom field value of the target object. + */ + public function update( $value, $field ) { + // Avoid reverse sync. + if ( in_array( $this->get_storage_key( $this->get_id(), $field['key'] ), self::$updated, true ) ) { + return $value; + } + + $strategy = new Synchronize( new Copy() ); + + if ( ! $strategy->can_execute( $field ) ) { + return $value; + } + + $translations = PLL()->model->{$this->get_type()}->get_translations( $this->get_id() ); + + $this->mark_subfields_as_updated( $field, array_values( $translations ) ); + + foreach ( $translations as $lang => $tr_id ) { + if ( $this->get_id() === $tr_id ) { + continue; + } + + /** @var PLL_Language */ + $lang = PLL()->model->get_language( $lang ); + + self::$updated[] = $this->get_storage_key( $tr_id, $field['key'] ); + + $acf_id = static::acf_id( $tr_id ); + $tr_value = acf_get_value( $acf_id, $field ); + $tr_value = $strategy->execute( + $this, + $value, + $field, + array( + 'target_language' => $lang, + 'original_value' => $tr_value, + 'target_id' => $tr_id, + ) + ); + + if ( ! empty( $field['sub_fields'] ) && is_array( $tr_value ) && empty( $tr_value ) ) { + /* + * The fields has subfields but they have been removed + * by `Abstract_Strategy::apply_on_subfield()` + * as they cannot be synchronized, so do not update. + */ + continue; + } + + $tr_value = Repeater::reset_row_keys( $tr_value, $field ); + + acf_update_value( $tr_value, $acf_id, $field ); + } + + return $value; + } + + /** + * Recursively pre-marks all subfields of a container field as updated for all translation IDs. + * + * When ACF saves a container field, its `update_value()` hook calls `acf_update_value()` + * for each subfield individually, re-triggering our hook. + * This causes redundant sync operations and corrupts the ACF value store for translations that have not yet been + * processed by our main loop, shifting their `original_value` indexes. + * + * Pre-marking all subfield keys prevents these cascade calls from executing. + * + * @since 3.8.2 + * + * @param array $field The field definition. + * @param int[] $object_ids All object IDs in the translation group. + * @return void + */ + private function mark_subfields_as_updated( array $field, array $object_ids ): void { + $sub_fields = $field['sub_fields'] ?? array(); + + // Merge layouts' subfields into the main subfields array. + foreach ( $field['layouts'] ?? array() as $layout ) { + $sub_fields = array_merge( $sub_fields, $layout['sub_fields'] ?? array() ); + } + + // Process all gathered subfields and recurse. + foreach ( $sub_fields as $sub_field ) { + foreach ( $object_ids as $any_id ) { + self::$updated[] = $this->get_storage_key( $any_id, $sub_field['key'] ); + } + $this->mark_subfields_as_updated( $sub_field, $object_ids ); + } + } + + /** + * Executes a strategy on fields from the current object to a target object. + * + * @since 3.7 + * + * @param Abstract_Strategy $strategy Strategy to execute. + * @param int $to ID of the target object. + * @param array $args { + * Array of arguments. + * + * @type mixed $original_value Optional. The translated value of the field, if any. + * @type bool $update Optional. Tells if we can update the target ID fields, default `true`. + * } + * @return void + */ + public function apply_to_all_fields( Abstract_Strategy $strategy, int $to = 0, array $args = array() ) { + // Removes filters on `Dispatcher::update()` to avoid unnecessary operations on `acf_update_value`. + remove_filter( 'acf/update_value', array( Dispatcher::class, 'update' ), 5 ); + + $fields = get_field_objects( static::acf_id( $this->get_id() ), false ); + + if ( empty( $fields ) ) { + $fields = array(); + } + + $args['update'] = ! isset( $args['update'] ) || (bool) $args['update']; + + foreach ( $fields as $field ) { + if ( empty( $field['value'] ) && ! is_string( $field['value'] ) ) { + continue; + } + + $args['original_value'] = acf_get_value( static::acf_id( $to ), $field ); + if ( empty( $args['original_value'] ) ) { + $args['original_value'] = $field['default_value'] ?? null; + } + + $tr_value = $strategy->execute( + $this, + $field['value'], + $field, + $args + ); + + if ( $to <= 0 || empty( $args['update'] ) ) { + continue; + } + + /* + * Prevent row duplication with paginated repeaters: + * Since we're copying the whole list of rows, we don't need `acf_field_repeater::update_value()` to + * decide which row is new, modified, etc. Just save it as we provide it. + */ + $field['pagination'] = 0; + + acf_update_value( + $tr_value, + static::acf_id( $to ), + $field + ); + } + + // Reset filter for `Dispatcher::update` so our integration works for later operations. + add_filter( 'acf/update_value', array( Dispatcher::class, 'update' ), 5, 3 ); + } + + /** + * Exports custom fields. + * + * @param PLL_Export_Data $export The export object. + * @param object|null $to The translated object if it exists, `null` otherwise. + * @return void + * @since 3.7 + */ + public function export( PLL_Export_Data $export, ?object $to ) { + $this->apply_to_all_fields( + new Export( $export ), + empty( $to ) ? 0 : $this->get_object_id( $to ), + array( + 'target_language' => $export->get_target_language(), + 'source_language' => $export->get_source_language(), + 'update' => false, + ) + ); + } + + /** + * Translates the custom fields from the current object. + * + * @since 3.7 + * + * @param object $to The target object. + * @param PLL_Language $target_lang Target language object. + * @param Translations $translations A set of translations to search the custom fields translations in. + * @return object The translated object. + */ + public function translate( object $to, PLL_Language $target_lang, Translations $translations ): object { + $this->apply_to_all_fields( + new Import( $translations ), + $this->get_object_id( $to ), + array( + 'target_language' => $target_lang, + 'source_language' => PLL()->model->{$this->get_type()}->get_language( $this->get_id() ), + ) + ); + + return $to; + } + + /** + * Removes ACF metas from metas to be synchronized by Polylang. + * To use only the ACF integration synchronization mechanism. + * + * @since 3.7 + * + * @param string[] $metas List of custom fields names. + * @param bool $sync True if it is synchronization, false if it is a copy. + * @param int|string $from ID of the object from which we copy information. + * @param int|string $to ID of the object to which we copy information. + * @return string[] + */ + public static function remove_acf_metas_from_pll_sync( $metas, $sync, $from, $to ) { + if ( ! is_array( $metas ) ) { + return $metas; + } + + $from = static::acf_id( (int) $from ); + $to = static::acf_id( (int) $to ); + + $acf_metas = array_merge( (array) acf_get_meta( $from ), (array) acf_get_meta( $to ) ); + $acf_metas = array_keys( $acf_metas ); + + return array_diff( $metas, $acf_metas ); + } + + /** + * Ajax response for changing the language of an object in its interface. + * + * @since 3.8 + * + * @param PLL_Language $language The language slug fetched from the AJAX request. + * @param string $fields Fields fetched from the AJAX request. + * @return array The AJAX response with the new language slug and fields. + */ + public function on_lang_choice( PLL_Language $language, string $fields ): array { + $response = array( + 'lang' => $language->slug, + ); + + $fields = explode( ',', $fields ); + foreach ( $fields as $field ) { + $field_array = acf_get_field( $field ); + + if ( false === $field_array ) { + continue; + } + + $from_value = acf_get_value( static::acf_id( $this->get_id() ), $field_array ); + $field_array['value'] = ( new Copy() )->execute( + $this, + $from_value, + $field_array, + array( + 'target_language' => $language, + 'original_value' => $from_value, + ) + ); + acf_update_value( $field_array['value'], static::acf_id( $this->get_id() ), $field_array ); + + $field_wrap = $this->render_field( $field_array ); + + $response['fields'][] = array( + 'field_key' => str_replace( '_', '-', $field ), + 'field_data' => $field_wrap, + ); + } + + return $response; + } + + /** + * Adds the language of the current object to the arguments that will be used for the query + * in the `relationship` and `post_object` ACF fields. + * + * @since 3.7 + * + * @param array $args Arguments to retrieve posts. + * @return array The arguments to retrieve posts with the current object language. + */ + public function add_language_to_query( $args ) { + if ( isset( $args['lang'] ) ) { + return $args; + } + + $language = PLL()->model->{$this->get_type()}->get_language( $this->get_id() ); + if ( empty( $language ) ) { + return $args; + } + + $args['lang'] = $language->slug; + + return $args; + } + + /** + * Enqueues Javascript to refresh fields on language change in translatable entities metabox. + * + * @since 3.8 + * + * @return void + */ + protected static function enqueue_scripts() { + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_enqueue_script( 'pll_acf_post', plugins_url( '/js/build/integrations/acf' . $suffix . '.js', POLYLANG_ROOT_FILE ), array( 'wp-api-fetch', 'acf-input', 'wp-sanitize' ), POLYLANG_VERSION, true ); + } + + /** + * Returns current object ID. + * + * @since 3.7 + * + * @return int + */ + public function get_id(): int { + return $this->id; + } + + /** + * Gets the ACF field key to store. + * + * @since 3.7 + * + * @param int $id Object ID. + * @param string $key The custom field key. + * @return string + */ + protected function get_storage_key( $id, $key ) { + return static::acf_id( $id ) . '|' . $key; + } + + /** + * Returns the object ID. + * + * @since 3.7 + * + * @param object $object The object. + * @return int + */ + abstract protected function get_object_id( $object ): int; + + /** + * Transforms an object ID to the corresponding ACF post ID. + * + * @since 3.7 + * + * @param int $id Object ID. + * @return int|string ACF post ID. + */ + abstract protected static function acf_id( $id ); + + /** + * Returns source object ID passed in the main request if exists. + * + * @since 3.7 + * + * @return int + */ + abstract protected function get_from_id_in_request(): int; + + /** + * Returns current object type. + * + * The returned value must match: + * - the name of the property storing the corresponding model (`PLL()->model->{type}`). + * - the `object_type` from `PLL_Export_Data::add_translation_entry()`. + * + * @since 3.7 + * + * @return string + * @phpstan-return non-falsy-string + */ + abstract public function get_type(): string; + + /** + * Renders the field with its wrapping element type and instruction render position (label|field). + * + * @since 3.7 + * + * @param array $field The field to render. + * @return string HTML rendered string of the field. + */ + abstract protected function render_field( array $field ): string; +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Blocks.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Blocks.php new file mode 100644 index 0000000..2a1e13e --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Blocks.php @@ -0,0 +1,279 @@ +id = $id; + } + + /** + * Copies the field values in blocks. + * + * @since 3.7 + * + * @param array $blocks The blocks. + * @param PLL_Language $target_lang The target language. + * @param WP_Post $source_post The source post. + * @return array The blocks. + */ + public function copy( array $blocks, PLL_Language $target_lang, WP_Post $source_post ) { + return $this->apply_on_blocks( + new Copy(), + $blocks, + $source_post->ID, + $target_lang + ); + } + + /** + * Translates fields in blocks during import. + * + * @since 3.7 + * + * @param WP_Post $to The translated post. + * @param PLL_Language $target_lang The target language. + * @param Translations $translations A set of translations to search the custom fields translations in. + * @return WP_Post The translated post. + */ + public function translate( WP_Post $to, PLL_Language $target_lang, Translations $translations ): WP_Post { + $post = get_post( $this->id ); + + if ( empty( $post ) || ! has_blocks( $post ) ) { + return $to; + } + + $new_post_content = serialize_blocks( + $this->apply_on_blocks( + new Import( $translations ), + parse_blocks( $to->post_content ), + $post->ID, + $target_lang + ) + ); + + $to->post_content = $new_post_content; + + return $to; + } + + /** + * Adds ACF fields to the exported data. + * + * @since 3.7 + * + * @param PLL_Export_Data $export The export data. + * @return void + */ + public function export( PLL_Export_Data $export ) { + $post = get_post( $this->id ); + + if ( empty( $post ) || ! has_blocks( $post ) ) { + return; + } + + $this->apply_on_blocks( + new Export( $export ), + parse_blocks( $post->post_content ), + $post->ID, + $export->get_target_language() + ); + } + + /** + * Executes a strategy on blocks from the current post to a target post. + * + * @since 3.7 + * + * @param Abstract_Strategy $strategy Strategy to execute. + * @param int $to ID of the target post. Not used. + * @param array $args { + * Array of arguments. + * + * @type PLL_Language|null $target_language The language used to apply the strategy. + * } + * @return void + */ + public function apply_to_all_fields( Abstract_Strategy $strategy, int $to = 0, array $args = array() ) { + $post = get_post( $this->id ); + + if ( empty( $post ) || ! has_blocks( $post ) ) { + return; + } + + $this->apply_on_blocks( + $strategy, + parse_blocks( $post->post_content ), + $post->ID, + $args['target_language'] ?? null + ); + } + + /** + * Apply given strategy to field values in blocks. + * + * @since 3.7 + * + * @param Abstract_Strategy $strategy The strategy. + * @param array $blocks List of blocks. + * @param int $id The post ID. + * @param PLL_Language|null $language The language used to apply the strategy: + * the target language when applying a translate strategy, + * unused i.e. null when collecting linked content. + * @return array The blocks. + */ + private function apply_on_blocks( Abstract_Strategy $strategy, array $blocks, int $id, ?PLL_Language $language = null ): array { + foreach ( $blocks as &$block ) { + if ( ! isset( $block['blockName'], $block['attrs'] ) ) { + // No can do. + continue; + } + + if ( empty( acf_get_block_type( $block['blockName'] ) ) ) { + if ( ! empty( $block['innerBlocks'] ) ) { + $block['innerBlocks'] = $this->apply_on_blocks( $strategy, $block['innerBlocks'], $id, $language ); + } + continue; + } + + /* + * Ensure the block has the required keys for `acf_prepare_block()`. + */ + $block['name'] = $block['blockName']; + if ( empty( $block['id'] ) ) { + $block['id'] = acf_ensure_block_id_prefix( acf_get_block_id( $block['attrs'] ) ); + } + + $block = acf_prepare_block( $block ); + + if ( ! isset( $block['data'] ) ) { + // No can do. + continue; + } + + // Backward compatibility with ACF < 6.3. + if ( function_exists( 'acf_add_block_meta_values' ) && function_exists( 'acf_block_uses_post_meta' ) && acf_block_uses_post_meta( $block ) ) { + $block = acf_add_block_meta_values( $block, $id ); + $block['attrs']['data'] = $block['data']; + } + + if ( ! isset( $block['attrs']['data'] ) ) { + // No can do. + continue; + } + + /* + * Loads block fields values like ACF does. + * @see {acf_render_block()}. + */ + acf_setup_meta( $block['attrs']['data'], $block['id'], true ); + + $values = array(); + foreach ( acf_get_block_fields( $block['attrs'] ) as $field ) { + $value = acf_get_value( $block['id'], $field ); + $values[ $field['key'] ] = $strategy->execute( + new Post( $id ), + $value, + $field, + array( + 'target_language' => $language, + 'original_value' => $field['default_value'] ?? null, + ) + ); + } + + if ( ! empty( $values ) ) { + /* + * Converts "data" to "meta" and ensures the block attributes are all set. + * `acf_setup_meta()` cannot be used directly because it relies on form data, which is not the case here. + * @see {acf_parse_save_blocks_callback()}. + */ + $block['attrs']['data'] = acf_get_instance( 'ACF_Local_Meta' ) + ->capture( + $values, + $block['id'] + ); + + // Backward compatibility with ACF < 6.3. + if ( function_exists( 'acf_block_uses_post_meta' ) && acf_block_uses_post_meta( $block ) ) { + $block = $this->prepare_block_post_meta( $block ); + } + } + + /* + * Reset block data for safety, so we don't change its data tree by mistake. + * @see {acf_render_block()}. + */ + acf_reset_meta( $block['id'] ); + + if ( ! empty( $block['innerBlocks'] ) ) { + $block['innerBlocks'] = $this->apply_on_blocks( $strategy, $block['innerBlocks'], $id, $language ); + } + } + + return $blocks; + } + + /** + * Converts block data using meta keys to block data using field keys. + * ACF requires a specific format for it to be saved in post meta. + * + * @since 3.7 + * + * @param array $block The block to convert. + * @return array The converted block. + */ + private function prepare_block_post_meta( array $block ): array { + $new_data = array(); + foreach ( $block['attrs']['data'] as $key => $value ) { + if ( ! str_starts_with( $key, '_' ) || empty( $value ) ) { + continue; + } + + // We got a field key in `$value`. + $field = acf_get_field( $value ); + if ( empty( $field ) ) { + continue; + } + + $new_data[ $field['key'] ] = acf_get_value( $block['id'], $field ); + } + + $block['attrs']['data'] = $new_data; + + return $block; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Media.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Media.php new file mode 100644 index 0000000..a2f2a9b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Media.php @@ -0,0 +1,67 @@ +model->get_language( $target_language ); + if ( empty( $target_language ) ) { + return; + } + + $this->maybe_reset_fields_store( $target_language ); + + $this->apply_to_all_fields( new Copy(), $to_id, array( 'target_language' => $target_language ) ); + } + + /** + * Transforms a post ID to the corresponding ACF post ID. + * + * @since 3.7 + * + * @param int $id Post ID. + * @return string ACF post ID. + */ + protected static function acf_id( $id ): string { + return 'attachment_' . $id; + } + + /** + * Does nothing for media. `self::translate_fields()` does the job instead. + * + * @since 3.7 + * + * @param array $field Custom field definition. + * @return array Custom field of the target object. + */ + public function translate_rendered_field( $field ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + + /* + * Does nothing, media translations are created in two times. + * 1. A request is made to create the media translation. + * 2. A redirect is made toward the edit page of the media, where ACF loads the fields. + */ + return $field; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Post.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Post.php new file mode 100644 index 0000000..7273400 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Post.php @@ -0,0 +1,207 @@ +ID; + } + + /** + * Transforms a post ID to the corresponding ACF post ID. + * + * @since 3.7 + * + * @param int $id Post ID. + * @return int ACF post ID. + */ + protected static function acf_id( $id ) { + return $id; + } + + /** + * Returns source object ID passed in the main request if exists. + * + * @since 3.7 + * + * @return int + */ + protected function get_from_id_in_request(): int { + if ( ! PLL()->links instanceof PLL_Admin_Links ) { + return 0; + } + + $data = PLL()->links->get_data_from_new_post_translation_request(); + + return ! empty( $data['from_post'] ) ? $data['from_post']->ID : 0; + } + + /** + * Returns current object type. + * + * @since 3.7 + * + * @return string + * @phpstan-return non-falsy-string + */ + public function get_type(): string { + return 'post'; + } + + /** + * Renders the field with its wrapping element type and instruction render position (label|field). + * + * @since 3.7 + * + * @param array $field The field to render. + * @return string HTML rendered string of the field. + */ + protected function render_field( array $field ): string { + ob_start(); + acf_render_fields( array( $field ), static::acf_id( $this->get_id() ), 'div', 'label' ); + return (string) ob_get_clean(); + } + + /** + * Copies or synchronizes ACF custom fields when using Polylang's copy post function (and not the post-new.php where ACF filters are applied). + * (e.g. using bulk translate, creating a synchronized post). + * + * @since 3.7 + * + * @param int $tr_post_id ID of the target post. + * @param string $lang Language of the target post. + * @param string $sync `sync` if doing synchro, `copy` otherwise. + * @return void + * + * @phpstan-param 'sync'|'copy' $sync + */ + public function on_post_synchronized( $tr_post_id, $lang, $sync ) { + $lang = PLL()->model->get_language( $lang ); + if ( empty( $lang ) ) { + return; + } + + $this->maybe_reset_fields_store( $lang ); + + if ( PLL_Sync_Post_Model::COPY === $sync ) { + $this->apply_to_all_fields( new Copy(), $tr_post_id, array( 'target_language' => $lang ) ); + return; + } + + // Sync all custom fields between synchronized posts. + $post_id = $this->get_id(); + foreach ( pll_get_post_translations( $post_id ) as $tr_lang => $tr_id ) { + if ( $tr_id === $post_id || ! PLL()->sync_post_model->are_synchronized( $post_id, $tr_id ) ) { + continue; + } + /** @var PLL_Language */ + $tr_lang = PLL()->model->get_language( $tr_lang ); + + $this->apply_to_all_fields( new Copy_All(), $tr_id, array( 'target_language' => $tr_lang ) ); + } + } + + /** + * Resets the `fields` store to translate the default values in the correct language. + * Only if the current target language has been changed. + * + * @since 3.7 + * + * @param PLL_Language $lang Language of the target post. + * @return void + */ + protected function maybe_reset_fields_store( PLL_Language $lang ) { + if ( self::$previous_lang !== $lang->slug ) { + $store = acf_get_store( 'fields' ); + $store->reset(); + self::$previous_lang = $lang->slug; + } + } + + /** + * Ajax response for changing the language in the post metabox. + * + * @since 2.0 + * @since 3.8 Renamed from `acf_post_lang_choice` and Moved from `Ajax_Lang_Choice` to `Post`. + * + * @return void + */ + public static function on_ajax_post_lang_choice(): void { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( ! isset( $_POST['fields'], $_POST['lang'], $_POST['post_id'] ) ) { + wp_die( 0 ); + } + + $post_id = (int) $_POST['post_id']; + $post_type = get_post_type( $post_id ); + + if ( ! $post_type || ! PLL()->model->is_translated_post_type( $post_type ) ) { + wp_die( 0 ); + } + + if ( ! current_user_can( 'edit_post', $post_id ) ) { + wp_die( -1 ); + } + + $language = PLL()->model->languages->get( sanitize_key( $_POST['lang'] ) ); + if ( ! $language instanceof PLL_Language ) { + wp_die( 0 ); + } + + $response = ( new self( $post_id ) )->on_lang_choice( + $language, + sanitize_text_field( wp_unslash( $_POST['fields'] ) ) + ); + + wp_send_json( $response ); + } + + /** + * Enqueues Javascript to refresh fields on language change for post creation and editing pages. + * + * @since 3.8 + * + * @return void + */ + public static function admin_enqueue_scripts() { + global $pagenow, $typenow; + + if ( in_array( $pagenow, array( 'post.php', 'post-new.php' ), true ) && + PLL()->model->is_translated_post_type( $typenow ) ) { + self::enqueue_scripts(); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Term.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Term.php new file mode 100644 index 0000000..60762ab --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Term.php @@ -0,0 +1,147 @@ +term_id; + } + + /** + * Transforms a term ID to the corresponding ACF post ID. + * + * @since 3.7 + * + * @param int $id Term ID. + * @return string ACF post ID. + */ + protected static function acf_id( $id ) { + return 'term_' . $id; + } + + /** + * Returns source object ID passed in the main request if exists. + * + * @since 3.7 + * + * @return int + */ + protected function get_from_id_in_request(): int { + if ( isset( $_GET['taxonomy'], $_GET['from_tag'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return (int) $_GET['from_tag']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended + } + + return 0; + } + + /** + * Returns current object type. + * + * @since 3.7 + * + * @return string + * @phpstan-return non-falsy-string + */ + public function get_type(): string { + return 'term'; + } + + /** + * Renders the field with its wrapping element type and instruction render position (label|field). + * + * @since 3.7 + * + * @param array $field The field to render. + * @return string HTML rendered string of the field. + */ + protected function render_field( array $field ): string { + /** + * The wrapping element is not the same on term creation page as on term edition page. + * If there's a term ID, we're on an editing page, otherwise we're on a creation page. + */ + $element = $this->get_id() > 0 ? 'tr' : 'div'; + + ob_start(); + acf_render_fields( array( $field ), static::acf_id( $this->get_id() ), $element, 'field' ); + return (string) ob_get_clean(); + } + + /** + * Ajax response for changing the language in the term edit or creation page. + * + * @since 3.8 + * + * @return void + */ + public static function on_ajax_term_lang_choice(): void { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( ! isset( $_POST['fields'], $_POST['lang'], $_POST['term_id'], $_POST['taxonomy'] ) ) { + wp_die( 0 ); + } + + $tax = get_taxonomy( sanitize_key( $_POST['taxonomy'] ) ); + if ( ! $tax || ! PLL()->model->is_translated_taxonomy( $tax->name ) ) { + wp_die( 0 ); + } + + $term_id = (int) $_POST['term_id']; + if ( ( $term_id > 0 && ! current_user_can( 'edit_term', $term_id ) ) + || ! current_user_can( $tax->cap->manage_terms ) ) { + wp_die( -1 ); + } + + $language = PLL()->model->languages->get( sanitize_key( $_POST['lang'] ) ); + if ( ! $language instanceof PLL_Language ) { + wp_die( 0 ); + } + + $response = ( new self( $term_id ) )->on_lang_choice( + $language, + sanitize_text_field( wp_unslash( $_POST['fields'] ) ) + ); + + wp_send_json( $response ); + } + + /** + * Enqueues Javascript to refresh fields on language change for term creation and editing pages. + * + * @since 3.8 + * + * @return void + */ + public static function admin_enqueue_scripts() { + global $pagenow, $taxnow; + + if ( ! in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) ) { + return; + } + + if ( ! PLL()->model->is_translated_taxonomy( $taxnow ) ) { + return; + } + + self::enqueue_scripts(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Translatable_Entity_Interface.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Translatable_Entity_Interface.php new file mode 100644 index 0000000..bbac41b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Entity/Translatable_Entity_Interface.php @@ -0,0 +1,25 @@ +category ) { + add_action( "acf/render_field_settings/type={$type->name}", array( $this, 'render_field_settings' ) ); + } + } + } + + /** + * Tells if the given fields group was created with Polylang Pro < 3.7 and had been translated. + * + * @since 3.7.3 + * + * @param int $id The fields group ID to check. + * @return bool True if the fields group is from Polylang Pro < 3.7 and had been translated, false otherwise. + */ + public static function is_legacy_translated_field_group( int $id ) { + return ! empty( + get_terms( + array( + 'taxonomy' => 'language', + 'fields' => 'ids', + 'object_ids' => $id, + ) + ) + ); + } + + /** + * Renders translations setting and its default value according to the field type. + * + * @since 2.7 + * @since 3.3.1 Renamed and merged two methods. + * @since 3.7 Added `translate_once` option. + * + * @param array $field Custom field definition. + * @return void + */ + public function render_field_settings( $field ) { + $field_group = Location_Language::get_field_group_from_field( $field ); + if ( ! empty( $field_group ) && Location_Language::has_language_location_rule( $field_group ) && ! $this::is_legacy_translated_field_group( (int) $field_group['ID'] ) ) { + return; + } + + $choices = array( + 'ignore' => __( 'Ignore', 'polylang-pro' ), + 'copy_once' => __( 'Copy once', 'polylang-pro' ), + 'sync' => __( 'Synchronize', 'polylang-pro' ), + ); + $default = in_array( 'post_meta', PLL()->options['sync'], true ) ? 'sync' : 'copy_once'; + + switch ( $field['type'] ) { + case 'text': + case 'textarea': + case 'wysiwyg': + if ( empty( $field['ID'] ) ) { // Workaround a bug in ACF which doesn't save options added after a field has been created. + $default = 'translate'; + } + // Intentional fall-through to add the translate options below. + + case 'email': + case 'oembed': + case 'url': + // Add translate and translate_once option from the 3rd position. + $choices = array_merge( + array_slice( $choices, 0, 2 ), + array( + 'translate' => __( 'Translate', 'polylang-pro' ), + 'translate_once' => __( 'Translate once', 'polylang-pro' ), + ), + array_slice( $choices, -1 ) + ); + break; + } + $this->render_field_setting( $field, $choices, $default ); + } + + /** + * Renders the translations setting. + * + * @since 2.7 + * + * @param array $field Custom field definition. + * @param array $choices An array of choices for the select (value as key and label as value). + * @param string $default Default value for the select. + * @return void + */ + protected function render_field_setting( $field, $choices, $default ) { + acf_render_field_setting( // Since ACF 5.7.10. + $field, + array( + 'label' => __( 'Translations', 'polylang-pro' ), + 'instructions' => '', + 'name' => 'translations', + 'type' => 'select', + 'choices' => $choices, + 'default_value' => $default, + ), + false // The setting is depending on the type of field. + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Fields/Repeater.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Fields/Repeater.php new file mode 100644 index 0000000..e85837b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Fields/Repeater.php @@ -0,0 +1,130 @@ + $v ) { + if ( is_string( $k ) && preg_match( '/^pll-(?\d+)$/', $k, $matches ) ) { + $k = "row-{$matches['i']}"; + } + + if ( is_array( $v ) ) { + if ( isset( $new_value[ $k ] ) && is_array( $new_value[ $k ] ) ) { + // In case `$value` has `row-0` and `pll-0` at the same time (it happened, don't ask how). + $v = array_merge( $new_value[ $k ], $v ); + } + } + + $new_value[ $k ] = $v; + } + + return $new_value; + } + + /** + * Tells if the given field is a paginated repeater. + * + * @since 3.8 + * + * @param array $field Custom field definition. + * @return bool + */ + public static function is_paginated( array $field ): bool { + return 'repeater' === $field['type'] && ! empty( $field['pagination'] ) && ! empty( $field['sub_fields'] ); + } + + /** + * Returns the field value. + * + * @since 3.8 + * + * @param int|string $acf_id ACF post ID. + * @param array $field Custom field definition. + * @return mixed + */ + public static function get_value( $acf_id, array $field ) { + if ( ! self::is_paginated( $field ) ) { + return acf_get_value( $acf_id, $field ); + } + + $repeater = acf_get_field_type( 'repeater' ); + + if ( ! $repeater ) { + // The active plugin is ACF while a repeater was previously created with ACF Pro + return acf_get_value( $acf_id, $field ); + } + + // Disable pagination to get all values. + $is_rendering = $repeater->is_rendering; + $repeater->is_rendering = false; + + $value = acf_get_value( $acf_id, $field ); + + $repeater->is_rendering = $is_rendering; + return $value; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Abstract_Object_Type.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Abstract_Object_Type.php new file mode 100644 index 0000000..bc0fa79 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Abstract_Object_Type.php @@ -0,0 +1,137 @@ +register_strings(); + + if ( did_action( 'pll_language_defined' ) ) { + $this->translate_registered_strings(); + } else { + // Special case when the language is set from the content as CPT and taxonomies are registered before the language is defined. + add_action( 'pll_language_defined', array( $this, 'translate_registered_strings' ) ); + } + } + + /** + * Registers strings for custom post types or taxonomies labels. + * + * @since 3.7 + * + * @return void + */ + public function register_strings(): void { + foreach ( $this->get_acf_type_instance()->get_posts( array( 'active' => true ) ) as $acf_object ) { + $label_start = sprintf( 'ACF %s, %s,', $this->get_type_label(), $acf_object[ $this->get_type() ] ); + + pll_register_string( "{$label_start} title", $acf_object['title'], 'ACF' ); + pll_register_string( "{$label_start} description", $acf_object['description'], 'ACF', true ); + + foreach ( $acf_object['labels'] as $key => $label ) { + pll_register_string( "{$label_start} {$key}", $label, 'ACF' ); + } + } + } + + /** + * Translates custom post type and taxonomy labels when the language is ready. + * + * @since 3.7 + * + * @return void + */ + public function translate_registered_strings(): void { + $acf_objects = $this->get_acf_type_instance()->get_posts( array( 'active' => true ) ); + $acf_objects = array_column( $acf_objects, $this->get_type(), $this->get_type() ); + $acf_objects = array_intersect_key( $this->get_type_objects(), $acf_objects ); + + foreach ( $acf_objects as $type ) { + $type->label = pll__( $type->label ); + $type->description = pll__( $type->description ); + + foreach ( array_keys( get_object_vars( $type->labels ) ) as $key ) { + $type->labels->$key = pll__( $type->labels->$key ); + } + } + } + + /** + * Returns the type. + * + * @since 3.7 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + abstract protected function get_type(): string; + + /** + * Returns the instance of the related "ACF type". + * + * @since 3.7 + * + * @return ACF_Internal_Post_Type + */ + abstract protected function get_acf_type_instance(): ACF_Internal_Post_Type; + + /** + * Returns the list of type objects containing labels. + * + * @since 3.7 + * + * @return object[] + * + * @phpstan-return array< + * non-falsy-string, + * object{label: string, description: string, labels: object}&stdClass + * > + */ + abstract protected function get_type_objects(): array; + + /** + * Returns the label of the type. + * + * @since 3.7 + * + * @return string + * + * @phpstan-return non-empty-string + */ + abstract protected function get_type_label(): string; +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Field_Groups.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Field_Groups.php new file mode 100644 index 0000000..29009fb --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Field_Groups.php @@ -0,0 +1,474 @@ +> + * > + * @phpstan-type LabelsByType array + */ +class Field_Groups { + public const CACHE_KEY = 'pll_acf_field_labels'; + + /** + * @var array|null + * + * @phpstan-var LabelsByType|null + */ + private $labels; + + /** + * Setups actions and filters. + * + * @since 3.7 + * + * @return void + */ + public function on_acf_init(): void { + add_action( 'acf/updated_field', array( self::class, 'clear_cache' ) ); + add_action( 'acf/delete_field', array( self::class, 'clear_cache' ) ); + add_action( 'acf/update_field_group', array( self::class, 'clear_cache' ) ); + add_action( 'acf/delete_field_group', array( self::class, 'clear_cache' ) ); + + if ( PLL() instanceof PLL_Admin_Base ) { + // `pll_register_string()` does nothing outside `PLL_Admin_Base`. No need to loop the fields then. + $this->register_field_groups(); + } + + if ( ! $this->can_translate_labels() ) { + return; + } + + if ( PLL() instanceof PLL_Admin_Base ) { + // Clear the fields cache (filled by `$this->register_field_groups()`) to be able to translate the field labels via the filters. + acf_get_store( 'fields' )->reset(); + } + + add_filter( 'acf/load_field', array( $this, 'translate_field_labels' ), 20 ); // After `child_of_acf_field::load_field()` (prio 10). + add_filter( 'acf/load_field_groups', array( $this, 'translate_field_groups_labels' ), 25 ); // After `_acf_apply_get_local_internal_posts()` (prio 20). + } + + /** + * Clears label translations cache. + * + * @since 3.8 + * + * @return void + */ + public static function clear_cache(): void { + delete_transient( self::CACHE_KEY ); + } + + /** + * Registers the labels of all field groups. + * + * @since 3.7 + * + * @return void + */ + public function register_field_groups() { + $to_register = get_transient( self::CACHE_KEY ); + + if ( ! is_array( $to_register ) ) { + $to_register = array(); + acf_disable_filter( 'clone' ); // To allow seamless clone fields to appear in acf_get_fields(). + + foreach ( acf_get_field_groups() as $field_group ) { + $to_register[] = array( + 'name' => 'Title', + 'string' => $field_group['title'], + ); + $to_register = $this->register_fields( $to_register, acf_get_fields( $field_group ) ); + } + + acf_enable_filter( 'clone' ); + set_transient( self::CACHE_KEY, $to_register ); + } + + foreach ( $to_register as $register_string ) { + pll_register_string( $register_string['name'], $register_string['string'], 'ACF', $register_string['multiline'] ?? false ); + } + } + + /** + * Recursively translates labels that are not originally translated by ACF for the given field. + * + * @since 3.7 + * + * @param array $field The field array. + * @return array + */ + public function translate_field_labels( $field ) { + if ( ! is_array( $field ) || ! isset( $field['type'] ) ) { + return $field; + } + + $matcher = new PLL_Format_Util(); + + foreach ( $this->get_field_labels_to_translate() as $field_type => $field_labels ) { + if ( ! $matcher->matches( $field['type'], $field_type ) ) { + continue; + } + + $field = $this->translate_field_labels_recursive( $field_labels, $field ); + } + + return $field; + } + + /** + * Tells if the labels should be translated in the current context. + * + * @since 3.7 + * + * @return bool + */ + private function can_translate_labels(): bool { + global $pagenow; + + if ( 'admin.php' === $pagenow && isset( $_POST['pll_action'], $_POST[ PLL_Import_Action::NONCE_NAME ] ) + && PLL_Import_Action::ACTION_VALUE === $_POST['pll_action'] + && wp_verify_nonce( $_POST[ PLL_Import_Action::NONCE_NAME ], PLL_Import_Action::ACTION_NAME ) ) { + // Need to translate the labels during import to compare the default values. + return true; + } + + // Polylang's settings pages. + if ( PLL() instanceof PLL_Settings ) { + return false; + } + + // ACF's settings pages. + $acf_post_types = array( 'acf-field-group', 'acf-post-type', 'acf-taxonomy', 'acf-ui-options-page' ); + + if ( 'edit.php' === $pagenow && isset( $_GET['post_type'] ) && in_array( $_GET['post_type'], $acf_post_types, true ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return false; + } + + if ( 'post.php' === $pagenow && isset( $_GET['post'] ) && in_array( get_post_type( (int) $_GET['post'] ), $acf_post_types, true ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return false; + } + + return true; + } + + /** + * Recursively translates the given labels for the given field or subset of a field (e.g subfields or layouts). + * + * @since 3.7 + * + * @param array $labels An array of labels to translate with label keys as array keys and label names as array values. + * @param array $field A custom field definition. + * @return array The translated labels. + * + * @phpstan-param LabelsMap $labels + */ + private function translate_field_labels_recursive( array $labels, array $field ) { + $matcher = new PLL_Format_Util(); + + if ( isset( $field['default_value'] ) ) { + // Stores the untranslated default value for later use. + $field['pll_default_value'] = $field['default_value']; + } + + foreach ( $labels as $field_key => $sub_labels ) { + $field_filtered = $matcher->filter_list( $field, $field_key ); + + foreach ( $field_filtered as $key => $field_value ) { + if ( is_array( $sub_labels ) ) { + /** + * `$sub_labels` is like: + * array( + * 'default_value' => _x( 'Default value', 'ACF field setting label', 'polylang-pro' ), + * 'placeholder' => _x( 'Placeholder', 'ACF field setting label', 'polylang-pro' ), + * ) + */ + if ( is_array( $field_value ) ) { + $field[ $key ] = $this->translate_field_labels_recursive( $sub_labels, $field_value ); + } + } elseif ( '' !== $field_value ) { + $field[ $key ] = pll__( $field_value ); + } + } + } + + return $field; + } + + /** + * Translates all the ACF field groups labels. + * + * We hook to 'acf/load_field_groups' instead 'acf/translate_field_group', + * not to be overridden by ACF when its local store is enabled. + * + * @see _acf_apply_get_local_internal_posts() + * + * @since 3.7 + * + * @param array[] $posts An array of ACF posts. + * @return array[] The array of ACF posts with the translated post title. + */ + public function translate_field_groups_labels( $posts ) { + foreach ( $posts as $key => $post ) { + $posts[ $key ]['title'] = pll__( $post['title'] ); + } + return $posts; + } + + /** + * Registers the labels of fields. + * The method is recursive for layout fields. + * + * @since 3.7 + * + * @param array $to_register List of strings to register. + * @param array $fields An array of Custom field definitions. + * @return array + * + * @phpstan-return list + */ + private function register_fields( array $to_register, array $fields ): array { + foreach ( $fields as $field ) { + if ( ! acf_is_field_type( $field['type'] ) ) { + // Avoid error if, for example, a repeater is created in ACF Pro and used later in ACF. + continue; + } + + switch ( $field['type'] ) { + case 'group': + case 'repeater': + $to_register = $this->register_fields( $to_register, $field['sub_fields'] ); + break; + case 'flexible_content': + foreach ( $field['layouts'] as $layout ) { + $to_register = $this->register_fields( $to_register, $layout['sub_fields'] ); + } + break; + } + + $matcher = new PLL_Format_Util(); + foreach ( $this->get_field_labels_to_translate() as $field_type => $field_labels ) { + if ( ! is_string( $field['type'] ) || ! $matcher->matches( $field['type'], (string) $field_type ) ) { + continue; + } + + $to_register = $this->register_field( $to_register, $field_labels, $field ); + } + } + + return $to_register; + } + + /** + * Registers the labels of a field recursively. + * + * @since 3.7 + * + * @param array $to_register List of strings to register. + * @param array $labels An array of labels to register with label keys as array keys and label names as array values. + * @param array $field A custom field definition. + * @return array + * + * @phpstan-param LabelsMap $labels + * @phpstan-return list + */ + private function register_field( array $to_register, array $labels, array $field ): array { + $matcher = new PLL_Format_Util(); + + foreach ( $labels as $field_key => $label ) { + $field_filtered = $matcher->filter_list( $field, $field_key ); + + foreach ( $field_filtered as $field_value ) { + if ( is_array( $label ) ) { + /** + * `$label` is like: + * array( + * 'default_value' => _x( 'Default value', 'ACF field setting label', 'polylang-pro' ), + * 'placeholder' => _x( 'Placeholder', 'ACF field setting label', 'polylang-pro' ), + * ) + */ + if ( is_array( $field_value ) ) { + $to_register = $this->register_field( $to_register, $label, $field_value ); + } + } else { + $to_register[] = array( + 'name' => $label, + 'string' => $field_value, + 'multiline' => true, + ); + } + } + } + + return $to_register; + } + + /** + * Returns the list of field labels to translate, by field type and label key. + * Wildcards are supported for the field types and label keys. + * + * @since 3.7 + * + * @return array { + * An array with field types as array keys, and recursive sub-arrays as array values. + * These sub-arrays have label keys as array keys, and label names as array values. + * + * Ex: + * array( + * 'custom_field_type' => array( + * 'custom_field_key' => 'Custom field key', + * 'another_field_key' => array( + * 'first_choice' => 'First choice', + * 'second_choice' => 'Second choice', + * ), + * ), + * ) + * } + * + * @phpstan-return LabelsByType + */ + private function get_field_labels_to_translate(): array { + if ( is_array( $this->labels ) ) { + return $this->labels; + } + + $labels = array( + 'default_value' => _x( 'Default value', 'ACF field setting label', 'polylang-pro' ), + 'placeholder' => _x( 'Placeholder', 'ACF field setting label', 'polylang-pro' ), + 'prepend' => _x( 'Prefix', 'ACF field setting label', 'polylang-pro' ), + 'append' => _x( 'Suffix', 'ACF field setting label', 'polylang-pro' ), + 'message' => _x( 'Message', 'ACF field setting label', 'polylang-pro' ), + 'ui_on_text' => _x( 'ON text', 'ACF field setting label', 'polylang-pro' ), + 'ui_off_text' => _x( 'OFF text', 'ACF field setting label', 'polylang-pro' ), + 'choice' => _x( 'Choice', 'ACF field setting label', 'polylang-pro' ), + 'label' => _x( 'Label', 'ACF field setting label', 'polylang-pro' ), + ); + + $this->labels = array( + '*' => array( + 'label' => $labels['label'], + 'instructions' => _x( 'Instructions', 'ACF field setting label', 'polylang-pro' ), + ), + 'button_group' => array( + 'choices' => array( + '*' => $labels['choice'], + ), + ), + 'checkbox' => array( + 'choices' => array( + '*' => $labels['choice'], + ), + ), + 'email' => array( + 'default_value' => $labels['default_value'], + 'placeholder' => $labels['placeholder'], + 'prepend' => $labels['prepend'], + 'append' => $labels['append'], + ), + 'flexible_content' => array( + 'layouts' => array( + '*' => array( + 'label' => $labels['label'], + ), + ), + ), + 'number' => array( + 'placeholder' => $labels['placeholder'], + 'prepend' => $labels['prepend'], + 'append' => $labels['append'], + ), + 'message' => array( + 'message' => $labels['message'], + ), + 'password' => array( + 'placeholder' => $labels['placeholder'], + 'prepend' => $labels['prepend'], + 'append' => $labels['append'], + ), + 'radio' => array( + 'choices' => array( + '*' => $labels['choice'], + ), + ), + 'range' => array( + 'prepend' => $labels['prepend'], + 'append' => $labels['append'], + ), + 'select' => array( + 'choices' => array( + '*' => $labels['choice'], + ), + ), + 'text' => array( + 'default_value' => $labels['default_value'], + 'placeholder' => $labels['placeholder'], + 'prepend' => $labels['prepend'], + 'append' => $labels['append'], + ), + 'textarea' => array( + 'default_value' => $labels['default_value'], + 'placeholder' => $labels['placeholder'], + ), + 'true_false' => array( + 'message' => $labels['message'], + 'ui_on_text' => $labels['ui_on_text'], + 'ui_off_text' => $labels['ui_off_text'], + ), + 'url' => array( + 'default_value' => $labels['default_value'], + 'placeholder' => $labels['placeholder'], + ), + 'wysiwyg' => array( + 'default_value' => $labels['default_value'], + ), + ); + + /** + * Filters the list of field keys to translate, by field type. + * Wildcards are supported for the field types. + * + * @var array $labels array { + * An array with field types as array keys, and recursive sub-arrays as array values. + * These sub-arrays have label keys as array keys, and label names as array values. + * + * Ex: + * array( + * 'custom_field_type' => array( + * 'custom_field_key' => 'Custom field key', + * 'another_field_key' => array( + * 'first_choice' => 'First choice', + * 'second_choice' => 'Second choice', + * ), + * ), + * ) + * } + */ + $labels = apply_filters( 'pll_acf_field_labels_to_translate', $this->labels ); + + if ( is_array( $labels ) ) { + $this->labels = $labels; + } + + return $this->labels; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Post_Type.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Post_Type.php new file mode 100644 index 0000000..15f7705 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Post_Type.php @@ -0,0 +1,70 @@ + + */ + protected function get_type_objects(): array { + return $GLOBALS['wp_post_types']; + } + + /** + * Returns the label of the type. + * + * @since 3.7 + * + * @return string + * + * @phpstan-return non-empty-string + */ + protected function get_type_label(): string { + return 'Post Type'; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Taxonomy.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Taxonomy.php new file mode 100644 index 0000000..b1552b3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Labels/Taxonomy.php @@ -0,0 +1,70 @@ + + */ + protected function get_type_objects(): array { + return $GLOBALS['wp_taxonomies']; + } + + /** + * Returns the label of the type. + * + * @since 3.7 + * + * @return string + * + * @phpstan-return non-empty-string + */ + protected function get_type_label(): string { + return 'Taxonomy'; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Location_Language.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Location_Language.php new file mode 100644 index 0000000..932d5eb --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Location_Language.php @@ -0,0 +1,115 @@ +name = 'language'; + $this->label = __( 'Language', 'polylang-pro' ); + $this->category = $this->label; // Create a new category with the same name. + } + + /** + * Matches the provided rule against the screen args returning a bool result. + * + * @since 3.7 + * + * @param array $rule The location rule. + * @param array $screen The screen args. + * @param array $field_group The field group settings. + * @return bool + */ + public function match( $rule, $screen, $field_group ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $language = pll_current_language(); + return empty( $language ) || $this->compare_to_rule( $language, $rule ); + } + + /** + * Returns an array of possible values for this rule type. + * + * @since 3.7 + * + * @param array $rule A location rule. + * @return array + */ + public function get_values( $rule ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return array_combine( pll_languages_list(), pll_languages_list( array( 'fields' => 'name' ) ) ); + } + + /** + * Checks if the field group has a language location rule. + * + * @since 3.7.1 + * + * @param array $field_group Field group definition. + * @return bool True if the field group has a language location rule, false otherwise. + */ + public static function has_language_location_rule( array $field_group ): bool { + if ( empty( $field_group ) ) { + return false; + } + + if ( empty( $field_group['location'] ) ) { + return false; + } + + foreach ( $field_group['location'] as $location ) { + foreach ( $location as $rule ) { + if ( 'language' === $rule['param'] ) { + return true; + } + } + } + + return false; + } + + /** + * Gets the ACF field group of a field (including nested fields within repeaters, flexible content, or other complex field types). + * + * @since 3.7.3 + * + * @param array $field Custom field definition. + * + * @return array The field group array on success, an empty array on failure. + */ + public static function get_field_group_from_field( array $field ): array { + if ( 0 === $field['ID'] ) { + // New field. + $field_group = acf_get_field_group( 0 ); + return ! empty( $field_group ) ? $field_group : array(); + } + + if ( empty( $field['parent'] ) ) { + return array(); + } + + $field_group = acf_get_field_group( $field['parent'] ); + if ( ! empty( $field_group ) ) { + return $field_group; + } + + // If not a field group, get parent field and continue. + $parent_field = acf_get_field( $field['parent'] ); + return $parent_field ? self::get_field_group_from_field( $parent_field ) : array(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Main.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Main.php new file mode 100644 index 0000000..47fa077 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Main.php @@ -0,0 +1,131 @@ +field_settings = new Field_Settings(); + $this->field_groups_labels = new Field_Groups(); + $this->post_types_labels = new Post_Type(); + $this->taxonomies_labels = new Taxonomy(); + $this->translation_instructions = new Translation_Instructions(); + } + + /** + * Initializes filters for ACF. + * + * @since 2.0 + * + * @return void + */ + public function on_acf_init(): void { + $this->field_settings->on_acf_init(); + $this->translation_instructions->on_acf_init(); + + /** + * Filters whether ACF labels translation should be enabled. + * This allows users to completely disable ACF labels translation (fields, post types, taxonomies) if they don't need it. + * + * @since 3.7.5 + * + * @param bool $enabled Whether ACF labels translation is enabled. Default true. + */ + $labels_translation_enabled = apply_filters( 'pll_enable_acf_labels_translation', true ); + if ( $labels_translation_enabled ) { + $this->field_groups_labels->on_acf_init(); + $this->post_types_labels->on_acf_init(); + $this->taxonomies_labels->on_acf_init(); + } + + Dispatcher::on_acf_init(); + + acf_register_location_type( Location_Language::class ); + + add_filter( 'acf/get_taxonomies', array( $this, 'get_taxonomies' ) ); + add_filter( 'pll_get_post_types', array( $this, 'get_post_types' ) ); + add_action( 'init', array( Dispatcher::class, 'on_blocks_registered' ), 999 ); // Late so blocks have a chance to register, usually done on `init`. + + PLL()->model->cache->clean( 'post_types' ); // A bit hacky. + } + + /** + * Tells whether or not ACF integration can be used. + * + * @since 3.7 + * + * @return bool True if the integration can be used, false otherwise. + */ + public static function can_use(): bool { + return defined( 'ACF_VERSION' ) && version_compare( ACF_VERSION, '6.0.0', '>=' ); + } + + /** + * Prevents ACF to display our private taxonomies. + * + * @since 2.8 + * + * @param string[] $taxonomies Taxonomy names. + * @return string[] + */ + public function get_taxonomies( $taxonomies ) { + return array_diff( $taxonomies, get_taxonomies( array( '_pll' => true ) ) ); + } + + /** + * Makes sure not to translate the Field Groups post type. + * + * @since 2.0 + * @since 3.7 Removed second param and disallow to translate the field groups. + * + * @param string[] $post_types List of post types. + * @return string[] + */ + public function get_post_types( $post_types ) { + unset( $post_types['acf-field-group'] ); + return $post_types; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/README.md b/wp-content/plugins/polylang-pro/src/integrations/ACF/README.md new file mode 100644 index 0000000..2997fdc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/README.md @@ -0,0 +1,42 @@ +# ACF Integration + +Integration with Advanced Custom Fields Pro, bootstrapped in `acf/load.php` with `Main` main object. +All names take place in `WP_Syntex\Polylang_Pro\Integrations\ACF` namespace. + +## How field translation works + +### For standard custom fields + +`Dispatcher` applies strategies to custom fields of `Entity\Abstract_Object` objects (posts or terms) as well as ACF blocks. +These strategies follow the Strategy Pattern to make fields benefit from Polylang Pro core features such as: + +| Feature | Strategy | +| --- | --- | +| New post translation creation | `Strategy\Copy` | +| Synchronization on post/term update | `Strategy\Synchronize` | +| Bulk translate | `Strategy\Copy` or `Strategy\Copy_All` | +| Export, import and machine translation | `Strategy\Export`, `Strategy\Import` and `Strategy\Abstract_Collect_Ids` | + +### For block fields + +Import, export, machine translation and smart synchronization for fields containing IDs are supported thanks to `Entity\Blocks` class. This class is able to apply any strategy to a list of blocks thanks to `Entity\Blocks::apply_on_blocks()`. + +### Note on language location + +To provide end users a way to have field groups displayed only for specific language, a custom location is provided with `Location\Language`. + +## Translated labels + +Now that field groups are not translatable anymore, the only way to have them displayed in several languages is using strings translations. +This new feature lays in `Labels\Field_Groups`. +Note that the integration offers the same feature for ACF post types and taxonomies (`Labels\Abstract_Object_Type`). + +## Editor + +Integration with editors UI can be found in `Post` and `Term` (see `admin_enqueue_scripts()` and `on_ajax_post/term_lang_choice()`), as well as in `Dispatcher` (see `add_language_to_query()`) and `acf/js/index.js`. + +## Migration from Polylang Pro prior to 3.7 + +Field groups are not translated at all now. For sites having translated field groups with Polylang Pro < 3.7, a migration will occur on update. +This migration will update each field groups with a location corresponding to the formerly assigned language. +The related code can be found in `WP_Syntex\Polylang_Pro\Upgrade::upgrade_3_7()`. diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Abstract_Collect_Ids.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Abstract_Collect_Ids.php new file mode 100644 index 0000000..49fe54a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Abstract_Collect_Ids.php @@ -0,0 +1,86 @@ +linked_ids = array_merge( + $this->linked_ids, + $this->get_ids_from_field( $value, $field ) + ); + + return $value; + } + + /** + * Recursively checks if a field can be collected. + * + * @since 3.7 + * + * @param array $field Custom field definition. + * @return bool + */ + protected function can_execute_recursive( array $field ): bool { + if ( isset( $field['translations'] ) && 'ignore' !== $field['translations'] ) { + return true; + } + + return parent::can_execute_recursive( $field ); + } + + /** + * Returns the collected entities IDs. + * + * @since 3.7 + * + * @param Translatable_Entity_Interface $object Object holding the logic to apply the strategy. + * @return int[] + */ + public function get( Translatable_Entity_Interface $object ): array { + $object->apply_to_all_fields( $this ); + + return $this->linked_ids; + } + + /** + * Collects the object IDs of a field. + * + * @since 3.7 + * + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @return int[] Custom field value. + */ + abstract protected function get_ids_from_field( $value, array $field ); +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Abstract_Strategy.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Abstract_Strategy.php new file mode 100644 index 0000000..813ebcb --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Abstract_Strategy.php @@ -0,0 +1,386 @@ +can_execute[ $key ] ) ) { + $this->can_execute[ $key ] = $this->can_execute_recursive( $field ); + } + + return $this->can_execute[ $key ]; + } + + /** + * Applies the translation strategy. + * + * Depending on the type of fields, this will copy / synchronize a layout or + * auto-translate object ids. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args { + * Array of arguments. + * + * @type mixed $original_value Optional. The translated value of the field, if any. + * } + * @return mixed Custom field value of the target object. + */ + public function execute( Abstract_Object $object, $value, array $field, array $args = array() ) { + $args = wp_parse_args( $args, array( 'original_value' => null ) ); + + if ( ! $this->can_execute( $field ) ) { + return $args['original_value']; + } + + if ( ! acf_is_field_type( $field['type'] ) ) { + // Avoid error if, for example, a repeater is created in ACF Pro and used later in ACF. + return $value; + } + + if ( empty( $value ) ) { + return $value; + } + + switch ( $field['type'] ) { + /* + * For ACF `flexible_content`, `repeater`, `clone` and `group` fields, ACF gets their real value (null) as their original value + * and not an array of their subfields. So, in this case, we force this original value to an empty array to be able to call + * `apply_on_rows()` method to copy subfields and make their translation. + */ + case 'flexible_content': + if ( is_array( $value ) ) { + $args['original_value'] = is_array( $args['original_value'] ) ? $args['original_value'] : array(); + $value = $this->apply_on_layouts( $object, $value, $field, $args ); + } + break; + case 'repeater': + if ( is_array( $value ) ) { + $args['original_value'] = is_array( $args['original_value'] ) ? $args['original_value'] : array(); + $value = $this->apply_on_rows( $object, $value, $field, $args ); + } + break; + case 'clone': + case 'group': + if ( is_array( $value ) ) { + $args['original_value'] = is_array( $args['original_value'] ) ? $args['original_value'] : array(); + $value = $this->apply_on_group( $object, $value, $field, $args ); + } + break; + default: + $value = $this->apply( $object, $value, $field, $args ); + } + + return $value; + } + + /** + * Recursively checks if the translation strategy can be applied. + * + * @since 3.7 + * + * @param array $field Custom field definition. + * @return bool + */ + protected function can_execute_recursive( array $field ): bool { + if ( ! acf_is_field_type( $field['type'] ) ) { + // Avoid error if, for example, a repeater is created in ACF Pro and used later in ACF. + return false; + } + + switch ( $field['type'] ) { + case 'flexible_content': + foreach ( $field['layouts'] as $layout ) { + foreach ( $layout['sub_fields'] as $sub_field ) { + if ( $this->can_execute( $sub_field ) ) { + return true; + } + } + } + break; + + case 'clone': + case 'group': + case 'repeater': + foreach ( $field['sub_fields'] as $sub_field ) { + if ( $this->can_execute( $sub_field ) ) { + return true; + } + } + break; + } + + return false; + } + + /** + * Executes the strategy on a given field. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args Array of arguments. + * @return mixed Custom field value of the target object. + */ + abstract protected function apply( Abstract_Object $object, $value, array $field, array $args = array() ); + + /** + * Copies or synchronizes subfields in a repeater or flexible content field. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param array $values Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args { + * Array of arguments. + * + * @type mixed $original_value The translated value of the field, if any. + * } + * @return array Custom field value of the target object. + */ + protected function apply_on_rows( Abstract_Object $object, array $values, array $field, array $args = array() ): array { + if ( empty( $field['sub_fields'] ) ) { + return $values; + } + + $original_value = $args['original_value']; + + foreach ( $field['sub_fields'] as $subfield ) { + foreach ( $values as $row => $subvalues ) { + if ( ! is_array( $subvalues ) ) { + continue; + } + + + $subfield['pll_key'] = $this->get_field_key( $field ) . '_' . $row . '_' . $subfield['key']; // Adds an entry in `subfield` with the full path of the field. + $args['original_value'] = $original_value[ $row ] ?? null; + $values[ $row ] = $this->apply_on_subfield( + $object, + $subvalues, + $subfield, + $args + ); + } + } + + return $values; + } + + /** + * Walks through layouts and apply the strategy to their subfields. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param array $values Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args Array of arguments. + * @return array Custom field value of the target object. + */ + protected function apply_on_layouts( Abstract_Object $object, array $values, array $field, array $args = array() ): array { + if ( empty( $field['layouts'] ) ) { + return $values; + } + + foreach ( $field['layouts'] as $layout ) { + if ( empty( $layout['sub_fields'] ) ) { + continue; + } + + $values = $this->apply_on_rows( $object, $values, $layout, $args ); + } + + return $values; + } + + /** + * Copies or synchronizes sub fields in a group or clone field. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param array $values Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args Array of arguments. + * @return array Custom field value of the target object. + */ + protected function apply_on_group( Abstract_Object $object, array $values, array $field, array $args = array() ): array { + foreach ( $field['sub_fields'] as $subfield ) { + $subfield['pll_key'] = $this->get_field_key( $subfield ) . '_' . $subfield['key']; // Adds an entry in `subfield` with the full path of the field. + $values = $this->apply_on_subfield( + $object, + $values, + $subfield, + $args + ); + } + + return $values; + } + + /** + * Copies or synchronizes subfield values. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param array $subvalues Custom field values of the source object. + * @param array $subfield Custom subfield definition. + * @param array $args { + * Array of arguments. + * + * @type mixed $original_value The translated value of the field, if any. + * } + * @return array Custom field value of the target object. + */ + protected function apply_on_subfield( Abstract_Object $object, array $subvalues, array $subfield, array $args = array() ): array { + if ( empty( $subfield['parent'] ) ) { + // Not a subfield. + return $subvalues; + } + + if ( ! $this->can_execute( $subfield ) ) { + if ( isset( $args['original_value'][ $subfield['key'] ] ) ) { + // If original values are hold with field key. + $subvalues[ $subfield['key'] ] = $args['original_value'][ $subfield['key'] ]; + } elseif ( isset( $args['original_value'][ $subfield['name'] ] ) ) { + // If original values are hold with field name. + $subvalues[ $subfield['name'] ] = $args['original_value'][ $subfield['name'] ]; + } else { + // Strip out the subfield if it can't be executed so the value won't be processed. + unset( $subvalues[ $subfield['name'] ], $subvalues[ $subfield['key'] ] ); + } + return $subvalues; + } + + if ( isset( $subvalues[ $subfield['name'] ] ) ) { + // Is the group value update with field name as key? + $selector = $subfield['name']; + } elseif ( isset( $subvalues[ $subfield['key'] ] ) ) { + // Is the group value update with field key as key? + $selector = $subfield['key']; + } + + if ( empty( $selector ) ) { + return $subvalues; + } + + $args['original_value'] = $args['original_value'][ $selector ] ?? null; + + $subvalues[ $selector ] = $this->execute( + $object, + $subvalues[ $selector ], + $subfield, + $args + ); + + return $subvalues; + } + + /** + * Returns the field key to use. + * Used to have a steady way of finding nested fields. + * + * @since 3.7 + * + * @param array $field Field definition. + * @return string Field key. + */ + protected function get_field_key( array $field ): string { + /* + * Why look for these keys in this order? + * #1: `pll_key` should be defined most of the time, it's used to prepend parent key + * to keep track of fields hierarchy and identify them easily during export/import. + * #2: `_key` ensures to look for the original key in case the field is a seamless clone for instance. + * #3: `key` the standard field key. + */ + return $field['pll_key'] ?? $field['__key'] ?? $field['key']; + } + + /** + * Determines if a field's value is the default value. + * + * @since 3.8 + * + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args { + * Array of arguments. + * + * @type PLL_Language $source_language Optional. The language object of the source object. + * @type mixed $original_value Optional. The translated value of the field, if any. + * } + * + * @return bool True if it's the default value, false otherwise. + */ + protected function is_field_default_value( $value, array $field, array $args = array() ): bool { + if ( ! isset( $field['pll_default_value'], $args['source_language'] ) || ! $args['source_language'] instanceof PLL_Language ) { + return false; + } + + $default_value_in_source_language = $this->get_translated_default_value( $field, $args['source_language'] ); + + return $default_value_in_source_language === $value; + } + + /** + * Translates the field default value if applicable. + * + * @since 3.7.2 + * + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args Array of arguments. + * @return mixed Custom field value of the target object. + */ + protected function maybe_translate_field_default_value( $value, array $field, array $args = array() ) { + return $this->is_field_default_value( $value, $field, $args ) ? $args['original_value'] : $value; + } + + /** + * Gets the translated default value for a field in the specified language. + * + * @since 3.8 + * + * @param array $field Custom field definition. + * @param PLL_Language $language The specified language object. + * @return mixed The translated default value, or the original if no translation exists. + */ + protected function get_translated_default_value( array $field, PLL_Language $language ) { + return ! is_string( $field['pll_default_value'] ) ? $field['pll_default_value'] : pll_translate_string( $field['pll_default_value'], $language->slug ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Collect_Post_Ids.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Collect_Post_Ids.php new file mode 100644 index 0000000..aa1974a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Collect_Post_Ids.php @@ -0,0 +1,43 @@ +options['media_support'] && is_numeric( $value ) ) { + return array( (int) $value ); + } + break; + case 'gallery': + if ( PLL()->options['media_support'] && is_array( $value ) ) { + return array_map( 'intval', $value ); + } + break; + } + + return array(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Collect_Term_Ids.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Collect_Term_Ids.php new file mode 100644 index 0000000..0d7cde7 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Collect_Term_Ids.php @@ -0,0 +1,41 @@ +options['media_support'] && is_numeric( $value ) ) { + $value = $this->translate_media( (int) $value, $args['target_language'] ); + } + break; + case 'gallery': + if ( PLL()->options['media_support'] && is_array( $value ) ) { + $value = $this->translate_gallery( $value, $args['target_language'] ); + } + break; + case 'post_object': + case 'relationship': + $value = $this->translate_post( $value, $args['target_language'] ); + break; + case 'taxonomy': + if ( pll_is_translated_taxonomy( $field['taxonomy'] ) ) { + $value = $this->translate_term( $value, $args['target_language'] ); + } + break; + case 'page_link': + if ( is_array( $value ) || is_int( $value ) || is_string( $value ) ) { + $value = $this->translate_page_link( $value, $args['target_language'] ); + } + break; + case 'wysiwyg': + if ( is_string( $value ) ) { + $value = PLL()->sync_content->translate_content( + $value, + null, + $args['target_language'] + ); + + } + break; + } + + return $this->maybe_translate_field_default_value( $value, $field, $args ); + } + + /** + * Recursively checks if a field can be copied. + * + * @since 3.7 + * + * @param array $field Custom field definition. + * @return bool + */ + protected function can_execute_recursive( array $field ): bool { + if ( isset( $field['translations'] ) && 'ignore' !== $field['translations'] ) { + return true; + } + + return parent::can_execute_recursive( $field ); + } + + /** + * Translates a media field. + * + * @since 3.7 + * + * @param int $value Custom field value of the source object. + * @param PLL_Language $lang Language object of the target object. + * @return int Custom field value of the target object. + */ + protected function translate_media( int $value, PLL_Language $lang ): int { + $tr_id = pll_get_post( $value, $lang ); + + if ( $tr_id ) { + return $tr_id; + } + + return PLL()->model->post->create_media_translation( $value, $lang ); + } + + /** + * Translates media ids in a gallery field. + * + * @since 3.7 + * + * @param int[] $values Custom field value of the source object. + * @param PLL_Language $lang Language object of the target object. + * @return string[] Custom field value of the target object. + * + * @phpstan-param array $values + * @phpstan-return list + */ + protected function translate_gallery( array $values, PLL_Language $lang ): array { + $return = array(); + + foreach ( $values as $value ) { + $return[] = $this->translate_media( (int) $value, $lang ); + } + + /** @phpstan-var list */ + return array_map( 'strval', $return ); // See `acf_field_gallery::update_value()`. + } + + /** + * Translates post IDs relationship and post object fields. + * + * @since 3.7 + * + * @param mixed $value Custom field value of the source object. + * @param PLL_Language $lang Language object of the target object. + * @return int|string[] Custom field value of the target object. + * + * @phpstan-return ( + * $value is array ? list : int + * ) + */ + protected function translate_post( $value, PLL_Language $lang ) { + if ( is_numeric( $value ) ) { + $value = (int) $value; + $post_type = get_post_type( $value ); + + if ( ! $post_type || ! pll_is_translated_post_type( $post_type ) ) { + // Same ID for not-translated languages. + return $value; + } + + return (int) pll_get_post( $value, $lang ); + } + + if ( is_array( $value ) ) { + $return = array(); + foreach ( $value as $id ) { + $return[] = (int) $this->translate_post( $id, $lang ); + } + + /** @phpstan-var list */ + return array_map( 'strval', $return ); // See the method update_value() for these fields. + } + + // Something went wrong. + return 0; + } + + /** + * Translates term ids in a taxonomy field. + * + * @since 3.7 + * + * @param mixed $value Custom field value of the source object. + * @param PLL_Language $lang Language object of the target object. + * @return int|int[] Custom field value of the target object. + * + * @phpstan-return ( + * $value is array ? list : int + * ) + */ + protected function translate_term( $value, PLL_Language $lang ) { + if ( is_numeric( $value ) ) { + return (int) pll_get_term( (int) $value, $lang ); + } + + if ( is_array( $value ) ) { + $return = array(); + foreach ( $value as $id ) { + $return[] = (int) $this->translate_term( $id, $lang ); + } + + return $return; + } + + // Something went wrong. + return 0; + } + + /** + * Translates a page link field. + * + * @since 3.7 + * + * @param int|string|(int|string)[] $value Custom field value of the source object. + * @param PLL_Language $lang Language slug of the target object. + * @return int|string|string[] Custom field value of the target object. + */ + protected function translate_page_link( $value, PLL_Language $lang ) { + if ( is_numeric( $value ) ) { + return (int) pll_get_post( (int) $value, $lang ); + } + + if ( is_array( $value ) ) { + // Multiple choices. + $return = array(); + foreach ( $value as $p ) { + if ( is_numeric( $p ) ) { + $return[] = (int) pll_get_post( (int) $p, $lang ); + } elseif ( is_string( $p ) ) { + $return[] = $this->translate_cpt_archive_link( $p, $lang ); // Archive. + } + } + return array_map( 'strval', $return ); // See `acf_field_page_link::update_value()`. + } + + return $this->translate_cpt_archive_link( $value, $lang ); // Archive. + } + + /** + * Translates a CPT archive link in a page link field. + * + * @since 2.3.6 + * @since 3.7 `$lang` is a `PLL_Language` instead of a string. + * + * @param string $link CPT archive link. + * @param PLL_Language $lang Language object of the target object. + * @return string Modified link. + */ + protected function translate_cpt_archive_link( string $link, PLL_Language $lang ): string { + /* + * ACF doesn't use correctly `home_url()` function. It makes this URL not end with a trailing slash. + * It makes our `PLL_Links_Model::switch_language_in_link()` not work correctly in this case. + * @see https://github.com/AdvancedCustomFields/acf/blob/6.3.8/includes/fields/class-acf-field-page_link.php#L174 + */ + if ( home_url() === $link ) { + $link = home_url( '/' ); + } + + $show_on_front = get_option( 'show_on_front' ); + $page_for_posts = get_option( 'page_for_posts' ); + + if ( 'page' === $show_on_front && is_numeric( $page_for_posts ) ) { + // Gets `page_for_posts` URL of the target language. + $post_archive_link = get_permalink( $lang->page_for_posts ); + return ! empty( $post_archive_link ) ? $post_archive_link : $link; + } + + $link = PLL()->links_model->switch_language_in_link( $link, $lang ); + + if ( ! isset( PLL()->translate_slugs ) ) { + return $link; + } + + foreach ( PLL()->translate_slugs->slugs_model->get_translatable_slugs() as $type => $data ) { + // Unfortunately ACF does not pass the post type, so let's try with all post type archives. + if ( 0 === strpos( $type, 'archive_' ) ) { + $link = PLL()->translate_slugs->slugs_model->switch_translated_slug( $link, $lang, $type ); + } + } + + return $link; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Copy_All.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Copy_All.php new file mode 100644 index 0000000..fb80ff0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Copy_All.php @@ -0,0 +1,28 @@ +export = $export; + } + + /** + * Executes the strategy on a given field. + * Depending on the type of fields, this will add the fields with the translate option to the fields to export. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args { + * Array of arguments. + * + * @type mixed $original_value The translated or default value of the field, if any. + * } + * @return mixed The original value, so the strategy behaves like others. + */ + protected function apply( Abstract_Object $object, $value, array $field, array $args = array() ) { + if ( 'translate_once' === $field['translations'] + && 0 < PLL()->model->{$object->get_type()}->get( $object->get_id(), $args['target_language'] ) ) { + // A translation exists and we're on a `translate_once` field, so return. + return $value; + } + + if ( ! is_string( $value ) || empty( $value ) ) { + return $value; + } + + $original_value = is_string( $args['original_value'] ) ? $args['original_value'] : ''; + + if ( $this->is_field_default_value( $value, $field, $args ) ) { + $translated = $this->get_translated_default_value( $field, $args['target_language'] ); + if ( $translated !== $field['pll_default_value'] ) { + // This string has been translated in our Strings Translations, so DO NOT send it to the export. + return $translated; + } + } + + $this->export->add_translation_entry( + array( + 'object_type' => $object->get_type(), + 'field_type' => 'acf', + 'field_id' => $this->get_field_key( $field ), + 'object_id' => $object->get_id(), + ), + $value, + $original_value === $field['default_value'] ? '' : $original_value // Do not export translated default values. + ); + + return $value; + } + + /** + * Recursively checks if a field can be copied. + * + * @since 3.7 + * + * @param array $field Custom field definition. + * @return bool + */ + protected function can_execute_recursive( array $field ): bool { + if ( isset( $field['translations'] ) && in_array( $field['translations'], array( 'translate', 'translate_once' ), true ) ) { + return true; + } + + return parent::can_execute_recursive( $field ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Import.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Import.php new file mode 100644 index 0000000..8475eae --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Import.php @@ -0,0 +1,119 @@ +translations = $translations; + } + + /** + * Applies the translation strategy. + * + * Depending on the type of fields, this will copy a layout and + * auto-translate object ids and translated custom fields. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args { + * Array of arguments. + * + * @type mixed $original_value Optional. The translated or default value of the field, if any. + * } + * @return mixed Custom field value of the target object. + */ + public function execute( Abstract_Object $object, $value, array $field, array $args = array() ) { + $args = wp_parse_args( $args, array( 'original_value' => null ) ); + + if ( ! $this->can_execute( $field ) ) { + return $args['original_value']; + } + + if ( empty( $value ) ) { + return $value; + } + + if ( ! is_string( $value ) ) { + return parent::execute( $object, $value, $field, $args ); + } + + $args['original_value'] = is_string( $args['original_value'] ) ? $args['original_value'] : ''; + + $entry = new Translation_Entry( + array( + 'singular' => $value, + 'context' => Context::to_string( + array( + Context::FIELD => 'acf', + Context::ID => $this->get_field_key( $field ), + ) + ), + ) + ); + + /* + * Use `translate_entry()` to know whether the entry is in the translation set or not. + * Because `translate()` doesn't return false but the source string if the entry doesn't exist. + */ + if ( ! $this->translations->translate_entry( $entry ) ) { + // The entry is not in the translation set. + + if ( 'translate_once' === $field['translations'] && ! empty( $args['original_value'] ) ) { + /* + * If there is no entry in the translation set and the field is set to `translate_once`, + * it means that it has already been translated. + */ + return $this->is_field_default_value( $value, $field, $args ) + ? $this->get_translated_default_value( $field, $args['target_language'] ) + : $args['original_value']; + } + + if ( $this->is_field_default_value( $value, $field, $args ) ) { + return $this->get_translated_default_value( $field, $args['target_language'] ); + } + return parent::execute( $object, $value, $field, $args ); + } + + $value = $this->translations->translate( $value, $entry->context ); + + return parent::execute( + $object, + $value, + $field, + $args + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Synchronize.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Synchronize.php new file mode 100644 index 0000000..7dea392 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Strategy/Synchronize.php @@ -0,0 +1,206 @@ +copy = $copy; + } + + /** + * Applies the translation strategy. + * + * Depending on the type of fields, this will copy / synchronize a layout or + * auto-translate object ids. + * + * @since 3.7.1 + * + * @param Abstract_Object $object ACF object. + * @param mixed $value Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args { + * Array of arguments. + * + * @type mixed $original_value Optional. The translated value of the field, if any. + * } + * @return mixed Custom field value of the target object. + */ + public function execute( Abstract_Object $object, $value, array $field, array $args = array() ) { + $args = wp_parse_args( $args, array( 'original_value' => null ) ); + + if ( ! $this->can_execute( $field ) ) { + return $args['original_value']; + } + + if ( 'taxonomy' !== $field['type'] ) { + return parent::execute( $object, $value, $field, $args ); + } + + if ( ! isset( $args['target_language'] ) || ! $args['target_language'] instanceof PLL_Language ) { + return $value; + } + + if ( ! pll_is_translated_taxonomy( $field['taxonomy'] ) ) { + // Do not go any further if a taxonomy is not translatable. + return $value; + } + + $value = $this->translate_term( $value, $args['target_language'] ); + + if ( ! empty( $field['save_terms'] ) && isset( $args['target_id'] ) ) { + /* + * Save terms for the target object. + * + * The `acf_field_taxonomy::save_post()` method which assigns terms to the post fired + * by the `'acf/save_post'`action, is only fired for the source post. + * So we have to assign them to the target post ourselves. + */ + wp_set_object_terms( $args['target_id'], $value, $field['taxonomy'] ); + } + + return $value; + } + + /** + * Recursively checks if a field can be synchronized. + * + * @since 3.7 + * + * @param array $field Custom field definition. + * @return bool + */ + protected function can_execute_recursive( array $field ): bool { + if ( isset( $field['translations'] ) && 'sync' === $field['translations'] ) { + return true; + } + + if ( ! acf_is_field_type( $field['type'] ) ) { + // Avoid error if, for example, a repeater is created in ACF Pro and used later in ACF. + return false; + } + + switch ( $field['type'] ) { + case 'clone': + case 'group': + case 'repeater': + foreach ( $field['sub_fields'] as $sub_field ) { + // A child field is synchronized or translatable. Let's synchronize the parent field. + if ( isset( $sub_field['translations'] ) && 'translate' === $sub_field['translations'] ) { + return true; + } + + if ( $this->can_execute( $sub_field ) ) { + return true; + } + } + break; + + case 'flexible_content': + foreach ( $field['layouts'] as $layout ) { + foreach ( $layout['sub_fields'] as $sub_field ) { + // A child field is synchronized or translatable. Let's synchronize the parent field. + if ( isset( $sub_field['translations'] ) && 'translate' === $sub_field['translations'] ) { + return true; + } + + if ( $this->can_execute( $sub_field ) ) { + return true; + } + } + } + break; + } + + return false; + } + + /** + * Copies subfields in a repeater or flexible content field. + * + * @since 3.7 + * + * @param Abstract_Object $object ACF object. + * @param array $values Custom field value of the source object. + * @param array $field Custom field definition. + * @param array $args { + * Array of arguments. + * + * @type PLL_Language $target_language Language object of the target object. + * @type array $original_value The value to return if the field must not be synced/copied. Basically it's + * the field's original value. + * } + * @return array Custom field value of the target object. + */ + protected function apply_on_rows( Abstract_Object $object, array $values, array $field, array $args = array() ): array { + if ( empty( $field['sub_fields'] ) ) { + return $values; + } + + foreach ( $field['sub_fields'] as $subfield ) { + foreach ( $values as $row => $subvalues ) { + if ( preg_match( '/^row-(?.+)$/', (string) $row, $matches ) ) { + // Row already exists, let's update it. + if ( ! is_array( $subvalues ) ) { + continue; + } + + $i = $matches['incr']; + $parent = $this->get_field_key( $field ); + $subfield['pll_key'] = $parent . '_' . $i . '_' . $subfield['key']; // Adds an entry in `subfield` with the full path of the field. + $values[ $row ] = $this->apply_on_subfield( + $object, + $subvalues, + $subfield, + array( + 'target_language' => $args['target_language'], + 'original_value' => $args['original_value'][ $i ] ?? null, + ) + ); + + continue; + } + + // New row added, let's copy it. + $parent = $this->get_field_key( $field ); + $subfield['pll_key'] = $parent . '_' . $row . '_' . $subfield['key']; // Adds an entry in `subfield` with the full path of the field. + $values[ $row ] = $this->copy->apply_on_subfield( + $object, + $subvalues, + $subfield, + array( + 'target_language' => $args['target_language'], + 'original_value' => null, + ) + ); + } + } + + return $values; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/Translation_Instructions.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/Translation_Instructions.php new file mode 100644 index 0000000..1c96e32 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/Translation_Instructions.php @@ -0,0 +1,179 @@ + 'no_translations_settings', + 'required' => 0, + 'label' => esc_html__( 'No translations settings', 'polylang-pro' ), + 'instructions' => esc_html__( 'No translations settings are available for field group with language location rules.', 'polylang-pro' ), + ); + + acf_render_field_instructions( $no_translations_settings ); + return; + } + + if ( $is_legacy_translated_field_group && ! isset( $field_group[ self::SETTING_KEY ] ) ) { + $field_group[ self::SETTING_KEY ] = 1; + } + + acf_render_field_wrap( + array( + 'label' => esc_html__( 'Display translation field instructions', 'polylang-pro' ), + 'instructions' => esc_html__( 'When enabled, the translation field instructions will be displayed below the field label.', 'polylang-pro' ), + 'type' => 'true_false', + 'name' => self::SETTING_KEY, + 'prefix' => 'acf_field_group', + 'value' => $field_group[ self::SETTING_KEY ] ?? 1, + 'ui' => 1, + ) + ); + } + + /** + * Appends the translation instructions to the field label using `acf/prepare_field` hook. + * Hooked to `acf/pre_render_fields` only to ensure instructions are displayed in the editor fields metabox. + * + * @since 3.7 + * @since 3.7.2 Moved from Dispatcher. + * + * @param array $fields The fields being rendered. + * @return array The fields. + */ + public static function append_translation_instructions( $fields ) { + add_filter( 'acf/prepare_field', array( static::class, 'get_field_instructions' ) ); + + return $fields; + } + + /** + * Returns the instructions for the given field. + * + * @since 3.7 + * @since 3.7.2 Moved from Dispatcher. + * + * @param array|false $field The field array or false. + * @return array|false The field array or false. + */ + public static function get_field_instructions( $field ) { + if ( ! is_array( $field ) ) { + return $field; + } + + $field_group = acf_get_field_group( $field['parent'] ); + if ( ! $field_group || ! isset( $field_group[ self::SETTING_KEY ] ) || ! $field_group[ self::SETTING_KEY ] ) { + return $field; + } + + $instructions = ' ' + . self::get_field_instruction( $field ); + + $field['instructions'] = ! empty( $field['instructions'] ) ? $field['instructions'] . '
    ' . $instructions : $instructions; + + return $field; + } + + /** + * Returns the instruction for the given field. + * + * @since 3.7 + * @since 3.7.2 Moved from Dispatcher. + * @since 3.7.5 Changed visibility from private to public. + * + * @param array $field The field. + * @return string The instruction. + */ + public static function get_field_instruction( array $field ): string { + if ( empty( $field ) ) { + return ''; + } + + if ( empty( $field['translations'] ) ) { + if ( in_array( $field['type'], array( 'group', 'repeater', 'clone', 'flexible_content' ), true ) ) { + $copy_strategy = new Copy(); + $sync_strategy = new Synchronize( $copy_strategy ); + + // Sync strategy first, otherwise the copy strategy will catch everything except `ignore`. + if ( $sync_strategy->can_execute( $field ) ) { + return __( 'This field is synchronized.', 'polylang-pro' ); + } + + if ( $copy_strategy->can_execute( $field ) ) { + return __( 'This field is copied.', 'polylang-pro' ); + } + } + } else { + switch ( $field['translations'] ) { + case 'copy_once': + return __( 'This field is copied once.', 'polylang-pro' ); + case 'sync': + return __( 'This field is synchronized.', 'polylang-pro' ); + case 'translate': + return __( 'This field is translated.', 'polylang-pro' ); + case 'translate_once': + return __( 'This field is translated once.', 'polylang-pro' ); + } + } + + return __( 'This field is ignored.', 'polylang-pro' ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/ACF/load.php b/wp-content/plugins/polylang-pro/src/integrations/ACF/load.php new file mode 100644 index 0000000..4887df1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/ACF/load.php @@ -0,0 +1,34 @@ +model->has_languages() ) { + // Run only if Polylang (and its API) is loaded, and if there is at least one language. + return; + } + + PLL_Integrations::instance()->acf = new Main(); + + add_action( 'acf/init', array( PLL_Integrations::instance()->acf, 'on_acf_init' ) ); + } +); diff --git a/wp-content/plugins/polylang-pro/src/integrations/admin-columns/cpac.php b/wp-content/plugins/polylang-pro/src/integrations/admin-columns/cpac.php new file mode 100644 index 0000000..a803898 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/admin-columns/cpac.php @@ -0,0 +1,72 @@ +model->get_translated_post_types() as $type ) { + if ( isset( $_REQUEST['list_screen'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $filter = 'manage_' . ( 'attachment' === $type ? 'upload' : 'edit-' . $type ) . '_columns'; + add_filter( $filter, array( $this, 'remove_filter_lang' ), 90 ); // Before Polylang. + } + + $filter = 'option_cpac_options_' . ( 'attachment' === $type ? 'wp-media' : $type ) . '__default'; + add_filter( $filter, array( $this, 'filter_default_columns' ) ); + } + } + + /** + * Deactivates the admin language filter on Admin Columns settings page. + * + * @since 2.4 + * + * @param array $columns List of table columns. + * @return array + */ + public function remove_filter_lang( $columns ) { + PLL()->filters_columns->filter_lang = ''; + return $columns; + } + + /** + * Fixes the Polylang columns in default columns. + * + * @since 2.4 + * + * @param array $columns List of table columns. + * @return array + */ + public function filter_default_columns( $columns ) { + $screen = get_current_screen(); + + if ( isset( $screen->base ) ) { + $is_post_type = 'edit' === $screen->base && has_filter( 'manage_edit-' . $screen->post_type . '_columns', array( PLL()->filters_columns, 'add_post_column' ) ); + $is_media = 'upload' === $screen->base && has_filter( 'manage_upload_columns', array( PLL()->filters_columns, 'add_post_column' ) ); + + if ( $is_post_type || $is_media ) { + foreach ( pll_languages_list() as $lang ) { + unset( $columns[ 'language_' . $lang ] ); + } + + $columns = PLL()->filters_columns->add_post_column( $columns ); + } + } + + return $columns; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/admin-columns/load.php b/wp-content/plugins/polylang-pro/src/integrations/admin-columns/load.php new file mode 100644 index 0000000..657e87f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/admin-columns/load.php @@ -0,0 +1,25 @@ +model->has_languages() ) { + // Run only if Polylang (and its API) is loaded, and if there is at least one language. + return; + } + + PLL_Integrations::instance()->cpac = new PLL_CPAC(); + + add_action( 'admin_init', array( PLL_Integrations::instance()->cpac, 'init' ) ); + } +); diff --git a/wp-content/plugins/polylang-pro/src/integrations/beaver-builder/flbuilder.php b/wp-content/plugins/polylang-pro/src/integrations/beaver-builder/flbuilder.php new file mode 100644 index 0000000..212ec6b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/beaver-builder/flbuilder.php @@ -0,0 +1,41 @@ +model->has_languages() ) { + // Run only if there is at least one language. + return; + } + + PLL_Integrations::instance()->flbuilder = new PLL_FLBuilder(); + } +); diff --git a/wp-content/plugins/polylang-pro/src/integrations/content-blocks/content-blocks.php b/wp-content/plugins/polylang-pro/src/integrations/content-blocks/content-blocks.php new file mode 100644 index 0000000..b34c113 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/content-blocks/content-blocks.php @@ -0,0 +1,40 @@ +content_blocks = new PLL_Content_Blocks(); + PLL_Integrations::instance()->content_blocks->init(); + } +); diff --git a/wp-content/plugins/polylang-pro/src/integrations/cptui/cptui.php b/wp-content/plugins/polylang-pro/src/integrations/cptui/cptui.php new file mode 100644 index 0000000..bcb3c0b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/cptui/cptui.php @@ -0,0 +1,105 @@ +model->has_languages() ) { + // Run only if there is at least one language. + return; + } + + $keys = array( + '*' => array( + 'label' => 1, + 'singular_label' => 1, + 'description' => 1, + 'labels' => array( + '*' => 1, + ), + ), + ); + + new PLL_Translate_Option( 'cptui_post_types', $keys, array( 'context' => 'CPT UI' ) ); + new PLL_Translate_Option( 'cptui_taxonomies', $keys, array( 'context' => 'CPT UI' ) ); + + if ( $polylang instanceof PLL_Frontend && ! $polylang->options['force_lang'] ) { + // Special case when the language is set from the content as CPT and taxonomies are registered before the language is defined. + add_action( 'pll_language_defined', array( $this, 'pll_language_defined' ) ); + } + } + + /** + * Translates custom post types and taxonomies labels when the language is set from the content. + * + * @since 2.1 + * + * @param array $types Array of registered post types or taxonomies. + * @param array $cptui_types Array of CPT UI post types or taxonomies. + */ + public function translate_registered_types( $types, $cptui_types ) { + foreach ( $types as $name => $type ) { + if ( ! in_array( $name, $cptui_types, true ) ) { + continue; + } + + $type->label = pll__( $type->label ); + $type->description = pll__( $type->description ); + + foreach ( array_keys( get_object_vars( $type->labels ) ) as $key ) { + $type->labels->$key = pll__( $type->labels->$key ); + } + } + } + + /** + * Translates custom post types and taxonomies labels when the language is set from the content. + * + * @since 2.1 + */ + public function pll_language_defined() { + $this->translate_registered_types( $GLOBALS['wp_post_types'], array_keys( get_option( 'cptui_post_types', array() ) ) ); + $this->translate_registered_types( $GLOBALS['wp_taxonomies'], array_keys( get_option( 'cptui_taxonomies', array() ) ) ); + } + + /** + * Add CPT UI post types and taxonomies to Polylang settings. + * + * @since 2.1 + * + * @param string[] $types List of post type or taxonomy names. + * @param bool $is_settings True when displaying the list in Polylang settings. + * @return string[] + */ + public function pll_get_types( $types, $is_settings ) { + if ( $is_settings ) { + $type = substr( current_filter(), 8 ); + $cptui_types = get_option( "cptui_{$type}" ); + + if ( is_array( $cptui_types ) ) { + $types = array_merge( $types, array_keys( $cptui_types ) ); + } + } + return $types; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/cptui/load.php b/wp-content/plugins/polylang-pro/src/integrations/cptui/load.php new file mode 100644 index 0000000..257a4ce --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/cptui/load.php @@ -0,0 +1,19 @@ +cptui = new PLL_CPTUI(); + PLL_Integrations::instance()->cptui->init( $polylang ); + } +); diff --git a/wp-content/plugins/polylang-pro/src/integrations/divi/divi-builder.php b/wp-content/plugins/polylang-pro/src/integrations/divi/divi-builder.php new file mode 100644 index 0000000..8a68984 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/divi/divi-builder.php @@ -0,0 +1,74 @@ +is_active() ) { + wp_update_post( $post ); + } + + return $is_block_editor; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/divi/load.php b/wp-content/plugins/polylang-pro/src/integrations/divi/load.php new file mode 100644 index 0000000..16a680d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/divi/load.php @@ -0,0 +1,23 @@ +model->has_languages() ) { + // Run only if there is at least one language. + return; + } + + PLL_Integrations::instance()->divi_builder = new PLL_Divi_Builder(); + } +); diff --git a/wp-content/plugins/polylang-pro/src/integrations/events-calendar/load.php b/wp-content/plugins/polylang-pro/src/integrations/events-calendar/load.php new file mode 100644 index 0000000..103a575 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/events-calendar/load.php @@ -0,0 +1,19 @@ +tec = new PLL_TEC(); + PLL_Integrations::instance()->tec->init( $polylang ); + } +); diff --git a/wp-content/plugins/polylang-pro/src/integrations/events-calendar/tec.php b/wp-content/plugins/polylang-pro/src/integrations/events-calendar/tec.php new file mode 100644 index 0000000..e36c44a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/events-calendar/tec.php @@ -0,0 +1,1302 @@ +model->has_languages() ) { + // Run only if there is at least one language. + return; + } + + $this->polylang = $polylang; + $this->curlang = null; + $this->slugs_model = ! empty( $polylang->translate_slugs ) && ! empty( $polylang->translate_slugs->slugs_model ) ? $polylang->translate_slugs->slugs_model : null; + $this->is_tec_rest_request = array(); + $this->translatable_slug_ids = array(); + + if ( $polylang->links instanceof PLL_Admin_Links ) { + $this->links = $polylang->links; + + add_filter( 'use_block_editor_for_post', array( $this, 'new_event_translation' ), 5000 ); // Setup TEC translation filters after duplication. + } + + add_action( 'save_post_' . Venue::POSTTYPE, array( $this, 'set_language' ), 10, 3 ); + add_action( 'save_post_' . Organizer::POSTTYPE, array( $this, 'set_language' ), 10, 3 ); + + $tec = TEC::instance(); + + if ( empty( $polylang->options['force_lang'] ) ) { + add_action( 'pll_language_defined', array( $this, 'fix_date_translations' ) ); + } + + self::$metas = array_merge( $tec->metaTags, $tec->venueTags, $tec->organizerTags, array( '_VenueShowMap', '_VenueShowMapLink' ) ); + + add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ), 60 ); // After `Tribe__Events__Query->pre_get_posts()`. + + add_filter( 'pll_copy_post_metas', array( $this, 'copy_post_metas' ) ); + add_filter( 'pll_translate_post_meta', array( $this, 'translate_meta' ), 10, 3 ); + + // Translate links with translated slugs + add_action( 'init', array( $this, 'reset_slugs' ), 11 ); // Just after `Tribe__Events__Main->init()`. + add_filter( 'register_taxonomy_args', array( $this, 'register_taxonomy_args' ), 10, 2 ); + add_filter( 'tribe_events_get_link', array( $this, 'get_link' ) ); + add_filter( 'pll_get_archive_url', array( $this, 'pll_get_archive_url' ), 10, 2 ); + add_filter( 'pll_term_link', array( $this, 'filter_tec_term_link' ), 5, 3 ); // Before `PLL_Translate_Slugs->pll_term_link()`. + add_filter( 'pll_translated_slugs', array( $this, 'pll_translated_slugs' ), 10, 3 ); + add_filter( 'pll_sanitize_string_translation', array( $this, 'sanitize_string_translation' ), 10, 2 ); + add_filter( 'tribe_events_rewrite_i18n_slugs_raw', array( $this, 'rewrite_slugs' ) ); + + // Options to translate. + $keys = array( + 'dateWithYearFormat' => 1, + 'dateWithoutYearFormat' => 1, + 'monthAndYearFormat' => 1, + 'dateTimeSeparator' => 1, + 'timeRangeSeparator' => 1, + 'tribeEventsBeforeHTML' => 1, + 'tribeEventsAfterHTML' => 1, + ); + + $args = array( + 'context' => 'The Events Calendar', + 'sanitize_callback' => array( $this, 'sanitize_strings' ), + ); + + new PLL_Translate_Option( 'tribe_events_calendar_options', $keys, $args ); + + // TEC views V2. + add_filter( 'tribe_events_rewrite_i18n_domains', '__return_empty_array', 10000 ); // No i18n domains, no translations to deal with. + add_filter( 'tribe_events_rewrite_i18n_slugs', array( $this, 'fix_escaped_dashes_in_slugs' ), 10, 2 ); + + add_filter( 'tribe_events_category_slug', array( $this, 'get_category_slug' ) ); + add_filter( 'tribe_events_tag_slug', array( $this, 'get_tag_slug' ) ); + + add_filter( 'tribe_events_views_v2_endpoint_url', array( $this, 'add_missing_lang_to_rest_url' ) ); + add_filter( 'locale', array( $this, 'filter_locale_for_rest' ), 5 ); + + add_filter( 'tribe_events_views_v2_publicly_visible_views_query_args', array( $this, 'add_language_to_publicly_visible_views_query_args' ), 5 ); + add_filter( 'tribe_events_views_v2_view_template_vars', array( $this, 'translate_widget_view_more_link' ), 5 ); + add_filter( 'tribe_rewrite_parse_query_vars', array( $this, 'force_language_on_tec_parse_query_vars' ), 10, 3 ); + add_filter( 'tribe_events_views_v2_url_query_args', array( $this, 'add_missing_lang_to_query_arg' ) ); + add_filter( 'tribe_rewrite_pre_canonical_url', array( $this, 'add_missing_lang_to_non_canonical_url' ), 10, 2 ); + add_filter( 'tribe_rewrite_pre_canonical_url', array( $this, 'remove_name_arg_from_non_canonical_url' ), 10, 2 ); + + add_filter( 'tribe_rewrite_canonical_url', array( $this, 'fix_language_in_canonical_url' ), 5, 2 ); + add_filter( 'tribe_rewrite_canonical_url', array( $this, 'translate_canonical_url' ), 5, 2 ); + } + + /** + * Language and translation management for taxonomies. + * + * @since 2.2 + * + * @param string[] $taxonomies List of taxonomy names for which Polylang manages language and translations. + * @param bool $hide True when displaying the list in Polylang settings. + * @return string[] List of taxonomy names for which Polylang manages language and translations. + */ + public function translate_taxonomies( $taxonomies, $hide ) { + // Hide from Polylang settings + return $hide ? array_diff( $taxonomies, array( TEC::TAXONOMY ) ) : array_merge( $taxonomies, array( TEC::TAXONOMY ) ); + } + + /** + * Language and translation management for custom post types. + * + * @since 2.2 + * + * @param string[] $types List of post type names for which Polylang manages language and translations. + * @param bool $hide True when displaying the list in Polylang settings. + * @return string[] List of post type names for which Polylang manages language and translations. + */ + public function translate_types( $types, $hide ) { + $tec_types = array( TEC::POSTTYPE, TEC::VENUE_POST_TYPE, TEC::ORGANIZER_POST_TYPE ); + return $hide ? array_diff( $types, $tec_types ) : array_merge( $types, $tec_types ); + } + + /** + * Save the language of Venues and Organizers. + * Needed when they are created from the Event form. + * + * @since 2.2 + * + * @param int $post_id Post id. + * @param WP_Post $post Post object. + * @param bool $update Whether it is an update or not. + * @return void + */ + public function set_language( $post_id, $post, $update ) { + if ( $update || ! isset( $_POST['post_lang_choice'] ) ) { + return; + } + + $post_type_object = get_post_type_object( $post->post_type ); + + if ( ! $post_type_object || ! current_user_can( $post_type_object->cap->create_posts ) ) { + return; + } + + check_admin_referer( 'pll_language', '_pll_nonce' ); + $lang = $this->polylang->model->get_language( sanitize_key( $_POST['post_lang_choice'] ) ); + + if ( ! $lang ) { + return; + } + + $this->polylang->model->post->set_language( $post_id, $lang ); + } + + /** + * Once the language is set from content, this resets all the date-related translations in TEC to the current lang. + * In `Tribe__Date_Utils`, TEC stores these translations in static private properties before the language is set in + * PLL. Then these translations are use later, AFTER the language is set in PLL, leading to views exploding due to + * array keys not being set. + * The filter 'tribe_events_get_days_of_week' can't be used because it doesn't include the function's arg `$format`. + * + * @since 3.1 + * @see tribe_events_get_days_of_week() + * + * @return void + */ + public function fix_date_translations() { + $properties = array( + 'localized_months_full', + 'localized_months_short', + 'localized_weekdays', + 'localized_months', + ); + + foreach ( $properties as $property ) { + $property = new ReflectionProperty( Tribe__Date_Utils::class, $property ); + version_compare( PHP_VERSION, '8.1', '<' ) && $property->setAccessible( true ); + $property->setValue( array() ); + } + + TEC::instance()->setup_l10n_strings(); + } + + /** + * Adds TEC meta duplication filters when creating a new event translation. + * + * Hooked to `use_block_editor_for_post` because at this point all required global variables are defined, + * allowing `get_data_from_new_post_translation_request()` to work correctly. + * + * @since 3.7.8 + * + * @param bool $use_block_editor Whether to use the block editor. + * @return bool Unmodified $use_block_editor value. + */ + public function new_event_translation( $use_block_editor ) { + if ( empty( $this->links ) ) { + return $use_block_editor; + } + + $data = $this->links->get_data_from_new_post_translation_request(); + if ( empty( $data ) ) { + return $use_block_editor; + } + + // Add filters to provide default values for event fields from the source event. + foreach ( self::$metas as $meta ) { + $filter = str_replace( array( '_Event', '_Organizer', '_Venue' ), array( '', 'Organizer', 'Venue' ), $meta ); + add_filter( 'tribe_get_meta_default_value_' . $filter, array( $this, 'copy_event_meta' ), 10, 4 ); + } + + add_filter( 'tribe_display_event_linked_post_dropdown_id', array( $this, 'translate_linked_post' ) ); + + return $use_block_editor; + } + + /** + * Populates default event metas for a newly created event translation + * + * @since 2.2 + * + * @param mixed $value Meta value. + * @param int $id Post id. + * @param string $meta Meta key. + * @param bool $single Whether to return a single value. + * @return mixed + */ + public function copy_event_meta( $value, $id, $meta, $single ) { + if ( ! empty( $_GET['from_post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $value = get_post_meta( (int) $_GET['from_post'], $meta, $single ); // phpcs:ignore WordPress.Security.NonceVerification + } + return $value; + } + + /** + * Populates default values for venues and organizers for a newly created event translation. + * + * @since 2.2 + * + * @param array $posts Array of linked posts. + * @return array + */ + public function translate_linked_post( $posts ) { + if ( empty( $posts ) || empty( $this->links ) ) { + return $posts; + } + + $data = $this->links->get_data_from_new_post_translation_request(); + + if ( empty( $data ) ) { + return $posts; + } + + $lang = $data['new_lang']->slug; + $post_metas = ! empty( $this->polylang->sync ) && ! empty( $this->polylang->sync->post_metas ) ? $this->polylang->sync->post_metas : false; + + foreach ( $posts as $key => $post_id ) { + $tr_id = pll_get_post( $post_id, $lang ); + + if ( ! empty( $tr_id ) ) { + $posts[ $key ] = $tr_id; + continue; + } + + // If the translated venue or organizer doesn't exist, create it. + $post = get_post( $post_id, ARRAY_A ); // Output as an array for `wp_insert_post()`. + + if ( empty( $post ) ) { + // `null` value. + continue; + } + + unset( $post['ID'] ); + + $tr_id = wp_insert_post( wp_slash( $post ) ); + + if ( ! is_int( $tr_id ) ) { + // `WP_Error` value. + continue; + } + + $translations = pll_get_post_translations( $post_id ); + $translations[ $lang ] = $tr_id; + + pll_set_post_language( $tr_id, $lang ); + pll_save_post_translations( $translations ); + + if ( ! empty( $post_metas ) ) { + $post_metas->copy( $post_id, $tr_id, $lang ); + } + + $posts[ $key ] = $tr_id; + } + + return $posts; + } + + /** + * Removes date filters when searching for untranslated events in the metabox autocomplete field + * + * @since 2.2.8 + * + * @return void + */ + public function pre_get_posts() { + if ( wp_doing_ajax() && isset( $_GET['action'] ) && 'pll_posts_not_translated' === $_GET['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification + // See Tribe__Events__Query::pre_get_posts() when should_remove_date_filters() returns true + remove_filter( 'posts_where', array( 'Tribe__Events__Query', 'posts_where' ) ); + remove_filter( 'posts_fields', array( 'Tribe__Events__Query', 'posts_fields' ) ); + remove_filter( 'posts_orderby', array( 'Tribe__Events__Query', 'posts_orderby' ) ); + } + } + + /** + * Synchronize event metas. + * + * @since 2.2 + * + * @param array $metas Custom fields to copy or synchronize. + * @return array + */ + public function copy_post_metas( $metas ) { + return array_merge( $metas, self::$metas ); + } + + /** + * Translate venues and organizers before they are copied or synchronized. + * + * @since 2.3 + * + * @param mixed $value Meta value. + * @param string $key Meta key. + * @param string $lang Language of target. + * @return mixed + */ + public function translate_meta( $value, $key, $lang ) { + if ( ( '_EventVenueID' !== $key && '_EventOrganizerID' !== $key ) ) { + return $value; + } + + $tr_value = pll_get_post( $value, $lang ); + return $tr_value ?: $value; + } + + /** + * Resets all TEC translated slugs to an English value as the TEC slug translation system + * does not work in a multilingual context (TEC 4.4.5 + WP 4.7.3). + * + * @since 2.2 + * + * @return void + */ + public function reset_slugs() { + $tec = TEC::instance(); + + foreach ( $this->get_slugs_to_reset() as $key => $slug ) { + $tec->$key = $slug; + } + + // Those are deprecated since TEC 4.0 and should not appear in the list of translatable strings anymore. + $tec->taxRewriteSlug = $tec->rewriteSlug . '/category'; + $tec->tagRewriteSlug = $tec->rewriteSlug . '/tag'; + } + + /** + * Resets the category base rewrite slug in taxonomy. + * + * @since 2.2 + * + * @param array $args Array of arguments for registering a taxonomy. + * @param string $taxonomy Taxonomy key. + * @return array + */ + public function register_taxonomy_args( $args, $taxonomy ) { + if ( TEC::TAXONOMY === $taxonomy && is_array( $args['rewrite'] ) ) { + $args['rewrite']['slug'] = TEC::instance()->rewriteSlug . '/category'; + } + + return $args; + } + + /** + * Filters the links to add the language code. + * + * @since 2.2 + * + * @param string $link Link generated by The Events Calendar. + * @return string + */ + public function get_link( $link ) { + $curlang = $this->get_curlang(); + + if ( empty( $curlang ) || empty( $this->slugs_model ) ) { + return $link; + } + + $link = $this->polylang->links_model->add_language_to_link( $link, $curlang ); + + foreach ( $this->get_translatable_slug_ids() as $slug_id ) { + $link = $this->slugs_model->translate_slug( $link, $curlang, $slug_id ); + } + + return $link; + } + + /** + * Translates slugs in the language switcher. + * + * @since 2.2 + * + * @param string $url Url in the language switcher. + * @param PLL_Language $language Language object. + * @return string Modified url. + */ + public function pll_get_archive_url( $url, $language ) { + if ( empty( $this->slugs_model ) || ! is_post_type_archive( TEC::POSTTYPE ) ) { + return $url; + } + + foreach ( $this->get_translatable_slug_ids() as $slug_id ) { + $url = $this->slugs_model->switch_translated_slug( $url, $language, $slug_id ); + } + + return $url; + } + + /** + * Modifies term links for the taxonomies used by TEC. + * In `PLL_TEC->reset_slugs()` we don't include the full taxonomy slug (`Tribe__Events__Main->taxRewriteSlug`) in + * our translated strings, as it is deprecated in TEC 4.0 and also a composite of + * `{post type archive slug}/{tax base slug}`. This explains why this method is needed. + * + * @since 3.1 + * @see PLL_TEC->reset_slugs() + * @see PLL_TEC->pll_translated_slugs() + * + * @param string $url The term link. + * @param PLL_Language $lang The term language. + * @param WP_Term $term The term object. + * @return string + */ + public function filter_tec_term_link( $url, $lang, $term ) { + if ( empty( $this->slugs_model ) || TEC::TAXONOMY !== $term->taxonomy ) { + return $url; + } + + $url = $this->slugs_model->translate_slug( $url, $lang, 'archive_' . TEC::POSTTYPE ); + return $this->slugs_model->translate_slug( $url, $lang, 'tribe_category' ); + } + + /** + * Fixes the events slug in translatable slugs. + * Translates other TEC slugs. + * + * @since 2.2 + * + * @param array $slugs Translated slugs. + * @param PLL_Language $language Language object. + * @param PLL_MO $mo Strings translations object. + * @return array + */ + public function pll_translated_slugs( $slugs, $language, &$mo ) { + /** + * In `PLL_TEC->reset_slugs()` we don't include the full taxonomy slug (`Tribe__Events__Main->taxRewriteSlug`) in + * our translated strings, as it is deprecated in TEC 4.0 and also a composite of + * `{post type archive slug}/{tax base slug}`. This is why we unset `$slugs[ TEC::TAXONOMY ]` here. + */ + unset( $slugs[ 'archive_' . TEC::POSTTYPE ]['hide'], $slugs[ TEC::TAXONOMY ] ); + + $slug = TEC::instance()->getRewriteSlug(); + + $slugs[ 'archive_' . TEC::POSTTYPE ]['slug'] = $slug; + $tr_slug = $mo->translate( $slug ); + $slugs[ 'archive_' . TEC::POSTTYPE ]['translations'][ $language->slug ] = empty( $tr_slug ) ? $slug : $tr_slug; + + foreach ( $this->get_slugs_to_reset() as $slug ) { + $slugs[ 'tribe_' . $slug ]['slug'] = $slug; + $tr_slug = $mo->translate( $slug ); + $slugs[ 'tribe_' . $slug ]['translations'][ $language->slug ] = empty( $tr_slug ) ? $slug : $tr_slug; + } + + return $slugs; + } + + /** + * Performs the sanitization ( before saving in DB ) of slugs translations + * The Events Calendar does not accept accents, but let's accept slashes for the event category slug + * + * @since 1.9 + * + * @param string $translation Translation to sanitize. + * @param string $name Unique name for the string. + * @return string + */ + public function sanitize_string_translation( $translation, $name ) { + if ( 'slug_archive_tribe_events' === $name || 0 === strpos( $name, 'slug_tribe_' ) ) { + $slugs = explode( '/', $translation ); + $slugs = array_map( 'sanitize_title', $slugs ); + return implode( '/', $slugs ); + } + return $translation; + } + + /** + * Add translated slugs to specific TEC rewrite rules. + * + * @since 2.2 + * + * @param array $bases Array of arrays of rewrite base slugs. + * @return array + */ + public function rewrite_slugs( $bases ) { + $translatable_slugs = $this->get_translatable_slugs(); + + if ( empty( $translatable_slugs ) ) { + return $bases; + } + + foreach ( $bases as $type => $base ) { + $default_slug = reset( $base ); + + foreach ( $translatable_slugs as $slugs ) { + if ( $slugs['slug'] === $default_slug ) { + $bases[ $type ] = array_unique( array_merge( array( $default_slug ), $slugs['translations'] ) ); + break; + } + } + } + + return $bases; + } + + /** + * Translated strings must be sanitized the same way The Events Calendar does before they are saved. + * All are of validation_type 'html'. + * + * @since 2.2 + * + * @param string $translation Translated string. + * @param string $name String name. + * @param string $context String context. + * @return string Sanitized translation. + */ + public function sanitize_strings( $translation, $name, $context ) { + if ( 'The Events Calendar' === $context ) { + $translation = balanceTags( $translation ); + } + + return $translation; + } + + /** + * Filters TEC's base slugs to unescape dashes. + * + * If `$method` is 'regex', `Tribe__Events__Rewrite->get_bases()` will use `preg_quote()` to get + * its slugs ready as regex patterns. However, `-` characters are valid in this context and + * should not be escaped (reminder: they come from PLL's string translations). + * + * @since 3.1 + * @see $this->rewrite_slugs() + * + * @param string[] $bases An array of rewrite bases that have been generated. + * @param string $method The method that's being used to generate the bases; defaults to `regex`. + * @return string[] + */ + public function fix_escaped_dashes_in_slugs( $bases, $method ) { + if ( 'regex' !== $method ) { + return $bases; + } + + return array_map( + function ( $base ) { + return str_replace( '\\-', '-', $base ); + }, + $bases + ); + } + + /** + * Filters the string to be used as the taxonomy slug. + * This replaces TEC's translated category slug by the untranslated one, as it is returned by the public method + * `Tribe__Events__Main->get_category_slug()`. + * + * @since 3.1 + * + * @return string + */ + public function get_category_slug() { + return 'category'; + } + + /** + * Filters the string to be used as the tag slug. + * This replaces TEC's translated tag slug by the untranslated one, as it is returned by a public method + * `Tribe__Events__Main->get_tag_slug()`. + * + * @since 3.1 + * + * @return string + */ + public function get_tag_slug() { + return 'tag'; + } + + /** + * Adds the lang to TEC's REST URL. + * This provides a way to identify in which language PLL should work in the REST request. + * + * @since 3.1 + * + * @param string $url The View endpoint URL, either a REST API URL or a admin-ajax.php fallback URL if REST API + * is not available. + * @return string + */ + public function add_missing_lang_to_rest_url( $url ) { + $curlang = $this->get_curlang(); + + if ( empty( $curlang ) ) { + return $url; + } + + $lang = $this->get_lang_from_url_query_arg( $url ); + + if ( ! empty( $lang ) ) { + return $url; + } + + return add_query_arg( array( 'lang' => $curlang->slug ), $url ); + } + + /** + * Filters the locale when TEC is performing a REST request. + * + * @since 3.1 + * + * @param string $locale The locale ID. + * @return string + */ + public function filter_locale_for_rest( $locale ) { + if ( ! $this->is_tec_rest_request() ) { + return $locale; + } + + $curlang = $this->get_curlang(); + + if ( empty( $curlang->locale ) ) { + return $locale; + } + + return $curlang->locale; + } + + /** + * Filters the query arguments that should be applied to the View links to add the missing language. + * The added language is the global current language. + * + * @since 3.1 + * + * @param mixed[] $url_args The current URL query arguments, created from a filtered version of the current + * request context. + * @return mixed[] + */ + public function add_language_to_publicly_visible_views_query_args( $url_args ) { + $curlang = $this->get_curlang(); + + if ( ! empty( $curlang ) ) { + $url_args['lang'] = $curlang->slug; + } + return $url_args; + } + + /** + * Fixes the "upcoming events" widget link. + * + * @since 3.1 + * + * @param mixed[] $template_vars An associative array of template variables. Variables will be extracted in the + * template hence the key will be the name of the variable available in the template. + * @return mixed[] + */ + public function translate_widget_view_more_link( $template_vars ) { + if ( ! isset( $template_vars['view_more_link'] ) ) { + return $template_vars; + } + + $curlang = $this->get_curlang(); + + if ( empty( $curlang ) || empty( $this->slugs_model ) ) { + return $template_vars; + } + + $template_vars['view_more_link'] = home_url( '/' . tribe_get_option( 'eventsSlug', 'events' ) ); + $template_vars['view_more_link'] = $this->polylang->links_model->add_language_to_link( $template_vars['view_more_link'], $curlang ); + $template_vars['view_more_link'] = $this->slugs_model->translate_slug( $template_vars['view_more_link'], $curlang, 'archive_' . TEC::POSTTYPE ); + $template_vars['view_more_link'] = user_trailingslashit( $template_vars['view_more_link'] ); + + return $template_vars; + } + + /** + * Filters the array of query variables parsed by TEC to force the use of the right language. + * For example, `example.com/events?lang=de` would return the default language instead of using the provided query + * arg because TEC tries to use the WP rewrite rules to match the query path, and `events` => default language. + * However, this is not needed for `example.com/de/events-de/` and `example.com/?lang=de` because the right + * language will be set in these cases. + * + * @since 3.1 + * @see Tribe__Rewrite->parse_request() + * @see PLL_TEC->add_language_to_publicly_visible_views_query_args() + * + * @param string[] $query_vars The parsed query vars array. + * @param string[] $extra_query_vars An associative array of extra query vars that will be processed before + * the WordPress defined ones. + * @param string $url The URL to parse. + * @return string[] + */ + public function force_language_on_tec_parse_query_vars( $query_vars, $extra_query_vars, $url ) { + // Find the lang in the URL... + $lang = $this->get_lang_from_url_query_arg( $url ); + + if ( ! empty( $lang ) ) { + // ... and add it to the query vars. + $query_vars['lang'] = $lang->slug; + } + + return $query_vars; + } + + /** + * Adds the lang to TEC's query arguments that will be used to build a View URL. + * This insures that a lang arg is available when building the view's URL. + * + * @since 3.1 + * + * @param mixed[] $query_args An array of query args that will be used to build the URL for the View. + * @return mixed[] + */ + public function add_missing_lang_to_query_arg( $query_args ) { + if ( isset( $query_args['lang'] ) ) { + return $query_args; + } + + $curlang = $this->get_curlang(); + + $query_args['lang'] = ! empty( $curlang ) ? $curlang->slug : $this->polylang->options['default_lang']; + + return $query_args; + } + + /** + * Adds the lang to the URL passed to `Tribe__Rewrite->get_canonical_url()`. + * This insures that a lang arg is available when building a URL. + * + * @since 3.1 + * + * @param string|null $canonical_url The canonical URL, defaults to `null`; returning a non `null` value will + * make the logic bail and return the value. + * @param string $url The input URL to resolve to a canonical one. + * @return string|null + */ + public function add_missing_lang_to_non_canonical_url( $canonical_url, $url ) { + $lang = $this->get_lang_from_url_query_arg( $url ); + + if ( ! empty( $lang ) ) { + // All good. + return $canonical_url; + } + + $curlang = $this->get_curlang(); + + if ( empty( $curlang ) ) { + // We're screwed. + return $canonical_url; + } + + // Re-inject the URL with the current lang. `$this->get_lang_from_url_query_arg()` will prevent an infinite loop. + return Tribe__Rewrite::instance()->get_canonical_url( add_query_arg( 'lang', $curlang->slug, $url ) ); + } + + /** + * Removes the `name` arg from the URL passed to `Tribe__Rewrite->get_canonical_url()` when there is already a + * `post_type` arg: this seems to mess up the process. + * + * @since 3.1 + * + * @param string|null $canonical_url The canonical URL, defaults to `null`; returning a non `null` value will + * make the logic bail and return the value. + * @param string $url The input URL to resolve to a canonical one. + * @return string|null + */ + public function remove_name_arg_from_non_canonical_url( $canonical_url, $url ) { + $url_query = wp_parse_url( $url, PHP_URL_QUERY ); + + if ( empty( $url_query ) ) { + return $canonical_url; + } + + $parsed_query = array(); + wp_parse_str( $url_query, $parsed_query ); + + if ( empty( $parsed_query ) ) { + return $canonical_url; + } + + if ( empty( $parsed_query['post_type'] ) || empty( $parsed_query['name'] ) || ! empty( $parsed_query['ical'] ) ) { + return $canonical_url; + } + + if ( TEC::POSTTYPE !== $parsed_query['post_type'] ) { + return $canonical_url; + } + + if ( ! empty( $parsed_query['lang'] ) && $parsed_query['lang'] === $parsed_query['name'] ) { + // ¯\(°_o)/¯. + $remove = true; + } elseif ( tribe_get_option( 'eventsSlug' ) === $parsed_query['name'] ) { + $remove = true; + } + + if ( empty( $remove ) ) { + return $canonical_url; + } + + // Re-inject the URL. Tests against `$parsed_query['name']` will prevent an infinite loop. + return Tribe__Rewrite::instance()->get_canonical_url( remove_query_arg( 'name', $url ) ); + } + + /** + * Filters TEC's canonical URL to fix the language slug in it. + * Because of TEC's method to build URLs, using the rewrite rules array, the language slug is not replaced and is + * outputted like the rewrite rule pattern: `/(en|fr|de)/`. This filter replaces the pattern by the language + * contained in the original URL. If not found in the original URL, falls back to the current language or the default + * one. + * + * @since 3.1 + * + * @param string $resolved The resolved, canonical URL. + * @param string $url The original URL to resolve. + * @return string + */ + public function fix_language_in_canonical_url( $resolved, $url ) { + $options = $this->polylang->options; + + // Remove the default language if it must be hidden in the URLs. + $filter = $options['hide_default'] ? 'hide_default' : ''; + $languages = $this->polylang->model->languages->filter( $filter )->get_list( array( 'fields' => 'slug' ) ); + + if ( empty( $languages ) ) { + return $resolved; + } + + /** + * What we want to modify in the URL. + * Ex: `/(en|fr|de)`, `/language/(fr|de)`. + */ + $language_path = $options['rewrite'] ? '' : '/language'; + $to_replace = $language_path . '/(' . implode( '|', $languages ) . ')/'; + + if ( strpos( $resolved, $to_replace ) === false ) { + return $resolved; + } + + // Find the lang in the URL (or fallback). + $lang = $this->get_lang_from_url_query_arg( $url ); + + if ( empty( $lang ) ) { + // We need a lang, whichever it is. + $curlang = $this->get_curlang(); + $lang = ! empty( $curlang ) ? $curlang->slug : $options['default_lang']; + } else { + $lang = $lang->slug; + } + + // Make the final replacement. + if ( $options['hide_default'] && $options['default_lang'] === $lang ) { + // The default language is hidden in the URL. + $replacement = '/'; + } else { + $replacement = "{$language_path}/{$lang}/"; + } + + return str_replace( $to_replace, $replacement, $resolved ); + } + + /** + * Filters TEC's canonical URL to translate all slugs in it. + * This is possible because a `lang` arg is available in the "ugly" URL. + * + * @since 3.1 + * @see Tribe__Events__Rewrite->get_dynamic_matchers() + * + * @param string $resolved The resolved, canonical URL. + * @param string $url The original URL to resolve. + * @return string + */ + public function translate_canonical_url( $resolved, $url ) { + if ( empty( $this->slugs_model ) ) { + return $resolved; + } + + // Find the lang in the URL (or fallback). + $lang = $this->get_lang_from_url_query_arg_or_fallback( $url ); + + if ( empty( $lang ) ) { + // What? + return $resolved; + } + + // Make sure the language is well formatted. + $resolved = remove_query_arg( 'lang', $resolved ); + $resolved = $this->polylang->links_model->add_language_to_link( $resolved, $lang ); + + foreach ( $this->get_translatable_slugs() as $slug_id => $translations ) { + $resolved = $this->slugs_model->switch_translated_slug( $resolved, $lang, $slug_id ); + } + + return $resolved; + } + + /** + * Tells if a request is a TEC REST API request. + * TEC does a good job for their REST URL by providing a `admin-ajax.php` fallback in case the REST API is not + * available. Unfortunately, this choice is late in the process so we have to test the given URL against the 2 + * possibilities. + * + * @since 3.1 + * @see Tribe\Events\Views\V2\Rest_Endpoint->get_url() + * + * @param string $requested_url The requested URL. Falls back to the current URL. + * @return bool|null Whether the request is a TEC REST API request. Null if not ready to answer yet. + */ + protected function is_tec_rest_request( $requested_url = null ) { + if ( ! isset( $this->is_tec_rest_request['views_v2_is_enabled'] ) ) { + if ( ! function_exists( 'tribe_events_views_v2_is_enabled' ) ) { + return null; + } + + $this->is_tec_rest_request['views_v2_is_enabled'] = tribe_events_views_v2_is_enabled(); + } + + if ( ! $this->is_tec_rest_request['views_v2_is_enabled'] ) { + // If the views V2 are not enabled, no REST requests. + return false; + } + + if ( empty( $requested_url ) || ! is_string( $requested_url ) ) { + // Fall back to the current URL. + if ( ! isset( $this->is_tec_rest_request['pll_requested_url'] ) ) { + $this->is_tec_rest_request['pll_requested_url'] = (string) set_url_scheme( pll_get_requested_url() ); + } + + $requested_url = $this->is_tec_rest_request['pll_requested_url']; + } else { + $requested_url = (string) set_url_scheme( $requested_url ); + } + + if ( isset( $this->is_tec_rest_request[ 'is:' . $requested_url ] ) ) { + return $this->is_tec_rest_request[ 'is:' . $requested_url ]; + } + + if ( false === strpos( $requested_url, '/admin-ajax.php' ) ) { + // Test against the REST URL. + if ( ! isset( $this->is_tec_rest_request['tec_rest_url_pattern'] ) ) { + $url = $this->get_tec_rest_url( true ); + + if ( empty( $url ) ) { + // `$wp_rewrite` is probably not set yet. + return null; + } + + $this->is_tec_rest_request['tec_rest_url_pattern'] = preg_replace( '@[#?].*$@', '', $url ); + $this->is_tec_rest_request['tec_rest_url_pattern'] = sprintf( '@^%s[/?#]@i', preg_quote( $this->is_tec_rest_request['tec_rest_url_pattern'], '@' ) ); + } + + $this->is_tec_rest_request[ 'is:' . $requested_url ] = (bool) preg_match( $this->is_tec_rest_request['tec_rest_url_pattern'], $requested_url ); + + return $this->is_tec_rest_request[ 'is:' . $requested_url ]; + } + + // Test against the admin ajax URL. + if ( ! isset( $this->is_tec_rest_request['tec_ajax_url_action'] ) ) { + $this->is_tec_rest_request['tec_ajax_url_action'] = $this->get_tec_rest_url( false ); + $this->is_tec_rest_request['tec_ajax_url_action'] = $this->get_query_arg_from_url( $this->is_tec_rest_request['tec_ajax_url_action'], 'action' ); + } + + if ( empty( $this->is_tec_rest_request['tec_ajax_url_action'] ) ) { + // Uh? + $this->is_tec_rest_request[ 'is:' . $requested_url ] = false; + return false; + } + + $requested_action = $this->get_query_arg_from_url( $requested_url, 'action' ); + + $this->is_tec_rest_request[ 'is:' . $requested_url ] = $requested_action === $this->is_tec_rest_request['tec_ajax_url_action']; + + return $this->is_tec_rest_request[ 'is:' . $requested_url ]; + } + + /** + * Returns the current language object. + * Can return `null` if not defined yet. + * + * @since 3.1 + * + * @return PLL_Language|null + */ + protected function get_curlang() { + if ( ! empty( $this->curlang ) ) { + return $this->curlang; + } + + if ( ! empty( $_REQUEST['lang'] ) && is_string( $_REQUEST['lang'] ) && Polylang::is_rest_request() ) { // phpcs:ignore WordPress.Security.NonceVerification + // REST request. + $curlang = $this->polylang->model->get_language( sanitize_key( $_REQUEST['lang'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + + if ( ! empty( $curlang ) ) { + $this->curlang = $curlang; + $this->polylang->curlang = $this->curlang; + return $this->curlang; + } + } + + if ( ! empty( $this->polylang->curlang ) ) { + // Global context. + $this->curlang = &$this->polylang->curlang; + return $this->curlang; + } + + if ( empty( $this->polylang->options['force_lang'] ) && $this->polylang instanceof PLL_Frontend && ! did_action( 'pll_language_defined' ) ) { + // Lang defined by content: too soon. + return null; + } + + $curlang = $this->polylang->model->get_default_language(); + + if ( empty( $curlang ) ) { + // We're screwed. + return null; + } + + // Default lang. + $this->curlang = $curlang; + return $this->curlang; + } + + /** + * Returns the list of slugs that need to be reset in TEC, except the deprecated ones. + * + * @since 3.1 + * @see PLL_TEC->reset_slugs() + * + * @return string[] Array keys match `Tribe__Events__Main`'s properties name. + */ + protected function get_slugs_to_reset() { + return array( + 'category_slug' => 'category', + 'tag_slug' => 'tag', + 'monthSlug' => 'month', + 'listSlug' => 'list', + 'upcomingSlug' => 'upcoming', + 'pastSlug' => 'past', + 'daySlug' => 'day', + 'todaySlug' => 'today', + 'featured_slug' => 'featured', + 'all_slug' => 'all', + ); + } + + /** + * Returns the list of IDs of translatable slugs dedicated to TEC. + * Ex: `tribe_venue`, `archive_tribe_events`, `paged`, `tribe_today`. + * + * @since 3.1 + * + * @return string[] + */ + protected function get_translatable_slug_ids() { + if ( ! empty( $this->translatable_slug_ids ) ) { + return $this->translatable_slug_ids; + } + + $slug_ids = array( + Venue::POSTTYPE, + Organizer::POSTTYPE, + TEC::POSTTYPE, + 'archive_' . TEC::POSTTYPE, + 'post_tag', + 'paged', + ); + + foreach ( $this->get_slugs_to_reset() as $slug ) { + $slug_ids[] = 'tribe_' . $slug; + } + + $this->translatable_slug_ids = array_combine( $slug_ids, $slug_ids ); + + return $this->translatable_slug_ids; + } + + /** + * Returns the list of translatable slugs dedicated to TEC. + * + * @since 3.1 + * + * @return mixed[] + */ + protected function get_translatable_slugs() { + if ( empty( $this->slugs_model ) ) { + return array(); + } + + return array_intersect_key( $this->slugs_model->get_translatable_slugs(), $this->get_translatable_slug_ids() ); + } + + /** + * Returns the value of the `lang` query arg from the given URL. + * + * @since 3.1 + * + * @param string $url The URL to retrieve the arg from. + * @return PLL_Language|null The lang object. Null if not found or invalid. + */ + protected function get_lang_from_url_query_arg( $url ) { + $lang = $this->get_query_arg_from_url( $url, 'lang' ); + + if ( empty( $lang ) || ! is_string( $lang ) ) { + return null; + } + + $lang = $this->polylang->model->get_language( sanitize_key( $lang ) ); + + if ( empty( $lang ) ) { + return null; + } + + return $lang; + } + + /** + * Returns the value of the `lang` query arg from the given URL. + * + * @since 3.1 + * + * @param string $url The URL to retrieve the arg from. + * @return PLL_Language|null The lang object. Null if not found or invalid. + */ + protected function get_lang_from_url_query_arg_or_fallback( $url ) { + $lang = $this->get_lang_from_url_query_arg( $url ); + + if ( ! empty( $lang ) ) { + return $lang; + } + + $lang = $this->get_curlang(); + + if ( ! empty( $lang ) ) { + return $lang; + } + + // Uh? + $lang = $this->polylang->model->get_default_language(); + + if ( ! empty( $lang ) ) { + return $lang; + } + + // What? + return null; + } + + /** + * Returns the value of a query arg from the given URL. + * + * @since 3.1 + * + * @param string $url The URL to retrieve the arg from. + * @param string $query_arg_name The name of the query arg to retrieve. + * @return string|null The raw value of the query arg. Null if not found. + */ + protected function get_query_arg_from_url( $url, $query_arg_name ) { + if ( empty( $url ) || ! is_string( $url ) ) { + return null; + } + + if ( empty( $query_arg_name ) || ! is_string( $query_arg_name ) ) { + return null; + } + + $url_query = wp_parse_url( $url, PHP_URL_QUERY ); + + if ( empty( $url_query ) ) { + return null; + } + + $parsed = array(); + wp_parse_str( $url_query, $parsed ); + + if ( empty( $parsed[ $query_arg_name ] ) || ! is_string( $parsed[ $query_arg_name ] ) ) { + return null; + } + + return sanitize_key( $parsed[ $query_arg_name ] ); + } + + /** + * Returns TEC's REST URL. + * + * @since 3.1 + * + * @param bool $enable_rest True to get the REST URL. False to get the admin ajax URL. + * @return string|null The REST URL. Null if too soon to be determined: this may happen when requesting the + * the real REST URL (`$enable_rest` is true) but `$wp_rewrite` is not ready. + */ + protected function get_tec_rest_url( $enable_rest ) { + global $wp_rewrite; + + if ( $enable_rest ) { + // In this case, `Rest_Endpoint->get_url()` will use `get_rest_url()`. + if ( ( is_multisite() && get_blog_option( 0, 'permalink_structure' ) ) || get_option( 'permalink_structure' ) ) { // See the same test done in `get_rest_url()`. + // We test `$wp_rewrite` to prevent `get_rest_url()` to explode. + if ( ! $wp_rewrite instanceof WP_Rewrite ) { + return null; + } + } + } + + // Force `Rest_Endpoint->is_available()`'s behavior with this filter callback. + $priority = 100000; + $callback = function () use ( $enable_rest ) { + return (bool) $enable_rest; + }; + + add_filter( 'tribe_events_views_v2_rest_endpoint_available', $callback, $priority ); + $url = ( new Rest_Endpoint() )->get_url(); + remove_filter( 'tribe_events_views_v2_rest_endpoint_available', $callback, $priority ); + + return $url; + } +} diff --git a/wp-content/plugins/polylang-pro/src/integrations/integration-build.php b/wp-content/plugins/polylang-pro/src/integrations/integration-build.php new file mode 100644 index 0000000..e4fe31e --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/integrations/integration-build.php @@ -0,0 +1,14 @@ +model = $model; + } + + /** + * Creates a language. + * + * ## OPTIONS + * + * + * : WordPress locale or custom locale. If the locale is not found in the core languages list, it will be created but the name, slug, flag and direction will be mandatory. + * + * [--name=] + * : Language name (used only for display). If not provided, will fallback to Polylang core languages list. + * + * [--slug=] + * : Language slug (ideally 2-letters ISO 639-1 language code). Must be unique. If not provided, will fallback to Polylang core languages list. + * + * [--flag=] + * : Country code for the flag. If not provided, will fallback to Polylang core languages list. + * + * [--dir=] + * : Text direction for the language. + * --- + * default: ltr + * options: + * - ltr + * - rtl + * --- + * + * [--order=] + * : Language order when displayed. + * --- + * default: 0 + * --- + * + * [--skip-default-cat] + * : If set, no default category will be created for this language. + * + * ## EXAMPLES + * + * # Create a language using locale only (fallback to core languages list) + * wp pll language create en_US + * + * # Create a language with custom name and slug + * wp pll language create en_US --name="English" --slug=en + * + * # Create a French language with custom flag + * wp pll language create fr_FR --name="Français" --slug=fr --flag=fr --order=1 + * + * # Create an Arabic language with RTL support + * wp pll language create ar --dir=rtl --order=2 + * + * # Create a language without default category + * wp pll language create es_ES --name="Español" --slug=es --skip-default-cat + * + * @param string[] $args The command arguments. + * @param string[] $assoc_args The command associative arguments. + * @phpstan-param array{name?: string, slug?: string, flag?: string, dir?: string, order?: string, skip-default-cat?: bool} $assoc_args + * + * @since 3.8 + */ + public function create( $args, $assoc_args ): void { + list( $locale ) = $args; + + $language_args = $this->prepare_language_args( $assoc_args ); + $language_args['locale'] = $locale; + + $language = $this->model->add( $language_args ); + + if ( is_wp_error( $language ) ) { + WP_CLI::error( $language->get_error_message() ); + } + + /** @var PLL_Language $language */ + WP_CLI::success( sprintf( 'Language "%1$s" (%2$s) created successfully.', $language->name, $language->slug ) ); + } + + /** + * Updates a language. + * + * ## OPTIONS + * + * + * : The ID or slug of the language to update. Must be unique among all languages. + * + * [--name=] + * : Language name (used only for display). + * + * [--locale=] + * : WordPress locale. If something wrong is used for the locale, the .mo files will not be loaded. + * + * [--slug=] + * : New language slug (ideally 2-letters ISO 639-1 language code). Must be unique among all languages. + * + * [--dir=] + * : Text direction for the language. + * --- + * options: + * - ltr + * - rtl + * --- + * + * [--order=] + * : Language order when displayed. + * + * [--flag=] + * : Country code for the flag. + * + * ## EXAMPLES + * + * # Update language name only + * wp pll language update en --name="English (US)" + * + * # Update multiple properties + * wp pll language update fr --name="Français" --locale=fr_FR --flag=fr --order=1 + * + * # Change language slug + * wp pll language update en --new-slug=en_us + * + * # Update text direction + * wp pll language update ar --dir=rtl + * + * # Update language order + * wp pll language update es --order=3 + * + * @param string[] $args The command arguments. + * @param string[] $assoc_args The command associative arguments. + * @phpstan-param array{name?: string, locale?: string, new-slug?: string, dir?: string, order?: string, flag?: string} $assoc_args + * + * @since 3.8 + */ + public function update( $args, $assoc_args ): void { + list( $id_or_slug ) = $args; + + $language = $this->model->get( $id_or_slug ); + + if ( empty( $language ) ) { + WP_CLI::error( 'Language not found.' ); + } + + /** @var PLL_Language $language */ + $update_args = $this->prepare_language_args( $assoc_args, $language ); + + $language = $this->model->update( $update_args ); + + if ( is_wp_error( $language ) ) { + WP_CLI::error( $language->get_error_message() ); + } + + /** @var PLL_Language $language */ + WP_CLI::success( sprintf( 'Language "%1$s" (%2$s) updated successfully.', $language->name, $language->slug ) ); + } + + /** + * Deletes a language. + * + * ## OPTIONS + * + * + * : The ID or slug of the language to delete. + * + * [--yes] + * : Answer yes to the confirmation message. + * + * ## EXAMPLES + * + * # Delete English language + * wp pll language delete en + * + * @param string[] $args The command arguments. + * @param string[] $assoc_args The command associative arguments. + * @phpstan-param array{yes?: bool} $assoc_args + * + * @since 3.8 + */ + public function delete( $args, $assoc_args ): void { + list( $id_or_slug ) = $args; + + $language = $this->model->get( $id_or_slug ); + + if ( empty( $language ) ) { + WP_CLI::error( 'Language not found.' ); + } + + /** @var PLL_Language $language */ + WP_CLI::confirm( + sprintf( 'Are you sure you want to delete the language "%1$s" (%2$s)?', $language->name, $language->slug ), + $assoc_args + ); + + $result = $this->model->delete( $language->term_id ); + + if ( ! $result ) { + WP_CLI::error( sprintf( 'Failed to delete the language "%1$s" (%2$s).', $language->name, $language->slug ) ); + } + + WP_CLI::success( sprintf( 'Language "%1$s" (%2$s) deleted successfully.', $language->name, $language->slug ) ); + } + + /** + * Lists languages. + * + * ## OPTIONS + * + * [--=] + * : Filter by one or more fields. + * + * [--format=] + * : Render output in a particular format. + * --- + * default: table + * options: + * - table + * - json + * - yaml + * - csv + * --- + * + * [--field=] + * : Prints the value of a single field for each language. + * + * [--fields=] + * : Comma-separated list of fields to display. Available fields are PLL_Language object properties. + * + * ## AVAILABLE FIELDS + * + * These fields will be displayed by default for each term: + * + * * name + * * slug + * * locale + * * term_id + * * order (term_group) + * * direction (dir) + * * active + * * default + * + * These fields are optionally available: + * + * * w3c + * * facebook + * * host + * * page_on_front + * * page_for_posts + * * flag_code + * * fallbacks + * + * ## EXAMPLES + * + * # List all languages + * wp pll language list + * + * # List specific languages by slugs + * wp pll language list --slug=en,fr,es + * + * # List languages with specific output fields only + * wp pll language list --fields=name,slug,locale + * + * @param string[] $args The command arguments. + * @param string[] $assoc_args The command associative arguments. + * @phpstan-param array{field?: string, fields?: string, format?: string} $assoc_args + * + * @since 3.8 + */ + public function list( $args, $assoc_args ): void { + $languages = $this->model->get_list(); + + $filters = $assoc_args; + unset( $filters['fields'] ); + unset( $filters['format'] ); + unset( $filters['field'] ); + + if ( ! empty( $filters ) ) { + foreach ( $filters as $field => $filter_values ) { + if ( ! property_exists( PLL_Language::class, (string) $field ) ) { + WP_CLI::warning( sprintf( 'Invalid filter: %s.', $field ) ); + continue; + } + + $filter_values = array_map( 'trim', explode( ',', (string) $filter_values ) ); + $languages = array_filter( + $languages, + function ( $language ) use ( $field, $filter_values ) { + // Shallower comparison on purpose, to avoid numeric string issues. + return in_array( $language->$field, $filter_values ); // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict + } + ); + } + } + + $this->get_formatter( $assoc_args )->display_items( $this->normalize_languages( $languages ) ); + } + + /** + * Gets a language. + * + * ## OPTIONS + * + * + * : The ID or slug of the language to get. + * + * [--format=] + * : Render output in a particular format. + * --- + * default: table + * options: + * - table + * - json + * - yaml + * - csv + * --- + * + * [--field=] + * : Prints the value of a single field for each language. + * + * [--fields=] + * : Comma-separated list of fields to display. Available fields are PLL_Language object properties. + * + * ## AVAILABLE FIELDS + * + * These fields will be displayed by default for each term: + * + * * name + * * slug + * * locale + * * term_id + * * order (term_group) + * * direction (dir) + * * active + * * default + * + * These fields are optionally available: + * + * * w3c + * * facebook + * * host + * * page_on_front + * * page_for_posts + * * flag_code + * * fallbacks + * + * ## EXAMPLES + * + * # Get a language by slug + * wp pll language get en + * + * # Get a language by ID + * wp pll language get 1 + * + * @param string[] $args The command arguments. + * @param string[] $assoc_args The command associative arguments. + * @phpstan-param array{field?: string, fields?: string, format?: string} $assoc_args + * + * @since 3.8 + */ + public function get( $args, $assoc_args ): void { + if ( is_numeric( $args[0] ) ) { + $assoc_args['term_id'] = $args[0]; + } else { + $assoc_args['slug'] = $args[0]; + } + $this->list( array(), $assoc_args ); + } + + /** + * Returns a list of normalized arrays from `PLL_Language` objects. + * Maps the `PLL_Language` object properties to the command output fields. + * + * @since 3.8 + * + * @param PLL_Language[] $languages The language objects. + * @return array The normalized array. + */ + private function normalize_languages( array $languages ) { + foreach ( $languages as &$language ) { + $language = $language->to_array(); + + $language['order'] = $language['term_group']; + $language['direction'] = $language['is_rtl'] ? 'rtl' : 'ltr'; + $language['default'] = $language['is_default']; + unset( $language['term_group'], $language['is_rtl'], $language['is_default'] ); + } + + return $languages; + } + + /** + * Returns a formatter instance. + * + * @since 3.8 + * + * @param array $assoc_args The command associative arguments. + * @return Formatter The formatter instance. + */ + private function get_formatter( array $assoc_args ) { + return new Formatter( + $assoc_args, + array( + 'name', + 'slug', + 'locale', + 'term_id', + 'order', + 'direction', + 'active', + 'default', + ) + ); + } + + /** + * Prepares the language arguments. + * + * @since 3.8 + * + * @param array $assoc_args The command associative arguments. + * @param PLL_Language $language The language object. + * + * @return array The prepared language arguments. + * + * @phpstan-return array{lang_id: int, name: string, locale: string, slug: string, rtl: bool, term_group: int, flag: string} + */ + private function prepare_language_args( array $assoc_args, ?PLL_Language $language = null ): array { + /** @var array{lang_id: int, name: string, locale: string, slug: string, rtl: bool, term_group: int, flag: string} */ + $parsed_args = array( + 'lang_id' => $language ? $language->get_tax_prop( 'language', 'term_id' ) : null, + 'name' => Utils\get_flag_value( $assoc_args, 'name', $language ? $language->name : null ), + 'locale' => Utils\get_flag_value( $assoc_args, 'locale', $language ? $language->locale : null ), + 'slug' => Utils\get_flag_value( $assoc_args, 'slug', $language ? $language->slug : null ), + 'rtl' => 'rtl' === Utils\get_flag_value( $assoc_args, 'dir', $language ? ( $language->is_rtl ? 'rtl' : 'ltr' ) : null ), + 'term_group' => (int) Utils\get_flag_value( $assoc_args, 'order', $language ? $language->term_group : null ), // @phpstan-ignore cast.int + 'flag' => Utils\get_flag_value( $assoc_args, 'flag', $language ? $language->flag_code : null ), + ); + + if ( Utils\get_flag_value( $assoc_args, 'skip-default-cat' ) ) { + $parsed_args['no_default_cat'] = true; + } + + return $parsed_args; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/CLI/Command/Setting.php b/wp-content/plugins/polylang-pro/src/modules/CLI/Command/Setting.php new file mode 100644 index 0000000..f936313 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/CLI/Command/Setting.php @@ -0,0 +1,563 @@ +options = $options; + $this->adapter = new Setting_Adapter(); + } + + /** + * Sets a scalar Polylang setting. + * + * ## OPTIONS + * + * + * : The key of the setting to set. + * + * + * : The value of the setting to set. + * + * ## EXAMPLES + * + * # Activate media translation setting + * wp pll setting set media_support true + * + * # Activate media duplication setting + * wp pll setting set media_duplicate true + * + * # Set domains using JSON + * wp pll setting set domains '{"fr":"example.fr"}' + * + * @param string[] $args The command arguments. + * + * @since 3.8 + */ + public function set( $args ): void { + list( $input_key, $input_value ) = $args; + list( $key, $value ) = $this->adapter->get_args( $args ); + + $this->is_supported( $key, self::ERROR_MODE_EXIT ); + $this->is_mutable( $key, self::ERROR_MODE_EXIT ); + + $decoded_value = Utils\is_json( $value ) ? json_decode( $value, true ) : $value; + if ( ! $this->is_scalar( $key ) && ! is_array( $decoded_value ) ) { + WP_CLI::error( sprintf( 'Setting "%s" is not a scalar. Use a JSON string for list or map settings instead.', $key ) ); + } + + $property = $this->options->get_schema()['properties'][ $key ]; + + if ( null === $decoded_value ) { + WP_CLI::error( sprintf( 'Invalid value "%1$s" for type "%2$s".', $value, $property['type'] ) ); + } + + $errors = $this->options->set( $key, $decoded_value ); + + if ( $errors->has_errors() ) { + WP_CLI::error( $errors->get_error_message() ); + } + + $this->save( self::ERROR_MODE_EXIT ); + + WP_CLI::success( sprintf( 'Setting "%1$s" set to "%2$s".', $input_key, $input_value ) ); + } + + /** + * Returns one or more Polylang setting(s) if given key(s), or lists all settings if no key is provided. + * + * ## OPTIONS + * + * [--keys=] + * : Comma-separated list of keys to get. Default is all. + * --- + * default: all + * --- + * + * [--format=] + * : Render output in a particular format. + * --- + * default: table + * options: + * - table + * - json + * - yaml + * - csv + * --- + * + * ## EXAMPLES + * + * # Get specific settings + * wp pll setting get --keys=media_support,force_lang + * + * # List all settings + * wp pll setting get + * + * @param string[] $args The command arguments. + * @param string[] $assoc_args The command associative arguments. + * @phpstan-param array{keys?: string, format?: string} $assoc_args + * + * @since 3.8 + */ + public function get( $args, $assoc_args ): void { + $assoc_args = $this->adapter->get_assoc_args( $assoc_args ); + $settings = $this->options->get_all(); + $schema = $this->options->get_schema(); + /** @var string $keys_filter */ + $keys_filter = Utils\get_flag_value( $assoc_args, 'keys', 'all' ); + + if ( 'all' !== $keys_filter ) { + $requested_keys = array_map( 'trim', explode( ',', $keys_filter ) ); + $filtered_settings = array(); + + foreach ( $requested_keys as $key ) { + if ( ! $this->is_supported( $key, self::ERROR_MODE_WARNING ) ) { + continue; + } + + $filtered_settings[ $key ] = $settings[ $key ]; + } + + $settings = $filtered_settings; + } else { + foreach ( $this->unsupported as $unsupported_key ) { + unset( $settings[ $unsupported_key ] ); + } + } + + if ( empty( $settings ) ) { + WP_CLI::warning( 'No settings found.' ); + + return; + } + + $this->get_formatter( $assoc_args )->display_items( $this->normalize_settings( $settings, $schema['properties'] ) ); + } + + /** + * Adds a value to a list type Polylang setting. + * + * ## OPTIONS + * + * + * : The key of the setting to add a value to. + * + * + * : The value to add to the setting. For map type settings, this is the subkey to add a value to. + * + * [] + * : The subvalue to add to the setting. For map type settings, this is the value of the subkey. Not applicable for list type settings. + * --- + * default: '' + * --- + * + * [--yes] + * : Answer yes to the confirmation message. + * + * ## EXAMPLES + * + * # Add a custom post type to the list of translatable post types + * wp pll setting add post_types custom_post_type + * + * # Add an English domain to the map of domains + * wp pll setting add domains en example.com + * + * @param string[] $args The command arguments. + * @param string[] $assoc_args The command associative arguments. + * @phpstan-param array{yes?: bool} $assoc_args + * + * @since 3.8 + */ + public function add( $args, $assoc_args ): void { + list( $key, $value ) = $args; + $subvalue = $args[2] ?? ''; + + $this->is_supported( $key, self::ERROR_MODE_EXIT ); + + $this->is_mutable( $key, self::ERROR_MODE_EXIT ); + + $this->is_array_like( $key, self::ERROR_MODE_EXIT ); + + if ( $this->is_list( $key ) ) { + $success_message = sprintf( 'Value "%1$s" added to setting "%2$s".', $value, $key ); + + $errors = $this->options->add( $key, $value ); + + WP_CLI::log( $errors->get_error_message() ); + } else { + if ( '' === $subvalue ) { + WP_CLI::error( sprintf( 'Subvalue is required for map type setting "%s".', $key ) ); + } + + /** @var array $prev_map */ + $prev_map = $this->options->get( $key ); + if ( isset( $prev_map[ $value ] ) ) { + WP_CLI::confirm( + sprintf( 'Key "%1$s" already exists in setting "%2$s". Do you want to override it?', $value, $key ), + $assoc_args + ); + } + + $success_message = sprintf( 'Key "%1$s" with value "%2$s" added to setting "%3$s".', $value, $subvalue, $key ); + + $errors = $this->options->add( $key, array( $value => $subvalue ) ); + } + + if ( $errors->has_errors() ) { + WP_CLI::error( $errors->get_error_message() ); + } + + $this->save( self::ERROR_MODE_EXIT ); + + WP_CLI::success( $success_message ); + } + + /** + * Removes a value from a list type Polylang setting. + * + * ## OPTIONS + * + * + * : The key of the setting to remove a value from. + * + * + * : The value to remove from the setting. For map type settings, this is the subkey to remove a value from. + * + * ## EXAMPLES + * + * # Remove a custom post type from the list of translatable post types + * wp pll setting remove post_types custom_post_type + * + * # Remove an English domain from the map of domains + * wp pll setting remove domains en + * + * @param string[] $args The command arguments. + * + * @since 3.8 + */ + public function remove( $args ): void { + list( $key, $value ) = $args; + + $this->is_supported( $key, self::ERROR_MODE_EXIT ); + + $this->is_mutable( $key, self::ERROR_MODE_EXIT ); + + $this->is_array_like( $key, self::ERROR_MODE_EXIT ); + + /** @var array $current_value Array like options. */ + $current_value = $this->options->get( $key ); + + if ( $this->is_list( $key ) ) { + if ( ! in_array( $value, $current_value, true ) ) { + WP_CLI::error( sprintf( 'Value "%1$s" does not exist in setting "%2$s".', $value, $key ) ); + } + + $success_message = sprintf( 'Value "%1$s" removed from setting "%2$s".', $value, $key ); + } else { + if ( ! isset( $current_value[ $value ] ) ) { + WP_CLI::error( sprintf( 'Key "%1$s" does not exist in setting "%2$s".', $value, $key ) ); + } + + $success_message = sprintf( 'Key "%1$s" removed from setting "%2$s".', $value, $key ); + } + + $errors = $this->options->remove( $key, $value ); + if ( $errors->has_errors() ) { + WP_CLI::error( $errors->get_error_message() ); + } + + $this->save( self::ERROR_MODE_EXIT ); + + WP_CLI::success( $success_message ); + } + + /** + * Resets a Polylang setting to its default value, or all settings if no key is provided. + * + * ## OPTIONS + * + * [--keys=] + * : Comma-separated list of keys to reset. If not provided, all settings will be reset. + * + * [--yes] + * : Answer yes to the confirmation message. + * + * ## EXAMPLES + * + * # Reset specific settings + * wp pll setting reset --keys=media_support,force_lang + * + * # Reset all settings + * wp pll setting reset + * + * @param string[] $args The command arguments. + * @param string[] $assoc_args The command associative arguments. + * @phpstan-param array{keys?: string, yes?: bool} $assoc_args + * + * @since 3.8 + */ + public function reset( $args, $assoc_args ): void { + $assoc_args = $this->adapter->get_assoc_args( $assoc_args ); + /** @var string $keys_filter */ + $keys_filter = Utils\get_flag_value( $assoc_args, 'keys' ); + $current_settings = $this->options->get_all(); + + if ( $keys_filter ) { + $keys_to_reset = array_map( 'trim', explode( ',', $keys_filter ) ); + + foreach ( $keys_to_reset as $key ) { + if ( ! $this->is_supported( $key, self::ERROR_MODE_WARNING ) || ! $this->is_mutable( $key, self::ERROR_MODE_WARNING ) ) { + continue; + } + + $this->options->reset( $key ); + } + + $this->save( self::ERROR_MODE_EXIT ); + + WP_CLI::success( sprintf( 'Settings "%s" reset to default values.', $keys_filter ) ); + } else { + WP_CLI::confirm( + 'Are you sure you want to reset all Polylang settings to their default values?', + $assoc_args + ); + + foreach ( $current_settings as $key => $value ) { + if ( $this->is_read_only( $key ) ) { + continue; + } + + $this->options->reset( $key ); + } + + $this->save( self::ERROR_MODE_EXIT ); + + WP_CLI::success( 'All Polylang settings reset to default values.' ); + } + } + + /** + * Saves options or exits with error if save fails. + * + * @since 3.8 + * + * @param string $error_mode The error mode. Use `ERROR_MODE_EXIT` or `ERROR_MODE_WARNING` constants. + * @return bool|never True if the settings were saved successfully, false otherwise. Never returns if $error_mode is `ERROR_MODE_EXIT`. + */ + private function save( string $error_mode ): bool { + $result = $this->options->save(); + + return $result || WP_CLI::$error_mode( 'Failed to save the settings.' ); + } + + /** + * Fails if the given setting is not supported. + * + * @since 3.8 + * + * @param string $key The setting key. + * @param string $error_mode The error mode. Use `ERROR_MODE_EXIT` or `ERROR_MODE_WARNING` constants. + * @return bool|never True if the setting is supported, false otherwise. Never returns if $error_mode is `ERROR_MODE_EXIT`. + */ + private function is_supported( string $key, string $error_mode ) { + if ( ! in_array( $key, $this->unsupported, true ) && isset( $this->options->get_schema()['properties'][ $key ] ) ) { + return true; + } + + WP_CLI::$error_mode( sprintf( 'Setting "%s" is not supported.', $key ) ); + + return false; + } + + /** + * Fails if the given setting is read-only. + * + * @since 3.8 + * + * @param string $key The setting key. + * @param string $error_mode The error mode. Use `ERROR_MODE_EXIT` or `ERROR_MODE_WARNING` constants. + * @return bool|never True if the setting is mutable, false otherwise. Never returns if $error_mode is `ERROR_MODE_EXIT`. + */ + private function is_mutable( string $key, string $error_mode ) { + if ( $this->is_read_only( $key ) ) { + WP_CLI::$error_mode( sprintf( 'Setting "%s" is read-only and cannot be modified.', $key ) ); + + return false; + } + + return true; + } + + /** + * Fails if the given setting is not a list or map setting. + * + * @since 3.8 + * + * @param string $key The setting key. + * @param string $error_mode The error mode. Use `ERROR_MODE_EXIT` or `ERROR_MODE_WARNING` constants. + * @return bool|never True if the setting is a list or map setting, false otherwise. Never returns if $error_mode is `ERROR_MODE_EXIT`. + */ + private function is_array_like( string $key, string $error_mode ) { + if ( ! $this->is_list( $key ) && ! $this->is_map( $key ) ) { + WP_CLI::$error_mode( sprintf( 'Setting "%s" is not a list or map setting. Use "set" command for scalar settings.', $key ) ); + + return false; + } + + return true; + } + + /** + * Returns a formatter instance. + * + * @param array $assoc_args The command associative arguments. + * @return Formatter The formatter instance. + */ + private function get_formatter( array $assoc_args ) { + return new Formatter( + $assoc_args, + array( + 'key', + 'value', + 'type', + ) + ); + } + + /** + * Tells if the given option is read-only. + * + * @since 3.8 + * + * @param string $key The option key. + * @return boolean True if the option is read-only, false otherwise. + */ + private function is_read_only( string $key ): bool { + $schema = $this->options->get_schema(); + + if ( ! isset( $schema['properties'][ $key ] ) ) { + return false; + } + + return ! empty( $schema['properties'][ $key ]['readonly'] ); + } + + /** + * Tells if the given option key is for a scalar setting. + * + * @since 3.8 + * + * @param string $key The option key. + * @return bool True if the option is a scalar, false otherwise. + */ + private function is_scalar( string $key ): bool { + $schema = $this->options->get_schema(); + + return isset( $schema['properties'][ $key ]['type'] ) && in_array( $schema['properties'][ $key ]['type'], array( 'string', 'boolean', 'integer' ), true ); + } + + /** + * Tells if the given option key is for a list setting. + * + * @since 3.8 + * + * @param string $key The option key. + * @return bool True if the option is a list, false otherwise. + */ + private function is_list( string $key ): bool { + $schema = $this->options->get_schema(); + + return isset( $schema['properties'][ $key ]['type'] ) && 'array' === $schema['properties'][ $key ]['type']; + } + + /** + * Tells if the given option key is for a map setting. + * + * @since 3.8 + * + * @param string $key The option key. + * @return bool True if the option is a map, false otherwise. + */ + private function is_map( string $key ): bool { + $schema = $this->options->get_schema(); + return isset( $schema['properties'][ $key ]['type'] ) && 'object' === $schema['properties'][ $key ]['type']; + } + + /** + * Returns a list of normalized settings. + * + * @since 3.8 + * + * @param array $settings The settings. + * @param array $properties List of properties. + * @return array[] The normalized array. + * + * @phpstan-return list> + */ + private function normalize_settings( array $settings, array $properties ) { + $items = array(); + foreach ( $settings as $key => $value ) { + $items[] = $this->adapter->get_item( $key, $value, $properties[ $key ] ); + } + return $items; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/CLI/Command/Setting_Adapter.php b/wp-content/plugins/polylang-pro/src/modules/CLI/Command/Setting_Adapter.php new file mode 100644 index 0000000..d025079 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/CLI/Command/Setting_Adapter.php @@ -0,0 +1,83 @@ + $args[1], + ), + ); + } + + return $args; + } + + /** + * Returns the associative arguments adapted from user-facing interface to internal structure. + * + * @since 3.8 + * + * @param array $assoc_args The associative arguments. + * @return array The adapted associative arguments. + */ + public function get_assoc_args( array $assoc_args ): array { + if ( ! isset( $assoc_args['keys'] ) ) { + return $assoc_args; + } + + $assoc_args['keys'] = preg_replace( '/\bmedia_duplicate\b/', 'media', $assoc_args['keys'] ); + + return $assoc_args; + } + + /** + * Returns the setting item adapted from internal structure to user-facing interface. + * + * @since 3.8 + * + * @param string $key The key of the item. + * @param mixed $value The value of the item. + * @param array $property The property of the item. + * @return array The adapted item. + */ + public function get_item( string $key, $value, array $property ): array { + if ( 'media' !== $key ) { + return array( + 'key' => $key, + 'value' => $value, + 'type' => $property['type'], + ); + } + + /** @var array{duplicate: bool} $value */ + return array( + 'key' => 'media_duplicate', + 'value' => $value['duplicate'], + 'type' => 'boolean', + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/CLI/Commands.php b/wp-content/plugins/polylang-pro/src/modules/CLI/Commands.php new file mode 100644 index 0000000..4b83463 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/CLI/Commands.php @@ -0,0 +1,56 @@ +model = $model; + } + + /** + * Registers Polylang CLI Commands. + * + * @since 3.8 + * + * @return void + */ + public function register(): void { + WP_CLI::add_command( "$this->base setting", new Setting( $this->model->options ) ); + WP_CLI::add_command( "$this->base language", new Language( $this->model->languages ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/CLI/Formatter.php b/wp-content/plugins/polylang-pro/src/modules/CLI/Formatter.php new file mode 100644 index 0000000..1871ab0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/CLI/Formatter.php @@ -0,0 +1,69 @@ +assoc_args = $assoc_args; + $this->wp_cli_formatter = new WP_CLI_Formatter( $assoc_args, $fields ); + } + + /** + * Displays multiple items according to the output arguments. + * This displays true/false strings when using formats that don't display booleans nicely (table, csv). + * + * @since 3.8 + * + * @param array $items The items to display. + * @return void + */ + public function display_items( $items ) { + if ( ! empty( $this->assoc_args['format'] ) && in_array( $this->assoc_args['format'], array( 'json', 'yaml' ), true ) ) { + $this->wp_cli_formatter->display_items( $items ); + return; + } + + foreach ( $items as &$item ) { + foreach ( $item as &$prop ) { + if ( is_bool( $prop ) ) { + $prop = $prop ? 'true' : 'false'; + } + } + } + + $this->wp_cli_formatter->display_items( $items ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/CLI/load.php b/wp-content/plugins/polylang-pro/src/modules/CLI/load.php new file mode 100644 index 0000000..20b8f92 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/CLI/load.php @@ -0,0 +1,15 @@ +model ) )->register(); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Advanced_Capabilities.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Advanced_Capabilities.php new file mode 100644 index 0000000..ba06636 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Advanced_Capabilities.php @@ -0,0 +1,138 @@ +model = $polylang->model; + $this->create_post = ( + new Create_Post( + $polylang->model, + $polylang->request, + property_exists( $polylang, 'pref_lang' ) ? $polylang->pref_lang : null, + property_exists( $polylang, 'curlang' ) ? $polylang->curlang : null + ) + )->init(); + $this->create_term = ( + new Create_Term( + $polylang->model, + $polylang->request, + property_exists( $polylang, 'pref_lang' ) ? $polylang->pref_lang : null, + property_exists( $polylang, 'curlang' ) ? $polylang->curlang : null + ) + )->init(); + + $this->mapper_chain = new Do_Not_Allow(); + $this->mapper_chain + ->set_next( new Post( $polylang->model, $polylang->sync_post_model ) ) + ->set_next( new Term( $polylang->model ) ) + ->set_next( new Machine_Translation() ) + ->set_next( new Internal( Capabilities::LANGUAGES ) ) + ->set_next( new Internal( Capabilities::TRANSLATIONS ) ); + + add_filter( 'map_meta_cap', array( $this, 'map' ), 10, 4 ); + add_filter( 'pll_admin_preferred_language', array( $this, 'filter_preferred_language' ) ); + } + + /** + * Maps a capability to the primitive capabilities required of the given user. + * + * @since 3.8 + * + * @param string[] $caps Primitive capabilities required of the user. + * @param string $cap Capability being checked. + * @param int $user_id The user ID. + * @param array $args Adds context to the capability check, typically + * starting with an object ID. + * @return string[] Updated primitive capabilities required of the user. + */ + public function map( $caps, $cap, $user_id, $args ) { + if ( ! is_array( $caps ) || ! is_string( $cap ) || ! is_numeric( $user_id ) || ! is_array( $args ) ) { + // Type safety. + return $caps; + } + + return $this->mapper_chain->map( + $caps, + $cap, + Capabilities::get_user( new WP_User( $user_id ) ), + $args + ); + } + + /** + * Filters the preferred language to ensure it's authorized for translators. + * - If the preferred language is authorized, keeps it. + * - Otherwise, returns the first authorized language. + * + * @since 3.8 + * + * @param PLL_Language|false $pref_lang The preferred language. + * @return PLL_Language|false The authorized preferred language, or false if none available. + */ + public function filter_preferred_language( $pref_lang ) { + if ( $pref_lang instanceof PLL_Language ) { + $user = Capabilities::get_user(); + if ( $user->can_translate( $pref_lang ) ) { + return $pref_lang; + } + } + + // Otherwise, return the first authorized language. + $authorized_languages = $this->model->languages->filter( 'translator' )->get_list(); + // If no language can be found, return false as `PLL_Model::get_default_language()` or `PLL_Model::get_language()`. + return ! empty( $authorized_languages ) ? reset( $authorized_languages ) : false; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Create/Post.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Create/Post.php new file mode 100644 index 0000000..a112d97 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Create/Post.php @@ -0,0 +1,81 @@ +create_post = new Create_Post( $model, $request, $pref_lang, $curlang ); + $this->model = $model; + } + + /** + * Initializes the capabilities checker. + * + * @since 3.8 + * + * @return self + */ + public function init(): self { + add_filter( 'wp_insert_post_empty_content', array( $this, 'check_capabilities' ), 0, 2 ); + + return $this; + } + + /** + * Checks if the user has the capabilities to create a post in the contextual language. + * + * @since 3.8 + * + * @param bool $maybe_empty Whether the post should be considered "empty". Unused. + * @param array $postarr Array of post data. + * + * @return bool|never Untouched `$maybe_empty` parameter value. Die if the user does not have the capabilities. + */ + public function check_capabilities( $maybe_empty, $postarr ) { + if ( ! empty( $postarr['ID'] ) || ! $this->model->post->is_translated_object_type( $postarr['post_type'] ) ) { + return $maybe_empty; + } + + Capabilities::get_user()->can_translate_or_die( + $this->create_post->get_language() + ); + + return $maybe_empty; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Create/Term.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Create/Term.php new file mode 100644 index 0000000..4d690f8 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Create/Term.php @@ -0,0 +1,81 @@ +create_term = new Create_Term( $model, $request, $pref_lang, $curlang ); + $this->model = $model; + } + + /** + * Initializes the capabilities checker. + * + * @since 3.8 + * + * @return self + */ + public function init(): self { + add_filter( 'pre_insert_term', array( $this, 'check_capabilities' ), 0, 2 ); + + return $this; + } + + /** + * Checks if the user has the capabilities to create a term in the contextual language. + * + * @since 3.8 + * + * @param string|\WP_Error $term The term name to add, or a `WP_Error` object if there's an error. Unused. + * @param string $taxonomy Taxonomy slug. + * + * @return string|\WP_Error|never The term name to add, or a `WP_Error` object if there's an error. Die if the user does not have the capabilities. + */ + public function check_capabilities( $term, $taxonomy ) { + if ( is_int( $term ) || ! $this->model->term->is_translated_object_type( $taxonomy ) ) { + return $term; + } + + Capabilities::get_user()->can_translate_or_die( + $this->create_term->get_language() + ); + + return $term; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Languages_Proxy.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Languages_Proxy.php new file mode 100644 index 0000000..6fddb9b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Languages_Proxy.php @@ -0,0 +1,50 @@ +is_translator() ) { + return $languages; + } + + return array_filter( $languages, array( $user, 'can_translate' ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Abstract_Mapper.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Abstract_Mapper.php new file mode 100644 index 0000000..59c6361 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Abstract_Mapper.php @@ -0,0 +1,57 @@ +next ) { + return $this->next->map( $caps, $cap, $user, $args ); + } + + return $caps; + } + + /** + * Sets the next mapper to be used. + * + * @since 3.8 + * + * @param Abstract_Mapper $next_mapper The next mapper to be used. + * @return Abstract_Mapper The next mapper to be used. + */ + public function set_next( Abstract_Mapper $next_mapper ): Abstract_Mapper { + $this->next = $next_mapper; + + return $next_mapper; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Do_Not_Allow.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Do_Not_Allow.php new file mode 100644 index 0000000..2a7fd1a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Do_Not_Allow.php @@ -0,0 +1,14 @@ +capability = $capability; + } + /** + * Maps a capability to the primitive capabilities required of the given user. + * + * @since 3.8 + * + * @param string[] $caps Primitive capabilities required of the user. + * @param string $cap Capability being checked. + * @param User_Interface $user The user object. + * @param array $args Adds context to the capability check, typically starting with an object ID. + * @return string[] Updated primitive capabilities required of the user. + */ + public function map( array $caps, string $cap, User_Interface $user, array $args ): array { + if ( $this->capability !== $cap ) { + return parent::map( $caps, $cap, $user, $args ); + } + + if ( $user->has_cap( 'manage_options' ) ) { + // Polylang already replaced the custom capability by `manage_options`. + return $caps; + } + + // Non-administrators must have the custom capability. + $caps = array_diff( $caps, array( 'manage_options', $this->capability ) ); + $caps[] = $this->capability; + + return $caps; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Machine_Translation.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Machine_Translation.php new file mode 100644 index 0000000..791dbcb --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Machine_Translation.php @@ -0,0 +1,53 @@ +has_cap( 'manage_options' ) ) { + // Enabled, but administrators are not required to have this capability. + return array_diff( $caps, array( self::CAPABILITY ) ); + } + + return $caps; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Post.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Post.php new file mode 100644 index 0000000..a42e6a6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Post.php @@ -0,0 +1,218 @@ +model = $model; + $this->sync_post_model = $sync_post_model; + + array_map( + array( $this, 'add_capabilities' ), + get_post_types( array(), 'objects' ), + ); + + add_action( 'registered_post_type', Closure::fromCallable( array( $this, 'load_capabilities' ) ), 10, 2 ); + } + + /** + * Maps a capability to the primitive capabilities required of the given user. + * + * @since 3.8 + * + * @param string[] $caps Primitive capabilities required of the user. + * @param string $cap Capability being checked. + * @param User_Interface $user The user object. + * @param array $args Adds context to the capability check, typically starting with an object ID. + * @return string[] Updated primitive capabilities required of the user. + */ + public function map( array $caps, string $cap, User_Interface $user, array $args ): array { + if ( empty( $args[0] ) ) { + // No additional arguments. + return parent::map( $caps, $cap, $user, $args ); + } + + if ( ! $user->is_translator() ) { + return parent::map( $caps, $cap, $user, $args ); + } + + if ( ! in_array( $cap, $this->capabilities, true ) ) { + return parent::map( $caps, $cap, $user, $args ); + } + + // Accepts a post ID or a WP_Post as WordPress does, the latter being undocumented. + $post = get_post( $args[0] ); + + if ( ! $post instanceof WP_Post ) { + // Wrong type of argument, or the post doesn't exist. + return parent::map( $caps, $cap, $user, $args ); + } + + $key_suffix = sprintf( '|%d|%s', $user->get_id(), $cap ); + + if ( ! empty( $this->processing_sync[ $post->ID . $key_suffix ] ) ) { + // Already processing this post in the `foreach` loop at the end of this method. + return parent::map( $caps, $cap, $user, $args ); + } + + if ( ! $this->model->post->is_translated_object_type( $post->post_type ) ) { + return parent::map( $caps, $cap, $user, $args ); + } + + $language = $this->model->post->get_language( $post->ID ); + + if ( ! $language || ! $user->can_translate( $language ) ) { + $caps[] = 'do_not_allow'; + return $caps; + } + + if ( in_array( $cap, $this->delete_post_capabilities, true ) ) { + // No need to deal with synchronization. + return parent::map( $caps, $cap, $user, $args ); + } + + $synchros = $this->sync_post_model->get( $post->ID ); + + if ( empty( $synchros ) ) { + return parent::map( $caps, $cap, $user, $args ); + } + + /* + * Check all languages at once: + * - Much faster here than in the `foreach` loop below. + * - This allows to stop here if the user doesn't have all the required language capabilities (no need to check + * anything else in this case). + */ + if ( ! $user->can_translate_all( array_keys( $synchros ) ) ) { + $caps[] = 'do_not_allow'; + return $caps; + } + + /* + * Make sure this post is not synchronized with one that the user can't edit (for whatever reason that is not + * related to language capabilities). + */ + foreach ( $synchros as $tr_id ) { + if ( (int) $tr_id === $post->ID ) { + continue; + } + + $tr_key = $tr_id . $key_suffix; + + $this->processing_sync[ $tr_key ] = true; + + if ( ! $user->has_cap( $cap, (int) $tr_id ) ) { + unset( $this->processing_sync[ $tr_key ] ); + $caps[] = 'do_not_allow'; + return $caps; + } + + unset( $this->processing_sync[ $tr_key ] ); + } + + return parent::map( $caps, $cap, $user, $args ); + } + + /** + * Loads the post type capabilities. + * + * @since 3.8 + * + * @param string $post_type Post type. Unused. + * @param WP_Post_Type $post_type_object Post type object. + * @return void + */ + private function load_capabilities( $post_type, $post_type_object ): void { + $post_type_object instanceof WP_Post_Type && $this->add_capabilities( $post_type_object ); + } + + /** + * Adds the capabilities for a post type. + * + * @since 3.8 + * + * @param WP_Post_Type $post_type_object Post type object. + * @return void + */ + private function add_capabilities( WP_Post_Type $post_type_object ): void { + if ( ! $this->model->post->is_translated_object_type( $post_type_object->name ) ) { + return; + } + + $this->delete_post_capabilities = array_merge( + $this->delete_post_capabilities, + array( $post_type_object->cap->delete_post ) + ); + $this->capabilities = array_merge( + $this->capabilities, + $this->delete_post_capabilities, + array( $post_type_object->cap->edit_post ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Term.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Term.php new file mode 100644 index 0000000..36d26e7 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/Mapper/Term.php @@ -0,0 +1,133 @@ +model = $model; + + array_map( + array( $this, 'add_capabilities' ), + get_taxonomies( array(), 'objects' ), + ); + + add_action( 'registered_taxonomy', Closure::fromCallable( array( $this, 'load_capabilities' ) ) ); + } + + /** + * Maps a capability to the primitive capabilities required of the given user. + * + * @since 3.8 + * + * @param string[] $caps Primitive capabilities required of the user. + * @param string $cap Capability being checked. + * @param User_Interface $user The user object. + * @param array $args Adds context to the capability check, typically starting with an object ID. + * @return string[] Updated primitive capabilities required of the user. + */ + public function map( array $caps, string $cap, User_Interface $user, array $args ): array { + if ( empty( $args[0] ) || ! is_numeric( $args[0] ) ) { + // No additional arguments or non-numeric. + return parent::map( $caps, $cap, $user, $args ); + } + + if ( ! $user->is_translator() ) { + return parent::map( $caps, $cap, $user, $args ); + } + + if ( ! in_array( $cap, $this->capabilities, true ) ) { + return parent::map( $caps, $cap, $user, $args ); + } + + $term = get_term( (int) $args[0] ); + if ( ! $term instanceof WP_Term || ! $this->model->term->is_translated_object_type( $term->taxonomy ) ) { + return parent::map( $caps, $cap, $user, $args ); + } + + $language = $this->model->term->get_language( $term->term_id ); + if ( $language && $user->can_translate( $language ) ) { + return parent::map( $caps, $cap, $user, $args ); + } + + $caps[] = 'do_not_allow'; + + return $caps; + } + + /** + * Loads the taxonomy capabilities. + * + * @since 3.8 + * + * @param string $taxonomy Taxonomy name. + * @return void + */ + private function load_capabilities( $taxonomy ): void { + $taxonomy_object = get_taxonomy( $taxonomy ); + if ( ! $taxonomy_object ) { + return; + } + + $this->add_capabilities( $taxonomy_object ); + } + + /** + * Adds the capabilities for a taxonomy. + * + * @since 3.8 + * + * @param WP_Taxonomy $taxonomy_object Taxonomy object. + * @return void + */ + private function add_capabilities( WP_Taxonomy $taxonomy_object ): void { + if ( ! $this->model->term->is_translated_object_type( $taxonomy_object->name ) ) { + return; + } + + $this->capabilities = array_merge( + $this->capabilities, + array( $taxonomy_object->cap->edit_terms, $taxonomy_object->cap->delete_terms ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/User/Creator.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/User/Creator.php new file mode 100644 index 0000000..9e3fe81 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/User/Creator.php @@ -0,0 +1,52 @@ +instance && $user->ID === $this->instance->get_id() ) { + return $this->instance; + } + + /* + * Voluntarily checking `WP_user::$allcaps` instead of `WP_user::has_cap()` to avoid infinite loop with the `map_meta_cap` filter. + * Checking `manage_options` is appropriate because it allows both super admins and admins. + */ + if ( ! empty( $user->allcaps['manage_options'] ) ) { + $this->instance = new NOOP( $user ); + + return $this->instance; + } + + $this->instance = new Translator( $user ); + + return $this->instance; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/User/Translator.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/User/Translator.php new file mode 100644 index 0000000..babc728 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/User/Translator.php @@ -0,0 +1,182 @@ +user = $user; + } + + /** + * Returns the user ID. + * + * @since 3.8 + * + * @return int + */ + public function get_id(): int { + return $this->user->ID; + } + + /** + * Tells if the user is a translator (has a translator capability). + * Note: returns `true` if the user has a capability for a language that doesn't exist anymore. This is intentional, + * to prevent the user to suddenly have the rights to translate in all languages while it wasn't allowed until then. + * + * @since 3.8 + * + * @return bool + */ + public function is_translator(): bool { + return ! empty( $this->get_language_caps() ); + } + + /** + * Tells if the user can translate to the given language. + * + * @since 3.8 + * + * @param PLL_Language $language A language object. + * @return bool + */ + public function can_translate( PLL_Language $language ): bool { + if ( isset( $this->can_translate[ $language->slug ] ) ) { + return $this->can_translate[ $language->slug ]; + } + + if ( ! $this->is_translator() ) { + $this->can_translate[ $language->slug ] = true; + } else { + $this->can_translate[ $language->slug ] = $this->user->has_cap( "translate_{$language->slug}" ); + } + + return $this->can_translate[ $language->slug ]; + } + + /** + * Tells if the user can translate to all the given languages. + * + * @since 3.8 + * + * @param array $languages List of language slugs. + * @return bool + * + * @phpstan-param array $languages + */ + public function can_translate_all( array $languages ): bool { + if ( ! $this->is_translator() ) { + return true; + } + + foreach ( $languages as $language_slug ) { + if ( ! isset( $this->can_translate[ $language_slug ] ) ) { + $this->can_translate[ $language_slug ] = $this->user->has_cap( "translate_{$language_slug}" ); + } + if ( ! $this->can_translate[ $language_slug ] ) { + return false; + } + } + + return true; + } + + /** + * Tells if the user has the specified capability. + * + * @since 3.8 + * + * @param string $capability Capability name. + * @param mixed ...$args Optional further parameters, typically starting with an object ID. + * @return bool + */ + public function has_cap( $capability, ...$args ): bool { + return $this->user->has_cap( $capability, ...$args ); + } + + /** + * Returns the preferred language of the user. + * + * @since 3.8 + * + * @return string The preferred language slug, empty string if no preferred language is found. + */ + public function get_preferred_language_slug(): string { + $language_caps = $this->get_language_caps(); + + if ( empty( $language_caps ) ) { + return ''; + } + + // Arbitrarily use the first language cap. + $language_cap = reset( $language_caps ); + + return str_replace( 'translate_', '', $language_cap ); + } + + /** + * Returns the language capabilities of the user. + * + * @since 3.8 + * + * @return array + */ + private function get_language_caps(): array { + if ( isset( $this->language_caps ) ) { + return $this->language_caps; + } + + $this->language_caps = (array) preg_grep( '/^translate_' . Languages::INNER_SLUG_PATTERN . '$/', array_keys( $this->user->allcaps ) ); + + return $this->language_caps; + } + + /** + * Checks if the current user has the rights to assign a language to an object and dies if not. + * + * @since 3.8 + * + * @param PLL_Language $language The language to assign. + * @return void|never Dies if the user does not have the rights, does nothing otherwise. + */ + public function can_translate_or_die( PLL_Language $language ): void { + if ( ! $this->can_translate( $language ) ) { + /* translators: %s is a language name */ + wp_die( esc_html( sprintf( __( 'Sorry, you are not allowed to edit content in %s.', 'polylang-pro' ), $language->name ) ) ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Capabilities/load.php b/wp-content/plugins/polylang-pro/src/modules/Capabilities/load.php new file mode 100644 index 0000000..c870ce6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Capabilities/load.php @@ -0,0 +1,15 @@ +model->has_languages() ) { + require_once POLYLANG_PRO_DIR . '/src/modules/sync-post/load.php'; // Make sure `$polylang->sync_post_model` is set. + + $polylang->model->languages->register_proxy( new Languages_Proxy() ); + $polylang->advanced_capabilities = new Advanced_Capabilities( $polylang ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Editors/Filter_Preload_Paths.php b/wp-content/plugins/polylang-pro/src/modules/Editors/Filter_Preload_Paths.php new file mode 100644 index 0000000..615ecd8 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Editors/Filter_Preload_Paths.php @@ -0,0 +1,118 @@ +model = &$polylang->model; + $this->curlang = &$polylang->curlang; + $this->block_editor = &$polylang->block_editor; + } + + /** + * Adds required hooks. + * + * @since 3.7 + * + * @return self + */ + public function init(): self { + add_filter( 'block_editor_rest_api_preload_paths', array( $this, 'filter_preload_paths' ), 50, 2 ); + add_filter( 'pll_filtered_rest_routes', array( $this, 'filter_navigation_fallback_route' ) ); + + return $this; + } + + /** + * Filters preload paths based on the context (block editor for posts, site editor or widget editor for instance). + * + * @since 3.4 + * + * @param (string|string[])[] $preload_paths Preload paths. + * @param WP_Block_Editor_Context $context Editor context. + * @return array Filtered preload paths. + */ + public function filter_preload_paths( $preload_paths, $context ) { + if ( ! $context instanceof WP_Block_Editor_Context || empty( $this->block_editor ) ) { + return $preload_paths; + } + + if ( $context->post instanceof WP_Post && ! $this->model->is_translated_post_type( $context->post->post_type ) ) { + return $preload_paths; + } + + $preload_paths = (array) $preload_paths; + + // Do nothing if in post editor since `PLL_Admin_Block_Editor` has already filtered. + if ( 'core/edit-post' !== $context->name ) { + $lang = ! empty( $this->curlang ) ? $this->curlang->slug : null; + + if ( empty( $lang ) || 'core/edit-widgets' === $context->name ) { + // WP 6.0+: widget screen filtered by default language. See `WP_Syntex\Polylang_Pro\Editors\Screens\Widget::get_language()`. + $lang = $this->model->options['default_lang']; + } + + $preload_paths = $this->block_editor->filter_rest_routes->add_query_parameters( + $preload_paths, + array( + 'lang' => $lang, + ) + ); + } + + $preload_paths[] = '/pll/v1/languages'; + + return $preload_paths; + } + + /** + * Adds navigation fallback REST route to the filterable ones. + * + * @since 3.7 + * + * @param string[] $routes Filterable REST routes. + * @return string[] Filtered filterable REST routes. + */ + public function filter_navigation_fallback_route( $routes ) { + $routes['navigation-fallback'] = 'wp-block-editor/v1/navigation-fallback'; + + return $routes; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Abstract_Screen.php b/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Abstract_Screen.php new file mode 100644 index 0000000..12bc91d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Abstract_Screen.php @@ -0,0 +1,212 @@ +suffix = '.min'; + } + + $this->model = &$polylang->model; + $this->block_editor = &$polylang->block_editor; + } + + /** + * Adds required hooks. + * + * @since 3.7 + * + * @return static + */ + public function init() { + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) ); + + return $this; + } + + /** + * Enqueues script for the editors. + * + * @since 3.7 + * + * @return void + */ + public function enqueue(): void { + $screen = get_current_screen(); + if ( empty( $screen ) ) { + return; + } + + if ( $this->can_enqueue_style( $screen ) ) { + $this->enqueue_style(); + } + + if ( ! $this->screen_matches( $screen ) ) { + return; + } + + wp_enqueue_script( + static::get_handle(), + plugins_url( $this->get_script_path(), POLYLANG_ROOT_FILE ), + array( + 'wp-api-fetch', + 'wp-data', + 'wp-i18n', + 'wp-sanitize', + 'lodash', + ), + POLYLANG_VERSION, + true + ); + + $editor_lang = $this->get_language(); + if ( ! empty( $editor_lang ) ) { + $editor_lang = $editor_lang->to_array(); + } + $pll_settings_script = 'let pll_block_editor_plugin_settings = ' . wp_json_encode( + /** + * Filters settings required by the UI. + * + * @since 3.6 + * + * @param array $settings. + */ + (array) apply_filters( + 'pll_block_editor_plugin_settings', + array( + 'lang' => $editor_lang, + 'nonce' => wp_create_nonce( 'pll_language' ), + 'authorizedLanguagesSlugs' => $this->model->languages + ->filter( 'translator' ) + ->get_list( array( 'fields' => 'slug' ) ), + ) + ) + ); + + wp_add_inline_script( static::get_handle(), $pll_settings_script, 'before' ); + wp_set_script_translations( static::get_handle(), 'polylang-pro' ); + + if ( ! empty( $this->block_editor ) ) { + $this->block_editor->filter_rest_routes->add_inline_script( static::get_handle() ); + } + } + + /** + * Tells if the given screen matches the type of the current object. + * + * @since 3.7 + * + * @param WP_Screen $screen The WordPress screen object. + * @return bool True is the screen is a match, false otherwise. + */ + abstract protected function screen_matches( WP_Screen $screen ): bool; + + /** + * Returns the current editor language. + * + * @since 3.7 + * + * @return PLL_Language|null The language object if found, `null` otherwise. + */ + abstract protected function get_language(): ?PLL_Language; + + /** + * Returns the screen name to use across all process. + * + * @since 3.7 + * + * @return string + */ + abstract protected function get_screen_name(): string; + + /** + * Tells if the given screen is suitable for stylesheet enqueueing. + * + * @since 3.7 + * + * @param WP_Screen $screen The WordPress screen object. + * @return bool + */ + protected function can_enqueue_style( WP_Screen $screen ): bool { + return $this->screen_matches( $screen ); + } + + /** + * Returns the main script handle for the editor. + * Useful to add inline scripts or to register translations for instance. + * + * @since 3.7 + * + * @return string The handle. + */ + protected function get_handle(): string { + return "pll_{$this->get_screen_name()}_sidebar"; + } + + /** + * Returns the path to the main script for the editor. + * + * @since 3.7 + * + * @return string The full path. + */ + protected function get_script_path(): string { + return "/js/build/editors/{$this->get_screen_name()}{$this->suffix}.js"; + } + + /** + * Enqueues stylesheet commonly used in all editors. + * Override to your taste. + * + * @since 3.7 + * + * @return void + */ + protected function enqueue_style(): void { + wp_enqueue_style( + 'polylang-block-widget-editor-css', + plugins_url( '/css/build/style' . $this->suffix . '.css', POLYLANG_ROOT_FILE ), + array( 'wp-components' ), + POLYLANG_VERSION + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Post.php b/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Post.php new file mode 100644 index 0000000..772cd5d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Post.php @@ -0,0 +1,130 @@ +posts = &$polylang->posts; + $this->links = &$polylang->links; + } + + /** + * Adds required hooks. + * + * @since 3.8 + * + * @return static + */ + public function init() { + parent::init(); + + add_filter( 'pll_block_editor_plugin_settings', array( $this, 'add_new_post_translation_link' ) ); + + return $this; + } + + /** + * Adds the nonce field for the new post translation + * in the block editor plugin settings. + * + * @since 3.8 + * + * @param array $settings The settings array. + * @return array The settings array. + */ + public function add_new_post_translation_link( $settings ) { + global $post; + + $screen = get_current_screen(); + if ( empty( $this->links ) || empty( $screen ) || ! $this->screen_matches( $screen ) || empty( $post ) ) { + return $settings; + } + + foreach ( $this->model->get_languages_list() as $language ) { + $settings['new_post_translation_links'][ $language->slug ] = $this->links->get_new_post_translation_link( + $post, + $language, + 'keep ampersand' + ); + } + + return $settings; + } + + /** + * Tells whether the given screen is the Post edtitor or not. + * + * @since 3.7 + * + * @param WP_Screen $screen The current screen. + * @return bool True if Post editor screen, false otherwise. + */ + protected function screen_matches( WP_Screen $screen ): bool { + return ( + 'post' === $screen->base + && $this->model->post_types->is_translated( $screen->post_type ) + && $screen->is_block_editor() + ); + } + + /** + * Returns the language to use in the Post editor. + * + * @since 3.7 + * + * @return PLL_Language|null + */ + protected function get_language(): ?PLL_Language { + global $post; + + if ( ! empty( $post ) && ! empty( $this->posts ) && $this->model->post_types->is_translated( $post->post_type ) ) { + $this->posts->set_default_language( $post->ID ); + $post_lang = $this->model->post->get_language( $post->ID ); + return ! empty( $post_lang ) ? $post_lang : null; + } + + return null; + } + + /** + * Returns the screen name for the Post editor to use across all process. + * + * @since 3.7 + * + * @return string + */ + protected function get_screen_name(): string { + return 'post'; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Site.php b/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Site.php new file mode 100644 index 0000000..76bb8be --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Site.php @@ -0,0 +1,121 @@ +curlang = &$polylang->curlang; + } + + /** + * Adds required hooks. + * + * @since 3.7 + * + * @return static + */ + public function init() { + parent::init(); + add_filter( 'pll_admin_ajax_params', array( $this, 'ajax_filter' ) ); + + return $this; + } + + /** + * Adds the language to the data added to all AJAX requests. + * + * @since 3.7 + * + * @param array $params List of parameters to add to the admin ajax request. + * @return array + */ + public function ajax_filter( $params ) { + $screen = get_current_screen(); + + if ( empty( $screen ) ) { + return $params; + } + + if ( ! $this->screen_matches( $screen ) ) { + return $params; + } + + $editor_lang = $this->get_language(); + + if ( empty( $editor_lang ) ) { + return $params; + } + + $params['lang'] = $editor_lang->slug; + return $params; + } + + + /** + * Tells whether the given screen is the Site edtitor or not. + * + * @since 3.7 + * + * @param WP_Screen $screen The current screen. + * @return bool True if Site editor screen, false otherwise. + */ + protected function screen_matches( WP_Screen $screen ): bool { + return ( + 'site-editor' === $screen->base + && $this->model->post_types->is_translated( 'wp_template_part' ) + && $screen->is_block_editor() + ); + } + + /** + * Returns the language to use in the Site editor. + * + * @since 3.7 + * + * @return PLL_Language|null + */ + protected function get_language(): ?PLL_Language { + if ( ! empty( $this->curlang ) && PLL_FSE_Tools::is_site_editor() ) { + return $this->curlang; + } + + return null; + } + + /** + * Returns the screen name for the Site editor to use across all process. + * + * @since 3.7 + * + * @return string + */ + protected function get_screen_name(): string { + return 'site'; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Widget.php b/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Widget.php new file mode 100644 index 0000000..4a35dc1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Editors/Screens/Widget.php @@ -0,0 +1,99 @@ +base || parent::can_enqueue_style( $screen ); + } + + /** + * Method that allows legacy widgets in widget block editor previously removed by WP and hide legacy Polylang widget. + * + * @since 3.2 + * + * @param array $widget_ids An array of hidden widget ids. + * @return array + */ + public function filter_legacy_widgets( $widget_ids ) { + $widgets_to_show = array( 'custom_html' ); + $widget_ids = array_diff( $widget_ids, $widgets_to_show ); + + $widgets_to_hide = array( 'polylang' ); + $widget_ids = array_merge( $widget_ids, $widgets_to_hide ); + + return $widget_ids; + } + + + /** + * Tells whether the given screen is the Widget edtitor or not. + * + * @since 3.7 + * + * @param WP_Screen $screen The current screen. + * @return bool True if Widget editor screen, false otherwise. + */ + protected function screen_matches( WP_Screen $screen ): bool { + return ( + 'widgets' === $screen->base + && function_exists( 'wp_use_widgets_block_editor' ) + && wp_use_widgets_block_editor() + && $screen->is_block_editor() + ); + } + + /** + * Returns the language to use in the Widget editor. + * + * @since 3.7 + * + * @return PLL_Language|null + */ + protected function get_language(): ?PLL_Language { + $language = $this->model->languages->get_default(); + + return $language instanceof PLL_Language ? $language : null; + } + + /** + * Returns the screen name for the Widget editor to use across all process. + * + * @since 3.7 + * + * @return string + */ + protected function get_screen_name(): string { + return 'widget'; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Editors/load.php b/wp-content/plugins/polylang-pro/src/modules/Editors/load.php new file mode 100644 index 0000000..0a23453 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Editors/load.php @@ -0,0 +1,29 @@ +model->languages->has() + && $polylang instanceof PLL_Admin + && pll_use_block_editor_plugin() + ) { + $polylang->site_editor = ( new Site( $polylang ) )->init(); + $polylang->post_editor = ( new Post( $polylang ) )->init(); + $polylang->widget_editor = ( new Widget( $polylang ) )->init(); + $polylang->filter_path = ( new Filter_Preload_Paths( $polylang ) )->init(); + } + } +); diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Clients/Client_Interface.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Clients/Client_Interface.php new file mode 100644 index 0000000..6157425 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Clients/Client_Interface.php @@ -0,0 +1,45 @@ +api_key = $options['api_key']; + $this->formality = $options['formality'] ?? 'default'; + $this->glossary_id = $options['glossary_id'] ?? ''; + } + + /** + * Performs a request to machine translation service. + * + * @since 3.6 + * + * @param Translations $translations Translations object. + * @param PLL_Language $target_language Target language. + * @param PLL_Language|null $source_language Source language, leave empty for automatic detection. + * @return Translations|WP_Error + */ + public function translate( Translations $translations, PLL_Language $target_language, $source_language = null ) { + $tr_strings = array(); + foreach ( $this->split( $translations ) as $batch ) { + $result = $this->translate_batch( $batch, $target_language, $source_language ); + + if ( is_wp_error( $result ) ) { + // Abort early. + return $result; + } + + if ( count( $result ) !== count( $batch ) ) { + return new WP_Error( 'pll_deepl_incomplete_response', __( 'The DeepL response is incomplete.', 'polylang-pro' ) ); + } + + array_push( $tr_strings, ...$result ); + } + + + foreach ( $translations->entries as &$entry ) { + $entry->translations = (array) array_shift( $tr_strings ); + } + + return $translations; + } + + /** + * Splits an array of strings into several batches manageable by DeepL API. + * + * @since 3.6 + * + * @param Translations $translations Translations object with entries to split. + * @return string[][] Array of arrays of strings, each ones suitable for DeepL. + */ + private function split( Translations $translations ): array { + $count = 0; + $size = 0; + $chunk = array(); + $chunks = array(); + + foreach ( $translations->entries as $entry ) { + $length = strlen( $entry->singular ); + + ++$count; + $size += $length; + + /* + * A DeepL translation request body must not exceed 128 * 1024 bytes according to the documentation. + * {@see https://www.deepl.com/docs-api/translate-text}. We decrease this limit to 120 * 1024 bytes + * to account for extra bytes added by the request params (100 bytes) + the JSON encoding of the array. + */ + if ( $count > 50 || $size > 120 * \KB_IN_BYTES ) { + $chunks[] = $chunk; + + $count = 0; + $size = $length; + $chunk = array(); + } + + $chunk[] = $entry->singular; + } + + $chunks[] = $chunk; // Don't forget the last chunk. + + return $chunks; + } + + /** + * Sends a batch of strings to DeepL and returns their translations in the same order. + * + * @since 3.6 + * + * @param string[] $batch Strings to translate. + * @param PLL_Language $target_language Target language. + * @param PLL_Language $source_language Source language, `null` for auto-detection. + * @return string[]|WP_Error + */ + private function translate_batch( $batch, PLL_Language $target_language, $source_language = null ) { + $target_code = Service::get_target_code( $target_language ); + if ( empty( $target_code ) ) { + return new WP_Error( + 'pll_deepl_target_language_unavailable', + sprintf( + /* translators: %1$s is a language name, %2$s is a language locale. */ + __( '%1$s (%2$s) is not available as target language with DeepL.', 'polylang-pro' ), + $target_language->name, + sprintf( + '%s', + $target_language->locale + ) + ), + 'warning' + ); + } + + $body = array( + 'target_lang' => $target_code, + 'tag_handling' => 'html', + 'split_sentences' => '1', + 'formality' => $this->get_formality( $target_language ), + 'text' => $batch, + ); + + if ( ! empty( $this->glossary_id ) ) { + $body['glossary_id'] = $this->glossary_id; + } + + if ( ! empty( $source_language ) ) { + $source_code = Service::get_source_code( $source_language ); + if ( empty( $source_code ) ) { + return new WP_Error( + 'pll_deepl_source_language_unavailable', + sprintf( + /* translators: %1$s is a language name, %2$s is a language locale. */ + __( '%1$s (%2$s) is not available as source language with DeepL.', 'polylang-pro' ), + $source_language->name, + sprintf( + '%s', + $source_language->locale + ) + ), + 'warning' + ); + } + $body['source_lang'] = $source_code; + } + + $headers = array( + 'Content-Type' => 'application/json', + ); + + $response = $this->request( + 'POST', + 'v2/translate', + array( + 'headers' => $headers, + 'body' => wp_json_encode( $body ), + ) + ); + + if ( $this->should_retry_with_empty_glossary( $response ) ) { + $this->glossary_id = ''; + + return $this->translate_batch( $batch, $target_language, $source_language ); + } + + if ( is_wp_error( $response ) ) { + return $response; + } + + $body = json_decode( $response['body'], true ); + + if ( ! is_array( $body ) || empty( $body['translations'] ) ) { + return new WP_Error( 'pll_deepl_no_translations', __( 'No translations have been returned by DeepL.', 'polylang-pro' ) ); + } + + $tr_strings = array(); + foreach ( $body['translations'] as $translation ) { + if ( isset( $translation['text'] ) ) { + $tr_strings[] = $translation['text']; + } + } + + return $tr_strings; + } + + /** + * Sends the request to the client, and returns a response or a `WP_Error` in case of failure. + * + * @since 3.6 + * + * @param string $method The HTTP method to use. + * @param string $endpoint The API endpoint. + * @param array $args { + * The request arguments. + * + * @type array $headers Optional. Headers to send. Default is an empty array. + * @type string $body Optional. A JSON-encoded string of data. Nothing is sent by default. + * } + * @return array|WP_Error + */ + private function request( string $method, string $endpoint, array $args = array() ) { + if ( empty( $this->api_key ) ) { + // No need to contact DeepL if the API key is empty. + return $this->check_status_code( 403 ); + } + + $args = array_merge_recursive( + array( + 'headers' => array( + 'Authorization' => 'DeepL-Auth-Key ' . $this->api_key, + ), + 'method' => $method, + ), + $args + ); + + $response = wp_remote_request( + $this->get_route( $endpoint ), + $args + ); + + if ( is_wp_error( $response ) ) { + return $response; + } + + $status_code_error = $this->check_status_code( + $response['response']['code'], + $response['body'] ?? '' + ); + if ( $status_code_error->has_errors() ) { + return $status_code_error; + } + + if ( empty( $response['body'] ) ) { + return new WP_Error( 'pll_deepl_empty_response_body', __( 'No translations have been returned by DeepL.', 'polylang-pro' ) ); + } + + return $response; + } + + /** + * Checks the HTTP status code. + * + * @see https://github.com/DeepLcom/deepl-php/blob/v1.6.0/src/Translator.php#L691 + * + * @since 3.6 + * @since 3.8 The parameter `body` has been added. + * + * @param int $code The HTTP response code. + * @param string $body The response body. + * @return WP_Error + */ + protected function check_status_code( int $code, string $body = '' ): WP_Error { + if ( 200 === $code ) { + return new WP_Error(); + } + + switch ( $code ) { + case 403: + return new WP_Error( 'pll_deepl_authentication_failure', __( 'Authentication failure. Please check your DeepL authentication key.', 'polylang-pro' ) ); + case 456: + return new WP_Error( 'pll_deepl_quota_exceeded', __( 'The DeepL quota for this billing period has been exceeded.', 'polylang-pro' ) ); + case 404: + return new WP_Error( 'pll_deepl_not_found', __( 'The DeepL server cannot be reached.', 'polylang-pro' ) ); + case 400: + if ( preg_match( '/No dictionary found for language pair [A-Za-z0-9-]+ in glossary [a-f0-9-]+/', $body ) ) { + return new WP_Error( 'pll_deepl_no_language_pair_in_glossary', __( 'No language pair found in glossary.', 'polylang-pro' ) ); + } + + return new WP_Error( 'pll_deepl_bad_request', __( 'Bad request.', 'polylang-pro' ) ); + case 429: + return new WP_Error( 'pll_deepl_too_many_request', __( 'Too many requests, DeepL servers are currently experiencing high load.', 'polylang-pro' ) ); + case 500: + case 502: + case 503: + return new WP_Error( 'pll_deepl_service_unavailable', __( 'DeepL service unavailable.', 'polylang-pro' ) ); + default: + /* translators: %s is an HTTP status code */ + return new WP_Error( 'pll_deepl_unexpected_status_code', sprintf( __( 'The DeepL server sent an unexpected status code %d.', 'polylang-pro' ), $code ) ); + } + } + + /** + * Tells whether API key is valid. + * + * @since 3.6 + * + * @return WP_Error An empty WP_Error if valid, a filled WP_Error otherwise. + */ + public function is_api_key_valid(): WP_Error { + $response = $this->request( 'GET', 'v2/usage' ); + if ( is_wp_error( $response ) ) { + return $response; + } + + if ( 200 === $response['response']['code'] ) { + return new WP_Error(); + } + + return $this->check_status_code( 403 ); + } + + /** + * Returns current machine translation usage. + * + * @since 3.6 + * + * @return array|WP_Error { + * A `WP_Error` on error, or an array on success with the following keys. + * + * @type int $character_count Character count. + * @type int $character_limit Character limiter. + * } + * + * @phpstan-return array{ + * character_count: int<0, max>, + * character_limit: int<0, max> + * }|WP_Error + */ + public function get_usage() { + $response = $this->request( 'GET', 'v2/usage' ); + if ( is_wp_error( $response ) ) { + return $response; + } + + /** @var array{ + * character_count: int<0, max>, + * character_limit: int<0, max> + * } + */ + $usage = array_merge( + array( + 'character_count' => 0, + 'character_limit' => 0, + ), + (array) json_decode( $response['body'], true ) + ); + + if ( $usage['character_limit'] >= pow( 10, 12 ) ) { + // Usage limit for the "unlimited" plan returns 10^12. + $usage['character_limit'] = 0; + } + + return array( + 'character_count' => max( 0, (int) $usage['character_count'] ), + 'character_limit' => max( 0, (int) $usage['character_limit'] ), + ); + } + + /** + * Returns the list of glossaries. + * + * @since 3.8 + * + * @return array|WP_Error A `WP_Error` on error, or an array on success with glossary IDs as array keys and glossary names as array values. + * + * @phpstan-return array|WP_Error + */ + public function get_glossaries() { + $response = $this->request( 'GET', 'v3/glossaries' ); + if ( is_wp_error( $response ) ) { + return $response; + } + + /** @var array{ glossaries: array}>, creation_time: non-falsy-string}> } */ + $data = array_merge( + array( + 'glossaries' => array(), + ), + (array) json_decode( $response['body'], true ) + ); + + return array_column( $data['glossaries'], 'name', 'glossary_id' ); + } + + /** + * Returns the route to be used according to the DeepL plan. + * + * @since 3.6 + * @since 3.8 The API version (`v2` or `v3`) must be prepended to the endpoint. + * + * @param string $endpoint The API endpoint. + * + * @return string + */ + public function get_route( string $endpoint ): string { + return ( $this->is_free_plan() ? self::ROUTE_FREE : self::ROUTE ) . $endpoint; + } + + /** + * Tells if the key comes from a free plan or not. + * + * @See https://www.deepl.com/fr/docs-api/api-access/authentication + * + * @since 3.6 + * + * @return bool True if the key is associated to a free plan, false otherwise. + */ + private function is_free_plan(): bool { + return substr( $this->api_key, -3 ) === ':fx'; + } + + /** + * Gets the formality according to the formality of the locale in priority. + * + * @since 3.6 + * + * @param PLL_Language $language The language object. + * @return string + */ + private function get_formality( PLL_Language $language ): string { + if ( str_ends_with( $language->locale, '_formal' ) ) { + return 'prefer_more'; + } + + if ( str_ends_with( $language->locale, '_informal' ) ) { + return 'prefer_less'; + } + + return $this->formality; + } + + /** + * Tells whether to retry the request with an empty glossary. + * + * @since 3.8 + * + * @param array|WP_Error $error The potential error. Array for valid responses. + * @return bool + */ + private function should_retry_with_empty_glossary( $error ): bool { + return is_wp_error( $error ) && 'pll_deepl_no_language_pair_in_glossary' === $error->get_error_code(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Data.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Data.php new file mode 100644 index 0000000..680f900 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Data.php @@ -0,0 +1,93 @@ +> + */ + private $translations = array(); + + /** + * Adds a source string to exported data and optionally a pre-existing translated one. + * New types or objects are prepended to data arrays, assuming they are linked to previously added ones. + * Once translated, this allows to import linked objects before the objects they are linked to. + * For example, a category is imported before the post it is linked to. + * + * @since 3.6 + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $encoding Optional, encoding format for the field group. + * } + * @param string $source The source to be translated. + * @param string $target Optional, a preexisting translation, if any. + * @return void + * + * @phpstan-param translationEntryRef $ref + * @phpstan-param non-empty-string $source + */ + public function add_translation_entry( array $ref, string $source, string $target = '' ) { + if ( ! $this->are_entry_parameters_valid( $ref, $source ) ) { + return; + } + + if ( ! isset( $this->translations[ $ref['object_type'] ] ) ) { + $this->translations = array( $ref['object_type'] => array() ) + $this->translations; + } + + if ( ! isset( $this->translations[ $ref['object_type'] ][ $ref['object_id'] ] ) ) { + $this->translations[ $ref['object_type'] ] = array( $ref['object_id'] => new Translations() ) + $this->translations[ $ref['object_type'] ]; + } + + $context = Context::to_string( + array( + Context::FIELD => $ref['field_type'], + Context::ID => isset( $ref['field_id'] ) ? $ref['field_id'] : '', + Context::ENCODING => isset( $ref['encoding'] ) ? $ref['encoding'] : '', + ) + ); + $this->translations[ $ref['object_type'] ][ $ref['object_id'] ]->add_entry( + array( + 'singular' => $source, + 'translations' => array( $target ), + 'context' => $context, + ) + ); + } + + /** + * Returns translated data. + * + * @since 3.6 + * + * @return array + * + * @phpstan-return array> + */ + public function get(): array { + return $this->translations; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Factory.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Factory.php new file mode 100644 index 0000000..75f28c5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Factory.php @@ -0,0 +1,141 @@ +> + */ + const SERVICES = array( + Deepl::class, + ); + + /** + * List of the service instances. + * + * @var Service_Interface[] + * + * @phpstan-var array + */ + private $services = array(); + + /** + * Stores the plugin options. + * + * @var \WP_Syntex\Polylang\Options\Options + */ + private $options; + + /** + * Polylang's model. + * + * @var PLL_Model + */ + private $model; + + /** + * Constructor. + * + * @since 3.6 + * + * @param PLL_Model $model Polylang's model. + */ + public function __construct( PLL_Model $model ) { + $this->options = $model->options; + $this->model = $model; + } + + /** + * Tells if the machine translation feature is enabled. + * + * @since 3.6 + * + * @return bool + */ + public function is_enabled(): bool { + return (bool) $this->options['machine_translation_enabled']; + } + + /** + * Returns the active service. + * + * @since 3.6 + * + * @return Service_Interface|null + */ + public function get_active_service() { + foreach ( static::get_classnames() as $service ) { + $service = $this->build_service( $service ); + + if ( $service->is_active() ) { + return $service; + } + } + + return null; + } + + /** + * Returns all services. + * + * @since 3.6 + * @return Service_Interface[] + */ + public function get_all(): array { + foreach ( static::get_classnames() as $service ) { + $this->build_service( $service ); + } + + return $this->services; + } + + /** + * Returns all services classnames for static usage. + * + * @since 3.7 + * + * @return string[] + * @phpstan-return non-empty-list> + */ + public static function get_classnames(): array { + return self::SERVICES; + } + + /** + * Builds a service instance. + * + * @since 3.6 + * + * @param string $class_name Service's slug. + * @return Service_Interface + * + * @phpstan-param class-string $class_name + */ + private function build_service( string $class_name ): Service_Interface { + $slug = $class_name::get_slug(); + + if ( ! empty( $this->services[ $slug ] ) ) { + return $this->services[ $slug ]; + } + + $this->services[ $slug ] = new $class_name( $this->options['machine_translation_services'][ $slug ], $this->model ); + + return $this->services[ $slug ]; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Module_Settings.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Module_Settings.php new file mode 100644 index 0000000..9f59dc1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Module_Settings.php @@ -0,0 +1,150 @@ + 'machine_translation_enabled' ) ); + + $factory = new Factory( $polylang->model ); + + foreach ( $factory->get_all() as $slug => $service ) { + $this->settings[ $slug ] = $service->get_settings( 'machine_translation_services[{slug}]' ); + } + + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); + } + + /** + * Enqueues scripts and styles. + * + * @since 3.6 + * + * @return void + */ + public function admin_enqueue_scripts() { + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_enqueue_style( + 'pll_machine_translation_settings', + plugins_url( '/css/build/machine-translation-settings' . $suffix . '.css', POLYLANG_ROOT_FILE ), + array(), + POLYLANG_VERSION + ); + + wp_enqueue_script( + 'pll_machine_translation_settings', + plugins_url( '/js/build/machine-translation-settings' . $suffix . '.js', POLYLANG_ROOT_FILE ), + array( 'wp-url', 'wp-hooks' ), + POLYLANG_VERSION, + true + ); + + wp_set_script_translations( 'pll_machine_translation_settings', 'polylang-pro' ); + } + + /** + * Displays the settings form. + * + * @since 3.6 + * + * @return void + */ + protected function form() { + foreach ( $this->settings as $service_settings ) { + $service_settings->print_notices(); + + echo ''; + + $service_settings->print_settings_fields(); + + echo '
    '; + } + } + + /** + * Prepare the received data before saving. + * + * @since 3.7 + * + * @param array $options Raw values to save. + * @return array + */ + protected function prepare_raw_data( array $options ): array { + $new_options = array( + 'machine_translation_services' => array(), + ); + + foreach ( $this->settings as $slug => $service_settings ) { + $service_options = $options['machine_translation_services'][ $slug ] ?? array(); + + // Is the API key provided? + $has_api_key = $service_settings->has_api_key( $service_options ); + + $new_options['machine_translation_services'][ $slug ] = $service_options; + + if ( ! $has_api_key ) { + // The API key field was empty before sanitization: don't display any error messages. + continue; + } + + // Check the API key validity. + $error = $service_settings->is_api_key_valid( $new_options['machine_translation_services'][ $slug ] ); + + if ( ! $error->has_errors() ) { + // Valid. + continue; + } + + /** @phpstan-var array{type: 'error'|'warning', message_class: string, field_id: non-falsy-string} */ + $data = array_merge( + array( + 'type' => 'error', // Type of admin notice. + 'message_class' => '', // HTML class of the error message to display (only for types error and warning). + 'field_id' => '', // HTML id of the field. + ), + (array) $error->get_error_data() + ); + + /* + * Overwrites error extra data because `pll_add_notice()` expects a string instead of an array. + * The `pll-field-id-` prefix is used to determine which field to highlight. + * The `pll-message-class-` prefix is used to determine which error message to show. + */ + $error->add_data( "notice-{$data['type']} pll-field-id-{$data['field_id']} pll-message-class-{$data['message_class']}" ); + pll_add_notice( $error ); + } + + // Take care to return only sanitized options. + return $new_options; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Action.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Action.php new file mode 100644 index 0000000..44e9b7e --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Action.php @@ -0,0 +1,214 @@ +model = $polylang->model; + $this->service = $service; + $this->curlang = &$polylang->curlang; + $this->sync = $polylang->sync; + $this->links = &$polylang->links; + $this->processor = new Processor( $polylang, $this->service->get_client() ); + $this->user_meta = new PLL_Toggle_User_Meta( sprintf( 'pll_machine_translation_%s', $this->service->get_slug() ) ); + + /* + * Before `PLL_Duplicate::new_post_translation()`. + */ + add_filter( 'use_block_editor_for_post', array( $this, 'new_post_translation' ), 1900 ); + } + + /** + * Fires the content translation. + * + * @since 3.6 + * + * @param bool $is_block_editor Whether the post can be edited or not. + * @return bool + */ + public function new_post_translation( $is_block_editor ) { + global $post; // `$post` is the autosave of the new post. + + if ( $this->done || empty( $post ) || empty( $this->links ) ) { + return $is_block_editor; + } + + // Capability check already done in post-new.php. + $data = $this->links->get_data_from_new_post_translation_request(); + + if ( empty( $data['new_lang'] ) || empty( $data['from_post'] ) || ! $this->user_meta->is_active() ) { + return $is_block_editor; + } + + if ( ! current_user_can( 'read_post', $data['from_post'] ) ) { + wp_die( + esc_html__( 'Sorry, you are not allowed to read this item.', 'polylang-pro' ), + 403 + ); + } + + if ( ! Capabilities::get_user()->can_translate( $data['new_lang'] ) ) { + wp_die( + esc_html( + sprintf( + /* translators: %s is a language name. */ + __( 'Sorry, you are not allowed to translate in %s.', 'polylang-pro' ), + $data['new_lang']->name + ) + ), + 403 + ); + } + + // Prevent a second translation in the block editor. + $this->done = true; + + // No current language during machine translation process (to avoid filtering queries). + $current_lang_backup = $this->curlang; + $this->curlang = null; + $container = new PLL_Export_Container( Data::class ); + $export_objects = new PLL_Export_Data_From_Posts( $this->model ); + + $export_objects->send_to_export( $container, array( $data['from_post'] ), $data['new_lang'] ); + + // Save translated data. + $result = $this->processor->translate( $container ); + + // All done, set back current language. + $this->curlang = $current_lang_backup; + + if ( $result->has_errors() ) { + pll_add_notice( $result ); + return $is_block_editor; + } + + $result = $this->processor->save( $container ); + + if ( $result->has_errors() ) { + pll_add_notice( $result ); + return $is_block_editor; + } + + // Ensure global post object is updated. + $to_post = get_post( (int) $this->model->post->get_translation( $data['from_post']->ID, $data['new_lang'] ) ); + + if ( empty( $to_post ) ) { + // The translated post doesn't exist anymore for some reason. + pll_add_notice( + new WP_Error( + 'pll_machine_translation_no_translation', + __( 'Unable to retrieve the translation.', 'polylang-pro' ) + ) + ); + return $is_block_editor; + } + + $post = $to_post; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + + // Disable duplication. + remove_filter( 'use_block_editor_for_post', array( $this->sync, 'new_post_translation' ), 5000 ); + add_filter( 'get_user_metadata', array( $this, 'disable_post_duplication' ), 10, 3 ); + + return $is_block_editor; + } + + /** + * Filters the user metas to disable post duplication. + * + * @since 3.6 + * + * @param mixed $value The value to return. + * @param int $object_id ID of the object metadata is for. + * @param string $meta_key Metadata key. + * @return mixed False for the post duplication meta, the original value otherwise. + */ + public function disable_post_duplication( $value, $object_id, $meta_key ) { + return 'pll_duplicate_content' === $meta_key ? false : $value; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Button.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Button.php new file mode 100644 index 0000000..a26c053 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Button.php @@ -0,0 +1,72 @@ +service = $service; + $this->user_meta = new PLL_Toggle_User_Meta( sprintf( 'pll_machine_translation_%s', $this->service->get_slug() ) ); + + $args = array( + 'position' => 'before_post_translations', + 'activate' => sprintf( + /* translators: %s is the name of the machine translation service. */ + __( 'Activate %s machine translation', 'polylang-pro' ), + $this->service->get_name() + ), + 'deactivate' => sprintf( + /* translators: %s is the name of the machine translation service. */ + __( 'Deactivate %s machine translation', 'polylang-pro' ), + $this->service->get_name() + ), + 'icon' => $this->service->get_icon(), + 'priority' => 20, + ); + + parent::__construct( 'pll-machine-translation', $args ); + + add_action( 'admin_notices', array( $this, 'display_errors' ) ); + } + + /** + * Prints translation errors into the page. + * + * @since 3.6 + * + * @return void + */ + public function display_errors() { + settings_errors( 'polylang' ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Button_REST.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Button_REST.php new file mode 100644 index 0000000..f7d22a5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Posts/Button_REST.php @@ -0,0 +1,96 @@ +service = $service; + + parent::__construct( $polylang->model, new PLL_Toggle_User_Meta( sprintf( 'pll_machine_translation_%s', $this->service->get_slug() ) ) ); + + add_filter( 'pll_block_editor_plugin_settings', array( $this, 'get_service_settings' ) ); + add_filter( 'pll_block_editor_plugin_settings', array( $this, 'get_settings_errors' ) ); + } + + /** + * Adds service properties in UI settings. + * + * @since 3.6 + * + * @param array $settings UI settings. + * @return array Updated UI settings. + */ + public function get_service_settings( $settings ) { + $settings['machine_translation'] = array( + 'slug' => $this->service::get_slug(), + 'name' => $this->service->get_name(), + 'icon' => $this->service->get_icon_properties(), + 'isActive' => $this->service->is_active(), + ); + return $settings; + } + + /** + * Adds machine translation errors in UI settings. + * + * @since 3.6 + * + * @param array $settings UI settings. + * @return array Updated UI settings. + */ + public function get_settings_errors( $settings ) { + $settings_errors = get_settings_errors( 'polylang' ); + + if ( empty( $settings_errors ) ) { + return $settings; + } + + $settings['machine_translation']['errors'] = $settings_errors; + + return $settings; + } + + /** + * Returns the description of the schema for the current user meta. + * + * @since 3.8 + * + * @return string The description of the schema. + */ + protected function get_schema_description(): string { + return __( 'Whether the machine translation feature is enabled or not per post type for the current user.', 'polylang-pro' ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Processor.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Processor.php new file mode 100644 index 0000000..32003c2 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Processor.php @@ -0,0 +1,151 @@ +translation_models = array( + PLL_Import_Export::TYPE_POST => new PLL_Translation_Post_Model( $polylang ), + PLL_Import_Export::TYPE_TERM => new PLL_Translation_Term_Model( $polylang ), + PLL_Import_Export::STRINGS_TRANSLATIONS => new PLL_Translation_Strings_Model(), + ); + + $this->client = $client; + } + + /** + * Translates all data from the given container. + * + * @since 3.6 + * + * @param PLL_Export_Container $container Container with data to translate. + * @return WP_Error Error object. + */ + public function translate( PLL_Export_Container $container ): WP_Error { + $error = new WP_Error(); + + foreach ( $container as &$data ) { + if ( ! $data instanceof Data ) { + continue; + } + + foreach ( $data->get() as $entities ) { + foreach ( $entities as &$translations ) { + $result = $this->client->translate( $translations, $data->get_target_language(), $data->get_source_language() ); + + if ( \is_wp_error( $result ) ) { + // Abort if an error occurred. + return $result; + } + + $translations = $result; + } + } + } + + return $error; + } + + /** + * Saves all translated data from the given container into corresponding entities. + * + * @since 3.6 + * + * @param PLL_Export_Container $container Container with data to save. + * @return WP_Error Error object. + */ + public function save( PLL_Export_Container $container ): WP_Error { + $error = new WP_Error(); + + foreach ( $container as $translations ) { + if ( ! $translations instanceof Data ) { + continue; + } + + $target_language = $translations->get_target_language(); + + foreach ( $translations->get() as $type => $entities ) { + if ( ! isset( $this->translation_models[ $type ] ) ) { + continue; + } + + $ids = array(); + foreach ( $entities as $id => $data ) { + $entry = array( + 'id' => $id, + 'data' => $data, + 'fields' => array( + 'post_status' => 'draft', + ), + ); + + $result = $this->translation_models[ $type ]->translate( $entry, $target_language ); + if ( is_wp_error( $result ) ) { + $error->merge_from( $result ); + continue; + } + + $ids[] = $id; + } + + $this->translation_models[ $type ]->do_after_process( $ids, $target_language ); + + /** + * Fires after objects have been saved with machine translated data. + * + * @since 3.7 + * + * @param PLL_Language $target_language The targeted language for import. + * @param int[]|string[] $ids The imported object ids of the import. + */ + do_action( "pll_after_{$type}_machine_translation", $target_language, $ids ); + } + } + + return $error; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Services/Deepl.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Services/Deepl.php new file mode 100644 index 0000000..abcff85 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Services/Deepl.php @@ -0,0 +1,254 @@ +service_options = array_merge( + array( + 'api_key' => '', + 'formality' => 'default', + 'glossary_id' => '', + ), + $options + ); + $this->model = $model; + } + + /** + * Tells if the service is active. + * + * @since 3.6 + * + * @return bool + */ + public function is_active(): bool { + return ! empty( $this->service_options['api_key'] ); + } + + /** + * Returns a unique identifier of the service. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + public static function get_slug(): string { + return 'deepl'; + } + + /** + * Returns the name of the service. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-empty-string + */ + public function get_name(): string { + return 'DeepL'; + } + + /** + * Returns the svg properties of the service's logo. + * + * @since 3.6 + * + * @return string[] { + * An array containing the SVG icon properties. + * + * @type string $width The icon width. + * @type string $height The icon height. + * @type string $xmlns The SVG namespace URL. + * @type string $viewBox The position and dimension according to the SVG viewport. + * @type string $path_d The `d` attribute of the SVG `` to define the icon shape. + * } + * @phpstan-return iconProperties + */ + public function get_icon_properties(): array { + return array( + 'width' => '20', + 'height' => '20', + 'xmlns' => 'http://www.w3.org/2000/svg', + 'viewBox' => '0 0 20 20', + 'path_d' => 'M17.407,4.133l-6.837,-3.954c-0.354,-0.206 -0.786,-0.206 -1.14,0l-6.837,3.967c-0.354,0.207 -0.57,0.584 -0.57,0.984l-0,7.921c-0,0.41 0.216,0.79 0.57,0.994l6.837,3.957c0.016,0.01 0.036,0.02 0.052,0.03l3.367,1.95l-0.01,-1.714l0.007,-0.951l0.003,0.016l0,-0.321c0,-0.19 0.099,-0.361 0.246,-0.466l0.22,-0.124l0.105,-0.059l-0.007,-0l3.994,-2.312c0.354,-0.206 0.57,-0.583 0.57,-0.993l0,-7.931c0,-0.41 -0.216,-0.787 -0.57,-0.994Zm-8.194,8.056c0.102,0.4 -0.01,0.843 -0.331,1.151c-0.456,0.446 -1.184,0.446 -1.639,-0c-0.492,-0.469 -0.492,-1.246 -0,-1.715c0.455,-0.446 1.183,-0.446 1.639,-0c0.02,0.02 0.039,0.039 0.059,0.062l2.767,-1.593l0.571,0.321l-3.066,1.774Zm4.8,-2.007c-0.456,0.446 -1.187,0.446 -1.639,0c-0.344,-0.328 -0.446,-0.809 -0.308,-1.229l-0.01,0.006l-3.122,-1.806c-0.016,0.016 -0.029,0.033 -0.045,0.046c-0.456,0.446 -1.184,0.446 -1.64,-0c-0.492,-0.469 -0.492,-1.246 0,-1.715c0.456,-0.446 1.184,-0.446 1.64,-0c0.327,0.315 0.436,0.764 0.324,1.17l3.144,1.83c0.007,-0.007 0.01,-0.01 0.017,-0.016c0.456,-0.446 1.187,-0.446 1.639,-0c0.489,0.468 0.489,1.245 0,1.714Z', + ); + } + + /** + * Returns the service's logo as a svg vector. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-empty-string + */ + public function get_icon(): string { + // Icon from https://www.deepl.com/press.html and modified. + $icon_properties = $this->get_icon_properties(); + return sprintf( + '', + $icon_properties['width'], + $icon_properties['height'], + $icon_properties['xmlns'], + $icon_properties['viewBox'], + $icon_properties['path_d'] + ); + } + + /** + * Returns the client that will be processed for the machine translation. + * + * @since 3.6 + * + * @return Client + */ + public function get_client(): Client_Interface { + return new Client( $this->service_options ); + } + + /** + * Returns the object that will print the settings for the machine translation. + * + * @since 3.6 + * + * @param string $input_base_name Base of the name attribute used by the inputs. + * Can contain a placeholder `{slug}` that will be replaced by the service's slug. + * Ex: `machine_translation_services[{slug}]`. + * @return Settings + * + * @phpstan-param non-falsy-string $input_base_name + */ + public function get_settings( string $input_base_name ): Settings_Interface { + return new Settings( $input_base_name, $this->service_options, $this, $this->model ); + } + + /** + * Returns the object that holds information about the service's options. + * + * @since 3.6 + * + * @return array + */ + public static function get_option_schema(): array { + return array( + 'api_key' => array( + 'type' => 'string', + ), + 'formality' => array( + 'type' => 'string', + 'enum' => array( 'default', 'prefer_more', 'prefer_less' ), + ), + 'glossary_id' => array( + 'type' => 'string', + ), + ); + } + + /** + * Returns machine translation service code for target language if available. + * + * @since 3.6 + * + * @param PLL_Language $language Language to check. + * @return string Language code, empty if not available. + */ + public static function get_target_code( PLL_Language $language ): string { + if ( empty( self::$languages ) ) { + self::$languages = include POLYLANG_DIR . '/src/settings/languages.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath + } + + foreach ( array_merge( array( $language->locale ), $language->fallbacks ) as $locale ) { + if ( ! empty( self::$languages[ $locale ][ static::get_slug() ] ) ) { + return self::$languages[ $locale ][ static::get_slug() ]; + } + } + return ''; + } + + /** + * Returns machine translation service code for source language if available. + * + * @since 3.6 + * + * @param PLL_Language $language Language to check. + * @return string Language code, empty if not available. + */ + public static function get_source_code( PLL_Language $language ): string { + $target_code = static::get_target_code( $language ); + if ( empty( $target_code ) ) { + return ''; + } + + // If the code contains a dash (e.g., EN-US, ZH-HANS), extract the part before the dash, otherwise return the full code (2 or 3 uppercase letters). + return explode( '-', $target_code )[0]; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Services/Service_Interface.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Services/Service_Interface.php new file mode 100644 index 0000000..5e66e4d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Services/Service_Interface.php @@ -0,0 +1,113 @@ +` to define the icon shape. + * } + * @phpstan-return iconProperties + */ + public function get_icon_properties(): array; + + /** + * Returns the service's logo as a svg vector. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-empty-string + */ + public function get_icon(): string; + + /** + * Returns the client that will be processed for the machine translation. + * + * @since 3.6 + * + * @return Client_Interface + */ + public function get_client(): Client_Interface; + + /** + * Returns the object that will print the settings for the machine translation. + * + * @since 3.6 + * + * @param string $input_base_name Base of the name attribute used by the inputs. + * Can contain a placeholder `{slug}` that will be replaced by the service's slug. + * Ex: `machine_translation_services[{slug}]`. + * @return Settings_Interface + * + * @phpstan-param non-falsy-string $input_base_name + */ + public function get_settings( string $input_base_name ): Settings_Interface; + + /** + * Returns the object that holds information about the service's options. + * + * @since 3.7 + * + * @return array + */ + public static function get_option_schema(): array; +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Settings/Deepl.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Settings/Deepl.php new file mode 100644 index 0000000..0e59779 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Settings/Deepl.php @@ -0,0 +1,522 @@ +service = $service; + $this->model = $model; + $this->input_base_name = str_replace( '{slug}', $service::get_slug(), $input_base_name ); + $this->options = $options; + + add_action( 'wp_ajax_' . self::API_KEY_ACTION, array( $this, 'check_api_key' ) ); + add_action( 'wp_ajax_' . self::USAGE_ACTION, array( $this, 'update_characters_consumption_view' ) ); + add_action( 'wp_ajax_' . self::GLOSSARIES_ACTION, array( $this, 'update_glossaries_view' ) ); + } + + /** + * Ajax callback that checks for the API key validity. + * + * @since 3.6 + * + * @return void + * + * @phpstan-return never + */ + public function check_api_key() { + check_ajax_referer( self::API_KEY_ACTION, '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( empty( $_GET['api_key'] ) || ! is_string( $_GET['api_key'] ) ) { + wp_send_json_error( + array( + 'message' => esc_html__( 'Please fill in the API key field.', 'polylang-pro' ), + 'message_class' => 'pll-message-error-auth', // See `get_error_message_class()`. + ) + ); + } + + $api_key = (string) sanitize_text_field( wp_unslash( $_GET['api_key'] ) ); + $valid = $this->is_api_key_valid( array( 'api_key' => $api_key ) ); + + if ( $valid->has_errors() ) { + // The key is invalid or we had a failure while checking it. + wp_send_json_error( + array( + 'message' => esc_html( $valid->get_error_message() ), + 'message_class' => $this->get_error_message_class( $valid ), + ) + ); + } + + wp_send_json_success(); + } + + /** + * Displays the characters consumption view. + * + * @since 3.6 + * + * @return void + * + * @phpstan-return never + */ + public function update_characters_consumption_view() { + check_ajax_referer( self::USAGE_ACTION, '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + $usage = $this->service->get_client()->get_usage(); + + if ( is_wp_error( $usage ) ) { + // Error while retrieving the data: display the error message. + wp_send_json_error( + array( + 'message' => esc_html( + sprintf( + /* translators: %s is an error message. */ + __( 'Error while retrieving the data: %s.', 'polylang-pro' ), + $usage->get_error_message() + ) + ), + ) + ); + } + + if ( ! $usage['character_limit'] ) { + // The character limit is 0: display only the character count. + wp_send_json_success( + array( + 'message' => esc_html( + sprintf( + /* translators: %s is a formatted count number. */ + _n( '%s translated character.', '%s translated characters.', $usage['character_count'], 'polylang-pro' ), + number_format_i18n( $usage['character_count'] ) + ) + ), + ) + ); + } + + // Display a graphic. + $percent = round( $usage['character_count'] * 100 / $usage['character_limit'], 1 ); + $percent = (float) min( $percent, 100 ); + $decimals = 1; + + if ( floor( $percent ) === $percent ) { + $decimals = 0; + } + + wp_send_json_success( + array( + 'percent_formatted' => number_format_i18n( $percent, $decimals ) . '%', + 'percent' => (string) $percent . '%', + 'message' => esc_html( + sprintf( + /* translators: %1$s is a formatted count number, %2$s is a formatted limit number. */ + _n( '%1$s / %2$s translated character.', '%1$s / %2$s translated characters.', $usage['character_count'], 'polylang-pro' ), + number_format_i18n( $usage['character_count'] ), + number_format_i18n( $usage['character_limit'] ) + ) + ), + ) + ); + } + + /** + * Displays the glossaries view. + * + * @since 3.8 + * + * @return void + * + * @phpstan-return never + */ + public function update_glossaries_view() { + check_ajax_referer( self::GLOSSARIES_ACTION, '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( isset( $_GET['api_key'] ) ) { + $api_key = is_string( $_GET['api_key'] ) ? (string) sanitize_text_field( wp_unslash( $_GET['api_key'] ) ) : ''; + $glossaries = $this->get_new_client( $api_key )->get_glossaries(); + } else { + $glossaries = $this->service->get_client()->get_glossaries(); + } + + if ( is_wp_error( $glossaries ) ) { + // Error while retrieving the data: display the error message. + wp_send_json_error( + array( + 'message' => esc_html( + sprintf( + /* translators: %s is an error message. */ + __( 'Error while retrieving the data: %s.', 'polylang-pro' ), + $glossaries->get_error_message() + ) + ), + ) + ); + } + + wp_send_json_success( + array( + 'glossaries' => $glossaries, + 'selected' => $this->options['glossary_id'], + ) + ); + } + + /** + * Tells if the given service options contain a non-empty authentication key. + * + * @since 3.6 + * + * @param array $options Options for this service. + * @return bool + */ + public function has_api_key( array $options ): bool { + return ! empty( $options['api_key'] ) && is_string( $options['api_key'] ) && '' !== trim( $options['api_key'] ); + } + + /** + * Tells if the authentication key from the given service options is valid by contacting the service. + * + * @since 3.6 + * + * @param array $options Options for this service (must be sanitized beforehand). + * @return WP_Error { + * An empty `WP_Error` if the authentication succeeded. + * In the other cases, the `WP_Error` data will contain an array as follow: + * + * @type string $type `'error'` if the API key is invalid, or `'warning'` if there was an error while + * contacting the service. + * @type string $field_id CSS ID of the field in fault. + * } + */ + public function is_api_key_valid( array $options ): WP_Error { + if ( ! $this->has_api_key( $options ) ) { + $options['api_key'] = ''; + } + + $error = $this->get_new_client( $options['api_key'] )->is_api_key_valid(); + + if ( ! $error->has_errors() ) { + // The key is valid. + return $error; + } + + $error->add_data( + array( + 'message_class' => $this->get_error_message_class( $error ), + 'field_id' => 'pll-deepl-api-key', + ) + ); + + return $error; + } + + /** + * Prints error notices. + * + * @since 3.6 + * + * @return void + */ + public function print_notices() { + if ( $this->service->is_active() ) { + $this->print_view( + 'inner-notices-row', + array( + 'name' => $this->service->get_name(), + 'languages' => $this->get_unsupported_languages(), + ) + ); + } + } + + /** + * Prints settings fields. + * + * @since 3.6 + * + * @return void + */ + public function print_settings_fields() { + $this->print_view( + 'characters-consumption-row', + array( + 'ajax_action' => self::USAGE_ACTION, + ) + ); + + $this->print_view( + 'service-authentication-row', + array( + 'ajax_action' => self::API_KEY_ACTION, + /* translators: %s is a service name. */ + 'button_label' => sprintf( __( 'Check connection to %s', 'polylang-pro' ), $this->service->get_name() ), + 'id' => 'deepl-api-key', + 'message_default' => sprintf( + /* translators: %1$s is an opening link tag leading to account creation, %2$s is an opening link tag leading to the "API keys" page, %3$s is a closing link tag. */ + __( '%1$sCreate your account on DeepL%3$s, then %2$sfind your API key in the "API Keys & Limits" tab%3$s.', 'polylang-pro' ), + '', + '', + '' + ), + 'messages_error' => array( + 'pll-message-error-auth' => sprintf( + /* translators: %1$s is an opening link tag leading to the service's "API keys" page, %2$s is a closing link tag. */ + __( '%1$sVerify your API key in the "API Keys & Limits" tab%2$s.', 'polylang-pro' ), + '', + '' + ), + 'pll-message-error-unavailable' => sprintf( + /* translators: %1$s is an opening link tag leading to the service's status page, %2$s is a closing link tag. */ + __( 'You can look at %1$sthe DeepL Pro/Free API\'s status%2$s.', 'polylang-pro' ), + '', + '' + ), + ), + 'message_success' => __( 'Your API key is valid.', 'polylang-pro' ), + 'option' => 'api_key', + 'title' => __( 'API key', 'polylang-pro' ), + ) + ); + + $this->print_view( + 'deepl-formality-row', + array( + 'option' => 'formality', + 'formal' => $this->get_active_languages_by_formality( 'formal' ), + 'informal' => $this->get_active_languages_by_formality( 'informal' ), + ) + ); + + $this->print_view( + 'deepl-glossary-row', + array( + 'option' => 'glossary_id', + 'ajax_action' => self::GLOSSARIES_ACTION, + 'description' => sprintf( + /* translators: %1$s is an opening link tag, %2$s is a closing link tag. */ + __( 'Select which glossary to use for the translation process. %1$sEdit your glossaries on DeepL%2$s.', 'polylang-pro' ), + '', + '' + ), + ) + ); + } + + /** + * Prints a view. + * + * @since 3.6 + * + * @param string $view Name of the view. + * @param array $atts Optional. Data to print. See views headers. + * @return void + */ + private function print_view( string $view, array $atts = array() ) { + $atts['slug'] = $this->service::get_slug(); + $atts['input_base_name'] = $this->input_base_name; + + if ( isset( $atts['option'] ) && ! isset( $atts['value'] ) ) { + $atts['value'] = $this->options[ $atts['option'] ] ?? ''; + } + + include POLYLANG_PRO_DIR . "/src/modules/Machine_Translation/Views/{$view}.php"; + } + + /** + * Returns the lists of languages that are not supported by the service. + * + * @since 3.6 + * @return string[] Array of language names (and their locale). + * + * @phpstan-return list + */ + private function get_unsupported_languages(): array { + $languages = array(); + + foreach ( $this->model->get_languages_list() as $language ) { + if ( empty( $this->service::get_target_code( $language ) ) ) { + $languages[] = $this->get_language_label( $language ); + } + } + + sort( $languages ); + + return $languages; + } + + /** + * Returns the lists of active formal or informal languages. + * Formal languages have a locale with a `_formal` suffix (`de_DE_formal`, `nl_NL_formal`), + * Informal languages have a `_informal` suffix (`de_CH_informal`). + * + * @since 3.6 + * + * @param string $formality Formality. + * @return string[] Array of arrays of language names (and their locale). + * + * @phpstan-param 'formal'|'informal' $formality + * @phpstan-return list + */ + private function get_active_languages_by_formality( string $formality ): array { + $languages = array(); + + foreach ( $this->model->get_languages_list() as $language ) { + if ( empty( $this->service::get_target_code( $language ) ) ) { + continue; + } + + if ( ! preg_match( "@_{$formality}$@", $language->locale ) ) { + continue; + } + + $languages[] = $this->get_language_label( $language ); + } + + sort( $languages ); + + return $languages; + } + + /** + * Returns a language name and its locale. + * + * @since 3.6 + * + * @param PLL_Language $language A language object. + * @return string + */ + private function get_language_label( PLL_Language $language ): string { + return sprintf( + /* translators: %1$s is a language name, %2$s is a language locale. */ + _x( '%1$s (%2$s)', 'Language label', 'polylang-pro' ), + $language->name, + sprintf( '%s', $language->locale ) + ); + } + + /** + * Returns the HTML class corresponding to the given error. + * See the array keys for the 'messages_error' in `print_settings_fields()`. + * + * @since 3.6 + * + * @param WP_Error $error An error object. + * @return string `'pll-message-error-auth'` in case of authentication failure, `'pll-message-error-unavailable'` in other cases. + */ + private function get_error_message_class( WP_Error $error ): string { + return 'pll_deepl_authentication_failure' === $error->get_error_code() ? 'pll-message-error-auth' : 'pll-message-error-unavailable'; + } + + /** + * Returns a new client instance. + * + * @since 3.8 + * + * @param string $api_key The API key (must be sanitized beforehand). + * @return Client + */ + private function get_new_client( string $api_key = '' ): Client { + $service = new Service( array( 'api_key' => $api_key ), $this->model ); + return $service->get_client(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Settings/Settings_Interface.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Settings/Settings_Interface.php new file mode 100644 index 0000000..6599ef6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Settings/Settings_Interface.php @@ -0,0 +1,62 @@ +model = $polylang->model; + $this->processor = new Processor( $polylang, $service->get_client() ); + } + + /** + * Translates the strings of a given group. + * + * @since 3.7 + * + * @param PLL_Language $target_language The language to translate the strings to. + * @param string $group The group of strings to translate. + * @return WP_Error Error object, empty if no error. + */ + public function translate( PLL_Language $target_language, string $group ): WP_Error { + $sources = PLL_Admin_Strings::get_strings(); + if ( '' !== $group ) { + $sources = array_filter( + $sources, + function ( $source ) use ( $group ) { + return $group === $source['context']; + } + ); + } + + $exporter = new PLL_Export_Data_From_Strings( $this->model ); + $container = new PLL_Export_Container( Data::class ); + $exporter->send_to_export( + $container, + $sources, + $target_language, + true + ); + + $result = $this->processor->translate( $container ); + + if ( $result->has_errors() ) { + return $result; + } + + return $this->processor->save( $container ); + } + + /** + * Validates the form and translates the strings. + * + * @since 3.7 + * + * @return void + * + * @phpstan-return never + */ + public function validate_form() { + check_admin_referer( PLL_Export_Strings_Action::ACTION_NAME, PLL_Export_Strings_Action::NONCE_NAME ); + + if ( ! isset( $_POST['target-lang'], $_POST['group'] ) ) { + $error = new WP_Error( 'pll_incomplete_form', __( 'Sorry, some data is missing from the form submission.', 'polylang-pro' ) ); + $this->display_errors( $error ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + $target_languages = is_array( $_POST['target-lang'] ) ? wp_unslash( $_POST['target-lang'] ) : array(); + $target_languages = $this->get_sanitized_languages( $target_languages ); + + if ( is_wp_error( $target_languages ) ) { + $this->display_errors( $target_languages ); + } + + $user = Capabilities::get_user(); + foreach ( $target_languages as $target_language ) { + $user->can_translate_or_die( $target_language ); + } + + $group = is_string( $_POST['group'] ) ? sanitize_text_field( wp_unslash( $_POST['group'] ) ) : ''; + $group = '-1' === $group ? '' : $group; + $errors = new WP_Error(); + + foreach ( $target_languages as $target_language ) { + $errors->merge_from( $this->translate( $target_language, $group ) ); + } + + $this->display_errors( $errors ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Strings/Metabox.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Strings/Metabox.php new file mode 100644 index 0000000..dde2825 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Strings/Metabox.php @@ -0,0 +1,95 @@ +model = $polylang->model; + $this->action = new Action( $polylang, $service ); + } + + /** + * Initializes the machine translations metabox. + * + * @since 3.7 + * + * @return self Instance of the current class. + */ + public function init(): self { + add_action( 'load-' . PLL_Admin_Base::get_screen_id( 'strings' ), array( $this, 'add' ) ); + + /* + * See the hook `mlang_action_{$action}` in `PLL_Settings::handle_actions()`. + */ + add_action( + 'mlang_action_machine-translations', + array( $this->action, 'validate_form' ) + ); + + return $this; + } + + /** + * Adds the machine translation metabox. + * + * @since 3.7 + * + * @return void + */ + public function add() { + if ( empty( $this->model->languages->filter( 'translator' )->filter( 'hide_default' )->get_list() ) ) { + return; + } + add_meta_box( + 'pll-machine-strings-translations', + __( 'Machine translations', 'polylang-pro' ), + array( $this, 'render' ), + PLL_Admin_Base::get_screen_id( 'strings' ), + 'normal' + ); + } + + /** + * Renders the machine translation metabox. + * + * @since 3.7 + * + * @return void + */ + public function render() { + $model = $this->model; + include POLYLANG_PRO_DIR . '/src/modules/Machine_Translation/Views/string-form.php'; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/characters-consumption-row.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/characters-consumption-row.php new file mode 100644 index 0000000..cc869a5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/characters-consumption-row.php @@ -0,0 +1,22 @@ + + + + + +

     

    + + diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/deepl-formality-row.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/deepl-formality-row.php new file mode 100644 index 0000000..6b66986 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/deepl-formality-row.php @@ -0,0 +1,80 @@ +` tags. + * Example array( 'Deutsch (de_DE_formal)', 'Nederlands (nl_NL_formal)'). + * @type string[] $informal List of language names with their locale. Can contain `` tags. + * Example array( 'Deutsch (de_CH_informal)'). + * @type string $input_base_name HTML `name` attribute of the input field. + * @type string $value Current Deepl `formality` option value. + * } + */ + +defined( 'ABSPATH' ) || exit; + +?> + + + + + +

    + +

    + + +

    + array() ) ) ); + ?> +

    + +

    + array() ) ) ); + ?> +

    + + + diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/deepl-glossary-row.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/deepl-glossary-row.php new file mode 100644 index 0000000..d177bd4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/deepl-glossary-row.php @@ -0,0 +1,44 @@ +`, and `` tags. + * @type string $input_base_name HTML `name` attribute of the input field. + * } + */ + +defined( 'ABSPATH' ) || exit; + +$tags = array( + 'a' => array( 'href' => true ), + 'code' => array(), +); + +?> + + + + ', + esc_attr( $atts['input_base_name'] ), + esc_attr( $atts['option'] ), + esc_attr( $atts['ajax_action'] ), + esc_attr( wp_create_nonce( $atts['ajax_action'] ) ) + ); + ?> + + + + +

    + + diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/inner-notice.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/inner-notice.php new file mode 100644 index 0000000..0f4c9fa --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/inner-notice.php @@ -0,0 +1,23 @@ +` and `` tags. + * @type string $slug Slug of the machine translation service. + * @type string $type Optional. Possible values are `success`, `warning`, `error`, and `info`. Default is `error`. + * } + */ + +defined( 'ABSPATH' ) || exit; + +$tags = array( + 'br' => array(), + 'code' => array(), +); + +$atts['type'] = ! empty( $atts['type'] ) && in_array( $atts['type'], array( 'success', 'warning', 'info' ), true ) ? $atts['type'] : 'error'; +?> +
    +

    +
    diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/inner-notices-row.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/inner-notices-row.php new file mode 100644 index 0000000..4f511b0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/inner-notices-row.php @@ -0,0 +1,28 @@ +` and `` tags. + * @type string $type Optional type of notice. Possible values are `success`, `warning`, `error`, and `info`. Default is `error`. + * @type string $name Name of the machine translation service. + * @type string[] $languages List of language names with their locale. Can contain `` tags. + * Example array( 'Afrikaans (af)' ). + * } + */ + +defined( 'ABSPATH' ) || exit; + +if ( ! empty( $atts['languages'] ) ) { + $atts['type'] = 'warning'; + if ( 1 === count( $atts['languages'] ) ) { + /* translators: %1$s is a machine translation service's name, %2$s is a language name (and its locale). */ + $atts['message'] = __( 'The following language is not available in %1$s: %2$s.', 'polylang-pro' ); + } else { + /* translators: %1$s is a machine translation service's name, %2$s is a list of language names (and their locale). */ + $atts['message'] = __( 'The following languages are not available in %1$s: %2$s.', 'polylang-pro' ); + } + $atts['message'] = sprintf( $atts['message'], $atts['name'], wp_sprintf_l( '%l', $atts['languages'] ) ); + + include __DIR__ . '/inner-notice.php'; +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/progress-bar.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/progress-bar.php new file mode 100644 index 0000000..29f4c11 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/progress-bar.php @@ -0,0 +1,16 @@ +
    ', + esc_attr( $atts['ajax_action'] ), + esc_attr( wp_create_nonce( $atts['ajax_action'] ) ) +); diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/service-authentication-row.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/service-authentication-row.php new file mode 100644 index 0000000..8813b59 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/service-authentication-row.php @@ -0,0 +1,96 @@ +`, and `` tags. + * @type string $message_success Notice displayed on success. Can contain ``, and `` tags. + * @type string[] $messages_warning Notices displayed on error. Can contain ``, and `` tags. + * @type string[] $messages_error Notices displayed on error. Can contain ``, and `` tags. + * @type string $option API key option name. + * @type string $title HTML API key option label. + * @type string $value Current API key option value. + * } + */ + +defined( 'ABSPATH' ) || exit; + +$tags = array( + 'a' => array( 'href' => true ), + 'code' => array(), +); + +?> + + + + + +

    + ', + esc_attr( $atts['id'] ), + esc_attr( $atts['input_base_name'] ), + esc_attr( $atts['option'] ), + esc_attr( $atts['value'] ), + esc_attr( $atts['option'] ) + ); + printf( + '', + esc_attr( $atts['ajax_action'] ), + esc_attr( wp_create_nonce( $atts['ajax_action'] ) ), + esc_html( $atts['button_label'] ) + ); + ?> + +

    + + +

    + +

    + + +

    + $error_message ) { + ?> +

    + + + +

    + $error_message ) { + ?> +

    + + + +

    + + + diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/string-form.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/string-form.php new file mode 100644 index 0000000..b8b7607 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/Views/string-form.php @@ -0,0 +1,58 @@ +languages->filter( 'translator' )->filter( 'hide_default' )->get_list(); +$strings = PLL_Admin_Strings::get_strings(); +$groups = array_unique( wp_list_pluck( $strings, 'context' ) ); +?> +
    + +
    +
    + + + + %3$s%2$s', + esc_attr( $language->slug ), + esc_html( $language->name ), + $language->flag // phpcs:ignore WordPress.Security.EscapeOutput + ); + } + ?> +
    +
    +
    + + +
    +

    + +

    + +
    diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/load.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/load.php new file mode 100644 index 0000000..ffd5ab2 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/load.php @@ -0,0 +1,52 @@ +model->has_languages() ) { + // Ensure dependencies are loaded. + require_once POLYLANG_PRO_DIR . '/src/modules/Capabilities/load.php'; + require_once POLYLANG_PRO_DIR . '/src/modules/sync/load.php'; + require_once POLYLANG_PRO_DIR . '/src/modules/sync-post/load.php'; + require_once POLYLANG_DIR . '/src/modules/sync/load.php'; + + if ( current_user_can( Capability::CAPABILITY ) ) { + $machine_translation_factory = new Machine_Translation\Factory( $polylang->model ); + + if ( $machine_translation_factory->is_enabled() ) { + $active_service = $machine_translation_factory->get_active_service(); + + if ( $active_service && $polylang instanceof PLL_Admin ) { + new PLL_Admin_Loader( $polylang, 'machine_translation', array( $active_service ) ); + $polylang->machine_translation_action = new Post_Action( $polylang, $active_service ); + } elseif ( $active_service && $polylang instanceof PLL_REST_Request ) { + $polylang->machine_translation = new Button_REST( $polylang, $active_service ); + } elseif ( $active_service && $polylang instanceof PLL_Settings ) { + $polylang->machine_translation = ( new Strings_Metabox( $polylang, $active_service ) )->init(); + } + } + } + + if ( $polylang instanceof PLL_Settings ) { + add_filter( + 'pll_settings_modules', + function ( $modules ) { + $k = array_search( PLL_Settings_Preview_Machine_Translation::class, $modules, true ); + if ( $k ) { + unset( $modules[ $k ] ); + $modules['machine_translation'] = Machine_Translation\Module_Settings::class; + } + return $modules; + }, + 100 + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/uninstall.php b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/uninstall.php new file mode 100644 index 0000000..fc2abea --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Machine_Translation/uninstall.php @@ -0,0 +1,8 @@ + 'libxml', + 'required' => true, + ); + $modules['zip'] = array( + 'class' => 'ZipArchive', + 'required' => true, + ); + return $modules; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Site_Health/load.php b/wp-content/plugins/polylang-pro/src/modules/Site_Health/load.php new file mode 100644 index 0000000..a7b50be --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Site_Health/load.php @@ -0,0 +1,14 @@ +model->has_languages() ) { + $polylang->site_health_pro = new Info(); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/Frontend_Filters.php b/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/Frontend_Filters.php new file mode 100644 index 0000000..e923ab9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/Frontend_Filters.php @@ -0,0 +1,50 @@ +parse( $widget_data['settings'][ $widget_data['number'] ]['content'] ); + if ( is_array( $parser->output ) ) { + foreach ( $parser->output as $output ) { + if ( isset( $output['attrs'] ) ) { + if ( array_key_exists( 'pll_lang', $output['attrs'] ) ) { + $lang_to_be_displayed = $output['attrs']['pll_lang']; + + if ( ! empty( $this->curlang ) && $this->curlang->slug !== $lang_to_be_displayed ) { + unset( $sidebars_widgets[ $sidebar ][ $key ] ); + } + } + } + } + } + } + return $sidebars_widgets; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/Language_Attribute.php b/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/Language_Attribute.php new file mode 100644 index 0000000..75275dc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/Language_Attribute.php @@ -0,0 +1,70 @@ +is_block_dynamic( $block_properties ); + $is_legacy_widget = 'core/legacy-widget' === $block_properties['name']; + if ( $is_block_dynamic && ! $is_legacy_widget ) { + $block_properties['attributes']['pll_lang'] = array( 'type' => 'string' ); + } + return $block_properties; + } + + /** + * Whether the block is a dynamic one or not. + * + * Copied from {@see https://github.com/WordPress/wordpress-develop/blob/2382765afa36e10bf3c74420024ad4e85763a47c/src/wp-includes/class-wp-block-type.php#L261 WP_Block_Type::is_dynamic()}. + * + * Explanation: 'register_block_type_args' filter only passes the WP_Block_Type::name property, so the WP_Block_Type::is_dynamic() method is inaccessible in a callback function, {@see https://github.com/WordPress/WordPress/blob/5.7/wp-includes/class-wp-block-type.php#L330 }. + * We could not use the WP_Block_Type_Registry to get the block object neither, because the WP_Block_Type instance is added to the registry only after the use of the 'register_block_type_args' filter ( done in WP_Block_Type::set_props itself done in the WP_Block_Type constructor ): + * - {@see https://github.com/WordPress/WordPress/blob/5.7/wp-includes/class-wp-block-type.php#L223} + * - {@see https://github.com/WordPress/WordPress/blob/5.7/wp-includes/class-wp-block-type.php#L312} + * - {@see https://github.com/WordPress/WordPress/blob/058f9903676a7efaee534a682df0a2a8b87574d8/wp-includes/class-wp-block-type-registry.php#L80-L84} + * + * @since 3.1 + * + * @param array $block_properties Associative array mimicking the structure of a {@see https://github.com/WordPress/wordpress-develop/blob/2382765afa36e10bf3c74420024ad4e85763a47c/src/wp-includes/class-wp-block-parser.php#L15 WP_Block_Parser_Block}. + * + * @return bool + */ + public function is_block_dynamic( $block_properties ) { + $render_callback = $block_properties['render_callback']; + + return is_callable( $render_callback ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/load.php b/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/load.php new file mode 100644 index 0000000..d80bdef --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/Widget_Blocks/load.php @@ -0,0 +1,24 @@ +model->languages->has() && pll_use_block_editor_plugin() ) { + if ( $polylang instanceof PLL_Frontend ) { + $polylang->filters_widgets_blocks = new Frontend_Filters( $polylang ); + } + + $polylang->widget_editor = ( new Language_Attribute() )->init(); + } + } +); diff --git a/wp-content/plugins/polylang-pro/src/modules/active-languages/Languages_Proxy.php b/wp-content/plugins/polylang-pro/src/modules/active-languages/Languages_Proxy.php new file mode 100644 index 0000000..25bc69d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/active-languages/Languages_Proxy.php @@ -0,0 +1,59 @@ + $lang ) { + if ( empty( $lang->active ) ) { + unset( $languages[ $k ] ); + } + } + + return $languages; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/active-languages/active-languages.php b/wp-content/plugins/polylang-pro/src/modules/active-languages/active-languages.php new file mode 100644 index 0000000..128e0c7 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/active-languages/active-languages.php @@ -0,0 +1,388 @@ +options = $polylang->options; + $this->model = &$polylang->model; + $this->curlang = &$polylang->curlang; + $this->language_proxy = new Languages_Proxy(); + + // Settings. + if ( $polylang instanceof PLL_Settings && ( empty( $_GET['page'] ) || 'mlang' === $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // CSS. + add_filter( 'pll_languages_row_classes', array( $this, 'row_classes' ), 10, 2 ); + add_action( 'admin_print_styles', array( $this, 'print_css' ) ); + + // Disable/Enable languages. + add_filter( 'pll_languages_row_actions', array( $this, 'row_actions' ), 10, 2 ); + add_action( 'mlang_action_enable', array( $this, 'enable' ) ); + add_action( 'mlang_action_disable', array( $this, 'disable' ) ); + + // Disallow setting an inactive language as the default one. + add_filter( 'pll_default_lang_row_action', array( $this, 'remove_default_lang_action' ), 10, 2 ); + add_action( 'toplevel_page_mlang', array( $this, 'prevent_default_lang_assignation' ), 5 ); // Before `PLL_Settings::languages_page()`. + add_action( 'language_page_mlang', array( $this, 'prevent_default_lang_assignation' ), 5 ); // Before `PLL_Settings::languages_page()`. + } + + if ( $polylang instanceof PLL_Admin_Base ) { + // No need to wait any hook. + $this->model->languages->register_proxy( $this->language_proxy, 'automatic' ); + add_action( 'set_current_user', array( $this->model->languages, 'clean_local_cache' ), -10000 ); + } elseif ( $polylang instanceof PLL_REST_Request ) { + /* + * When using an application password, the current user is set late, "right" before `rest_pre_dispatch`. + * See the beginning of `WP_REST_Server::serve_request()`: + * https://github.com/WordPress/WordPress/blob/6.9/wp-includes/rest-api/class-wp-rest-server.php#L289-L301 + */ + add_filter( 'rest_pre_dispatch', array( $this, 'maybe_filter_languages_in_rest' ), -10000 ); + } else { + /* + * Wait until the current language is defined, this makes it work when the language is defined by the content. + */ + add_filter( 'pll_get_current_language', array( $this, 'maybe_filter_languages_in_frontend' ) ); + } + } + + /** + * Adds a `inactive` CSS class to inactive language rows. + * + * @since 1.9 + * + * @param string[] $classes CSS classes applied to a row in the languages list table. + * @param PLL_Language $language The language. + * @return string[] Modified list of classes. + */ + public function row_classes( $classes, $language ) { + return empty( $language->active ) ? array( 'inactive' ) : array(); + } + + /** + * Styles the inactive language rows. + * + * @since 1.9 + * + * @return void + */ + public function print_css(): void { + ?> + + is_default ) { + return $actions; + } + + $active_action = empty( $language->active ) ? + array( + 'enable' => sprintf( + '
    %s', + esc_attr__( 'Activate this language', 'polylang-pro' ), + wp_nonce_url( '?page=mlang&pll_action=enable&noheader=true&lang=' . $language->term_id, 'enable-lang' ), + esc_html__( 'Activate', 'polylang-pro' ) + ), + ) : + array( + 'disable' => sprintf( + '%s', + esc_attr__( 'Deactivate this language', 'polylang-pro' ), + wp_nonce_url( '?page=mlang&pll_action=disable&noheader=true&lang=' . $language->term_id, 'disable-lang' ), + esc_html__( 'Deactivate', 'polylang-pro' ) + ), + ); + + return array_merge( $active_action, $actions ); + } + + /** + * Enables or disables a language. + * + * @since 1.9 + * + * @param int $lang_id The language term ID. + * @param bool $enable True to enable, false to disable. + * @return void + */ + public function _enable( int $lang_id, bool $enable ): void { + $language = get_term( $lang_id, 'language' ); + + if ( ! $language instanceof WP_Term ) { + return; + } + + if ( $language->slug === $this->model->options['default_lang'] ) { + return; + } + + $description = maybe_unserialize( $language->description ); + + if ( ! is_array( $description ) ) { + return; + } + + $description['active'] = $enable; + + /** @var string */ + $description = maybe_serialize( $description ); + + wp_update_term( $lang_id, 'language', array( 'description' => $description ) ); + $this->model->languages->clean_local_cache(); + } + + /** + * Enables a language. + * + * @since 1.9 + * + * @return void + * + * @phpstan-return never + */ + public function enable(): void { + check_admin_referer( 'enable-lang' ); + if ( isset( $_GET['lang'] ) && is_numeric( $_GET['lang'] ) ) { + $this->_enable( (int) $_GET['lang'], true ); + } + PLL_Settings::redirect(); + } + + /** + * Disables a language. + * + * @since 1.9 + * + * @return void + * + * @phpstan-return never + */ + public function disable(): void { + check_admin_referer( 'disable-lang' ); + if ( isset( $_GET['lang'] ) && is_numeric( $_GET['lang'] ) ) { + $this->_enable( (int) $_GET['lang'], false ); + } + PLL_Settings::redirect(); + } + + /** + * Removes the default lang action for disabled languages. + * + * @since 1.9 + * + * @param string $action HTML markup of the action to define the default language. + * @param PLL_Language $language The Language. + * @return string Modified row action. + */ + public function remove_default_lang_action( $action, $language ) { + if ( empty( $language->active ) ) { + return ''; + } + + return $action; + } + + /** + * Prevents an inactive language to be set as the default one. + * This is done by preventing `PLL_Settings::handle_actions()` to be called on the `default-lang` action. + * + * @since 3.8 + * + * @return void + * + * @phpstan-return void|never + */ + public function prevent_default_lang_assignation(): void { + if ( ! isset( $_REQUEST['pll_action'], $_REQUEST['_wpnonce'], $_GET['lang'] ) ) { + return; + } + + if ( 'default-lang' !== $_REQUEST['pll_action'] || ! is_numeric( $_GET['lang'] ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'default-lang' ) ) { + return; + } + + $lang = $this->model->get_language( (int) $_GET['lang'] ); + + if ( empty( $lang ) || ! empty( $lang->active ) ) { + return; + } + + /* + * Prevent `PLL_Settings::handle_actions()`. + * This should not happen because the users should not get access to a URL allowing this. + * See `row_actions()`. + */ + wp_die( 0 ); + } + + /** + * If the current user is not allowed to see inactive languages, this method: + * - registers the language proxy that removes the inactive languages, + * - clears the languages cache. + * If the current language is inactive, this method: + * - replaces it with the default language. + * + * @since 3.8 + * + * @param mixed $result Response to replace the requested version with. Can be anything + * a normal endpoint can return, or null to not hijack the request. + * @return mixed + */ + public function maybe_filter_languages_in_rest( $result = null ) { + if ( current_user_can( Languages_Proxy::CAPABILITY ) ) { + // No need to do anything. + return $result; + } + + $this->model->languages->register_proxy( $this->language_proxy, 'automatic' ); + $this->model->languages->clean_local_cache(); + add_action( 'set_current_user', array( $this->model->languages, 'clean_local_cache' ), -10000 ); + + if ( empty( $this->curlang ) || ! empty( $this->curlang->active ) ) { + // The current language is not inactive. + return $result; + } + + // Set the current language to the default one, so we don't have an inactive current language. + $this->curlang = $this->model->languages->get_default(); + + return $result; + } + + /** + * If the current user is not allowed to see inactive languages, this method: + * - registers the language proxy that removes the inactive languages, + * - clears the languages cache + * If the given language is inactive, this method: + * - replaces it with the default language, + * - adds a hook that triggers a 404 status and disables the sitemap. + * + * @since 3.8 + * + * @param PLL_Language|false $curlang Instance of the current language. + * @return PLL_Language|false + */ + public function maybe_filter_languages_in_frontend( $curlang ) { + if ( current_user_can( Languages_Proxy::CAPABILITY ) ) { + // Ne need to do anything. + return $curlang; + } + + $this->model->languages->register_proxy( $this->language_proxy, 'automatic' ); + $this->model->languages->clean_local_cache(); + add_action( 'set_current_user', array( $this->model->languages, 'clean_local_cache' ), -10000 ); + + if ( empty( $curlang ) || ! empty( $curlang->active ) ) { + // The current language is not inactive. + return $curlang; + } + + $this->inactive_curlang = $curlang; + add_action( 'wp', array( $this, 'maybe_set_404' ) ); + + // Fall back to the default language, so we don't have an inactive current language. + return $this->model->languages->get_default(); + } + + /** + * Sets an error 404 if the requested language is not active. + * Also disables the sitemap. + * + * @since 1.9 + * + * @global WP_Query $wp_query WordPress Query object. + * + * @return void + */ + public function maybe_set_404(): void { + global $wp_query; + + if ( empty( $this->inactive_curlang ) ) { + // Should not happen. + return; + } + + $wp_query->set_404(); + add_filter( 'wp_sitemaps_enabled', '__return_false' ); + + /** + * Fires when a visitor attempts to access to an inactive language. + * + * @since 2.7 + * + * @param string $slug Requested language code. + * @param PLL_Language $curlang Requested language object. + */ + do_action( 'pll_inactive_language_requested', $this->inactive_curlang->slug, $this->inactive_curlang ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/active-languages/load.php b/wp-content/plugins/polylang-pro/src/modules/active-languages/load.php new file mode 100644 index 0000000..f05e528 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/active-languages/load.php @@ -0,0 +1,12 @@ +model->has_languages() ) { + $polylang->active_languages = new PLL_Active_Languages( $polylang ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/bulk-translate/bulk-translate-option.php b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/bulk-translate-option.php new file mode 100644 index 0000000..5e65dac --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/bulk-translate-option.php @@ -0,0 +1,213 @@ +name = $args['name']; + $this->description = $args['description']; + $this->priority = array_key_exists( 'priority', $args ) ? $args['priority'] : 10; + + $this->model = $model; + } + + /** + * Displays the input bulk option in the bulk translate form. + * + * @since 3.6 + * + * @param string $selected The selected option name. + * @return void + */ + public function display( string $selected ) { + $bulk_translate_option = $this; + include __DIR__ . '/view-bulk-translate-option.php'; + } + + /** + * Getter + * + * @since 2.7 + * + * @return string + */ + public function get_name() { + return $this->name; + } + + + /** + * Getter + * + * @since 2.7 + * + * @return string + */ + public function get_description() { + return $this->description; + } + + /** + * Getter. + * + * @since 2.7 + * + * @return int + */ + public function get_priority() { + return $this->priority; + } + + /** + * Checks whether the option should be selectable by the user. + * + * @since 2.7 + * + * @return bool + */ + abstract public function is_available(); + + /** + * Decides whether or not an object should be translated. + * + * @since 2.7 + * + * @param int $id Identify a post, media, term... + * @param string $lang A language locale. + * @return bool|int + */ + public function filter( $id, $lang ) { + return ! $this->model->post->get_translation( $id, $lang ); + } + + /** + * Triggers the correct functions for creating a translation of the selected content in a selected language. + * + * Has to be overridden. + * + * @since 2.7 + * + * @param int $object_id Identifies the post, term, media, etc. to be translated. + * @param string $lang A language locale. + * @return void + */ + abstract public function translate( $object_id, $lang ); + + /** + * The actual effect of the bulk translate action + * + * @since 2.7 + * @since 3.6 Returns as WP_Error instead of an array. + * + * @param int[] $object_ids An array of the id of the WordPress objects to translate. + * @param string[] $languages An array of languages slugs in which to translate. + * @return WP_Error Info notices to be displayed to the user. + */ + public function do_bulk_action( $object_ids, $languages ): WP_Error { + $done = 0; + $missed = 0; + + if ( ! empty( $object_ids ) ) { + foreach ( $object_ids as $object_id ) { + if ( $this->model->post->get_language( $object_id ) !== false ) { + foreach ( $languages as $lang ) { + if ( $this->filter( $object_id, $lang ) ) { + $this->translate( $object_id, $lang ); + ++$done; + } else { + ++$missed; + } + } + } + } + } + + $notice = new WP_Error(); + + if ( 0 < $done ) { + $notice->add( + 'pll_bulk_translate_success', + sprintf( + /* translators: %d is a number of posts */ + _n( '%d translation created.', '%d translations created.', $done, 'polylang-pro' ), + $done + ), + 'success' + ); + } + + if ( 0 < $missed ) { + $notice->add( + 'pll_bulk_translate_warning', + sprintf( + /* translators: %d is a number of posts */ + _n( 'To avoid overwriting content, %d translation was not created.', 'To avoid overwriting content, %d translations were not created.', $missed, 'polylang-pro' ), + $missed + ), + 'warning' + ); + } + + return $notice; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/bulk-translate/bulk-translate.php b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/bulk-translate.php new file mode 100644 index 0000000..249dfd3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/bulk-translate.php @@ -0,0 +1,384 @@ +model = $model; + + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); + } + + /** + * Enqueues script and style. + * + * @since 2.8 + * + * @return void + */ + public function admin_enqueue_scripts() { + $screen = get_current_screen(); + + if ( ! $screen ) { + return; + } + + if ( ! in_array( $screen->base, array( 'edit', 'upload' ), true ) ) { + return; + } + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + wp_enqueue_script( + 'pll_bulk_translate', + plugins_url( '/js/build/bulk-translate' . $suffix . '.js', POLYLANG_ROOT_FILE ), + array( 'jquery', 'wp-ajax-response' ), + POLYLANG_VERSION, + true + ); + + wp_enqueue_style( + 'pll_bulk_translate', + plugins_url( '/css/build/bulk-translate' . $suffix . '.css', POLYLANG_ROOT_FILE ), + array(), + POLYLANG_VERSION + ); + } + + /** + * Registers options of the Translate bulk action. + * + * @since 2.7 + * + * @param PLL_Bulk_Translate_Option[] $options An array of {@see PLL_Bulk_Translate_Option} to register. + * @return void + */ + public function register_options( $options ) { + if ( ! is_array( $options ) ) { + $options = array( $options ); + } + + foreach ( $options as $option ) { + if ( array_key_exists( $option->get_name(), $this->options ) ) { + if ( WP_DEBUG ) { + trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions + sprintf( + 'Error when trying to register Bulk Translate option with name \'%s\' : an option with this name already exists.', + esc_attr( $option->get_name() ) + ) + ); + } + continue; + } + $this->options[ $option->get_name() ] = $option; + } + } + + /** + * Add actions and filters. + * + * Verifies the post type is allowed for translation and that the post status isn't 'trashed'. + * + * @since 2.4 + * @since 2.7 hooked on 'current_screen' and takes the screen as parameter. + * + * @param WP_Screen $current_screen Instance of the current WP_Screen. + * @return void + */ + public function init( $current_screen ) { + /** + * Filter the list of post types enabling the bulk translate. + * + * @since 2.4 + * + * @param string[] $post_types List of post types. + */ + $post_types = apply_filters( 'pll_bulk_translate_post_types', $this->model->get_translated_post_types() ); + + // phpcs:ignore WordPress.Security.NonceVerification + if ( ! in_array( $current_screen->post_type, $post_types, true ) || ( array_key_exists( 'post_status', $_GET ) && 'trash' === $_GET['post_status'] ) ) { + return; + } + + /** + * Fires before `PLL_Bulk_Translate` init. + * This is the perfect place to register options of the Translate bulk action. + * + * @since 3.6.5 + * @see PLL_Bulk_Translate::register_options() + * + * @param PLL_Bulk_Translate $bulk_translate Instance of `PLL_Bulk_Translate`. + */ + do_action( 'pll_bulk_translate_options_init', $this ); + + $this->options = array_filter( + $this->options, + function ( $option ) { + return $option->is_available(); + } + ); + + $this->current_screen = $current_screen; + + if ( ! empty( $this->options ) ) { + add_filter( "bulk_actions-{$current_screen->id}", array( $this, 'add_bulk_action' ) ); + add_filter( "handle_bulk_actions-{$current_screen->id}", array( $this, 'handle_bulk_action' ), 10, 2 ); + add_action( 'admin_footer', array( $this, 'display_form' ) ); + add_action( 'admin_notices', array( $this, 'display_notices' ) ); + // Special case where the wp_redirect() happens before the bulk action is triggered. + if ( 'edit' === $current_screen->base ) { + add_filter( 'wp_redirect', array( $this, 'parse_request_before_redirect' ) ); + } + } + } + + /** + * Retrieves the needed data in the request body and sanitize it. + * + * @since 2.7 + * + * @param array $request { + * Parameters from the HTTP Request. + * + * @type int[] $post The list of post ids to bulk translate. Must be set if `$post` is not. + * @type int[] $media The list of media ids to bulk translate. Must be set if `$media` is not. + * @type string $translate The translation action ('pll_copy_post' for copy, 'pll_sync_post' for synchronization). + * @type string[] $pll-translate-lang The list of language slugs to translate to. + * } + * @return WP_Error|array { + * @type int[] $item_ids The sanitized list of post (or media) ids to translate. + * @type string $translate The sanitized translation action. + * @type string[] $pll-translate-lang The sanitized list of language slugs to translate to. + * } + */ + protected function parse_request( $request ) { + $args = array(); + + $screens_content_keys = array( + 'upload' => 'media', + 'edit' => 'post', + ); + + if ( ! empty( $this->current_screen ) && isset( $screens_content_keys[ $this->current_screen->base ] ) ) { + $item_key = $screens_content_keys[ $this->current_screen->base ]; + + if ( isset( $request[ $item_key ] ) && is_array( $request[ $item_key ] ) ) { + $args['item_ids'] = array_filter( array_map( 'absint', $request[ $item_key ] ) ); + } + } + + if ( empty( $args['item_ids'] ) ) { + return new WP_Error( 'pll_no_items_selected', __( 'No item has been selected. Please make sure to select at least one item to be translated.', 'polylang-pro' ) ); + } + + foreach ( $args['item_ids'] as $item_id ) { + if ( ! current_user_can( 'read_post', (int) $item_id ) ) { + wp_die( esc_html__( 'Sorry, you are not allowed to read one of the selected items.', 'polylang-pro' ) ); + } + } + + $args['translate'] = sanitize_key( $request['translate'] ); + + if ( isset( $request['pll-translate-lang'] ) && is_array( $request['pll-translate-lang'] ) ) { + $user = Capabilities::get_user(); + $args['pll-translate-lang'] = array(); + foreach ( $request['pll-translate-lang'] as $lang_slug ) { + $language = $this->model->get_language( $lang_slug ); + if ( $language instanceof PLL_Language ) { + $user->can_translate_or_die( $language ); + $args['pll-translate-lang'][] = $lang_slug; + } + } + } + + if ( empty( $args['pll-translate-lang'] ) ) { + return new WP_Error( 'pll_no_target_language', __( 'Error: No target language has been selected. Please make sure to select at least one target language.', 'polylang-pro' ) ); + } + + return $args; + } + + /** + * Handle the Translate bulk action. + * + * @since 2.4 + * @since 2.7 Use a transient to store notices. + * + * @param string $sendback The URL to redirect to, with parameters. + * @param string $action Name of the requested bulk action. + * + * @return string The URL to redirect to. + */ + public function handle_bulk_action( $sendback, $action ) { + if ( 'pll_translate' !== $action ) { + return $sendback; + } + + check_admin_referer( 'pll_translate', '_pll_translate_nonce' ); + + $query_args = $this->parse_request( $_GET ); // Errors returned by this method are already handled by `parse_request_before_redirect()`. + + if ( ! is_wp_error( $query_args ) ) { + $selected_option = $this->options[ $query_args['translate'] ]; + + $error = $selected_option->do_bulk_action( $query_args['item_ids'], $query_args['pll-translate-lang'] ); + $this->add_settings_error( $error ); + } + + return $sendback; + } + + /** + * Add a bulk action + * + * @since 2.4 + * + * @param array $actions List of bulk actions. + * + * @return array + */ + public function add_bulk_action( $actions ) { + $actions['pll_translate'] = __( 'Translate', 'polylang-pro' ); + return $actions; + } + + /** + * Displays the Bulk translate form. + * + * @since 2.4 + * + * @return void + */ + public function display_form() { + global $post_type; + $model = $this->model; + $bulk_translate_options = $this->options; + usort( + $bulk_translate_options, + function ( $first_element, $second_element ) { + return $first_element->get_priority() - $second_element->get_priority(); + } + ); + include __DIR__ . '/view-bulk-translate.php'; + } + + /** + * Displays the notices if some have been registered. + * + * Because WordPress triggers a {@see wp_redirect()}, these notices are stored in a transient. + * + * @since 2.7 + * + * @return void + */ + public function display_notices() { + $transient_name = 'pll_bulk_translate_' . get_current_user_id(); + + /** @var string[][] */ + $notices = get_transient( $transient_name ); + + if ( empty( $notices ) ) { + return; + } + + foreach ( $notices as $notice ) { + /* + * Backward compatibility for PHP < 8.0.0. + * Unpacking operator `...` supports string-keyed associative array only since PHP 8.0.0. + */ + add_settings_error( ...array_values( $notice ) ); + } + + settings_errors( 'polylang' ); + delete_transient( $transient_name ); + } + + /** + * Fixes the case when no post is selected and a redirect is fired before we can handle the bulk action. + * + * @since 2.7 + * + * @param string $sendback The destination URL. + * + * @return string Unmodified $sendback. + */ + public function parse_request_before_redirect( $sendback ) { + if ( ! isset( $_GET['action'], $_REQUEST['_pll_translate_nonce'] ) || 'pll_translate' !== $_GET['action'] || ! wp_verify_nonce( $_REQUEST['_pll_translate_nonce'], 'pll_translate' ) ) { + return $sendback; + } + + $error = $this->parse_request( $_GET ); + + if ( is_wp_error( $error ) ) { + $this->add_settings_error( $error ); + } + + return $sendback; + } + + /** + * Registers errors if any. + * + * @since 3.6 + * + * @param WP_Error $error Error object. + * @return void + */ + private function add_settings_error( WP_Error $error ) { + if ( ! $error->has_errors() ) { + return; + } + + pll_add_notice( $error ); + set_transient( 'pll_bulk_translate_' . get_current_user_id(), get_settings_errors( 'polylang' ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/bulk-translate/load.php b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/load.php new file mode 100644 index 0000000..ad28747 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/load.php @@ -0,0 +1,13 @@ +model->has_languages() ) { + $polylang->bulk_translate = new PLL_Bulk_Translate( $polylang->model ); + add_action( 'current_screen', array( $polylang->bulk_translate, 'init' ) ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/bulk-translate/view-bulk-translate-option.php b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/view-bulk-translate-option.php new file mode 100644 index 0000000..91578d5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/view-bulk-translate-option.php @@ -0,0 +1,18 @@ +get_name(); +?> + diff --git a/wp-content/plugins/polylang-pro/src/modules/bulk-translate/view-bulk-translate.php b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/view-bulk-translate.php new file mode 100644 index 0000000..98f6d9d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/bulk-translate/view-bulk-translate.php @@ -0,0 +1,60 @@ + +
    + + + +
    +
    + +
    +
    +
    + + languages->filter( 'translator' )->get_list() as $language ) { + printf( + '', + esc_attr( $language->slug ), + esc_html( $language->name ), + $language->flag // phpcs:ignore WordPress.Security.EscapeOutput + ); + } + ?> +
    +
    +
    +
    + + display( $selected->get_name() ); + } + } + ?> +
    +
    +
    +

    + + + +

    +
    +
    diff --git a/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate-action.php b/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate-action.php new file mode 100644 index 0000000..a087e44 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate-action.php @@ -0,0 +1,198 @@ +options = $polylang->options; + $this->sync_content = &$polylang->sync_content; + $this->links = &$polylang->links; + $this->user_meta = new PLL_Toggle_User_Meta( static::META_NAME ); + + /* + * After class instantiation and before terms and post metas are copied in Polylang. + */ + add_filter( 'use_block_editor_for_post', array( $this, 'new_post_translation' ), 2000 ); + } + + /** + * Fires the content copy + * + * @since 2.5 + * @since 3.1 Add $is_block_editor param as the method is now hooked to the filter use_block_editor_for_post. + * + * @param bool $is_block_editor Whether the post can be edited or not. + * @return bool + */ + public function new_post_translation( $is_block_editor ) { + global $post; + static $done = array(); + + if ( ! $post instanceof WP_Post || in_array( $post->ID, $done, true ) || empty( $this->links ) ) { + return $is_block_editor; + } + + // Capability check already done in post-new.php. + $data = $this->links->get_data_from_new_post_translation_request(); + + if ( empty( $data['from_post'] ) || empty( $data['new_lang'] ) || ! $this->user_meta->is_active() ) { + return $is_block_editor; + } + + if ( ! current_user_can( 'read_post', $data['from_post'] ) ) { + wp_die( + esc_html__( 'Sorry, you are not allowed to read this item.', 'polylang-pro' ), + 403 + ); + } + + $done[] = $post->ID; // Avoid a second duplication in the block editor. + + $this->sync_content->copy_content( $data['from_post'], $post, $data['new_lang'] ); + + // Clone the post after copying to capture the computed slug and content for later use in REST response. + $this->cloned_post = clone $post; + + // Maybe duplicates the featured image. + if ( $this->options['media_support'] ) { + add_filter( 'pll_translate_post_meta', array( $this->sync_content, 'duplicate_thumbnail' ), 10, 3 ); + } + + // Maybe duplicate terms. + add_filter( 'pll_maybe_translate_term', array( $this->sync_content, 'duplicate_term' ), 10, 3 ); + + // Ensures the REST preloading has proper slug and content for template resolution. + add_filter( "rest_prepare_{$post->post_type}", array( $this, 'prepare_response' ), 10, 3 ); + + return $is_block_editor; + } + + /** + * Ensures translated posts have proper slug and content assignment during specific REST API editor requests. + * + * When creating post translations, the new auto-draft post has an empty `post_name`, + * which results in an empty slug in REST API responses. This causes the block editor's template resolution system + * (`getTemplateId`) to fall back to generic templates instead of specific ones (like `page-{slug}`). + * + * This hook intercepts REST responses for translation creation context and restores the proper slug and content + * from the cloned post, allowing the right template resolution. + * + * Specifically targets single post requests (`/wp/v2/{post_type}/{id}`) to avoid interference with other endpoints + * which don't require data restoration. + * + * @since 3.8 + * + * @param WP_REST_Response $response The REST response object. + * @param WP_Post $post The post object being prepared. + * @param WP_REST_Request $request The REST request object. + * + * @return WP_REST_Response Modified response with restored slug and content. + * + * @phpstan-param WP_REST_Request $request + */ + public function prepare_response( $response, $post, $request ): WP_REST_Response { + // Only process edit context requests (editor preloading) with empty slugs and a cloned post available for the same post ID. + if ( $request->get_param( 'context' ) !== 'edit' + || ! empty( $post->post_name ) + || empty( $this->cloned_post ) + || $this->cloned_post->ID !== $post->ID ) { + return $response; + } + + $post_type_object = get_post_type_object( $post->post_type ); + if ( empty( $post_type_object ) || empty( $post_type_object->rest_base ) || ! is_string( $post_type_object->rest_base ) ) { + return $response; + } + + /* + * Checks we're in a single post GET request matching WordPress REST route pattern. + * WordPress registers routes as: `/wp/v2/{rest_base}/(?P[\d]+)`, see `WP_REST_Posts_Controller::register_routes()`. + */ + $expected_route = sprintf( '#^/wp/v2/%s/(?P[\d]+)$#', preg_quote( $post_type_object->rest_base, '#' ) ); + if ( 'GET' !== $request->get_method() || ! preg_match( $expected_route, $request->get_route() ) ) { + return $response; + } + + $response_data = $response->get_data(); + if ( ! is_array( $response_data ) ) { + return $response; + } + + // Restore slug, content, and excerpt from the cloned post. + $response_data['slug'] = $this->cloned_post->post_name; + $response_data['content']['raw'] = $this->cloned_post->post_content; + $response_data['excerpt']['raw'] = $this->cloned_post->post_excerpt; + + // Template assignment: check for explicitly assigned template (classic themes use _wp_page_template meta). + $response_data['template'] = (string) get_page_template_slug( $this->cloned_post->ID ); + if ( empty( $response_data['template'] ) ) { + // No explicit assignment, build slug-specific template for block themes. + $prefix = ( 'page' === $this->cloned_post->post_type ) ? 'page' : "single-{$this->cloned_post->post_type}"; + $slug = "{$prefix}-{$this->cloned_post->post_name}"; + if ( get_block_template( get_stylesheet() . '//' . $slug ) ) { + // Only assign if template exists to prevent "Not found" errors. + $response_data['template'] = $slug; + } + } + + // Update the response with the restored values. + $response->set_data( $response_data ); + + return $response; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate-rest.php b/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate-rest.php new file mode 100644 index 0000000..fe00f5d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate-rest.php @@ -0,0 +1,71 @@ +links = new PLL_Admin_Links( $polylang ); + + parent::__construct( $polylang->model, new PLL_Toggle_User_Meta( PLL_Duplicate_Action::META_NAME ) ); + + add_filter( 'block_editor_settings_all', array( $this, 'remove_template' ), 10, 2 ); + } + + /** + * Avoids that the post template overwrites our duplicated content. + * + * @since 3.2 + * + * @param array $editor_settings Default editor settings. + * @param WP_Block_Editor_Context $block_editor_context The current block editor context. + * @return array + */ + public function remove_template( $editor_settings, $block_editor_context ) { + if ( empty( $block_editor_context->post ) || ! $block_editor_context->post instanceof WP_Post || empty( $block_editor_context->post->post_content ) ) { + return $editor_settings; + } + + $data = $this->links->get_data_from_new_post_translation_request(); + + if ( empty( $data ) ) { + return $editor_settings; + } + + unset( $editor_settings['template'], $editor_settings['templateLock'] ); + + return $editor_settings; + } + + /** + * Returns the description of the schema for the current user meta. + * + * @since 3.8 + * + * @return string The description of the schema. + */ + protected function get_schema_description(): string { + return __( 'Whether the duplicate feature is enabled or not per post type for the current user.', 'polylang-pro' ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate.php b/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate.php new file mode 100644 index 0000000..47b5139 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/duplicate/duplicate.php @@ -0,0 +1,39 @@ +user_meta = new PLL_Toggle_User_Meta( PLL_Duplicate_Action::META_NAME ); + + $args = array( + 'position' => 'before_post_translations', + 'activate' => __( 'Activate content duplication', 'polylang-pro' ), + 'deactivate' => __( 'Deactivate content duplication', 'polylang-pro' ), + 'class' => 'dashicons-before dashicons-admin-page', + ); + + parent::__construct( 'pll-duplicate', $args ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/duplicate/load.php b/wp-content/plugins/polylang-pro/src/modules/duplicate/load.php new file mode 100644 index 0000000..b512871 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/duplicate/load.php @@ -0,0 +1,17 @@ +model->has_languages() ) { + if ( $polylang instanceof PLL_Admin ) { + new PLL_Admin_Loader( $polylang, 'duplicate' ); + $polylang->duplicate_action = new PLL_Duplicate_Action( $polylang ); + } elseif ( $polylang instanceof PLL_REST_Request ) { + $polylang->duplicate = new PLL_Duplicate_REST( $polylang ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/duplicate/uninstall.php b/wp-content/plugins/polylang-pro/src/modules/duplicate/uninstall.php new file mode 100644 index 0000000..5a41dba --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/duplicate/uninstall.php @@ -0,0 +1,8 @@ +model = $model; + /** @phpstan-var PLL_Language $default_language */ + $default_language = $this->model->get_default_language(); + $this->default_language = $default_language; + } + + /** + * Filters templates according to the current queried object. + * + * @since 3.7 + * + * @param array $templates Array of templates guessed from the hierarchy. + * @return array Filtered array of templates. + */ + public function filter( $templates ) { + if ( ! is_array( $templates ) ) { + // Something bad happened. + return $templates; + } + + $object = get_queried_object(); + if ( ! is_object( $object ) ) { + return $templates; + } + + $language = $this->get_object_language( $object ); + if ( ! $language instanceof PLL_Language ) { + return $templates; + } + + if ( $language->slug === $this->default_language->slug ) { + return $templates; + } + + return $this->add_def_lang_templates_from_object( $templates, $object ); + } + + /** + * Adds templates of the default language from an object. + * + * @since 3.7 + * + * @param array $templates Array of templates guessed from the hierarchy. + * @param object $object Object to use to guess templates. + * @return array Array of templates with added ones. + */ + abstract protected function add_def_lang_templates_from_object( array $templates, object $object ): array; + + /** + * Returns the language of the given object. + * + * @since 3.7 + * + * @param object $object The object (e.g. `WP_Post` or `WP_Term`). + * @return PLL_Language|false Object language, `false` if none found. + */ + abstract protected function get_object_language( object $object ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-core-taxonomy.php b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-core-taxonomy.php new file mode 100644 index 0000000..6312521 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-core-taxonomy.php @@ -0,0 +1,67 @@ +model->term->get( $object->term_id, $this->default_language ); + $def_lang_object = get_term( $def_lang_id ); + if ( ! $def_lang_object instanceof WP_Term ) { + return $templates; + } + + return $this->prepend_templates( $templates, $def_lang_object ); + } + + /** + * Returns the language of the given term. + * + * @since 3.7 + * + * @param object $object The term object. + * @return PLL_Language|false Term language, `false` if none found. + */ + protected function get_object_language( object $object ) { + if ( ! $object instanceof WP_Term ) { + return false; + } + + return $this->model->term->get_language( $object->term_id ); + } + + /** + * Prepends templates for the given term to the given array. + * + * @since 3.7 + * + * @param array $templates Array of templates. + * @param WP_Term $term Term object to use. + * @return array Array of templates with prepended ones. + */ + protected function prepend_templates( array $templates, WP_Term $term ): array { + $type = 'post_tag' === $term->taxonomy ? 'tag' : $term->taxonomy; + array_unshift( $templates, "{$type}-{$term->term_id}.php" ); + array_unshift( $templates, "{$type}-{$term->slug}.php" ); + + return $templates; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-custom-taxonomy.php b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-custom-taxonomy.php new file mode 100644 index 0000000..30fc1d9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-custom-taxonomy.php @@ -0,0 +1,26 @@ +taxonomy}-{$term->slug}.php" ); + + return $templates; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-page.php b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-page.php new file mode 100644 index 0000000..dafdb6a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-page.php @@ -0,0 +1,65 @@ +model->post->get( $object->ID, $this->default_language ); + $def_lang_object = get_post( $def_lang_id ); + if ( ! $def_lang_object instanceof WP_Post ) { + return $templates; + } + return $this->prepend_templates( $templates, $def_lang_object ); + } + + /** + * Returns the language of the given post. + * + * @since 3.7 + * + * @param object $object The post object. + * @return PLL_Language|false Post language, `false` if none found. + */ + protected function get_object_language( object $object ) { + if ( ! $object instanceof WP_Post ) { + return false; + } + + return $this->model->post->get_language( $object->ID ); + } + + /** + * Prepends templates for the given post to the given array. + * + * @since 3.7 + * + * @param array $templates Array of templates. + * @param WP_Post $post Post object to use. + * @return array Array of templates with prepended ones. + */ + protected function prepend_templates( array $templates, WP_Post $post ): array { + array_unshift( $templates, "page-{$post->ID}.php" ); + array_unshift( $templates, "page-{$post->post_name}.php" ); + + return $templates; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-single.php b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-single.php new file mode 100644 index 0000000..8f751ea --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-template-single.php @@ -0,0 +1,26 @@ +post_type}-{$post->post_name}.php" ); + + return $templates; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-templates.php b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-templates.php new file mode 100644 index 0000000..19689c4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/filter-templates.php @@ -0,0 +1,59 @@ +> + */ + private $template_types = array( + 'category' => PLL_Filter_Template_Core_Taxonomy::class, + 'tag' => PLL_Filter_Template_Core_Taxonomy::class, + 'taxonomy' => PLL_Filter_Template_Custom_Taxonomy::class, + 'page' => PLL_Filter_Template_Page::class, + 'single' => PLL_Filter_Template_Single::class, + ); + + /** + * Constructor. + * + * @since 3.7 + * + * @param PLL_Frontend $polylang Main Polylang object. + */ + public function __construct( PLL_Frontend $polylang ) { + $this->model = $polylang->model; + } + + /** + * Hooks to the template hierarchy filters with the corresponding objects. + * + * @since 3.7 + * + * @return self + */ + public function init(): self { + foreach ( $this->template_types as $type => $class ) { + $template_filter = new $class( $this->model ); + add_filter( "{$type}_template_hierarchy", array( $template_filter, 'filter' ) ); + } + + return $this; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/load.php b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/load.php new file mode 100644 index 0000000..edafa3e --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/frontend-filter-template/load.php @@ -0,0 +1,23 @@ +filtered_templates = ( new PLL_Filter_Templates( $polylang ) )->init(); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-abstract-bulk-edit-template-slugs-module.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-abstract-bulk-edit-template-slugs-module.php new file mode 100644 index 0000000..6e12efc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-abstract-bulk-edit-template-slugs-module.php @@ -0,0 +1,163 @@ +get_languages_slugs(); + $new_lang_slug = ! empty( $new_lang_slug ) ? $new_lang_slug : $lang->slug; + $posts = $this->get_template_posts_from_language( $lang ); + + // Make sure the slug of the language we're looking for is in the list of language slugs. + $language_slugs[] = $lang->slug; + $language_slugs = array_unique( $language_slugs ); + + foreach ( $posts as $i => $post ) { + $new_slug = ( new PLL_FSE_Template_Slug( $post->post_name, $language_slugs ) )->update_language( $new_lang_slug ); + + if ( $post->post_name === $new_slug ) { + unset( $posts[ $i ] ); + } else { + $posts[ $i ]->post_name = $new_slug; + wp_cache_delete( $post->ID, 'posts' ); + } + } + + return $this->update_template_post_slugs( $posts ); + } + + /** + * Removes the language suffix from the slugs belonging to templates in the given language. + * + * @since 3.2 + * + * @param PLL_Language $lang The language to use to find the templates to unsuffix. + * @return int Number of posts updated. + */ + protected function remove_language_suffix_from_post_names( PLL_Language $lang ) { + $language_slugs = $this->get_languages_slugs(); + $posts = $this->get_template_posts_from_language( $lang ); + + // Make sure the slug of the language we're looking for is in the list of language slugs. + $language_slugs[] = $lang->slug; + $language_slugs = array_unique( $language_slugs ); + + foreach ( $posts as $i => $post ) { + $new_slug = ( new PLL_FSE_Template_Slug( $post->post_name, $language_slugs ) )->remove_language(); + + if ( $post->post_name === $new_slug ) { + unset( $posts[ $i ] ); + } else { + $posts[ $i ]->post_name = $new_slug; + wp_cache_delete( $post->ID, 'posts' ); + } + } + + return $this->update_template_post_slugs( $posts ); + } + + /** + * Returns a list of template posts associated with the given language. + * + * @since 3.2 + * + * @param PLL_Language $lang The language. + * @return stdClass[] { + * An array of objects with the following properties. + * + * @type int $ID A post ID. + * @type string $post_name A post slug. + * } + */ + protected function get_template_posts_from_language( PLL_Language $lang ) { + /** @var WP_Post[] */ + $results = ( new WP_Query() )->query( + array( + 'post_type' => PLL_FSE_Tools::get_template_post_types(), + 'post_status' => array( 'publish', 'draft' ), + 'tax_query' => array( + array( + 'terms' => array( $lang->get_tax_prop( 'language', 'term_taxonomy_id' ) ), + 'field' => 'term_taxonomy_id', + ), + ), + 'posts_per_page' => -1, + 'orderby' => 'ID', + 'order' => 'ASC', + 'no_found_rows' => true, + 'update_post_meta_cache' => false, + 'lang' => '', + ) + ); + + /** @var stdClass[] $results */ + foreach ( $results as $k => $result ) { + $results[ $k ] = (object) array( + 'ID' => (int) $result->ID, + 'post_name' => $result->post_name, + ); + } + + return $results; + } + + /** + * Updates the slug of the given post. + * + * @since 3.2 + * + * @global wpdb $wpdb + * + * @param stdClass[] $posts { + * An array of objects with the following properties. + * + * @type int $ID A post ID. + * @type string $post_name The new post slug. + * } + * @return int Number of posts updated. + */ + protected function update_template_post_slugs( array $posts ) { + global $wpdb; + + if ( empty( $posts ) ) { + return 0; + } + + $case = array(); + $post_ids = array(); + + foreach ( $posts as $post ) { + $case[] = array( $post->ID, $post->post_name ); + $post_ids[] = $post->ID; + } + + return $wpdb->query( + $wpdb->prepare( + sprintf( + "UPDATE {$wpdb->posts} SET post_name = ( CASE ID %s END ) WHERE ID IN (%s)", + implode( ' ', array_fill( 0, count( $case ), 'WHEN %d THEN %s' ) ), + implode( ',', array_fill( 0, count( $post_ids ), '%d' ) ) + ), + array_merge( array_merge( ...$case ), $post_ids ) + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-abstract-module.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-abstract-module.php new file mode 100644 index 0000000..de3333b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-abstract-module.php @@ -0,0 +1,52 @@ +model = &$polylang->model; + $this->options = $polylang->options; + } + + /** + * Returns the list of the slugs of enabled languages. + * + * @since 1.0 + * + * @return string[] + */ + protected function get_languages_slugs() { + return $this->model->get_languages_list( array( 'fields' => 'slug' ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-default-language-change.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-default-language-change.php new file mode 100644 index 0000000..7edcc52 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-default-language-change.php @@ -0,0 +1,70 @@ +model->get_language( $new_def_lang_slug ); + if ( empty( $new_def_lang ) ) { + // Uh? + return; + } + + $old_def_lang = $this->model->get_language( $old_def_lang_slug ); + if ( empty( $old_def_lang ) ) { + // Uh? + return; + } + + // Add a language suffix to the slugs belonging to templates in the current default language. + $this->update_language_suffix_in_post_names( $old_def_lang ); + + // Remove the language suffix from the slugs belonging to templates in the new default language. + $this->remove_language_suffix_from_post_names( $new_def_lang ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-filter-block-types.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-filter-block-types.php new file mode 100644 index 0000000..46e5a2e --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-filter-block-types.php @@ -0,0 +1,109 @@ +remove_template_part_variations( $settings['variations'] ); + + return $settings; + } + + /** + * Filters out template part instances from block `core/template-part` variations. + * This avoids to display all translations of templates parts in the block selection list, + * otherwise the confusing UI could allow a user to insert a template part in a wrong language. + * + * @since 3.6 + * + * @param array $variations Array of block variations. + * @param WP_Block_Type $block_type Block type object to filter. + * @return array Filtered variations. + */ + public function filter_block_type_variations( $variations, $block_type ) { + if ( 'core/template-part' !== $block_type->name ) { + return $variations; + } + + return $this->remove_template_part_variations( $variations ); + } + + /** + * Filters out template part instances from block `core/template-part` variations + * and keep are variations. + * + * @since 3.6 + * + * @param array $variations Array of block `core/template-part` variations. + * @return array Filtered variations. + */ + private function remove_template_part_variations( $variations ) { + foreach ( $variations as $i => $variation ) { + /* + * Check attributes specific to template part instances variations to keep area variations registered. + * See: {https://github.com/WordPress/wordpress-develop/blob/6.1.1/src/wp-includes/blocks/template-part.php#L186-L238} + * and {https://github.com/WordPress/wordpress-develop/blob/6.1.1/src/wp-includes/blocks/template-part.php#L161-L184}. + */ + if ( ! isset( $variation['attributes']['slug'], $variation['attributes']['theme'] ) ) { + continue; + } + + unset( $variations[ $i ] ); + } + + return array_values( $variations ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-language-slug-change.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-language-slug-change.php new file mode 100644 index 0000000..811d81c --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-language-slug-change.php @@ -0,0 +1,79 @@ +slug === $args['slug'] ) { + // The slug hasn't changed. + return; + } + + /** + * At this point: + * - the language cache has been cleared: `PLL_Model->clean_languages_cache()` is hooked to + * 'edited_term_taxonomy'. + * - `$this->options['default_lang']` has been updated in `PLL_Admin_Model->update_language()`. + */ + $def_lang = $this->model->get_default_language(); + + if ( empty( $def_lang ) || $def_lang->slug === $args['slug'] ) { + // Templates in the default language don't have the language suffix: nothing to update then. + return; + } + + // At this point, we're modifying the slug of a non-default language. + $this->update_language_suffix_in_post_names( $lang, $args['slug'] ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-language.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-language.php new file mode 100644 index 0000000..bd14715 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-language.php @@ -0,0 +1,146 @@ +get_site_editor_language(); + + if ( empty( $editor_lang ) ) { + return false; + } + + return $editor_lang; + } + + /** + * Returns the language object to use in the site editor. + * + * @since 3.2 + * @since 3.5 Removed `$model` parameter. + * + * @return PLL_Language|false + */ + private function get_site_editor_language() { + $post = $this->get_current_post(); + + if ( empty( $post ) ) { + return $this->model->get_default_language(); + } + + $post_lang = $this->model->post->get_language( $post->ID ); + + if ( empty( $post_lang ) ) { + return $this->model->get_default_language(); + } + + return $post_lang; + } + + /** + * Returns the current post using the Site Editor URLs. + * As of WordPress 6.8, the Site Editor URLs are: + * - `wp-admin/site-editor.php?p=/page` + * - `wp-admin/site-editor.php?p=/pattern` + * - `wp-admin/site-editor.php?p=/page/123` + * - `wp-admin/site-editor.php?p=/wp_block/123` + * - `wp-admin/site-editor.php?p=/wp_navigation/123` + * - `wp-admin/site-editor.php?p=/wp_template/themeSlug//templateSlug` + * - `wp-admin/site-editor.php?p=/wp_template_part/themeSlug//templateSlug` + * - ... + * + * @since 3.7.6 + * + * @return WP_Post|null The current post or null if not found. + */ + private function get_current_post(): ?WP_Post { + if ( ! isset( $_GET['p'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return $this->get_current_post_legacy(); + } + + /** @var string $p */ + $p = $_GET['p']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + + if ( preg_match( '/^\/(page|wp_block|wp_navigation)\/(\d+)$/', $p, $matches ) && ! empty( $matches[2] ) ) { + /* + * `$matches[2]` is an numeric string representing the post ID. + */ + return get_post( (int) $matches[2] ); + } elseif ( preg_match( '/^\/(wp_template|wp_template_part)\/(.+)$/', $p, $matches ) && ! empty( $matches[2] ) ) { + /* + * `$matches[1]` is a string representing either `wp_template` or `wp_template_part`, `$matches[2]` is the template ID (themeSlug//templateSlug). + */ + return PLL_FSE_Tools::get_post_from_template_id( $matches[2], $matches[1] ); + } + + return null; + } + + /** + * Returns the current post using legacy Site Editor URLs. + * Backward compatibility with WordPress < 6.8. + * Before WordPress 6.8, the Site Editor URLs were: + * - `wp-admin/site-editor.php?postId=123&postType=page` + * - `wp-admin/site-editor.php?postId=themeSlug//templateSlug&postType=wp_template` + * - `wp-admin/site-editor.php?postId=themeSlug//templateSlug&postType=wp_template_part` + * - ... + * + * @since 3.7.6 + * + * @return WP_Post|null The current post or null if not found. + */ + private function get_current_post_legacy(): ?WP_Post { + if ( isset( $_GET['postType'] ) && PLL_FSE_Tools::is_template_post_type( sanitize_key( $_GET['postType'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return PLL_FSE_Tools::get_template_post(); + } elseif ( isset( $_GET['postId'] ) && is_numeric( $_GET['postId'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return get_post( (int) $_GET['postId'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended + } + + return null; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-post-deletion.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-post-deletion.php new file mode 100644 index 0000000..6f7c97a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-post-deletion.php @@ -0,0 +1,75 @@ +delete_post()` (prio 10), so the data about the translations still exist. + return $this; + } + + /** + * When a template in the default language is deleted, also delete its translations. + * + * @since 3.2 + * + * @param int $post_id Post ID. + * @param WP_Post $post Post object. + * @return void + */ + public function delete_translation_posts( $post_id, $post ) { + if ( ! $post instanceof WP_Post || ! in_array( $post->post_type, PLL_FSE_Tools::get_translatable_post_types(), true ) ) { + // Not a translated template post type. + return; + } + + $def_lang = $this->model->get_default_language(); + $post_lang = $this->model->post->get_language( $post->ID ); + + if ( empty( $def_lang ) || empty( $post_lang ) || $def_lang->slug !== $post_lang->slug ) { + // This one is not in the default language. + return; + } + + $translations = $this->model->post->get_translations( $post->ID ); + $translations = array_diff( $translations, array( $post->ID ) ); // Let's not create an infinite loop. + + if ( empty( $translations ) ) { + // Nothing to delete. + return; + } + + foreach ( $translations as $translation_id ) { + // Send it to Sovngarde. + wp_delete_post( $translation_id, true ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-post-types.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-post-types.php new file mode 100644 index 0000000..fc9a064 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-post-types.php @@ -0,0 +1,71 @@ +parse_query()` ('parse_query' prio 6). + * - After `PLL_Admin_Filters_Post->parse_query()` ('parse_query' prio 10). + */ + add_action( 'pre_get_posts', array( $this, 'translate_template_query' ), 10000 ); + return $this; + } + + /** + * Filters the query to allow the use of translated template parts. + * + * @since 3.2 + * + * @param WP_Query $query Reference to the WP_Query object. + * @return void + */ + public function translate_template_query( &$query ) { + if ( ! $query instanceof WP_Query || empty( $query->query_vars['post_name__in'] ) || ! is_array( $query->query_vars['post_name__in'] ) ) { + // We need a template name. + return; + } + + if ( ! PLL_FSE_Tools::is_template_query( $query ) ) { + // Not a template part query. + return; + } + + $def_lang = $this->model->get_default_language(); + + if ( empty( $def_lang ) ) { + // No default language. + return; + } + + // Get the requested language. + $requested_lang = $this->get_requested_language( $query ); + + if ( empty( $requested_lang['language'] ) ) { + // No language found in the query. + return; + } + + if ( $requested_lang['language']->slug === $def_lang->slug ) { + // No new template parts to look for when the current language is the default one. + return; + } + + // Prefix the template names. + $slugs = array(); + + foreach ( $query->query_vars['post_name__in'] as $slug ) { + // /!\ Add the suffixed slug before the not-suffixed one: see orderby. + $slugs[] = ( new PLL_FSE_Template_Slug( $slug, $this->get_languages_slugs() ) )->update_language( $requested_lang['language']->slug ); + $slugs[] = $slug; + } + + $query->query_vars['post_name__in'] = $slugs; + + // Make sure we retrieve the template we want by returning the suffixed template first. + $query->query_vars['orderby'] = 'post_name__in'; + + /** + * Remove the language query: + * - We are requesting 'header___xx' in current language and 'header' in default language. + * - Each template name is unique within a theme (which translates as a tax query). Example: + * 'tax_query' => [ + * [ + * 'taxonomy' => 'wp_theme', + * 'field' => 'slug', + * 'terms' => 'twentytwentytwo', + * ], + * ], + */ + if ( 'tax_query' === $requested_lang['source'] ) { + unset( $query->tax_query->queries[ $requested_lang['index'] ], $query->query_vars['lang'] ); // phpcs:ignore WordPressVIPMinimum.Hooks.PreGetPosts.PreGetPosts + } else { + unset( $query->query_vars['tax_query'][ $requested_lang['index'] ] ); + } + } + + /** + * Returns the language from the request. + * + * @since 3.2 + * + * @param WP_Query $query Reference to the `WP_Query` object. + * @return array { + * An array containing the language object and its array index from the tax query. + * + * @type PLL_Language|false $language Language object, false if no valid language has been found. + * @type int|false $index Position where the language query can be found in the tax query. + * False if no language query has been found. + * @type string $source Location of the language: + * - `tax_query` for `$query->tax_query->queries`. + * - `query_vars` for `$query->query_vars['tax_query']`. + * - An empty string if no valid language has been found. + * } + */ + private function get_requested_language( WP_Query &$query ) { + $sources = array( + 'tax_query' => isset( $query->tax_query ) ? $query->tax_query->queries : array(), + 'query_vars' => isset( $query->query_vars['tax_query'] ) ? $query->query_vars['tax_query'] : array(), + ); + + foreach ( $sources as $source_name => $tax_queries ) { + if ( empty( $tax_queries ) || ! is_array( $tax_queries ) ) { + continue; + } + + $found = $this->get_requested_language_in_tax_query( $tax_queries ); + + if ( false === $found['index'] ) { + continue; + } + + // Found it. + $found['source'] = $source_name; + + return $found; + } + + return array( + 'language' => false, + 'index' => false, + 'source' => '', + ); + } + + /** + * Returns the language from the given taxonomy query. + * + * @since 3.2 + * + * @param array $tax_query An array of taxonomy queries. + * @return array { + * An array containing the language object and its array index from the tax query. + * + * @type PLL_Language|false $language Language object, false if no valid language has been found. + * @type int|false $index Position where the language query can be found in the tax query. + * False if no language query has been found. + * } + */ + private function get_requested_language_in_tax_query( array $tax_query ) { + foreach ( $tax_query as $i => $query ) { + if ( empty( $query['taxonomy'] ) || 'language' !== $query['taxonomy'] ) { + // This isn't the taxonomy you're looking for. + continue; + } + + // We found our `language` query. + $no_lang = array( + 'language' => false, + 'index' => $i, + ); + + if ( empty( $query['terms'] ) ) { + // No terms. + return $no_lang; + } + + $field = ! empty( $query['field'] ) ? $query['field'] : 'slug'; + + switch ( $field ) { + case 'term_id': + case 'term_taxonomy_id': + // Term ID. + if ( is_array( $query['terms'] ) ) { + $query_lang_id = (int) reset( $query['terms'] ); + } elseif ( is_numeric( $query['terms'] ) ) { + $query_lang_id = (int) $query['terms']; + } else { + // Wrong type. + return $no_lang; + } + + if ( $query_lang_id <= 0 ) { + // Invalid ID. + return $no_lang; + } + + if ( 'term_taxonomy_id' === $field ) { + $query_lang_id = "tt:{$query_lang_id}"; + } + break; + + default: + // Lang slug. + if ( is_array( $query['terms'] ) ) { + $query_lang_id = reset( $query['terms'] ); + } else { + $query_lang_id = $query['terms']; + } + + if ( ! is_string( $query_lang_id ) ) { + // Invalid ID. + return $no_lang; + } + } + + return array( + 'language' => $this->model->get_language( $query_lang_id ), + 'index' => $i, + ); + } //end foreach + + return array( + 'language' => false, + 'index' => false, + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-recreate-language.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-recreate-language.php new file mode 100644 index 0000000..82bef8a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-recreate-language.php @@ -0,0 +1,344 @@ +modify_template_slug_on_lang_assigning()`). When this language is re-created later + * (deleted by mistake?), it is re-assigned to the templates (as long as it uses the same slug than before its + * deletion). + * + * @since 3.2 + */ +class PLL_FSE_Recreate_Language extends PLL_FSE_Abstract_Module implements PLL_Module_Interface { + + /** + * Instance of `PLL_Admin_Model`. + * + * @var PLL_Admin_Model + */ + protected $model; + + /** + * Returns the module's name. + * + * @since 3.2 + * + * @return string + */ + public static function get_name() { + return 'fse_recreate_language'; + } + + /** + * Sub-module init. + * + * @since 3.2 + * + * @return self + */ + public function init() { + add_action( 'pll_add_language', array( $this, 'reassign_language' ) ); + return $this; + } + + /** + * Re-assigns a language to templates upon its re-creation. + * + * @since 3.2 + * @global wpdb $wpdb + * + * @param array $args { + * Arguments used to create the language. + * + * @type string $name Language name (used only for display). + * @type string $slug Language code (ideally 2-letters ISO 639-1 language code). + * @type string $locale WordPress locale. + * @type int $rtl 1 if rtl language, 0 otherwise. + * @type int $term_group Language order when displayed. + * @type string $no_default_cat Optional, if set, no default category will be created for this language. + * @type string $flag Optional, country code, @see /polylang/src/settings/flags.php. + * } + * @return void + * + * @phpstan-param array{name:string,slug:string,locale:string,rtl:int<0,1>,term_group:positive-int,no_default_cat?:string,flag?:string} $args + */ + public function reassign_language( $args ) { + global $wpdb; + + if ( empty( $this->options['default_lang'] ) || $args['slug'] === $this->options['default_lang'] ) { + // Default language. + return; + } + + $def_lang = $this->model->get_default_language(); + $new_lang = $this->model->get_language( $args['slug'] ); + + if ( empty( $def_lang ) || empty( $new_lang ) ) { + // Uh? + return; + } + + // Post IDs of posts in new language, post names of posts in default language. + $post_names_by_post_ids_by_theme_id = $this->get_posts_with_lang_suffix( $new_lang ); + + if ( empty( $post_names_by_post_ids_by_theme_id ) ) { + // No templates found. + return; + } + + /** + * We must work "by theme" because template slugs can be identical from 1 theme to another. + * When updating translation groups, `PLL_Admin_Model->set_translation_in_mass()` cannot be used because it adds + * new translations instead of updating the existing ones. + */ + $set_language_post_ids = array(); // Used to assign the language to newly bound templates. + $clean_cache_post_ids = array(); // Used to clean the posts cache. + $clean_cache_term_ids = array(); // Used to clean the terms cache. + $all_relationships = array(); // Used to assign the translation groups to newly bound templates. + $create_groups_post_ids = array(); // Used to create new translation groups when they don't exist yet. + + foreach ( $post_names_by_post_ids_by_theme_id as $theme_id => $post_names_by_post_ids ) { + // Get posts by their post_name and theme ID. + $results = $this->get_translation_groups( $post_names_by_post_ids, $theme_id ); + + if ( empty( $results ) ) { + // Should not happen. + continue; + } + + // Update translation groups and/or create new ones. + $post_ids_by_post_names = array_flip( $post_names_by_post_ids ); // Prevents multiple uses of `array_search()`. + $case = array(); // Used to update the existing translation groups. + $tt_ids = array(); // Used to update the existing translation groups. + + foreach ( $results as $result ) { + $new_lang_post_id = $post_ids_by_post_names[ $result['post_name'] ]; + $set_language_post_ids[] = $new_lang_post_id; + + if ( empty( $result['tt_id'] ) ) { + // The translation group doesn't exist yet. + $clean_cache_post_ids[] = $new_lang_post_id; + $clean_cache_post_ids[] = $result['post_id']; + $create_groups_post_ids[] = array( + $def_lang->slug => $result['post_id'], + $new_lang->slug => $new_lang_post_id, + ); + continue; + } + + // The translation group exist: update it. + $result['translations'][ $new_lang->slug ] = $new_lang_post_id; + + $clean_cache_post_ids = array_merge( $clean_cache_post_ids, array_values( $result['translations'] ) ); + + $case[] = array( $result['tt_id'], maybe_serialize( $result['translations'] ) ); + $tt_ids[] = $result['tt_id']; + $all_relationships[] = array( $new_lang_post_id, $result['tt_id'] ); + } + + if ( ! empty( $tt_ids ) ) { + $wpdb->query( + $wpdb->prepare( + sprintf( + "UPDATE {$wpdb->term_taxonomy} SET description = ( CASE term_taxonomy_id %s END ) WHERE term_taxonomy_id IN (%s)", + implode( ' ', array_fill( 0, count( $case ), 'WHEN %d THEN %s' ) ), + implode( ',', array_fill( 0, count( $tt_ids ), '%d' ) ) + ), + array_merge( array_merge( ...$case ), $tt_ids ) + ) + ); + + $clean_cache_term_ids = array_merge( $clean_cache_term_ids, $tt_ids ); + } + } + + if ( ! empty( $set_language_post_ids ) ) { + // Assign the language. + $this->model->post->set_language_in_mass( $set_language_post_ids, $new_lang ); + } + + if ( ! empty( $all_relationships ) ) { + // Assign the translation groups. + $wpdb->query( + $wpdb->prepare( // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber + sprintf( + "INSERT INTO {$wpdb->term_relationships} (object_id, term_taxonomy_id) VALUES %s", + implode( ',', array_fill( 0, count( $all_relationships ), '(%d,%d)' ) ) + ), + array_merge( ...$all_relationships ) + ) + ); + } + + if ( ! empty( $create_groups_post_ids ) ) { + // Create new translation groups. + $this->model->post->set_translation_in_mass( $create_groups_post_ids ); + } + + if ( ! empty( $clean_cache_post_ids ) ) { + // Clean posts cache. + clean_object_term_cache( $clean_cache_post_ids, PLL_FSE_Tools::get_template_post_types() ); + } + + if ( ! empty( $clean_cache_term_ids ) ) { + // Clean terms cache. + clean_term_cache( $clean_cache_term_ids, '', false ); + } + } + + /** + * Returns a list of templates that have a post_name suffixed with the given lang slug. + * + * @since 3.2 + * + * @param PLL_Language $language A language object. + * @return string[][] A set of post IDs and post names, grouped by theme ID (term_taxonomy_id of the + * 'wp_theme' taxonomy). Each result uses the post ID as array key and the post name + * (without lang suffix) as array value. + * Example of returned value: + * array( + * {theme_id} => array( + * {post_id} => '{post_name}', + * {post_id} => '{post_name}', + * ), + * {theme_id} => array( + * {post_id} => '{post_name}', + * ), + * ) + */ + private function get_posts_with_lang_suffix( PLL_Language $language ) { + global $wpdb; + + $post_types = PLL_FSE_Tools::get_template_post_types(); + + // 'dummy' => 'dummy___fr' => 'dummy\_\_\_fr' => '%\_\_\_fr' - No it's not commented code damnit. + $post_slug = ( new PLL_FSE_Template_Slug( 'dummy' ) )->update_language( $language->slug ); + $post_slug = str_replace( 'dummy', '%', $wpdb->esc_like( $post_slug ) ); + + $results = $wpdb->get_results( + $wpdb->prepare( + sprintf( + "SELECT p.ID as post_id, p.post_name, tt.term_taxonomy_id as theme_id + FROM {$wpdb->posts} AS p + INNER JOIN {$wpdb->term_relationships} AS tr + ON tr.object_id = p.ID + INNER JOIN {$wpdb->term_taxonomy} AS tt + ON tt.term_taxonomy_id = tr.term_taxonomy_id + AND tt.taxonomy = 'wp_theme' + WHERE p.post_type IN (%s) + AND post_name LIKE %%s", + implode( ',', array_fill( 0, count( $post_types ), '%s' ) ) + ), + array_merge( $post_types, array( $post_slug ) ) + ), + ARRAY_A + ); + + if ( empty( $results ) ) { + return array(); + } + + $language_slugs = $this->get_languages_slugs(); + $post_names_by_post_ids_by_theme_id = array(); + + foreach ( $results as $result ) { + $theme_id = $this->model->post->sanitize_int_id( $result['theme_id'] ); + $post_id = $this->model->post->sanitize_int_id( $result['post_id'] ); + $post_name = ( new PLL_FSE_Template_Slug( $result['post_name'], $language_slugs ) )->remove_language(); // We need the post_name without lang suffix to find the template in default language. + + $post_names_by_post_ids_by_theme_id[ $theme_id ][ $post_id ] = $post_name; + } + + return $post_names_by_post_ids_by_theme_id; + } + + /** + * Returns a list of translation groups belonging to templates that use the given post_names within the given theme + * ID. This will also return posts that don't have a translation group. + * + * @since 3.2 + * + * @param string[] $post_names List of post names. + * @param int $theme_id `term_taxonomy_id` of the 'wp_theme' taxonomy. + * @return array[] { + * Array of arrays containing the translation groups and their `term_taxonomy_id`. + * + * @type int $post_id Post ID (post in default language). + * @type string $post_name Post slug. + * @type int $tt_id `term_taxonomy_id` of the 'post_translations' taxonomy.`0` means the term + * doesn't exist. + * @type string[] $translations List of translations. IDs are not sanitized to keep it simple (the array + * can contain other things). + * } + * + * @phpstan-return array,post_name:string,tt_id:int<0,max>,translations:array}> + */ + private function get_translation_groups( array $post_names, $theme_id ) { + global $wpdb; + + $post_types = PLL_FSE_Tools::get_template_post_types(); + + $results = $wpdb->get_results( + $wpdb->prepare( + sprintf( + "SELECT p.ID as post_id, p.post_name, tt.term_taxonomy_id as tt_id, tt.description as translations + FROM {$wpdb->posts} AS p + + LEFT JOIN ( + SELECT tr1.object_id, tt1.term_taxonomy_id, tt1.description + FROM {$wpdb->term_relationships} AS tr1 + INNER JOIN {$wpdb->term_taxonomy} AS tt1 + ON tt1.term_taxonomy_id = tr1.term_taxonomy_id + AND tt1.taxonomy = 'post_translations' + ) AS tt + ON tt.object_id = p.ID + + INNER JOIN {$wpdb->term_relationships} AS tr + ON tr.object_id = p.ID + AND tr.term_taxonomy_id = %%d + + WHERE p.post_type IN (%s) + AND post_name IN (%s)", + implode( ',', array_fill( 0, count( $post_types ), '%s' ) ), + implode( ',', array_fill( 0, count( $post_names ), '%s' ) ) + ), + array_merge( array( $theme_id ), $post_types, $post_names ) + ), + ARRAY_A + ); + + return array_map( + function ( $result ) { + $result['post_id'] = $this->model->post->sanitize_int_id( $result['post_id'] ); + $result['tt_id'] = $this->model->term->sanitize_int_id( $result['tt_id'] ); + $result['translations'] = $this->format_translations( $result['translations'] ); + return $result; + }, + (array) $results + ); + } + + /** + * Formats a raw translation group from the database into an array. + * + * @since 3.2 + * + * @param mixed $translations Raw translation group from the database. + * @return string[] Translation IDs are not sanitized to keep it simple + * (the array can contain other things). + */ + private function format_translations( $translations ) { + if ( empty( $translations ) ) { + return array(); + } + + $translations = maybe_unserialize( $translations ); + + return is_array( $translations ) ? $translations : array(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-duplicate-template.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-duplicate-template.php new file mode 100644 index 0000000..94991c3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-duplicate-template.php @@ -0,0 +1,159 @@ +template_model = &$polylang->fse_template_model; + } + + /** + * Returns the module's name. + * + * @since 3.2 + * + * @return string + */ + public static function get_name() { + return 'fse_rest_duplicate_template'; + } + + /** + * Sub-module init. + * + * @since 3.2 + * + * @return self + */ + public function init() { + foreach ( PLL_FSE_Tools::get_template_post_types() as $post_type ) { + add_action( "rest_after_insert_{$post_type}", array( $this, 'translate_content' ), 10, 3 ); + } + + add_filter( 'pll_translate_blocks', array( $this, 'translate_blocks' ), 10, 2 ); + + return $this; + } + + /** + * Translates template part content on translation creation. + * + * @since 3.2 + * + * @param WP_Post $template The inserted or updated template part. + * @param WP_REST_Request $request The current request. + * @param bool $creating True when creating a template part, false when updating. + * @return void + * + * @phpstan-param WP_REST_Request $request + */ + public function translate_content( $template, $request, $creating ) { + if ( empty( $creating ) ) { + return; + } + + $lang = $this->model->get_language( $request->get_param( 'lang' ) ); + if ( empty( $lang ) || ! ( new PLL_FSE_REST_Route( $request->get_route() ) )->is_template_route() ) { + return; + } + + $this->template_model->translate_template_content( $template, $lang ); + } + + /** + * Recursively translate blocks. + * + * @since 3.2 + * + * @param array[] $blocks { + * An array of blocks arrays. + * + * @type string $blockName Name of block. + * @type array $attrs List of block attributes. + * @type array $innerBlocks List of inner blocks. + * @type string $innerHTML Resultant HTML from inside block comment delimiters after removing inner blocks. + * @type array $innerContent List of string fragments and null markers where inner blocks were found. + * } + * @param string $language Slug language of the target post. + * @return array Array of translated blocks. + */ + public function translate_blocks( $blocks, $language ) { + foreach ( $blocks as $k => $block ) { + switch ( $block['blockName'] ) { + case 'core/template-part': + if ( ! empty( $block['attrs']['slug'] ) && ! empty( $block['attrs']['theme'] ) ) { + $blocks[ $k ]['attrs']['slug'] = $this->translate_template_part( $block['attrs'], $language ); + } + + break; + } + } + + return $blocks; + } + + /** + * Returns the slug of the template part translation. + * Creates the translation if it does not exist. + * + * @since 3.2 + * + * @param string[] $attrs { + * The template part slug and theme. + * + * @type string $slug Template part slug. + * @type string $theme Template part theme slug. + * } + * @param string $language Slug language of the target post. + * @return string Slug of the translated template part. + */ + public function translate_template_part( $attrs, $language ) { + $post = PLL_FSE_Tools::query_template_post( $attrs['slug'], $attrs['theme'], 'wp_template_part' ); + if ( empty( $post ) ) { + return $attrs['slug']; + } + + $language = $this->model->get_language( $language ); + if ( empty( $language ) ) { + return $attrs['slug']; + } + + $tr_id = $this->model->post->get( $post->ID, $language ); + + // If we don't have a translation, then we create it. + if ( ! $tr_id ) { + $tr_id = $this->template_model->create_template_translation( $post, $language ); + } + + // Check the content of the template part to see if there is any block to translate. + $tr_post = get_post( $tr_id ); + $this->template_model->translate_template_content( $tr_post, $language ); + + return $tr_post->post_name; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-enforce-default-template.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-enforce-default-template.php new file mode 100644 index 0000000..15c39fb --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-enforce-default-template.php @@ -0,0 +1,153 @@ +template_model = &$polylang->fse_template_model; + } + + /** + * Returns the module's name. + * + * @since 3.2 + * + * @return string + */ + public static function get_name() { + return 'fse_enforce_default_template'; + } + + /** + * Sub-module init. + * + * @since 3.2 + * + * @return self + */ + public function init() { + foreach ( PLL_FSE_Tools::get_template_post_types() as $post_type ) { + add_action( "rest_after_insert_{$post_type}", array( $this, 'maybe_duplicate_template' ), 10, 3 ); + } + return $this; + } + + /** + * Duplicates the template in default language. Either by creating it or updating its content. + * As WordPress creates empty template right away, we have to look after the first insertion of the content + * to duplicate it into the default language. + * + * @since 3.2 + * + * @param WP_Post $post Inserted or updated post object. + * @param WP_REST_Request $request Request object. + * @param bool $creating True when creating a post, false when updating. + * @return void + * + * @phpstan-param WP_REST_Request $request + */ + public function maybe_duplicate_template( $post, $request, $creating ) { + if ( ! $post instanceof WP_Post || ! $request instanceof WP_REST_Request ) { + // Invalid arguments. + return; + } + + if ( ! pll_is_edit_rest_request( $request ) ) { + return; + } + + if ( ! empty( $request->get_param( 'from_post' ) ) ) { + // We're creating a template from a template that exists in the database. + return; + } + + $post_lang = $this->model->post->get_language( $post->ID ); + $req_lang = $request->get_param( 'lang' ); + if ( empty( $post_lang ) || $post_lang->slug !== $req_lang ) { + // The template's language and the one from the request doesn't match. + return; + } + + if ( $creating ) { + $this->maybe_create_default_template( $post ); + } else { + $this->maybe_update_default_template_content( $post, $post_lang ); + } + } + + /** + * Creates a template in default language. + * + * @since 3.2 + * + * @param WP_Post $post Inserted post object. + * @return void + */ + protected function maybe_create_default_template( $post ) { + $def_lang = $this->model->get_default_language(); + $translations = $this->model->post->get_translations( $post->ID ); + + if ( empty( $def_lang ) || ! empty( $translations[ $def_lang->slug ] ) ) { + // This template already has a corresponding template in the default language. + return; + } + + // Create the template in the database. + $this->template_model->create_template_translation( $post, $def_lang ); + } + + /** + * Updates default language template content by duplicating from a secondary language. + * + * @since 3.2 + * + * @param WP_Post $post Updated post object. + * @param PLL_Language $lang The requested language object. + * @return void + */ + protected function maybe_update_default_template_content( $post, $lang ) { + $def_lang = $this->model->get_default_language(); + + if ( empty( $def_lang ) || $def_lang->slug === $lang->slug ) { + // The template's language is the default one. + return; + } + + $def_lang_template = get_post( (int) $this->model->post->get_translation( $post->ID, $def_lang->slug ) ); + + if ( empty( $def_lang_template ) || ! empty( $def_lang_template->post_content ) ) { + // The template in default language doesn't exist or has already been duplicated. + return; + } + + $def_lang_template->post_content = $post->post_content; + + wp_update_post( $def_lang_template ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-route.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-route.php new file mode 100644 index 0000000..ae05aac --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-rest-route.php @@ -0,0 +1,203 @@ + 0, + 'post_type' => '', + 'rest_base' => '', + ); + + /** + * Used to store the state of `$this->match()`. + * + * @var bool True after `$this->match()` has been run. + */ + private $match_done = false; + + /** + * List of REST bases for the template (part) post type(s) + * with post type as array key. + * + * @var string[] + * + * @phpstan-var array + */ + private $rest_bases = array(); + + /** + * Constructor. + * + * @since 3.2 + * + * @param string $route A REST route. + * @return void + */ + public function __construct( $route ) { + if ( ! is_string( $route ) ) { + return; + } + + $this->route = $route; + } + + /** + * Returns the route. + * + * @since 3.2 + * + * @return string + */ + public function get(): string { + return $this->route; + } + + /** + * Tells if the REST route is a template's route. + * + * @since 3.2 + * + * @return bool + */ + public function is_template_route() { + $this->match(); + + return ! empty( $this->route_arr['post_type'] ); + } + + /** + * Returns the template post ID. + * + * @since 3.2 + * + * @return int The template post ID, `0` if not found in the route. + */ + public function get_post_id(): int { + $this->match(); + + return $this->route_arr['post_id']; + } + + /** + * Returns the template post type. + * + * @since 3.2 + * + * @return string The template post type, empty if the route doesn't match a template route. + */ + public function get_post_type(): string { + $this->match(); + + return $this->route_arr['post_type']; + } + + /** + * Returns the REST base related to the template post type. + * + * @since 3.2 + * + * @return string The REST base, empty if the route doesn't match a template route. + */ + public function get_rest_base(): string { + $this->match(); + + return $this->route_arr['rest_base']; + } + + /** + * Performs a regex match data in the route. + * This will fill in the property `$this->route_arr`. + * + * @since 3.2 + * + * @return void + */ + private function match() { + if ( $this->match_done ) { + // Already ran. + return; + } + + $this->match_done = true; + + $bases_arr = $this->get_template_rest_bases(); + + if ( empty( $bases_arr ) ) { + return; + } + + $bases = implode( '|', $bases_arr ); + + $pattern = "@^(?$bases)(?:/(?\d+))?(?:/|\?|#|$)@"; + $result = preg_match( $pattern, $this->route, $matches ); + + if ( empty( $result ) ) { + return; + } + + $post_types = array_flip( $bases_arr ); + $this->route_arr = array( + 'post_id' => isset( $matches['post_id'] ) ? (int) $matches['post_id'] : 0, + 'post_type' => $post_types[ $matches['rest_base'] ] ?? '', + 'rest_base' => $matches['rest_base'] ?? '', + ); + } + + /** + * Returns a list of REST "namespace + base" related to translated template types. + * + * @since 3.2 + * + * @return string[] Post type as array key and REST "namespace + base" as array value, + * in the form of `/{namespace}/{base}`. + * + * @phpstan-return array + */ + private function get_template_rest_bases(): array { + if ( ! empty( $this->rest_bases ) ) { + return $this->rest_bases; + } + + foreach ( PLL_FSE_Tools::get_template_post_types() as $post_type ) { + $obj = get_post_type_object( $post_type ); + + if ( empty( $obj ) ) { + continue; + } + + $namespace = ! empty( $obj->rest_namespace ) && is_string( $obj->rest_namespace ) ? $obj->rest_namespace : 'wp/v2'; + $base = ! empty( $obj->rest_base ) && is_string( $obj->rest_base ) ? $obj->rest_base : $obj->name; + + $this->rest_bases[ $post_type ] = "/{$namespace}/{$base}"; + } + + return $this->rest_bases; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-model.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-model.php new file mode 100644 index 0000000..06174b9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-model.php @@ -0,0 +1,160 @@ +sync_content = $polylang->sync_content; + } + + /** + * Returns the module's name. + * + * @since 3.2 + * + * @return string + */ + public static function get_name() { + return 'fse_template_model'; + } + + /** + * Sub-module init. + * + * @since 3.2 + * + * @return self + */ + public function init() { + return $this; + } + + /** + * Creates a template translation. + * + * @since 3.2 + * + * @param WP_Post $post Instance of the source template. + * @param PLL_Language $language Instance of the new translation language. + * @return int ID of the new template. 0 on failure. + */ + public function create_template_translation( WP_Post $post, PLL_Language $language ) { + $def_language = $this->model->get_default_language(); + + if ( empty( $def_language ) ) { + return 0; + } + + $post = $post->to_array(); + $post_id = $post['ID']; + unset( $post['ID'] ); + + // Post's slug. + $slug_instance = new PLL_FSE_Template_Slug( $post['post_name'], $this->get_languages_slugs() ); + + if ( $def_language->slug === $language->slug ) { + $post['post_name'] = $slug_instance->remove_language(); + } else { + $post['post_name'] = $slug_instance->update_language( $language->slug ); + } + + // Taxonomies. + $tax_defaults = array( + // Theme taxonomy. + 'wp_theme' => wp_get_theme()->get_stylesheet(), + ); + + if ( is_object_in_taxonomy( $post['post_type'], 'wp_template_part_area' ) ) { + // Template part area taxonomy. + $tax_defaults['wp_template_part_area'] = WP_TEMPLATE_PART_AREA_UNCATEGORIZED; // @phpstan-ignore-line + } + + $tax_defaults = array_filter( $tax_defaults, 'taxonomy_exists', ARRAY_FILTER_USE_KEY ); // Make sure `wp_get_post_terms()` doesn't return a `WP_Error` object. + + if ( ! empty( $tax_defaults ) ) { + $terms = wp_get_post_terms( $post_id, array_keys( $tax_defaults ) ); + + if ( is_array( $terms ) ) { // phpStan... + $terms = wp_list_pluck( $terms, 'slug', 'taxonomy' ); + } else { + $terms = array(); + } + + $post['tax_input'] = wp_parse_args( $terms, $tax_defaults ); + } + + // Create the post. + /** @var int|WP_Error */ + $new_post_id = wp_insert_post( wp_slash( $post ) ); + + if ( empty( $new_post_id ) || is_wp_error( $new_post_id ) ) { + // Whoops. + return 0; + } + + // Set the language. + $this->model->post->set_language( $new_post_id, $language ); + + // Set the translation group. + $translations = $this->model->post->get_translations( $post_id ); + $translations[ $language->slug ] = $new_post_id; + $this->model->post->save_translations( $post_id, $translations ); + + return $new_post_id; + } + + /** + * Translates the content of the given template. + * + * @since 3.2 + * @since 3.7 Deprecate `$from_template_id` argument and move `$target_language` to second position. + * + * @param WP_Post $target_template The template to translate. + * @param PLL_Language $target_language The target language object. + * @param PLL_Language|null $deprecated Deprecated target language object for backward compatibility. + * @return int The post ID on success. The value 0 on failure. + */ + public function translate_template_content( WP_Post $target_template, $target_language, ?PLL_Language $deprecated = null ) { + if ( ! $target_language instanceof PLL_Language || null !== $deprecated ) { + /** + * @phpstan-var PLL_Language $deprecated + */ + $target_language = $deprecated; + + _deprecated_argument( + __METHOD__, + '3.7', + 'You must use only 2 arguments, `$target_language` as second.' + ); + } + + $target_template->post_content = $this->sync_content->translate_content( $target_template->post_content, $target_template, $target_language ); + + return wp_update_post( $target_template ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-slug-sync.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-slug-sync.php new file mode 100644 index 0000000..57addbe --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-slug-sync.php @@ -0,0 +1,402 @@ +post_type ) ) { + // Not a translated template post type. + return; + } + + $def_lang = $this->model->get_default_language(); + + if ( empty( $def_lang ) ) { + // No default language. + return; + } + + // Since we are at the end of `wp_set_object_terms()`, the new language has been assigned to the template. + $template_lang = $this->model->post->get_language( $template_post->ID ); + + if ( empty( $template_lang ) ) { + // Uh? + return; + } + + if ( $def_lang->slug === $template_lang->slug ) { + // Default language: remove any language suffix. + $new_post_name = $this->remove_language_from_post_name( $template_post->post_name ); + } else { + // Non default language: use the slug of the template in the default language and add a language suffix. + $def_post_name = $this->get_translation_slug( $template_post->ID, $def_lang->slug, $template_post->post_name ); + $new_post_name = $this->add_language_to_post_name( $def_post_name, $template_lang->slug ); + } + + if ( $new_post_name === $template_post->post_name ) { + // Nothing to update. + return; + } + + // Update the template slug. + $this->update_template_slug( $template_post, $new_post_name ); + } + + /** + * Synchronizes the template slugs among translations after translations have been set or updated. + * + * @since 3.2 + * + * @param int $term_id Term ID. + * @return void + */ + public function sync_template_slugs_on_translations_save( $term_id ) { + $translations = $this->model->post->get_translations_from_term_id( $term_id ); + + // Sync translation slugs. + $this->sync_translation_slugs( $translations ); + } + + /** + * Modifies the template's slug after `wp_filter_wp_template_unique_post_slug()` for existing templates. + * + * @since 3.2 + * + * @param string $override_slug The filtered value of the slug (starts as `null` from `apply_filters()`). + * @param string $desired_slug The desired slug (post_name). + * @param int $post_ID Post ID. + * @param string $post_status Post status. + * @param string $post_type Post type. + * @return string The original or desired slug. + */ + public function unique_template_slug( $override_slug, $desired_slug, $post_ID, $post_status, $post_type ) { + if ( empty( $post_ID ) || ! PLL_FSE_Tools::is_template_post_type( (string) $post_type ) ) { + // If the post doesn't exist yet, it doesn't have any language assigned to it yet. + return $override_slug; + } + + // At this point, the post is an existing template. + if ( ! empty( $override_slug ) ) { + $new_post_name = $override_slug; + } else { + // Shouldn't happen since we're after `wp_filter_wp_template_unique_post_slug()`. + // Note: returning a non-null value prevents `PLL_Share_Post_Slug->wp_unique_post_slug()` to run. + $new_post_name = $desired_slug; + } + + $template_lang = $this->model->post->get_language( $post_ID ); + + if ( empty( $template_lang ) ) { + // Can't do anything if the template doesn't have any language yet. + return $new_post_name; + } + + $def_lang = $this->model->get_default_language(); + + if ( empty( $def_lang ) ) { + // No default language. + return $new_post_name; + } + + if ( $def_lang->slug === $template_lang->slug ) { + // Default language: remove any language suffix. + return $this->remove_language_from_post_name( $new_post_name ); + } + + // Non default language: use the slug of the template in the default language and add a language suffix. + $new_post_name = $this->get_translation_slug( $post_ID, $def_lang->slug, $new_post_name ); + + return $this->add_language_to_post_name( $new_post_name, $template_lang->slug ); + } + + /** + * Synchronizes template slugs among translations after a template update. + * + * @since 3.2 + * + * @param int $post_ID Post ID. + * @param WP_Post $template_post Post object after being updated. + * @return void + */ + public function sync_template_slugs_on_post_update( $post_ID, $template_post ) { + if ( ! $template_post instanceof WP_Post || ! PLL_FSE_Tools::is_template_post_type( $template_post->post_type ) ) { + // Not a template. + return; + } + + // Sync translations. + $this->sync_translation_slugs( $this->model->post->get_translations( $template_post->ID ) ); + } + + /** + * Removes any language suffix from the given post name. + * + * @since 3.2 + * + * @param string $post_name The post name. + * @return string + */ + private function remove_language_from_post_name( $post_name ) { + return ( new PLL_FSE_Template_Slug( $post_name, $this->get_languages_slugs() ) )->remove_language(); + } + + /** + * Adds a language suffix to the given post name. + * + * @since 3.2 + * + * @param string $post_name The post name. + * @param string $lang_slug The lang code. + * @return string + */ + private function add_language_to_post_name( $post_name, $lang_slug ) { + return ( new PLL_FSE_Template_Slug( $post_name, $this->get_languages_slugs() ) )->update_language( $lang_slug ); + } + + /** + * Returns the slug of a translation. + * + * @since 3.2 + * + * @param int $template_id A template's ID. + * @param string $lang_slug A language slug. + * @param string $fallback_slug Fallback slug to return if no template slug is found for the given language. + * @return string + */ + private function get_translation_slug( $template_id, $lang_slug, $fallback_slug ) { + $translations = $this->model->post->get_translations( $template_id ); + + if ( empty( $translations[ $lang_slug ] ) ) { + return $fallback_slug; + } + + $post = get_post( $translations[ $lang_slug ] ); + + if ( empty( $post ) ) { + return $fallback_slug; + } + + return $post->post_name; + } + + /** + * Update a template's slug in the database. + * Also clears the post's cache. + * + * @since 3.2 + * + * @global wpdb $wpdb + * + * @param WP_Post $template_post A post ID. + * @param string $slug The new slug. + * @return void + */ + private function update_template_slug( WP_Post $template_post, $slug ) { + $GLOBALS['wpdb']->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $GLOBALS['wpdb']->posts, + array( + 'post_name' => $slug, + ), + array( + 'ID' => $template_post->ID, + ), + null, + array( + 'ID' => '%d', + ) + ); + + clean_post_cache( $template_post ); + } + + /** + * Synchronize translation slugs, given a base slug. + * + * @since 3.2 + * + * @param int[] $translations An associative array of translations with language code as key + * and translation id as value. + * @return void + */ + private function sync_translation_slugs( array $translations ) { + if ( empty( $translations ) ) { + return; + } + + $def_lang = $this->model->get_default_language(); + + if ( empty( $def_lang ) ) { + // No default language. + return; + } + + if ( empty( $translations[ $def_lang->slug ] ) ) { + // We need the slug of the template in default language. + return; + } + + if ( count( $translations ) <= 1 ) { + // There is nothing to sync this with. + return; + } + + $translations = $this->get_translation_posts( $translations ); + + if ( empty( $translations ) ) { + // No templates. + return; + } + + $def_post = ! empty( $translations[ $def_lang->slug ] ) ? $translations[ $def_lang->slug ] : false; + + if ( empty( $def_post ) || ! PLL_FSE_Tools::is_template_post_type( $def_post->post_type ) ) { + // We need the slug of the template in default language. + return; + } + + $post_name_instance = new PLL_FSE_Template_Slug( $def_post->post_name, $this->get_languages_slugs() ); + + foreach ( $translations as $lang_slug => $translation_post ) { + if ( $lang_slug === $def_lang->slug ) { + $translation_name = $post_name_instance->remove_language(); + } else { + $translation_name = $post_name_instance->update_language( $lang_slug ); + } + + if ( $translation_name === $translation_post->post_name ) { + // Nothing to update. + continue; + } + + // Update the template slug. + $this->update_template_slug( $translation_post, $translation_name ); + } + } + + /** + * Returns translation posts. + * + * @since 3.2 + * + * @param int[] $translations An associative array of translations with language code as key + * and translation id as value. + * @return WP_Post[] An associative array of translations with language code as key + * and WP_Post object as value. + */ + private function get_translation_posts( array $translations ) { + /** @var WP_Post[] */ + $posts = ( new WP_Query() )->query( + array( + 'post__in' => $translations, + 'posts_per_page' => count( $translations ), + 'post_type' => PLL_FSE_Tools::get_template_post_types(), + 'ignore_sticky_posts' => true, + 'update_post_meta_cache' => false, + 'lang' => '', + ) + ); + + // Organize post objects by language. + $translation_posts = array(); + $translations = array_flip( $translations ); + + foreach ( $posts as $post ) { + if ( isset( $translations[ $post->ID ] ) ) { + $translation_posts[ $translations[ $post->ID ] ] = $post; + } + } + + return $translation_posts; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-slug.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-slug.php new file mode 100644 index 0000000..9d397e3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-template-slug.php @@ -0,0 +1,190 @@ +slug = $slug; + $lang_slugs = array_filter( + $lang_slugs, + function ( $slug ) { + return is_string( $slug ) && preg_match( '#' . Languages::SLUG_PATTERN . '#', $slug ); + } + ); + + if ( ! empty( $lang_slugs ) ) { + $this->lang_pattern = implode( '|', $lang_slugs ); + } + } + + /** + * Returns the template slug. + * + * @since 3.2 + * + * @return string + */ + public function get() { + return $this->slug; + } + + /** + * Get the template slug without its language suffix. + * + * @since 3.2 + * + * @return string + */ + public function get_template_slug() { + $this->match(); + + return $this->slug_arr['slug']; + } + + /** + * Get the language slug from the template slug. + * + * @since 3.2 + * + * @return string + */ + public function get_language() { + $this->match(); + + return $this->slug_arr['lang']; + } + + /** + * Tells if the template slug has a language suffix already. + * + * @since 3.2 + * + * @return bool + */ + public function has_language() { + $this->match(); + + return ! empty( $this->slug_arr['lang'] ); + } + + /** + * Adds a language suffix to the template slug. + * + * @since 3.2 + * + * @param string $language_slug A language slug. + * @return string The template slug with its new language suffix. + */ + public function update_language( $language_slug ) { + if ( ! is_string( $language_slug ) || '' === $language_slug ) { + return $this->slug; + } + + $this->match(); + + $this->slug_arr['lang'] = $language_slug; + $this->slug = $this->slug_arr['slug'] . self::SEPARATOR . $this->slug_arr['lang']; + + return $this->slug; + } + + /** + * Removes the language suffix from a shared slug. + * + * @since 3.2 + * + * @return string The template slug without the language suffix. + */ + public function remove_language() { + $this->match(); + + $this->slug_arr['lang'] = ''; + $this->slug = $this->slug_arr['slug']; + + return $this->slug; + } + + /** + * Performs a regex match to separate the template slug and the language suffix. + * This will fill in the property `$this->slug_arr`. + * + * @since 3.2 + * + * @return void + */ + private function match() { + if ( ! empty( $this->slug_arr ) ) { + // Already ran. + return; + } + + $pattern = sprintf( '@^(?[a-zA-Z0-9_-]+)(?:%s(?%s))?$@U', self::SEPARATOR, $this->lang_pattern ); + $result = preg_match( $pattern, $this->slug, $matches ); + $this->slug_arr = array( + 'slug' => '', + 'lang' => '', + ); + + if ( empty( $result ) ) { + return; + } + + $this->slug_arr['slug'] = $matches['slug']; + $this->slug_arr['lang'] = isset( $matches['lang'] ) ? $matches['lang'] : ''; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-tools.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-tools.php new file mode 100644 index 0000000..8e657fd --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/fse-tools.php @@ -0,0 +1,231 @@ + 'wp_template_part', + ); + } + + /** + * Tells if the given post type is a template post type that is translated by Polylang. + * + * @since 3.2 + * + * @param string $post_type A post type name. + * @return bool + */ + public static function is_template_post_type( string $post_type ) { + return in_array( $post_type, self::get_template_post_types(), true ); + } + + /** + * Tells if the query is a template request that is translated by Polylang. + * + * @since 3.2 + * + * @param WP_Query $query Instance of `WP_Query`. + * @return bool + */ + public static function is_template_query( WP_Query $query ) { + if ( empty( $query->query_vars['post_type'] ) ) { + // No post types specified. + return false; + } + + if ( is_string( $query->query_vars['post_type'] ) ) { + $post_type = $query->query_vars['post_type']; + } elseif ( is_array( $query->query_vars['post_type'] ) && 1 === count( $query->query_vars['post_type'] ) ) { + $post_type = (string) reset( $query->query_vars['post_type'] ); + } else { + // Multiple post types. + return false; + } + + if ( ! self::is_template_post_type( $post_type ) ) { + // Not a translated template request. + return false; + } + + return true; + } + + /** + * Returns the template post object currently being edited. + * Backward compatibility with WordPress < 6.8. + * + * @since 3.2 + * + * @global WP_Post $post + * + * @return WP_Post|null + */ + public static function get_template_post() { + global $post; + + if ( ! empty( $post ) && $post instanceof WP_Post && self::is_template_post_type( $post->post_type ) ) { + return $post; + } + + if ( empty( $_GET['postId'] ) || empty( $_GET['postType'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return null; + } + + $template_id = wp_unslash( $_GET['postId'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + + if ( ! preg_match( '@^.+//[a-zA-Z0-9_-]+$@', $template_id ) ) { + return null; + } + + $template_type = sanitize_key( $_GET['postType'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended + + if ( ! self::is_template_post_type( $template_type ) ) { + return null; + } + + return self::get_post_from_template_id( $template_id, $template_type ); + } + + /** + * Returns a post associated with the given template ID from the database. + * + * @since 3.2 + * + * @param string $template_id Template ID, in the form of `{themeSlug}//{templateSlug}`. + * @param string $template_type Template type, either 'wp_template' or 'wp_template_part'. + * @return WP_Post|null + */ + public static function get_post_from_template_id( $template_id, $template_type ) { + $parts = self::get_template_id_components( $template_id ); + + if ( empty( $parts ) ) { + return null; + } + + return self::query_template_post( $parts['name'], $parts['theme'], $template_type ); + } + + /** + * Converts a template ID into an array containing the theme name and the template name. + * + * @since 3.2 + * + * @param string $template_id Template ID, in the form of `{themeSlug}//{templateSlug}`. + * @return string[] { + * An array containing the theme name and the template name. An empty array if the template ID is invalid. + * + * @type string $theme The theme name (slug). + * @type string $name The template name (slug). + * } + */ + public static function get_template_id_components( $template_id ) { + $parts = explode( '//', $template_id, 2 ); + + if ( count( $parts ) < 2 ) { + // Missing template name. + return array(); + } + + if ( empty( $parts[0] ) || empty( $parts[1] ) ) { + // Invalid template name. + return array(); + } + + return array( + 'theme' => $parts[0], + 'name' => $parts[1], + ); + } + + /** + * Returns a template post from the database. + * + * @since 3.2 + * @since 3.8 Added $language parameter. + * + * @param string $post_name Post name (slug). + * @param string $theme_name Theme name (slug). + * @param string $post_type Post type, either 'wp_template' or 'wp_template_part'. + * @param PLL_Language|null $language Optional. Language object to filter by. + * @return WP_Post|null + */ + public static function query_template_post( $post_name, $theme_name, $post_type, $language = null ) { + $query_args = array( + 'post_name__in' => (array) $post_name, + 'post_type' => $post_type, + 'post_status' => array( 'auto-draft', 'draft', 'publish', 'trash' ), + 'posts_per_page' => 1, + 'no_found_rows' => true, + 'tax_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query + array( + 'taxonomy' => 'wp_theme', + 'field' => 'name', + 'terms' => $theme_name, + ), + ), + ); + + if ( $language instanceof PLL_Language ) { + $query_args['tax_query'][] = array( + 'taxonomy' => 'language', + 'field' => 'term_taxonomy_id', + 'terms' => $language->get_tax_prop( 'language', 'term_taxonomy_id' ), + ); + } + + $template_query = new WP_Query( $query_args ); + if ( empty( $template_query->posts ) ) { + return null; + } + + return reset( $template_query->posts ); + } + + /** + * Tells if we're in the site editor. + * + * @since 3.2 + * + * @global string $pagenow + * + * @return bool + */ + public static function is_site_editor() { + return isset( $GLOBALS['pagenow'] ) && 'site-editor.php' === $GLOBALS['pagenow']; + } + + /** + * Returns translatable post types supporting automatic translations deletion. + * + * @since 3.4.5 + * + * @return string[] Array of post types. + */ + public static function get_translatable_post_types() { + return array_merge( + self::get_template_post_types(), + array( + 'wp_block' => 'wp_block', + 'wp_navigation' => 'wp_navigation', + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/full-site-editing/load.php b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/load.php new file mode 100644 index 0000000..688cf96 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/full-site-editing/load.php @@ -0,0 +1,51 @@ +model->has_languages() ) { + return; +} + +add_action( + 'pll_init', + function ( $polylang ) { + $pll_fse_sub_modules = array( + PLL_FSE_Default_Language_Change::class, + PLL_FSE_Language::class, + PLL_FSE_Language_Slug_Change::class, + PLL_FSE_Filter_Block_Types::class, + PLL_FSE_Post_Types::class, + PLL_FSE_Query_Filters::class, + PLL_FSE_REST_Duplicate_Template::class, + PLL_FSE_REST_Enforce_Default_Template::class, + PLL_FSE_Post_Deletion::class, + PLL_FSE_Template_Model::class, + PLL_FSE_Template_Slug_Sync::class, + ); + + foreach ( $pll_fse_sub_modules as $pll_fse_class ) { + $polylang->{$pll_fse_class::get_name()} = ( new $pll_fse_class( $polylang ) )->init(); + } + + if ( $polylang->model instanceof PLL_Admin_Model ) { + $polylang->{PLL_FSE_Recreate_Language::get_name()} = ( new PLL_FSE_Recreate_Language( $polylang ) )->init(); + } + + // Templare REST API class is required only in a REST context. + add_action( + 'rest_api_init', + function () use ( $polylang ) { + $polylang->rest_api->template = new Template( $polylang->rest_api ); + }, + 20 // Load the FSE modules after the PLL_REST_API. + ); + + unset( $pll_fse_sub_modules, $pll_fse_class ); + }, + 20 // Load the FSE modules after the PLL_REST_API. +); diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-bulk-option.php b/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-bulk-option.php new file mode 100644 index 0000000..f6a9a75 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-bulk-option.php @@ -0,0 +1,339 @@ + 'pll_export_post', + 'description' => __( 'Export selected content into a file', 'polylang-pro' ), + 'priority' => 15, + ), + $model + ); + + $this->downloader = $downloader; + } + + /** + * Displays the input bulk option in the bulk translate form. + * + * @since 3.6 + * + * @param string $selected The selected option name. + * @return void + */ + public function display( string $selected ) { + parent::display( $selected ); + $supported_formats = ( new PLL_File_Format_Factory() )->get_supported_formats( 'posts' ); + if ( empty( $supported_formats ) ) { + return; + } + include __DIR__ . '/view-export-file-format.php'; + } + + /** + * Defines whether the export Bulk Translate option is available given the admin panel and user logged. + * Do not add the 'pll_export_post' bulk translate option if LIBXML extension is not loaded, no matter the screen. + * + * @since 3.3 + * + * @return bool + */ + public function is_available() { + if ( ! extension_loaded( 'libxml' ) ) { + return false; + } + + $screen = get_current_screen(); + + if ( empty( $screen ) ) { + return false; + } + + switch ( $screen->base ) { + case 'edit': + case 'upload': + $post_type_object = get_post_type_object( $screen->post_type ); + + if ( empty( $post_type_object ) ) { + return false; + } + + $capability = $post_type_object->cap->edit_posts; + break; + default: + return false; + } + + return current_user_can( $capability ); + } + + + /** + * + * Export post content for converter. + * + * @since 3.3 + * @since 3.6 Returns a WP_Error instead of an array. + * + * @param int[] $post_ids The ids of the posts selected for export. + * @param string[] $target_languages The target languages. + * @return WP_Error Notices to be displayed to the user when something wrong occurs when exporting. + * + * @phpstan-param non-empty-array> $post_ids + * @phpstan-param non-empty-array $target_languages + */ + public function do_bulk_action( $post_ids, $target_languages ): WP_Error { + check_admin_referer( 'pll_translate', '_pll_translate_nonce' ); + + $file_format_factory = new PLL_File_Format_Factory(); + $filetype = ! empty( $_GET['filetype'] ) ? sanitize_key( $_GET['filetype'] ) : ''; + $filetype = $file_format_factory->split_filetype( $filetype ); + $file_format = $file_format_factory->from_extension( $filetype['extension'] ); + + if ( is_wp_error( $file_format ) ) { + return $file_format; + } + + /** @var array */ + $target_languages = array_combine( + $target_languages, + array_map( array( $this->model, 'get_language' ), $target_languages ) + ); + $target_languages = array_filter( $target_languages ); + + if ( empty( $target_languages ) ) { + return new WP_Error( 'invalid-target-languages', __( 'Error: invalid target languages.', 'polylang-pro' ) ); + } + + $posts = get_posts( + array( + 'post__in' => $post_ids, + 'posts_per_page' => count( $post_ids ), + 'orderby' => 'post__in', + 'ignore_sticky_posts' => true, + 'update_post_meta_cache' => false, + 'update_post_term_cache' => false, + 'post_type' => $this->model->get_translated_post_types(), + 'post_status' => 'any', + ) + ); + + if ( empty( $posts ) ) { + return new WP_Error( 'pll_no_posts_selected', __( 'The posts selected for translation could not be found.', 'polylang-pro' ) ); + } + + $is_ambiguous = $this->is_ambiguous( $posts ); + + if ( is_wp_error( $is_ambiguous ) ) { + return $is_ambiguous; + } + + $posts_keyed_with_source_lang = $this->get_posts_by_language( $posts ); + if ( empty( $posts_keyed_with_source_lang ) ) { + return new WP_Error( 'pll_posts_with_no_language', __( 'The posts selected for translation have no language.', 'polylang-pro' ) ); + } + + $posts_by_target_lang = $this->get_posts_by_target_language( $posts_keyed_with_source_lang, array_keys( $target_languages ) ); + if ( empty( $posts_by_target_lang ) ) { + return new WP_Error( 'pll_same_target_language', __( 'The posts are already in the target language. Please select a different language for the translation.', 'polylang-pro' ) ); + } + + $export_container = new PLL_Export_Container( $file_format->get_export_class( $filetype['version'] ) ); + $export_objects = new PLL_Export_Data_From_Posts( $this->model ); + + foreach ( $posts_by_target_lang as $target_language_slug => $posts ) { + /** @var PLL_Language $target_language This cannot be false. */ + $target_language = $this->model->get_language( $target_language_slug ); + + $export_objects->send_to_export( $export_container, $posts, $target_language, array( 'include_translated_items' => true ) ); + } + + return $this->downloader->create( $export_container ); + } + + /** + * Get post data from id + * + * @since 3.3 + * + * @param int $post_id The ID of the post to export. + * @param string $target_language Targeted languages. + */ + public function translate( $post_id, $target_language ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + } + + /** + * Groups `WP_Post` objects by their source language. + * + * @since 3.4 + * + * @param WP_Post[] $posts An array of `WP_Post` objects to translate. + * @return WP_Post[][] An array, keyed with lang slugs, and containing arrays of `WP_Post` objects. + * + * @phpstan-return array> + */ + protected function get_posts_by_language( array $posts ) { + $posts_keyed_with_source_lang = array(); + + // Set the posts to translate for each source language. + foreach ( $posts as $post ) { + $post_lang = $this->model->post->get_language( $post->ID ); + if ( empty( $post_lang ) ) { + continue; + } + /** @phpstan-var array> $posts_keyed_with_source_lang */ + $posts_keyed_with_source_lang[ $post_lang->slug ][] = $post; + } + + return $posts_keyed_with_source_lang; + } + + /** + * Groups `WP_Post` objects by their target language. + * + * @since 3.4 + * + * @param WP_Post[][] $posts An array of `WP_Post` objects to translate. + * @param string[] $target_languages The target language slugs for translation. + * @return WP_Post[][] An array, keyed with lang slugs, and containing arrays of `WP_Post` objects. + * + * @phpstan-return array> + */ + protected function get_posts_by_target_language( array $posts, array $target_languages ) { + if ( empty( $posts ) || empty( $target_languages ) ) { + return array(); + } + + $translation_matrix = array(); + + // Set the posts to translate for each target language. + foreach ( $target_languages as $target_language ) { + $_posts = array_values( array_diff_key( $posts, array( $target_language => 1 ) ) ); + if ( ! empty( $_posts ) ) { + /** @phpstan-var array> $translation_matrix */ + $translation_matrix[ $target_language ] = array_merge( ...$_posts ); + } + } + + return $translation_matrix; + } + + /** + * Checks there is no ambiguity in the selected posts to export. + * Ambiguity happens when 2 posts that are translations of each other are selected to be translated. + * + * @since 3.3 + * @since 3.4 Parameter changed from int[] to WP_Post[] + * + * @param WP_Post[] $posts The posts selected for export. + * @return WP_Error|false An error if an ambiguity is found, false otherwise. The error message should not be + * escaped: it contains `
    ` tags and the texts are already escaped. + */ + protected function is_ambiguous( array $posts ) { + $duplicates = $this->find_duplicate_translations( wp_list_pluck( $posts, 'ID' ) ); + + if ( empty( $duplicates ) ) { + return false; + } + + $post_titles = wp_list_pluck( $posts, 'post_title', 'ID' ); // List of post titles keyed by post ID. + + if ( empty( $post_titles ) ) { + // Uh? + return false; + } + + // Wrap post titles into quotes. + $post_titles = array_map( + function ( $post_title ) { + // translators: %s is a post title. + return sprintf( _x( '"%s"', 'quoted post title', 'polylang-pro' ), $post_title ); + }, + $post_titles + ); + + $message = esc_html__( 'Ambiguous choice of contents to export. Please do not select contents that are translations of each other.', 'polylang-pro' ); + + foreach ( $duplicates as $duplicate ) { + $duplicate_titles = array_intersect_key( $post_titles, array_flip( $duplicate ) ); + + $message .= '
    ' . esc_html( + sprintf( + // translators: %s is a list of post titles. + _x( '- %s.', 'ambiguous posts list', 'polylang-pro' ), + wp_sprintf_l( '%l', $duplicate_titles ) + ) + ); + } + + return new WP_Error( 'pll_export_target_source_language', $message ); + } + + /** + * Find duplicate translations among the given list of post IDs. + * + * @since 3.3 + * + * @param int[] $post_ids The ids of the posts selected for export. + * @return int[][] A list of arrays of post IDs. + * + * @phpstan-param array> $post_ids + * @phpstan-return array>> + */ + protected function find_duplicate_translations( array $post_ids ) { + $return = array(); + $all_ids = array(); + + foreach ( $post_ids as $post_id ) { + if ( in_array( $post_id, $all_ids, true ) ) { + // Already processed this case (already met one of this post's translations). + continue; + } + + /** @var array> $translation_ids */ + $translation_ids = $this->model->post->get_translations( $post_id ); + + // Look for this post's translations in the list of posts to translate. + $common_post_ids = array_intersect( $post_ids, $translation_ids ); + + if ( count( $common_post_ids ) <= 1 ) { + // No translations found except this post. + continue; + } + + // Ambiguity found. + $return[] = $common_post_ids; + $all_ids = array_merge( $all_ids, $common_post_ids ); + } + + return $return; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-download.php b/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-download.php new file mode 100644 index 0000000..48cdca3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-download.php @@ -0,0 +1,149 @@ +getIterator()->current(); + + if ( $export instanceof PLL_Export_File ) { + $this->filename = $export->get_filename(); + $this->content_type = 'text/plain'; + + $content = $export->get(); + } + } else { + $this->filename = 'pll_export_' . time() . '.zip'; + $this->content_type = 'application/zip'; + + $content = $this->get_zip_archive( $container ); + } + + if ( is_wp_error( $content ) ) { + return $content; + } + + $this->content = $content; + + add_action( 'wp_redirect', array( $this, 'send_response' ) ); + + return new WP_Error(); + } + + /** + * Creates a zip archive with all files to download. + * + * @since 3.6 + * + * @see https://www.php.net/manual/class.ziparchive.php PHP ZipArchive library + * + * @param PLL_Export_Container $container List of exported data. + * @return string|WP_Error + */ + private function get_zip_archive( PLL_Export_Container $container ) { + if ( ! class_exists( 'ZipArchive' ) ) { + return new WP_Error( 'pll_ziparchive_not_exists', __( 'Error: ZipArchive is required to download multiple files. Please contact your host provider.', 'polylang-pro' ) ); + } + + $upload_dir = wp_upload_dir()['path']; + + + if ( ! is_writable( $upload_dir ) ) { // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_is_writable + return new WP_Error( 'pll_upload_dir_not_writable', __( 'Error: Upload directory must be writable. Please contact your host provider.', 'polylang-pro' ) ); + } + + $zip = new ZipArchive(); + + $filepath = $upload_dir . '/' . $this->filename; + + if ( ! $zip->open( $filepath, ZipArchive::CREATE ) ) { + return new WP_Error( 'pll_zip_file_error', __( 'Error: Impossible to create a Zip file.', 'polylang-pro' ) ); + } + + foreach ( $container as $export ) { + if ( ! $export instanceof PLL_Export_File ) { + continue; + } + + $export_content = $export->get(); + + if ( ! $export_content ) { + continue; + } + + $zip->addFromString( $export->get_filename(), $export_content ); + } + + if ( ! $zip->close() ) { + return new WP_Error( 'pll_zip_file_error', __( 'Error: Impossible to create a Zip file.', 'polylang-pro' ) ); + } + + $content = (string) file_get_contents( $filepath ); + wp_delete_file( $filepath ); + + return $content; + } + + /** + * Sends the file to download. + * + * @since 3.6 + * + * @return void + */ + public function send_response() { + header( 'Content-Disposition: attachment; filename=' . $this->filename ); + header( 'Content-Type: ' . $this->content_type ); + header( 'Content-Length: ' . strlen( $this->content ) ); + + if ( ob_get_length() > 0 ) { + ob_clean(); + } + + echo $this->content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + exit; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-file.php b/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-file.php new file mode 100644 index 0000000..67b698b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-file.php @@ -0,0 +1,46 @@ +get_source_language()->get_locale( 'display' ); + $target_language = $this->get_target_language()->get_locale( 'display' ); + $datenow = gmdate( 'Y-m-d_G-i-s' ); + $extension = $this->get_extension(); + + return "{$source_language}_{$target_language}_{$datenow}.{$extension}"; + } + + /** + * Returns exported data. + * + * @since 3.6 + * + * @return string + */ + abstract public function get(): string; + + /** + * Returns the current file extension. + * + * @since 3.1 + * + * @return string The file extension. + */ + abstract protected function get_extension(): string; +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-strings-action.php b/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-strings-action.php new file mode 100644 index 0000000..97b86af --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/export/export-strings-action.php @@ -0,0 +1,160 @@ +model = $model; + $this->downloader = $downloader; + } + + /** + * Action for string translations export. + * Make sure to verify the current user's capabilities first. + * Expects the following `$_POST` values: + * - `target-lang` string[] Array of language slugs. + * - `filetype` string A file extension, like `po`. + * - `group` string Allows to export string translations from the given group only. + * Use `-1` or an empty string to export all strings. + * + * @since 3.6 + * + * @return void + * + * @phpstan-return never + */ + public function export_action(): void { + check_admin_referer( self::ACTION_NAME, self::NONCE_NAME ); + + if ( ! isset( $_POST['target-lang'], $_POST['filetype'], $_POST['group'] ) ) { + $error = new WP_Error( 'pll_incomplete_form', __( 'Sorry, some data is missing from the form submission.', 'polylang-pro' ) ); + $this->display_errors( $error ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + $target_languages = is_array( $_POST['target-lang'] ) ? wp_unslash( $_POST['target-lang'] ) : array(); + $target_languages = $this->get_sanitized_languages( $target_languages ); + + if ( is_wp_error( $target_languages ) ) { + $this->display_errors( $target_languages ); + } + + $file_type = is_string( $_POST['filetype'] ) ? sanitize_key( $_POST['filetype'] ) : ''; + $group = is_string( $_POST['group'] ) ? sanitize_text_field( wp_unslash( $_POST['group'] ) ) : ''; + $group = '-1' === $group ? '' : $group; + + $errors = $this->export( $target_languages, $file_type, $group ); + + // At this point, the zip file creation failed. + $this->display_errors( $errors ); + } + + /** + * Launches the string translations export. + * + * @since 3.6 + * + * @param PLL_Language[] $target_languages Target language slugs. + * @param string $file_type File type. + * @param string $group Optional. Allows to export string translations from the given group only. + * Use an empty string to export all strings. Default is an empty string. + * @return WP_Error + */ + public function export( array $target_languages, string $file_type, string $group = '' ): WP_Error { + $file_format_factory = new PLL_File_Format_Factory(); + $filetype = $file_format_factory->split_filetype( sanitize_key( $file_type ) ); + $file_format = $file_format_factory->from_extension( $filetype['extension'] ); + + if ( is_wp_error( $file_format ) ) { + return $file_format; + } + + $export_container = new PLL_Export_Container( $file_format->get_export_class( $filetype['version'] ) ); + $export = new PLL_Export_Data_From_Strings( $this->model ); + $sources = PLL_Admin_Strings::get_strings(); + if ( '' !== $group ) { + $sources = array_filter( + $sources, + function ( $source ) use ( $group ) { + return $group === $source['context']; + } + ); + } + + $user = Capabilities::get_user(); + + foreach ( $target_languages as $target_language ) { + if ( ! $user->can_translate( $target_language ) ) { + wp_die( + esc_html( + sprintf( + /* translators: %s is a language name. */ + __( 'Sorry, you are not allowed to export translations in %s.', 'polylang-pro' ), + $target_language->name + ) + ), + 403 + ); + } + + $errors = $export->send_to_export( $export_container, $sources, $target_language ); + + if ( $errors->has_errors() ) { + return $errors; + } + } + + return $this->downloader->create( $export_container ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/export/strings-form-trait.php b/wp-content/plugins/polylang-pro/src/modules/import-export/export/strings-form-trait.php new file mode 100644 index 0000000..bc9f909 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/export/strings-form-trait.php @@ -0,0 +1,56 @@ +|WP_Error + */ + private function get_sanitized_languages( array $languages ) { + if ( empty( $languages ) ) { + return new WP_Error( 'pll_export_no_target_languages', __( 'Error: Please select a target language.', 'polylang-pro' ) ); + } + + $languages = array_filter( $languages, 'is_string' ); + $languages = array_map( 'sanitize_key', $languages ); + $languages = array_map( array( $this->model, 'get_language' ), $languages ); + $languages = array_filter( $languages ); + + if ( empty( $languages ) ) { + return new WP_Error( 'invalid-target-languages', __( 'Error: invalid target languages.', 'polylang-pro' ) ); + } + + return $languages; + } + + /** + * Registers settings errors to be displayed to the user. + * + * @since 3.6 + * @since 3.7 Moved from PLL_Export_Strings_Action. + * + * @param WP_Error $error An error object. + * @return void + * + * @phpstan-return never + */ + private function display_errors( WP_Error $error ): void { + pll_add_notice( $error ); + + PLL_Settings::redirect(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/export/view-export-file-format.php b/wp-content/plugins/polylang-pro/src/modules/import-export/export/view-export-file-format.php new file mode 100644 index 0000000..d41b207 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/export/view-export-file-format.php @@ -0,0 +1,29 @@ + + diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/export/view-tab-export-strings.php b/wp-content/plugins/polylang-pro/src/modules/import-export/export/view-tab-export-strings.php new file mode 100644 index 0000000..ad5697a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/export/view-tab-export-strings.php @@ -0,0 +1,65 @@ +languages->filter( 'translator' )->filter( 'hide_default' )->get_list(); +$strings = PLL_Admin_Strings::get_strings(); +$groups = array_unique( wp_list_pluck( $strings, 'context' ) ); +$supported_formats = ( new PLL_File_Format_Factory() )->get_supported_formats( 'strings' ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable +?> +
    +
    +
    +
    + + /> + + %3$s%2$s', + esc_attr( $language->slug ), + esc_html( $language->name ), + $language->flag // phpcs:ignore WordPress.Security.EscapeOutput + ); + } + ?> +
    +
    +
    + + +
    +
    + +
    +

    + +

    +
    +
    diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/file-format/file-format-factory.php b/wp-content/plugins/polylang-pro/src/modules/import-export/file-format/file-format-factory.php new file mode 100644 index 0000000..5599a99 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/file-format/file-format-factory.php @@ -0,0 +1,153 @@ +> + */ + protected $base_formats = array( + 'PO' => PLL_PO_Format::class, + 'XLIFF_2.1' => PLL_Xliff_Format::class, + 'XLIFF_2.0' => PLL_Xliff_Format::class, + 'XLIFF_1.2' => PLL_Xliff_Format::class, + ); + + /** + * Cache the supported file formats. + * + * @var PLL_File_Format[] + */ + protected $supported_formats = array(); + + /** + * Returns all the formats supported by the environment. + * + * @since 3.1 + * + * @param string $context Context `strings` or `posts` where the export is requested. + * @return PLL_File_Format[] + */ + public function get_supported_formats( string $context = '' ) { + if ( empty( $this->supported_formats ) ) { + $this->supported_formats = array_filter( + array_map( + function ( $format ) { + return new $format(); + }, + $this->base_formats + ), + function ( $format ) use ( $context ) { + return true === $format->is_supported() && ! ( 'posts' === $context && 'po' === $format->extension ); + } + ); + } + return $this->supported_formats; + } + + /** + * Gets the format that matches the given extension. + * + * @since 3.1 + * + * @param string $extension The extension of the file format to retrieve. + * @return PLL_File_Format|WP_Error + */ + public function from_extension( $extension ) { + return $this->get_format( + function ( $format ) use ( $extension ) { + return $format->extension === $extension; + } + ); + } + + /** + * Splits extension and version from the file type. + * + * @since 3.6 + * + * @param string $filetype The file type chosen from the UI. + * @return string[] File extension and file format version. + * + * @phpstan array{extension:string,version:string} + */ + public function split_filetype( $filetype ) { + $filetype = explode( '_', sanitize_key( $filetype ) ); + + return array( + 'extension' => $filetype[0], + 'version' => $filetype[1] ?? '', + ); + } + + /** + * Gets the format that matches the given mime type. + * + * @since 3.1 + * + * @param string $mime_type The mime type of the file format to retrieve. + * @return PLL_File_Format|WP_Error + */ + public function from_mime_type( $mime_type ) { + return $this->get_format( + function ( $format ) use ( $mime_type ) { + return is_array( $format->mime_type ) && in_array( $mime_type, $format->mime_type, true ); + } + ); + } + + /** + * Gets the file format formatted label to be displayed. + * + * @since 3.6 + * + * @param string $label The file format label. + * @return string The label formatted to be displayed. + */ + public static function get_format_label( $label ) { + return strtoupper( str_replace( '_', ' ', $label ) ); + } + + /** + * Matches a supported format given a filter callback. Internal use. + * + * @since 3.2 + * + * @param callable $filter A function used to search a format among supported formats. + * @return PLL_File_Format|WP_Error + */ + protected function get_format( $filter ) { + $supported_formats = $this->get_supported_formats(); + + $matching_formats = array_filter( $supported_formats, $filter ); + + if ( count( $matching_formats ) > 0 ) { + return reset( $matching_formats ); + } + + $formats = array_map( array( $this, 'get_format_label' ), array_keys( $supported_formats ) ); + $list = wp_sprintf_l( '%l', $formats ); + + if ( count( $supported_formats ) === 1 ) { + /* translators: %s is a file format, for example PO */ + $message = sprintf( __( 'Error: Wrong file format. The only supported file format is %s.', 'polylang-pro' ), $list ); + } else { + /* translators: %s is a suite of comma separate file formats, for example: PO, XLIFF */ + $message = sprintf( __( 'Error: Wrong file format. The supported file formats are: %s.', 'polylang-pro' ), $list ); + } + + return new WP_Error( 'pll_import_wrong_file_format', $message ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/file-format/file-format.php b/wp-content/plugins/polylang-pro/src/modules/import-export/file-format/file-format.php new file mode 100644 index 0000000..1610a60 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/file-format/file-format.php @@ -0,0 +1,53 @@ + + */ + abstract public function get_export_class( $version = '' ): string; +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/import-export.php b/wp-content/plugins/polylang-pro/src/modules/import-export/import-export.php new file mode 100644 index 0000000..fc5ba0f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/import-export.php @@ -0,0 +1,169 @@ +model = &$polylang->model; + + if ( $polylang instanceof PLL_Admin && class_exists( 'PLL_Export_Bulk_Option' ) ) { + add_action( 'pll_bulk_translate_options_init', array( $this, 'add_bulk_translate_options' ) ); + } + + if ( $polylang instanceof PLL_Settings ) { + add_action( 'load-' . PLL_Admin_Base::get_screen_id( 'strings' ), array( $this, 'add_meta_boxes' ) ); + add_action( 'load-' . PLL_Admin_Base::get_screen_id( 'strings' ), array( $this, 'admin_enqueue_style' ) ); + + /* + * See hook `mlang_action_{$action}` in `PLL_Settings::handle_actions()`. + * Security: if the two following callbacks are not hooked to `mlang_action_import-translations` and + * `mlang_action_export-translations` anymore, make sure to verify the current user's capabilities. + */ + add_action( + 'mlang_action_' . PLL_Import_Action::ACTION_VALUE, + // Lazyload `PLL_Import_Action`'s instantiation. + function () use ( &$polylang ) { + ( new PLL_Import_Action( + $this->model, + array( + self::TYPE_POST => new PLL_Import_Posts( new PLL_Translation_Post_Model( $polylang ) ), + self::TYPE_TERM => new PLL_Import_Terms( new PLL_Translation_Term_Model( $polylang ) ), + self::STRINGS_TRANSLATIONS => new PLL_Import_Strings( new PLL_Translation_Strings_Model() ), + ), + new PLL_File_Format_Factory() + ) )->import_action(); + } + ); + add_action( + 'mlang_action_' . PLL_Export_Strings_Action::ACTION_VALUE, + function () { + ( new PLL_Export_Strings_Action( $this->model, new PLL_Export_Download() ) )->export_action(); + } + ); + } + } + + /** + * Adds 'pll_export_post' bulk option in Translate bulk action {@see PLL_Bulk_Translate::register_options()} + * + * @since 2.7 + * @since 3.6.5 Added `$bulk_translate` parameter. + * + * @param PLL_Bulk_Translate $bulk_translate Instance of `PLL_Bulk_Translate`. + * @return void + */ + public function add_bulk_translate_options( $bulk_translate ): void { + $bulk_translate->register_options( + array( + new PLL_Export_Bulk_Option( + $this->model, + new PLL_Export_Download() + ), + ) + ); + } + + /** + * Add Metaboxes, shown only if there is more than one language registered. + * + * @since 2.7 + * + * @return void + */ + public function add_meta_boxes() { + if ( ! empty( $this->model->languages->filter( 'translator' )->filter( 'hide_default' )->get_list() ) ) { + add_meta_box( + 'pll-export-strings-box', + __( 'Export string translations', 'polylang-pro' ), + array( $this, 'metabox_export_strings' ), + PLL_Admin_Base::get_screen_id( 'strings' ), + 'normal' + ); + + add_meta_box( + 'pll-import-translations-box', + __( 'Import translations', 'polylang-pro' ), + array( $this, 'metabox_import_translation' ), + PLL_Admin_Base::get_screen_id( 'strings' ), + 'normal' + ); + } + } + + /** + * Metabox export strings. + * + * @since 2.7 + * + * @return void + */ + public function metabox_export_strings() { + $model = $this->model; + include POLYLANG_PRO_DIR . '/src/modules/import-export/export/view-tab-export-strings.php'; + } + + /** + * Metabox import translations. + * + * @since 2.7 + * + * @return void + */ + public function metabox_import_translation() { + include POLYLANG_PRO_DIR . '/src/modules/import-export/import/view-tab-import-translations.php'; + } + + /** + * Enqueue stylesheet for import/export on admin side. + * + * @since 3.1 + * + * @return void + */ + public function admin_enqueue_style() { + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + wp_enqueue_style( 'pll-admin-translations-dashboard', plugins_url( '/css/build/translations-dashboard' . $suffix . '.css', POLYLANG_ROOT_FILE ), array( 'colors' ), POLYLANG_VERSION ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-action.php b/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-action.php new file mode 100644 index 0000000..b2b5119 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-action.php @@ -0,0 +1,332 @@ +model = $model; + $this->imports = $imports; + $this->file_format_factory = $file_format_factory; + } + + /** + * Deletes the file when no longer needed. + * + * @since 3.6 + */ + public function __destruct() { + if ( isset( $this->upload['file'] ) ) { + wp_delete_file( $this->upload['file'] ); + } + } + + /** + * Launches the import action. + * Make sure to verify the current user's capabilities first. + * + * @since 3.6 + * + * @return void + * + * @phpstan-return never + */ + public function import_action(): void { + $error = $this->upload(); + + if ( ! is_wp_error( $error ) ) { + $error = $this->process( $error ); + } + + pll_add_notice( $error ); + + PLL_Settings::redirect(); + } + + /** + * Adds translation file formats to the list of allowed mime types. + * + * @since 3.6 + * + * @param array $mimes List of allowed mime types. + * @return array Modified list of allowed mime types. + */ + public function allowed_mimes( $mimes ) { + foreach ( $this->file_format_factory->get_supported_formats() as $format ) { + $mimes = array_merge( $mimes, $format->mime_type ); + } + return $mimes; + } + + /** + * Processes the imported objects retrieved from an import file. + * + * @since 3.6 + * + * @param PLL_Import_File_Interface $import File importer. + * @return WP_Error Error object. + */ + private function process( PLL_Import_File_Interface $import ): WP_Error { + $is_targeted_site_valid = $this->is_valid_site( $import ); + if ( $is_targeted_site_valid->has_errors() ) { + return $is_targeted_site_valid; + } + + $is_generator_valid = $this->is_valid_generator( $import ); + if ( $is_generator_valid->has_errors() ) { + return $is_generator_valid; + } + + $target_language = $this->get_target_language( $import ); + if ( is_wp_error( $target_language ) ) { + return $target_language; + } + + if ( ! Capabilities::get_user()->can_translate( $target_language ) ) { + return new WP_Error( + 'pll_import_not_allowed', + sprintf( + /* translators: %s is a language name. */ + __( 'Sorry, you are not allowed to import translations in %s.', 'polylang-pro' ), + $target_language->name + ) + ); + } + + $error = new WP_Error(); + + $entry = $import->get_next_entry(); + while ( ! empty( $entry ) ) { + if ( isset( $this->imports[ $entry['type'] ] ) ) { + $this->imports[ $entry['type'] ]->translate( $entry, $target_language ); + } + $entry = $import->get_next_entry(); + } + + foreach ( $this->imports as $import ) { + $error->merge_from( $import->get_warning_notice() ); + $error->merge_from( $import->get_updated_notice() ); + + $imported_objects_ids = $import->get_imported_object_ids(); + + if ( empty( $imported_objects_ids ) ) { + continue; + } + + $import_type = $import->get_type(); + + $import->do_after_import_process( $imported_objects_ids, $target_language ); + + /** + * Fires after objects have been imported. + * + * @since 3.3 + * + * @param PLL_Language $target_language The targeted language for import. + * @param array $imported_objects_ids The imported object ids of the import. + */ + do_action( "pll_after_{$import_type}_import", $target_language, $imported_objects_ids ); + } + + return $error; + } + + /** + * Checks if the current site corresponding on the targeted one in the import file. + * + * @since 3.3 + * @since 3.6 Visibility is now private. + * + * @param PLL_Import_File_Interface $import Import file. + * @return WP_Error Error object, empty if valid. + */ + private function is_valid_site( PLL_Import_File_Interface $import ): WP_Error { + if ( $import->get_site_reference() !== get_site_url() ) { + return new WP_Error( + 'pll_import_invalid_site', + /* translators: placeholders are URLs */ + sprintf( __( 'Error: The site targeted in the imported file does not match the current site. Found: %1$s. Expected: %2$s.', 'polylang-pro' ), $import->get_site_reference(), get_site_url() ) + ); + } + + return new WP_Error(); + } + + /** + * Checks if the import file has been generated by Polylang Pro. + * + * @since 3.3 + * @since 3.6 Visibility is now private. + * + * @param PLL_Import_File_Interface $import Import file. + * @return WP_Error Error object, empty if valid. + */ + private function is_valid_generator( PLL_Import_File_Interface $import ): WP_Error { + if ( $import->get_generator_name() !== PLL_Import_Export::APP_NAME ) { + return new WP_Error( + 'pll_import_invalid_generator', + sprintf( + /* translators: %s is the plugin's name. */ + __( 'Error: The imported file has not been generated by %s.', 'polylang-pro' ), + POLYLANG + ) + ); + } + + return new WP_Error(); + } + + /** + * Checks if the targeted language is valid for the import. + * + * @since 3.3 + * @since 3.6 Visibility is now private. + * + * @param PLL_Import_File_Interface $import Import file. + * @return PLL_Language|WP_Error + */ + private function get_target_language( PLL_Import_File_Interface $import ) { + + $locale = $import->get_target_language(); + + if ( false === $locale ) { + return new WP_Error( + 'pll_import_no_target_language', + __( 'Error: No target languages have been provided in the imported file.', 'polylang-pro' ) + ); + } + $language = $this->model->get_language( $locale ); + if ( ! $language ) { + return new WP_Error( + 'pll_import_invalid_target_language', + __( "Error: You are trying to import a file in a language which doesn't exist on your site.", 'polylang-pro' ) + ); + } + + return $language; + } + + /** + * Handles uploading a file and returns associated importer. + * + * @since 3.6 + * + * @return PLL_Import_File_Interface|WP_Error An error object on failure, `PLL_Import_File_Interface` object on success. + */ + private function upload() { + check_admin_referer( self::ACTION_NAME, self::NONCE_NAME ); + + if ( empty( $_FILES['importFileToUpload']['name'] ) ) { + // No uploaded file. + return new WP_Error( 'pll_import_no_upload', __( 'Error: Please select a file to upload.', 'polylang-pro' ) ); + } + + add_filter( 'upload_mimes', array( $this, 'allowed_mimes' ) ); // phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.upload_mimes + + $overrides = array( + 'test_form' => false, + ); + + $this->upload = wp_handle_upload( $_FILES['importFileToUpload'], $overrides ); + + remove_filter( 'upload_mimes', array( $this, 'allowed_mimes' ) ); + + if ( isset( $this->upload['error'] ) ) { + return new WP_Error( 'pll_import_upload_failed', $this->upload['error'] ); + } + + if ( ! isset( $this->upload['type'], $this->upload['file'] ) ) { + return new WP_Error( 'pll_import_upload_failed', __( 'Upload failed.', 'polylang-pro' ) ); + } + + $file_format = $this->file_format_factory->from_mime_type( $this->upload['type'] ); + + if ( is_wp_error( $file_format ) ) { + return $file_format; + } + + $import_file = $file_format->get_import(); + $result = $import_file->import_from_file( $this->upload['file'] ); + + if ( is_wp_error( $result ) ) { + return $result; + } + + return $import_file; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-file-interface.php b/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-file-interface.php new file mode 100644 index 0000000..7462188 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-file-interface.php @@ -0,0 +1,69 @@ +translation_model = $translation_model; + $this->user_capabilities_manager = new PLL_Manage_User_Capabilities(); + } + + /** + * Handles the import of posts. + * + * @since 3.3 + * + * @param array $entry The current entry to import. + * @param PLL_Language $target_language The targeted language for import. + * + * @phpstan-param EntryData $entry + */ + public function translate( $entry, $target_language ) { + // Make sure `$this->success` is not `null`. + $this->success = (int) $this->success; + + $source_post = get_post( $entry['id'] ); + // Non matching post source id. + if ( ! $source_post ) { + $this->non_existing_post_ids[] = $entry['id']; + return; + } + + if ( empty( $this->post_status ) ) { + $this->post_status = $this->get_post_status(); + } + $entry['fields']['post_status'] = $this->post_status; + + $this->user_capabilities_manager->forbid_unfiltered_html( $source_post ); + + $result = $this->translation_model->translate( $entry, $target_language ); + if ( ! is_wp_error( $result ) ) { + ++$this->success; + + // Store the post ids during the import process. + $this->post_ids[] = $entry['id']; + } + + $this->user_capabilities_manager->allow_unfiltered_html(); + } + + /** + * Performs actions after an import process. + * + * @since 3.7 + * + * @param int[] $ids The entity ids to process after import. + * @param PLL_Language $target_language The target language. + * @return void + */ + public function do_after_import_process( array $ids, PLL_Language $target_language ) { + + $this->translation_model->do_after_process( $ids, $target_language ); + } + + /** + * Retrieves the status for the imported posts in the HTTP request. + * + * @since 3.3 + * + * @return string The post status, publish or draft. + */ + protected function get_post_status() { + check_admin_referer( PLL_Import_Action::ACTION_NAME, PLL_Import_Action::NONCE_NAME ); + if ( isset( $_POST['post-status'] ) && 'publish' === $_POST['post-status'] ) { + return 'publish'; + } + return 'draft'; + } + + /** + * Returns update notices to display. + * + * @since 3.3 + * + * @return WP_Error + */ + public function get_updated_notice() { + if ( ! $this->success ) { + return new WP_Error(); + } + + return new WP_Error( + 'pll_import_posts_success', + sprintf( + /* translators: %d is a number of posts translations */ + _n( '%d post translation updated.', '%d posts translations updated.', $this->success, 'polylang-pro' ), + $this->success + ), + 'success' + ); + } + + /** + * Returns warnings notices to display. + * + * @since 3.3 + * + * @return WP_Error + */ + public function get_warning_notice() { + if ( ! empty( $this->non_existing_post_ids ) ) { + if ( 1 === count( $this->non_existing_post_ids ) ) { + /* translators: %s is the post ID */ + $message = __( 'Warning: a matching source wasn\'t found for post ID: %s', 'polylang-pro' ); + } else { + /* translators: %s is a list of post IDs */ + $message = __( 'Warning: matching sources weren\'t found for post IDs: %s', 'polylang-pro' ); + } + return new WP_Error( + 'pll_import_posts_no_matching_sources', + sprintf( $message, wp_sprintf_l( '%l', $this->non_existing_post_ids ) ), + 'warning' + ); + } elseif ( isset( $this->success ) && ! $this->success ) { + return new WP_Error( + 'pll_import_posts_nothing_imported', + __( 'No posts were translated. Please check that the original posts in your file match those on the site.', 'polylang-pro' ), + 'warning' + ); + } + + return new WP_Error(); + } + + /** + * Returns the object type. + * + * @since 3.3 + * + * @return string + */ + public function get_type() { + return PLL_Import_Export::TYPE_POST; + } + + /** + * Returns the imported post ids. + * + * @since 3.3 + * + * @return int[] + */ + public function get_imported_object_ids() { + return $this->post_ids; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-strings.php b/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-strings.php new file mode 100644 index 0000000..89b6887 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-strings.php @@ -0,0 +1,134 @@ +translation_model = $translation_model; + } + + /** + * Handles the import of strings translations. + * + * @since 3.3 + * + * @param array $entry { + * An array containing the translations data. + * @type string $type Either 'post', 'term' or 'string_translations'. + * @type int $id Id of the object in the database (if applicable). + * @type Translations $data Objects holding all the retrieved Translation_Entry objects. + * } + * @param PLL_Language $target_language The targeted language for import. + */ + public function translate( $entry, $target_language ) { + $this->imported_strings = array(); + $result = $this->translation_model->translate( $entry, $target_language ); + if ( ! is_wp_error( $result ) ) { + $this->imported_strings = $result; + } + } + + /** + * Performs actions after an import process. + * + * @since 3.7 + * + * @param string[] $ids The entity ids to process after import. + * @param PLL_Language $target_language The target language. + * @return void + */ + public function do_after_import_process( array $ids, PLL_Language $target_language ) { + $this->translation_model->do_after_process( $ids, $target_language ); + } + + /** + * Returns update notices to display. + * + * @since 3.3 + * + * @return WP_Error + */ + public function get_updated_notice() { + if ( ! isset( $this->imported_strings ) || 0 === count( $this->imported_strings ) ) { + return new WP_Error(); + } + + return new WP_Error( + 'pll_import_strings_success', + sprintf( + /* translators: %d is a number of strings translations */ + _n( '%d string translation updated.', '%d string translations updated.', count( $this->imported_strings ), 'polylang-pro' ), + count( $this->imported_strings ) + ), + 'success' + ); + } + + /** + * Returns warning notices to display. + * + * @since 3.3 + * + * @return WP_Error + */ + public function get_warning_notice() { + if ( isset( $this->imported_strings ) && 0 === count( $this->imported_strings ) ) { + return new WP_Error( + 'pll_import_strings_nothing_imported', + __( 'No string translations updated. Please check that the original strings in your file match those on the site.', 'polylang-pro' ), + 'warning' + ); + } + + return new WP_Error(); + } + + /** + * Returns the object type. + * + * @since 3.3 + * + * @return string + */ + public function get_type() { + return PLL_Import_Export::STRINGS_TRANSLATIONS; + } + + /** + * Returns the imported source strings as ids. + * + * @since 3.3 + * + * @return string[] + */ + public function get_imported_object_ids(): array { + return (array) $this->imported_strings; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-terms.php b/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-terms.php new file mode 100644 index 0000000..4c16c47 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/import/import-terms.php @@ -0,0 +1,141 @@ +translation_model = $translation_model; + } + + /** + * Handles the import of terms. + * + * @since 3.3 + * + * @param array $entry The current entry to import. + * @param PLL_Language $target_language The targeted language for import. + */ + public function translate( $entry, $target_language ) { + // Make sure `$this->success` is not `null`. + $this->success = (int) $this->success; + + $result = $this->translation_model->translate( $entry, $target_language ); + if ( ! is_wp_error( $result ) ) { + ++$this->success; + + // Store the term ids during the import process. + $this->term_ids[] = $entry['id']; + } + } + + /** + * Performs actions after an import process. + * + * @since 3.7 + * + * @param int[] $ids The entity ids to process after import. + * @param PLL_Language $target_language The target language. + * @return void + */ + public function do_after_import_process( array $ids, PLL_Language $target_language ) { + $this->translation_model->do_after_process( $ids, $target_language ); + } + + /** + * Returns update notices to display. + * + * @since 3.3 + * + * @return WP_Error + */ + public function get_updated_notice() { + if ( ! $this->success ) { + return new WP_Error(); + } + + return new WP_Error( + 'pll_import_terms_success', + sprintf( + /* translators: %d is a number of terms translations */ + _n( '%d term translation updated.', '%d terms translations updated.', $this->success, 'polylang-pro' ), + $this->success + ), + 'success' + ); + } + + /** + * Returns warnings notices to display. + * + * @since 3.3 + * + * @return WP_Error + */ + public function get_warning_notice() { + if ( isset( $this->success ) && ! $this->success ) { + return new WP_Error( + 'pll_import_terms_nothing_imported', + __( 'No terms were translated. Please check that the original terms in your file match those on the site.', 'polylang-pro' ), + 'warning' + ); + } + + return new WP_Error(); + } + + /** + * Returns the object type. + * + * @since 3.3 + * + * @return string + */ + public function get_type() { + return PLL_Import_Export::TYPE_TERM; + } + + /** + * Returns the imported term ids. + * + * @since 3.3 + * + * @return int[] + */ + public function get_imported_object_ids() { + return $this->term_ids; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/import/view-tab-import-translations.php b/wp-content/plugins/polylang-pro/src/modules/import-export/import/view-tab-import-translations.php new file mode 100644 index 0000000..0d663d3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/import/view-tab-import-translations.php @@ -0,0 +1,36 @@ + +
    +
    +
    + + + + +
    +
    + + +
    +

    + +

    +
    +
    diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/load.php b/wp-content/plugins/polylang-pro/src/modules/import-export/load.php new file mode 100644 index 0000000..f4513b1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/load.php @@ -0,0 +1,18 @@ +model->has_languages() ) { + if ( $polylang instanceof PLL_Admin ) { + require_once POLYLANG_PRO_DIR . '/src/modules/bulk-translate/load.php'; + } + require_once POLYLANG_PRO_DIR . '/src/modules/sync/load.php'; + require_once POLYLANG_DIR . '/src/modules/sync/load.php'; + + $polylang->import_export = new PLL_Import_Export( $polylang ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-export.php b/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-export.php new file mode 100644 index 0000000..8e895d0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-export.php @@ -0,0 +1,145 @@ +po = new PO(); + } + + /** + * Adds a source string to exported data and optionally a pre-existing translated one. + * + * @since 2.7 + * @since 3.6 The first parameter is changed from `string $type` to `array $ref`. + * Type-hinted. + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @param string $source The source to be translated. + * @param string $target Optional, a preexisting translation, if any. + * @return void + * + * @phpstan-param translationEntryRef $ref + * @phpstan-param non-empty-string $source + */ + public function add_translation_entry( array $ref, string $source, string $target = '' ) { + if ( '' === $source ) { + return; + } + + $entry = new Translation_Entry( + array( + 'singular' => $source, + 'translations' => array( $target ), + 'context' => $ref['field_id'] ?? '', + 'extracted_comments' => $ref['field_comment'] ?? '', + ) + ); + + $this->po->add_entry( $entry ); + } + + /** + * Returns exported data. + * + * @since 3.1 + * + * @return string + */ + public function get(): string { + $this->po->set_comment_before_headers( $this->get_comment_before_headers() ); + + $this->set_file_headers(); + + return $this->po->export(); + } + + /** + * Assigns the necessary headers to the PO file. + * + * @see https://www.gnu.org/software/trans-coord/manual/gnun/html_node/PO-Header.html + * + * @since 2.7 + * @since 3.3 Add a reference to the application that generated the export file (name + version). + * @since 3.3.1 Replace non-official "Language-Target" header to the official Language. + * Use the Poedit header "X-Source-Language" instead of non official "Language-source". + * Replace non official 'Site-Reference" header by "X-Polylang-Site-Reference". + * @since 3.6 Visibility is now private. + * + * @return void + */ + private function set_file_headers() { + $this->po->set_header( 'Language', $this->get_target_language()->get_locale( 'display' ) ); + $this->po->set_header( 'Project-Id-Version', PLL_Import_Export::APP_NAME . '/' . POLYLANG_VERSION ); + $this->po->set_header( 'POT-Creation-Date', current_time( 'Y-m-d H:iO', true ) ); + $this->po->set_header( 'PO-Revision-Date', current_time( 'Y-m-d H:iO', true ) ); + $this->po->set_header( 'MIME-Version', '1.0' ); + $this->po->set_header( 'Content-Type', 'text/plain; charset=utf-8' ); + $this->po->set_header( 'Content-Transfer-Encoding', '8bit' ); + $this->po->set_header( 'X-Source-Language', $this->get_source_language()->get_locale( 'display' ) ); + $this->po->set_header( 'X-Polylang-Site-Reference', get_site_url() ); + } + + /** + * + * Get the necessary text comment to add to the PO file. + * + * @since 3.6 Visibility is now private. + * + * @return string + */ + private function get_comment_before_headers(): string { + $po = 'This file was generated by ' . POLYLANG . PHP_EOL; + $po .= 'https://polylang.pro/' . PHP_EOL; + return $po; + } + + /** + * Returns the current file extension. + * + * @since 3.1 + * + * @return string The file extension. + */ + protected function get_extension(): string { + return 'po'; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-format.php b/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-format.php new file mode 100644 index 0000000..af89112 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-format.php @@ -0,0 +1,59 @@ + 'text/x-po' ); + + /** + * Po format is always supported. + * + * @since 3.1 + * + * @return true + */ + public function is_supported() { + return true; + } + + /** + * Returns the associated import class. + * + * @since 3.1 + * + * @return PLL_PO_Import + */ + public function get_import() { + return new PLL_PO_Import(); + } + + /** + * Returns the associated export class. + * + * @since 3.6 + * + * @param string $version Optional file format version. Not used for PO. + * @return string + * + * @phpstan-return class-string + */ + public function get_export_class( $version = '' ): string { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return PLL_PO_Export::class; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-import.php b/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-import.php new file mode 100644 index 0000000..de15412 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/po/po-import.php @@ -0,0 +1,175 @@ +po = new PO(); + } + + /** + * Import the translations from a file. + * + * Relies on {@see PO::import_from_file()} + * + * @since 2.7 + * + * @param string $filepath The path on the filesystem where the import file is located. + * @return true|WP_Error True on success, a `WP_Error` object if a problem occurs during file import. + */ + public function import_from_file( string $filepath ) { + // PO::import_from_file returns false in case it does not succeed to parse the file. + if ( ! $this->po->import_from_file( $filepath ) ) { + return new WP_Error( 'pll_import_invalid_file', __( 'Error: Invalid file.', 'polylang-pro' ) ); + } + return true; + } + + /** + * Get the target language + * + * @since 2.7 + * @since 3.3.1 Change the target language header label. We're now using the official "Language" header + * and add a backward condition to accept the old header. + * + * @return string|false + */ + public function get_target_language() { + if ( ! empty( $this->po->headers['Language'] ) ) { + return $this->po->headers['Language']; + } + + // Backward compatibility with Polylang < 3.3.1. + if ( ! empty( $this->po->headers['Language-Target'] ) ) { + return $this->po->headers['Language-Target']; + } + return false; + } + + /** + * Get the site reference. + * + * @since 2.7 + * @since 3.3.1 Change the site reference header label. + * + * @return string|false + */ + public function get_site_reference() { + if ( ! empty( $this->po->headers['X-Polylang-Site-Reference'] ) ) { + return $this->po->headers['X-Polylang-Site-Reference']; + } + + // Backward compatibility with Polylang < 3.3.1. + if ( ! empty( $this->po->headers['Site-Reference'] ) ) { + return $this->po->headers['Site-Reference']; + } + return false; + } + + /** + * Returns the reference to the name of the application that generated the file. + * + * @since 3.3 + * + * @return string The application name. An empty string if it couldn't be found. + */ + public function get_generator_name(): string { + return $this->get_generator()['name']; + } + + /** + * Returns the reference to the version of the application that generated the file. + * + * @since 3.3 + * + * @return string The application version. An empty string if it couldn't be found or the name of the application. + * couldn't be found. + */ + public function get_generator_version(): string { + return $this->get_generator()['version']; + } + + /** + * Get the next string translation to import. + * + * @since 2.7 + * + * @return array + */ + public function get_next_entry(): array { + if ( $this->once ) { + return array(); + } + + $this->once = true; + return array( + 'id' => null, + 'type' => PLL_Import_Export::STRINGS_TRANSLATIONS, + 'data' => $this->po, + ); + } + + /** + * Returns the reference to the application that generated the file (name + version). + * + * @since 3.3 + * + * @return array { + * An array containing the application's name and version. + * + * @type string $name The application's name. + * @type string $version The application's version. + * } + * + * @phpstan-return array{name:string,version:string} + */ + private function get_generator() { + if ( empty( $this->po->headers['Project-Id-Version'] ) || ! is_string( $this->po->headers['Project-Id-Version'] ) ) { + return array( + 'name' => '', + 'version' => '', + ); + } + + $generator = explode( '/', trim( $this->po->headers['Project-Id-Version'], '/ ' ) ); + $product_version = isset( $generator[1] ) ? trim( array_pop( $generator ) ) : ''; + $product_name = trim( implode( '/', $generator ) ); + $product_name = 'POLYLANG_EXPORT' === $product_name ? PLL_Import_Export::APP_NAME : $product_name; // Backward compatibility with Polylang Pro < 3.3. + + return array( + 'name' => $product_name, + 'version' => $product_version, + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-12.php b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-12.php new file mode 100644 index 0000000..e4b0873 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-12.php @@ -0,0 +1,165 @@ +add_child_element( + $this->document, + 'xliff', + array( + 'version' => $this->get_version(), + 'xmlns' => 'urn:oasis:names:tc:xliff:document:1.2', + ) + ); + + $file = $this->add_child_element( + $xliff, + 'file', + array( + 'datatype' => 'plaintext', + 'original' => get_site_url(), + 'product-name' => PLL_Import_Export::APP_NAME, + 'product-version' => POLYLANG_VERSION, + 'source-language' => $source_language->get_locale( 'display' ), + 'target-language' => $target_language->get_locale( 'display' ), + ) + ); + + $this->groups_wrapper = $this->add_child_element( $file, 'body' ); + } + + /** + * Gets the xliff version. + * + * @since 3.6 + * + * @return string The xliff version. + */ + protected function get_version() { + return '1.2'; + } + + /** + * Adds a source string to exported data and optionally a pre-existing translated one. + * + * @since 3.6 + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @param string $source The source to be translated. + * @param string $target A preexisting translation, if any. + * @return void + * + * @phpstan-param translationEntryRef $ref + * @phpstan-param non-empty-string $source + */ + protected function add_valid_translation_entry( array $ref, string $source, string $target ) { + $group_name = $this->get_source_reference( $ref ); + $unit_tag = $this->document->createElement( 'trans-unit' ); + $this->groups[ $group_name ]->appendChild( $unit_tag ); + + $unit_tag->setAttribute( 'id', (string) ++$this->units_count ); + $unit_tag->setAttribute( 'restype', 'x-' . $ref['field_type'] ); + + if ( ! empty( $ref['field_id'] ) ) { + $unit_tag->setAttribute( 'resname', $ref['field_id'] ); + } + + $this->add_source_and_target( $unit_tag, $source, $target ); + + if ( ! empty( $ref['field_comment'] ) ) { + $note_tag = $this->document->createElement( 'note' ); + $note_tag->appendChild( $this->document->createCDATASection( $ref['field_comment'] ) ); + $unit_tag->appendChild( $note_tag ); + } + } + + /** + * Adds attributes to a newly created group. + * + * @since 3.6 + * + * @param DOMElement $group Translation group we want to add attributes to. + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @return void + * + * @phpstan-param translationEntryRef $ref + */ + protected function add_group_attributes( DOMElement $group, array $ref ) { + $group->setAttribute( 'restype', 'x-' . $ref['object_type'] ); + + if ( ! empty( $ref['object_id'] ) ) { + $group->setAttribute( 'resname', (string) $ref['object_id'] ); + } + } + + /** + * Adds attributes to a newly created group meant for encoding purpose. + * + * @since 3.6 + * + * @param DOMElement $group Translation group we want to add attributes to. + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @return void + * + * @phpstan-param translationEntryRef & array{encoding: non-falsy-string} $ref + */ + protected function add_encoding_group_attributes( DOMElement $group, array $ref ) { + $group->setAttribute( self::EXTRA_DATA_PROP_NAME, 'encoding:' . $ref['encoding'] ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-20.php b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-20.php new file mode 100644 index 0000000..a357bfc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-20.php @@ -0,0 +1,24 @@ +add_child_element( + $this->document, + 'xliff', + array( + 'xmlns' => 'urn:oasis:names:tc:xliff:document:2.0', + 'version' => $this->get_version(), + 'srcLang' => $source_language->get_locale( 'display' ), + 'trgLang' => $target_language->get_locale( 'display' ), + ) + ); + + $this->groups_wrapper = $this->add_child_element( + $xliff, + 'file', + array( + 'id' => '1', // We will have only one `` tag. + 'original' => sprintf( + '%s|%s|%s', + PLL_Import_Export::APP_NAME, + POLYLANG_VERSION, + get_site_url() + ), + 'canResegment' => 'no', + ) + ); + } + + /** + * Gets the xliff version. + * + * @since 3.6 + * + * @return string The xliff version. + */ + protected function get_version() { + return '2.1'; + } + + /** + * Adds a source string to exported data and optionally a pre-existing translated one. + * + * @since 3.6 + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @param string $source The source to be translated. + * @param string $target A preexisting translation, if any. + * @return void + * + * @phpstan-param translationEntryRef $ref + * @phpstan-param non-empty-string $source + */ + protected function add_valid_translation_entry( array $ref, string $source, string $target ) { + $group_name = $this->get_source_reference( $ref ); + $unit_tag = $this->document->createElement( 'unit' ); + $this->groups[ $group_name ]->appendChild( $unit_tag ); + + $unit_tag->setAttribute( 'id', (string) ++$this->units_count ); + $unit_tag->setAttribute( 'type', 'x:' . $ref['field_type'] ); + + if ( ! empty( $ref['field_id'] ) ) { + $unit_tag->setAttribute( 'name', $ref['field_id'] ); + } + + if ( ! empty( $ref['field_comment'] ) ) { + $notes_tag = $this->document->createElement( 'notes' ); + $note_tag = $this->document->createElement( 'note' ); + $note_tag->appendChild( $this->document->createCDATASection( $ref['field_comment'] ) ); + $notes_tag->appendChild( $note_tag ); + $unit_tag->appendChild( $notes_tag ); + } + + $segment_tag = $this->document->createElement( 'segment' ); + $unit_tag->appendChild( $segment_tag ); + + $this->add_source_and_target( $segment_tag, $source, $target ); + } + + /** + * Adds attributes to a newly created group. + * + * @since 3.6 + * + * @param DOMElement $group Translation group we want to add attributes to. + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @return void + * + * @phpstan-param translationEntryRef $ref + */ + protected function add_group_attributes( DOMElement $group, array $ref ) { + $group->setAttribute( 'id', (string) count( $this->groups ) ); + $group->setAttribute( 'type', 'x:' . $ref['object_type'] ); + + if ( ! empty( $ref['object_id'] ) ) { + $group->setAttribute( 'name', (string) $ref['object_id'] ); + } + } + + /** + * Adds attributes to a newly created group meant for encoding purpose. + * + * @since 3.6 + * + * @param DOMElement $group Translation group we want to add attributes to. + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @return void + * + * @phpstan-param translationEntryRef & array{encoding: non-falsy-string} $ref + */ + protected function add_encoding_group_attributes( DOMElement $group, array $ref ) { + $group->setAttribute( 'id', (string) count( $this->groups ) ); + $group->setAttribute( self::EXTRA_DATA_PROP_NAME, 'encoding:' . $ref['encoding'] ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-base.php b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-base.php new file mode 100644 index 0000000..c645f03 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/export/xliff-export-base.php @@ -0,0 +1,325 @@ + + */ + protected $groups = array(); + + /** + * Number of the translations units. + * + * @var int + * + * @phpstan-var int<0, max> + */ + protected $units_count = 0; + + /** + * Stores the type of encoding for each group. This ensures to have the same format for all fields of a meta. + * + * @var string[] Meta name as array keys, encoding format as array values. + */ + private $encodings = array(); + + /** + * Constructor. + * Declares xml version and creates the root element for the document. + * + * @since 3.6 + * + * @param PLL_Language $source_language The source language of the exported data. + * @param PLL_Language $target_language The target language of the exported data. + */ + public function __construct( PLL_Language $source_language, PLL_Language $target_language ) { + parent::__construct( $source_language, $target_language ); + + $this->document = new DOMDocument( '1.0', 'UTF-8' ); + } + + /** + * Adds a source string to exported data and optionally a pre-existing translated one. + * + * @since 3.6 + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @param string $source The source to be translated. + * @param string $target Optional, a preexisting translation, if any. + * @return void + * + * @phpstan-param translationEntryRef $ref + * @phpstan-param non-empty-string $source + */ + public function add_translation_entry( array $ref, string $source, string $target = '' ) { + if ( ! $this->are_entry_parameters_valid( $ref, $source ) ) { + return; + } + + $this->add_valid_translation_entry( $ref, $source, $target ); + } + + /** + * Returns exported data. + * + * @since 3.6 + * + * @return string An XML formatted string. + */ + public function get(): string { + $this->document->preserveWhiteSpace = false; + $this->document->formatOutput = true; + return (string) $this->document->saveXML( null, LIBXML_NOEMPTYTAG ); + } + + /** + * Helper function to insert new elements in our DOMDocument. + * + * @since 3.6 + * + * @see https://www.php.net/manual/fr/domdocument.createcdatasection.php + * + * @param DOMNode $parent Could be a DOMDocument or a DOMElement. + * @param string $tag_name Name of the attribute to set. + * @param string[] $attributes Optional attributes. Attribute names as array keys, attribute values as array values. + * @param string $content Optional. Could specify some text content to insert into the new node. + * /!\ This works only for text content, CDATA section has to be created with + * `DOMDocument::createCDATASection()` and appended. + * @return DOMElement The newly created `DOMElement`. + * + * @phpstan-param non-falsy-string $tag_name + * @phpstan-param array $attributes + */ + protected function add_child_element( DOMNode $parent, string $tag_name, array $attributes = array(), string $content = '' ): DOMElement { + $new_element = $this->document->createElement( $tag_name, $content ); + + foreach ( $attributes as $name => $value ) { + $new_element->setAttribute( $name, $value ); + } + + $parent->appendChild( $new_element ); + + return $new_element; + } + + /** + * Returns the name of the current translation group. + * Reuses an existing group or creates a new one. + * + * @since 3.6 + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @return string + * + * @phpstan-param translationEntryRef $ref + */ + protected function get_source_reference( array $ref ): string { + $group_name = $ref['object_type']; + + if ( ! empty( $ref['object_id'] ) ) { + $group_name .= '_' . $ref['object_id']; + } + + if ( ! array_key_exists( $group_name, $this->groups ) ) { + $this->groups[ $group_name ] = $this->document->createElement( 'group' ); + $this->groups_wrapper->appendChild( $this->groups[ $group_name ] ); + + $this->add_group_attributes( $this->groups[ $group_name ], $ref ); + } + + if ( ! empty( $ref['field_id'] ) ) { + // Make sure the encoding is the same for all sub-fields of a same meta. + $field_group_name = sprintf( + '%s|%s', + $ref['field_type'], + explode( '|', $ref['field_id'] )[0] // Meta sub-fields => meta name. + ); + + if ( array_key_exists( $field_group_name, $this->encodings ) ) { + $ref['encoding'] = $this->encodings[ $field_group_name ]; + } else { + $this->encodings[ $field_group_name ] = $ref['encoding'] ?? ''; + } + } else { + $ref['encoding'] = ''; + } + + if ( empty( $ref['encoding'] ) ) { + // No encoding. + return $group_name; + } + + $parent_group = $this->groups[ $group_name ]; + $group_name .= "|{$ref['encoding']}"; + + if ( array_key_exists( $group_name, $this->groups ) ) { + return $group_name; + } + + // Create a new group. + $this->groups[ $group_name ] = $this->document->createElement( 'group' ); + $parent_group->appendChild( $this->groups[ $group_name ] ); + + $this->add_encoding_group_attributes( $this->groups[ $group_name ], $ref ); + + return $group_name; + } + + /** + * Adds the source and target tags to the DOM. + * + * @since 3.6 + * + * @param DOMElement $parent Parent tag the source and target will be added to. + * @param string $source The source to be translated. + * @param string $target A preexisting translation, if any. + * @return void + */ + protected function add_source_and_target( DOMElement $parent, string $source, string $target ) { + $source_tag = $this->document->createElement( 'source' ); + $parent->appendChild( $source_tag ); + $source_tag->appendChild( $this->document->createCDATASection( $source ) ); + + $target_tag = $this->document->createElement( 'target' ); + $parent->appendChild( $target_tag ); + + if ( $target ) { + $target_tag->appendChild( $this->document->createCDATASection( $target ) ); + } + } + + /** + * Returns the current file extension. + * + * @since 3.6 + * + * @return string The file extension. + */ + protected function get_extension(): string { + return 'xliff'; + } + + /** + * Gets the xliff version. + * + * @since 3.6 + * + * @return string The xliff version. + */ + abstract protected function get_version(); + + /** + * Adds a source string to exported data and optionally a pre-existing translated one. + * + * @since 3.6 + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @param string $source The source to be translated. + * @param string $target A preexisting translation, if any. + * @return void + * + * @phpstan-param translationEntryRef $ref + * @phpstan-param non-empty-string $source + */ + abstract protected function add_valid_translation_entry( array $ref, string $source, string $target ); + + /** + * Adds attributes to a newly created group. + * + * @since 3.6 + * + * @param DOMElement $group Translation group we want to add attributes to. + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @return void + * + * @phpstan-param translationEntryRef $ref + */ + abstract protected function add_group_attributes( DOMElement $group, array $ref ); + + /** + * Adds attributes to a newly created group meant for encoding purpose. + * + * @since 3.6 + * + * @param DOMElement $group Translation group we want to add attributes to. + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @return void + * + * @phpstan-param translationEntryRef & array{encoding: non-falsy-string} $ref + */ + abstract protected function add_encoding_group_attributes( DOMElement $group, array $ref ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-format.php b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-format.php new file mode 100644 index 0000000..2ffbd28 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-format.php @@ -0,0 +1,74 @@ + 'text/xml' ); + + /** + * Whether the xliff format is supported or not by the current environment. + * + * @since 3.1 + * + * @return true|WP_Error + */ + public function is_supported() { + if ( ! extension_loaded( 'libxml' ) ) { + return new WP_Error( 'pll_libxml_missing', __( 'Your PHP installation appears to be missing the libxml extension which is required by the importer.', 'polylang-pro' ) ); + } + + return true; + } + + /** + * Returns the associated import class. + * + * @since 3.1 + * + * @return PLL_Xliff_Import + */ + public function get_import() { + return new PLL_Xliff_Import(); + } + + /** + * Returns the associated export class. + * + * @since 3.6 + * + * @param string $version Optional file format version. + * @return string + * + * @phpstan-return class-string|class-string|class-string + */ + public function get_export_class( $version = '' ): string { + switch ( $version ) { + case '20': + $class_name = PLL_Xliff_Export_20::class; + break; + case '21': + $class_name = PLL_Xliff_Export_21::class; + break; + default: // 1.2 + $class_name = PLL_Xliff_Export_12::class; + break; + } + return $class_name; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-12.php b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-12.php new file mode 100644 index 0000000..946c603 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-12.php @@ -0,0 +1,243 @@ +xpath->query( '//ns:file/@original' ); + if ( ! $site_reference_list ) { + return ''; + } + + $site_reference_item = $site_reference_list->item( 0 ); + if ( ! $site_reference_item ) { + return ''; + } + + $site_reference = $site_reference_item->nodeValue; + if ( ! $site_reference ) { + return ''; + } + + // Backward compatibility with Polylang Pro < 3.3. + $compat_reference = preg_replace( '/^\s*polylang\|/', '', $site_reference ); + + return is_string( $compat_reference ) ? $compat_reference : $site_reference; + } + + /** + * Returns the reference to the name of the application that generated the file. + * + * @since 3.3 + * + * @return string The application name. An empty string if it couldn't be found. + */ + public function get_generator_name(): string { + $product_names = $this->xpath->query( '//ns:file/@product-name' ); + + if ( empty( $product_names ) ) { + return $this->get_compat_generator_name(); + } + + $product_name = $product_names->item( 0 ); + + if ( empty( $product_name ) ) { + return $this->get_compat_generator_name(); + } + + $product_name = $product_name->nodeValue; + $product_name = is_string( $product_name ) ? trim( $product_name ) : ''; + + if ( empty( $product_name ) ) { + return $this->get_compat_generator_name(); + } + + return $product_name; + } + + /** + * Returns the reference to the version of the application that generated the file. + * + * @since 3.3 + * + * @return string The application version. An empty string if it couldn't be found or the name of the application. + * couldn't be found. + */ + public function get_generator_version(): string { + $product_versions = $this->xpath->query( '//ns:file/@product-version' ); + + if ( empty( $product_versions ) ) { + return ''; + } + + $product_version = $product_versions->item( 0 ); + + if ( empty( $product_version ) ) { + return ''; + } + + return is_string( $product_version->nodeValue ) ? trim( $product_version->nodeValue ) : ''; + } + + /** + * Returns the XML namespace. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_xml_namespace(): string { + return 'urn:oasis:names:tc:xliff:document:1.2'; + } + + /** + * Returns the Xpath to the translation entry's type attribute. + * + * @since 3.6 + * + * @param string $type The type of content to import. + * @return string + */ + protected function get_translation_entry_type_xpath( string $type ): string { + return sprintf( '//ns:group[@restype="x-%s"]', $type ); + } + + /** + * Returns the name of the XML attribute used to store the translation entry's ID. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_translation_entry_id_xml_attr_name(): string { + return 'resname'; + } + + /** + * Returns the name of the XML attribute used to store custom data. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_data_xml_attr_name(): string { + return PLL_Xliff_Export_12::EXTRA_DATA_PROP_NAME; + } + + /** + * Returns the name of the "unit" tag. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_unit_tag_name(): string { + return 'trans-unit'; + } + + /** + * Returns the Xpath to the target language. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_target_language_xpath(): string { + return '//ns:file/@target-language'; + } + + /** + * Creates an entry and fills it from trans unit. + * + * @since 3.6 + * + * @param DOMElement $trans_unit A trans unit node. + * @return array { + * string $context The context. + * string $id The optional ID. + * string $singular The singular. + * string $translations The translations. + * } + */ + protected function populate_entry_from_trans_unit( DOMElement $trans_unit ): array { + $restype = trim( $trans_unit->getAttribute( 'restype' ), 'x-' ); + $context = array( Context::FIELD => $restype ); + + /* + * Backward compatibility with Polylang Pro < 3.6. + * + * The `resname` attribute used to identify blocks in the post content is no longer used. + * So, we need to exclude it from the context when the post content was exported with a version < 3.6 + * to be able to match with the source content where blocks are no longer identified. + */ + if ( $trans_unit->hasAttribute( 'resname' ) && PLL_Import_Export::POST_CONTENT !== $restype ) { + $context[ Context::ID ] = $trans_unit->getAttribute( 'resname' ); + } + $entry = array( 'context' => Context::to_string( $context ) ); + + return array_merge( $entry, $this->get_singular_and_translations_for_entry( $trans_unit ) ); + } + + /** + * Returns the reference to the name of the application that generated the file (back compatibility). + * Before PLL Pro 3.3, the `original` attribute was storing "polylang|{site_url}". + * + * @since 3.3 + * + * @return string 'Polylang' or an empty string. + */ + private function get_compat_generator_name(): string { + $site_references = $this->xpath->query( '//ns:file/@original' ); + + if ( empty( $site_references ) ) { + return ''; + } + + $site_reference = $site_references->item( 0 ); + + if ( empty( $site_reference ) ) { + return ''; + } + + $site_reference = $site_reference->nodeValue; + $site_reference = is_string( $site_reference ) ? trim( $site_reference ) : ''; + + if ( empty( $site_reference ) || ! preg_match( '/^\s*polylang\|/', $site_reference ) ) { + return ''; + } + + return PLL_Import_Export::APP_NAME; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-21.php b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-21.php new file mode 100644 index 0000000..b3687fe --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-21.php @@ -0,0 +1,198 @@ +get_data_from_original_attribute(); + + return ! empty( $original[2] ) ? $original[2] : ''; + } + + /** + * Returns the reference to the name of the application that generated the file. + * + * @since 3.6 + * + * @return string The application name. An empty string if it couldn't be found. + */ + public function get_generator_name(): string { + $original = $this->get_data_from_original_attribute(); + + return ! empty( $original[0] ) && is_string( $original[0] ) ? trim( $original[0] ) : ''; + } + + /** + * Returns the reference to the version of the application that generated the file. + * + * @since 3.6 + * + * @return string The application version. An empty string if it couldn't be found or the name of the application. + * couldn't be found. + */ + public function get_generator_version(): string { + $original = $this->get_data_from_original_attribute(); + + return ! empty( $original[1] ) && is_string( $original[1] ) ? trim( $original[1] ) : ''; + } + + /** + * Returns the XML namespace. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_xml_namespace(): string { + return 'urn:oasis:names:tc:xliff:document:2.0'; + } + + /** + * Returns the Xpath to the translation entry's type attribute. + * + * @since 3.6 + * + * @param string $type The type of content to import. + * @return string + */ + protected function get_translation_entry_type_xpath( string $type ): string { + return sprintf( '//ns:group[@type="x:%s"]', $type ); + } + + /** + * Returns the name of the XML attribute used to store the translation entry's ID. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_translation_entry_id_xml_attr_name(): string { + return 'name'; + } + + /** + * Returns the name of the XML attribute used to store custom data. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_data_xml_attr_name(): string { + return PLL_Xliff_Export_21::EXTRA_DATA_PROP_NAME; + } + + /** + * Returns the name of the "unit" tag. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_unit_tag_name(): string { + return 'unit'; + } + + /** + * Returns the Xpath to the target language. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + protected function get_target_language_xpath(): string { + return '//ns:xliff/@trgLang'; + } + + /** + * Creates an entry and fills it from trans unit. + * + * @since 3.6 + * + * @param DOMElement $trans_unit A trans unit node. + * @return array { + * string $context The context. + * string $id The optional ID. + * string $singular The singular. + * string $translations The translations. + * } + */ + protected function populate_entry_from_trans_unit( DOMElement $trans_unit ): array { + $context = array( Context::FIELD => trim( $trans_unit->getAttribute( 'type' ), 'x:' ) ); + if ( $trans_unit->hasAttribute( 'name' ) ) { + $context[ Context::ID ] = $trans_unit->getAttribute( 'name' ); + } + $entry = array( 'context' => Context::to_string( $context ) ); + + $segment = $trans_unit->getElementsByTagName( 'segment' )->item( 0 ); + if ( ! $segment instanceof DOMElement || empty( $segment->nodeValue ) ) { + return $entry; + } + + return array_merge( $entry, $this->get_singular_and_translations_for_entry( $segment ) ); + } + + /** + * Returns data from the original attribute. + * + * @since 3.6 + * + * @return array { + * An array containing the file origin data. + * + * @type string Generator name. + * @type string Generator version. + * @type string Site reference. + * } + */ + private function get_data_from_original_attribute(): array { + $original_list = $this->xpath->query( '//ns:file/@original' ); + if ( ! $original_list ) { + return array(); + } + + $original_item = $original_list->item( 0 ); + if ( ! $original_item ) { + return array(); + } + + $original = $original_item->nodeValue; + if ( ! $original ) { + return array(); + } + + $original = explode( '|', $original ); + return count( $original ) === 3 ? $original : array(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-base.php b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-base.php new file mode 100644 index 0000000..e3b04c9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import-parser-base.php @@ -0,0 +1,338 @@ +xpath = new DOMXPath( $document ); + $this->xpath->registerNamespace( 'ns', $this->get_xml_namespace() ); + + $types = array( + PLL_Import_Export::TYPE_TERM, + PLL_Import_Export::TYPE_POST, + PLL_Import_Export::STRINGS_TRANSLATIONS, + ); + + foreach ( $types as $type ) { + $item = $this->xpath->query( $this->get_translation_entry_type_xpath( $type ) ); + if ( ! empty( $item ) && $item->length ) { + $this->iterators[ $type ] = new PLL_DOM_Nodes_Iterator( $item ); + } + } + + return (bool) array_filter( $this->iterators ); + } + + /** + * Returns the next term, post or string translation to import. + * + * @since 3.1 + * + * @return array { + * string $type Either 'post', 'term' or 'string_translations' + * int $id ID of the object in the database (if applicable) + * Translations $data Objects holding all the retrieved Translations + * } + */ + public function get_next_entry(): array { + if ( empty( $this->iterators ) ) { + return array(); + } + + foreach ( $this->iterators as $iterator_type => $iterator ) { + if ( $iterator->valid() ) { + $item = $iterator->current(); + if ( empty( $item ) ) { + return array(); + } + + $iterator->next(); + return $this->create_translation_entry( $item, $iterator_type ); + } + } + + return array(); + } + + /** + * Creates the `Translations` object. + * And then returns it in an array with additional data. + * + * @since 3.3 + * + * @param DOMNode $item The current element. + * @param string $type The object type. + * @return array { + * string $type Either 'post', 'term' or 'string_translations' + * int $id ID of the object in the database (if applicable) + * Translations $data Objects holding all the retrieved Translations + * } + */ + protected function create_translation_entry( DOMNode $item, string $type ): array { + $translations = new Translations(); + + if ( ! $item instanceof DOMElement ) { + return array(); + } + + $this->add_child_units( $item, $translations ); + + return array( + 'type' => $type, + 'id' => (int) $item->getAttribute( $this->get_translation_entry_id_xml_attr_name() ), + 'data' => $translations, + ); + } + + /** + * Returns an entry array with singular and translations from node. + * + * @since 3.6 + * + * @param DOMElement $node The current node. + * @return array { + * string $singular The singular. + * string $translations The translations. + * } + */ + protected function get_singular_and_translations_for_entry( DOMElement $node ): array { + $entry = array(); + + if ( $node->getElementsByTagName( 'source' )->item( 0 ) instanceof DOMElement ) { + $entry['singular'] = $node->getElementsByTagName( 'source' )->item( 0 )->nodeValue; + } + + if ( $node->getElementsByTagName( 'target' )->item( 0 ) instanceof DOMElement ) { + $entry['translations'] = array( $node->getElementsByTagName( 'target' )->item( 0 )->nodeValue ); + } + + return $entry; + } + + /** + * Returns the target language. + * + * @since 3.1 + * + * @return string|false + */ + public function get_target_language() { + $target_lang_list = $this->xpath->query( $this->get_target_language_xpath() ); + if ( ! $target_lang_list ) { + return false; + } + + $target_lang = $target_lang_list->item( 0 ); + if ( ! $target_lang ) { + return false; + } + + if ( ! $target_lang->nodeValue ) { + return false; + } + return $target_lang->nodeValue; + } + + /** + * Returns the site reference. + * + * @since 3.1 + * + * @return string + */ + abstract public function get_site_reference(): string; + + /** + * Returns the reference to the name of the application that generated the file. + * + * @since 3.3 + * + * @return string The application name. An empty string if it couldn't be found. + */ + abstract public function get_generator_name(): string; + + /** + * Returns the reference to the version of the application that generated the file. + * + * @since 3.3 + * + * @return string The application version. An empty string if it couldn't be found or the name of the application. + * couldn't be found. + */ + abstract public function get_generator_version(): string; + + /** + * Returns the XML namespace. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + abstract protected function get_xml_namespace(): string; + + /** + * Returns the Xpath to the translation entry's type attribute. + * + * @since 3.6 + * + * @param string $type The type of content to import. + * @return string + */ + abstract protected function get_translation_entry_type_xpath( string $type ): string; + + /** + * Returns the name of the XML attribute used to store the translation entry's ID. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + abstract protected function get_translation_entry_id_xml_attr_name(): string; + + /** + * Returns the name of the XML attribute used to store custom data. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + abstract protected function get_data_xml_attr_name(): string; + + /** + * Returns the name of the "unit" tag. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + abstract protected function get_unit_tag_name(): string; + + /** + * Returns the Xpath to the target language. + * + * @since 3.6 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + abstract protected function get_target_language_xpath(): string; + + /** + * Creates an entry and fills it from trans unit. + * + * @since 3.6 + * + * @param DOMElement $trans_unit A trans unit node. + * @return array { + * string $context The context. + * string $id The optional ID. + * string $singular The singular. + * string $translations The translations. + * } + */ + abstract protected function populate_entry_from_trans_unit( DOMElement $trans_unit ): array; + + /** + * Adds translation entries from the XML tree to the given translation entry object. + * + * @since 3.6 + * + * @param DOMElement $item A node that may contain `trans-unit` and `group` child nodes. + * @param Translations $translations A translation entry object. + * @param array $args { + * Optional arguments. + * + * @type string $encoding Encoding format for all of the `trans-unit` direct child nodes. + * } + * @return void + */ + private function add_child_units( DOMElement $item, Translations $translations, array $args = array() ) { + foreach ( $item->childNodes as $trans_unit ) { + if ( ! $trans_unit instanceof DOMElement ) { + continue; + } + + if ( 'group' === $trans_unit->nodeName ) { + // Encoding group. + $extradata = sprintf( + ';%s;', // `;` is used as separator in case we need to store more data. + $trans_unit->getAttribute( $this->get_data_xml_attr_name() ) + ); + + if ( ! preg_match( '/;\s*encoding:\s*(?[^\s]+)\s*;/', $extradata, $matches ) ) { + continue; + } + + $this->add_child_units( + $trans_unit, + $translations, + array_merge( $args, array( 'encoding' => $matches['encoding'] ) ) + ); + continue; + } + + if ( $this->get_unit_tag_name() !== $trans_unit->nodeName ) { + continue; + } + + $entry = $this->populate_entry_from_trans_unit( $trans_unit ); + + if ( ! empty( $args['encoding'] ) ) { + $entry['context'] = Context::to_string( + array_merge( + Context::to_array( $entry['context'] ), + array( Context::ENCODING => $args['encoding'] ) + ) + ); + } + + $translations->add_entry( $entry ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import.php b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import.php new file mode 100644 index 0000000..62156ba --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/import-export/xliff/xliff-import.php @@ -0,0 +1,195 @@ +get_parser( $file_contents ); + + if ( is_wp_error( $parser ) ) { + return $parser; + } + + $this->parser = $parser; + + $document = PLL_DOM_Document::from_xml( $file_contents ); + if ( $document->has_errors() || ! $this->parser->parse_xml( $document ) ) { + return new WP_Error( + 'pll_import_xml_error', + __( 'An error occurred during the import, please make sure your file is correctly formatted.', 'polylang-pro' ) + ); + } + + return true; + } + + /** + * Gets the next term, post or string translations to import. + * + * @since 3.1 + * + * @return array { + * string $type Either 'post', 'term' or 'string_translations' + * int $id ID of the object in the database (if applicable) + * Translations $data Objects holding all the retrieved Translations + * } + */ + public function get_next_entry(): array { + if ( empty( $this->parser ) ) { + return array(); + } + return $this->parser->get_next_entry(); + } + + /** + * Gets target language. + * + * @since 3.1 + * + * @return string|false + */ + public function get_target_language() { + if ( empty( $this->parser ) ) { + return ''; + } + return $this->parser->get_target_language(); + } + + /** + * Gets site reference. + * + * @since 3.1 + * + * @return string + */ + public function get_site_reference(): string { + if ( empty( $this->parser ) ) { + return ''; + } + return $this->parser->get_site_reference(); + } + + /** + * Returns the reference to the name of the application that generated the file. + * + * @since 3.3 + * + * @return string The application name. An empty string if it couldn't be found. + */ + public function get_generator_name(): string { + if ( empty( $this->parser ) ) { + return ''; + } + return $this->parser->get_generator_name(); + } + + /** + * Returns the reference to the version of the application that generated the file. + * + * @since 3.3 + * + * @return string The application version. An empty string if it couldn't be found or the name of the application. + * couldn't be found. + */ + public function get_generator_version(): string { + if ( empty( $this->parser ) ) { + return ''; + } + return $this->parser->get_generator_version(); + } + + /** + * Returns the xliff version read in the uploaded file. + * + * @since 3.6 + * + * @param string $content Full xliff content. + * @return string Xliff version gotten from the xliff content. + */ + private function get_xliff_version( string $content ): string { + // Get the xliff version in the beginning of the uploaded file to choose which parser to use. + preg_match( '@]*\s)?version\s*=\s*"\s*(\d+(?:.\d+)?)\s*"@', substr( $content, 0, 1024 ), $matched_version ); + + return $matched_version[1] ?? ''; + } + + /** + * Returns the xliff parser depending on the xliff version. + * + * @since 3.6 + * + * @param string $content Full xliff content. + * @return PLL_Xliff_Import_Parser_Base|WP_Error Xliff major version. + */ + private function get_parser( string $content ) { + $version = $this->get_xliff_version( $content ); + + if ( in_array( $version, self::SUPPORTED_VERSIONS_1, true ) ) { + return new PLL_Xliff_Import_Parser_12(); + } + + if ( in_array( $version, self::SUPPORTED_VERSION_2, true ) ) { + return new PLL_Xliff_Import_Parser_21(); + } + + return new WP_Error( + 'pll_import_unsupported_xliff_version', + /* translators: %s is a list of versions. */ + __( 'The xliff version is not supported.', 'polylang-pro' ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/locale-fallback/load.php b/wp-content/plugins/polylang-pro/src/modules/locale-fallback/load.php new file mode 100644 index 0000000..f833516 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/locale-fallback/load.php @@ -0,0 +1,11 @@ +locale_fallback = new PLL_Locale_Fallback(); +add_action( 'pll_init', array( $polylang->locale_fallback, 'init' ) ); diff --git a/wp-content/plugins/polylang-pro/src/modules/locale-fallback/locale-fallback.php b/wp-content/plugins/polylang-pro/src/modules/locale-fallback/locale-fallback.php new file mode 100644 index 0000000..b136928 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/locale-fallback/locale-fallback.php @@ -0,0 +1,246 @@ +model = &$polylang->model; + + add_filter( 'load_textdomain_mofile', array( $this, 'load_file' ) ); + add_filter( 'load_script_translation_file', array( $this, 'load_file' ) ); + add_filter( 'lang_dir_for_domain', array( $this, 'get_lang_dir_for_domain' ), 10, 3 ); + + add_action( 'pll_language_add_form_fields', array( $this, 'add_language_form_fields' ) ); + add_action( 'pll_language_edit_form_fields', array( $this, 'edit_language_form_fields' ) ); + + add_filter( 'pll_language_metas', array( $this, 'add_locale_fallback_to_language_metas' ), 10, 2 ); + + // Updates plugins and themes translations files. + add_filter( 'themes_update_check_locales', array( $this, 'update_check_locales' ) ); + add_filter( 'plugins_update_check_locales', array( $this, 'update_check_locales' ) ); + } + + /** + * Adds the locale fallbacks to the language data. + * + * @since 3.4 + * + * @param mixed[] $add_data Data to add. + * @param mixed[] $args { + * Arguments used to create the language. + * + * @type string $name Language name (used only for display). + * @type string $slug Language code (ideally 2-letters ISO 639-1 language code). + * @type string $locale WordPress locale. If something wrong is used for the locale, the .mo files will + * not be loaded... + * @type int $rtl 1 if rtl language, 0 otherwise. + * @type int $term_group Language order when displayed. + * @type int $lang_id Optional, ID of the language to modify. An empty value means the language is + * being created. + * @type string $flag Optional, country code, {@see /polylang/src/settings/flags.php}. + * } + * @return mixed[] + */ + public function add_locale_fallback_to_language_metas( $add_data, $args ) { + if ( empty( $args['fallback'] ) || ! is_string( $args['fallback'] ) ) { + // Empty new fallbacks. + $new_fallbacks = array(); + } else { + $new_fallbacks = array_unique( array_map( 'trim', explode( ',', $args['fallback'] ) ) ); + $new_fallbacks = array_diff( $new_fallbacks, array( $args['locale'] ) ); // Prevents including the main locale in the fallbacks. + } + + $add_data['fallbacks'] = array(); + + foreach ( $new_fallbacks as $fallback ) { + // Keep only valid locales. + // @TODO Display an error message. + if ( ! preg_match( '#' . Languages::LOCALE_PATTERN . '#', $fallback ) ) { + continue; + } + + /** @var non-empty-string $fallback */ + $add_data['fallbacks'][] = $fallback; + + if ( current_user_can( 'install_languages' ) ) { + require_once ABSPATH . 'wp-admin/includes/translation-install.php'; + wp_download_language_pack( $fallback ); + } + } + + return $add_data; + } + + /** + * Attempts to load the translation in the fallback locale if it doesn't exist in the current locale. + * + * This method is used for translations loaded with `load_textdomain()` and `load_script_textdomain()`. + * + * @since 2.9 + * + * @param string|false $file Translation file name. + * @return string|false + */ + public function load_file( $file ) { + if ( empty( $file ) || ! is_string( $file ) ) { + return $file; + } + + $locale = is_admin() ? get_user_locale() : get_locale(); + + if ( empty( $locale ) ) { + return $file; + } + + $language = $this->model->get_language( $locale ); + + if ( empty( $language ) || empty( $language->fallbacks ) ) { + return $file; + } + + if ( is_readable( $file ) ) { + return $file; + } + + $parts = pathinfo( $file ); + + if ( empty( $parts['extension'] ) || ( 'mo' !== $parts['extension'] && 'json' !== $parts['extension'] ) ) { + return $file; + } + + if ( 'mo' === $parts['extension'] && is_readable( substr_replace( $file, '.l10n.php', - strlen( ".{$parts['extension']}" ) ) ) ) { + return $file; + } + + $locale = preg_quote( $locale, '@' ); + + foreach ( $language->fallbacks as $fallback ) { + if ( empty( $fallback ) || ! is_string( $fallback ) ) { + continue; + } + + if ( 'mo' === $parts['extension'] ) { + // Matches "fr_FR.mo" and "foobar-fr_FR.mo". + $pattern = "@^(.+-)?{$locale}(\.mo)$@"; + } else { + // Matches "fr_FR-md5hash.json" and "foobar-fr_FR-md5hash.json". + $pattern = "@^(.+-)?{$locale}(-[0-9a-f]{32}\.json)$@"; + } + + $_file = $parts['dirname'] . '/' . preg_replace( $pattern, "\$1{$fallback}\$2", $parts['basename'] ); + + if ( is_readable( $_file ) ) { + return $_file; + } + } + + return $file; + } + + + /** + * Returns the languages directory path for a specific domain and locale. + * + * This method is used for translations loaded with `_load_textdomain_just_in_time()`. + * + * @since 3.6.3 + * + * @param string|false $path Languages directory path for the given domain and locale. + * @param string $domain Text domain. + * @param string $locale Locale. + * + * @return string|false Languages directory path or false if there is none available. + */ + public function get_lang_dir_for_domain( $path, $domain, $locale ) { + /** @var WP_Textdomain_Registry */ + global $wp_textdomain_registry; + + static $once = array(); + + $once[ "$domain|$locale" ] = true; + + $language = $this->model->get_language( $locale ); + if ( empty( $language ) || empty( $language->fallbacks ) ) { + return $path; + } + + foreach ( $language->fallbacks as $fallback ) { + if ( ! empty( $once[ "$domain|$fallback" ] ) ) { // Prevent an infinite loop if we already attempted to load this translation. + continue; + } + + $path = $wp_textdomain_registry->get( $domain, $fallback ); + + if ( ! empty( $path ) ) { + return $path; + } + } + + unset( $once[ "$domain|$locale" ] ); + + return $path; + } + + /** + * Outputs the locale fallbacks when editing a language. + * + * @since 2.9 + * + * @param PLL_Language $edit_lang Language being edited. + * @return void + */ + public function edit_language_form_fields( $edit_lang ) { + $fallbacks_list = empty( $edit_lang->fallbacks ) ? '' : implode( ',', $edit_lang->fallbacks ); + include __DIR__ . '/view-locale-fallback.php'; + } + + /** + * Outputs an empty locale fallbacks field when adding a language. + * + * @since 2.9 + * + * @return void + */ + public function add_language_form_fields() { + $fallbacks_list = ''; + include __DIR__ . '/view-locale-fallback.php'; + } + + /** + * Allows to update translations files for plugins and themes. + * + * @since 2.9 + * + * @param string[] $locales List of locales to update. + * @return string[] + */ + public function update_check_locales( $locales ) { + foreach ( $this->model->get_languages_list() as $language ) { + if ( ! empty( $language->fallbacks ) ) { + $locales = array_merge( $locales, $language->fallbacks ); + } + } + return array_unique( $locales ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/locale-fallback/view-locale-fallback.php b/wp-content/plugins/polylang-pro/src/modules/locale-fallback/view-locale-fallback.php new file mode 100644 index 0000000..1f942f4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/locale-fallback/view-locale-fallback.php @@ -0,0 +1,16 @@ + +
    + + +

    +
    diff --git a/wp-content/plugins/polylang-pro/src/modules/media/admin-advanced-media.php b/wp-content/plugins/polylang-pro/src/modules/media/admin-advanced-media.php new file mode 100644 index 0000000..82a3e6a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/media/admin-advanced-media.php @@ -0,0 +1,131 @@ +options = $polylang->options; + $this->model = &$polylang->model; + + add_action( 'pll_bulk_translate_options_init', array( $this, 'add_bulk_translate_options' ) ); + + if ( ! empty( $this->options['media']['duplicate'] ) ) { + add_filter( 'wp_insert_attachment_data', array( $this, 'attachment_data' ), 10, 2 ); + add_action( 'add_attachment', array( $this, 'duplicate_media' ), 20 ); // After Polylang. + } + } + + /** + * Registers options of the Translate bulk action. + * + * @since 3.6.5 + * + * @param PLL_Bulk_Translate $bulk_translate Instance of `PLL_Bulk_Translate`. + * @return void + */ + public function add_bulk_translate_options( $bulk_translate ): void { + $bulk_translate->register_options( + array( + new PLL_Media_Bulk_Option( + array( + 'name' => 'pll_copy_media', + 'description' => __( 'Copy original items to selected languages', 'polylang-pro' ), + ), + $this->model + ), + ) + ); + } + + /** + * Disables the duplication if we are uploading a plugin or theme. + * + * @since 3.0 + * + * @param array $data An array of slashed, sanitized, and processed attachment post data, unused. + * @param array $postarr An array of slashed and sanitized attachment post data, but not processed. + * @return array Unmodified $data. + */ + public function attachment_data( $data, $postarr ) { + if ( 'upgrader' === $postarr['context'] ) { + add_filter( 'pll_enable_duplicate_media', '__return_false' ); + } + return $data; + } + + /** + * Creates media translations each time a new media is uploaded + * + * @since 1.9 + * + * @param int $post_id The id of the attachment to duplicate. + * @return void + */ + public function duplicate_media( $post_id ) { + static $avoid_recursion = false; + + // Avoid recursion and bails if adding a translation from PLL_Admin_Filters_Media::translate_media(). + if ( $avoid_recursion || doing_action( 'admin_init' ) ) { + return; + } + + /** + * Filters whether to enable the media duplication + * + * @since 2.1.1 + * + * @param bool $enable Whether to enable the media duplication. Defaults to true. + * @param int $post_id Media id. + */ + if ( ! apply_filters( 'pll_enable_duplicate_media', true, $post_id ) ) { + return; + } + + require_once ABSPATH . 'wp-admin/includes/media.php'; // Needed when uploading audio or video files from the block editor. + $avoid_recursion = true; + + $src_language = $this->model->post->get_language( $post_id ); + + if ( ! empty( $src_language ) ) { + // Don't attempt to create already existing translations (useful in case the function is reused). + $languages = array_diff( $this->model->get_languages_list( array( 'fields' => 'slug' ) ), array_keys( $this->model->post->get_translations( $post_id ) ) ); + + foreach ( $languages as $lang ) { + $tr_id = $this->model->post->create_media_translation( $post_id, $lang ); + + if ( ! empty( $tr_id ) ) { + $post = get_post( $tr_id ); + wp_maybe_generate_attachment_metadata( $post ); + } + } + } + + $avoid_recursion = false; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/media/load.php b/wp-content/plugins/polylang-pro/src/modules/media/load.php new file mode 100644 index 0000000..e89495e --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/media/load.php @@ -0,0 +1,37 @@ +model->has_languages() ) { + add_filter( + 'pll_settings_modules', + function ( $modules ) { + $k = array_search( 'PLL_Settings_Media', $modules, true ); + if ( $k ) { + $modules[ $k ] = 'PLL_Settings_Advanced_Media'; + } + return $modules; + }, + 0 + ); + + add_action( + 'pll_init', + function ( $polylang ) { + if ( $polylang->options['media_support'] ) { + if ( $polylang instanceof PLL_Admin ) { + require_once POLYLANG_PRO_DIR . '/src/modules/bulk-translate/load.php'; + } + + if ( $polylang instanceof PLL_Admin || $polylang instanceof PLL_REST_Request ) { + $polylang->advanced_media = new PLL_Admin_Advanced_Media( $polylang ); + } + } + } + ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/media/media-bulk-option.php b/wp-content/plugins/polylang-pro/src/modules/media/media-bulk-option.php new file mode 100644 index 0000000..b90b55f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/media/media-bulk-option.php @@ -0,0 +1,37 @@ +base && current_user_can( 'upload_files' ); + } + + + /** + * Duplicates a media object + * + * @since 2.7 + * + * @param int $object_id The media id. + * @param string $lang A language locale. + * @return void + */ + public function translate( $object_id, $lang ) { + $this->model->post->create_media_translation( $object_id, $lang ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/media/settings-advanced-media.php b/wp-content/plugins/polylang-pro/src/modules/media/settings-advanced-media.php new file mode 100644 index 0000000..09c996c --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/media/settings-advanced-media.php @@ -0,0 +1,77 @@ + 'advanced_media', + 'title' => __( 'Media', 'polylang-pro' ), + 'description' => __( 'Activate languages and translations for media. Provides options for multilingual media management.', 'polylang-pro' ), + 'active_option' => 'media_support', + ) + ); + } + + /** + * Displays the settings form + * + * @since 1.9 + * + * @return void + */ + protected function form() { + printf( + '', + checked( empty( $this->options['media']['duplicate'] ), false, false ), + esc_html__( 'Automatically duplicate media in all languages when uploading a new file.', 'polylang-pro' ) + ); + } + + /** + * Prepare the received data before saving. + * + * @since 3.7 + * + * @param array $options Raw values to save. + * @return array + */ + protected function prepare_raw_data( array $options ): array { + $newoptions = array( 'media' => array( 'duplicate' => ! empty( $options['media']['duplicate'] ) ? 1 : 0 ) ); + return $newoptions; // Take care to return only validated options. + } + + /** + * Get the row actions + * + * @since 1.9 + * + * @return string[] + */ + protected function get_actions() { + return empty( $this->options['media_support'] ) ? array( 'activate' ) : array( 'configure', 'deactivate' ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/module-build.php b/wp-content/plugins/polylang-pro/src/modules/module-build.php new file mode 100644 index 0000000..37717aa --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/module-build.php @@ -0,0 +1,28 @@ +model = $rest_api->model; + $this->request = $rest_api->request; + $this->content_types = $content_types; + + foreach ( $content_types as $content_type ) { + add_filter( "rest_{$content_type}_collection_params", array( $this, 'collection_params' ) ); + } + } + + /** + * Exposes the 'lang' param for posts and terms + * + * @since 2.2 + * + * @param array $query_params JSON Schema-formatted collection parameters. + * @return array + */ + public function collection_params( $query_params ) { + $query_params['lang'] = array( + 'description' => __( 'Limit results to a specific language. By default, results are not filtered by language.', 'polylang-pro' ), + 'type' => 'string', + 'enum' => array_merge( array( '' ), $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ), + 'default' => '', + ); + return $query_params; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Comment.php b/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Comment.php new file mode 100644 index 0000000..d418989 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Comment.php @@ -0,0 +1,45 @@ +request->get_language(); + if ( ! empty( $lang ) && in_array( $lang->slug, $this->model->get_languages_list( array( 'fields' => 'slug' ) ), true ) ) { + $query->query_vars['lang'] = $lang->slug; + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Post.php b/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Post.php new file mode 100644 index 0000000..537eaeb --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Post.php @@ -0,0 +1,74 @@ +can_filter_query( $query ) ) { + $lang = $this->request->get_language(); + if ( empty( $lang ) ) { + return; + } + $pll_query = new PLL_Query( $query, $this->model ); + $pll_query->query->set( 'lang', $lang->slug ); // Set query vars "lang" with the REST parameter value; fix #405 and #384 + $pll_query->filter_query( $lang ); // fix #493 + } + } + + /** + * Tells whether or not the given query is filterable by language. + * + * @since 3.2 + * @since 3.8 Moved from PLL_REST_Post. + * + * @param WP_Query $query The query to check. + * @return bool True if filterable by language. False if the query is already filtered, + * no language has been passed in the request or the post type is not supported. + */ + private function can_filter_query( $query ) { + if ( ! $this->request->is_read_only() ) { + // Don't filter by language during an edition request or if there is no request. + return false; + } + + $query_post_types = ! empty( $query->query['post_type'] ) ? (array) $query->query['post_type'] : array( 'post' ); + $allowed_queried_post_types = array_intersect( $query_post_types, $this->content_types ); + + return empty( $query->get( 'lang' ) ) && ! empty( $this->request->get_language() ) && ! empty( $allowed_queried_post_types ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Template.php b/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Template.php new file mode 100644 index 0000000..43c6c8c --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Template.php @@ -0,0 +1,189 @@ +query_vars['post_name__in'] ) && is_array( $query->query_vars['post_name__in'] ) ) { + // Do not filter query for a single item. + return; + } + + if ( isset( $query->query_vars['lang'] ) && empty( $query->query_vars['lang'] ) ) { + // We've been asking not to filter by language. + return; + } + + if ( ! PLL_FSE_Tools::is_template_query( $query ) ) { + // Not a template part query. + return; + } + + // Filter a templates list query by the default language. + $lang = $this->request->get_language(); + if ( empty( $lang ) ) { + $lang = $this->model->get_default_language(); + } + + if ( empty( $lang ) ) { + return; + } + + // Since it's a template part query, take care of the ones stored as files with the next hook. + add_filter( 'get_block_templates', array( $this, 'filter_template_part_list' ), 10, 3 ); + + $pll_query = new PLL_Query( $query, $this->model ); + $pll_query->set_language( $lang ); + $pll_query->filter_query( $lang ); + } + + /** + * Filters template part list according to the REST request parameters. + * Filtering by language is already done on a `WP_Query` level, see {`self::parse_query()`}. + * + * @since 3.3.2 + * @since 3.8 Moved from PLL_FSE_REST_Template. + * + * @param WP_Block_Template[] $templates Array of found block templates. + * @param array $query Arguments to retrieve templates. + * @param string $template_type 'wp_template' or 'wp_template_part'. + * @return WP_Block_Template[] Array of filtered block templates. + */ + public function filter_template_part_list( $templates, $query, $template_type ) { + if ( isset( $query['wp_id'] ) ) { + return $templates; + } + + if ( 'wp_template_part' !== $template_type ) { + return $templates; + } + + $lang = $this->request->get_language(); + + if ( empty( $lang ) ) { + return $templates; + } + + $with_untranslated = $this->request->get_param( 'include_untranslated' ); + + if ( ! empty( $with_untranslated ) ) { + $templates = array_merge( $templates, $this->get_untranslated_template_parts( $lang ) ); + } + + return $this->remove_unwanted_template_part_files( $templates, $lang ); + } + + /** + * Filters out template part files if they are already existing translations of them in the list. + * + * @since 3.3.2 + * @since 3.8 Moved from PLL_FSE_REST_Template. + * + * @param WP_Block_Template[] $templates Array of found block templates. + * @param PLL_Language $current_lang Current language object. + * @return WP_Block_Template[] Array of filtered block templates. + */ + private function remove_unwanted_template_part_files( array $templates, PLL_Language $current_lang ) { + $templates_to_remove = array(); + + // First, let's find template part objects with a language. + foreach ( $templates as $template ) { + $template_slug = new PLL_FSE_Template_Slug( + $template->slug, + array( $current_lang->slug ) + ); + + if ( ! empty( $template->wp_id ) && ! empty( $this->model->post->get_language( $template->wp_id ) ) ) { + // Current template is custom and has a language. + $templates_to_remove[] = $template_slug->get_template_slug(); + } + } + + // Then remove duplicates stored as files. + foreach ( $templates as $i => $template ) { + if ( empty( $template->wp_id ) && in_array( $template->slug, $templates_to_remove, true ) ) { + // Duplicated template part stored in a file. + unset( $templates[ $i ] ); + continue; + } + } + + return $templates; + } + + /** + * Returns template parts without translation in the given language. + * + * @since 3.3.2 + * @since 3.8 Moved from PLL_FSE_REST_Template. + * + * @param PLL_Language $lang The language to check against. + * @return WP_Block_Template[] Array of block template parts objects. + */ + private function get_untranslated_template_parts( PLL_Language $lang ) { + $def_lang = $this->model->get_default_language(); + + if ( empty( $def_lang ) ) { + // No default language. + return array(); + } + + if ( $lang->slug === $def_lang->slug ) { + // Untranslated template parts are not available for the default language. + return array(); + } + + $untranslated_posts = $this->model->post->get_untranslated( 'wp_template_part', $lang, $def_lang ); + $untranslated_template_parts = array(); + + foreach ( $untranslated_posts as $untranslated_post ) { + $untranslated_template_part = _build_block_template_result_from_post( $untranslated_post ); + + if ( is_wp_error( $untranslated_template_part ) ) { + continue; + } + + $untranslated_template_parts[] = $untranslated_template_part; + } + + return $untranslated_template_parts; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Term.php b/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Term.php new file mode 100644 index 0000000..53be8bc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Filtered/Term.php @@ -0,0 +1,52 @@ +request->get_language(); + if ( ! empty( array_intersect( $args['taxonomy'] ?? array(), $this->content_types ) ) && ! empty( $lang ) && in_array( $lang->slug, $this->model->get_languages_list( array( 'fields' => 'slug' ) ), true ) ) { + $args['lang'] = $lang->slug; + } + + return $args; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Translatable/Abstract_object.php b/wp-content/plugins/polylang-pro/src/modules/rest/Translatable/Abstract_object.php new file mode 100644 index 0000000..0111142 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Translatable/Abstract_object.php @@ -0,0 +1,201 @@ +model = $rest_api->model; + $this->request = $rest_api->request; + $this->links = &$rest_api->links; + + foreach ( $content_types as $type ) { + $this->register_rest_field( $type ); + } + } + + /** + * Returns the current object type, e.g. 'post' or 'term'. + * + * @since 3.8 + * + * @return string + */ + abstract protected function get_type(): string; + + /** + * Returns the database identifier for the item. + * + * @since 3.8 + * + * @param array|object $item Item array or object, usually a post or term. + * @return int The database identifier, 0 if not found. + */ + abstract protected function get_db_id( $item ): int; + + /** + * Returns the object language. + * + * @since 2.2 + * + * @param array $object Post or Term array. + * @return string|false Language slug. False if no language is assigned to the object. + */ + public function get_language( $object ) { + $language = $this->model->{$this->get_type()}->get_language( $this->get_rest_id( $object ) ); + return empty( $language ) ? false : $language->slug; + } + + /** + * Sets the object language. + * + * @since 2.2 + * + * @param string $lang Language code. + * @param object $object Instance of WP_Post or WP_Term. + * @return bool|\WP_Error True or false when setting the language, WP_Error on failure. + */ + public function set_language( $lang, $object ) { + $language = $this->get_language_with_permission( $lang ); + if ( is_wp_error( $language ) ) { + return $language; + } + + return $this->model->{$this->get_type()}->set_language( $this->get_db_id( $object ), $language ); + } + + /** + * Get the rest field type for a content type. + * + * @since 2.3.11 + * + * @param string $type Post type or taxonomy name. + * @return string REST API field type. + */ + protected function get_rest_field_type( $type ) { + return $type; + } + + /** + * Returns the REST identifier for the item. + * + * @since 3.8 + * + * @param array|object $item Item array or object, usually a post or term. + * @return int The REST identifier, 0 if not found. + */ + protected function get_rest_id( $item ): int { + if ( is_array( $item ) ) { + return $item['id'] ?? 0; + } + + return $item->id ?? 0; + } + + /** + * Register the language REST field. + * + * @since 3.8 + * + * @param string $type The type of the object. + * @return void + */ + protected function register_rest_field( string $type ): void { + register_rest_field( + $this->get_rest_field_type( $type ), + 'lang', + array( + 'get_callback' => array( $this, 'get_language' ), + 'update_callback' => array( $this, 'set_language' ), + 'schema' => $this->get_language_schema(), + ) + ); + } + + /** + * Returns the language object if the user has permission to set the language of the object. + * + * @since 3.8 + * + * @param string $language_slug Language slug from the request. + * @return \PLL_Language|\WP_Error Language object if the language is valid, WP_Error otherwise. + */ + protected function get_language_with_permission( $language_slug ) { + $language = $this->model->get_language( $language_slug ); + if ( ! $language ) { + return new WP_Error( + 'rest_invalid_language_code', + __( 'Invalid language code.', 'polylang-pro' ), + array( 'status' => 400 ) + ); + } + + if ( ! Capabilities::get_user()->can_translate( $language ) ) { + return new WP_Error( + 'rest_cannot_set_language', + /* translators: %s is a native language name. */ + sprintf( __( 'You are not allowed to set the language of this item to %s.', 'polylang-pro' ), $language->name ), + array( 'status' => 403 ) + ); + } + + return $language; + } + + /** + * Returns the schema for the language REST field. + * + * @since 3.8 + * + * @return array JSON schema. + */ + private function get_language_schema(): array { + return array( + 'description' => __( 'Language of the item', 'polylang-pro' ), + 'type' => 'string', + 'enum' => $this->model->languages->get_list( array( 'fields' => 'slug' ) ), + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Abstract_Object.php b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Abstract_Object.php new file mode 100644 index 0000000..6e0ba26 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Abstract_Object.php @@ -0,0 +1,118 @@ +model->{$this->get_type()}->get_translations( $this->get_rest_id( $object ) ); + } + + /** + * Save translations. + * + * @since 2.2 + * + * @param array $translations Array of translations with language codes as keys and object ids as values. + * @param object $object Instance of WP_Post or WP_Term. + * @return bool + */ + public function save_translations( $translations, $object ) { + $object_language = $this->model->{$this->get_type()}->get_language( $this->get_db_id( $object ) ); + + if ( ! $object_language ) { + return false; + } + + $expected = array_merge( + array( $object_language->slug => $this->get_db_id( $object ) ), + $translations + ); + + + $new_translations = $this->model->{$this->get_type()}->save_translations( $this->get_db_id( $object ), $translations ); + + /* Use loose comparison to avoid ordering issues */ + return $new_translations == $expected; // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual + } + + /** + * Register the language REST field. + * + * @since 3.8 + * + * @param string $type The type of the object. + * @return void + */ + protected function register_rest_field( string $type ): void { + parent::register_rest_field( $type ); + + register_rest_field( + $this->get_rest_field_type( $type ), + 'translations', + array( + 'get_callback' => array( $this, 'get_translations' ), + 'update_callback' => array( $this, 'save_translations' ), + 'schema' => $this->get_translations_schema(), + ) + ); + } + + /** + * Returns the schema for the translations REST field. + * + * @since 3.8 + * + * @return array JSON schema. + */ + private function get_translations_schema(): array { + return array( + 'description' => __( 'Translations of the item.', 'polylang-pro' ), + 'type' => 'object', + 'properties' => array_fill_keys( + $this->model->get_languages_list( array( 'fields' => 'slug' ) ), + array( + 'type' => 'integer', + 'minimum' => 1, + ) + ), + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Attachment.php b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Attachment.php new file mode 100644 index 0000000..f994d65 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Attachment.php @@ -0,0 +1,52 @@ +request->get_id(); + if ( empty( $id ) || (int) $post_id === $id ) { + return; + } + $lang = $this->model->post->get_language( $id ); + if ( ! empty( $lang ) ) { + $this->model->post->set_language( $post_id, $lang ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Post.php b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Post.php new file mode 100644 index 0000000..ea3856d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Post.php @@ -0,0 +1,194 @@ + $request + */ + public function prepare_response( $response, $post, $request ) { + global $wpdb; + + if ( ! in_array( $request->get_method(), array( 'POST', 'PUT', 'PATCH' ), true ) ) { + return $response; + } + + $data = $response->get_data(); + + if ( ! is_array( $data ) || empty( $data['slug'] ) ) { + return $response; + } + + $params = $request->get_params(); + $attributes = $request->get_attributes(); + + if ( ! empty( $params['slug'] ) ) { + $requested_slug = $params['slug']; + } elseif ( is_array( $attributes['callback'] ) && 'create_item' === $attributes['callback'][1] ) { + // Allow sharing slug by default when creating a new post. + $requested_slug = sanitize_title( $post->post_title ); + } + + if ( ! isset( $requested_slug ) || $post->post_name === $requested_slug ) { + return $response; + } + + $slug = wp_unique_post_slug( $requested_slug, $post->ID, $post->post_status, $post->post_type, $post->post_parent ); + + if ( $slug === $data['slug'] || ! $wpdb->update( $wpdb->posts, array( 'post_name' => $slug ), array( 'ID' => $post->ID ) ) ) { + return $response; + } + + $data['slug'] = $slug; + $response->set_data( $data ); + + return $response; + } + + /** + * Sets language and saves translations during REST requests. + * + * @since 3.4 + * + * @param mixed $result Response to replace the requested version with. + * @param WP_REST_Server $server Server instance. + * @param WP_REST_Request $request Request used to generate the response. + * @return mixed + * + * @phpstan-param WP_REST_Request $request + */ + public function save_language_and_translations( $result, $server, $request ) { + if ( ! current_user_can( 'edit_posts' ) || ! pll_is_edit_rest_request( $request ) || ! $this->is_save_post_request( $request ) ) { + return $result; + } + + $id = $request->get_param( 'id' ); + $lang = $request->get_param( 'lang' ); + $translations = $request->get_param( 'translations' ); + + if ( ! is_numeric( $id ) ) { + return $result; + } + + $post = get_post( (int) $id ); + if ( ! $post instanceof WP_Post ) { + return $result; + } + + if ( is_string( $lang ) ) { + $error = $this->set_language( $lang, $post ); + + if ( is_wp_error( $error ) ) { + return $error; + } + } + + if ( is_array( $translations ) ) { + $this->save_translations( $translations, $post ); + } + + return $result; + } + + /** + * Check if the request is a REST API post type request for saving + * + * @since 2.7.3 + * @since 3.4 $post_id parameter removed. + * + * @param WP_REST_Request $request Request used to generate the response. + * @return bool True if the request saves a post. + * + * @phpstan-param WP_REST_Request $request + */ + public function is_save_post_request( $request ) { + $post_type_rest_bases = wp_list_pluck( get_post_types( array( 'show_in_rest' => true ), 'objects' ), 'rest_base' ); + + // Some rest_base could be not defined and WordPress return false. The post type name is taken as rest_base. + $post_type_rest_bases = array_merge( + array_filter( $post_type_rest_bases ), // Get rest_base really defined. + array_keys( // Otherwise rest_base equals to the post type name. + array_filter( + $post_type_rest_bases, + function ( $value ) { + return ! $value; + } + ) + ) + ); + + // Pattern to verify the request route. + $post_type_pattern = '#(' . implode( '|', array_values( $post_type_rest_bases ) ) . ')/(?P[\d]+)#'; + return preg_match( "$post_type_pattern", $request->get_route() ) && 'PUT' === $request->get_method(); + } + + /** + * Returns the current object type, e.g. 'post'. + * + * @since 3.8 + * + * @return string + */ + protected function get_type(): string { + return 'post'; + } + + /** + * Returns the database identifier for the item. + * + * @since 3.8 + * + * @param array|object $item Item array or object, usually a post or term. + * @return int The database identifier, 0 if not found. + */ + protected function get_db_id( $item ): int { + if ( is_array( $item ) ) { + return $item['ID'] ?? 0; + } + + return $item->ID ?? 0; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Template.php b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Template.php new file mode 100644 index 0000000..30ef059 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Template.php @@ -0,0 +1,87 @@ +model->{$this->get_type()}->get_language( $this->get_rest_id( $object ) ); + + if ( ! empty( $language ) ) { + return $language->slug; + } + + $lang = $this->model->get_default_language(); + + if ( ! empty( $lang ) ) { + return $lang->slug; + } + + return false; + } + + /** + * Returns the REST identifier for the item. + * + * @since 3.8 + * + * @param array|object $item Item array or object, usually a post or term. + * @return int The REST identifier, 0 if not found. + */ + protected function get_rest_id( $item ): int { + if ( is_array( $item ) ) { + return $item['wp_id'] ?? 0; + } + + return $item->wp_id ?? 0; + } + + /** + * Returns the database identifier for the item. + * + * @since 3.8 + * + * @param array|object $item Item array or object, usually a post or term. + * @return int The database identifier, 0 if not found. + */ + protected function get_db_id( $item ): int { + if ( is_array( $item ) ) { + return $item['wp_id'] ?? 0; + } + + return $item->wp_id ?? 0; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Term.php b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Term.php new file mode 100644 index 0000000..9353ad1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/Translated/Term.php @@ -0,0 +1,138 @@ +model->is_translated_taxonomy( $taxonomy ) ) { + return $slug; + } + + $attributes = $this->request->get_attributes(); + if ( empty( $attributes ) ) { + return $slug; + } + + $callback = $attributes['callback']; + if ( ! is_array( $callback ) ) { + return $slug; + } + + $controller = $callback[0]; + if ( ! $controller instanceof WP_REST_Controller ) { + return $slug; + } + + $schema = $controller->get_item_schema(); + + if ( $schema['title'] !== $this->get_rest_field_type( $taxonomy ) ) { + return $slug; + } + + $lang = $this->request->get_language(); + $id = $this->request->get_id(); + if ( empty( $lang ) && ! empty( $id ) ) { // Update. + $post_lang = $this->model->term->get_language( $id ); + if ( ! empty( $post_lang ) ) { + $lang = $post_lang; + } + } + + if ( ! empty( $lang ) ) { + $parent = $this->request->get_param( 'parent' ); + $parent = is_numeric( $parent ) ? (int) $parent : 0; + $name = $this->request->get_param( 'name' ) ?? ''; + $new_slug = $this->request->get_param( 'slug' ) ?? ''; + + if ( empty( $new_slug ) && empty( $id ) && ! empty( $name ) && is_string( $name ) ) { + // The term is created without specifying the slug. + $slug = $name; + } elseif ( ! empty( $new_slug ) && is_string( $new_slug ) && false === strpos( $new_slug, '___' ) ) { + // The term is created or updated and the slug is specified. + $slug = $new_slug; + } + + if ( ! empty( $slug ) && is_string( $slug ) && ! $this->model->term_exists_by_slug( $slug, $lang, $taxonomy, $parent ) ) { + $slug = sanitize_title( $slug . '___' . $lang->slug ); + } + } + + return $slug; + } + + /** + * Returns the current object type, e.g. 'term'. + * + * @since 3.8 + * + * @return string + */ + protected function get_type(): string { + return 'term'; + } + + /** + * Returns the database identifier for the item. + * + * @since 3.8 + * + * @param array|object $item Item array or object, usually a post or term. + * @return int The database identifier, 0 if not found. + */ + protected function get_db_id( $item ): int { + if ( is_array( $item ) ) { + return $item['term_id'] ?? 0; + } + + return $item->term_id ?? 0; + } + + /** + * Get the rest field type for a content type. + * + * @since 2.3.11 + * + * @param string $type Taxonomy name. + * @return string REST API field type. + */ + protected function get_rest_field_type( $type ) { + // Handles the specific case for tags + return 'post_tag' === $type ? 'tag' : $type; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/V1/Translation.php b/wp-content/plugins/polylang-pro/src/modules/rest/V1/Translation.php new file mode 100644 index 0000000..ce2e2a1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/V1/Translation.php @@ -0,0 +1,249 @@ +namespace = 'pll/v1'; + $this->rest_base = 'translation'; + $this->model = $polylang->model; + $this->sync_post_model = $polylang->sync_post_model; + } + + /** + * Registers the route. + * + * @since 3.8 + * + * @return void + */ + public function register_routes() { + register_rest_route( + $this->namespace, + "/{$this->rest_base}", + array( + array( + 'methods' => WP_REST_Server::CREATABLE, + 'callback' => array( $this, 'create_item' ), + 'permission_callback' => array( $this, 'create_item_permissions_check' ), + 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ), + ), + 'schema' => array( $this, 'get_public_item_schema' ), + 'allow_batch' => array( 'v1' => true ), + ) + ); + } + + /** + * Duplicates a post. + * + * @since 3.8 + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function create_item( $request ) { + /** @var WP_Post $from_post Ensured in `self::create_item_permissions_check()`. */ + $from_post = get_post( + $request->get_param( 'from_post' ) + ); + + if ( ! $from_post instanceof WP_Post ) { + return new WP_Error( + 'rest_post_invalid_id', + __( 'Invalid post ID.', 'polylang-pro' ), + array( 'status' => 404 ) + ); + } + + if ( ! $this->model->is_translated_post_type( $from_post->post_type ) ) { + return new WP_Error( + 'rest_invalid_param', + __( 'Invalid parameter: the post is not translatable.', 'polylang-pro' ), + array( 'status' => 400 ), + ); + } + + /** @var \PLL_Language $language Ensured by the JSON schema. */ + $language = $this->model->languages->get( + $request->get_param( 'lang' ) + ); + + $duplicated_post_id = $this->sync_post_model->copy( + $from_post->ID, + $language->slug + ); + + if ( empty( $duplicated_post_id ) ) { + return new WP_Error( + 'pll_rest_duplication_failed', + __( 'Failed to duplicate the post.', 'polylang-pro' ), + array( 'status' => 500 ) + ); + } + + /** @var WP_Post $duplicated_post */ + $duplicated_post = get_post( $duplicated_post_id ); + + return $this->prepare_item_for_response( + $duplicated_post, + $request + ); + } + + /** + * Checks if a user has permission to duplicate a post. + * + * @since 3.8 + * + * @param WP_REST_Request $request Full details about the request. + * @return bool True if the current user has permission, false otherwise. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function create_item_permissions_check( $request ) { + $language = $this->model->languages->get( $request->get_param( 'lang' ) ); + + if ( empty( $language ) ) { + return false; + } + + return current_user_can( 'edit_posts' ) + && current_user_can( 'read_post', $request->get_param( 'from_post' ) ) + && Capabilities::get_user()->can_translate( $language ); + } + + /** + * Retrieves an array of endpoint arguments from the item schema for the controller. + * + * @since 3.8 + * + * @param string $method The request method. + * @return array Endpoint arguments. + */ + public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) { + if ( WP_REST_Server::CREATABLE !== $method ) { + return array(); + } + + return parent::get_endpoint_args_for_item_schema( $method ); + } + + /** + * Retrieves the item schema for the controller. + * + * @since 3.8 + * + * @return array Item schema. + */ + public function get_item_schema(): array { + if ( $this->schema ) { + return $this->add_additional_fields_schema( $this->schema ); + } + + $this->schema = array( + '$schema' => 'http://json-schema.org/draft-04/schema#', + 'title' => 'translation', + 'type' => 'object', + 'properties' => array( + 'from_post' => array( + 'type' => 'integer', + 'required' => true, + 'description' => __( 'The ID of the post to translate.', 'polylang-pro' ), + ), + 'lang' => array( + 'type' => 'string', + 'enum' => $this->model->languages->get_list( array( 'fields' => 'slug' ) ), + 'required' => true, + 'description' => __( 'The language to translate the post to.', 'polylang-pro' ), + ), + 'action' => array( + 'type' => 'string', + 'enum' => array( 'duplicate' ), + 'required' => true, + 'description' => __( 'The action to perform.', 'polylang-pro' ), + ), + ), + ); + + return $this->add_additional_fields_schema( $this->schema ); + } + + /** + * Prepares an item for the response. + * + * @since 3.8 + * + * @param WP_Post $item The item to prepare. + * @param WP_REST_Request $request The request object. + * @return WP_REST_Response|WP_Error The prepared item. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function prepare_item_for_response( $item, $request ) { + $post_type_object = get_post_type_object( $item->post_type ); + $posts_controller = $post_type_object ? $post_type_object->get_rest_controller() : null; + + if ( ! $posts_controller instanceof WP_REST_Controller ) { + $posts_controller = new WP_REST_Posts_Controller( $item->post_type ); + } + + if ( 'wp_template_part' === $item->post_type ) { + // `WP_REST_Templates_Controller::prepare_item_for_response()` expects a `WP_Block_Template` object. + $item = _build_block_template_result_from_post( $item ); + } + + $response = $posts_controller->prepare_item_for_response( $item, $request ); + if ( is_wp_error( $response ) ) { + return $response; + } + + $response->set_status( 201 ); + + return $response; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/V1/Untranslated_Posts.php b/wp-content/plugins/polylang-pro/src/modules/rest/V1/Untranslated_Posts.php new file mode 100644 index 0000000..473b7b3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/V1/Untranslated_Posts.php @@ -0,0 +1,265 @@ +model = $model; + $this->post_types = $post_types; + } + + /** + * Registers the routes for languages. + * + * @since 3.8 + * + * @return void + */ + public function register_routes(): void { + register_rest_route( + 'pll/v1', + '/untranslated-posts', + array( + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_items' ), + 'permission_callback' => array( $this, 'get_items_permissions_check' ), + 'args' => $this->get_collection_params(), + ), + 'schema' => array( $this, 'get_public_schema' ), + ) + ); + } + + /** + * Retrieves the parameters defined for the untranslated posts REST API endpoint. + * + * @since 2.6.0 + * @since 3.8 Moved from PLL_REST_API and renamed. + * + * @return array REST API endpoint parameters. + */ + public function get_collection_params() { + $language_slugs = $this->model->get_languages_list( array( 'fields' => 'slug' ) ); + + return array( + 'type' => array( + 'description' => __( 'Limit results to items of an object type.', 'polylang-pro' ), + 'type' => 'string', + 'required' => true, + 'enum' => array_keys( $this->post_types ), + ), + 'untranslated_in' => array( + 'description' => __( 'Limit results to untranslated items in a language.', 'polylang-pro' ), + 'type' => 'string', + 'required' => true, + 'enum' => $language_slugs, + ), + 'lang' => array( + 'description' => __( 'Limit results to items in a language.', 'polylang-pro' ), + 'type' => 'string', + 'required' => true, + 'enum' => $language_slugs, + ), + 'context' => array( + 'description' => __( 'Scope under which the request is made; determines fields present in response.', 'polylang-pro' ), + 'type' => 'string', + 'required' => false, + 'enum' => array( 'edit', 'view' ), + 'default' => 'view', + ), + 'search' => array( + 'description' => __( 'Limit results to those matching a string.', 'polylang-pro' ), + 'type' => 'string', + ), + 'include' => array( + 'description' => __( 'Add this post\'s translation to results.', 'polylang-pro' ), + 'type' => 'integer', + 'sanitize_callback' => 'absint', + ), + ); + } + + /** + * Returns the schema for the public endpoint. + * + * @since 3.8 + * + * @return array The schema. + */ + public function get_public_schema(): array { + if ( ! empty( $this->schema ) ) { + return $this->schema; + } + + $this->schema = array( + '$schema' => 'http://json-schema.org/draft-04/schema#', + 'title' => 'untranslated-posts', + 'type' => 'array', + 'items' => array( + 'type' => 'object', + 'properties' => array( + 'id' => array( + 'type' => 'integer', + 'description' => __( 'Unique identifier for the post.', 'polylang-pro' ), + ), + 'title' => array( + 'type' => 'object', + 'properties' => array( + 'raw' => array( + 'type' => 'string', + 'description' => __( 'The raw title of the post.', 'polylang-pro' ), + ), + 'rendered' => array( + 'type' => 'string', + 'description' => __( 'The rendered title of the post.', 'polylang-pro' ), + ), + ), + ), + ), + ), + ); + + return $this->schema; + } + + /** + * Returns a list of posts not translated in a language. + * + * @since 2.6.0 + * @since 3.8 Moved from PLL_REST_API. + * + * @param WP_REST_Request $request REST API request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-param WP_REST_Request $request + */ + public function get_items( $request ) { + $return = array(); + + $type = $request->get_param( 'type' ); // Check that's a valid post type is made in `get_items_permissions_check()`. + $untranslated_in = $this->model->get_language( $request->get_param( 'untranslated_in' ) ); + $lang = $this->model->get_language( $request->get_param( 'lang' ) ); + $search = $request->get_param( 'search' ); + + if ( ! $untranslated_in ) { + return $this->get_invalid_param_error( 'unstranslated_in' ); + } + + if ( ! $lang ) { + return $this->get_invalid_param_error( 'lang' ); + } + + if ( ! is_string( $search ) ) { + $search = ''; + } + + $untranslated_posts = $this->model->post->get_untranslated( $type, $untranslated_in, $lang, $search ); + + // Add current translation in list. + $post_id = $this->model->post->get_translation( (int) $request->get_param( 'include' ), $lang ); + if ( $post_id ) { + $post = get_post( $post_id ); + if ( $post instanceof WP_Post ) { + array_unshift( $untranslated_posts, $post ); + } + } + + // Format output. + foreach ( $untranslated_posts as $post ) { + $return[] = array( + 'id' => $post->ID, + 'title' => array( + 'raw' => $post->post_title, + 'rendered' => get_the_title( $post->ID ), + ), + ); + } + + return rest_ensure_response( $return ); + } + + /** + * Checks if a given request has access to read untranslated posts. + * + * @since 3.8 + * + * @param WP_REST_Request $request Full details about the request. + * @return true|WP_Error True if the request has read access, WP_Error object otherwise. + * + * @phpstan-param WP_REST_Request $request + */ + public function get_items_permissions_check( $request ) { + $post_type_object = get_post_type_object( $request->get_param( 'type' ) ); + + if ( empty( $post_type_object ) ) { + return $this->get_invalid_param_error( 'type' ); + } + + if ( 'edit' === $request['context'] && ! current_user_can( $post_type_object->cap->edit_posts ) ) { + return new WP_Error( + 'rest_forbidden_context', + __( 'Sorry, you are not allowed to edit posts in this post type.', 'polylang-pro' ), + array( 'status' => rest_authorization_required_code() ) + ); + } + + return true; + } + + /** + * Returns a WP_Error object for a given argument. + * + * @since 3.8 + * + * @param string $arg The name of the invalid argument. + * @return WP_Error + */ + private function get_invalid_param_error( string $arg ): WP_Error { + return new WP_Error( + 'rest_invalid_param', + /* translators: %s is the name of a REST API argument.*/ + sprintf( __( 'Missing or invalid "%s" argument.', 'polylang-pro' ), $arg ), + array( 'status' => 400 ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/load.php b/wp-content/plugins/polylang-pro/src/modules/rest/load.php new file mode 100644 index 0000000..7ef505f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/load.php @@ -0,0 +1,19 @@ +model->has_languages() ) { + return; +} + +add_action( + 'rest_api_init', + static function () use ( $polylang ) { + $polylang->rest_api = new PLL_REST_API( $polylang ); + } +); diff --git a/wp-content/plugins/polylang-pro/src/modules/rest/rest-api.php b/wp-content/plugins/polylang-pro/src/modules/rest/rest-api.php new file mode 100644 index 0000000..a26e6c6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/rest/rest-api.php @@ -0,0 +1,186 @@ +links = &$polylang->links; + $this->model = &$polylang->model; + $this->request = &$polylang->request; + + $post_types = array_diff( + array_intersect( + $this->model->get_translated_post_types(), + get_post_types( array( 'show_in_rest' => true ) ) + ), + array( 'attachment' ) + ); + + /** + * Filters post types passed to Translated_Post constructor. + * + * @since 2.2.1 + * @since 3.8 The legacy format with options as arrays is deprecated. Use an indexed array of strings instead. + * + * @param array $post_types An indexed array of post type names. + */ + $post_types = apply_filters( 'pll_rest_api_post_types', $post_types ); + $post_types = $this->sanitize_translatable_types( $post_types ); + $this->post = new Translated_Post( $this, $post_types ); + + $taxonomies = array_intersect( + $this->model->get_translated_taxonomies(), + get_taxonomies( array( 'show_in_rest' => true ) ) + ); + + /** + * Filters taxonomies passed to Translated_Term constructor. + * + * @since 2.2.1 + * @since 3.8 The legacy format with options as arrays is deprecated. Use an indexed array of strings instead. + * + * @param array $taxonomies An indexed array of taxonomy names. + */ + $taxonomies = apply_filters( 'pll_rest_api_taxonomies', $taxonomies ); + $taxonomies = $this->sanitize_translatable_types( $taxonomies ); + $this->term = new Translated_Term( $this, $taxonomies ); + + if ( $this->model->options->get( 'media_support' ) ) { + $this->attachment = new Translated_Attachment( $this ); + } + + $this->filtered_comment = new Filtered_Comment( $this ); + $this->filtered_post = new Filtered_Post( $this, array_keys( $post_types ) ); + $this->filtered_term = new Filtered_Term( $this, array_keys( $taxonomies ) ); + $this->filtered_template = new Filtered_Template( $this ); + + $this->untranslated_posts = new Untranslated_Posts( $this->model, $post_types ); + $this->untranslated_posts->register_routes(); + + $this->translation = new Translation( $polylang ); + $this->translation->register_routes(); + } + + /** + * Sanitizes translatable types to ensure backward compatibility with legacy filter formats. + * Third-party plugins or users may still use the legacy format where options are passed as arrays. + * + * @since 3.8 + * + * @param array $types Translatable types from filters (post types or taxonomies). + * @return string[] Sanitized types, associative array with type names as keys and values. + */ + private function sanitize_translatable_types( $types ): array { + $sanitized = array(); + + foreach ( $types as $type => $options ) { + if ( is_string( $options ) ) { + $sanitized[ $options ] = $options; + } elseif ( is_string( $type ) && is_array( $options ) ) { + _deprecated_argument( + 'pll_rest_api_post_types / pll_rest_api_taxonomies', + '3.8', + 'Passing options as arrays for ' . esc_html( $type ) . ' is deprecated. These filters now use a simple array of post types or taxonomies.' + ); + $sanitized[ $type ] = $type; + } else { + _doing_it_wrong( + 'pll_rest_api_post_types / pll_rest_api_taxonomies', + 'Invalid format. Expected an array of post types or taxonomies', + '3.8' + ); + } + } + + return $sanitized; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/share-slug/load.php b/wp-content/plugins/polylang-pro/src/modules/share-slug/load.php new file mode 100644 index 0000000..fd82169 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/share-slug/load.php @@ -0,0 +1,27 @@ +model->has_languages() ) { + add_filter( + 'pll_settings_modules', + function ( $modules ) { + $k = array_search( 'PLL_Settings_Preview_Share_Slug', $modules, true ); + if ( $k ) { + $modules[ $k ] = 'PLL_Settings_Share_Slug'; + } + return $modules; + }, + 20 // After Polylang. + ); + + if ( get_option( 'permalink_structure' ) && $polylang->options['force_lang'] ) { + $polylang->share_post_slug = new PLL_Share_Post_Slug( $polylang ); + $polylang->share_term_slug = new PLL_Share_Term_Slug( $polylang ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/share-slug/settings-share-slug.php b/wp-content/plugins/polylang-pro/src/modules/share-slug/settings-share-slug.php new file mode 100644 index 0000000..49efabc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/share-slug/settings-share-slug.php @@ -0,0 +1,81 @@ + 'none' ) ); + + if ( get_option( 'permalink_structure' ) ) { + add_action( 'admin_print_footer_scripts', array( $this, 'print_js' ) ); + } + } + + /** + * Returns the module description. + * + * @since 3.1 + * + * @return string + */ + protected function get_description() { + return parent::get_description() . ' ' . __( 'The module is automatically deactivated when using plain permalinks or when the language is set from the content in the URL modifications.', 'polylang-pro' ); + } + + /** + * Tells if the module is active. + * + * @since 1.9 + * + * @return bool + */ + public function is_active() { + return $this->options['force_lang'] && get_option( 'permalink_structure' ); + } + + /** + * Displays the javascript to handle dynamically the change in url modifications + * as sharing slugs is not possible when the language is set from the content + * + * @since 1.9 + * + * @return void + */ + public function print_js() { + wp_enqueue_script( 'jquery' ); + + $activated = sprintf( '%s', $this->action_links['activated'] ); + $deactivated = sprintf( '%s', $this->action_links['deactivated'] ); + + ?> + + options = $polylang->options; + $this->model = &$polylang->model; + $this->links_model = &$polylang->links_model; + $this->curlang = &$polylang->curlang; + + // Get page by pagename and lang. + add_action( 'parse_query', array( $this, 'parse_query' ), 0 ); // Before all other functions hooked to 'parse_query'. + + // Get post by name and lang. + add_filter( 'posts_join', array( $this, 'posts_join' ), 10, 2 ); + add_filter( 'posts_where', array( $this, 'posts_where' ), 10, 2 ); + + add_filter( 'wp_unique_post_slug', array( $this, 'wp_unique_post_slug' ), 10, 6 ); + add_action( 'pll_translate_media', array( $this, 'pll_translate_media' ), 20, 2 ); // After PLL_Admin_Sync to avoid reverse sync. + } + + /** + * Modifies the query object when a page is queried by slug and language + * This must be the first function hooked to 'parse_query' to run so that others get the right queried page + * + * @since 1.9 + * + * @param WP_Query $query Reference to a WP_Query object. + * @return void + */ + public function parse_query( $query ) { + $lang = $this->get_language_for_filter( $query ); + + if ( empty( $lang ) ) { + return; + } + + $qv = $query->query_vars; + + // For hierarchical custom post types. + if ( empty( $qv['pagename'] ) && ! empty( $qv['name'] ) && ! empty( $qv['post_type'] ) && array_intersect( get_post_types( array( 'hierarchical' => true ) ), (array) $qv['post_type'] ) ) { + $qv['pagename'] = $qv['name']; + } + + if ( empty( $qv['pagename'] ) ) { + return; + } + + /* + * A simpler solution is available at https://github.com/mirsch/polylang-slug/commit/4bf2cb80256fc31347455f6539fac0c20f403c04 + * But it supposes that pages sharing slug are translations of each other which we don't. + */ + /** @var WP_Post|null $queried_object */ + $queried_object = $this->get_page_by_path( $qv['pagename'], $lang->slug, OBJECT, empty( $qv['post_type'] ) ? 'page' : $qv['post_type'] ); + + // If we got nothing or an attachment, check if we also have a post with the same slug. See https://core.trac.wordpress.org/ticket/24612 + if ( empty( $qv['post_type'] ) && ( empty( $queried_object ) || 'attachment' === $queried_object->post_type ) && preg_match( '/^[^%]*%(?:postname)%/', get_option( 'permalink_structure' ) ) ) { + /** @var WP_Post|null $post */ + $post = $this->get_page_by_path( $qv['pagename'], $lang->slug, OBJECT, 'post' ); + if ( $post ) { + $queried_object = $post; + } + } + + if ( ! empty( $queried_object ) ) { + $query->queried_object = $queried_object; + $query->queried_object_id = (int) $queried_object->ID; + } + } + + /** + * Retrieves a page given its path. + * This is the same function as WP get_page_by_path() + * Rewritten to make it language dependent + * + * @since 1.9 + * + * @param string $page_path Page path. + * @param string $lang Language slug. + * @param string $output Optional. Output type. Accepts OBJECT, ARRAY_N, or ARRAY_A. Default OBJECT. + * @param string|string[] $post_type Optional. Post type or array of post types. Default 'page'. + * @return WP_Post|mixed[]|null WP_Post on success or null on failure. + * + * @phpstan-param non-empty-string $lang + * @phpstan-param 'ARRAY_A'|'ARRAY_N'|'OBJECT' $output + * @phpstan-return array|WP_Post|null + */ + protected function get_page_by_path( $page_path, $lang, $output = OBJECT, $post_type = 'page' ) { + global $wpdb; + + $page_path = rawurlencode( urldecode( $page_path ) ); + $page_path = str_replace( '%2F', '/', $page_path ); + $page_path = str_replace( '%20', ' ', $page_path ); + $parts = explode( '/', trim( $page_path, '/' ) ); + $parts = array_map( 'sanitize_title_for_query', $parts ); + $escaped_parts = esc_sql( $parts ); + + $in_string = "'" . implode( "','", (array) $escaped_parts ) . "'"; + + if ( is_array( $post_type ) ) { + $post_types = $post_type; + } else { + $post_types = array( $post_type, 'attachment' ); + } + + $post_types = esc_sql( $post_types ); + $post_type_in_string = "'" . implode( "','", $post_types ) . "'"; + $sql = "SELECT ID, post_name, post_parent, post_type FROM {$wpdb->posts}"; + $sql .= $this->model->post->join_clause(); + $sql .= " WHERE post_name IN ( {$in_string} ) AND post_type IN ( {$post_type_in_string} )"; + $sql .= $this->model->post->where_clause( $lang ); + + // PHPCS:ignore WordPress.DB.PreparedSQL.NotPrepared + $pages = $wpdb->get_results( $sql, OBJECT_K ); + + $revparts = array_reverse( $parts ); + + $foundid = 0; + foreach ( (array) $pages as $page ) { + if ( $page->post_name === $revparts[0] ) { + $count = 0; + $p = $page; + while ( 0 !== (int) $p->post_parent && isset( $pages[ $p->post_parent ] ) ) { + ++$count; + $parent = $pages[ $p->post_parent ]; + if ( ! isset( $revparts[ $count ] ) || $parent->post_name !== $revparts[ $count ] ) { + break; + } + $p = $parent; + } + + if ( 0 === (int) $p->post_parent && count( $revparts ) === $count + 1 && $p->post_name === $revparts[ $count ] ) { + $foundid = $page->ID; + if ( $page->post_type === $post_type ) { + break; + } + } + } + } + + if ( $foundid ) { + return get_post( $foundid, $output ); + } + + return null; + } + + /** + * Adds our join clause to sql query. + * Useful when querying a post by name. + * + * @since 1.9 + * + * @param string $join Original join clause. + * @param WP_Query $query The WP_Query object. + * @return string Modified join clause. + */ + public function posts_join( $join, $query ) { + if ( $this->get_language_for_filter( $query ) ) { + return $join . $this->model->post->join_clause(); + } + return $join; + } + + /** + * Adds our where clause to sql query. + * Useful when querying a post by name. + * + * @since 1.9 + * + * @param string $where Original where clause. + * @param WP_Query $query The WP_Query object. + * @return string Modified where clause. + */ + public function posts_where( $where, $query ) { + $language = $this->get_language_for_filter( $query ); + if ( $language ) { + return $where . $this->model->post->where_clause( $language ); + } + return $where; + } + + /** + * Checks if the query must be filtered or not + * + * @since 1.9 + * + * @param WP_Query $query The WP_Query object. + * @return PLL_Language|false The language to use for the filter, false if the query should be kept unfiltered. + */ + protected function get_language_for_filter( $query ) { + $qv = $query->query_vars; + + if ( empty( $qv['name'] ) && empty( $qv['pagename'] ) ) { + return false; + } + + $post_type = empty( $qv['post_type'] ) ? 'post' : $qv['post_type']; + + if ( ! empty( $qv['attachment'] ) ) { + $post_type = 'attachment'; + } + + if ( ! $this->model->is_translated_post_type( $post_type ) ) { + return false; + } + + if ( ! empty( $qv['lang'] ) ) { + return $this->model->get_language( $qv['lang'] ); + } + + if ( isset( $qv['tax_query'] ) && is_array( $qv['tax_query'] ) ) { + foreach ( $qv['tax_query'] as $tax_query ) { + if ( isset( $tax_query['taxonomy'] ) && 'language' === $tax_query['taxonomy'] ) { + if ( is_array( $tax_query['terms'] ) ) { + if ( 1 < count( $tax_query['terms'] ) ) { + // Several language terms queried. + continue; + } + + $term = reset( $tax_query['terms'] ); + } else { + $term = $tax_query['terms']; + } + + if ( isset( $tax_query['field'] ) && 'term_taxonomy_id' === $tax_query['field'] ) { + $term = "tt:{$term}"; + } + + $lang = $this->model->get_language( $term ); + + if ( $lang ) { + return $lang; + } + } + } + } + + if ( ! empty( $this->curlang ) ) { + return $this->curlang; + } + + return false; + } + + /** + * Checks if the slug is unique within language. + * Thanks to @AndyDeGroo for https://wordpress.org/support/topic/plugin-polylang-identical-page-names-in-different-languages?replies=8#post-2669927 + * Thanks to Ulrich Pogson for https://github.com/grappler/polylang-slug/blob/master/polylang-slug.php + * + * @since 1.9 + * + * @param string $slug The slug defined by wp_unique_post_slug() in WP. + * @param int $post_ID The post id. + * @param string $post_status Not used. + * @param string $post_type The Post type. + * @param int $post_parent The id of the post parent. + * @param string $original_slug The original slug before it is modified by wp_unique_post_slug in WP. + * @return string Original slug if it is unique in the language or the modified slug otherwise. + */ + public function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) { + global $wpdb; + + // Return slug if it was not changed. + if ( $original_slug === $slug || 0 === $this->options['force_lang'] || ! $this->model->is_translated_post_type( $post_type ) ) { + return $slug; + } + + $lang = $this->model->post->get_language( $post_ID ); + + if ( empty( $lang ) ) { + return $slug; + } + + if ( 'attachment' === $post_type ) { + // Attachment slugs must be unique across all types. + $sql = "SELECT post_name FROM {$wpdb->posts}"; + $sql .= $this->model->post->join_clause(); + $sql .= $wpdb->prepare( ' WHERE post_name = %s AND ID != %d', $original_slug, $post_ID ); + $sql .= $this->model->post->where_clause( $lang ) . ' LIMIT 1'; + + // PHPCS:ignore WordPress.DB.PreparedSQL.NotPrepared + $post_name_check = $wpdb->get_var( $sql ); + } + + elseif ( is_post_type_hierarchical( $post_type ) ) { + // Page slugs must be unique within their own trees. Pages are in a separate namespace than posts so page slugs are allowed to overlap post slugs. + $sql = "SELECT ID FROM {$wpdb->posts}"; + $sql .= $this->model->post->join_clause(); + $sql .= $wpdb->prepare( " WHERE post_name = %s AND post_type IN ( %s, 'attachment' ) AND ID != %d AND post_parent = %d", $original_slug, $post_type, $post_ID, $post_parent ); + $sql .= $this->model->post->where_clause( $lang ) . ' LIMIT 1'; + + // PHPCS:ignore WordPress.DB.PreparedSQL.NotPrepared + $post_name_check = $wpdb->get_var( $sql ); + } + + else { + // Post slugs must be unique across all posts. + $sql = "SELECT post_name FROM {$wpdb->posts}"; + $sql .= $this->model->post->join_clause(); + $sql .= $wpdb->prepare( ' WHERE post_name = %s AND post_type = %s AND ID != %d', $original_slug, $post_type, $post_ID ); + $sql .= $this->model->post->where_clause( $lang ) . ' LIMIT 1'; + + // PHPCS:ignore WordPress.DB.PreparedSQL.NotPrepared + $post_name_check = $wpdb->get_var( $sql ); + } + + return $post_name_check ? $slug : $original_slug; + } + + /** + * Updates the attachment slug when creating a translation to allow to share slugs + * This second step is needed because wp_unique_post_slug is called before the language is set + * + * @since 1.9 + * + * @param int $post_id Original attachment id. + * @param int $tr_id Translated attachment id. + * @return void + */ + public function pll_translate_media( $post_id, $tr_id ) { + $post = get_post( $post_id ); + if ( $post ) { + wp_update_post( array( 'ID' => $tr_id, 'post_name' => $post->post_name ) ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/share-slug/share-term-slug.php b/wp-content/plugins/polylang-pro/src/modules/share-slug/share-term-slug.php new file mode 100644 index 0000000..4a38e17 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/share-slug/share-term-slug.php @@ -0,0 +1,229 @@ +options = $polylang->options; + $this->model = &$polylang->model; + $this->links_model = &$polylang->links_model; + + add_action( 'created_term', array( $this, 'save_term' ), 1, 3 ); + add_action( 'edited_term', array( $this, 'save_term' ), 1, 3 ); + add_filter( 'pre_term_name', array( $this, 'set_pre_term_name' ) ); + add_filter( 'pre_term_term_id', array( $this, 'set_pre_term_id' ) ); + add_filter( 'pre_term_slug', array( $this, 'set_pre_term_slug' ), 10, 2 ); + + // Remove Polylang filter to avoid conflicts when filtering slugs. + remove_filter( 'pre_term_name', array( $polylang->terms, 'set_pre_term_name' ), 10 ); + remove_filter( 'pre_term_slug', array( $polylang->terms, 'set_pre_term_slug' ), 10 ); + } + + /** + * Will make slug unique per language and taxonomy + * Mostly taken from wp_unique_term_slug + * + * @since 1.9 + * + * @param string $slug The string that will be tried for a unique slug. + * @param string $lang Language slug. + * @param WP_Term $term The term object that the $slug will belong too. + * @return string Will return a true unique slug. + */ + protected function unique_term_slug( $slug, $lang, $term ) { + global $wpdb; + + $original_slug = $slug; // Save this for the filter at the end. + + // Quick check. + if ( ! $this->model->term_exists_by_slug( $slug, $lang, $term->taxonomy ) ) { + /** This filter is documented in /wordpress/wp-includes/taxonomy.php */ + return apply_filters( 'wp_unique_term_slug', $slug, $term, $original_slug ); + } + + /* + * As done by WP in term_exists except that we use our own term_exist. + * If the taxonomy supports hierarchy and the term has a parent, + * make the slug unique by incorporating parent slugs. + */ + if ( is_taxonomy_hierarchical( $term->taxonomy ) && ! empty( $term->parent ) ) { + $the_parent = $term->parent; + while ( $the_parent > 0 ) { + $parent_term = get_term( $the_parent, $term->taxonomy ); + if ( ! $parent_term instanceof WP_Term ) { + break; + } + $slug .= '-' . $parent_term->slug; + if ( ! $this->model->term_exists_by_slug( $slug, $lang, $term->taxonomy ) ) { // Calls our own term_exists. + /** This filter is documented in /wordpress/wp-includes/taxonomy.php */ + return apply_filters( 'wp_unique_term_slug', $slug, $term, $original_slug ); + } + + $the_parent = $parent_term->parent; + } + } + + // If we didn't get a unique slug, try appending a number to make it unique. + if ( ! empty( $term->term_id ) ) { + $query = $wpdb->prepare( "SELECT slug FROM {$wpdb->terms} WHERE slug = %s AND term_id != %d", $slug, $term->term_id ); + } + else { + $query = $wpdb->prepare( "SELECT slug FROM {$wpdb->terms} WHERE slug = %s", $slug ); + } + + // PHPCS:ignore WordPress.DB.PreparedSQL.NotPrepared + if ( $wpdb->get_var( $query ) ) { + $num = 2; + do { + $alt_slug = $slug . "-$num"; + ++$num; + $slug_check = $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM {$wpdb->terms} WHERE slug = %s", $alt_slug ) ); + } while ( $slug_check ); + $slug = $alt_slug; + } + + /** This filter is documented in /wordpress/wp-includes/taxonomy.php */ + return apply_filters( 'wp_unique_term_slug', $slug, $term, $original_slug ); + } + + /** + * Ugly hack to enable the same slug in several languages + * + * @since 1.9 + * + * @param int $term_id The term id of a saved term. + * @param int $tt_id The term taxononomy id. + * @param string $taxonomy The term taxonomy. + * @return void + */ + public function save_term( $term_id, $tt_id, $taxonomy ) { + global $wpdb; + + // Does nothing except on taxonomies which are filterable. + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) || 0 === $this->options['force_lang'] ) { + return; + } + + $term = get_term( $term_id, $taxonomy ); + + if ( ! ( $term instanceof WP_Term ) ) { + return; + } + + $pos = strpos( $term->slug, self::TERM_SLUG_SEPARATOR ); + + if ( false === $pos ) { + return; + } + + $slug = substr( $term->slug, 0, $pos ); + $lang = substr( $term->slug, $pos + 3 ); + + // Need to check for unique slug as we tricked wp_unique_term_slug from WP. + $slug = $this->unique_term_slug( $slug, $lang, (object) $term ); + $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) ); + clean_term_cache( $term_id, $taxonomy ); + } + + /** + * Stores the term name to use in 'pre_term_slug'. + * + * @since 3.3 + * + * @param string $name Term name. + * @return string Unmodified term name. + */ + public function set_pre_term_name( $name ) { + $this->pre_term_name = is_string( $name ) ? $name : ''; + + return $name; + } + + /** + * Stores the term ID to use in `pre_term_slug`. + * + * @since 3.7 + * + * @param int $term_id Term ID. + * @return int Unmodified term ID. + */ + public function set_pre_term_id( $term_id ) { + $this->pre_term_id = is_int( $term_id ) ? $term_id : 0; + + return $term_id; + } + + /** + * Appends language slug to the term slug if needed. + * + * @since 3.3 + * + * @param string $slug Term slug. + * @param string $taxonomy Term taxonomy. + * @return string Slug with a language suffix if found. + */ + public function set_pre_term_slug( $slug, $taxonomy ) { + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) || ! is_string( $slug ) ) { + return $slug; + } + + $term_slug = new PLL_Term_Slug( $this->model, $slug, $taxonomy, $this->pre_term_name, $this->pre_term_id ); + + return $term_slug->get_suffixed_slug( self::TERM_SLUG_SEPARATOR ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync-post/load.php b/wp-content/plugins/polylang-pro/src/modules/sync-post/load.php new file mode 100644 index 0000000..ee9eb50 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync-post/load.php @@ -0,0 +1,26 @@ +model->has_languages() ) { + $polylang->sync_post_model = new PLL_Sync_Post_Model( $polylang ); + + if ( $polylang instanceof PLL_Admin ) { + require_once POLYLANG_PRO_DIR . '/src/modules/bulk-translate/load.php'; + } + + if ( wp_doing_cron() || ( defined( 'WP_CLI' ) && WP_CLI ) ) { + $polylang->sync_post = new PLL_Sync_Post( $polylang ); + } elseif ( $polylang instanceof PLL_Admin ) { + new PLL_Admin_Loader( $polylang, 'sync_post' ); + } elseif ( $polylang instanceof PLL_REST_Request ) { + $polylang->sync_post = new PLL_Sync_Post_REST( $polylang ); + } else { + $polylang->sync_post = new PLL_Sync_Post( $polylang ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-bulk-option.php b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-bulk-option.php new file mode 100644 index 0000000..a09bfe6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-bulk-option.php @@ -0,0 +1,82 @@ +do_synchronize = $args['do_synchronize']; + $this->sync_model = $sync_model; + } + + /** + * Checks whether the option should be selectable by the user. + * + * @since 2.7 + * + * @return bool + */ + public function is_available() { + $screen = get_current_screen(); + + if ( $screen && 'edit' === $screen->base ) { + $post_type = get_post_type_object( $screen->post_type ); + return $post_type && current_user_can( $post_type->cap->edit_posts ); + } + + return false; + } + + + /** + * Duplicates or Synchronize the given post, depending on the value of {@see PLL_Sync_Post_Bulk_Option::$do_synchronize} + * + * @since 2.7 + * + * @param int $object_id Identifies a post to duplicate or synchronize. + * @param string $lang A language slug to translate into. + */ + public function translate( $object_id, $lang ) { + if ( false === $this->do_synchronize ) { + $this->sync_model->save_group( $object_id, array() ); + $strategy = PLL_Sync_Post_Model::COPY; + } else { + $strategy = PLL_Sync_Post_Model::SYNC; + } + + $this->sync_model->copy( $object_id, $lang, $strategy, $this->do_synchronize ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-button.php b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-button.php new file mode 100644 index 0000000..44122f6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-button.php @@ -0,0 +1,148 @@ + "before_post_translation_{$language->slug}", + 'activate' => __( 'Synchronize this post', 'polylang-pro' ), + 'deactivate' => __( "Don't synchronize this post", 'polylang-pro' ), + /* translators: accessibility text, %s is a native language name */ + 'disabled' => sprintf( __( 'You are not allowed to synchronize this post in %s', 'polylang-pro' ), $language->name ), + 'class' => 'dashicons-before dashicons-controls-repeat', + 'before' => '', + 'after' => '', + ); + + parent::__construct( "pll_sync_post[{$language->slug}]", $args ); + + $this->sync_model = $sync_model; + $this->model = $sync_model->model; + $this->language = $language; + } + + /** + * Tells whether the button is active or not + * + * @since 2.1 + * + * @return bool + */ + public function is_active() { + global $post; + + if ( empty( $post ) ) { + return false; // FIXME this resets all sync when the language is changed. + } + + $term = $this->model->post->get_object_term( $post->ID, 'post_translations' ); + + if ( ! empty( $term ) ) { + $language = $this->model->post->get_language( $post->ID ); // FIXME is it already evaluated? + $d = maybe_unserialize( $term->description ); + return $language && is_array( $d ) && isset( $d['sync'][ $this->language->slug ], $d['sync'][ $language->slug ] ) && $d['sync'][ $this->language->slug ] === $d['sync'][ $language->slug ]; + } + + return false; + } + + /** + * Tells whether the button is disabled or not. + * + * @since 3.8 + * + * @return bool + */ + public function is_disabled(): bool { + global $post_ID; + + if ( empty( $post_ID ) ) { + return true; + } + + $action = (string) current_action(); + + if ( ! str_starts_with( $action, 'pll_before_post_translation_' ) ) { + return false; + } + + $lang = substr( $action, 28 ); + + return ! $this->sync_model->current_user_can_synchronize( $post_ID, $lang ); + } + + /** + * Saves the button state. + * Returns `false` if the button is disabled. + * + * @since 3.8 + * + * @param string $post_type Current post type. + * @param bool $active New requested button state. + * @return bool Whether the new button state is accepted or not. + */ + protected function toggle_option( $post_type, $active ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + if ( ! isset( $_POST['_pll_nonce'] ) || ! is_string( $_POST['_pll_nonce'] ) || ! wp_verify_nonce( $_POST['_pll_nonce'], 'pll_language' ) ) { + return false; + } + + if ( ! isset( $_POST['action'], $_POST['pll_post_id'] ) || ! is_string( $_POST['action'] ) || ! is_scalar( $_POST['pll_post_id'] ) ) { + return false; + } + + $post_ID = absint( $_POST['pll_post_id'] ); + + if ( empty( $post_ID ) ) { + return false; + } + + $languages = $this->model->languages->filter( 'translator' )->get_list( array( 'fields' => 'slug' ) ); + + if ( empty( $languages ) ) { + return false; + } + + $languages = implode( '|', $languages ); + + if ( ! preg_match( "/^toggle_pll_sync_post\[(?{$languages})\]$/", wp_unslash( $_POST['action'] ), $matches ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput + // The user is not allowed to translate to the given language. + return false; + } + + return $this->sync_model->current_user_can_synchronize( $post_ID, $matches['lang'] ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-model.php b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-model.php new file mode 100644 index 0000000..9428dcc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-model.php @@ -0,0 +1,457 @@ +options = $polylang->options; + $this->model = &$polylang->model; + $this->sync = &$polylang->sync; + $this->sync_content = &$polylang->sync_content; + $this->curlang = &$polylang->curlang; + + add_filter( 'pll_copy_taxonomies', array( $this, 'copy_taxonomies' ), 5, 4 ); + add_filter( 'pll_copy_post_metas', array( $this, 'copy_post_metas' ), 5, 4 ); + } + + /** + * Copies all taxonomies. + * + * @since 2.1 + * + * @param string[] $taxonomies List of taxonomy names. + * @param bool $sync True for a synchronization, false for a simple copy. + * @param int $from Source post id. + * @param int $to Target post id. + * @return string[] + */ + public function copy_taxonomies( $taxonomies, $sync, $from, $to ) { + if ( ! empty( $from ) && ! empty( $to ) && $this->can_copy( $from, $to ) ) { + $taxonomies = array_diff( get_post_taxonomies( $from ), get_taxonomies( array( '_pll' => true ) ) ); + } + return $taxonomies; + } + + /** + * Copies all custom fields. + * + * @since 2.1 + * + * @param string[] $keys List of custom fields names. + * @param bool $sync True if it is synchronization, false if it is a copy. + * @param int $from Id of the post from which we copy the information. + * @param int $to Id of the post to which we paste the information. + * @return string[] + */ + public function copy_post_metas( $keys, $sync, $from, $to ) { + if ( ! empty( $from ) && ! empty( $to ) && $this->can_copy( $from, $to ) ) { + $from_keys = array_keys( get_post_custom( $from ) ); // *All* custom fields. + $to_keys = array_keys( get_post_custom( $to ) ); // Adding custom fields of the destination allow to synchronize deleted custom fields. + $keys = array_merge( $from_keys, $to_keys ); + $keys = array_unique( $keys ); + $keys = array_diff( $keys, array( '_edit_last', '_edit_lock' ) ); + + // Trash meta status must not be synchronized when bulk trashing / restoring posts otherwise WP can't restore the right post status. + if ( $this->doing_bulk_trash( $to ) ) { + $keys = array_diff( $keys, array( '_wp_trash_meta_status', '_wp_trash_meta_time' ) ); + } + } + return $keys; + } + + /** + * Checks if the synchronized post is included in bulk trashing or restoring posts + * + * @since 2.1.2 + * + * @param int $post_id Id of the target post. + * @return bool + */ + protected function doing_bulk_trash( $post_id ) { + return 'edit.php' === $GLOBALS['pagenow'] && isset( $_GET['action'], $_GET['post'] ) && in_array( sanitize_key( $_GET['action'] ), array( 'trash', 'untrash' ), true ) && in_array( $post_id, array_map( 'absint', $_GET['post'] ), true ); // phpcs:ignore WordPress.Security.NonceVerification + } + + /** + * Duplicates or synchronizes the post to one language and optionally saves the synchronization group. + * + * @since 3.7 + * + * @param int $post_id Post ID of the source post. + * @param string $lang Target language slug. + * @param string $strategy `sync` if doing synchro, `copy` otherwise. + * @param bool $save_group True to update the synchronization group, false otherwise. + * @return int ID of the target post, 0 on failure. + * + * @phpstan-param 'sync'|'copy' $strategy + */ + public function copy( $post_id, $lang, $strategy = self::COPY, $save_group = false ) { + global $wpdb; + + $post = get_post( $post_id ); + if ( ! $post instanceof WP_Post ) { + // The source post doesn't exist. + return 0; + } + + $tr_post = clone $post; + $tr_id = $this->model->post->get( $post_id, $this->model->get_language( $lang ) ); + $languages = array_keys( $this->get( $post_id ) ); + + // Loads the strings translations with the post's target language. + PLL()->load_strings_translations( $lang ); + + // If it does not exist, create it. + if ( ! $tr_id ) { + $tr_post->ID = 0; + $tr_id = wp_insert_post( wp_slash( $tr_post->to_array() ) ); + if ( empty( $tr_id ) ) { + return 0; + } + + if ( self::SYNC === $strategy ) { + $this->doing_sync[ $post_id ][ $tr_id ] = true; + } else { + $this->doing_copy[ $post_id ][ $tr_id ] = true; + } + + $this->model->post->set_language( $tr_id, $lang ); // Necessary to do it now to share slug. + + $translations = $this->model->post->get_translations( $post_id ); + $translations[ $lang ] = $tr_id; + $this->model->post->save_translations( $post_id, $translations ); // Saves translations in case we created a post. + + $languages[] = $lang; + + // Maybe duplicates the featured image. + if ( $this->options['media_support'] ) { + add_filter( 'pll_translate_post_meta', array( $this->sync_content, 'duplicate_thumbnail' ), 10, 3 ); + } + + add_filter( 'pll_maybe_translate_term', array( $this->sync_content, 'duplicate_term' ), 10, 3 ); + + $this->sync->taxonomies->copy( $post_id, $tr_id, $lang ); + $this->sync->post_metas->copy( $post_id, $tr_id, $lang ); + + $_POST['post_tr_lang'][ $lang ] = $tr_id; // Hack to avoid creating multiple posts if the original post is saved several times (ex WooCommerce 3.0+). + + /** + * Fires after a synchronized post has been created + * + * @since 2.3.11 + * + * @param int $post_id ID of the source post. + * @param int $tr_id ID of the newly created post. + * @param string $lang Language of the newly created post. + * @param string $strategy `sync` if doing synchro, `copy` otherwise. + */ + do_action( 'pll_created_sync_post', $post_id, $tr_id, $lang, $strategy ); + + /** This action is documented in /polylang/src/crud-posts.php */ + do_action( 'pll_save_post', $post_id, $post, $translations ); // Fire again as we just updated $translations. + + unset( $this->doing_copy[ $post_id ][ $tr_id ] ); + } + + $previous = get_post( $tr_id ); // Remember the previous post to handle the status transition. + + if ( ! $previous instanceof WP_Post ) { + // Something went wrong! + return 0; + } + + if ( $save_group ) { + $this->save_group( $post_id, $languages ); + } + + $tr_post->ID = $tr_id; + $tr_post->post_parent = (int) $this->model->post->get( $post->post_parent, $lang ); // Translates post parent. + $tr_post = $this->sync_content->copy_content( $post, $tr_post, $lang ); + + // The columns to copy in DB. + $columns = array( + 'post_author', + 'post_date', + 'post_date_gmt', + 'post_content', + 'post_title', + 'post_excerpt', + 'comment_status', + 'ping_status', + 'post_name', + 'post_modified', + 'post_modified_gmt', + 'post_parent', + 'menu_order', + 'post_mime_type', + ); + + // Don't synchronize when trashing / restoring in bulk as it causes an error fired by WP. + if ( ! $this->doing_bulk_trash( $tr_id ) ) { + $columns[] = 'post_status'; + } + + is_sticky( $post_id ) ? stick_post( $tr_id ) : unstick_post( $tr_id ); + + /** + * Filters the post fields to synchronize when synchronizing posts + * + * @since 2.3 + * + * @param array $fields WP_Post fields to synchronize. + * @param int $post_id Post id of the source post. + * @param string $lang Target language slug. + * @param bool $save_group True to update the synchronization group, false otherwise. + */ + $columns = apply_filters( 'pll_sync_post_fields', array_combine( $columns, $columns ), $post_id, $lang, $save_group ); + + $wpdb->update( $wpdb->posts, array_intersect_key( $tr_post->to_array(), $columns ), array( 'ID' => $tr_id ) ); // Don't use wp_update_post to avoid conflict (reverse sync). + clean_post_cache( $tr_id ); + + wp_transition_post_status( $tr_post->post_status, $previous->post_status, $tr_post ); + + /** + * Fires after a post has been synchronized. + * + * @since 2.6.3 + * + * @param int $post_id ID of the source post. + * @param int $tr_id ID of the target post. + * @param string $lang Language of the target post. + * @param string $strategy `sync` if doing synchro, `copy` otherwise. + */ + do_action( 'pll_post_synchronized', $post_id, $tr_id, $lang, $strategy ); + + // Restores the strings translations with the current language. + if ( $this->curlang instanceof PLL_Language ) { + PLL()->load_strings_translations( $this->curlang->slug ); + } + + unset( $this->doing_sync[ $post_id ][ $tr_id ] ); + + return $tr_id; + } + + /** + * Duplicates the post to one language and optionally saves the synchronization group. + * Backward compatibility with Polylang Pro < 3.7. + * + * @since 2.2 + * @since 3.7 Deprecated, replaced by `PLL_Sync_Post_Model::copy()`. + * @deprecated + * + * @param int $from Post ID of the source post. + * @param string $lang Target language slug. + * @param bool $save_group True to update the synchronization group, false otherwise. + * @return int ID of the target post, 0 on failure. + */ + public function copy_post( $from, $lang, $save_group = true ) { + _deprecated_function( __METHOD__, '3.7', 'PLL_Sync_Post_Model::copy()' ); + + $strategy = $save_group ? self::SYNC : self::COPY; + + return $this->copy( $from, $lang, $strategy, $save_group ); + } + + /** + * Saves the synchronization group + * This is stored as an array beside the translations in the post_translations term description + * + * @since 2.1 + * + * @param int $post_id ID of the post currently being saved. + * @param array $sync_post Array of languages to sync with this post. + * @return void + */ + public function save_group( $post_id, $sync_post ) { + $term = $this->model->post->get_object_term( $post_id, 'post_translations' ); + + if ( empty( $term ) ) { + return; + } + + $d = maybe_unserialize( $term->description ); + $lang = $this->model->post->get_language( $post_id ); + + if ( ! is_array( $d ) || empty( $lang ) ) { + return; + } + + $lang = $lang->slug; + + if ( empty( $sync_post ) ) { + if ( isset( $d['sync'][ $lang ] ) ) { + $d['sync'] = array_diff( $d['sync'], array( $d['sync'][ $lang ] ) ); + } + } else { + $sync_post[] = $lang; + $d['sync'] = empty( $d['sync'] ) ? array_fill_keys( $sync_post, $lang ) : array_merge( array_diff( $d['sync'], array( $lang ) ), array_fill_keys( $sync_post, $lang ) ); + } + + wp_update_term( (int) $term->term_id, 'post_translations', array( 'description' => maybe_serialize( $d ) ) ); + } + + /** + * Get all posts synchronized with a given post + * + * @since 2.1 + * + * @param int $post_id The id of the post. + * @return array An associative array of arrays with language code as key and post id as value. + * + * @phpstan-return array> + */ + public function get( $post_id ) { + $term = $this->model->post->get_object_term( $post_id, 'post_translations' ); + + if ( ! empty( $term ) ) { + $lang = $this->model->post->get_language( $post_id ); + $d = maybe_unserialize( $term->description ); + + if ( ! is_array( $d ) || empty( $lang ) ) { + return array(); + } + + if ( ! empty( $d['sync'][ $lang->slug ] ) ) { + $keys = array_keys( $d['sync'], $d['sync'][ $lang->slug ], true ); + return array_intersect_key( $d, array_flip( $keys ) ); + } + } + + return array(); + } + + /** + * Checks whether two posts are synchronized. + * + * @since 2.1 + * + * @param int $post_id The ID of a first post to compare. + * @param int $other_id The ID of the other post to compare. + * @return bool + */ + public function are_synchronized( $post_id, $other_id ) { + return isset( $this->doing_sync[ $post_id ][ $other_id ] ) || in_array( $other_id, $this->get( $post_id ), true ); + } + + /** + * Checks whether two posts can be copied. + * + * @since 3.7 + * + * @param int $from The ID of a first post to compare. + * @param int $to The ID of the other post to compare. + * @return bool + */ + protected function can_copy( $from, $to ) { + return isset( $this->doing_copy[ $from ][ $to ] ) || $this->are_synchronized( $from, $to ); + } + + /** + * Check if the current user can synchronize a post in other language + * + * @since 2.6 + * + * @param int $post_id Post to synchronize. + * @param string $lang Language code. + * @return bool + */ + public function current_user_can_synchronize( $post_id, $lang ) { + $user = Capabilities::get_user(); + + if ( ! $user->has_cap( 'edit_post', $post_id ) ) { + // The user is not allowed to edit this post nor its synchronized translations. + // See `Modules\Capabilities\Mapper\Post::map()`. + return false; + } + + $language = $this->model->get_language( $lang ); + + if ( ! $language || ! $user->can_translate( $language ) ) { + return false; + } + + $tr_id = $this->model->post->get( $post_id, $language ); + + // If we don't have a translation yet, check if we have the right to create a new one? + if ( empty( $tr_id ) ) { + $post_type = get_post_type( $post_id ); + $post_type_object = get_post_type_object( $post_type ); + return $user->has_cap( $post_type_object->cap->create_posts ); + } + + // Do we have the right to edit this translation? + return $user->has_cap( 'edit_post', $tr_id ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-rest.php b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-rest.php new file mode 100644 index 0000000..7cade86 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post-rest.php @@ -0,0 +1,146 @@ +model = &$polylang->model; + $this->sync_model = &$polylang->sync_post_model; + + add_action( 'rest_api_init', array( $this, 'init' ), 20 ); // After PLL_REST_API. + } + + /** + * Register the 'pll_sync_post' REST field + * + * @since 2.6 + * + * @return void + */ + public function init() { + foreach ( $this->model->get_translated_post_types() as $type ) { + register_rest_field( + $type, + 'pll_sync_post', + array( + 'get_callback' => array( $this, 'get_synchronizations' ), + 'update_callback' => array( $this, 'sync_posts' ), + 'schema' => $this->get_schema(), + ) + ); + + add_action( "rest_after_insert_{$type}", array( $this, 'after_insert_post' ) ); + } + } + + /** + * Returns the object synchronizations. + * + * Cast to `stdClass` to ensure `json_encode` always returns a JSON object `{}` + * rather than a JSON array `[]` when there are no synchronizations. + * + * @since 2.4 + * + * @param array $object Array of post properties. + * @return object + */ + public function get_synchronizations( $object ) { + return (object) array_fill_keys( array_keys( $this->sync_model->get( $object['id'] ) ), true ); + } + + /** + * Update the post synchronization group + * + * @since 2.6 + * + * @param array $sync_post Array of synchronizations with language code as key and 'true' as value. + * @param object $object The WP_Post object. + * @return bool + */ + public function sync_posts( $sync_post, $object ) { + if ( isset( $object->ID ) ) { // Test to avoid a warning with WooCommerce. + $post_id = (int) $object->ID; + + if ( empty( $sync_post ) ) { + $this->sync_model->save_group( $post_id, array() ); + } else { + $languages = array_keys( array_intersect( $sync_post, array( true ) ) ); + + foreach ( $languages as $k => $lang ) { + if ( $this->sync_model->current_user_can_synchronize( $post_id, $lang ) ) { + $this->sync_model->copy( $post_id, $lang, PLL_Sync_Post_Model::SYNC ); // Don't save the group inside the loop. + } else { + unset( $languages[ $k ] ); + } + } + + $this->sync_model->save_group( $post_id, $languages ); + } + } + + return true; + } + + /** + * Synchronize posts + * + * @since 2.6 + * + * @param WP_Post $post Inserted or updated post object. + * + * @return void + */ + public function after_insert_post( $post ) { + if ( isset( $post->ID ) ) { // Test to avoid a warning with WooCommerce. + $synchronized_posts = array_diff( $this->sync_model->get( $post->ID ), array( $post->ID ) ); + foreach ( array_keys( $synchronized_posts ) as $lang ) { + if ( $this->sync_model->current_user_can_synchronize( $post->ID, $lang ) ) { + $this->sync_model->copy( $post->ID, $lang, PLL_Sync_Post_Model::SYNC ); + } + } + } + } + + /** + * Returns the schema for the synchronization group REST field. + * + * @since 3.8 + * + * @return array JSON schema. + */ + private function get_schema(): array { + return array( + 'description' => __( 'Synchronization group', 'polylang-pro' ), + 'type' => 'object', + 'properties' => array_fill_keys( + $this->model->languages->get_list( array( 'fields' => 'slug' ) ), + array( + 'type' => 'boolean', + ) + ), + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post.php b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post.php new file mode 100644 index 0000000..629389a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync-post/sync-post.php @@ -0,0 +1,284 @@ +sync_model = &$polylang->sync_post_model; + $this->model = &$polylang->model; + + // Create buttons in the language metabox. + if ( $polylang instanceof PLL_Admin && ! wp_doing_cron() && ! ( defined( 'WP_CLI' ) && WP_CLI ) ) { + // Loaded with `PLL_Admin_Loader`: we're on `admin_init` or `use_block_editor_for_post`. + $this->add_metabox_buttons(); + } + + add_action( 'pll_bulk_translate_options_init', array( $this, 'add_bulk_translate_options' ) ); + add_filter( 'update_translation_group', array( $this, 'unsync_post' ), 10, 3 ); + add_action( 'pll_save_post', array( $this, 'sync_posts' ), 5 ); // Before PLL_Admin_Sync, Before PLL_ACF, Before PLLWC. + } + + /** + * Registers the buttons. + * + * @since 3.6.5 + * + * @return void + */ + public function add_metabox_buttons(): void { + foreach ( $this->model->get_languages_list() as $language ) { + $this->buttons[ $language->slug ] = new PLL_Sync_Post_Button( $this->sync_model, $language ); + } + } + + /** + * Registers options of the Translate bulk action. + * + * @since 3.6.5 + * + * @param PLL_Bulk_Translate $bulk_translate Instance of `PLL_Bulk_Translate`. + * @return void + */ + public function add_bulk_translate_options( $bulk_translate ): void { + $bulk_translate->register_options( + array( + new PLL_Sync_Post_Bulk_Option( + array( + 'name' => 'pll_sync_post', + 'description' => __( 'Synchronize translations in selected languages with the original items', 'polylang-pro' ), + 'do_synchronize' => true, + 'priority' => 10, + ), + $this->model, + $this->sync_model + ), + new PLL_Sync_Post_Bulk_Option( + array( + 'name' => 'pll_copy_post', + 'description' => __( 'Copy original items to selected languages', 'polylang-pro' ), + 'do_synchronize' => false, + 'priority' => 5, + ), + $this->model, + $this->sync_model + ), + ) + ); + } + + /** + * Duplicates the post and saves the synchronization group + * + * @since 2.1 + * + * @param int $post_id The post id. + * @return void + */ + public function sync_posts( $post_id ) { + static $avoid_recursion = false; + + if ( $avoid_recursion ) { + return; + } + + if ( ! empty( $_POST['post_lang_choice'] ) && isset( $_POST['_pll_nonce'] ) && is_string( $_POST['_pll_nonce'] ) && wp_verify_nonce( $_POST['_pll_nonce'], 'pll_language' ) ) { + // We are editing the post from post.php (only place where we can change the option to sync). + + if ( ! empty( $_POST['pll_sync_post'] ) && is_array( $_POST['pll_sync_post'] ) ) { + $sync_post = array_intersect( array_map( 'sanitize_key', $_POST['pll_sync_post'] ), array( 'true' ) ); + } else { + $sync_post = array(); + } + + foreach ( $sync_post as $lang => $v ) { + if ( ! $this->sync_model->current_user_can_synchronize( $post_id, $lang ) ) { + // The current user is not allowed to change the synchronization status for this language. + wp_die( + esc_html__( 'Sorry, you are not allowed to change the synchronization status of this item.', 'polylang-pro' ), + 403 + ); + } + } + + if ( empty( $sync_post ) ) { + $this->sync_model->save_group( $post_id, array() ); + return; + } + } else { + // Quick edit or bulk edit or any place where the Languages metabox is not displayed. + $sync_post = array_diff( $this->sync_model->get( $post_id ), array( $post_id ) ); // Just remove this post from the list. + } + + $avoid_recursion = true; + + $languages = array_keys( $sync_post ); + + foreach ( $languages as $k => $lang ) { + if ( $this->sync_model->current_user_can_synchronize( $post_id, $lang ) ) { + add_filter( 'is_sticky', array( $this, 'handle_sticky_post' ) ); + $this->sync_model->copy( $post_id, $lang, PLL_Sync_Post_Model::SYNC ); // Don't save the group inside the loop. + remove_filter( 'is_sticky', array( $this, 'handle_sticky_post' ) ); + } else { + unset( $languages[ $k ] ); + } + } + + // Save group if the languages metabox is displayed. + if ( ! empty( $_POST['post_lang_choice'] ) ) { + $this->sync_model->save_group( $post_id, $languages ); + } + + $avoid_recursion = false; + } + + /** + * + * Unsynchronize a post from the post translations group. + * + * @since 3.2 + * + * @param (int|string[])[] $tr List of translations with language codes as array keys and post IDs as array values. + * An optional element defined by the 'sync' key includes an array of synchronized translations + * with target language code as array keys and source language code as values. + * @param string $old_slug The old language slug. + * @param string $new_slug The new language slug. + * @return (int|string[])[] + */ + public function unsync_post( $tr, $old_slug, $new_slug ) { + if ( ! is_array( $tr ) || empty( $tr['sync'] ) || ! is_array( $tr['sync'] ) ) { + return $tr; + } + + // Delete sync between translations when deleting a language or update slug. + // Search old slug in array keys. + if ( array_key_exists( $old_slug, $tr['sync'] ) ) { + if ( ! empty( $new_slug ) && ! empty( $tr['sync'][ $old_slug ] ) ) { + $tr['sync'][ $new_slug ] = $tr['sync'][ $old_slug ]; + } + + unset( $tr['sync'][ $old_slug ] ); + } + + // Search old slug in array values. + if ( in_array( $old_slug, $tr['sync'], true ) ) { + foreach ( $tr['sync'] as $key => $value ) { + if ( $value !== $old_slug ) { + continue; + } + + // If new slug then replace it. + if ( $new_slug ) { + $tr['sync'][ $key ] = $new_slug; + } else { + // Otherwise unset the old slug. + unset( $tr['sync'][ $key ] ); + } + } + } + + return $tr; + } + + /** + * Some backward compatibility with Polylang < 2.6 + * allows for example to call PLL()->sync_post->are_synchronized() used in Polylang for WooCommerce + * + * @since 2.6 + * + * @throws BadFunctionCallException If the method is not found. + * + * @param string $func Function name. + * @param array $args Function arguments. + * @return mixed|void + */ + public function __call( $func, $args ) { + if ( method_exists( $this->sync_model, $func ) ) { + if ( WP_DEBUG ) { + $debug = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions + + trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions + sprintf( + '%1$s() was called incorrectly in %2$s on line %3$s: the call to PLL()->sync_post->%1$s() has been deprecated in Polylang 2.6, use PLL()->sync_post->sync_model->%1$s() instead.' . "\nError handler", + esc_html( $func ), + esc_html( $debug[0]['file'] ), + absint( $debug[0]['line'] ) + ) + ); + } + return call_user_func_array( array( $this->sync_model, $func ), $args ); + } + + $debug = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions + throw new BadFunctionCallException( + sprintf( + 'Call to undefined method PLL()->sync_post->%1$s() in %2$s on line %3$s' . "\nError handler", + esc_html( $func ), + esc_html( $debug[0]['file'] ), + absint( $debug[0]['line'] ) + ) + ); + } + + /** + * Filter the sticky status of a post. + * + * @since 3.2 + * + * @param bool $is_sticky Whether or not the source post is sticky. + * @return bool + */ + public function handle_sticky_post( $is_sticky ) { + if ( isset( $_POST['_inline_edit'], $_POST['action'] ) && wp_verify_nonce( $_POST['_inline_edit'], 'inlineeditnonce' ) && 'inline-save' === $_POST['action'] ) { + // For quick edit. + $is_sticky = isset( $_POST['sticky'] ) && 'sticky' === $_POST['sticky']; + } elseif ( isset( $_POST['_pll_nonce'], $_POST['action'] ) && wp_verify_nonce( $_POST['_pll_nonce'], 'pll_language' ) && 'editpost' === $_POST['action'] ) { + // For the classic editor. + $is_sticky = isset( $_POST['sticky'] ) && 'sticky' === $_POST['sticky']; + } elseif ( isset( $_GET['_wpnonce'], $_GET['action'], $_GET['sticky'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'bulk-posts' ) && 'edit' === $_GET['action'] ) { + // For bulk edit (note that 'sticky' can take 3 different values here). + switch ( $_GET['sticky'] ) { + case '-1': + break; + case 'unsticky': + $is_sticky = false; + break; + case 'sticky': + $is_sticky = true; + break; + } + } + + return $is_sticky; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync/load.php b/wp-content/plugins/polylang-pro/src/modules/sync/load.php new file mode 100644 index 0000000..bbb482f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync/load.php @@ -0,0 +1,13 @@ +model->has_languages() ) { + $polylang->sync_content = new PLL_Sync_Content( $polylang ); + $polylang->navigation = new PLL_Sync_Navigation( $polylang ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync/sync-block-parsing-rules.php b/wp-content/plugins/polylang-pro/src/modules/sync/sync-block-parsing-rules.php new file mode 100644 index 0000000..9ef3ace --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync/sync-block-parsing-rules.php @@ -0,0 +1,170 @@ + array( + 'attachment' => array( 'id' => true ), + ), + 'core/video' => array( + 'attachment' => array( 'id' => true ), + ), + 'core/image' => array( + 'attachment' => array( 'id' => true ), + ), + 'core/cover' => array( + 'attachment' => array( 'id' => true ), + ), + 'core/gallery' => array( + 'attachment' => array( 'ids' => true ), + ), + 'core/media-text' => array( + 'attachment' => array( 'mediaId' => true ), + ), + 'core/block' => array( + 'wp_block' => array( 'ref' => true ), + ), + ); + + /** + * Holds some rules as Xpath expressions to evaluate in the blocks content. + * Keep this list alphabetically sorted when adding entries. + * + * @var string[][] + * @phpstan-var array> + */ + private $parsing_rules = array(); + + /** + * Extracts translatable parts from HTML block content. + * Returns an array of XPath, empty if no rules defined. + * + * @since 3.7 + * + * @param array $block An array mimicking a {@see WP_Block_Parser_Block}. + * @return string[][] Parsing rules as array keys, strings to translate as array values. + * + * @phpstan-return array> + */ + public function html( array $block ): array { + $content = implode( PLL_Translation_Walker_Blocks::BLOCK_PLACEHOLDER, $block['innerContent'] ); + return array_map( + function ( $rules ) use ( $content ) { + return ( new PLL_DOM_Content( $content ) )->get_strings( $rules ); + }, + $this->get_xpath_rules( $block ) + ); + } + + /** + * Checks if a block has synchronized attributes (or not) and returns them. + * + * @since 3.7 + * + * @param array $block An array mimicking a {@see WP_Block_Parser_Block}. + * @return array An array with attributes to synchronize or an empty array. + * + * @phpstan-return array>> + */ + public function attributes( array $block ): array { + if ( empty( $block['attrs'] ) ) { + return array(); + } + + if ( ! isset( $this->cache['parsing_rules_attributes'] ) || ! is_array( $this->cache['parsing_rules_attributes'] ) ) { + /** + * Filters the list of blocks attributes to synchronize. + * + * @since 3.7 + * + * @param array $parsing_rules_attributes Rules for block attributes to synchronize. + * Array keys are block names for the 1st level, then attribute names for the next levels. + * Arrays values are `post`, `term`, `attachment` or an array containing sub attributes. + * Wildcards are allowed. Ex: + * array( + * 'block/name' => array( + * 'post' => array( + * 'sub_key_1' => true, + * 'sub_key_2' => array( + * 'sub_sub_key_*' => true, + * 'another_sub_sub_key_*' => true, + * ), + * ), + * 'term' => array( + * 'another_key' => true, + * ), + * ), + * ) + */ + $this->cache['parsing_rules_attributes'] = (array) apply_filters( 'pll_sync_block_rules_for_attributes', $this->parsing_rules_attributes ); + } + + if ( ! isset( $this->cache['parsing_rules_attributes'][ $block['blockName'] ] ) ) { + return array(); + } + + return $this->cache['parsing_rules_attributes'][ $block['blockName'] ]; + } + + /** + * Checks if a block has synchronized IDs in its content (or not) and returns their XPath rules. + * + * @since 3.7 + * + * @param array $block An array mimicking a {@see WP_Block_Parser_Block}. + * @return array An array with Xpath rules to synchronize as key, and type of content as value. Or an empty array. + * + * @phpstan-return array> + */ + private function get_xpath_rules( array $block ): array { + if ( empty( $block['innerHTML'] ) ) { + return array(); + } + + if ( ! isset( $this->cache['parsing_rules'] ) || ! is_array( $this->cache['parsing_rules'] ) ) { + /** + * Filters the rules as Xpath expressions to to synchronize IDs in the blocks content. + * + * @since 3.7 + * + * @param string[][] $parsing_rules Rules as Xpath expressions to synchronize IDs in the blocks content, with block name as first level key and type as second level key. + * Such as: + * array( + * 'block/name' => array( + * 'post' => array( '//p[@class="some-id"]' ), + * 'term' => array( '//p[@class="the-id"]' ), + * 'attachment' => array( '//p[@class="another-id"]' ), + * 'wp_block' => array( '//p[@class="an-id"]' ), + * ), + * ) + * @phpstan-param array> $parsing_rules + */ + $this->cache['parsing_rules'] = (array) apply_filters( 'pll_sync_blocks_xpath_rules', $this->parsing_rules ); + } + + if ( ! isset( $block['blockName'], $this->cache['parsing_rules'][ $block['blockName'] ] ) ) { + return array(); + } + + return $this->cache['parsing_rules'][ $block['blockName'] ]; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync/sync-blocks.php b/wp-content/plugins/polylang-pro/src/modules/sync/sync-blocks.php new file mode 100644 index 0000000..b11b10f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync/sync-blocks.php @@ -0,0 +1,472 @@ +model = $shortcodes->ids->model; + $this->options = $shortcodes->ids->model->options; + $this->ids = $shortcodes->ids; + $this->shortcodes = $shortcodes; + $this->html = $html; + $this->parsing_rules = new PLL_Sync_Block_Parsing_Rules(); + $this->source_post = $source_post; + } + + /** + * Recursively translates blocks. + * + * @since 3.7 + * + * @param string $content Content, ideally containing blocks. + * @param PLL_Language $target_language Target language. + * @param ?WP_Post $target_post Main target post object, default to null. + * @return string Content with translated blocks. + */ + public function translate( string $content, PLL_Language $target_language, ?WP_Post $target_post = null ): string { + $this->target_language = $target_language; + $this->target_post = $target_post; + + return serialize_blocks( + $this->walk_blocks( + parse_blocks( + $content + ) + ) + ); + } + + /** + * Walks through a list of blocks and apply translation on each of them if applicable. + * + * @since 3.7 + * + * @param array $blocks List of blocks to synchronize. + * @return array Synchronized list of blocks. + */ + private function walk_blocks( array $blocks ): array { + foreach ( $blocks as $k => $block ) { + if ( 'core/latest-posts' === $block['blockName'] ) { + /* + * `pll_blocks_attributes_to_synchronize` cannot be used to translate 'core/latest-posts' categories + * because it's stored as an array of data such as {'id': int, 'value':string}. + */ + if ( isset( $block['attrs']['categories'] ) ) { + $tr_ids = array(); + foreach ( $block['attrs']['categories'] as $term ) { + $tr_ids[] = $this->model->term->get( $term['id'], $this->target_language ); + } + + // Let's remove unfound translation results. + $tr_ids = array_filter( $tr_ids ); + + // If there is no translation, then the category is unset. + if ( empty( $tr_ids ) ) { + unset( $blocks[ $k ]['attrs']['categories'] ); + continue; + } + + // Query all the translated terms outside the loop to avoid multiple SQL queries with get_term() call. + $terms = get_terms( array( 'include' => $tr_ids, 'hide_empty' => false, 'fields' => 'id=>name' ) ); + + if ( ! is_array( $terms ) ) { + unset( $blocks[ $k ]['attrs']['categories'] ); + continue; + } + + $tr_data = array(); + foreach ( $terms as $id => $term_name ) { + $tr_data[] = array( + 'id' => $id, + 'value' => $term_name, + ); + } + if ( $tr_data ) { + $blocks[ $k ]['attrs']['categories'] = $tr_data; + } else { + unset( $blocks[ $k ]['attrs']['categories'] ); + } + } else { + unset( $blocks[ $k ]['attrs']['categories'] ); + } + continue; + } + + $blocks[ $k ] = $this->parse_html( + $this->parse_attributes( $blocks[ $k ] ) + ); + + if ( $this->options['media_support'] ) { + $blocks[ $k ] = $this->translate_media_block( $blocks[ $k ] ); + } + + if ( ! empty( $block['innerBlocks'] ) ) { + $blocks[ $k ]['innerBlocks'] = $this->walk_blocks( $block['innerBlocks'] ); + } + } + + /** + * Filters parsed blocks after core blocks have been translated. + * + * @since 2.5.3 + * @since 3.7 `$from_lang` parameter deprecated. + * + * @param array[] $blocks List of blocks. + * @param string $lang Language slug of target. + * @param string $deprecated Deprecated. Empty string. + */ + $blocks = (array) apply_filters( 'pll_translate_blocks', $blocks, $this->target_language->slug, '' ); + + /** + * Filters parsed blocks after core blocks have been translated with source post context. + * + * @since 3.7 + * + * @param array[] $blocks List of blocks. + * @param PLL_Language $target_language Target language. + * @param WP_Post|null $source_post Source post object, `null` if context agnostic. + */ + return (array) apply_filters( 'pll_translate_blocks_with_context', $blocks, $this->target_language, $this->source_post ); + } + + /** + * Translates media inner content. + * Attributes are now translated thanks to `pll_blocks_attributes_to_synchronize` filter. + * + * @since 3.3 + * + * @param array $block A representative array of a block. + * @return array The translated block. + */ + private function translate_media_block( $block ) { + switch ( $block['blockName'] ) { + case 'core/cover': + case 'core/image': + case 'core/gallery': + $block = $this->translate_inner_content( $block ); + + if ( empty( $block['attrs']['id'] ) || empty( $block['attrs']['alt'] ) ) { + break; + } + + $alt = get_post_meta( + $this->ids->translate( + (int) $block['attrs']['id'], + 'attachment', + $this->target_language, + $this->target_post + ), + '_wp_attachment_image_alt', + true + ); + + if ( ! empty( $alt ) ) { + $block['attrs']['alt'] = $alt; + } + break; + + case 'core/file': + $source_id = $block['attrs']['id']; + $tr_id = $this->ids->translate( $source_id, 'attachment', $this->target_language, $this->target_post ); + $block['attrs']['id'] = $tr_id; + $textarr = wp_html_split( $block['innerHTML'] ); + $source_post = get_post( $source_id ); + if ( ! $source_post instanceof WP_Post ) { + break; + } + $replace_file_link_text = 0 === strpos( $textarr[3], 'post_title; + if ( $replace_file_link_text ) { + $tr_post = get_post( (int) $tr_id ); + if ( $tr_post ) { + $textarr[4] = $tr_post->post_title; + $block['innerContent'][0] = implode( $textarr ); + $block['innerHTML'] = implode( $textarr ); + } + } + break; + + case 'core/media-text': + if ( isset( $block['attrs']['mediaLink'] ) ) { + $block['attrs']['mediaLink'] = preg_replace( + '#attachment_id=([0-9]+)#', + 'attachment_id=' . $block['attrs']['mediaId'], + $block['attrs']['mediaLink'] + ); + } + foreach ( $block['innerContent'] as $key => $content ) { + if ( ! empty( $content ) ) { + $block['innerContent'][ $key ] = $this->html->translate( $content, $this->target_language, $this->target_post ); + } + } + break; + + case 'core/shortcode': + $block['innerContent'][0] = $this->shortcodes->translate( $block['innerContent'][0], $this->target_language, $this->target_post ); + $block['innerHTML'] = $this->shortcodes->translate( $block['innerHTML'], $this->target_language, $this->target_post ); + break; + + default: + if ( ! empty( $block['innerHTML'] ) ) { + $block = $this->translate_inner_content( $block ); + } + break; + } + + return $block; + } + + /** + * Updates the block properties with a translation if it is found. + * + * @since 2.9 + * + * @param array $block An array mimicking the structure of {@see https://github.com/WordPress/WordPress/blob/5.5.1/wp-includes/class-wp-block-parser.php WP_Block_Parser_Block}. + * @return array The updated array formatted block. + */ + private function translate_inner_content( $block ) { + $inner_content_nb = count( $block['innerContent'] ); + for ( $i = 0; $i < $inner_content_nb; $i++ ) { + if ( ! empty( $block['innerContent'][ $i ] ) ) { + $block['innerContent'][ $i ] = $this->html->translate( + $this->shortcodes->translate( $block['innerContent'][ $i ], $this->target_language, $this->target_post ), + $this->target_language, + $this->target_post + ); + } + } + $block['innerHTML'] = $this->html->translate( // @FIXME Is imploding innerContent sufficient? + $this->shortcodes->translate( $block['innerHTML'], $this->target_language, $this->target_post ), + $this->target_language, + $this->target_post + ); + + return $block; + } + + /** + * Translates object IDs in attributes using predefined rules. + * + * @since 3.7 + * + * @param array $block An array of block data. + * @return array An array of translated block data. + */ + private function parse_attributes( array $block ): array { + if ( empty( $block['attrs'] ) ) { + return $block; + } + + $no_media = ! $this->options['media_support']; + $no_patterns = ! $this->model->post_types->is_translated( 'wp_block' ); + $attrs_by_types = $this->parsing_rules->attributes( $block ); + $attrs_by_types = array_filter( + $this->parsing_rules->attributes( $block ), + function ( $type ) use ( $no_media, $no_patterns ) { + if ( $no_media && 'attachment' === $type ) { + return false; + } + if ( $no_patterns && 'wp_block' === $type ) { + return false; + } + + return true; + }, + ARRAY_FILTER_USE_KEY + ); + + foreach ( $attrs_by_types as $type => $attrs ) { + $block['attrs'] = $this->translate_attributes_recursively( + $block['attrs'], + $type, + $attrs + ); + } + + return $block; + } + + /** + * Walks though an array of attributes recursilevely + * and translates object IDs. + * + * @since 3.7 + * + * @param array|scalar $attrs An array of attributes to parse, or an attribute value. + * @param string $type Translation type. Either `post`, `term`, `attachment` or `wp_block`. + * @param string[]|string $attributes_to_translate Optional. An array of attributes to synchronize, object type otherwise (`post` or `term`). + * @return array|scalar An array of parsed attributes, or a translated attribute value. + * + * @phpstan-param array|string $attributes_to_translate + * @phpstan-return ( + * $attrs is array ? array : scalar + * ) + */ + private function translate_attributes_recursively( $attrs, $type, $attributes_to_translate ) { + if ( empty( $attributes_to_translate ) ) { + return $attrs; + } + + if ( is_array( $attributes_to_translate ) ) { + // We have sub-keys to match. + if ( ! is_array( $attrs ) ) { + // No more attributes. + return $attrs; + } + + $matcher = new PLL_Format_Util(); + + foreach ( $attributes_to_translate as $attribute_name => $attribute_sub_fields ) { + // Find the attributes matching `$attribute_name` (may contain wildcards). + $entries = $matcher->filter_list( $attrs, (string) $attribute_name ); + + foreach ( $entries as $key => $values ) { + // Parse sub-attributes. + $attrs[ $key ] = $this->translate_attributes_recursively( $attrs[ $key ], $type, $attribute_sub_fields ); + } + } + + return $attrs; + } + + $ids = $attrs; + $no_list = is_array( $attrs ) || ( strpos( (string) $attrs, ',' ) === false ); + $separator = ''; + if ( is_string( $ids ) && ! $no_list ) { + preg_match( '/(?\s|,)/', $ids, $matches ); + $separator = $matches['separator'] ?? ''; + $ids = wp_parse_id_list( $ids ); + } + + if ( is_array( $ids ) ) { + foreach ( $ids as $k => $id ) { + $ids[ $k ] = $this->ids->translate( $id, $type, $this->target_language, $this->target_post ); + } + } else { + $ids = $this->ids->translate( $ids, $type, $this->target_language, $this->target_post ); + } + + return $no_list ? $ids : implode( $separator, (array) $ids ); + } + + /** + * Translates object IDs in a block HTML content. + * + * @since 3.7 + * + * @param array $block An array of block data. + * @return array An array of translated block data. + */ + private function parse_html( array $block ): array { + if ( empty( $block['innerContent'] ) ) { + return $block; + } + + $xpath_rules = $this->parsing_rules->html( $block ); + foreach ( $xpath_rules as $object_type => $paths ) { + $updated_strings = array(); + foreach ( $paths as $path => $ids ) { + preg_match( '/(?\s|,)/', $ids, $matches ); + $ids = wp_parse_id_list( $ids ); + $separator = $matches['separator'] ?? ''; + if ( empty( $ids ) ) { + continue; + } + + $tr_ids = array(); + foreach ( $ids as $id ) { + $tr_ids[] = (string) $this->ids->translate( $id, $object_type, $this->target_language, $this->target_post ); + } + $updated_strings[ $path ] = implode( $separator, $tr_ids ); + } + + if ( empty( $updated_strings ) ) { + continue; + } + + $translated_content = ( new PLL_DOM_Content( + implode( PLL_Translation_Walker_Blocks::BLOCK_PLACEHOLDER, $block['innerContent'] ) + ) )->replace_content( $updated_strings ); + $block['innerContent'] = explode( PLL_Translation_Walker_Blocks::BLOCK_PLACEHOLDER, $translated_content ); + } + + $block['innerHTML'] = implode( '', $block['innerContent'] ); + + return $block; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync/sync-content.php b/wp-content/plugins/polylang-pro/src/modules/sync/sync-content.php new file mode 100644 index 0000000..9ddf598 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync/sync-content.php @@ -0,0 +1,243 @@ +options = &$polylang->model->options; + $this->model = &$polylang->model; + $sync_ids = new PLL_Sync_Ids( $this->model ); + $this->shortcodes = new PLL_Sync_Shortcodes( $sync_ids ); + $this->html = new PLL_Sync_HTML( $sync_ids ); + } + + /** + * Copy the content from one post to the other + * + * @since 1.9 + * + * @param WP_Post $from_post The post to copy from. + * @param WP_Post $target_post The post to copy to. + * @param PLL_Language|string $target_language The language of the post to copy to. + * @return WP_Post + */ + public function copy_content( $from_post, $target_post, $target_language ) { + $from_language = $this->model->post->get_language( $from_post->ID ); + $target_language = $this->model->get_language( $target_language ); + + if ( ! $from_language || ! $target_language ) { + return $target_post; + } + + $target_post->post_title = $from_post->post_title; + $target_post->post_name = wp_unique_post_slug( + $from_post->post_name, + $target_post->ID, + $target_post->post_status, + $target_post->post_type, + $target_post->post_parent + ); + $target_post->post_excerpt = $this->translate( + $from_post->post_excerpt, + $target_language, + $target_post, + $from_post + ); + $target_post->post_content = $this->translate( + $from_post->post_content, + $target_language, + $target_post, + $from_post + ); + + return $target_post; + } + + /** + * Translates shortcodes, HTML and blocks in text. + * + * @since 1.9 + * @since 3.3 Requires $target_post, $from_language and $target_language parameters. + * @since 3.7 Deprecate `$from_language` argument and move `$target_language` to third position. + * + * @param string $content Text to translate. + * @param ?WP_Post $target_post The post object to translate to, pass `null` if the content is not post related. + * @param PLL_Language $target_language The language to translate to. + * @param PLL_Language $deprecated Deprecated target language object for backward compatibility. + * @return string Translated text + */ + public function translate_content( $content, ?WP_Post $target_post, PLL_Language $target_language, ?PLL_Language $deprecated = null ) { + if ( $deprecated instanceof PLL_Language ) { + $target_language = $deprecated; + + _deprecated_argument( + __METHOD__, + '3.7', + 'You must use only 3 arguments, `$target_language` as third.' + ); + } + + return $this->translate( $content, $target_language, $target_post ); + } + + /** + * Duplicates the feature image if the translation does not exist yet. + * + * @since 2.3 + * + * @param int $id Thumbnail ID. + * @param string $key Meta key. + * @param string $lang Language code. + * @return int + */ + public function duplicate_thumbnail( $id, $key, $lang ) { + if ( '_thumbnail_id' !== $key ) { + return $id; + } + + $tr_id = $this->model->post->get( $id, $lang ); + if ( empty( $tr_id ) ) { + $tr_id = $this->model->post->create_media_translation( $id, $lang ); + } + + return empty( $tr_id ) ? $id : $tr_id; + } + + /** + * Duplicates a term if the translation does not exist yet. + * + * @since 2.3 + * + * @param int $tr_term_id Translated term id. + * @param int $term_id Source term id. + * @param string $lang Language slug. + * @return int The translated term id. O on failure. + */ + public function duplicate_term( $tr_term_id, $term_id, $lang ) { + if ( empty( $tr_term_id ) ) { + $term = get_term( $term_id ); + + if ( $term instanceof WP_Term ) { + $language = $this->model->term->get_language( $term->term_id ); + + if ( $language && $language->slug !== $lang ) { // Create a new term translation only if the source term has a language. + $tr_parent = empty( $term->parent ) ? 0 : (int) $this->model->term->get_translation( $term->parent, $lang ); + + // Duplicate the parent if the parent translation doesn't exist yet. + if ( empty( $tr_parent ) && ! empty( $term->parent ) ) { + $tr_parent = $this->duplicate_term( 0, $term->parent, $lang ); + } + + $args = array( + 'description' => wp_slash( $term->description ), + 'parent' => $tr_parent, + ); + + if ( $this->options['force_lang'] ) { + // Share slugs + $args['slug'] = $term->slug . '___' . $lang; + } else { + // Language set from the content: assign a different slug + // otherwise we would change the current term language instead of creating a new term + $args['slug'] = sanitize_title( $term->name ) . '-' . $lang; + } + + $t = wp_insert_term( wp_slash( $term->name ), $term->taxonomy, $args ); + + $tr_term_id = 0; + + if ( is_array( $t ) ) { + $tr_term_id = $t['term_id']; + $this->model->term->set_language( $tr_term_id, $lang ); + $translations = $this->model->term->get_translations( $term->term_id ); + $translations[ $lang ] = $tr_term_id; + $this->model->term->save_translations( $term->term_id, $translations ); + + /** + * Fires after a term translation is automatically created when duplicating a post. + * + * @since 2.3.8 + * + * @param int $from Term ID of the source term. + * @param int $to Term ID of the new term translation. + * @param string $lang Language code of the new translation. + */ + do_action( 'pll_duplicate_term', $term->term_id, $tr_term_id, $lang ); + } + } + } + } + return $tr_term_id; + } + + /** + * Translates a piece of content, using source post context if available. + * + * @since 3.7 + * + * @param string $content Content to translate. + * @param PLL_Language $target_language The language to translate to. + * @param WP_Post|null $target_post The target post object, pass `null` if the content is not post related. Default to `null`. + * @param WP_Post|null $source_post The source post object, pass `null` if the content doesn't need this context. Default to `null`. + * @return string Translated content. + */ + private function translate( $content, PLL_Language $target_language, ?WP_Post $target_post = null, ?WP_Post $source_post = null ) { + if ( has_blocks( $content ) ) { + $content = ( new PLL_Sync_Blocks( $this->shortcodes, $this->html, $source_post ) )->translate( $content, $target_language, $target_post ); + } else { + $content = $this->html->translate( + $this->shortcodes->translate( $content, $target_language, $target_post ), + $target_language, + $target_post + ); + } + + return $content; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync/sync-html.php b/wp-content/plugins/polylang-pro/src/modules/sync/sync-html.php new file mode 100644 index 0000000..9fda4ab --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync/sync-html.php @@ -0,0 +1,165 @@ +ids = $ids; + $this->options = $ids->model->options; + } + + /** + * Translates images and caption in HTML. + * + * @since 3.7 + * + * @param string $content HTML string. + * @param PLL_Language $target_language Target language. + * @param WP_Post|null $target_post Main target post object. + * @return string Translated HTML. + */ + public function translate( string $content, PLL_Language $target_language, ?WP_Post $target_post ): string { + if ( ! $this->options['media_support'] ) { + return $content; + } + + $this->target_language = $target_language; + $this->target_post = $target_post; + + $textarr = wp_html_split( $content ); // Since 4.2.3 + + $img_ids = array(); + foreach ( $textarr as $i => $text ) { + // Translate img class and alternative text + if ( + 0 === strpos( $text, 'translate_img( $textarr[ $i ] ); + } + } + + if ( empty( $img_ids ) ) { + return $content; + } + + $new_content = implode( $textarr ); + $key = 0; + $new_content = preg_replace_callback( + '@(?)(.+?)(?)@', + function ( $matches ) use ( $img_ids, &$key ) { + $tr_post = get_post( $img_ids[ $key ] ); + $key++; + if ( ! empty( $tr_post->post_excerpt ) ) { + return $matches['before'] . $tr_post->post_excerpt . $matches['after']; + } else { + return $matches[0]; + } + }, + $new_content + ); + + if ( is_string( $new_content ) ) { + return $new_content; + } + + return $content; + } + + /** + * Translates 'class' and 'alt' attributes. + * + * @since 1.9 + * @since 2.5 The html is passed by reference and the return value is the image ID. + * + * @param string $text Reference to html with attributes. + * @return null|int Translated image id if exist. + */ + private function translate_img( &$text ) { + $attributes = wp_kses_attr_parse( $text ); // since WP 4.2.3 + + if ( ! is_array( $attributes ) ) { + return null; + } + + // Replace class + foreach ( $attributes as $k => $attr ) { + if ( 0 === strpos( $attr, 'class' ) && preg_match( '#wp\-image\-([0-9]+)#', $attr, $matches ) && ! empty( $matches[1] ) ) { + $tr_id = $this->ids->translate( (int) $matches[1], 'attachment', $this->target_language, $this->target_post ); + $attributes[ $k ] = str_replace( 'wp-image-' . $matches[1], 'wp-image-' . $tr_id, $attr ); + + } + + if ( preg_match( '#^data\-id="([0-9]+)#', $attr, $matches ) && ! empty( $matches[1] ) ) { + $tr_id = $this->ids->translate( (int) $matches[1], 'attachment', $this->target_language, $this->target_post ); + $attributes[ $k ] = str_replace( 'data-id="' . $matches[1], 'data-id="' . $tr_id, $attr ); + } + + if ( 0 === strpos( $attr, 'data-link' ) && preg_match( '#attachment_id=([0-9]+)#', $attr, $matches ) && ! empty( $matches[1] ) ) { + $tr_id = $this->ids->translate( (int) $matches[1], 'attachment', $this->target_language, $this->target_post ); + $attributes[ $k ] = str_replace( 'attachment_id=' . $matches[1], 'attachment_id=' . $tr_id, $attr ); + } + } + + if ( ! empty( $tr_id ) ) { + // Got a tr_id, attempt to replace the alt text + $alt = get_post_meta( (int) $tr_id, '_wp_attachment_image_alt', true ); + if ( is_string( $alt ) && ! empty( $alt ) ) { + foreach ( $attributes as $k => $attr ) { + if ( 0 === strpos( $attr, 'alt' ) ) { + $attributes[ $k ] = 'alt="' . esc_attr( $alt ) . '" '; + } + if ( 0 === strpos( $attr, 'aria-label' ) ) { + $attributes[ $k ] = 'aria-label="' . esc_attr( $alt ) . '" '; + } + } + } + } + + $text = implode( $attributes ); + + return empty( $tr_id ) ? null : $tr_id; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync/sync-ids.php b/wp-content/plugins/polylang-pro/src/modules/sync/sync-ids.php new file mode 100644 index 0000000..ffe3b48 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync/sync-ids.php @@ -0,0 +1,116 @@ +model = $model; + } + /** + * Translates a single ID according to the given type. + * + * @since 3.7 + * + * @param mixed $id Numeric value of the source object ID. + * @param string $type Object type (`post`, `term`, `attachment` or `wp_block`). + * @param PLL_Language $target_language Target language. + * @param WP_Post|null $target_post Main target post object. Default to `null`, meaning not saved yet or not applicable. + * @return string|int Translated ID, `0` if not found. + * + * @phpstan-return ($id is int ? int : string) + */ + public function translate( $id, string $type, PLL_Language $target_language, ?WP_Post $target_post = null ) { + if ( ! is_numeric( $id ) ) { + return 0; + } + + $result = 0; + switch ( $type ) { + case 'post': + $result = $this->model->post->get( (int) $id, $target_language ); + break; + + case 'term': + $result = $this->model->term->get( (int) $id, $target_language ); + break; + + case 'attachment': + global $wpdb; + + $result = $this->model->post->get( (int) $id, $target_language ); + if ( empty( $result ) ) { + $result = $this->model->post->create_media_translation( (int) $id, $target_language ); + } + + // If we don't have a translation and did not success to create one, return current media + if ( empty( $result ) ) { + break; + } + + // Attach to the translated post + if ( ! wp_get_post_parent_id( $result ) && $target_post instanceof WP_Post && 0 < (int) $target_post->ID ) { + // Query inspired by wp_media_attach_action() + $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_parent = %d WHERE post_type = 'attachment' AND ID = %d", (int) $target_post->ID, $result ) ); + clean_attachment_cache( $result ); + } + break; + + case 'wp_block': + // Smart copy. + $result = $this->model->post->get( (int) $id, $target_language ); + + if ( ! empty( $result ) ) { + break; + } + + $post = get_post( (int) $id ); + if ( empty( $post ) ) { + break; + } + + $post->ID = 0; + $tr_id = $this->model->post->insert( + array_merge( + $post->to_array(), + array( + 'translations' => $this->model->post->get_translations( (int) $id ), + ) + ), + $target_language + ); + + $result = is_wp_error( $tr_id ) ? $id : $tr_id; + + break; + + default: + _doing_it_wrong( + __METHOD__ . '()', + 'Please use a known type has second parameter `$type`. Either `post`, `term`, `attachment` or `wp_block`', + '3.7' + ); + break; + } + + // Ensure type is the same. + return is_string( $id ) ? (string) $result : (int) $result; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync/sync-navigation.php b/wp-content/plugins/polylang-pro/src/modules/sync/sync-navigation.php new file mode 100644 index 0000000..4b0efa9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync/sync-navigation.php @@ -0,0 +1,242 @@ +model = &$polylang->model; + $this->sync_content = &$polylang->sync_content; + + add_filter( 'pll_translate_blocks', array( $this, 'translate_blocks' ), 10, 2 ); + add_filter( 'pll_get_post_types', array( $this, 'add_post_type' ), 10, 2 ); + } + + /** + * Adds the wp_navigation post type to the list of translatable post types. + * + * @since 3.2 + * + * @param string[] $post_types List of post types. + * @param bool $is_settings True when displaying the list of custom post types in Polylang settings. + * @return string[] + */ + public function add_post_type( $post_types, $is_settings = false ) { + if ( $is_settings || ! is_array( $post_types ) ) { + return $post_types; + } + + $post_types['wp_navigation'] = 'wp_navigation'; + + return $post_types; + } + + /** + * Recursively translate navigation blocks. + * + * @since 3.2 + * @since 3.7 `$from_language` parameter removed. + * + * @param array[] $blocks An array of block arrays. + * @param string $language Slug language of the target post. + * @return array Array of translated blocks. + */ + public function translate_blocks( $blocks, $language ) { + foreach ( $blocks as $k => $block ) { + switch ( $block['blockName'] ) { + case 'core/navigation': + if ( array_key_exists( 'ref', $blocks[ $k ]['attrs'] ) ) { + $blocks[ $k ]['attrs']['ref'] = $this->translate_navigation_block( $block['attrs']['ref'], $language ); + } + + if ( array_key_exists( 'overlay', $blocks[ $k ]['attrs'] ) ) { + $blocks[ $k ]['attrs']['overlay'] = $this->translate_overlay_slug( $block['attrs']['overlay'], $language ); + } + + break; + case 'core/navigation-link': + if ( array_key_exists( 'id', $blocks[ $k ]['attrs'] ) && array_key_exists( 'kind', $blocks[ $k ]['attrs'] ) ) { + $blocks[ $k ]['attrs'] = array_merge( $blocks[ $k ]['attrs'], $this->translate_navigation_link( $block['attrs']['id'], $block['attrs']['kind'], $language ) ); + } + break; + case 'core/navigation-submenu': + // If there is attrs id and kind, the submenu top level item menu is a navigation link . + if ( array_key_exists( 'id', $blocks[ $k ]['attrs'] ) && array_key_exists( 'kind', $blocks[ $k ]['attrs'] ) ) { + $blocks[ $k ]['attrs'] = array_merge( $blocks[ $k ]['attrs'], $this->translate_navigation_link( $block['attrs']['id'], $block['attrs']['kind'], $language ) ); + } + + if ( ! empty( $block['innerBlocks'] ) ) { + $blocks[ $k ]['innerBlocks'] = $this->translate_blocks( $block['innerBlocks'], $language ); + } + break; + } + } + return $blocks; + } + + /** + * Get the navigation link id. + * + * @since 3.2 + * @since 3.7 Visibility changed to private. + * + * @param int $id Navigation link id. + * @param string $kind Link type (post-type or taxonomy). + * @param string $language Slug language of the target post. + * @return array An array with the untranslated id if the navigation link post type isn't translated, or an array + * with the translated id, label and url. + */ + private function translate_navigation_link( $id, $kind, $language ) { + if ( 'post-type' === $kind ) { + $tr_post_id = $this->model->post->get( $id, $language ); + if ( $tr_post_id ) { + $tr_post = get_post( $tr_post_id ); + + return array( + 'id' => $tr_post_id, + 'label' => $tr_post->post_title, + 'url' => get_permalink( $tr_post_id ), + ); + } + } elseif ( 'taxonomy' === $kind ) { + $tr_term_id = $this->model->term->get( $id, $language ); + if ( $tr_term_id ) { + $tr_term = get_term( $tr_term_id ); + + return $tr_term instanceof WP_Term ? array( + 'id' => $tr_term_id, + 'label' => $tr_term->name, + 'url' => get_category_link( $tr_term_id ), + ) : array(); + } + } + return array( 'id' => $id ); + } + + /** + * Get the navigation block translation id. + * Create the translation if it does not exist. + * + * @since 3.2 + * @since 3.7 Visibility changed to private and `$from_language` parameter removed. + * + * @param int $id Navigation block id. + * @param string $language Slug language of the target post. + * @return int Id of the translated navigation block. 0 on failure. + */ + private function translate_navigation_block( $id, $language ) { + $tr_id = $this->model->post->get( $id, $language ); + + // If we don't have a translation, then we create it. + if ( ! $tr_id ) { + $tr_id = $this->create_navigation_block_translation( $id, $language ); + } + + // Check the content of the navigation block post to see if there is any block to translate. + $tr_post = get_post( $tr_id ); + + if ( ! $tr_post instanceof WP_Post ) { + // Something went wrong! + return $id; + } + + $target_language = $this->model->get_language( $language ); + + if ( ! $target_language instanceof PLL_Language ) { + // Something went wrong! + return $tr_id; + } + + $tr_content = $this->sync_content->translate_content( $tr_post->post_content, $tr_post, $target_language ); + if ( $tr_content !== $tr_post->post_content ) { + $tr_post->post_content = $tr_content; + wp_update_post( $tr_post ); + } + + return $tr_id; + } + + /** + * Creates a navigation block translation. + * + * @since 3.2 + * @since 3.7 Visibility changed to private and `$from_language` parameter removed. + * + * @param int $id The source navigation block ID. + * @param string $lang New translation language slug. + * @return int ID of the translated navigation block. 0 on failure. + */ + private function create_navigation_block_translation( $id, $lang ) { + $tr_post = get_post( $id ); + + if ( empty( $tr_post ) ) { + return $id; + } + + $tr_post->ID = 0; + $tr_id = wp_insert_post( wp_slash( $tr_post->to_array() ) ); + + $this->model->post->set_language( $tr_id, $lang ); + $translations = $this->model->post->get_translations( $id ); + $translations[ $lang ] = $tr_id; + $this->model->post->save_translations( $id, $translations ); + + return $tr_id; + } + + /** + * Translates an overlay slug for a navigation block's overlay attribute. + * + * @since 3.8 + * + * @param string $overlay_slug The overlay slug. + * @param string $language Slug language of the target post. + * @return string The translated overlay slug or original if translation doesn't exist. + */ + private function translate_overlay_slug( $overlay_slug, $language ) { + if ( empty( $overlay_slug ) ) { + return $overlay_slug; + } + + $language = $this->model->get_language( $language ); + if ( ! $language ) { + return $overlay_slug; + } + + $template = PLL_FSE_Tools::query_template_post( + $overlay_slug, + get_stylesheet(), + 'wp_template_part', + $language + ); + + return $template ? $template->post_name : $overlay_slug; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/sync/sync-shortcodes.php b/wp-content/plugins/polylang-pro/src/modules/sync/sync-shortcodes.php new file mode 100644 index 0000000..d536b98 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/sync/sync-shortcodes.php @@ -0,0 +1,159 @@ +ids = $ids; + $this->options = $ids->model->options; + } + + /** + * Translates shortcodes from a given content. + * + * @since 3.7 + * + * @global array $shortcode_tags + * + * @param string $content Content to translate. + * @param PLL_Language $target_language Target language. + * @param WP_Post|null $target_post Main target post object. + * @return string Content with its shortcodes translated. + */ + public function translate( string $content, PLL_Language $target_language, ?WP_Post $target_post ): string { + global $shortcode_tags; + + if ( ! $this->options['media_support'] ) { + return $content; + } + + $this->target_language = $target_language; + $this->target_post = $target_post; + + // Hack shortcodes. + $backup = $shortcode_tags; + $shortcode_tags = array(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + + // Add our own shorcode actions. + add_shortcode( 'gallery', array( $this, 'ids_list_shortcode' ) ); + add_shortcode( 'playlist', array( $this, 'ids_list_shortcode' ) ); + add_shortcode( 'caption', array( $this, 'caption_shortcode' ) ); + add_shortcode( 'wp_caption', array( $this, 'caption_shortcode' ) ); + + $content = do_shortcode( $content ); // Translate shortcodes. + + // Get the shorcodes back. + $shortcode_tags = $backup; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + + return $content; + } + + /** + * Translates the 'gallery' and 'playlist' shortcodes + * + * @since 1.9 + * @since 3.7 Moved from `PLL_Sync_Content` to `PLL_Sync_Shortcodes`. + * + * @param string[] $attr Shortcode attributes. + * @param string|null $null Shortcode content, not used. + * @param string $tag Shortcode tag (either 'gallery' or 'playlist'). + * @return string Translated shortcode. + */ + public function ids_list_shortcode( $attr, $null, $tag ) { + $out = array(); + + foreach ( $attr as $k => $v ) { + if ( 'ids' === $k ) { + $ids = explode( ',', $v ); + $tr_ids = array(); + foreach ( $ids as $id ) { + $tr_ids[] = $this->ids->translate( (int) $id, 'attachment', $this->target_language, $this->target_post ); + } + $v = implode( ',', $tr_ids ); + } + $out[] = $k . '="' . $v . '"'; + } + + return '[' . $tag . ' ' . implode( ' ', $out ) . ']'; + } + + /** + * Translates the caption shortcode + * Compatible only with the new style introduced in WP 3.4 + * + * @since 1.9 + * @since 3.7 Moved from `PLL_Sync_Content` to `PLL_Sync_Shortcodes`. + * + * @param string[] $attr Shortcode attribute. + * @param string|null $content Shortcode content. + * @param string $tag Shortcode tag (either 'caption' or 'wp-caption'). + * @return string Translated shortcode. + */ + public function caption_shortcode( $attr, $content, $tag ) { + // Translate the caption id. + $out = array(); + + foreach ( $attr as $k => $v ) { + if ( 'id' === $k ) { + $idarr = explode( '_', $v ); + $id = $idarr[1]; // Remember this. + $tr_id = $this->ids->translate( (int) $id, 'attachment', $this->target_language, $this->target_post ); + $idarr[1] = $tr_id; + $v = implode( '_', $idarr ); + } + $out[] = $k . '="' . $v . '"'; + } + + // Translate the caption content. + if ( ! empty( $id ) && ! empty( $tr_id ) ) { + $p = get_post( (int) $id ); + $tr_p = get_post( (int) $tr_id ); + if ( $p && $tr_p ) { + $content = str_replace( $p->post_excerpt, $tr_p->post_excerpt, (string) $content ); + } + } + + return '[' . $tag . ' ' . implode( ' ', $out ) . ']' . $content . '[/' . $tag . ']'; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/translate-slugs/frontend-translate-slugs.php b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/frontend-translate-slugs.php new file mode 100644 index 0000000..fb49803 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/frontend-translate-slugs.php @@ -0,0 +1,223 @@ +model = &$slugs_model->model; + $this->links_model = &$slugs_model->links_model; + + // Translates slugs in archive link. + if ( $this->links_model->using_permalinks ) { + foreach ( array( 'author_link', 'search_link', 'get_pagenum_link', 'attachment_link' ) as $filter ) { + add_filter( $filter, array( $this, 'translate_slug' ), 20 ); + } + } + + add_filter( 'pll_get_archive_url', array( $this, 'pll_get_archive_url' ), 10, 2 ); + add_filter( 'pll_check_canonical_url', array( $this, 'pll_check_canonical_url' ), 10, 2 ); + add_action( 'template_redirect', array( $this, 'fix_wp_rewrite' ), 1 ); // After the language is set (when set from content). + + add_filter( 'pll_remove_paged_from_link', array( $this, 'remove_paged_from_link' ), 10, 2 ); + add_filter( 'pll_add_paged_to_link', array( $this, 'add_paged_to_link' ), 10, 3 ); + } + + /** + * Translate the slugs in archive urls + * + * @since 1.9 + * + * @param string $url The archive url in which we want to translate a slug. + * @param PLL_Language $language The language. + * @return string Modified url. + */ + public function pll_get_archive_url( $url, $language ) { + global $wp_rewrite; + + if ( is_post_type_archive() ) { + /** @var WP_Post_Type */ + $post_type = get_queried_object(); + $url = $this->slugs_model->switch_translated_slug( $url, $language, 'archive_' . $post_type->name ); + } + + if ( is_tax( 'post_format' ) ) { + /** @var WP_Term */ + $term = get_queried_object(); + + $url = $this->slugs_model->switch_translated_slug( $url, $language, 'post_format' ); + $url = $this->slugs_model->switch_translated_slug( $url, $language, $term->slug ); + } + + if ( is_author() ) { + $url = $this->slugs_model->switch_translated_slug( $url, $language, 'author' ); + } + + if ( is_search() ) { + $url = $this->slugs_model->switch_translated_slug( $url, $language, 'search' ); + } + + if ( ! empty( $wp_rewrite->front ) && trim( $wp_rewrite->front, '/' ) ) { + $url = $this->slugs_model->switch_translated_slug( $url, $language, 'front' ); + } + + $url = $this->links_model->remove_paged_from_link( $url ); + + return $url; + } + + /** + * Modifies the canonical url with the translated slugs. + * + * @since 1.9 + * + * @param string $redirect_url The canonical url to redirect to as evaluated in Polylang. + * @param PLL_Language $language The language. + * @return string Modified canonical url. + */ + public function pll_check_canonical_url( $redirect_url, $language ) { + global $wp_rewrite; + + $slugs = array(); + + if ( is_post_type_archive() ) { + /** @var WP_Post_Type */ + $obj = get_queried_object(); + $slugs[] = 'archive_' . $obj->name; + } + + elseif ( is_single() || is_page() ) { + $post = get_post(); + + if ( isset( $post->ID ) && $this->model->is_translated_post_type( $post->post_type ) ) { + $slugs[] = $post->post_type; + } + } + + elseif ( is_category() || is_tag() || is_tax() ) { + /** @var WP_Term|null */ + $obj = get_queried_object(); + + if ( ! empty( $obj ) ) { + if ( $this->model->is_translated_taxonomy( $obj->taxonomy ) ) { + $slugs[] = $obj->taxonomy; + } elseif ( 'post_format' === $obj->taxonomy ) { + $slugs[] = 'post_format'; + $slugs[] = $obj->slug; + } + } + } + + elseif ( is_author() ) { + $slugs[] = 'author'; + } + + if ( is_paged() ) { + $slugs[] = 'paged'; + } + + if ( ! empty( $wp_rewrite->front ) && trim( $wp_rewrite->front, '/' ) ) { + $slugs[] = 'front'; + } + + foreach ( $slugs as $slug ) { + $redirect_url = $this->slugs_model->switch_translated_slug( $redirect_url, $language, $slug ); + } + + return $redirect_url; + } + + /** + * Hack rewrite bases of $wp_rewrite + * Especially important for the pagination base to avoid WP canonical url breaking + * + * @since 1.9 + * + * @return void + */ + public function fix_wp_rewrite() { + global $wp_rewrite; + + if ( isset( $this->slugs_model->translated_slugs['author'] ) ) { + $wp_rewrite->author_base = $this->slugs_model->translated_slugs['author']['translations'][ $this->curlang->slug ]; + } + + if ( isset( $this->slugs_model->translated_slugs['search'] ) ) { + $wp_rewrite->search_base = $this->slugs_model->translated_slugs['search']['translations'][ $this->curlang->slug ]; + } + + if ( isset( $this->slugs_model->translated_slugs['paged'] ) ) { + $wp_rewrite->pagination_base = $this->slugs_model->get_translated_slug( 'paged', $this->curlang->slug ); + } + } + + /** + * If the paged slug is translated, PLL_Links_Model::remove_paged_from_link does not work + * so here is a replacement + * + * @since 1.9 + * + * @param string $_link Url to modify. + * @param string $link Original url to modify. + * @return string Modified link. + */ + public function remove_paged_from_link( $_link, $link ) { + if ( isset( $this->slugs_model->translated_slugs['paged'] ) ) { + $slugs = $this->slugs_model->translated_slugs['paged']['translations']; + $slugs[] = $this->slugs_model->translated_slugs['paged']['slug']; + $slugs = $this->slugs_model->encode_deep( $slugs ); + + return preg_replace( + '#/(' . implode( '|', array_unique( $slugs ) ) . ')/[0-9]+/#', + '/', + $link + ); + } + return $_link; + } + + /** + * Returns the link to the paged page when translating the 'page' slug + * + * @since 2.0.6 + * + * @param string $_url Url to modify. + * @param string $url Original url to modify. + * @param int $page The page number. + * @return string Modified url. + */ + public function add_paged_to_link( $_url, $url, $page ) { + if ( isset( $this->slugs_model->translated_slugs['paged'] ) ) { + $slug = $this->slugs_model->get_translated_slug( 'paged', $this->curlang->slug ); + return user_trailingslashit( trailingslashit( $url ) . $slug . '/' . $page, 'paged' ); + } + return $_url; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/translate-slugs/load.php b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/load.php new file mode 100644 index 0000000..75efe8f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/load.php @@ -0,0 +1,33 @@ +model->has_languages() ) { + add_filter( + 'pll_settings_modules', + function ( $modules ) { + $k = array_search( 'PLL_Settings_Preview_Translate_Slugs', $modules, true ); + if ( $k ) { + $modules[ $k ] = 'PLL_Settings_Translate_Slugs'; + } + return $modules; + }, + 20 // After Polylang. + ); + + if ( get_option( 'permalink_structure' ) ) { + $slugs_model = new PLL_Translate_Slugs_Model( $polylang ); + + if ( $polylang instanceof PLL_Frontend ) { + $polylang->translate_slugs = new PLL_Frontend_Translate_Slugs( $slugs_model, $polylang->curlang ); + } else { + $curlang = isset( $polylang->curlang ) ? $polylang->curlang : null; + $polylang->translate_slugs = new PLL_Translate_Slugs( $slugs_model, $curlang ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/translate-slugs/settings-translate-slugs.php b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/settings-translate-slugs.php new file mode 100644 index 0000000..dc5c73f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/settings-translate-slugs.php @@ -0,0 +1,44 @@ + 'none' ) ); + } + + /** + * Returns the module description. + * + * @since 3.1 + * + * @return string + */ + protected function get_description() { + return parent::get_description() . ' ' . __( 'The module is automatically deactivated when using plain permalinks.', 'polylang-pro' ); + } + + /** + * Tells if the module is active. + * + * @since 1.9 + * + * @return bool + */ + public function is_active() { + return get_option( 'permalink_structure' ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/translate-slugs/translate-slugs-model.php b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/translate-slugs-model.php new file mode 100644 index 0000000..e5ff79c --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/translate-slugs-model.php @@ -0,0 +1,611 @@ +model = &$polylang->model; + $this->links_model = &$polylang->links_model; + + add_action( 'switch_blog', array( $this, 'switch_blog' ), 20, 2 ); // After `PLL_Base::switch_blog()`. + + add_action( 'wp_loaded', array( $this, 'init_translated_slugs' ), 1 ); + + // Make sure to prepare rewrite rules when flushing. + add_action( 'pll_prepare_rewrite_rules', array( $this, 'prepare_rewrite_rules' ), 20 ); // After Polylang. + + // Flush rewrite rules when saving string translations. + add_action( 'pll_save_strings_translations', array( $this, 'flush_rewrite_rules' ) ); + + // Register strings for translated slugs. + add_action( 'admin_init', array( $this, 'register_slugs' ) ); + add_filter( 'pll_sanitize_string_translation', array( $this, 'sanitize_string_translation' ), 10, 2 ); + + // Reset cache when adding or modifying languages. + add_action( 'pll_add_language', array( $this, 'clean_cache' ) ); + add_action( 'pll_update_language', array( $this, 'clean_cache' ) ); + + add_action( 'delete_transient_' . self::TRANSIENT_NAME, array( $this, 'delete_transient_from_options_table' ) ); + + // Make sure we have all (possibly new) translatable slugs in the strings list table. + if ( $polylang instanceof PLL_Settings && isset( $_GET['page'] ) && 'mlang_strings' === $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->clean_cache(); + } + } + + /** + * Updates the list of slugs to translate when switching blog + * + * @since 1.9 + * + * @param int $new_blog The blog id we switch to. + * @param int $old_blog The blog id we switch from. + * @return void + */ + public function switch_blog( $new_blog, $old_blog ) { + if ( (int) $new_blog === (int) $old_blog ) { + // Do nothing if same blog. + return; + } + + $this->remove_filters(); + + if ( pll_is_plugin_active( POLYLANG_BASENAME ) && ! empty( $this->model->options['version'] ) ) { + if ( did_action( 'pll_prepare_rewrite_rules' ) ) { + $this->prepare_rewrite_rules(); + } else { + add_action( 'pll_prepare_rewrite_rules', array( $this, 'prepare_rewrite_rules' ), 20 ); // After Polylang. + } + } + } + + /** + * Initializes the list of translated slugs + * Need to wait for all post types and taxonomies to be registered + * + * @since 1.9 + * + * @return void + */ + public function init_translated_slugs() { + $this->translated_slugs = $this->get_translatable_slugs(); + + // Keep only the slugs which are translated to avoid unnecessary rewrite rules. + foreach ( $this->translated_slugs as $key => $value ) { + if ( 1 === count( array_unique( $value['translations'] ) ) && reset( $value['translations'] ) === $value['slug'] ) { + unset( $this->translated_slugs[ $key ] ); + } + } + } + + /** + * Translates a slug in a permalink ( from original slug ). + * + * @since 1.9 + * + * @param string $link The url to modify. + * @param PLL_Language $lang The language. + * @param string $type The type of slug to translate. + * @return string Modified url. + */ + public function translate_slug( $link, $lang, $type ) { + if ( $lang instanceof PLL_Language && isset( $this->translated_slugs[ $type ] ) && ! empty( $this->translated_slugs[ $type ]['slug'] ) ) { + $link = preg_replace( + '#/' . $this->translated_slugs[ $type ]['slug'] . '(/|\?|\#|$)#', + '/' . $this->get_translated_slug( $type, $lang->slug ) . '$1', + $link + ); + } + return $link; + } + + /** + * Translates a slug in a permalink ( from an already translated slug ). + * + * @since 1.9 + * + * @param string $link The url to modify. + * @param PLL_Language $lang The language. + * @param string $type The type of slug to translate. + * @return string Modified url. + */ + public function switch_translated_slug( $link, $lang, $type ) { + if ( isset( $this->translated_slugs[ $type ] ) && ! empty( $this->translated_slugs[ $type ]['slug'] ) ) { + $slugs = $this->translated_slugs[ $type ]['translations']; + $slugs[] = $this->translated_slugs[ $type ]['slug']; + $slugs = $this->encode_deep( $slugs ); + + $link = preg_replace( + '#/(' . implode( '|', array_unique( $slugs ) ) . ')(/|\?|\#|$)#', + '/' . $this->encode_deep( $this->translated_slugs[ $type ]['translations'][ $lang->slug ] ) . '$2', + $link + ); + } + return $link; + } + + /** + * Returns information on translatable slugs + * and stores them in a transient + * + * @since 1.9 + * + * @return array + */ + public function get_translatable_slugs() { + global $wp_rewrite; + + $slugs = get_transient( self::TRANSIENT_NAME ); + + if ( false === $slugs ) { + $slugs = array(); + + foreach ( $this->model->get_languages_list() as $language ) { + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + + // Post types. + foreach ( get_post_types( array(), 'objects' ) as $type ) { + if ( ! empty( $type->rewrite['slug'] ) && $this->model->is_translated_post_type( $type->name ) ) { + $slug = preg_replace( '#%.+?%#', '', $type->rewrite['slug'] ); // For those adding a taxonomy base in custom post type link. See http://wordpress.stackexchange.com/questions/94817/add-category-base-to-url-in-custom-post-type-taxonomy. + $slug = trim( $slug, '/' ); // It seems that some plugins add / (ex: WooCommerce). + $slugs[ $type->name ]['slug'] = $slug; + $tr_slug = $mo->translate( $slug ); + $slugs[ $type->name ]['translations'][ $language->slug ] = empty( $tr_slug ) ? $slug : $tr_slug; + + // Post types archives. + if ( ! empty( $type->has_archive ) ) { + if ( true === $type->has_archive ) { + $slugs[ 'archive_' . $type->name ]['hide'] = true; + } else { + $slug = $type->has_archive; + } + + $slugs[ 'archive_' . $type->name ]['slug'] = $slug; + $tr_slug = $mo->translate( $slug ); + $slugs[ 'archive_' . $type->name ]['translations'][ $language->slug ] = empty( $tr_slug ) ? $slug : $tr_slug; + } + } + } + + // Taxonomies. + foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { + if ( ! empty( $tax->rewrite['slug'] ) && ( $this->model->is_translated_taxonomy( $tax->name ) || 'post_format' === $tax->name ) ) { + $slug = trim( $tax->rewrite['slug'], '/' ); // It seems that some plugins add / (ex: WooCommerce for product attributes). + $slugs[ $tax->name ]['slug'] = $slug; + $tr_slug = $mo->translate( $slug ); + $slugs[ $tax->name ]['translations'][ $language->slug ] = empty( $tr_slug ) ? $slug : $tr_slug; + } + } + + // Post formats. + // get_theme_support sends an array of arrays. + $formats = get_theme_support( 'post-formats' ); + + if ( is_array( $formats ) && isset( $formats[0] ) && is_array( $formats[0] ) ) { + foreach ( $formats[0] as $format ) { + $slugs[ 'post-format-' . $format ]['slug'] = $format; + $tr_format = $mo->translate( $format ); + $slugs[ 'post-format-' . $format ]['translations'][ $language->slug ] = empty( $tr_format ) ? $format : $tr_format; + } + } + + // Misc. + foreach ( array( 'author', 'search', 'attachment' ) as $slug ) { + $slugs[ $slug ]['slug'] = $slug; + $tr_slug = $mo->translate( $slug ); + $slugs[ $slug ]['translations'][ $language->slug ] = empty( $tr_slug ) ? $slug : $tr_slug; + } + + // Paged pages. + $slugs['paged']['slug'] = 'page'; + $tr_slug = $mo->translate( 'page' ); + $slugs['paged']['translations'][ $language->slug ] = empty( $tr_slug ) ? 'page' : $tr_slug; + + // /blog/. + if ( ! empty( $wp_rewrite->front ) ) { + $slug = trim( $wp_rewrite->front, '/' ); + $slugs['front']['slug'] = $slug; + $tr_slug = $mo->translate( $slug ); + $slugs['front']['translations'][ $language->slug ] = empty( $tr_slug ) ? $slug : $tr_slug; + } + + /** + * Filter the list of translated slugs + * + * @since 1.9 + * + * @param array $slugs The list of slugs. + * @param object $language The language object. + * @param object $mo The translations object. + */ + $slugs = apply_filters_ref_array( 'pll_translated_slugs', array( $slugs, $language, &$mo ) ); + } + + // Make sure to store the transient only after 'wp_loaded' has been fired to avoid a conflict with Page Builder 2.4.10+. + if ( did_action( 'wp_loaded' ) ) { + set_transient( self::TRANSIENT_NAME, $slugs ); + } + } + + return $slugs; + } + + /** + * Prepares rewrite rules filters to translate slugs + * + * @since 1.9 + * @since 3.5 Hooked to `pll_prepare_rewrite_rules` and remove $pre parameter. + * + * @return void + */ + public function prepare_rewrite_rules() { + if ( ! $this->model->has_languages() || has_filter( 'rewrite_rules_array', array( $this, 'rewrite_translated_slug' ) ) ) { + return; + } + + foreach ( $this->get_rewrite_rules_filter_with_callbacks() as $rule => $callback ) { + add_filter( $rule, $callback, 5 ); + } + } + + /** + * Deletes the transient from the options table since WordPress does not do it when using object cache. + * + * @since 3.8 + * + * @return void + */ + public function delete_transient_from_options_table(): void { + if ( wp_using_ext_object_cache() || wp_installing() ) { + delete_option( '_transient_' . self::TRANSIENT_NAME ); + } + } + + /** + * Removes hooks to filter rewrite rules, see `self::prepare_rewrite_rules()` for added ones. + * + * @since 3.5 + * + * @return void + */ + protected function remove_filters() { + foreach ( $this->get_rewrite_rules_filter_with_callbacks() as $rule => $callback ) { + remove_filter( $rule, $callback, 5 ); + } + } + + /** + * Returns *all* rewrite rules filters with their associated callbacks. + * + * @since 3.5 + * + * @return callable[] Array of hook names as keys and callbacks as values. + */ + protected function get_rewrite_rules_filter_with_callbacks() { + if ( ! method_exists( $this->links_model, 'get_rewrite_rules_filters' ) ) { + // Current links model instance doesn't support rewrite rules (i.e. nothing to filter here). + return array(); + } + + $filters = array( + 'rewrite_rules_array' => array( $this, 'rewrite_translated_slug' ), + ); + + foreach ( $this->links_model->get_rewrite_rules_filters() as $type ) { + $filters[ $type . '_rewrite_rules' ] = array( $this, 'rewrite_translated_slug' ); + } + + return $filters; + } + + /** + * Flush rewrite rules when saving strings translations + * + * @since 1.9 + * + * @return void + */ + public function flush_rewrite_rules() { + $this->clean_cache(); + $this->init_translated_slugs(); + flush_rewrite_rules(); + } + + /** + * Returns the rewrite rule pattern for the new slug + * + * @since 1.9 + * @since 2.2 Add the $capture parameter + * + * @param string $type The type of slug. + * @param bool $capture Whether the slugs must be captured, defaults to false. + * @return string The pattern. + */ + protected function get_translated_slugs_pattern( $type, $capture = false ) { + $slugs = array( $this->translated_slugs[ $type ]['slug'] ); + + foreach ( array_keys( $this->translated_slugs[ $type ]['translations'] ) as $lang ) { + $slugs[] = preg_quote( $this->translated_slugs[ $type ]['translations'][ $lang ], '#' ); + } + + return ( $capture ? '(' : '(?:' ) . implode( '|', array_unique( $slugs ) ) . ')/'; + } + + /** + * Translates a slug in rewrite rules + * + * @since 1.9 + * + * @param string[] $rules Rewrite rules. + * @param string $type The type of slug to translate. + * @return string[] Modified rewrite rules. + */ + protected function translate_rule( $rules, $type ) { + if ( empty( $this->translated_slugs[ $type ] ) ) { + return $rules; + } + + $old = $this->translated_slugs[ $type ]['slug'] . '/'; + $new = $this->get_translated_slugs_pattern( $type ); + + $newrules = array(); + + foreach ( $rules as $key => $rule ) { + $found = strpos( $key, $old ); + if ( false !== $found ) { + $new_key = 0 === $found ? str_replace( $old, $new, $key ) : str_replace( '/' . $old, '/' . $new, $key ); + $newrules[ $new_key ] = $rule; + } else { + $newrules[ $key ] = $rule; + } + } + return $newrules; + } + + /** + * Translates the post format slug in rewrite rules + * + * @since 1.9 + * + * @param string[] $rules Rewrite rules. + * @return string[] Modified rewrite rules. + */ + protected function translate_post_format_rule( $rules ) { + $formats = get_theme_support( 'post-formats' ); + + if ( ! is_array( $formats ) || ! isset( $formats[0] ) || ! is_array( $formats[0] ) ) { + return $rules; + } + + $newrules = array(); + + foreach ( $formats[0] as $format ) { + if ( ! isset( $this->translated_slugs[ 'post-format-' . $format ] ) ) { + continue; + } + + $new_slug = '/' . $this->get_translated_slugs_pattern( 'post-format-' . $format, true ); + + foreach ( $rules as $key => $rule ) { + $newrules[ str_replace( '/([^/]+)/', $new_slug, $key ) ] = str_replace( '$matches[1]', $format, $rule ); + } + } + + return $newrules + $rules; + } + + /** + * Translates the post type archive in rewrite rules + * + * @since 1.9 + * + * @param string[] $rules Rewrite rules. + * @return string[] Modified rewrite rules. + */ + protected function translate_post_type_archive_rule( $rules ) { + $newrules = array(); + $cpts = array_intersect( $this->model->get_translated_post_types(), get_post_types( array( '_builtin' => false ) ) ); + + foreach ( $rules as $key => $rule ) { + $query = wp_parse_url( $rule, PHP_URL_QUERY ); + + if ( ! is_string( $query ) ) { + continue; + } + + parse_str( $query, $qv ); + + if ( ! empty( $cpts ) && ! empty( $qv['post_type'] ) && is_string( $qv['post_type'] ) && in_array( $qv['post_type'], $cpts, true ) && ! strpos( $rule, 'name=' ) && isset( $this->translated_slugs[ 'archive_' . $qv['post_type'] ] ) ) { + $new_slug = $this->get_translated_slugs_pattern( 'archive_' . $qv['post_type'] ); + $newrules[ str_replace( $this->translated_slugs[ 'archive_' . $qv['post_type'] ]['slug'] . '/', $new_slug, $key ) ] = $rule; + } else { + $newrules[ $key ] = $rule; + } + } + return $newrules; + } + + /** + * Translates the page slug in rewrite rules + * + * @since 1.9 + * + * @param string[] $rules Rewrite rules. + * @return string[] Modified rewrite rules. + */ + protected function translate_paged_rule( $rules ) { + if ( empty( $this->translated_slugs['paged'] ) ) { + return $rules; + } + + $newrules = array(); + + $old = $this->translated_slugs['paged']['slug'] . '/'; + $new = $this->get_translated_slugs_pattern( 'paged' ); + + foreach ( $rules as $key => $rule ) { + if ( strpos( $key, '/page/' ) && preg_match( '#\[\d\]|\$\d#', $rule ) ) { + $newrules[ str_replace( '/' . $old, '/' . $new, $key ) ] = $rule; + } elseif ( 0 === strpos( $key, 'page/' ) && preg_match( '#\[\d\]|\$\d#', $rule ) ) { + // Special case for root + $newrules[ str_replace( $old, $new, $key ) ] = $rule; + } else { + $newrules[ $key ] = $rule; + } + } + + return $newrules; + } + + /** + * Modifies rewrite rules to translate post types and taxonomies slugs + * + * @since 1.9 + * + * @param string[] $rules Rewrite rules. + * @return string[] Modified rewrite rules. + */ + public function rewrite_translated_slug( $rules ) { + $filter = str_replace( '_rewrite_rules', '', (string) current_filter() ); + + $rules = $this->translate_paged_rule( $rules ); // Important that it is the first. + + if ( 'rewrite_rules_array' === $filter ) { + $rules = $this->translate_post_type_archive_rule( $rules ); + } else { + if ( 'post_format' === $filter ) { + $rules = $this->translate_post_format_rule( $rules ); + } + + $rules = $this->translate_rule( $rules, $filter ); + } + + $rules = $this->translate_rule( $rules, 'attachment' ); + $rules = $this->translate_rule( $rules, 'front' ); + + return $rules; + } + + /** + * Register strings for translated slugs + * + * @since 1.9 + * + * @return void + */ + public function register_slugs() { + foreach ( $this->get_translatable_slugs() as $key => $type ) { + if ( empty( $type['hide'] ) ) { + pll_register_string( 'slug_' . $key, $type['slug'], __( 'URL slugs', 'polylang-pro' ) ); + } + } + } + + /** + * Performs the sanitization (before saving in DB) of slugs translations. + * + * @since 1.9 + * + * @param string $translation Translation to sanitize. + * @param string $name Unique name for the string, not used. + * @return string + */ + public function sanitize_string_translation( $translation, $name ) { + if ( 0 !== strpos( $name, 'slug_' ) ) { + return $translation; + } + // Remove some reserved characters that would result in 404. + $special_chars = array( '?', '#', '[', ']', '$', '\'', '(', ')', '*', '+', ' ' ); + $translation = str_replace( $special_chars, '', $translation ); + + // Inspired by category base sanitization. + $translation = preg_replace( '#/+#', '/', "/{$translation}" ); + if ( empty( $translation ) ) { + return ''; + } + $translation = sanitize_url( $translation ); + $translation = str_replace( 'http://', '', $translation ); + $translation = trim( $translation, '/' ); + + return $translation; + } + + /** + * Deletes the transient when adding or modifying a language + * + * @since 1.9 + * + * @return void + */ + public function clean_cache() { + delete_transient( self::TRANSIENT_NAME ); + } + + /** + * Get the translated slug. + * + * Encoding the paged slug is necessary to prevent the WordPress redirect_canonical + * function to wrongly redirect to a 404 page + * + * @since 2.2 + * + * @param string $type The type of slug to translate. + * @param string $lang The language slug. + * @return string + */ + public function get_translated_slug( $type, $lang ) { + $translation = $this->translated_slugs[ $type ]['translations'][ $lang ]; + $translation = $this->encode_deep( $translation ); + return $translation; + } + + /** + * Recursively rawurlencode an array of slugs while preserving forward slashes + * + * @since 2.6 + * + * @param mixed $slug The slug or the array of slug to encode. + * @return mixed + */ + public function encode_deep( $slug ) { + if ( is_array( $slug ) ) { + return array_map( array( $this, 'encode_deep' ), $slug ); + } + return implode( '/', array_map( 'rawurlencode', explode( '/', $slug ) ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/translate-slugs/translate-slugs.php b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/translate-slugs.php new file mode 100644 index 0000000..117ff00 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/translate-slugs.php @@ -0,0 +1,125 @@ +slugs_model = &$slugs_model; + $this->curlang = &$curlang; + + add_filter( 'pll_post_type_link', array( $this, 'pll_post_type_link' ), 10, 3 ); + add_filter( 'pll_term_link', array( $this, 'pll_term_link' ), 10, 3 ); + add_filter( 'post_type_archive_link', array( $this, 'translate_slug' ), 20, 2 ); + } + + /** + * Modifies custom post type links. + * + * @since 1.9 + * + * @param string $url The post link. + * @param PLL_Language $lang The post language. + * @param WP_Post $post The post object. + * @return string + */ + public function pll_post_type_link( $url, $lang, $post ) { + global $wp_rewrite; + + if ( ! empty( $wp_rewrite->front ) && trim( $wp_rewrite->front, '/' ) ) { + $url = $this->slugs_model->translate_slug( $url, $lang, 'front' ); + } + + return $this->slugs_model->translate_slug( $url, $lang, $post->post_type ); + } + + /** + * Modifies term links. + * + * @since 1.9 + * + * @param string $url The term link. + * @param PLL_Language $lang The term language. + * @param WP_Term $term The term object. + * @return string + */ + public function pll_term_link( $url, $lang, $term ) { + global $wp_rewrite; + + if ( 'post_format' === $term->taxonomy ) { + $url = $this->slugs_model->translate_slug( $url, $lang, $term->slug ); // Occurs only on frontend. + } + + if ( ! empty( $wp_rewrite->front ) && trim( $wp_rewrite->front, '/' ) ) { + $url = $this->slugs_model->translate_slug( $url, $lang, 'front' ); + } + + return $this->slugs_model->translate_slug( $url, $lang, $term->taxonomy ); + } + + /** + * Translate the slugs + * + * The filter was originally only on frontend but is needed on admin too for + * compatibility with the archive link of the ACF link field since ACF 5.4.0 + * + * @since 1.9 + * + * @param string $link The link in which we want to translate a slug. + * @param string $post_type Optional, Post type. + * @return string Modified link + */ + public function translate_slug( $link, $post_type = '' ) { + global $wp_rewrite; + + if ( empty( $this->curlang ) ) { + return $link; + } + + $types = array( + 'post_type_archive_link' => 'archive_' . $post_type, + 'get_pagenum_link' => 'paged', + 'author_link' => 'author', + 'attachment_link' => 'attachment', + 'search_link' => 'search', + ); + + $current_filter = (string) current_filter(); + if ( ! isset( $types[ $current_filter ] ) ) { + return $link; + } + + $link = $this->slugs_model->translate_slug( $link, $this->curlang, $types[ $current_filter ] ); + + if ( ! empty( $wp_rewrite->front ) && trim( $wp_rewrite->front, '/' ) ) { + $link = $this->slugs_model->translate_slug( $link, $this->curlang, 'front' ); + } + + return $link; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/translate-slugs/uninstall.php b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/uninstall.php new file mode 100644 index 0000000..3cf5985 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/translate-slugs/uninstall.php @@ -0,0 +1,10 @@ +wizard_pro = new PLL_Wizard_Pro( $polylang ); + }, + 30 + ); +} diff --git a/wp-content/plugins/polylang-pro/src/modules/wizard/wizard-pro.php b/wp-content/plugins/polylang-pro/src/modules/wizard/wizard-pro.php new file mode 100644 index 0000000..5b663a9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/wizard/wizard-pro.php @@ -0,0 +1,74 @@ +model = &$polylang->model; + $this->sync_model = &$polylang->sync_post_model; + + // See pll_wizard_create_home_page_translations filter in PLL_Wizard class. + add_filter( 'pll_wizard_create_home_page_translations', array( $this, 'replace_create_home_page_translations' ) ); + } + + /** + * Replace function to apply to process the home page translations creation. + * + * @since 2.7 + * + * @return callable + */ + public function replace_create_home_page_translations() { + return array( $this, 'create_home_page_translations' ); + } + + /** + * Create home page translations for each language defined with duplicating content. + * + * @since 2.7 + * + * @param string $default_language slug of the default language; null if no default language is defined. + * @param int $home_page post_id of the home page if it's defined, false otherwise. + * @param string $home_page_title home page title if it's defined, 'Homepage' otherwise. + * @param string $home_page_language slug of the home page if it's defined, false otherwise. + * @param array $untranslated_languages array of languages which needs to have a home page translated. + * @return void + */ + public function create_home_page_translations( $default_language, $home_page, $home_page_title, $home_page_language, $untranslated_languages ) { + global $wpdb; + + foreach ( $untranslated_languages as $language ) { + $translated_post_id = $this->sync_model->copy( $home_page, $language ); + $language_properties = $this->model->get_language( $language ); + $wpdb->update( + $wpdb->posts, + array( 'post_title' => $home_page_title . ' - ' . $language_properties->name ), + array( 'ID' => $translated_post_id ) + ); // Don't use wp_update_post to ensure not redo save post process. + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/xdata/load.php b/wp-content/plugins/polylang-pro/src/modules/xdata/load.php new file mode 100644 index 0000000..5958bdc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/xdata/load.php @@ -0,0 +1,15 @@ +model->has_languages() ) { + $class = array( 2 => 'PLL_Xdata_Subdomain', 3 => 'PLL_Xdata_Domain' ); + if ( isset( $class[ $polylang->options['force_lang'] ] ) ) { + $polylang->xdata = new $class[ $polylang->options['force_lang'] ]( $polylang ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-base.php b/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-base.php new file mode 100644 index 0000000..2a5ddaa --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-base.php @@ -0,0 +1,390 @@ +options = $polylang->options; + $this->model = &$polylang->model; + $this->links_model = &$polylang->links_model; + + if ( empty( $_POST['wp_customize'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // Don't do that in the customizr as the redirect breaks things. + add_action( 'wp_ajax_pll_xdata_get', array( $this, 'xdata_get' ) ); + add_action( 'wp_ajax_nopriv_pll_xdata_get', array( $this, 'xdata_get' ) ); + add_action( 'wp_ajax_pll_xdata_set', array( $this, 'xdata_set' ) ); + add_action( 'wp_ajax_nopriv_pll_xdata_set', array( $this, 'xdata_set' ) ); + } + + // Login redirect. + add_action( 'set_auth_cookie', array( $this, 'set_auth_cookie' ), 10, 5 ); + add_action( 'login_redirect', array( $this, 'login_redirect' ), 10, 3 ); // Must be defined in child class. + add_filter( 'admin_url', array( $this, 'admin_url' ), 5 ); // Before PLL_Frontend_Filters_Links. + + // Customizer. + add_filter( 'customize_allowed_urls', array( $this, 'customize_allowed_urls' ) ); + add_filter( 'allowed_http_origins', array( $this, 'allowed_http_origins' ) ); + } + + /** + * Get the time-dependent variable for nonce creation. + * Same as wp_nonce_tick() with a specific filter. + * + * @since 2.1.2 + * + * @return float + */ + protected function nonce_tick() { + /** + * Filters the lifespan of nonces in seconds. + * For full compatibility with cache plugins, the nonce life should be 2 times greater than the cache lifespan + * + * @since 2.1.2 + * + * @param int $lifespan Lifespan of nonces in seconds. 0 makes the "nonce" time independent. + */ + $nonce_life = apply_filters( 'pll_xdata_nonce_life', DAY_IN_SECONDS ); + return $nonce_life ? ceil( time() / ( $nonce_life / 2 ) ) : 0; + } + + /** + * Creates a user independent nonce + * + * @since 2.0 + * + * @param string $action Context of the nonce. + * @return string The nonce value. + */ + public function create_nonce( $action ) { + $i = $this->nonce_tick(); + return substr( wp_hash( $i . '|' . $action, 'nonce' ), -12, 10 ); + } + + /** + * Verifies a user independent nonce + * + * @since 2.0 + * + * @param string $nonce The nonce value. + * @param string $action Context of the nonce. + * @return bool True if the nonce value is correct, false otherwise. + */ + public function verify_nonce( $nonce, $action ) { + $nonce = (string) $nonce; + + if ( empty( $nonce ) ) { + return false; + } + + $i = $this->nonce_tick(); + + $expected = substr( wp_hash( $i . '|' . $action, 'nonce' ), -12, 10 ); + if ( hash_equals( $expected, $nonce ) ) { // Since WP 3.9.2. + return true; + } + + $expected = substr( wp_hash( ( $i - 1 ) . '|' . $action, 'nonce' ), -12, 10 ); + return hash_equals( $expected, $nonce ); + } + + /** + * Builds an ajax request url to the domain defined by a language + * + * @since 2.0 + * + * @param string $lang The language slug. + * @param (string|int|bool)[] $args Existing url parameters. + * @return string The ajax url. + */ + public function ajax_url( $lang, $args ) { + $url = admin_url( 'admin-ajax.php' ); + $url = $this->links_model->switch_language_in_link( $url, $this->model->get_language( $lang ) ); + $url = add_query_arg( $args, $url ); + return $url; + } + + /** + * Stores data to transfer in a user session + * + * @param string $redirect Url to redirect to. + * @param bool $nologin True if we should not attempt to login. + * @return string Session key. + */ + protected function create_data_session( $redirect, $nologin ) { + $key = ''; + + /** + * Filters the data to transfer from one domain to the other + * + * @since 2.0 + * + * @param array $data The data to transfer from one domain to the other. + */ + $data = apply_filters( 'pll_get_xdata', array() ); + + if ( is_user_logged_in() && ! $nologin ) { + $data['token'] = wp_get_session_token(); + } + + if ( ! empty( $data ) ) { + $data['redirect'] = $redirect; + $data['time'] = time(); + + $key = wp_hash( wp_json_encode( $data ) ); + + /** + * Filters the session manager class where cross domain data are temporarily stored + * + * @since 2.0 + * + * @param string $class Class name of the session manager. + */ + $session_manager_class = apply_filters( 'pll_xdata_session_manager', 'PLL_Xdata_Session_Manager' ); + + $session_manager = new $session_manager_class(); + $session_manager->set( $key, $data ); + } + + return $key; + } + + /** + * Get javascript for the cross domain request when the language has just switched + * + * @since 2.0 + * + * @param string $redirect Redirect url. + * @param string $lang New language slug. + * @return string Javascript code. + */ + protected function maybe_get_xdomain_js( $redirect, $lang ) { + if ( ! empty( $_COOKIE[ PLL_COOKIE ] ) && $_COOKIE[ PLL_COOKIE ] !== $lang ) { + $args = array( + 'action' => 'pll_xdata_get', + 'redirect' => urlencode( $redirect ), + 'nonce' => $this->create_nonce( 'xdata_get' ), + 'nologin' => ! empty( $_GET['nologin'] ), // phpcs:ignore WordPress.Security.NonceVerification + ); + + return sprintf( + 'xhr = new XMLHttpRequest(); + xhr.open( "GET", "%1$s", true ); + xhr.withCredentials = true; + xhr.onreadystatechange = function () { + if ( 4 == this.readyState && 200 == this.status && this.responseText && -1 != this.responseText ) { + window.location.replace( "%2$s" + "&key=" + this.responseText ); + } + } + xhr.send();', + sanitize_url( $this->ajax_url( sanitize_key( $_COOKIE[ PLL_COOKIE ] ), $args ) ), + sanitize_url( $this->ajax_url( $lang, array( 'action' => 'pll_xdata_set' ) ) ) + ); + } + return ''; + } + + /** + * Response to pll_xdata_get request + * Writes cross domain data in a user session + * + * @since 2.0 + * + * @return void + */ + public function xdata_get() { + // Whitelist origin + nonce verification. + if ( ! is_allowed_http_origin() || ! isset( $_GET['nonce'], $_GET['redirect'] ) || ! $this->verify_nonce( sanitize_key( $_GET['nonce'] ), 'xdata_get' ) ) { // phpcs:ignore WordPress.Security.NonceVerification + wp_die(); + } + + // CORS. + send_origin_headers(); + + // Response. + $key = $this->create_data_session( sanitize_url( wp_unslash( $_GET['redirect'] ) ), ! empty( $_GET['nologin'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + wp_die( empty( $key ) ? '-1' : esc_html( $key ) ); + } + + /** + * Response to pll_xdata_set request + * Final step in the cross domain data + * Login the user on the current domain + * Redirect to the url requested by the usee + * + * @since 2.0 + * + * @return void + */ + public function xdata_set() { + if ( empty( $_GET['key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + wp_die(); + } + + /** This filter is documented in modules/xdata/xdata-base.php */ + $session_manager_class = apply_filters( 'pll_xdata_session_manager', 'PLL_Xdata_Session_Manager' ); + + $session_manager = new $session_manager_class(); + + $data = $session_manager->get( sanitize_key( $_GET['key'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + + if ( ! empty( $data['user_id'] ) && ! empty( $data['token'] ) && time() < $data['time'] + 2 * MINUTE_IN_SECONDS ) { + // FIXME Use auth_cookie_expiration to sync the expiration time? + wp_set_auth_cookie( $data['user_id'], false, '', $data['token'] ); // WP 4.3+ + } + + /** + * Fires before the redirection to the requested url + * + * @since 2.0 + * + * @param array $data Data transferred from one domain to the other. + */ + do_action( 'pll_set_xdata', $data ); + if ( empty( $data['redirect'] ) ) { + $data['redirect'] = admin_url(); + } + wp_safe_redirect( $data['redirect'] ); + exit; + } + + /** + * Saves the user session when a user logs in, for use in login_redirect + * + * @since 2.0 + * + * @param string $auth_cookie Authentication cookie. + * @param int $expire Login grace period in seconds. Default 43,200 seconds, or 12 hours. + * @param int $expiration Duration in seconds the authentication cookie should be valid. + * @param int $user_id User ID. + * @param string $scheme Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'. + * @return void + * + * @phpstan-param 'auth'|'logged_in'|'secure_auth' $scheme + */ + public function set_auth_cookie( $auth_cookie, $expire, $expiration, $user_id, $scheme ) { + $cookie = wp_parse_auth_cookie( $auth_cookie, $scheme ); + $this->token = $cookie['token']; + } + + /** + * Saves info on the current user session and redirects to the main domain + * + * @since 2.0 + * + * @param string $redirect_to The redirect destination URL. + * @param string $requested_redirect_to The requested redirect destination URL passed as a parameter. + * @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise. + * @return string + */ + public function _login_redirect( $redirect_to, $requested_redirect_to, $user ) { + if ( false !== strpos( $redirect_to, 'wp-admin' ) ) { + $redirect_to = $this->links_model->remove_language_from_link( $redirect_to ); + } + + $data = array( + 'token' => $this->token, + 'redirect' => $redirect_to, + 'time' => time(), + ); + + $key = wp_hash( implode( '|', $data ) ); + + /** This filter is documented in modules/xdata/xdata-base.php */ + $session_manager_class = apply_filters( 'pll_xdata_session_manager', 'PLL_Xdata_Session_Manager' ); + + $session_manager = new $session_manager_class(); + $session_manager->set( $key, $data, $user->ID ); + + /* + * Login on main domain to access admin. + * Or if the wp-login.php is already on main domain, login on the current domain. + */ + $url = admin_url( 'admin-ajax.php' ); + $lang = $this->links_model->get_language_from_url(); + if ( ! empty( $lang ) ) { + $url = $this->links_model->remove_language_from_link( $url ); + } + + return add_query_arg( array( 'action' => 'pll_xdata_set', 'key' => $key ), $url ); + } + + /** + * Forces the admin on the main domain + * + * @since 2.0 + * + * @param string $url An admin url. + * @return string + */ + public function admin_url( $url ) { + return $this->links_model->remove_language_from_link( $url ); + } + + /** + * Allows all our domains for cross domain requests in the customizer + * + * @since 2.0 + * + * @param string[] $urls List of allowed urls. + * @return string[] Modified list of urls. + */ + public function customize_allowed_urls( $urls ) { + foreach ( $this->links_model->get_hosts() as $host ) { + $urls[] = ( is_ssl() ? 'https://' : 'http://' ) . trailingslashit( $host ); + } + return array_unique( $urls ); + } + + /** + * Allows all our domains as origins ( for customizer cross domain requests ) + * + * @since 2.0 + * + * @param string[] $origins List of allowed urls. + * @return string[] Modified list of urls. + */ + public function allowed_http_origins( $origins ) { + foreach ( $this->links_model->get_hosts() as $host ) { + $origins = array_merge( $origins, array( 'http://' . $host, 'https://' . $host ) ); + } + return array_unique( $origins ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-domain.php b/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-domain.php new file mode 100644 index 0000000..4b1b6d7 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-domain.php @@ -0,0 +1,174 @@ +choose_lang = &$polylang->choose_lang; + + add_action( 'pll_init', array( $this, 'pll_init' ) ); + add_action( 'admin_init', array( $this, 'admin_init' ) ); + + if ( empty( $_POST['wp_customize'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + add_action( 'wp_head', array( $this, 'check_request' ), 0 ); // As soon as possible + add_action( 'wp_ajax_pll_xdata_check', array( $this, 'xdata_check' ) ); + add_action( 'wp_ajax_nopriv_pll_xdata_check', array( $this, 'xdata_check' ) ); + } + + // Post preview. + if ( isset( $_GET['preview_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + add_action( 'init', array( $this, 'check_request' ), 5 ); // Before _show_post_preview + } + } + + /** + * Set language cookie + * + * @since 2.0 + * + * @param string $lang Language code. + * @return void + */ + protected function maybe_set_cookie( $lang ) { + PLL_Cookie::set( $lang, array( 'samesite' => 'None' ) ); + } + + /** + * Allow to use the correct domain for preview links + * as we force them to be on the main domain when not using the Xdata module + * + * @since 2.0 + * + * @param PLL_Frontend $polylang Polylang object. + * @return void + */ + public function pll_init( $polylang ) { + remove_filter( 'preview_post_link', array( $polylang->filters_links, 'preview_post_link' ), 20 ); + } + + /** + * Set the cookie to main domain when visiting the admin + * This is necessary to avoid 404 when previewing a post on non default domain + * Make sure the cookie is set on admin and not on ajax request to avoid infinite redirect loop + * + * @since 2.0 + * + * @return void + */ + public function admin_init() { + if ( ! PLL() instanceof PLL_Frontend ) { + $this->maybe_set_cookie( $this->links_model->get_language_from_url() ); + } + } + + /** + * Outputs the link to the javascript request to main domain + * + * @since 2.0 + * + * @return void + */ + public function check_request() { + $args = array( + 'action' => 'pll_xdata_check', + 'redirect' => urlencode( pll_get_requested_url() ), + 'nonce' => $this->create_nonce( 'xdata_check' ), + 'nologin' => is_user_logged_in(), + ); + + printf( + '', + current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"', + esc_url( $this->ajax_url( $this->options['default_lang'], $args ) ) + ); + } + + /** + * Response to pll_xdata_check request + * Redirects to the preferred language home page at first visit + * Sets the language cookie on main domain + * Initiates a cross domain data transfer if the language has just changed + * + * @since 2.0 + * + * @return void + */ + public function xdata_check() { + if ( ! isset( $_GET['nonce'], $_GET['redirect'] ) || ! $this->verify_nonce( sanitize_key( $_GET['nonce'] ), 'xdata_check' ) ) { // phpcs:ignore WordPress.Security.NonceVerification + wp_die(); + } + + $redirect = sanitize_url( wp_unslash( $_GET['redirect'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + $lang = $this->links_model->get_language_from_url( $redirect ); + $lang_object = $this->model->get_language( $lang ); + + // Redirects to the preferred language home page at first visit. + if ( ! empty( $this->options['browser'] ) && ! isset( $_COOKIE[ PLL_COOKIE ] ) && ! empty( $lang_object ) && trailingslashit( $redirect ) === $lang_object->get_home_url() ) { + /** This filter is documented in /polylang/src/frontend/choose-lang.php */ + $preflang = apply_filters( 'pll_preferred_language', $this->choose_lang->get_preferred_browser_language() ); + + if ( ! $this->model->get_language( $preflang ) ) { + $preflang = $this->options['default_lang']; // Redirect to default language if there is no match. + } + + if ( $preflang !== $lang ) { + $preflang_object = $this->model->get_language( $preflang ); + $home_page_url = ! empty( $preflang_object ) ? $preflang_object->get_home_url() : ''; + /** This filter is documented in /polylang/src/frontend/choose-lang.php */ + $home_page_url = apply_filters( 'pll_redirect_home', $home_page_url ); + if ( $home_page_url ) { + header( 'Content-Type: application/javascript' ); + printf( 'window.location.replace("%s");', sanitize_url( $home_page_url ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + wp_die(); + } + } + } + + $this->maybe_set_cookie( $lang ); // Sets the language cookie on main domain. + + header( 'Content-Type: application/javascript' ); + echo $this->maybe_get_xdomain_js( $redirect, $lang ); // phpcs:ignore WordPress.Security.EscapeOutput + wp_die(); + } + + /** + * Saves info on the current user session and redirects to the main domain + * + * @since 2.0 + * + * @param string $redirect_to The redirect destination URL. + * @param string $requested_redirect_to The requested redirect destination URL passed as a parameter. + * @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise. + * @return string The modified redirect destination URL. + */ + public function login_redirect( $redirect_to, $requested_redirect_to, $user ) { + $main_host = wp_parse_url( $this->links_model->remove_language_from_link( $redirect_to ), PHP_URL_HOST ); + $requested_host = wp_parse_url( pll_get_requested_url(), PHP_URL_HOST ); + + if ( $main_host !== $requested_host && ! is_wp_error( $user ) ) { + $redirect_to = $this->_login_redirect( $redirect_to, $requested_redirect_to, $user ); + } + + return $redirect_to; + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-session-manager.php b/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-session-manager.php new file mode 100644 index 0000000..94e8dbc --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-session-manager.php @@ -0,0 +1,65 @@ + $key, 'meta_compare' => 'EXISTS' ) ); + + if ( ! empty( $users ) ) { + $user = reset( $users ); + $data = get_user_meta( $user->ID, $key, true ); + delete_user_meta( $user->ID, wp_slash( $key ) ); // No replay. + $data['user_id'] = $user->ID; + return $data; + } + + $data = get_option( $key, array() ); + + if ( ! empty( $data ) ) { + delete_option( $key ); // No replay. + return $data; + } + + wp_die( esc_html__( 'An error has occurred.', 'polylang-pro' ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-subdomain.php b/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-subdomain.php new file mode 100644 index 0000000..482765d --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/modules/xdata/xdata-subdomain.php @@ -0,0 +1,142 @@ +curlang = $this->links_model->get_language_from_url(); + if ( empty( $this->curlang ) ) { + $this->curlang = $this->options['default_lang']; + } + + foreach ( $this->model->get_languages_list() as $lang ) { + $this->ajax_urls[ $lang->slug ] = $this->links_model->switch_language_in_link( admin_url( 'admin-ajax.php' ), $this->model->get_language( $lang ) ); + } + + if ( empty( $_POST['wp_customize'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + add_action( 'wp_head', array( $this, 'maybe_language_switched' ) ); + } + + // Post preview + if ( isset( $_GET['preview_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + add_action( 'init', array( $this, 'maybe_language_switched' ), 5 ); // Before _show_post_preview. + } + + add_filter( 'site_url', array( $this, 'site_url' ) ); + + add_filter( 'wp_redirect', array( $this, 'fix_cookie_in_redirect' ), 999 ); + } + + /** + * Builds an ajax request url to the domain defined by a language + * Overrides the parent method to take care of inactive languages + * + * @since 2.0 + * + * @param string $lang The language slug. + * @param string[] $args Existing url parameters. + * @return string The ajax url. + */ + public function ajax_url( $lang, $args ) { + return add_query_arg( $args, $this->ajax_urls[ $lang ] ); + } + + /** + * Outputs the javascript to create the cross domain request when the language just switched + * + * @since 2.0 + * + * @return void + */ + public function maybe_language_switched() { + $js = $this->maybe_get_xdomain_js( pll_get_requested_url(), $this->curlang ); + + if ( empty( $js ) ) { + return; + } + + $type_attr = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"'; + + echo "\n{$js}\n\n"; // phpcs:ignore WordPress.Security.EscapeOutput + } + + /** + * Saves info on the current user session and redirects to the main domain + * + * @since 2.0 + * + * @param string $redirect_to The redirect destination URL. + * @param string $requested_redirect_to The requested redirect destination URL passed as a parameter. + * @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise. + * @return string + */ + public function login_redirect( $redirect_to, $requested_redirect_to, $user ) { + if ( ! $this->options['hide_default'] && ! is_wp_error( $user ) ) { + $redirect_to = $this->_login_redirect( $redirect_to, $requested_redirect_to, $user ); + } + return $redirect_to; + } + + /** + * Returns the correct site url ( mainly to get the correct login form ) + * + * @since 2.0 + * + * @param string $url The main site url. + * @return string + */ + public function site_url( $url ) { + $lang = $this->links_model->get_language_from_url(); + $lang = $this->model->get_language( $lang ); + return $this->links_model->add_language_to_link( $url, $lang ); + } + + /** + * Prevents changing the language cookie when the page is redirected + * to avoid failed login when previewing a page + * + * @since 2.1 + * + * @param string $location Redirect url. + * @return string + */ + public function fix_cookie_in_redirect( $location ) { + $cookie = PLL_Cookie::get(); + + if ( ! empty( $location ) && $cookie && ! empty( $this->curlang ) && $cookie !== $this->curlang ) { + PLL_Cookie::set( $cookie, array( 'domain' => wp_parse_url( $this->links_model->home, PHP_URL_HOST ) ) ); + } + + return $location; + } +} diff --git a/wp-content/plugins/polylang-pro/src/pro.php b/wp-content/plugins/polylang-pro/src/pro.php new file mode 100644 index 0000000..505f36b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/pro.php @@ -0,0 +1,158 @@ +load_integrations(); + + Capabilities::set_user_creator( new Creator() ); + } + + /** + * Manages the Polylang Pro translations and license key. + * Loads the modules. + * + * @since 2.8 + * + * @param PLL_Base $polylang Polylang object. + * @return void + */ + public function init( &$polylang ) { + /** @var \WP_Syntex\Polylang\Options\Options $options */ + $options = $polylang->options; + add_action( 'pll_upgrade', array( new Upgrade( $options ), 'upgrade' ) ); + + if ( $polylang instanceof PLL_Admin_Base ) { + $this->updater = new Updater( POLYLANG_PRO_FILE, 'Polylang Pro', POLYLANG_VERSION, 'polylang-pro' ); + + // Download Polylang language packs. + add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 ); // phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_args + add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'pre_set_site_transient_update_plugins' ) ); + } + + // Prolylang Pro is equivalent to Polylang for plugin dependencies. + add_filter( 'wp_plugin_dependencies_slug', array( $this, 'convert_plugin_dependency' ) ); + + // Loads the modules. + $this->load_modules( $polylang ); + } + + /** + * Hack to download Polylang languages packs + * + * @since 1.9 + * + * @param array $args HTTP request args. + * @param string $url The url of the request. + * @return array + */ + public function http_request_args( $args, $url ) { + if ( false !== strpos( $url, '//api.wordpress.org/plugins/update-check/' ) ) { + $plugins = (array) json_decode( $args['body']['plugins'], true ); + if ( empty( $plugins['plugins']['polylang/polylang.php'] ) ) { + $plugins['plugins']['polylang/polylang.php'] = array( 'Version' => POLYLANG_VERSION ); + $args['body']['plugins'] = wp_json_encode( $plugins ); + } + } + return $args; + } + + /** + * Remove Polylang from the list of plugins to update if it is not installed + * + * @since 2.1.1 + * + * @param stdClass $value The value stored in the update_plugins site transient. + * @return stdClass + */ + public function pre_set_site_transient_update_plugins( $value ) { + // We encountered a 3rd party plugin setting the transient before the function get_plugins() is available. + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + $plugins = get_plugins(); + + if ( isset( $value->response ) ) { + if ( empty( $plugins['polylang/polylang.php'] ) ) { + unset( $value->response['polylang/polylang.php'] ); + } elseif ( isset( $value->response['polylang/polylang.php']->new_version ) && $plugins['polylang/polylang.php']['Version'] === $value->response['polylang/polylang.php']->new_version ) { + $value->no_update['polylang/polylang.php'] = $value->response['polylang/polylang.php']; + unset( $value->response['polylang/polylang.php'] ); + } + } + return $value; + } + + /** + * Converts the Polylang plugin slug to Polylang Pro for plugin dependencies. + * + * This allows plugins requiring Polylang to work with Polylang Pro too. + * + * @since 3.7 + * + * @param string $slug The plugin slug. + * @return string + */ + public function convert_plugin_dependency( $slug ): string { + return 'polylang' === $slug ? dirname( POLYLANG_BASENAME ) : (string) $slug; + } + + /** + * Loads the compatibility with some plugins and themes. + * + * @since 3.8 + * + * @return void + */ + private function load_integrations(): void { + if ( defined( 'PLL_PLUGINS_COMPAT' ) && ! PLL_PLUGINS_COMPAT ) { + return; + } + + $load_scripts = require POLYLANG_PRO_DIR . '/src/integrations/integration-build.php'; + + foreach ( $load_scripts as $load_script ) { + require_once POLYLANG_PRO_DIR . "/src/integrations/{$load_script}/load.php"; + } + } + + /** + * Loads the modules. + * + * @since 3.8 + * + * @param PLL_Base $polylang Polylang object. + * @return void + */ + private function load_modules( $polylang ): void { + $load_scripts = require POLYLANG_PRO_DIR . '/src/modules/module-build.php'; + + foreach ( $load_scripts as $load_script ) { + require_once POLYLANG_PRO_DIR . "/src/modules/{$load_script}/load.php"; + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/Encoding/Base64_Encoding.php b/wp-content/plugins/polylang-pro/src/services/Encoding/Base64_Encoding.php new file mode 100644 index 0000000..73bacc4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/Encoding/Base64_Encoding.php @@ -0,0 +1,70 @@ +formats = ! empty( $formats ) ? $formats : array( 'serialize' ); + } + + /** + * Tells if the given format is `serialize` (only), which is what WP uses by default for the metas. + * + * @since 3.8 + * + * @param string $format Encoding format(s). + * @return bool + */ + public static function is_serialize( string $format ): bool { + $format = trim( $format, ', ' ); + return '' === $format || Serialize_Encoding::NAME === $format; + } + + /** + * Decodes the given data. + * Returns a `WP_Error` object upon decoding failure. + * + * @since 3.6 + * + * @param mixed $data Data. + * @return mixed|WP_Error Decoded data. A `WP_Error` object upon decoding failure. + */ + public function decode( $data ) { + foreach ( array_reverse( $this->formats ) as $format ) { + if ( ! is_string( $data ) ) { + return new WP_Error( + 'pll-decoding-not-a-string', + __( 'The given data cannot be decoded because it is not a string.', 'polylang-pro' ) + ); + } + + $encoder = $this->get_encoder( $format ); + + if ( is_wp_error( $encoder ) ) { + return $encoder; + } + + $data = $encoder->decode( $data ); + + if ( is_wp_error( $data ) ) { + return $data; + } + } + + return $data; + } + + /** + * Decodes the given data. + * The data is passed by reference and the method returns a `WP_Error` object upon decoding failure. + * + * @since 3.6 + * + * @param mixed $data Data, passed by reference. + * @return WP_Error + */ + public function decode_reference( &$data ): WP_Error { + $value = $this->decode( $data ); + + if ( is_wp_error( $value ) ) { + return $value; + } + + $data = $value; + return new WP_Error(); + } + + /** + * Encodes the given data. + * Returns a `WP_Error` object upon encoding failure. + * + * @since 3.6 + * + * @param mixed $data Data. + * @return mixed Decoded data. A `WP_Error` object upon encoding failure. + */ + public function encode( $data ) { + foreach ( $this->formats as $format ) { + $encoder = $this->get_encoder( $format ); + + if ( is_wp_error( $encoder ) ) { + return $encoder; + } + + $data = $encoder->encode( $data ); + + if ( is_wp_error( $data ) ) { + return $data; + } + } + + return $data; + } + + /** + * Encodes the given data. + * The data is passed by reference and the method returns a `WP_Error` object upon encoding failure. + * + * @since 3.6 + * + * @param mixed $data Data, passed by reference. + * @return WP_Error + */ + public function encode_reference( &$data ): WP_Error { + $value = $this->encode( $data ); + + if ( is_wp_error( $value ) ) { + return $value; + } + + $data = $value; + return new WP_Error(); + } + + /** + * Returns an instance of a format encoder. + * + * @since 3.8 + * + * @param string $format A format "name". + * @return Data_Encoder_Interface|WP_Error + */ + private function get_encoder( string $format ) { + $encoding_classes = array( + Base64_Encoding::NAME => Base64_Encoding::class, + Json_Encoding::NAME => Json_Encoding::class, + Serialize_Encoding::NAME => Serialize_Encoding::class, + Url_Encoding::NAME => Url_Encoding::class, + ); + + if ( ! empty( $encoding_classes[ $format ] ) ) { + $class = $encoding_classes[ $format ]; + return new $class(); + } + + /** + * Allows to add encoding formats. + * + * @since 3.8 + * + * @param Data_Encoder_Interface|null $encoder Instance of a format coder. + * @param string $format The name of the requested format. + */ + $encoder = apply_filters( 'pll_data_encoder', null, $format ); + + if ( $encoder instanceof Data_Encoder_Interface ) { + return $encoder; + } + + return new WP_Error( + 'pll-encoding-unknown-format', + sprintf( + /* translators: %s is a format. */ + __( 'Unknown data encoding format "%s".', 'polylang-pro' ), + $format + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/Encoding/Json_Encoding.php b/wp-content/plugins/polylang-pro/src/services/Encoding/Json_Encoding.php new file mode 100644 index 0000000..c87262a --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/Encoding/Json_Encoding.php @@ -0,0 +1,74 @@ +polylang = &$polylang; + $this->property = $property; + $this->args = $args; + + add_action( 'admin_init', array( $this, 'load' ), 20 ); // After fusion Builder. + } + + /** + * Finds out if the block editor is in use and loads the correct class accordingly. + * + * @since 2.8 + * + * @return void + */ + public function load() { + if ( 'post-new.php' === $GLOBALS['pagenow'] ) { + // We need to wait until we know which editor is in use + add_filter( 'use_block_editor_for_post', array( $this, '_load' ), 999 ); // After the plugin Classic Editor + } elseif ( 'post.php' === $GLOBALS['pagenow'] && isset( $_GET['action'], $_GET['post'] ) && 'edit' === $_GET['action'] && empty( $_GET['meta-box-loader'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->_load( use_block_editor_for_post( (int) $_GET['post'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + } else { + $this->_load( false ); + } + } + + /** + * Loads the correct class, depending on the editor in use. + * + * We must make sure to instantiate the class only once, as the function may be called from a filter, + * + * @since 2.8 + * + * @param bool $is_block_editor Whether to use the block editor or not. + * @return bool + */ + public function _load( $is_block_editor ) { + $prop = $this->property; + + if ( isset( $this->polylang->$prop ) ) { + return $is_block_editor; + } + + switch ( $prop ) { + case 'machine_translation': + $classname = WP_Syntex\Polylang_Pro\Modules\Machine_Translation\Posts\Button::class; + break; + + default: + $classname = 'PLL_' . ucwords( $prop, '_' ); + break; + } + + if ( $is_block_editor && pll_use_block_editor_plugin() ) { + $classname = "{$classname}_REST"; + } + + $args = array( $this->polylang ); + + if ( ! empty( $this->args ) ) { + $args = array_merge( $args, array_values( $this->args ) ); + } + + $this->polylang->$prop = new $classname( ...$args ); + + return $is_block_editor; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/collect-linked-objects/collect-linked-posts.php b/wp-content/plugins/polylang-pro/src/services/collect-linked-objects/collect-linked-posts.php new file mode 100644 index 0000000..9f775eb --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/collect-linked-objects/collect-linked-posts.php @@ -0,0 +1,307 @@ +options = $options; + } + + /** + * Gets all the post ids linked to a set of posts. + * + * @since 3.3 + * @since 3.4 Parameter changed from int[] to WP_Post[]. + * @since 3.5 Renamed from get_linked_post_ids and now returns a WP_Post array. + * Also added a second parameter for the post types to retrieve. + * + * @param WP_Post[] $posts The posts for which searching linked posts. + * @param string[] $post_types Limits the linked posts search to these post types. + * @return WP_Post[] An array of linked post objects. + */ + public function get_linked_posts( array $posts, array $post_types ) { + $linked_ids = array(); + + foreach ( $posts as $post ) { + $linked_ids = array_merge( $linked_ids, $this->get_post_ids_from_post( $post ) ); + } + + $linked_ids = array_unique( $linked_ids ); + + if ( empty( $linked_ids ) ) { + return array(); + } + + // Query all the linked posts outside the PLL_Export_Bulk_Option::translate() loop to avoid multiple SQL queries with get_post() call. + return get_posts( + array( + 'include' => $linked_ids, + 'post_type' => $post_types, + 'post_status' => 'any', + 'orderby' => 'ID', + 'order' => 'ASC', + ) + ); + } + + /** + * Gets the post ids from a post, whether it's classic or block edited. + * + * @since 3.3 + * + * @param WP_Post $post A given WP_Post object. + * @return int[] An array of post ids. + */ + protected function get_post_ids_from_post( $post ) { + $linked_ids = array(); + + if ( function_exists( 'has_blocks' ) && has_blocks( $post->post_content ) ) { + $linked_ids = $this->get_post_ids_from_block_content( $post->post_content ); + } elseif ( $this->options['media_support'] ) { + $linked_ids = $this->get_medias_from_html_content( $post->post_content ); + } + + if ( $this->options['media_support'] && has_post_thumbnail( $post->ID ) ) { + $linked_ids[] = get_post_thumbnail_id( $post->ID ); + } + + $linked_ids = array_filter( $linked_ids ); // Clean up the array. + + /** + * Filters the medias linked to a post. + * + * @since 3.3 + * @since 3.7 `post_id` has been replaced by `post`, we now send the `WP_Post` object instead of the ID. + * + * @param int[] $linked_ids Post ids attached to a post (could be in content or in post metas). + * @param WP_Post $post The post we get other post from. + */ + $linked_ids = apply_filters( 'pll_collect_post_ids', $linked_ids, $post ); + + return array_unique( $linked_ids ); + } + + /** + * Gets the post ids from block type content. + * + * @since 3.3 + * + * @param string $post_content The content of the post. + * @return int[] An array of post ids. + */ + protected function get_post_ids_from_block_content( $post_content ) { + $blocks = parse_blocks( $post_content ); + + return $this->get_post_ids_from_blocks_deep( $blocks ); + } + + /** + * Gets the post ids from blocks. + * + * @since 3.3 + * + * @param array $blocks An array of blocks. + * @return int[] An array of post ids. + */ + protected function get_post_ids_from_blocks_deep( $blocks ) { + $post_ids = array(); + + foreach ( $blocks as $block ) { + if ( $this->options['media_support'] ) { + $post_ids = array_merge( $post_ids, $this->get_media_ids_from_block( $block ) ); + } + $post_ids = array_merge( $post_ids, $this->get_navigation_block_ids( $block ) ); + $post_ids = array_merge( $post_ids, $this->get_reusable_block_ids( $block ) ); + } + return array_unique( $post_ids ); + } + + /** + * Gets the media ids from a block. + * + * @since 3.3 + * + * @param array $block A representative array of a block. + * @return int[] An array of media ids, empty if none found. + */ + protected function get_media_ids_from_block( $block ) { + $post_ids = array(); + + switch ( $block['blockName'] ) { + case 'core/audio': + case 'core/cover': + case 'core/file': + case 'core/image': + case 'core/video': + if ( ! empty( $block['attrs']['id'] ) ) { + $post_ids[] = $block['attrs']['id']; + } + break; + case 'core/gallery': + // Backward compatibility with WP < 5.9. + if ( ! empty( $block['attrs']['ids'] ) && is_array( $block['attrs']['ids'] ) ) { + $post_ids = array_merge( $post_ids, $block['attrs']['ids'] ); + } + break; + case 'core/media-text': + if ( ! empty( $block['attrs']['mediaId'] ) ) { + $post_ids[] = $block['attrs']['mediaId']; + } + break; + default: + if ( ! empty( $block['innerHTML'] ) ) { + $post_ids = array_merge( $post_ids, $this->get_medias_from_html_content( $block['innerHTML'] ) ); + } + break; + } + if ( ! empty( $block['innerBlocks'] ) ) { + $post_ids = array_merge( $post_ids, $this->get_post_ids_from_blocks_deep( $block['innerBlocks'] ) ); + } + + return $post_ids; + } + + /** + * Gets the media ids from classic type content. + * + * @since 3.3 + * + * @param string $post_content The content of the post. + * @return int[] + */ + protected function get_medias_from_html_content( $post_content ) { + + return array_merge( $this->get_medias_from_img_tags( $post_content ), $this->get_medias_from_shortcodes( $post_content ) ); + } + + /** + * Gets media ids from shortcodes. + * + * @since 3.3 + * + * @param string $post_content The content of the required post. + * @return int[] The media ids. + */ + protected function get_medias_from_shortcodes( $post_content ) { + $media_ids = array(); + + if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $post_content, $matches, PREG_SET_ORDER ) ) { + foreach ( $matches as $shortcode ) { + $attributes = shortcode_parse_atts( $shortcode[3] ); // $shortcode[3] returns the shortcode attributes as string. + + switch ( $shortcode[2] ) { // $shortcode[2] returns the shortcode name. + case 'caption': + if ( isset( $attributes['id'] ) && preg_match( '/attachment_([0-9]+)/', $attributes['id'], $attr ) ) { + $media_ids[] = (int) $attr[1]; + } + break; + case 'gallery': + case 'playlist': + if ( isset( $attributes['ids'] ) ) { + $media_ids = array_merge( $media_ids, array_map( 'intval', explode( ',', $attributes['ids'] ) ) ); + } + break; + } + } + } + + return $media_ids; + } + + /** + * Gets media ids from img tags + * + * @since 3.3 + * + * @param string $post_content The content of the post to search from. + * @return int[] An array of media ids (empty if no media is found). + */ + protected function get_medias_from_img_tags( $post_content ) { + $media_ids = array(); + $textarr = wp_html_split( $post_content ); + if ( ! is_array( $textarr ) ) { + return $media_ids; + } + foreach ( $textarr as $text ) { + if ( 0 !== strpos( $text, 'get_post_ids_from_block_content( $linked_block_post->post_content ) ); + } + + return $ids; + } + + /** + * Returns the ID from a navigation block. + * + * @since 3.3 + * + * @param array $block An array containing block data. + * @return int[] An array of navigation post IDs, empty if none found. + */ + protected function get_navigation_block_ids( $block ) { + if ( 'core/navigation' !== $block['blockName'] ) { + return array(); + } + return array( (int) $block['attrs']['ref'] ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/collect-linked-objects/collect-linked-terms.php b/wp-content/plugins/polylang-pro/src/services/collect-linked-objects/collect-linked-terms.php new file mode 100644 index 0000000..e99fee1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/collect-linked-objects/collect-linked-terms.php @@ -0,0 +1,333 @@ + + */ + protected $processed_posts = array(); + + /** + * Gets all the term objects linked to a set of posts. + * + * @since 3.3 + * + * @param WP_Post[] $posts An array of post objects. + * @param string[] $taxonomies Optional. Terms will be limited to the given taxonomies. + * @return WP_Term[] An array of linked term objects. + */ + public function get_linked_terms( array $posts, array $taxonomies = array() ) { + $terms = $this->get_terms_assigned_to_posts( $posts, $taxonomies ); + + $terms = array_merge( $terms, $this->get_terms_from_posts( $posts, $taxonomies ) ); + + return array_merge( $terms, $this->get_terms_parents( $terms ) ); + } + + /** + * Gets terms assigned to linked posts. + * + * @since 3.7 + * + * @param WP_Post[] $posts An array of post objects. + * @param string[] $taxonomies Terms will be limited to the given taxonomies. + * @return WP_Term[] An array of assigned term objects. + */ + protected function get_terms_assigned_to_posts( array $posts, array $taxonomies ): array { + $post_ids = wp_list_pluck( $posts, 'ID' ); + $post_terms = wp_get_object_terms( $post_ids, $taxonomies ); + + return is_array( $post_terms ) ? $post_terms : array(); + } + + /** + * Gets all the term objects from a set of posts content. + * + * @since 3.7 + * + * @param WP_Post[] $posts An array of post objects. + * @param string[] $taxonomies Terms will be limited to the given taxonomies. + * @return WP_Term[] An array of linked term objects. + */ + protected function get_terms_from_posts( array $posts, array $taxonomies ): array { + $this->processed_posts = array(); + $linked_ids = array(); + + foreach ( $posts as $post ) { + $linked_ids = array_merge( $linked_ids, $this->get_term_ids_from_post( $post ) ); + } + + $this->processed_posts = array(); + + if ( empty( $linked_ids ) ) { + return array(); + } + + $linked_ids = array_unique( $linked_ids ); + + $terms = get_terms( + array( + 'include' => $linked_ids, + 'taxonomy' => $taxonomies, + 'hide_empty' => false, + ) + ); + + return is_array( $terms ) ? $terms : array(); + } + + /** + * Returns all the term IDs linked in a post. + * + * @since 3.3 + * + * @param WP_Post $post A given WP_Post object. + * @return int[] An array of term IDs. + * @phpstan-return array, positive-int> + */ + protected function get_term_ids_from_post( WP_Post $post ) { + if ( isset( $this->processed_posts[ $post->ID ] ) ) { + return array(); + } + + $this->processed_posts[ $post->ID ] = $post->ID; + + $linked_ids = array(); + + if ( has_blocks( $post->post_content ) ) { + $linked_ids = $this->get_term_ids_from_block_content( $post->post_content ); + } + + /** + * Filters the term IDs linked in a post. + * + * @since 3.3 + * + * @param int[] $linked_ids Term IDs linked in a post. + * @param WP_Post $post The post we get term IDs from. + */ + $linked_ids = apply_filters( 'pll_collect_term_ids', $linked_ids, $post ); + + /** @phpstan-var array, positive-int> */ + return array_unique( $linked_ids ); + } + + /** + * Returns the term IDs from block type content. + * + * @since 3.3 + * + * @param string $post_content The content of the post. + * @return int[] An array of term IDs. + * + * @phpstan-return array, positive-int> + */ + protected function get_term_ids_from_block_content( $post_content ) { + return $this->get_term_ids_from_blocks( parse_blocks( $post_content ) ); + } + + /** + * Returns the term IDs from blocks. + * + * @since 3.3 + * + * @param array[] $blocks An array of blocks. + * @return int[] An array of term IDs. + * + * @phpstan-return array, positive-int> + */ + protected function get_term_ids_from_blocks( array $blocks ) { + $term_ids = array(); + + foreach ( $blocks as $block ) { + $term_ids = array_merge( $term_ids, $this->get_term_ids_from_block( $block ) ); + } + + return array_unique( $term_ids ); + } + + /** + * Returns the term IDs from a block. + * + * @since 3.3 + * + * @param array $block A representative array of a block. + * @return int[] An array of term IDs. + * + * @phpstan-return array, positive-int> + */ + protected function get_term_ids_from_block( array $block ) { + $term_ids = array(); + + switch ( $block['blockName'] ) { + case 'core/block': + $term_ids = array_merge( $term_ids, $this->get_term_ids_from_reusable_block( $block ) ); + break; + + case 'core/latest-posts': + $term_ids = array_merge( $term_ids, $this->get_term_ids_from_latest_posts_block( $block ) ); + break; + + case 'core/query': + $term_ids = array_merge( $term_ids, $this->get_term_ids_from_query_block( $block ) ); + break; + } + + if ( ! empty( $block['innerBlocks'] ) ) { + $term_ids = array_merge( $term_ids, $this->get_term_ids_from_blocks( $block['innerBlocks'] ) ); + } + + return array_unique( $term_ids ); + } + + /** + * Returns the term IDs from a reusable block. + * + * @since 3.3 + * + * @param array $block A representative array of a block. + * @return int[] An array of term IDs. + * + * @phpstan-return array, positive-int> + */ + protected function get_term_ids_from_reusable_block( array $block ) { + if ( empty( $block['attrs']['ref'] ) || ! is_int( $block['attrs']['ref'] ) ) { + return array(); + } + + $post_id = $block['attrs']['ref']; + + if ( isset( $this->processed_posts[ $post_id ] ) ) { + return array(); + } + + $this->processed_posts[ $post_id ] = $post_id; + + $linked_post = get_post( $post_id ); + + if ( ! $linked_post instanceof WP_Post ) { + return array(); + } + + return $this->get_term_ids_from_block_content( $linked_post->post_content ); + } + + /** + * Returns the term IDs from a latest posts block. + * + * @since 3.3 + * + * @param array $block A representative array of a block. + * @return int[] An array of term IDs. + * + * @phpstan-return array, positive-int> + */ + protected function get_term_ids_from_latest_posts_block( array $block ) { + if ( empty( $block['attrs']['categories'] ) || ! is_array( $block['attrs']['categories'] ) ) { + return array(); + } + + /** + * The terms are available like this: + * array( + * 'categories' => array( + * 0 => array( + * 'id' => 12, + * // ... + * ), + * 1 => array( + * 'id' => 16, + * // ... + * ), + * ), + * ) + */ + /** @phpstan-var array, positive-int> */ + return array_column( $block['attrs']['categories'], 'id' ); + } + + /** + * Returns the term IDs from a query block. + * + * @since 3.3 + * + * @param array $block A representative array of a block. + * @return int[] An array of term IDs. + * + * @phpstan-return array, positive-int> + */ + protected function get_term_ids_from_query_block( array $block ) { + if ( empty( $block['attrs']['query']['taxQuery'] ) || ! is_array( $block['attrs']['query']['taxQuery'] ) ) { + return array(); + } + + /** + * The terms are available like this: + * array( + * // ... + * 'query' => array( + * // ... + * 'taxQuery' => array( + * 'post_tag' => array( + * 0 => 261, + * ), + * 'category' => array( + * 0 => 12, + * ), + * ), + * ), + * ) + */ + /** @phpstan-var array, positive-int> */ + return array_merge( ...array_values( $block['attrs']['query']['taxQuery'] ) ); + } + + /** + * Gets the parent terms of all terms linked to posts. + * + * @since 3.7 + * + * @param WP_Term[] $terms An array of terms. + * @return array The array of terms parents, if any. + */ + protected function get_terms_parents( array $terms ): array { + $term_parents_ids = array(); + foreach ( $terms as $term ) { + if ( empty( $term->parent ) ) { + continue; + } + + $term_parents = get_ancestors( $term->term_id, $term->taxonomy ); + if ( empty( $term_parents ) ) { + continue; + } + + $term_parents_ids = array_merge( $term_parents_ids, $term_parents ); + } + + if ( empty( $term_parents_ids ) ) { + return array(); + } + + $terms_parents = get_terms( + array( + 'include' => $term_parents_ids, + 'hide_empty' => false, + ) + ); + + return is_array( $terms_parents ) ? $terms_parents : array(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/context.php b/wp-content/plugins/polylang-pro/src/services/context.php new file mode 100644 index 0000000..b542092 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/context.php @@ -0,0 +1,114 @@ + + */ + public static function to_string( array $context ): string { + $context = array_merge( static::get_default(), $context ); + $context = wp_json_encode( $context ); + + return false === $context ? '' : $context; + } + + /** + * Returns array of data from a `Translation_entry` context. + * + * @since 3.6 + * + * @param string $context Raw context from a `Translation_Entry`. + * @return array Extracted array of data. + * + * @phpstan-return array<'encoding'|'field'|'id', string> + */ + public static function to_array( string $context ): array { + $context = json_decode( $context, true ); + $context = is_array( $context ) ? $context : array(); + $context = array_filter( $context, 'is_string' ); + $default = static::get_default(); + + return array_merge( $default, array_intersect_key( $context, $default ) ); + } + + /** + * Returns allowed context keys with empty values. + * + * @since 3.6 + * + * @return array Context array keys with empty values. + * + * @phpstan-return array<'encoding'|'field'|'id', string> + */ + public static function get_default(): array { + return array( + self::FIELD => '', + self::ID => '', + self::ENCODING => '', + ); + } + + /** + * Returns field context. + * + * @since 3.6 + * + * @param Translation_Entry $entry Entry to get field from. + * @return string + */ + public static function get_field( Translation_Entry $entry ): string { + $context = self::to_array( $entry->context ); + + return $context[ static::FIELD ]; + } + + /** + * Returns id context. + * + * @since 3.6 + * + * @param Translation_Entry $entry Entry to get id from. + * @return string + */ + public static function get_id( Translation_Entry $entry ): string { + $context = self::to_array( $entry->context ); + + return $context[ static::ID ]; + } + + /** + * Returns encoding context. + * + * @since 3.6 + * + * @param Translation_Entry $entry Entry to get encoding from. + * @return string + */ + public static function get_encoding( Translation_Entry $entry ): string { + $context = self::to_array( $entry->context ); + + return $context[ static::ENCODING ]; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/dom/dom-content.php b/wp-content/plugins/polylang-pro/src/services/dom/dom-content.php new file mode 100644 index 0000000..41fe743 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/dom/dom-content.php @@ -0,0 +1,250 @@ +content = $content; + $this->charset = get_bloginfo( 'charset' ); + $this->charset = is_string( $this->charset ) && ! empty( $this->charset ) ? $this->charset : 'UTF-8'; + $this->placeholder = substr( uniqid( 'pll_' ), 0, 10 ); + $this->placeholder = "@@{$this->placeholder}-%d@@"; + } + + /** + * Extracts strings from content, given a list of parsing rules. + * + * @since 3.3 + * + * @uses DOMXPath + * + * @param string[] $rules Parsing rules. Ex: `[ '//figure/img/@alt' ]`. + * @return string[] Path to matching nodes as array keys, extracted strings as array values. + * Ex: `[ '/figure/img[1]/@alt' => 'Image alt text.' ]`. + * + * @phpstan-return array + */ + public function get_strings( array $rules ) { + if ( empty( $rules ) ) { + return array(); + } + + $matched_parts = array(); + $document = PLL_DOM_Document::from_html( $this->content ); + $xpath = new DOMXPath( $document ); + + foreach ( $rules as $parsing_rule ) { + $node_list = $xpath->query( $parsing_rule ); + + if ( empty( $node_list ) ) { + // Error. + continue; + } + + foreach ( $node_list as $node ) { + if ( ! $node instanceof DOMNode ) { + continue; + } + + $node_path = $node->getNodePath(); + + if ( ! is_string( $node_path ) ) { + // Trouble. + continue; + } + + $node_content = $this->get_node_content( $node ); + + if ( '' === $node_content ) { + continue; + } + + $node_path = (string) preg_replace( '@/text\(\)$@', '', $node_path ); + + $matched_parts[ $node_path ] = $node_content; + } + } + + return $matched_parts; + } + + /** + * Replaces strings in the content, given a list of parsing rules. + * + * @since 3.3 + * + * @uses DOMXPath + * + * @param string[] $new_strings Path to matching nodes as array keys, new strings as array values. + * Ex: `[ '/figure/img[1]/@alt' => 'New image alt text.' ]`. + * @return string Content with replaced strings. + * + * @phpstan-param array $new_strings + */ + public function replace_content( array $new_strings ) { + $document = PLL_DOM_Document::from_html( $this->content ); + $xpath = new DOMXPath( $document ); + $node_values = array(); + $incr = 0; + + foreach ( $new_strings as $node_path => $new_string ) { + $node_list = $xpath->query( $node_path ); + + if ( ! $node_list instanceof DOMNodeList ) { + // Error. + continue; + } + + // Each node path corresponds to only one node: get the first node then. + $node = $this->get_first_dom_node( $node_list ); + + if ( ! $node instanceof DOMNode ) { + continue; + } + + $node_placeholder = sprintf( $this->placeholder, ++$incr ); + $node_values[ $node_placeholder ] = html_entity_decode( $new_string, ENT_QUOTES, $this->charset ); + + if ( $node instanceof DOMAttr ) { + /** + * Tag attribute. + * Escape the value and insert the placeholder. + */ + $node_values[ $node_placeholder ] = esc_attr( $node_values[ $node_placeholder ] ); + $node->nodeValue = $node_placeholder; + continue; + } + + /** + * Tag content. + */ + if ( ! $node->ownerDocument instanceof DOMDocument ) { + // Trouble. + continue; + } + + // 1- Remove all child nodes. + while ( $node->hasChildNodes() ) { + if ( ! empty( $node->firstChild ) ) { + $node->removeChild( $node->firstChild ); + } + } + + // 2- Insert a placeholder node. + $node->appendChild( $node->ownerDocument->createTextNode( $node_placeholder ) ); + } + + $content = $document->saveHTML(); + + if ( is_string( $content ) && '' !== trim( $content ) ) { + // Decode entities, then put back the translated texts. + $this->content = html_entity_decode( $content, ENT_QUOTES, $this->charset ); + $this->content = str_replace( array_keys( $node_values ), $node_values, $this->content ); + } + + return $this->content; + } + + /** + * Returns the first `DOMNode` element from a `DOMNodeList`. + * + * @since 3.3 + * + * @param DOMNodeList $node_list A `DOMNodeList` element. + * @return DOMNode|null A `DOMNode` element, or null if no elements have been found. + * + * @phpstan-param DOMNodeList $node_list + */ + private function get_first_dom_node( DOMNodeList $node_list ) { + foreach ( $node_list as $node ) { + if ( $node instanceof DOMNode ) { + return $node; + } + } + + return null; + } + + /** + * Returns a node's content. + * If the node is an attribute, the attribute's value is returned. + * If the node is a tag, the tag's HTML is returned. + * + * @since 3.3 + * + * @param DOMNode $node A node. + * @return string + */ + private function get_node_content( DOMNode $node ) { + if ( $node instanceof DOMAttr || ! $node->hasChildNodes() ) { + // Tag attribute. + if ( ! is_string( $node->nodeValue ) ) { + return ''; + } + + return trim( html_entity_decode( $node->nodeValue, ENT_QUOTES, $this->charset ) ); + } + + // Tag content. + if ( ! $node->ownerDocument instanceof DOMDocument ) { + // Trouble. + return ''; + } + + $content = ''; + + foreach ( iterator_to_array( $node->childNodes ) as $node ) { + if ( ! $node instanceof DOMNode || ! $node->ownerDocument instanceof DOMDocument ) { + // Don't return partial content: if there is at least 1 error, return an empty content. + return ''; + } + + $node_content = $node->ownerDocument->saveHTML( $node ); + + if ( ! is_string( $node_content ) ) { + // Don't return partial content: if there is at least 1 error, return an empty content. + return ''; + } + + $content .= $node_content; + } + + return trim( html_entity_decode( $content, ENT_QUOTES, $this->charset ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/dom/dom-document.php b/wp-content/plugins/polylang-pro/src/services/dom/dom-document.php new file mode 100644 index 0000000..3ea65cf --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/dom/dom-document.php @@ -0,0 +1,208 @@ +preserveWhiteSpace = false; + $document->formatOutput = true; + + return self::from_string( $xml, $document, array( $document, 'loadXML' ), $flags ); + } + + /** + * Creates a PLL_DOM_Document instance from a HTML string. + * + * @since 3.1 + * @since 3.3 Added parameters $version, $encoding, and $flags. + * @since 3.3 Doesn't format the output anymore. + * @since 3.3 Doesn't add the `` and `` tags by default anymore. + * + * Doctype declaration is disallowed for security reasons (XEE vulnerability). + * + * @param string $html A HTML valid string. + * @param string $version Optional. XML version to use. Default is '1.0'. + * @param string $encoding Optional. Encoding to use. Default is 'UTF-8'. + * @param int $flags Optional. A series of libxml flags to parameterize the loading. + * Default is `LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD`. + * {@link https://www.php.net/manual/en/libxml.constants.php}. + * @return PLL_DOM_Document + */ + public static function from_html( $html, $version = '1.0', $encoding = 'UTF-8', $flags = 0 ) { + $document = new self( $version, $encoding ); + $document->strictErrorChecking = false; + + /* + * Hack to enforce that the string will be processed with the right encoding by DOMDocument. + * The added processing instruction is then removed by contains_not_allowed_node(). + */ + $html = '' . $html; + + $flags = ! empty( $flags ) ? $flags : LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD; + + $document = self::from_string( $html, $document, array( $document, 'loadHTML' ), $flags ); + $document->encoding = $encoding; // Enforce encoding, as it is not set by DOMDocument. + + return $document; + } + + /** + * Factory function to safely generate DOMDocument from strings. + * + * @since 3.1 + * + * Entity loading is disabled to prevent External Entity Injections {@link https://phpsecurity.readthedocs.io/en/latest/Injection-Attacks.html#xml-external-entity-injection}. + * + * @param string $string A XML content to load. + * @param PLL_DOM_Document $document A document parameterized to load the content into. + * @param callable $function Method name which will handle the loading. + * @param int $flags A series of libxml flags to parameterize the loading. {@link https://www.php.net/manual/en/libxml.constants.php}. + * @return PLL_DOM_Document + */ + private static function from_string( $string, $document, $function, $flags = 0 ) { + if ( ! empty( $string ) ) { + // libxml2 version 2.9.0 and superior doesn't load external entities by default. libxml_disable_entity_loader() is deprecated since PHP 8.0.0 . + $internal_errors = libxml_use_internal_errors( true ); + libxml_clear_errors(); + if ( ! defined( 'LIBXML_DOTTED_VERSION' ) || version_compare( LIBXML_DOTTED_VERSION, '2.9.0', '<' ) ) { + $entity_loader = libxml_disable_entity_loader( true ); // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated + $document = self::safe_load_string( $string, $document, $function, $flags ); + libxml_disable_entity_loader( $entity_loader ); // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated + } else { + $document = self::safe_load_string( $string, $document, $function, $flags ); + } + libxml_clear_errors(); + libxml_use_internal_errors( $internal_errors ); + } + + return $document; + } + + /** + * Loads the string into the given document, returns the document if it's safe, or return an empty document with errors. + * + * @since 3.1 + * + * @param string $string A string to be loaded and parsed as the document. + * @param PLL_DOM_Document $document A configured instance of PLL_DOM_Document to load the string into. + * @param callable $function Name of the loading method to use. + * @param int $flags A series of libxml flags to parameterize the loading. {@link https://www.php.net/manual/en/libxml.constants.php}. + * @return PLL_DOM_Document + */ + private static function safe_load_string( $string, $document, $function, $flags = 0 ) { + call_user_func( $function, $string, LIBXML_NONET | $flags ); + if ( $document->contains_not_allowed_node() ) { + $document = new self(); + } + $document->errors = array_merge( $document->errors, libxml_get_errors() ); + + return $document; + } + + /** + * Verifies that the document contains only nodes of allowed types. + * + * @since 3.1 + * + * @see https://www.php.net/manual/en/dom.constants.php. + * + * @return bool + */ + public function contains_not_allowed_node() { + foreach ( $this->childNodes as $node ) { + if ( ! $node instanceof DOMNode ) { + return true; + } + + $allowed_types = array( + XML_DOCUMENT_NODE, + XML_ELEMENT_NODE, + XML_ATTRIBUTE_NODE, + XML_TEXT_NODE, + XML_COMMENT_NODE, + XML_CDATA_SECTION_NODE, + XML_PI_NODE, + ); + + if ( ! in_array( $node->nodeType, $allowed_types, true ) ) { + return true; + } + + if ( XML_PI_NODE === $node->nodeType ) { + $this->removeChild( $node ); // Remove our hacky element. + * + * @return DOMNodeList + * + * @phpstan-return DOMNodeList + */ + public function get_first_level_html_nodes() { + $body = $this->getElementsByTagName( 'body' )->item( 0 ); + + return null !== $body ? $body->childNodes : new DOMNodeList(); + } + + /** + * Whether the document contains errors or not + * + * @since 3.1 + * + * @return bool + */ + public function has_errors() { + return ! empty( $this->errors ); + } + + /** + * Returns the document's errors. + * + * @since 3.3 + * + * @return LibXMLError[] + */ + public function get_errors() { + return $this->errors; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/dom/dom-nodes-iterator.php b/wp-content/plugins/polylang-pro/src/services/dom/dom-nodes-iterator.php new file mode 100644 index 0000000..0e27f7f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/dom/dom-nodes-iterator.php @@ -0,0 +1,136 @@ + + */ +class PLL_DOM_Nodes_Iterator implements RecursiveIterator { + /** + * The nodes list. + * + * @var DOMNodeList + * + * @phpstan-var DOMNodeList + */ + private $nodes; + + /** + * The offset. + * + * @var int + */ + private $offset = 0; + + /** + * Constructor. + * + * @since 3.1 + * + * @param DOMNodeList $nodes Nodes. + * + * @phpstan-param DOMNodeList $nodes + */ + public function __construct( DOMNodeList $nodes ) { + $this->nodes = $nodes; + } + + /** + * Rewind the Iterator to the first element. + * + * @since 3.1 + * + * @return void + */ + #[\ReturnTypeWillChange] + public function rewind() { + $this->offset = 0; + } + + /** + * Returns the current element. + * + * @since 3.1 + * + * @return DOMNode|null + */ + #[\ReturnTypeWillChange] + public function current() { + return $this->nodes->item( $this->offset ); + } + + /** + * Returns the key of the current element. + * Issues `E_NOTICE` on failure. + * + * @since 3.1 + * + * @return string|null Returns anything on success, or null on failure. + */ + #[\ReturnTypeWillChange] + public function key() { + if ( $this->current() ) { + return $this->current()->nodeName; + } + return null; + } + + /** + * Moves forward to next element. + * + * @since 3.1 + * + * @return void + */ + #[\ReturnTypeWillChange] + public function next() { + ++$this->offset; + } + + /** + * Checks if current position is valid. + * + * @since 3.1 + * + * @return bool + */ + public function valid(): bool { + return $this->offset < $this->nodes->length; + } + + /** + * Returns if an iterator can be created for the current entry. + * + * @since 3.1 + * + * @return bool Returns `true` if the current entry can be iterated over, otherwise returns `false`. + */ + public function hasChildren(): bool { + return isset( $this->current()->childNodes->length ) && $this->current()->childNodes->length > 0; + } + + /** + * Returns an iterator for the current entry. + * + * @since 3.1 + * + * @return self|null Returns an iterator for the current entry if it exists, or null otherwise. + */ + #[\ReturnTypeWillChange] + public function getChildren() { + if ( $this->current() ) { + return new self( $this->current()->childNodes ); + } + return null; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-container.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-container.php new file mode 100644 index 0000000..5d46806 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-container.php @@ -0,0 +1,93 @@ + + */ +class PLL_Export_Container implements IteratorAggregate, Countable { + + /** + * Name of the class defining an individual export. + * + * @var string + * + * @phpstan-var class-string + */ + private $class_name; + + /** + * Contains all the exports. + * Each export is referenced with a key composed of its source and target languages. + * + * @var PLL_Export_Data[] + * + * @phpstan-var array + */ + private $exports = array(); + + /** + * Constructor. + * + * @since 3.6 + * + * @param string $class_name Name of the class that defines an individual export. The class must implement + * the interface `PLL_Export_Data`. + * + * @phpstan-param class-string $class_name + */ + public function __construct( string $class_name ) { + $this->class_name = $class_name; + } + + /** + * Returns an export object for the given source/target languages pair. + * + * @since 3.6 + * + * @param PLL_Language $source_language The export's source language. + * @param PLL_Language $target_language The export's target language. + * @return PLL_Export_Data + */ + public function get( PLL_Language $source_language, PLL_Language $target_language ): PLL_Export_Data { + $export_key = "{$source_language->slug}/{$target_language->slug}"; + $class_name = $this->class_name; + + if ( ! array_key_exists( $export_key, $this->exports ) ) { + $this->exports[ $export_key ] = new $class_name( $source_language, $target_language ); + } + + return $this->exports[ $export_key ]; + } + + /** + * Returns an exports iterator. + * Needed for the interface `IteratorAggregate`. + * + * @since 3.6 + * + * @return ArrayIterator + * + * @phpstan-return ArrayIterator + */ + public function getIterator(): ArrayIterator { + return new ArrayIterator( $this->exports ); + } + + /** + * Returns the number of exports. + * Needed for the interface `Countable`. + * + * @since 3.6 + * + * @return int + */ + public function count(): int { + return count( $this->exports ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-data-from-posts.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-data-from-posts.php new file mode 100644 index 0000000..eedcbc9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-data-from-posts.php @@ -0,0 +1,175 @@ +model = $model; + + $this->export_posts = new PLL_Export_Posts( $this->model->post ); + $this->export_terms = new PLL_Export_Terms( $this->model->term ); + $this->collect_posts = new PLL_Collect_Linked_Posts( $this->model->options ); + $this->collect_terms = new PLL_Collect_Linked_Terms(); + } + + /** + * Exports the items with their related ones. + * + * @since 3.6 + * + * @param PLL_Export_Container $container Data to export. + * @param WP_Post[] $posts An array containing `WP_Post` objects. + * @param PLL_Language $target_language The target language of the posts. + * @param array $args { + * Optional. A list of optional arguments. + * + * @type bool $include_translated_items Tells if items that are already translated in the target languages must + * also be exported. This applies only to linked items (like assigned + * terms, items from reusable blocks, etc). Default is false. + * } + * @return void + */ + public function send_to_export( PLL_Export_Container $container, array $posts, PLL_Language $target_language, array $args = array() ) { + $posts_to_export = $this->get_posts_to_export( $posts, $target_language, $args ); + $this->export_posts->add_items( $container, $posts_to_export, $target_language ); + + $terms_to_export = $this->get_terms_to_export( $posts_to_export, $target_language, $args ); + $this->export_terms->add_items( $container, $terms_to_export, $target_language ); + } + + /** + * Gets all posts to be exported. + * + * @since 3.6 + * + * @param WP_Post[] $posts An array of posts. + * @param PLL_Language $lang The target language of the posts. + * @param array $args A list of optional arguments. + * @return WP_Post[] + */ + protected function get_posts_to_export( array $posts, PLL_Language $lang, array $args = array() ): array { + $include_translated_items = ! empty( $args['include_translated_items'] ); + $post_types = $this->model->get_translated_post_types(); + $collected_posts = array_merge( + $posts, + $this->collect_posts->get_linked_posts( $posts, $post_types ) + ); + + if ( ! $include_translated_items ) { + // Remove items that are already translated in this language. + foreach ( $collected_posts as $i => $linked_post ) { + if ( $this->model->post->get_translation( $linked_post->ID, $lang ) ) { + // A translation already exists. + unset( $collected_posts[ $i ] ); + } + } + } + + /** + * Filters the posts to export. + * + * Allows filtering the complete list of posts before export, + * after all posts have been collected (main posts and linked posts). + * + * @since 3.8 + * + * @param WP_Post[] $collected_posts Posts to export. + * @param WP_Post[] $posts The original posts being exported. + */ + $collected_posts = apply_filters( 'pll_export_posts', $collected_posts, $posts ); + + return $this->export_posts->remove_duplicate_items( $collected_posts ); + } + + /** + * Gets all terms to be exported. + * + * @since 3.6 + * + * @param WP_Post[] $posts An array of posts. + * @param PLL_Language $lang The target language of the posts. + * @param array $args A list of optional arguments. + * @return WP_Term[] + */ + protected function get_terms_to_export( array $posts, PLL_Language $lang, array $args = array() ): array { + $include_translated_items = ! empty( $args['include_translated_items'] ); + $taxonomies = $this->model->get_translated_taxonomies(); + + // Collect terms in posts. + $collected_terms = $this->collect_terms->get_linked_terms( $posts, $taxonomies ); + + if ( ! $include_translated_items ) { + // Remove items that are already translated in this language. + foreach ( $collected_terms as $i => $term ) { + if ( $this->model->term->get_translation( $term->term_id, $lang ) ) { + // A translation already exists. + unset( $collected_terms[ $i ] ); + } + } + } + + /** + * Filters the terms to export. + * + * Allows filtering the complete list of terms before export, + * after all terms have been collected (assigned, from content, and parents). + * + * @since 3.8 + * + * @param WP_Term[] $collected_terms Terms to export. + * @param WP_Post[] $posts The posts being exported. + */ + $collected_terms = apply_filters( 'pll_export_terms', $collected_terms, $posts ); + + return $this->export_terms->remove_duplicate_items( $collected_terms ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-data-from-strings.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-data-from-strings.php new file mode 100644 index 0000000..4ec3b35 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-data-from-strings.php @@ -0,0 +1,67 @@ +model = $model; + } + + /** + * Prepares and exports the selected strings translations. + * + * @since 3.6 + * + * @param PLL_Export_Container $container Export container. + * @param array $sources Curated list of strings to export. + * @param PLL_Language $target_language The target language. + * @param bool $no_update Whether to remove already translated strings. Default to false. + * @return WP_Error A `WP_Error` object. Note: an "empty" `WP_Error` object is returned on success. + */ + public function send_to_export( PLL_Export_Container $container, array $sources, PLL_Language $target_language, bool $no_update = false ): WP_Error { + $source_language = $this->model->get_default_language(); + + if ( empty( $source_language ) ) { + return new WP_Error( 'pll_export_no_source_language', __( 'Error: Default language not defined.', 'polylang-pro' ) ); + } + + if ( $no_update ) { + $mo = new PLL_MO(); + $mo->import_from_db( $target_language ); + $sources = array_filter( + $sources, + function ( $source ) use ( $mo ) { + return empty( $mo->translate_if_any( $source['string'] ) ); + } + ); + } + + if ( empty( $sources ) ) { + return new WP_Error( 'pll_export_no_strings', __( 'Error: No strings found.', 'polylang-pro' ) ); + } + + ( new PLL_Export_Strings( $this->model ) )->add_items( $container, $sources, $target_language ); + + return new WP_Error(); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-data.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-data.php new file mode 100644 index 0000000..08707b3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-data.php @@ -0,0 +1,127 @@ +source_language = $source_language; + $this->target_language = $target_language; + } + + /** + * Returns the source language. + * + * @since 3.1 + * @since 3.6 Returns a `PLL_Language` object. + * Is public and concrete. + * + * @return PLL_Language Source language object. + */ + public function get_source_language(): PLL_Language { + return $this->source_language; + } + + /** + * Returns the target language. + * + * @since 3.1 + * @since 3.6 Returns a `PLL_Language` object. + * Is public and concrete. + * + * @return PLL_Language Target language object. + */ + public function get_target_language(): PLL_Language { + return $this->target_language; + } + + /** + * Adds a source string to exported data and optionally a pre-existing translated one. + * + * @since 3.6 + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @param string $source The source to be translated. + * @param string $target Optional, a preexisting translation, if any. + * @return void + * + * @phpstan-param translationEntryRef $ref + * @phpstan-param non-empty-string $source + */ + abstract public function add_translation_entry( array $ref, string $source, string $target = '' ); + + /** + * Checks the parameters given are valid. + * + * @since 3.6 + * + * @param array $ref { + * Array containing the content type and optionally the corresponding object ID. + * + * @type string $object_type Object type to be exported (e.g. `post` or `term`). + * @type string $field_type Field type to be exported (e.g. `post_content`, `post_title`...). + * @type int $object_id A unique identifier to retrieve the corresponding object from the database. + * @type string $field_id Optional, a unique identifier to retrieve the corresponding field from the database. + * @type string $field_comment Optional, a comment meant for the translators. + * @type string $encoding Optional, encoding format for the field group. + * } + * @param string $source The source to be translated. + * @return bool True if valid, false otherwise. + * + * @phpstan-param translationEntryRef $ref + * @phpstan-param non-empty-string $source + */ + public function are_entry_parameters_valid( array $ref, string $source ): bool { + return '' !== $source + && isset( $ref['object_id'] ) && is_numeric( $ref['object_id'] ) && (int) $ref['object_id'] >= 0 + && ! empty( $ref['object_type'] ) && is_string( $ref['object_type'] ) + && ! empty( $ref['field_type'] ) && is_string( $ref['field_type'] ); + } + + /** + * Returns exported data. + * + * @since 3.6 + * + * @return mixed + */ + abstract public function get(); +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-metas.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-metas.php new file mode 100644 index 0000000..8eb21f5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-metas.php @@ -0,0 +1,379 @@ + 1, + * 'meta_to_translate_2' => 1, + * 'meta_to_translate_3' => array( + * 'sub_key_to_translate_1' => 1, + * 'sub_key_to_translate_2' => array( + * 'sub_sub_key_to_translate_1' => 1, + * ), + * 'sub_key_is_an_array_with_all_values_to_translate' => 1, + * ), + * 'meta_name_*' => array( + * '*' => array( + * 'sub_key_*_to_translate' => 1, + * ), + * ), + * ) + * @param int $from ID of the source object. + * @param int $to ID of the target object. + */ + return (array) apply_filters( + "pll_{$this->meta_type}_metas_to_export", + $this->get_default_metas_to_export(), + $from, + $to + ); + } + + /** + * Returns the default metas to export. + * + * @since 3.8 + * + * @return array A multi-dimensional array containing nested meta sub keys to translate. Default empty array. + */ + protected function get_default_metas_to_export(): array { + return array(); + } + + /** + * Returns the encodings to use for metas. + * + * @since 3.6 + * + * @param int $from ID of the source object. + * @param int $to ID of the target object. + * @return array List of custom fields encodings. + */ + protected function get_meta_encodings( int $from, int $to ): array { + /** + * Filters the encodings to use for metas. + * Metas that are serialized do not need to be listed here since WordPress automatically decodes this format. + * + * @since 3.6 + * + * @param array $keys A multi-dimensional array containing nested meta sub keys to translate. Wildcards (`*`) can be + * used to match any characters. If `*` are already present in the meta name or sub-key, + * escape them with a backslash: `\*`. + * @example array( + * 'meta_to_translate_1' => 'json', + * 'meta_name_*_foobar' => 'json', + * ) + * @param int $from ID of the source object. + * @param int $to ID of the target object. + */ + return (array) apply_filters( + "pll_{$this->meta_type}_meta_encodings", + $this->get_default_meta_encodings(), + $from, + $to + ); + } + + /** + * Returns the default encodings to use for metas. + * + * @since 3.8 + * + * @return array A multi-dimensional array containing nested meta sub keys to translate. Default empty array. + */ + protected function get_default_meta_encodings(): array { + return array(); + } + + /** + * Export metas to translate, along their translated values if possible. + * + * @since 3.3 + * + * @param PLL_Export_Data $export Export object. + * @param int $from ID of the source object. + * @param int $to ID of the target object. + * @return void + */ + public function export( PLL_Export_Data $export, int $from, int $to = 0 ) { + $meta_names_to_export = $this->get_meta_names_to_export( $from, $to ); + + if ( empty( $meta_names_to_export ) ) { + return; + } + + $source_metas = get_metadata( $this->meta_type, $from ); + + if ( empty( $source_metas ) || ! is_array( $source_metas ) ) { + return; + } + + $tr_metas = get_metadata( $this->meta_type, $to ); + $tr_metas = is_array( $tr_metas ) ? $tr_metas : array(); + $encodings = $this->get_meta_encodings( $from, $to ); + $matcher = new PLL_Format_Util(); + + foreach ( $meta_names_to_export as $meta_name => $meta_subfield ) { + $entries = $matcher->filter_list( $source_metas, (string) $meta_name ); + + foreach ( $entries as $meta_name => $meta_values ) { + $tr_meta_values = $tr_metas[ $meta_name ] ?? array(); + $encodings[ $meta_name ] = $encodings[ $meta_name ] ?? ''; + $decoder = new Data_Encoding( $encodings[ $meta_name ] ); + $index = 0; + + foreach ( $meta_values as $value_index => $meta_value ) { + if ( $decoder->decode_reference( $meta_value )->has_errors() ) { + // Error while decoding. + continue; + } + + $meta_subfield = is_array( $meta_subfield ) ? $meta_subfield : array(); + $tr_value = array(); + + if ( isset( $tr_meta_values[ $value_index ] ) ) { + $tr_value = $tr_meta_values[ $value_index ]; + if ( $decoder->decode_reference( $tr_value )->has_errors() ) { + // Error while decoding. + $tr_value = array(); + } + } + + $index += (int) $this->maybe_export_metas_sub_fields( + $meta_subfield, + $this->escape_key( $meta_name ), + $index, + $meta_value, + $tr_value, + $from, + $export, + $encodings[ $meta_name ] + ); + } + } + } + } + + /** + * Maybe exports metas sub fields recursively if the given meta values is contained in the fields to export. + * + * @since 3.3 + * @since 3.6 New parameter `$object_id`. + * + * @param array $fields_to_export A recursive array containing nested meta sub keys to translate. + * @example array( + * 'sub_key_to_translate_1' => 1, + * 'sub_key_to_translate_2' => array( + * 'sub_sub_key_to_translate_1' => 1, + * ), + * ), + * ) + * @param string $parent_key_string A string containing parent keys separated with pipes. Each pipe in key + * should be escaped to avoid conflicts. + * @param int $index Index of the current meta value. Useful when a meta has several values. + * @param mixed $source_metas The source post metas. + * @param mixed $tr_metas The translated post metas. + * @param int $object_id ID of the object the meta belongs to. + * @param PLL_Export_Data $export Export object. + * @param string $encoding Encoding format for the field group. + * @return bool True if the meta value has been exported, false otherwise. + */ + protected function maybe_export_metas_sub_fields( array $fields_to_export, string $parent_key_string, int $index, $source_metas, $tr_metas, int $object_id, PLL_Export_Data $export, string $encoding = '' ): bool { + $source_metas = $this->type_value( $source_metas ); + if ( empty( $source_metas ) ) { + return false; + } + + $tr_metas = $this->type_value( $tr_metas ); + + if ( is_string( $source_metas ) ) { + if ( ! empty( $fields_to_export ) ) { + // Invalid case. + return false; + } + + $id_suffix = 0 < $index ? ":{$index}" : ''; + $export->add_translation_entry( + array( + 'object_type' => $this->meta_type, + 'field_type' => $this->import_export_meta_type, + 'object_id' => $object_id, + 'field_id' => $parent_key_string . $id_suffix, + 'encoding' => $encoding, + ), + $source_metas, + is_string( $tr_metas ) ? $tr_metas : '' + ); + return true; + } + + // Export some or all sub-values. + $is_exported = false; + + if ( ! empty( $fields_to_export ) ) { + // We still have some sub-values to export. + $matcher = new PLL_Format_Util(); + + foreach ( $fields_to_export as $key => $field_value ) { + $entries = $matcher->filter_list( $source_metas, (string) $key ); + + foreach ( $entries as $key => $meta_values ) { + $is_exported = $this->maybe_export_metas_sub_fields( + is_array( $field_value ) ? $field_value : array(), + $this->build_key( $parent_key_string, $key ), + $index, + $meta_values, + $this->get_sub_value( $tr_metas, $key ), + $object_id, + $export, + $encoding + ) || $is_exported; + } + } + + return $is_exported; + } + + // Export all sub-values. + foreach ( $source_metas as $sub_field_index => $source_value ) { + $is_exported = $this->maybe_export_metas_sub_fields( + array(), + $this->build_key( $parent_key_string, $sub_field_index ), + $index, + $source_value, + $this->get_sub_value( $tr_metas, $sub_field_index ), + $object_id, + $export, + $encoding + ) || $is_exported; + } + + return $is_exported; + } + + /** + * Returns a sub-value from an array or object. + * Objects are casted to array. + * + * @since 3.8 + * + * @param mixed $values The array or object containing the sub-value. + * @param string|int $key The array key or object property name. + * @return mixed The sub-value. An empty array if the sub-value is not found. + */ + private function get_sub_value( $values, $key ) { + $values = $this->to_array( $values ); + return $values[ $key ] ?? array(); + } + + /** + * Converts an object to array. + * + * @since 3.8 + * + * @param mixed $data The data to convert. + * @return array An array of data. + */ + private function to_array( $data ): array { + if ( is_array( $data ) ) { + return $data; + } + if ( is_object( $data ) ) { + return get_object_vars( $data ); + } + return array(); + } + + /** + * Types the given meta value. + * Returns an empty array if the type is not supported. + * + * @since 3.8 + * + * @param mixed $data The value to type. + * @return array|string + */ + private function type_value( $data ) { + if ( is_array( $data ) ) { + return $data; + } + if ( is_object( $data ) ) { + return get_object_vars( $data ); + } + if ( is_scalar( $data ) ) { + return (string) $data; + } + return array(); + } + + /** + * Escapes `|` characters. + * + * @since 3.8 + * + * @param string $key A key. + * @return string + */ + private function escape_key( string $key ): string { + return addcslashes( $key, '\\|' ); + } + + /** + * Builds a key string. + * + * @since 3.8 + * + * @param string $parent_key Parent key. + * @param string $key Sub-key. + * @return string + */ + private function build_key( string $parent_key, string $key ): string { + $escaped_key = $this->escape_key( $key ); + return "{$parent_key}|{$escaped_key}"; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-post-metas.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-post-metas.php new file mode 100644 index 0000000..382fcdf --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-post-metas.php @@ -0,0 +1,52 @@ +meta_type = 'post'; + $this->import_export_meta_type = PLL_Import_Export::POST_META; + } + + /** + * Returns the default post metas to export. + * + * @since 3.8 + * + * @return array A multi-dimensional array containing nested meta sub keys to translate. + */ + protected function get_default_metas_to_export(): array { + return array( + '_wp_attachment_image_alt' => 1, + 'footnotes' => array( + '*' => array( + 'content' => 1, + ), + ), + ); + } + + /** + * Returns the default encodings to use for post metas. + * + * @since 3.8 + * + * @return array A multi-dimensional array containing nested meta sub keys to translate. + */ + protected function get_default_meta_encodings(): array { + return array( + 'footnotes' => 'json', + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-posts.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-posts.php new file mode 100644 index 0000000..1a45107 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-posts.php @@ -0,0 +1,159 @@ +post_metas = new PLL_Export_Post_Metas(); + } + + /** + * Adds one post to export. + * + * @since 3.6 + * + * @param PLL_Export_Data $export Export object. + * @param WP_Post $item Post to export. + * @return void + */ + public function add_item( PLL_Export_Data $export, $item ) { + $tr_id = $this->translated_object->get( $item->ID, $export->get_target_language() ); + $tr_item = get_post( $tr_id ); + + $default_fields = array( + PLL_Import_Export::POST_TITLE, + PLL_Import_Export::POST_CONTENT, + PLL_Import_Export::POST_EXCERPT, + ); + + /** + * Filters which post fields we want to export. + * + * @since 3.5 + * + * @param string[] $allowed_fields List of post fields names. + * @param WP_Post $item Post object. + */ + $allowed_fields = apply_filters( 'pll_export_post_fields', $default_fields, $item ); + $allowed_fields = array_intersect( $default_fields, $allowed_fields ); + + foreach ( $allowed_fields as $field ) { + if ( '' === $item->$field ) { + continue; + } + + if ( PLL_Import_Export::POST_CONTENT === $field ) { + $this->add_post_content( + $export, + $item, + $tr_item instanceof WP_Post ? $tr_item->post_content : '' + ); + } else { + $export->add_translation_entry( + array( + 'object_type' => PLL_Import_Export::TYPE_POST, + 'field_type' => $field, + 'object_id' => $item->ID, + ), + $item->$field, + $tr_item instanceof WP_Post ? $tr_item->$field : '' + ); + } + } + + $this->post_metas->export( $export, $item->ID, $tr_item instanceof WP_Post ? $tr_item->ID : 0 ); + + /** + * Fires after exporting a post. + * + * @since 3.7 + * + * @param PLL_Export_Data $export The export object. + * @param WP_Post $item The post to export. + * @param WP_Post|null $tr_item The translated post if it exists, `null` otherwise. + */ + do_action( 'pll_after_post_export', $export, $item, $tr_item instanceof WP_Post ? $tr_item : null ); + } + + /** + * Caches posts to avoid too many SQL queries during export. + * + * @since 3.6 + * + * @param int[] $ids Post IDs. + * @return void + * + * @phpstan-param non-empty-array $ids + */ + protected function add_to_cache( array $ids ) { + _prime_post_caches( $ids ); + } + + /** + * Returns ID corresponding to the given post. + * + * @since 3.6 + * + * @param WP_Post $item Post to get ID from. + * @return int Post ID. + */ + protected function get_item_id( $item ): int { + return $item->ID; + } + + /** + * Adds post content to exported data. + * + * @since 3.6 + * + * @param PLL_Export_Data $export Export object. + * @param WP_Post $post Source post. + * @param string $translation Translated post content. + * @return void + */ + private function add_post_content( PLL_Export_Data $export, WP_Post $post, string $translation ) { + $content = PLL_Translation_Walker_Factory::create_from( $post->post_content ); + $translations = new Translations(); + $content->walk( array( $translations, 'add_entry' ) ); + + foreach ( $translations->entries as $entry ) { + if ( '' === $entry->singular ) { + continue; + } + + // The translated post content isn't exported when source or translated posts have blocks. + $translation = has_blocks( $translation ) || has_blocks( $post->post_content ) ? '' : $translation; + $export->add_translation_entry( + array( + 'object_type' => PLL_Import_Export::TYPE_POST, + 'field_type' => PLL_Import_Export::POST_CONTENT, + 'object_id' => $post->ID, + ), + $entry->singular, + $translation + ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-strings.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-strings.php new file mode 100644 index 0000000..a27c541 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-strings.php @@ -0,0 +1,121 @@ + + */ + private $mo = array(); + + /** + * Constructor. + * + * @since 3.6 + * + * @param PLL_Model $model Polylang model. + */ + public function __construct( PLL_Model $model ) { + $this->model = $model; + } + + /** + * Adds multiple string translations to an export. + * + * @since 3.6 + * + * @param PLL_Export_Container $export_container Export container. + * @param string[][] $items Items to export. + * @param PLL_Language $target_language Language to translate into. + * @return void + * + * @phpstan-param non-empty-array $items + */ + public function add_items( PLL_Export_Container $export_container, array $items, PLL_Language $target_language ) { + $source_language = $this->model->get_default_language(); + + if ( empty( $source_language ) ) { + return; + } + + $export = $export_container->get( $source_language, $target_language ); + + // Caching is done in `add_item()`. + foreach ( $items as $item ) { + $this->add_item( $export, $item ); + } + } + + /** + * Adds one string translation to an export. + * + * @since 3.6 + * + * @param PLL_Export_Data $export Export object. + * @param string[] $item Item to export. + * @return void + * + * @phpstan-param exportSource $item + */ + public function add_item( PLL_Export_Data $export, array $item ) { + $translation = $this->get_translation( $item['string'], $export->get_target_language() ); + $ref = array( + 'object_type' => PLL_Import_Export::STRINGS_TRANSLATIONS, + 'field_type' => 'string_translation', + 'object_id' => 0, // Set 0 for strings so that this parameter is always filled. + 'field_comment' => sprintf( '%s, %s', $item['context'], $item['name'] ), + ); + + // Arrays use Windows line ending syntax. This is also performed in {@see Translation_Entry::key()}. + $source_string = str_replace( array( "\r\n", "\r" ), "\n", $item['string'] ); + $translation = str_replace( array( "\r\n", "\r" ), "\n", $translation ); + + if ( '' === $source_string ) { + return; + } + + $export->add_translation_entry( $ref, $source_string, $translation ); + } + + /** + * Returns a translation for the given string, if it exists. + * + * @since 3.6 + * + * @param string $item Source string. + * @param PLL_Language $target_language Language to translate into. + * @return string + */ + private function get_translation( string $item, PLL_Language $target_language ): string { + if ( ! isset( $this->mo[ $target_language->slug ] ) ) { + // Cache translations. + $this->mo[ $target_language->slug ] = new PLL_MO(); + $this->mo[ $target_language->slug ]->import_from_db( $target_language ); + } + + return $this->mo[ $target_language->slug ]->translate( $item ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-term-metas.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-term-metas.php new file mode 100644 index 0000000..2438a92 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-term-metas.php @@ -0,0 +1,22 @@ +meta_type = 'term'; + $this->import_export_meta_type = PLL_Import_Export::TERM_META; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-terms.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-terms.php new file mode 100644 index 0000000..6ed6e88 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-terms.php @@ -0,0 +1,110 @@ +term_metas = new PLL_Export_Term_Metas(); + } + + /** + * Adds one term to export. + * + * @since 3.6 + * + * @param PLL_Export_Data $export Export object. + * @param WP_Term $item Term to export. + * + * @return void + */ + public function add_item( PLL_Export_Data $export, $item ) { + $tr_id = $this->translated_object->get( $item->term_id, $export->get_target_language() ); + $tr_item = get_term( $tr_id ); + + if ( '' !== $item->name ) { + $export->add_translation_entry( + array( + 'object_type' => PLL_Import_Export::TYPE_TERM, + 'field_type' => PLL_Import_Export::TERM_NAME, + 'object_id' => $item->term_id, + ), + $item->name, + $tr_item instanceof WP_Term ? $tr_item->name : '' + ); + } + + if ( '' !== $item->description ) { + $export->add_translation_entry( + array( + 'object_type' => PLL_Import_Export::TYPE_TERM, + 'field_type' => PLL_Import_Export::TERM_DESCRIPTION, + 'object_id' => $item->term_id, + ), + $item->description, + $tr_item instanceof WP_Term ? $tr_item->description : '' + ); + } + + $this->term_metas->export( $export, $item->term_id, $tr_item instanceof WP_Term ? $tr_item->term_id : 0 ); + + /** + * Fires after exporting a term. + * + * @since 3.7 + * + * @param PLL_Export_Data $export The export object. + * @param WP_Term $item The term to export. + * @param WP_Term|null $tr_item The translated term if it exists, `null` otherwise. + */ + do_action( 'pll_after_term_export', $export, $item, $tr_item instanceof WP_Term ? $tr_item : null ); + } + + /** + * Caches terms to avoid too many SQL queries during export. + * + * @since 3.6 + * + * @param int[] $ids Term IDs. + * @return void + * + * @phpstan-param non-empty-array $ids + */ + protected function add_to_cache( array $ids ) { + _prime_term_caches( $ids ); + } + + /** + * Returns ID corresponding to the given term. + * + * @since 3.6 + * + * @param WP_Term $item Term to get ID from. + * @return int Term ID. + */ + protected function get_item_id( $item ): int { + return $item->term_id; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/exporter/export-translated-objects.php b/wp-content/plugins/polylang-pro/src/services/exporter/export-translated-objects.php new file mode 100644 index 0000000..1d98caf --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/exporter/export-translated-objects.php @@ -0,0 +1,119 @@ +translated_object = $translated_object; + } + + /** + * Adds multiple items to export. + * Expects all items to belong to the same language, corresponding to export source. + * + * @since 3.6 + * + * @param PLL_Export_Container $export_container Export container. + * @param object[] $items Items to export. + * @param PLL_Language $target_language Language to translate into. + * @return void + */ + public function add_items( PLL_Export_Container $export_container, array $items, PLL_Language $target_language ) { + $tr_ids = array(); + + foreach ( $items as $item ) { + $tr_ids[] = $this->translated_object->get( $this->get_item_id( $item ), $target_language ); + } + + $tr_ids = array_filter( $tr_ids ); + + if ( ! empty( $tr_ids ) ) { + $this->add_to_cache( $tr_ids ); + } + + foreach ( $items as $item ) { + $source_language = $this->translated_object->get_language( $this->get_item_id( $item ) ); + + if ( empty( $source_language ) ) { + continue; + } + + $this->add_item( $export_container->get( $source_language, $target_language ), $item ); + } + } + + /** + * Adds one item to export. + * + * @since 3.6 + * + * @param PLL_Export_Data $export Export object. + * @param object $item Item to export. + * @return void + */ + abstract public function add_item( PLL_Export_Data $export, $item ); + + /** + * Removes duplicate items from array. + * + * @since 3.6 + * + * @param array $items An array of items of the same instance. + * @return array Array without duplicate items. + */ + public function remove_duplicate_items( array $items ): array { + $all_items = array(); + + foreach ( $items as $item ) { + if ( ! isset( $all_items[ $this->get_item_id( $item ) ] ) ) { + $all_items[ $this->get_item_id( $item ) ] = $item; + } + } + + return $all_items; + } + + /** + * Caches objects to avoid too many SQL queries during export. + * + * @since 3.6 + * + * @param int[] $ids Object IDs. + * @return void + * + * @phpstan-param non-empty-array $ids + */ + abstract protected function add_to_cache( array $ids ); + + /** + * Returns ID corresponding to the given item. + * + * @since 3.6 + * + * @param object $item Item to get ID from. + * @return int Object ID. + * + * @phpstan-return int<0, max> + */ + abstract protected function get_item_id( $item ): int; +} diff --git a/wp-content/plugins/polylang-pro/src/services/manage-user-capabilities.php b/wp-content/plugins/polylang-pro/src/services/manage-user-capabilities.php new file mode 100644 index 0000000..e89de38 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/manage-user-capabilities.php @@ -0,0 +1,66 @@ +id = $id; + $this->args = array_merge( + array( + 'disabled' => '', + 'class' => '', + 'icon' => '', + 'before' => '', + 'after' => '', + 'priority' => 10, + ), + $args + ); + + if ( 'before_post_translations' === $args['position'] ) { + $this->args['class'] .= ' pll-before-post-translations-button'; + } + + add_action( 'pll_' . $args['position'], array( $this, 'add_icon' ), $this->args['priority'] ); + add_action( 'wp_ajax_toggle_' . $id, array( $this, 'toggle' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); + } + + /** + * Tells whether the button is active or not. + * + * @since 2.1 + * + * @return bool + */ + abstract public function is_active(); + + /** + * Tells whether the button is disabled or not. + * + * @since 3.8 + * + * @return bool + */ + public function is_disabled(): bool { + return false; + } + + /** + * Saves the button state. + * Must return `false` if the button is disabled. + * + * @since 2.1 + * + * @param string $post_type Current post type. + * @param bool $active New requested button state. + * @return bool Whether the new button state is accepted or not. + */ + protected function toggle_option( $post_type, $active ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return true; + } + + /** + * Displays the button. + * + * @since 2.1 + * + * @param string $post_type The current post type. + * @return void + */ + public function add_icon( $post_type ) { + if ( 'attachment' !== $post_type ) { + echo $this->get_html( $this->is_active(), $this->is_disabled() ); // phpcs:ignore WordPress.Security.EscapeOutput + } + } + + /** + * Ajax response to a clic on the button. + * + * @since 2.1 + * + * @return void + */ + public function toggle() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( isset( $_POST['value'], $_POST['post_type'] ) ) { + $is_active = 'false' === $_POST['value']; + $post_type = sanitize_key( $_POST['post_type'] ); + + if ( post_type_exists( $post_type ) && $this->toggle_option( $post_type, $is_active ) ) { + // If the button is disabled, `toggle_option()` will (should) return `false`, so we won't reach this point. + $x = new WP_Ajax_Response( array( 'what' => 'icon', 'data' => $this->get_text( $is_active, false ) ) ); + $x->send(); + } + } + + wp_die( 0 ); + } + + /** + * Get the text for the button title depending on its state. + * + * @since 2.1 + * @since 3.8 New parameter `$is_disabled`. + * + * @param bool $is_active Whether the button is already active or not. + * @param bool $is_disabled Whether the button is disabled or not. + * @return string + */ + protected function get_text( $is_active, $is_disabled ) { + if ( $is_disabled ) { + return $this->args['disabled']; + } + return $is_active ? $this->args['deactivate'] : $this->args['activate']; + } + + /** + * Returns the html to display the button. + * + * @since 2.1 + * @since 3.8 New parameter `$is_disabled`. + * + * @param bool $is_active Whether the button is already active or not. + * @param bool $is_disabled Whether the button is disabled or not. + * @return string + */ + protected function get_html( $is_active, $is_disabled ) { + $text = $this->get_text( $is_active, $is_disabled ); + $class = $this->args['class']; + + if ( $is_active ) { + $class .= ' wp-ui-text-highlight'; + } + + if ( $is_disabled ) { + $class .= ' wp-ui-text-icon'; + } + + return sprintf( + '%6$s%7$s', + $this->id, + esc_attr( $class ), + esc_attr( $text ), + esc_html( $text ), + $is_active ? 'true' : 'false', + $this->args['before'], + $this->args['after'], + $this->args['icon'], + disabled( $is_disabled, true, false ) + ); + } + + /** + * Enqueues script and style. + * + * @since 2.8 + * + * @return void + */ + public function admin_enqueue_scripts() { + $screen = get_current_screen(); + + if ( ! $screen ) { + return; + } + + if ( ! in_array( $screen->base, array( 'post', 'media' ), true ) ) { + return; + } + + if ( wp_script_is( 'pll_metabox_button', 'enqueued' ) ) { + return; + } + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_enqueue_script( + 'pll_metabox_button', + plugins_url( '/js/build/metabox-button' . $suffix . '.js', POLYLANG_ROOT_FILE ), + array( 'jquery', 'wp-ajax-response', 'post' ), + POLYLANG_VERSION, + true + ); + + wp_localize_script( + 'pll_metabox_button', + 'pll_sync_post', + array( 'confirm_text' => __( 'You are about to overwrite an existing translation. Are you sure you want to proceed?', 'polylang-pro' ) ) + ); + + wp_enqueue_style( + 'pll_metabox_button', + plugins_url( '/css/build/metabox-button' . $suffix . '.css', POLYLANG_ROOT_FILE ), + array(), + POLYLANG_VERSION + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/metabox-button/metabox-user-button.php b/wp-content/plugins/polylang-pro/src/services/metabox-button/metabox-user-button.php new file mode 100644 index 0000000..3f6daa4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/metabox-button/metabox-user-button.php @@ -0,0 +1,40 @@ +user_meta->is_active(); + } + + /** + * Saves the button state. + * + * @since 3.6 + * + * @param string $post_type Current post type. + * @param bool $active New requested button state. + * @return bool Whether the new button state is accepted or not. + */ + protected function toggle_option( $post_type, $active ) { + return $this->user_meta->toggle_option( $post_type, $active ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/metabox-button/toggle-user-button-rest.php b/wp-content/plugins/polylang-pro/src/services/metabox-button/toggle-user-button-rest.php new file mode 100644 index 0000000..aa7abd1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/metabox-button/toggle-user-button-rest.php @@ -0,0 +1,85 @@ +model = $model; + $this->user_meta = $user_meta; + + add_action( 'rest_api_init', array( $this, 'register_rest_field' ) ); + } + + /** + * Returns the description of the schema for the current user meta. + * + * @since 3.8 + * + * @return string The description of the schema. + */ + abstract protected function get_schema_description(): string; + + /** + * Register the REST field for the current user meta. + * Hooked on 'rest_api_init' to prevent load text domain notice. + * + * @since 3.8 + * + * @return void + */ + public function register_rest_field(): void { + register_rest_field( + 'user', + $this->user_meta->get_meta_name(), + array( + 'get_callback' => array( $this->user_meta, 'get' ), + 'update_callback' => array( $this->user_meta, 'update' ), + 'schema' => $this->get_schema(), + ) + ); + } + + /** + * Returns the schema for the current user meta. + * + * @since 3.8 + * + * @return array JSON schema. + */ + private function get_schema(): array { + return array( + 'description' => $this->get_schema_description(), + 'type' => 'object', + 'properties' => array_fill_keys( + $this->model->post->get_translated_object_types(), + array( + 'type' => 'boolean', + ) + ), + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/metabox-button/toggle-user-meta.php b/wp-content/plugins/polylang-pro/src/services/metabox-button/toggle-user-meta.php new file mode 100644 index 0000000..fd21535 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/metabox-button/toggle-user-meta.php @@ -0,0 +1,102 @@ +meta_name = $meta_name; + } + + /** + * Returns the user meta name storing the enabled/disabled statuses of the action per post type. + * + * @since 3.6 + * + * @return string The user meta name. + */ + public function get_meta_name(): string { + return $this->meta_name; + } + + /** + * Tells whether the button is active or not. + * + * @since 2.1 + * + * @global $post + * + * @return bool + */ + public function is_active() { + global $post; + $user_meta = $this->get(); + return ! empty( $user_meta[ $post->post_type ] ); + } + + /** + * Returns the user meta value. + * + * @since 3.6 + * + * @return bool[] + */ + public function get() { + $user_meta = get_user_meta( (int) get_current_user_id(), $this->get_meta_name(), true ); + return is_array( $user_meta ) ? $user_meta : array(); + } + + /** + * Updates the user meta. + * + * @since 3.6 + * + * @param bool[] $user_meta An array with post type as key and boolean as value. + * @param WP_User|null $user An instance of `WP_User`. + * @return bool + */ + public function update( $user_meta, $user = null ) { + if ( ! $user instanceof WP_User ) { + $user = wp_get_current_user(); + } + + return (bool) update_user_meta( (int) $user->ID, $this->get_meta_name(), $user_meta ); + } + + /** + * Saves the button state. + * + * @since 2.1 + * + * @param string $post_type Current post type. + * @param bool $active New requested button state. + * @return bool Whether the new button state is accepted or not. + */ + public function toggle_option( $post_type, $active ) { + $user_meta = $this->get(); + $user_meta[ $post_type ] = (bool) $active; + + return $this->update( $user_meta ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-block-parsing-rules.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-block-parsing-rules.php new file mode 100644 index 0000000..4380b7b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-block-parsing-rules.php @@ -0,0 +1,529 @@ +> + * @phpstan-type AttributesParsingRules array> + * @phpstan-type AttributesEncodingsParsingRules array> + * @phpstan-import-type Block from PLL_Translation_Walker_Blocks + */ +class PLL_Translation_Block_Parsing_Rules { + + /** + * Caches values about parsable and non-parsable blocks. + * + * @var array + * + * @phpstan-var array{ + * parsing_rules?: XpathParsingRules, + * parsing_rules_for_attributes?: AttributesParsingRules, + * blocks_not_to_parse?: string[], + * parsing_rules_for_attribute_encodings?: AttributesEncodingsParsingRules + * } + */ + private $cache = array(); + + /** + * Holds some rules for block attributes to translate. + * Keep this list alphabetically sorted when adding entries. + * + * @var array + * @phpstan-var AttributesParsingRules + */ + private $parsing_rules_attributes = array( + 'core/comments-pagination-next' => array( + 'label' => true, + ), + 'core/comments-pagination-previous' => array( + 'label' => true, + ), + 'core/home-link' => array( + 'label' => true, + ), + 'core/icon' => array( + 'ariaLabel' => true, + ), + 'core/more' => array( + 'customText' => true, + ), + 'core/navigation-link' => array( + 'label' => true, + 'title' => true, + 'description' => true, + ), + 'core/navigation-overlay-close' => array( + 'text' => true, + ), + 'core/navigation-submenu' => array( + 'label' => true, + 'title' => true, + 'description' => true, + ), + 'core/page-list-item' => array( + 'label' => true, + 'title' => true, + ), + 'core/post-excerpt' => array( + 'moreText' => true, + ), + 'core/post-navigation-link' => array( + 'label' => true, + ), + 'core/post-terms' => array( + 'prefix' => true, + 'suffix' => true, + ), + 'core/query' => array( + 'query' => array( + 'search' => true, + ), + ), + 'core/query-pagination-next' => array( + 'label' => true, + ), + 'core/query-pagination-previous' => array( + 'label' => true, + ), + 'core/read-more' => array( + 'content' => true, + ), + 'core/search' => array( + 'label' => true, + 'placeholder' => true, + 'buttonText' => true, + ), + 'core/social-link' => array( + 'label' => true, + ), + 'core/widget-group' => array( + 'title' => true, + ), + ); + + /** + * Holds some rules as Xpath expressions to evaluate in the blocks content. + * Keep this list alphabetically sorted when adding entries. + * + * @var string[][] + * @phpstan-var XpathParsingRules + */ + private $parsing_rules = array( + 'core/accordion-heading' => array( + '//span[@class="wp-block-accordion-heading__toggle-title"]', + ), + 'core/audio' => array( + '//figure/figcaption', + ), + 'core/button' => array( + '//a', + '//a/@href', + ), + 'core/cover' => array( + '//div/p', + ), + 'core/cover-image' => array( + '//div/p', + ), + 'core/details' => array( + '//details/summary', + ), + 'core/embed' => array( + '//figure/figcaption', + ), + 'core/file' => array( + '//div/a', + ), + 'core/gallery' => array( + '//figure/figcaption', + '//figure/img/@alt', // Backward compatibility. + ), + 'core/heading' => array( + '//*[self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6]', + ), + 'core/image' => array( + '//figure/figcaption', + '//figure/img/@alt|//figure/a/img/@alt', + '//figure/img/@title|//figure/a/img/@title', + '//figure/a/@href', + ), + 'core/list' => array( + '//ul/li|//ol/li', + ), + 'core/media-text' => array( + '//figure/img/@alt', + ), + 'core/paragraph' => array( + '//p', + ), + 'core/preformatted' => array( + '//pre', + ), + 'core/pullquote' => array( + '//blockquote/p', + '//blockquote/cite', + ), + 'core/quote' => array( + '//blockquote/p', + '//blockquote/cite', + ), + 'core/subhead' => array( + '//p', + ), + 'core/table' => array( + '//th', + '//td', + '//figure/figcaption', + ), + 'core/text-columns' => array( + '//div[@class="wp-block-column"]', + ), + 'core/verse' => array( + '//pre', + ), + 'core/video' => array( + '//figure/figcaption', + ), + ); + + /** + * List of known blocks that don't need to be parsed, because they don't contain contents to be translated. + * Though, they may contain blocks that need to be parsed. + * Keep this list alphabetically sorted when adding entries. + * + * @var string[] + */ + private $blocks_not_to_parse = array( + 'core/buttons', + 'core/code', + 'core/column', + 'core/columns', + 'core/group', + 'core/math', + 'core/nextpage', + 'core/separator', + 'core/shortcode', + 'core/spacer', + ); + + /** + * Holds the name of the block type being currently parsed. + * + * @var string $block_type Similar to {@see WP_Block_Parser_Block::$blockName}. + */ + private $block_type = ''; + + /** + * Only keeps the rules matching a certain block type. + * + * @since 3.3 + * + * @param string $block_type {@see WP_Block_Parser_Block::$blockName}. + * @return PLL_Translation_Block_Parsing_Rules $this This object with its $rules property updated. + */ + public function set_block_name( string $block_type ): self { + $this->block_type = $block_type; + return $this; + } + + /** + * Extracts translatable parts from the block content. + * Returns an empty array if the parsing rules are not defined. + * + * @since 3.3 + * + * @param string $content {@see WP_Block_Parser_Block::$innerContent}. + * @return string[] Parsing rules as array keys, strings to translate as array values. + * + * @phpstan-return array + */ + public function parse( $content ) { + $rules = $this->get_parsing_rules( $this->block_type ); + + if ( ! isset( $rules[ $this->block_type ] ) ) { + return array(); + } + + // Check if there's HTML encoded non-breaking-space, if so decode it for consistency. + $content = str_replace( ' ', html_entity_decode( ' ', ENT_COMPAT ), $content ); + + return ( new PLL_DOM_Content( $content ) )->get_strings( $rules[ $this->block_type ] ); + } + + /** + * Tells if a block should be parsed using Xpath rules. + * + * @since 3.3 + * + * @param array $block An array mimicking a {@see WP_Block_Parser_Block}. + * @return bool + */ + public function has_parsing_rules( $block ) { + if ( ! isset( $block['blockName'] ) ) { + return false; + } + + $rules = $this->get_parsing_rules( $block['blockName'] ); + return isset( $rules[ $block['blockName'] ] ); + } + + /** + * Tells if a block needs to be parsed, because it contains contents to be translated. + * Though, even if not, it may contain blocks that need to be parsed. + * + * @since 3.3 + * + * @param array $block An array mimicking a {@see WP_Block_Parser_Block}. + * @return bool + */ + public function should_be_parsed( $block ) { + if ( '' === trim( $block['innerHTML'] ) && empty( $block['attrs'] ) ) { + // A block that doesn't have contents and attributes. + return false; + } + + if ( in_array( $block['blockName'], $this->get_blocks_not_to_parse(), true ) ) { + /** + * A known block that doesn't contain contents to be translated. + * Let's avoid useless operations. + */ + return false; + } + + return true; + } + + /** + * Returns the rules as Xpath expressions to evaluate in the blocks content. + * + * @since 3.3 + * + * @param string|null $block_name Optional. The block name we want to get the parsing rules for. + * Only necessary for back-compatibility with the old `core-embed/` blocks. + * @return string[][] + * + * @phpstan-return XpathParsingRules + */ + private function get_parsing_rules( $block_name = null ) { + if ( ! isset( $this->cache['parsing_rules'] ) || ! is_array( $this->cache['parsing_rules'] ) ) { + /** + * Filters the rules as Xpath expressions to evaluate in the blocks content. + * + * @since 3.3 + * + * @param string[][] $parsing_rules Rules as Xpath expressions to evaluate in the blocks content. + * + * @phpstan-param XpathParsingRules $parsing_rules + */ + $this->cache['parsing_rules'] = (array) apply_filters( 'pll_blocks_xpath_rules', $this->parsing_rules ); + } + + $parsing_rules = $this->cache['parsing_rules']; + + if ( is_string( $block_name ) && ! isset( $parsing_rules[ $block_name ] ) && strpos( $block_name, 'core-embed/' ) === 0 ) { + $parsing_rules[ $block_name ] = array( + '//figure/figcaption', + ); + } + + return $parsing_rules; + } + + /** + * Returns the rules for the attributes to translate. + * + * @since 3.3 + * @since 3.6 Format changed from `array` to `array>`. + * + * @return array Rules for block attributes to translate. + * Array keys are block names for the 1st level, then attribute names for the next levels. + * Arrays values are `true` or an array containing sub attributes. + * Wildcards are allowed. Ex: + * array( + * 'block/name' => array( + * 'sub_key_1' => true, + * 'sub_key_2' => array( + * 'sub_sub_key_*' => true, + * ), + * ), + * ) + * + * @phpstan-return AttributesParsingRules + */ + private function get_parsing_rules_for_attributes() { + if ( ! isset( $this->cache['parsing_rules_for_attributes'] ) || ! is_array( $this->cache['parsing_rules_for_attributes'] ) ) { + /** + * Filters the list of blocks attributes to translate. + * + * @since 3.3 + * @since 3.6 Format changed from `array` to `array>`. + * + * @param array $parsing_rules_attributes Rules for block attributes to translate. + * Array keys are block names for the 1st level, then attribute names for the next levels. + * Arrays values are `true` or an array containing sub attributes. + * Wildcards are allowed. Ex: + * array( + * 'block/name' => array( + * 'sub_key_1' => true, + * 'sub_key_2' => array( + * 'sub_sub_key_*' => true, + * ), + * ), + * ) + */ + $this->cache['parsing_rules_for_attributes'] = (array) apply_filters( 'pll_blocks_rules_for_attributes', $this->parsing_rules_attributes ); + + // Backward compatibility with Polylang < 3.6. + $this->cache['parsing_rules_for_attributes'] = $this->handle_blocks_rules_for_attributes_old_format( $this->cache['parsing_rules_for_attributes'] ); + } + + return $this->cache['parsing_rules_for_attributes']; + } + + /** + * Converts the old format for the rules for attributes (used from v3.3) + * by changing it to the new format (used since v3.6). + * + * @since 3.6 + * + * @param array $rules Rules for attributes (old and new formats). + * @return array Rules for attributes (new format only). + * + * @phpstan-param array|array)> $rules + * @phpstan-return AttributesParsingRules + */ + private function handle_blocks_rules_for_attributes_old_format( array $rules ): array { + $deprecated = array(); + + // Change old format into new format. + foreach ( $rules as $block_name => $attributes ) { + foreach ( $attributes as $index => $value ) { + if ( is_string( $value ) ) { + $deprecated[] = $value; + $rules[ $block_name ][ $value ] = true; + unset( $rules[ $block_name ][ $index ] ); + } + } + } + + /** + * Filters whether to trigger an error for deprecated argument format. + * + * @since 3.6 + * + * @param bool $trigger Whether to trigger the error for deprecated argument format. Default true. + */ + if ( ! empty( $deprecated ) && WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { + $message = "Filter 'pll_blocks_rules_for_attributes' was used with an argument format that is deprecated since version 3.6!"; + $message .= "\n
    \n" . wp_strip_all_tags( var_export( $deprecated, true ) ) . "\n
    "; // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export + + trigger_error( $message, E_USER_DEPRECATED ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error, WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** @var AttributesParsingRules */ + return $rules; + } + + /** + * Returns the list of blocks not to parse. + * + * @since 3.3 + * + * @return string[] + */ + private function get_blocks_not_to_parse() { + $blocks_not_to_parse = isset( $this->cache['blocks_not_to_parse'] ) ? $this->cache['blocks_not_to_parse'] : null; + + if ( is_array( $blocks_not_to_parse ) ) { + return $blocks_not_to_parse; + } + + /** + * Filters the list of blocks not to parse. + * + * @since 3.3 + * + * @param string[] $blocks_not_to_parse List of blocks not to parse. + */ + $this->cache['blocks_not_to_parse'] = (array) apply_filters( 'pll_blocks_not_to_parse', $this->blocks_not_to_parse ); + + return $this->cache['blocks_not_to_parse']; + } + + /** + * Checks if a block has translatable attributes (or not) and returns them. + * + * @since 3.3 + * + * @param array $block An array mimicking a {@see WP_Block_Parser_Block}. + * @return array An array with attributes to translate or an empty array. + * + * @phpstan-return array + */ + public function get_attributes_to_translate( $block ) { + if ( empty( $block['attrs'] ) ) { + return array(); + } + + $rules = $this->get_parsing_rules_for_attributes(); + if ( ! isset( $rules[ $block['blockName'] ] ) ) { + return array(); + } + + return $rules[ $block['blockName'] ]; + } + + /** + * Returns the attribute encoding formats for the given block. + * + * @since 3.8 + * + * @param array $block An associative array mimicking a WP_Block_Parser_Block object. + * @return string[] List of attribute encoding formats. + * + * @phpstan-param Block $block + * @phpstan-return array + */ + public function get_attribute_encodings( $block ): array { + if ( ! isset( $this->cache['parsing_rules_for_attribute_encodings'] ) ) { + /** + * Filters the encodings to use for block attributes. + * + * @since 3.8 + * + * @param string[][] $keys An array containing attribute names to encode/decode and their format(s), by block. + * Wildcards (`*`) can be used to match any characters. If `*` are already present in + * the attribute name, escape them with a backslash: `\*`. + * @example array( + * 'block/name' => array( + * 'attr_to_translate_1' => 'json', + * 'attr_name_*_foobar' => 'json,urlencode', + * ) + * ) + * @phpstan-param AttributesEncodingsParsingRules $keys + */ + $this->cache['parsing_rules_for_attribute_encodings'] = (array) apply_filters( 'pll_block_attribute_encodings', array() ); + } + + if ( empty( $this->cache['parsing_rules_for_attribute_encodings'][ $block['blockName'] ] ) ) { + return array(); + } + + $matcher = new PLL_Format_Util(); + $encodings = array(); + + foreach ( $this->cache['parsing_rules_for_attribute_encodings'][ $block['blockName'] ] as $attribute_name => $encoding_format ) { + foreach ( $matcher->filter_list( $block['attrs'], (string) $attribute_name ) as $key => $value ) { + $encodings[ $key ] = $encoding_format; + } + } + + return $encodings; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-content.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-content.php new file mode 100644 index 0000000..95b000b --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-content.php @@ -0,0 +1,89 @@ +translations = $translations; + } + + /** + * Translates the original's post title. + * + * @since 3.3 + * + * @param string $from_post The post_content field of the original WP_Post. + * @return string + */ + public function translate_title( $from_post ) { + return $this->translations->translate( + $from_post, + Context::to_string( + array( + Context::FIELD => PLL_Import_Export::POST_TITLE, + ) + ) + ); + } + + /** + * Uses a {@see PLL_Translation_Walker_Interface} subclass to iterate over each translatable part of the passed content, and applies a transformation callback to it. Then returns the transformed content. + * + * @since 3.3 + * + * @param string $content The post_content field of the original WP_Post. + * @return string + */ + public function translate_content( $content ) { + $walker = PLL_Translation_Walker_Factory::create_from( $content ); + + return $walker->walk( array( $this->translations, 'translate_entry' ) ); + } + + /** + * Translates the original post's excerpt. + * + * @since 3.3 + * + * @param string $post_excerpt The post_excerpt field of the original WP_Post. + * @return string + */ + public function translate_excerpt( $post_excerpt ) { + return $this->translations->translate( + $post_excerpt, + Context::to_string( + array( + Context::FIELD => PLL_Import_Export::POST_EXCERPT, + ) + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-data-model-interface.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-data-model-interface.php new file mode 100644 index 0000000..98513cf --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-data-model-interface.php @@ -0,0 +1,32 @@ +, value_position: int, encoding: string}> + */ + protected $metas_to_translate; + + /** + * Constructor. + * + * @since 3.3 + * @since 3.7 $translations parameter added. + * + * @param PLL_Sync_Metas $sync_metas Object to manage copied metas during import. + * @param Translations $translations Translations set where to look for the metas translations. + */ + public function __construct( PLL_Sync_Metas $sync_metas, Translations $translations ) { + $this->sync_metas = $sync_metas; + $this->translations = $this->sanitize_translations( $translations ); + } + + /** + * Returns the meta type. + * + * @since 3.7 + * + * @return string Meta type. Typically 'post' or 'term'. + */ + abstract protected function get_type(): string; + + /** + * Returns the context to translate entry. + * + * @since 3.7 + * + * @return string The context. + */ + abstract protected function get_context(): string; + + /** + * Translates the metas from a given object, whether it's a copy or a real translation. + * + * @since 3.3 + * + * @param int $src_object_id Source object to get the metas from. + * @param int $tr_object_id Translated object to translate the metas from. + * @param PLL_Language $target_language Target language object. + * @param bool $copy Whether to copy source metas. For instance, if the translation is updated, there is no need to copy source metas. + * @return void + */ + public function translate( $src_object_id, $tr_object_id, PLL_Language $target_language, $copy ) { + $this->metas_to_translate = $this->get_metas_to_translate(); + + /** + * If source metas must be copied, let's filter them to remove further translated metas. + * This avoids to copy source meta value and add another translated value to it... + */ + if ( $copy ) { + add_filter( "pll_copy_{$this->get_type()}_metas", array( $this, 'remove_metas_to_translate' ) ); + $this->sync_metas->copy( $src_object_id, $tr_object_id, $target_language->slug, false ); + remove_filter( "pll_copy_{$this->get_type()}_metas", array( $this, 'remove_metas_to_translate' ) ); + } + + $this->translate_metas_values( $src_object_id, $tr_object_id ); + } + + /** + * Removes meta keys to translate from an array of meta to copy. + * + * @since 3.3 + * + * @param string[] $meta_keys Meta keys to copy. + * @return string[] Filtered array of meta to copy. + */ + public function remove_metas_to_translate( $meta_keys ) { + return array_diff( $meta_keys, wp_list_pluck( $this->metas_to_translate, 'meta_key' ) ); + } + + /** + * Translates metas values. + * + * @since 3.3 + * + * @param int $src_object_id Source object id. + * @param int $tr_object_id Translated object id. + * @return void + */ + private function translate_metas_values( $src_object_id, $tr_object_id ) { + $src_metas = get_metadata( $this->get_type(), $src_object_id ); + + if ( ! is_array( $src_metas ) || empty( $src_metas ) ) { + return; + } + + $tr_metas = array(); + $formats = array(); + + foreach ( $this->metas_to_translate as $meta ) { + $meta_key = $meta['meta_key']; + + if ( empty( $src_metas[ $meta_key ] ) ) { + // Exported meta key doesn't exist anymore ?! + continue; + } + + if ( ! isset( $formats[ $meta_key ] ) ) { + $formats[ $meta_key ] = $meta['encoding']; + } + + $src_meta_values = $src_metas[ $meta_key ]; + $decoder = new Data_Encoding( $formats[ $meta_key ] ); + + if ( ! empty( $meta['meta_sub_keys'] ) && is_array( $src_meta_values ) && count( $src_meta_values ) > 1 && ! $this->has_only_scalar_values( $src_meta_values, $decoder ) ) { + // Do not import meta with multiple non scalar values. + continue; + } + + if ( ! isset( $src_meta_values[ $meta['value_position'] ] ) ) { + // Meta value doesn't match. + continue; + } + + if ( isset( $tr_metas[ $meta_key ][ $meta['value_position'] ] ) ) { + // Meta has already been decoded and translated, but other subfields remain to be processed. + $value_to_translate = $tr_metas[ $meta_key ][ $meta['value_position'] ]; + } else { + $value_to_translate = $src_meta_values[ $meta['value_position'] ]; + + if ( ! empty( $meta['meta_sub_keys'] ) ) { + // Sub field has to be translated, let's decode its value. + if ( $decoder->decode_reference( $value_to_translate )->has_errors() ) { + // Error while decoding. + continue; + } + } + } + + $tr_metas[ $meta_key ][ $meta['value_position'] ] = $this->maybe_translate_metas_sub_fields( $value_to_translate, $meta ); + } + + // Re-encode. + $formats = array_intersect_key( $formats, $tr_metas ); + + foreach ( $formats as $meta_key => $format ) { + if ( Data_Encoding::is_serialize( $format ) ) { + // `update_metadata()` will serialize it. + continue; + } + + $decoder = new Data_Encoding( $format ); + + foreach ( $tr_metas[ $meta_key ] as &$tr_meta ) { + $decoder->encode_reference( $tr_meta ); + } + } + + $this->insert_translated_metas( $tr_object_id, $tr_metas ); + } + + /** + * Inserts the translated metas into the database and + * takes care to add multiples meta values if needed. + * Note that if a meta has several values that aren't scalar, + * they won't be inserted in the database to avoid to + * delete potential useful data. + * + * @since 3.3 + * + * @param int $tr_object_id Translated object id. + * @param array $tr_metas Translated metas value(s). + * @return void + */ + private function insert_translated_metas( $tr_object_id, array $tr_metas ) { + $this->sync_metas->remove_all_meta_actions(); + foreach ( $tr_metas as $meta_key => $values ) { + $slashed_key = wp_slash( (string) $meta_key ); + + // $values is an indexed array, so it contains one or more values? + if ( 1 < count( $values ) ) { + // To update multiple meta values, it's easier to delete and add rather than attempting to update them individually. + delete_metadata( $this->get_type(), $tr_object_id, $slashed_key ); + foreach ( $values as $value ) { + add_metadata( $this->get_type(), $tr_object_id, $slashed_key, wp_slash( $value ) ); // Multiple meta values must be added one by one. + } + } else { + // $values contains a single meta value, let's take it. + update_metadata( $this->get_type(), $tr_object_id, $slashed_key, wp_slash( reset( $values ) ) ); + } + } + $this->sync_metas->add_all_meta_actions(); + } + + /** + * Returns the metas to translate from the translations entries. + * Each meta translation entry is identified by a concatenation of + * meta key, subfields and position (or index) of the meta. + * For instance: 'meta_key|with|sub|fields:2'. + * + * @since 3.3 + * + * @return array[] { + * A list of arrays described as follows: + * + * @type string $meta_key The name of the meta. + * @type string[] $meta_sub_keys The meta subfields to translate. + * @type int $value_position The position of the value in case of multiple values. + * @type string $encoding Encoding format of the meta value. + * @type string $context_id ID key from entry context, useful to translate back. + * } + * + * @phpstan-return array, value_position: int, encoding: string}> + */ + private function get_metas_to_translate() { + $metas = array(); + + foreach ( $this->translations->entries as $entry ) { + if ( Context::get_field( $entry ) !== $this->get_context() ) { + continue; + } + + $meta_identifier = Context::get_id( $entry ); + if ( empty( $meta_identifier ) ) { + continue; + } + + $position = 0; + $sub_keys = array(); + + if ( preg_match( '/^(?.+)(?::(?\d+))?$/U', $meta_identifier, $matches ) ) { // Extract position (i.e. index) of the meta string. + $position = isset( $matches['position'] ) ? absint( $matches['position'] ) : 0; + $sub_keys = preg_split( '/(? ! empty( $meta_key ) ? $meta_key : '', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key + 'meta_sub_keys' => $sub_keys, + 'value_position' => $position, + 'encoding' => Context::get_encoding( $entry ), + 'context_id' => $meta_identifier, + ); + } + + return $metas; + } + + /** + * Translates meta subfields recursively. + * + * @since 3.3 + * + * @param mixed $meta_value Meta value(s) to translate. + * @param array $meta { + * An array with the meta_key, subfields to translate (ordered by dimension) and value position. + * + * @type array $meta_sub_keys The meta sub keys. + * @type int $value_position The value position. + * @type string $encoding Meta encoding. + * @type string $context_id ID key from entry context, useful to translate back. + * } + * @return mixed Translated meta value(s). + */ + private function maybe_translate_metas_sub_fields( $meta_value, array $meta ) { + if ( ! is_array( $meta_value ) && ! is_object( $meta_value ) && ! is_scalar( $meta_value ) ) { + // We're not able to translate something else for now. + return $meta_value; + } + + if ( empty( $meta['meta_sub_keys'] ) ) { + // No sub key to translate, let's process the current value. + return $this->maybe_translate_field( $meta_value, $meta ); + } + + $first_key = array_shift( $meta['meta_sub_keys'] ); // Let's get the first subfield key to process. + + if ( is_array( $meta_value ) && isset( $meta_value[ $first_key ] ) ) { + $meta_value[ $first_key ] = $this->maybe_translate_sub_fields( $meta_value[ $first_key ], $meta ); + } elseif ( is_object( $meta_value ) && isset( $meta_value->$first_key ) ) { + $meta_value->$first_key = $this->maybe_translate_sub_fields( $meta_value->$first_key, $meta ); + } + + return $meta_value; + } + + /** + * Translates meta subfields recursively. + * + * @since 3.7 + * + * @param array|object $meta_value Meta value(s) to translate. + * @param array $meta { + * An array with the meta_key, subfields to translate (ordered by dimension) and value position. + * + * @type array $meta_sub_keys The meta sub keys. + * @type int $value_position The value position. + * @type string $encoding Meta encoding. + * @type string $context_id ID key from entry context, useful to translate back. + * } + * @return mixed Translated meta value(s). + */ + private function maybe_translate_sub_fields( $meta_value, array $meta ) { + if ( empty( $meta['meta_sub_keys'] ) ) { + // No more sub keys to translate. + return $this->maybe_translate_field( $meta_value, $meta ); + } + + return $this->maybe_translate_metas_sub_fields( $meta_value, $meta ); + } + + /** + * Translates meta field. + * + * @since 3.7 + * + * @param mixed $meta_value Meta value to translate. + * @param array $meta { + * An array with the meta_key, subfields to translate (ordered by dimension) and value position. + * + * @type array $meta_sub_keys The meta sub keys. + * @type int $value_position The value position. + * @type string $encoding Meta encoding. + * @type string $context_id ID key from entry context, useful to translate back. + * } + * @return mixed Translated meta value. + */ + private function maybe_translate_field( $meta_value, array $meta ) { + if ( ! is_scalar( $meta_value ) ) { + return $meta_value; + } + + return $this->translations->translate( + (string) $meta_value, + Context::to_string( + array( + Context::FIELD => $this->get_context(), + Context::ID => $meta['context_id'], + Context::ENCODING => $meta['encoding'], + ) + ) + ); + } + + /** + * Asserts an array contains only scalar values. + * + * @since 3.3 + * @since 3.6 Added parameter `$decoder`. + * + * @param array $array Array to check. + * @param Data_Encoding $decoder Data decoder. + * @return bool True if the array contains only scalar values, false otherwise. + */ + private function has_only_scalar_values( array $array, Data_Encoding $decoder ) { + foreach ( $array as $value ) { + $value = $decoder->decode( $value ); + if ( ! is_scalar( $value ) ) { + return false; + } + } + + return true; + } + + /** + * Sanitizes translation entries. + * + * @since 3.7 + * + * @param Translations $translations Translations to sanitize. + * @return Translations Sanitized translations. + */ + private function sanitize_translations( Translations $translations ): Translations { + foreach ( $translations->entries as $key => $entry ) { + if ( Context::get_field( $entry ) !== $this->get_context() ) { + continue; + } + + foreach ( $entry->translations as $i => $translation ) { + if ( $entry->singular === $translation || '' === $translation ) { + continue; + } + + $translations->entries[ $key ]->translations[ $i ] = wp_kses_post( $translation ); + } + } + + return $translations; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-object-model-trait.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-object-model-trait.php new file mode 100644 index 0000000..3634901 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-object-model-trait.php @@ -0,0 +1,31 @@ +assign_parents( $ids, $target_language ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-post-metas.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-post-metas.php new file mode 100644 index 0000000..83da04f --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-post-metas.php @@ -0,0 +1,35 @@ +model = &$polylang->model; + $this->sync = &$polylang->sync; + $this->sync_post_model = &$polylang->sync_post_model; + $this->sync_content = &$polylang->sync_content; + } + + /** + * Translates a post in a given language. + * + * @since 3.3 + * + * @param array $entry { + * Import data. + * int $id Source object ID. + * Translations $data Object containing translated data. + * array $fields { + * Fields to create the new translation. + * string $post_status Post status to use during translation creation. + * } + * }. + * @param PLL_Language $target_language A language to translate into. + * @return int|WP_Error The translated post ID, `WP_Error` on failure. + * + * @phpstan-param EntryData $entry + */ + public function translate( array $entry, PLL_Language $target_language ) { + if ( ! $entry['data'] instanceof Translations ) { + /* translators: %d is a post ID. */ + return new WP_Error( 'pll_translate_post_no_translations', sprintf( __( 'The post with ID %d could not be translated.', 'polylang-pro' ), (int) $entry['id'] ) ); + } + + $source_post = get_post( $entry['id'] ); + if ( ! $source_post instanceof WP_Post || ! $source_post->ID ) { + /* translators: %d is a post ID. */ + return new WP_Error( 'pll_translate_post_no_source_post', sprintf( __( 'The post with ID %d could not be translated as it doesn\'t exist.', 'polylang-pro' ), (int) $entry['id'] ) ); + } + + $tr_post_id = $this->model->post->get( $entry['id'], $target_language ); + $tr_post = $tr_post_id ? get_post( $tr_post_id ) : null; + + $translation_exists = $tr_post instanceof WP_Post; + + if ( $translation_exists ) { + $tr_post = $this->update_post_translation( + $entry, + $source_post, + $target_language, + $tr_post + ); + } else { + $tr_post = $this->create_post_translation( + $entry, + $source_post, + $target_language + ); + } + + if ( ! $tr_post instanceof WP_Post ) { + /* translators: %d is a post ID. */ + return new WP_Error( 'pll_translate_post_failed', sprintf( __( 'The post with ID %d could not be translated.', 'polylang-pro' ), (int) $entry['id'] ) ); + } + + // Fix for `term_exists()`. + add_filter( 'term_exists_default_query_args', array( $this, 'term_exists_default_query_args' ), 10, 3 ); + + $this->sync->taxonomies->copy( $source_post->ID, $tr_post->ID, $target_language->slug ); + ( new PLL_Translation_Post_Metas( $this->sync->post_metas, $entry['data'] ) ) + ->translate( $source_post->ID, $tr_post->ID, $target_language, ! $translation_exists ); + + /** + * Fires once a post has been translated. + * + * @since 3.7 + * + * @param WP_Post $source_post The source post. + * @param WP_Post $tr_post The target post. + * @param PLL_Language $target_language The language to translate into. + * @param Translations $translations The set of translations for the entry. + */ + do_action( 'pll_after_post_translation', $source_post, $tr_post, $target_language, $entry['data'] ); + + /** This action is documented in polylang/src/crud-posts.php. */ + do_action( 'pll_save_post', $tr_post->ID, $tr_post, $this->model->post->get_translations( $tr_post->ID ) ); // Triggers the the post metas synchronization. + + return $tr_post->ID; + } + + /** + * Creates a new post translation. + * + * @since 3.3 + * + * @param array $data_import Import data, @see {self::translate()}. + * @param WP_Post $source_post The source post object. + * @param PLL_Language $target_language The language to translate into. + * @return WP_Post|null The translated post object, `null` on failure. + * + * @phpstan-param EntryData $data_import + */ + protected function create_post_translation( array $data_import, WP_Post $source_post, PLL_Language $target_language ): ?WP_Post { + $tr_post = get_default_post_to_edit( $source_post->post_type, true ); + $this->model->post->set_language( $tr_post->ID, $target_language ); // Do it now to share slug. + + $tr_post = $this->copy_source_post( $source_post, $tr_post ); + + $tr_post = $this->translate_content( $data_import, $source_post, $target_language, $tr_post ); + + if ( ! $tr_post instanceof WP_Post ) { + return null; + } + + // Set post status. + $tr_post->post_status = $data_import['fields']['post_status'] ?? 'draft'; + + /** + * Filters the translated post before it is created. + * + * Allows to modify any property of the translated post, such as status, etc. + * + * @since 3.7.8 + * + * @param WP_Post $tr_post The translated post object. + * @param WP_Post $source_post The source post object. + * @param PLL_Language $target_language The target language. + */ + $tr_post = apply_filters( 'pll_create_post_translation', $tr_post, $source_post, $target_language ); + + $tr_post_args = $tr_post->to_array(); + + $tr_id = wp_update_post( wp_slash( $tr_post_args ) ); + if ( ! $tr_id ) { + // Failure during post update. + return null; + } + + $this->save_translations_group( $source_post->ID, $tr_post->ID, $target_language->slug ); + + return get_post( $tr_id ); + } + + /** + * Saves the translations group. + * + * @since 3.3 + * + * @param int $from_id The post source id. + * @param int $tr_id The translated post id. + * @param string $lang The language slug of the translated post. + * @return void + */ + protected function save_translations_group( $from_id, $tr_id, $lang ) { + $translations = $this->model->post->get_translations( $from_id ); + $translations[ $lang ] = $tr_id; + $this->model->post->save_translations( $from_id, $translations ); + } + + /** + * Updates an existing post translation. + * + * @since 3.3 + * @since 3.7 $data_import parameter added. + * + * @param array $data_import Import data, @see {self::translate()}. + * @param WP_Post $source_post The source post object. + * @param PLL_Language $target_language The language to translate into. + * @param WP_Post $tr_post The translated post object. + * @return WP_Post|null The translated post object, `null` on failure. + * + * @phpstan-param EntryData $data_import + */ + protected function update_post_translation( array $data_import, WP_Post $source_post, PLL_Language $target_language, WP_Post $tr_post ): ?WP_Post { + $this->maybe_unsync_posts( $source_post->ID, $tr_post->ID, $target_language ); + $tr_post = $this->translate_content( $data_import, $source_post, $target_language, $tr_post ); + + if ( ! $tr_post instanceof WP_Post ) { + return null; + } + + return get_post( + wp_update_post( $tr_post ) + ); + } + + /** + * Translates all content type of a post (i.e. title, excerpt and content). + * + * @since 3.3 + * @since 3.7 $translations parameter added. + * + * @param array $data_import Import data, @see {self::translate()}. + * @param WP_Post $source_post The source post object. + * @param PLL_Language $target_language The language to translate into. + * @param WP_Post $tr_post The translated post object. + * @return WP_Post|null The translated post object populated with new data. Null otherwise. + */ + protected function translate_content( array $data_import, WP_Post $source_post, PLL_Language $target_language, WP_Post $tr_post ): ?WP_Post { + $translate_content = new PLL_Translation_Content( $data_import['data'] ); + $tr_post->post_title = $translate_content->translate_title( $source_post->post_title ); + $tr_post->post_excerpt = $translate_content->translate_excerpt( $source_post->post_excerpt ); + $tr_post->post_content = $this->sync_content->translate_content( + $translate_content->translate_content( $source_post->post_content ), + $tr_post, + $target_language + ); + + /** + * Filters a translated post before it is saved. + * + * @since 3.7 + * + * @param WP_Post $tr_post The target post. + * @param WP_Post $source_post The source post. + * @param PLL_Language $target_language The language to translate into. + * @param Translations $translations The set of translations for the entry.. + */ + $tr_post = apply_filters( 'pll_filter_translated_post', $tr_post, $source_post, $target_language, $data_import['data'] ); + + return $tr_post instanceof WP_Post ? $tr_post : null; + } + + /** + * Copy the source post data in the translated post. + * + * @since 3.3 + * @since 3.4 Renamed from `clone_source_post` and added second parameter `$tr_post`. + * + * @param WP_Post $source_post The Source Post. + * @param WP_Post $tr_post The translated Post. + * @return WP_Post The translated post. + */ + protected function copy_source_post( $source_post, $tr_post ) { + // The columns to copy. + $columns = array( + 'post_author', + 'post_content', + 'post_title', + 'post_excerpt', + 'comment_status', + 'ping_status', + 'post_parent', + 'menu_order', + 'post_mime_type', + 'post_password', + ); + + foreach ( $columns as $column ) { + $tr_post->{$column} = $source_post->{$column}; + } + + return $tr_post; + } + + /** + * Assigns the parents to posts creating during the import. + * + * @since 3.3 + * @since 3.7 Renamed from `translate_parents` and made private. + * + * @param int[] $ids Array of source post ids. + * @param PLL_Language $target_language The target language. + * @return void + */ + private function assign_parents( array $ids, PLL_Language $target_language ) { + // Keep only the posts that have a parent. + $posts = get_posts( + array( + 'include' => $ids, + 'post_type' => 'any', + 'post_status' => 'any', + 'post_parent__not_in' => array( 0 ), + 'update_post_term_cache' => false, + 'update_post_meta_cache' => false, + 'fields' => 'id=>parent', + ) + ); + + if ( empty( $posts ) ) { + // No posts with parents. + return; + } + + $tr_ids = array(); + foreach ( $posts as $child => $post ) { + $tr_ids[ $child ] = $this->model->post->get( $child, $target_language->slug ); + } + $tr_ids = array_filter( $tr_ids ); + + if ( empty( $tr_ids ) ) { + // No translations. + return; + } + + foreach ( $posts as $child => $post ) { + if ( empty( $tr_ids[ $child ] ) ) { + // Not translated. + continue; + } + + $tr_parent_post = $this->model->post->get( $post, $target_language->slug ); + + if ( empty( $tr_parent_post ) ) { + // The parent post is not translated. + continue; + } + + wp_update_post( + array( + 'ID' => $tr_ids[ $child ], + 'post_parent' => $tr_parent_post, + ) + ); + } + } + + /** + * Filters default query arguments when checking if a term exists. + * In `term_exists()`, WP 6.0 uses `get_terms()`, which is filtered by language by Polylang. + * This filter prevents `term_exists()` to be filtered by language. + * Copied from PLL_Filters::term_exists_default_query_args + * + * @since 3.3 + * + * @param array $defaults An array of arguments passed to get_terms(). + * @param int|string $term The term to check. Accepts term ID, slug, or name. + * @param string $taxonomy The taxonomy name to use. An empty string indicates the search is against all taxonomies. + * @return array + */ + public function term_exists_default_query_args( $defaults, $term, $taxonomy ) { + if ( ! empty( $taxonomy ) && ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return $defaults; + } + + if ( ! is_array( $defaults ) ) { + $defaults = array(); + } + + if ( ! isset( $defaults['lang'] ) ) { + $defaults['lang'] = ''; + } + + return $defaults; + } + + /** + * Unsynchronizes translated post from the source. + * + * @since 3.3 + * + * @param int $source_post_id Source post ID. + * @param int $target_post_id Translated post ID. + * @param PLL_Language $target_language Translated post language object. + * @return void + */ + protected function maybe_unsync_posts( $source_post_id, $target_post_id, $target_language ) { + if ( ! $this->sync_post_model->are_synchronized( $source_post_id, $target_post_id ) ) { + return; + } + + $sync_posts = $this->sync_post_model->get( $source_post_id ); + + if ( ! isset( $sync_posts[ $target_language->slug ] ) || $sync_posts[ $target_language->slug ] !== $target_post_id ) { + return; + } + + unset( $sync_posts[ $target_language->slug ] ); + + $this->sync_post_model->save_group( $source_post_id, array_keys( $sync_posts ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-strings-model.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-strings-model.php new file mode 100644 index 0000000..c2819d5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-strings-model.php @@ -0,0 +1,119 @@ +imported_strings = array(); // Reset the imported strings array. + + $pll_mo = new PLL_MO(); + $pll_mo->import_from_db( $target_language ); + $registered_strings = PLL_Admin_Strings::get_strings(); + + $translations = $entry['data']; + + // Clone the $pll_mo element to avoid modifying the original one since we will then update it. + $pll_mo_clone = clone $pll_mo; + + // Remove the context for the translation entries to generate the same key between the translation strings + // and the database strings. + $translations->entries = $this->remove_context_from_translations( $translations->entries ); + + foreach ( $translations->entries as $entry ) { + if ( empty( $entry->translations ) ) { + $entry->translations = array( '' ); + } + + /** This filter is documented in /polylang/src/settings/table-string.php */ + $sanitized_translation = apply_filters( 'pll_sanitize_string_translation', $entry->translations[0], $entry->extracted_comments, $entry->context, $entry->singular, $pll_mo->translate_if_any( $entry->singular ) ); + $sanitized_translation = wp_kses_post( $sanitized_translation ); + + if ( '' === $sanitized_translation ) { + // Don't overwrite a translation with an empty string. + continue; + } + + // Set a unique key for each entry to compare the original and translated strings. + $key = $entry->key(); + + if ( empty( $key ) ) { + continue; + } + if ( isset( $pll_mo_clone->entries[ $key ]->translations[0] ) || isset( $registered_strings[ md5( $key ) ] ) ) { + // Checks that the string did not exist or has been edited before updating. + if ( ! isset( $pll_mo_clone->entries[ $key ]->translations[0] ) || $pll_mo_clone->entries[ $key ]->translations[0] !== $sanitized_translation ) { + $pll_mo->add_entry( $pll_mo->make_entry( $entry->singular, $sanitized_translation ) ); + // Store the source strings as ids during the import process. + $this->imported_strings[] = $entry->singular; + } + } + } + + if ( 0 < count( $this->imported_strings ) ) { + $pll_mo->export_to_db( $target_language ); + + return $this->imported_strings; + } + + return new WP_Error( 'pll_translate_strings_no_imported_strings', __( 'No strings have been translated.', 'polylang-pro' ) ); + } + + /** + * Performs actions after a translation process. + * Does nothing. + * + * @since 3.7 + * + * @param string[] $ids The entity ids to process after translation. + * @param PLL_Language $target_language The target language. + * @return void + */ + public function do_after_process( array $ids, PLL_Language $target_language ) { //phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // Nothing to do. + } + + /** + * Removes the context for the translation entries. + * + * @since 3.2 + * @since 3.3 Moved from PLL_Import_Action to PLL_Import_Strings. + * @since 3.7 Moved from PLL_Import_Strings to PLL_Translation_Strings_Model. + * + * @param Translation_Entry[] $translations An array with all the entries. + * @return Translation_Entry[] An array with the same entries with an empty context. + */ + private function remove_context_from_translations( $translations ) { + foreach ( $translations as $translation_entry ) { + $translation_entry->context = ''; + } + return $translations; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-term-metas.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-term-metas.php new file mode 100644 index 0000000..e396038 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-term-metas.php @@ -0,0 +1,35 @@ +model = &$polylang->model; + $this->sync_term_metas = &$polylang->sync->term_metas; + } + + /** + * Translates a term. + * + * @since 3.3 + * + * @param array $entry Properties array of an entry. + * @param PLL_Language $target_language The target language. + * @return int|WP_Error The translated term id, `WP_Error` on failure. + */ + public function translate( array $entry, PLL_Language $target_language ) { + if ( ! $entry['data'] instanceof Translations ) { + /* translators: %d is a term ID. */ + return new WP_Error( 'pll_translate_term_no_translations', sprintf( __( 'The term with ID %d could not be translated.', 'polylang-pro' ), (int) $entry['id'] ) ); + } + + $source_term = get_term( $entry['id'] ); + + if ( ! $source_term instanceof WP_Term ) { + /* translators: %d is a term ID. */ + return new WP_Error( 'pll_translate_term_no_source_term', sprintf( __( 'The term with ID %d could not be translated as it doesn\'t exist.', 'polylang-pro' ), (int) $entry['id'] ) ); + } + + $tr_term_name = $this->get_translated_term_name( $source_term, $entry['data'] ); + $tr_term_description = $this->get_translated_term_description( $source_term, $entry['data'] ); + $tr_term_id = $this->model->term->get( $entry['id'], $target_language ); + $translation_exists = $tr_term_id > 0; + + if ( $tr_term_id ) { + // The translation already exists. + $args = array(); + // Don't update name or description if not provided in translations. + if ( $source_term->name !== $tr_term_name ) { + $args['name'] = $tr_term_name; + } + if ( $source_term->description !== $tr_term_description ) { + $args['description'] = $tr_term_description; + } + + $tr_term = $this->model->term->update( $tr_term_id, $args ); + if ( is_wp_error( $tr_term ) ) { + /* translators: %d is a term ID. */ + return new WP_Error( 'pll_translate_update_term_failed', sprintf( __( 'The term with ID %d could not be updated.', 'polylang-pro' ), (int) $tr_term_id ) ); + } + } else { + $args = array( + 'translations' => $this->model->term->get_translations( $source_term->term_id ), + 'description' => $tr_term_description, + ); + + $tr_term = $this->model->term->insert( $tr_term_name, $source_term->taxonomy, $target_language, $args ); + if ( is_wp_error( $tr_term ) ) { + /* translators: %d is a term ID. */ + return new WP_Error( 'pll_translate_term_failed', sprintf( __( 'The term with ID %d could not be translated.', 'polylang-pro' ), (int) $entry['id'] ) ); + } + $tr_term_id = (int) $tr_term['term_id']; + } + + ( new PLL_Translation_Term_Metas( $this->sync_term_metas, $entry['data'] ) ) + ->translate( + $source_term->term_id, + $tr_term_id, + $target_language, + ! $translation_exists + ); + + /** @var WP_Term $tr_term */ + $tr_term = get_term( $tr_term_id ); + + /** + * Fires once a term has been translated. + * + * @since 3.7 + * + * @param WP_Term $source_term The source term. + * @param WP_Term $tr_term The target term. + * @param PLL_Language $target_language The language to translate into. + * @param Translations $translations The set of translations for the entry. + */ + do_action( 'pll_after_term_translation', $source_term, $tr_term, $target_language, $entry['data'] ); + + /** This action is documented in polylang/src/crud-terms.php. */ + do_action( 'pll_save_term', $tr_term_id, $source_term->taxonomy, $this->model->term->get_translations( $tr_term_id ) ); // Triggers the term metas synchronization. + + return $tr_term_id; + } + + /** + * Returns the translated term name if exists, the source name otherwise. + * + * @since 3.3 + * @since 3.7 $translations parameter added. + * + * @param WP_Term $source_term The source term object. + * @param Translations $translations Translated data object. + * @return string The translated name. + */ + private function get_translated_term_name( WP_Term $source_term, Translations $translations ) { + $translated = $translations->translate( + $source_term->name, + Context::to_string( array( Context::FIELD => PLL_Import_Export::TERM_NAME ) ) + ); + + return ! empty( $translated ) ? $translated : $source_term->name; + } + + /** + * Returns the translated term description if exists, the source description otherwise. + * + * @since 3.3 + * @since 3.7 $translations parameter added. + * + * @param WP_Term $source_term The source term object. + * @param Translations $translations Translated data object. + * @return string The translated description. + */ + private function get_translated_term_description( WP_Term $source_term, Translations $translations ) { + $translated = $translations->translate( + $source_term->description, + Context::to_string( array( Context::FIELD => PLL_Import_Export::TERM_DESCRIPTION ) ) + ); + + return ! empty( $translated ) ? $translated : $source_term->description; + } + + /** + * Assigns the parents to terms creating during the import. + * + * @since 3.3 + * @since 3.7 Renamed from `translate_parents`. + * + * @param int[] $ids Array of source term ids. + * @param PLL_Language $target_language The target language. + * @return void + */ + public function assign_parents( array $ids, PLL_Language $target_language ) { + // Get the terms with their parents (or 0). + $terms = get_terms( + array( + 'include' => $ids, + 'hide_empty' => false, + 'fields' => 'id=>parent', + ) + ); + + if ( ! is_array( $terms ) ) { + // No terms with parents. + return; + } + + // ‘id=>parent’ returns an array of numeric strings, so let's cast it into int. + $terms = array_map( 'intval', array_filter( $terms, 'is_numeric' ) ); + + // Keep only the terms that have a parent. + $terms = array_filter( $terms ); + + if ( empty( $terms ) ) { + // No terms with parents. + return; + } + + $tr_ids = array(); + foreach ( $terms as $child => $term_id ) { + $tr_ids[ $child ] = $this->model->term->get( $child, $target_language->slug ); + } + $tr_ids = array_filter( $tr_ids ); + + if ( empty( $tr_ids ) ) { + // No translations. + return; + } + + foreach ( $terms as $child => $term_id ) { + if ( empty( $tr_ids[ $child ] ) ) { + // Not translated. + continue; + } + + $tr_parent_term = $this->model->term->get( $term_id, $target_language->slug ); + if ( empty( $tr_parent_term ) ) { + // The parent term is not translated. + continue; + } + + $tr_term_id = $this->model->term->get( $tr_ids[ $child ], $target_language->slug ); + if ( empty( $tr_term_id ) ) { + continue; + } + + $tr_term = get_term( $tr_term_id ); + if ( ! $tr_term instanceof WP_Term ) { + continue; + } + + // Set term parent for shared slugs. + $this->model->term->update( $tr_term->term_id, array( 'parent' => $tr_parent_term ) ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-blocks.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-blocks.php new file mode 100644 index 0000000..29290ca --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-blocks.php @@ -0,0 +1,410 @@ +Polylang placeholder do not modify'; + + /** + * Holds the blocks parsed by the WP_Block_Parser. + * + * @var array[] + * + * @phpstan-var array + */ + private $blocks; + + /** + * A reference to the block parsing rules. + * + * @var PLL_Translation_Block_Parsing_Rules + */ + private $parsing_rules; + + /** + * Holds the callback to be applied on each block, including the nested blocks. + * + * @var callable + */ + private $callback; + + /** + * HTML delimiter used in {@see PLL_Translation_Walker_Blocks::parse_as_html()}. + * + * @var string + * @phpstan-var non-empty-string + */ + private $placeholder_delimiter; + + /** + * PLL_Content_Walker_Blocks constructor. + * + * @since 3.3 + * + * @param string $content An original (post?) content. + */ + public function __construct( $content ) { + $this->parsing_rules = new PLL_Translation_Block_Parsing_Rules(); + $this->blocks = parse_blocks( $content ); + $this->placeholder_delimiter = sprintf( '', wp_rand( 1, 100000 ) ); + } + + /** + * Walks through the blocks and nested blocks to apply a callback on every one of them. + * + * @since 3.3 + * + * @param callable $callback A callable to be applied on each block. + * @return string The walked content, eventually transformed by the callback. + */ + public function walk( $callback ) { + $this->callback = $callback; + $this->blocks = array_map( array( $this, 'apply' ), $this->blocks ); + + return serialize_blocks( $this->blocks ); + } + + /** + * Recursively applies the callback provided to the {@see PLL_Translation_Walker_Blocks::walk()} method on a block. + * Searches for translatable strings matching rules defined by {@see PLL_Translation_Rules_Block} and passes those to the callback function. + * Delegates to {@see PLL_Translation_Walker_Classic} when no parsing rules match the current block being parsed. + * + * @since 3.3 + * + * @param array $block An associative array mimicking a WP_Block_Parser_Block object. + * @return array An array mimicking a WP_Block_Parser_Block object. + * + * @phpstan-param Block $block + * @phpstan-return Block + */ + private function apply( $block ) { + if ( ! empty( $block['innerBlocks'] ) ) { + $block['innerBlocks'] = array_map( array( $this, 'apply' ), $block['innerBlocks'] ); + } + + if ( ! $this->parsing_rules->should_be_parsed( $block ) ) { + // No contents to translate. + return $block; + } + + $attributes_to_translate = $this->parsing_rules->get_attributes_to_translate( $block ); + if ( ! empty( $attributes_to_translate ) ) { + $encodings = $this->parsing_rules->get_attribute_encodings( $block ); + $block['attrs'] = $this->parse_attributes( $block['attrs'], $attributes_to_translate, $encodings ); + } + + // Handles specific blocks. + $block = $this->parse_specific_blocks( $block ); + + if ( $this->parsing_rules->has_parsing_rules( $block ) ) { + // A known block that will be parsed with Xpath rules. + return $this->parse_with_rules( $block ); + } + + // A block that will be parsed as HTML. + return $this->parse_as_html( $block ); + } + + /** + * Recursively applies the callback provided to the {@see PLL_Translation_Walker_Blocks::walk()} method on a block. + * Searches for translatable strings matching rules defined by {@see PLL_Translation_Rules_Block} and passes those to the callback function. + * + * @since 3.3 + * + * @param array $block An associative array mimicking a WP_Block_Parser_Block object. + * @return array An array mimicking a WP_Block_Parser_Block object. + * + * @phpstan-param Block $block + * @phpstan-return Block + */ + private function parse_with_rules( $block ) { + // Get the whole block's content to parse with placeholders. + $source_string = $this->get_block_content_to_parse( $block ); + + // Parse by using our pre-defined rules. + $parsed_strings = $this->parsing_rules->set_block_name( $block['blockName'] ?? '' )->parse( $source_string ); + + if ( empty( $parsed_strings ) ) { + // Nothing to translate. + return $block; + } + + $to_replace = array(); + + foreach ( $parsed_strings as $node_path => $parsed_string ) { + $entry = new Translation_Entry( + array( + 'singular' => $parsed_string, + 'context' => Context::to_string( + array( + Context::FIELD => PLL_Import_Export::POST_CONTENT, + ) + ), + ) + ); + + $result = call_user_func_array( $this->callback, array( &$entry ) ); + + if ( ! $result instanceof Translation_Entry || empty( $result->translations ) ) { + continue; + } + + $translation = reset( $result->translations ); + + if ( '' === trim( $translation ) ) { + continue; + } + + $to_replace[ $node_path ] = $translation; + } + + if ( empty( $to_replace ) ) { + // No need to modify things if there are no translations. + return $block; + } + + $result_string = ( new PLL_DOM_Content( $source_string ) )->replace_content( $to_replace ); + + // Put the content back into the block. + return $this->update_block_with_content( $block, $result_string ); + } + + /** + * Parses a block's contents as HTML and applies the callback provided to the + * {@see PLL_Translation_Walker_Blocks::walk()} method on these contents. Uses {@see PLL_Translation_Walker_Classic}. + * + * @since 3.3 + * + * @param array $block An associative array mimicking a WP_Block_Parser_Block object. + * @return array An array mimicking a WP_Block_Parser_Block object. + * + * @phpstan-param Block $block + * @phpstan-return Block + */ + private function parse_as_html( $block ) { + // Get the whole block's content to parse with placeholders. + $source_string = $this->get_block_content_to_parse( $block ); + + $walker = new PLL_Translation_Walker_Classic( $source_string, array( self::BLOCK_PLACEHOLDER ) ); + $result_string = $walker->walk( $this->callback ); + + // Put the content back into the block. + return $this->update_block_with_content( $block, $result_string ); + } + + /** + * Returns a block's content as a string and with placeholders in place of sub-blocks, ready to be parsed. + * + * @since 3.3 + * + * @param array $block An associative array mimicking a WP_Block_Parser_Block object. + * @return string The block's content as a string and with placeholders in place of sub-blocks. + * + * @phpstan-param Block $block + */ + private function get_block_content_to_parse( array $block ) { + $content = array_map( + function ( $content_part ) { + return is_string( $content_part ) ? $content_part : self::BLOCK_PLACEHOLDER; + }, + $block['innerContent'] + ); + + return implode( '', $content ); + } + + /** + * Puts a translated content back into a block. + * + * @since 3.3 + * + * @param array $block An associative array mimicking a WP_Block_Parser_Block object. + * @param string $content The content to put back into the block. + * @return array An array mimicking a WP_Block_Parser_Block object. + * + * @phpstan-param Block $block + * @phpstan-return Block + */ + private function update_block_with_content( array $block, $content ) { + // Explode by using a delimiter. + $content = str_replace( + self::BLOCK_PLACEHOLDER, + $this->placeholder_delimiter . self::BLOCK_PLACEHOLDER . $this->placeholder_delimiter, + $content + ); + $content = explode( $this->placeholder_delimiter, $content ); + // Replace placeholders by `null` values. + $block['innerContent'] = array_map( + function ( $content_part ) { + return self::BLOCK_PLACEHOLDER === $content_part ? null : $content_part; + }, + $content + ); + // Make innerHTML consistent. + $block['innerHTML'] = implode( '', $block['innerContent'] ); + + return $block; + } + + /** + * Returns the translatable block attributes and passes them to the callback function. + * + * @since 3.3 + * @since 3.6 Now pass an array of attributes as first param instead of a block. + * + * @param mixed $attrs An array of attributes to parse, or an attribute value. + * @param string[] $attributes_to_translate Optional. An array of attributes to translate. + * @param string[] $encoding_formats Optional. An array of attribute encoding formats. + * @return mixed An array of parsed attributes, or a translated attribute value. + * + * @phpstan-param array $attributes_to_translate + * @phpstan-return ( + * $attrs is array ? array : ( + * $attrs is scalar ? string : mixed + * ) + * ) + */ + private function parse_attributes( $attrs, array $attributes_to_translate = array(), array $encoding_formats = array() ) { + if ( ! empty( $attributes_to_translate ) ) { + // We have sub-keys to match. + if ( ! is_array( $attrs ) ) { + // No more attributes. + return $attrs; + } + + $matcher = new PLL_Format_Util(); + + foreach ( $attributes_to_translate as $attribute_name => $attribute_sub_fields ) { + // Find the attributes matching `$attribute_name` (may contain wildcards). + $entries = $matcher->filter_list( $attrs, (string) $attribute_name ); + $sub_field = is_array( $attribute_sub_fields ) ? $attribute_sub_fields : array(); + + foreach ( $entries as $key => $values ) { + if ( ! isset( $encoding_formats[ $key ] ) || ! is_string( $attrs[ $key ] ) ) { + // Parse sub-attributes. + $attrs[ $key ] = $this->parse_attributes( $attrs[ $key ], $sub_field ); + continue; + } + + // Decode the attribute value. + $coder = new Data_Encoding( $encoding_formats[ $key ] ); + $decoded = $coder->decode( $attrs[ $key ] ); + + if ( is_wp_error( $decoded ) ) { + continue; + } + + // Parse sub-attributes. + $parsed = $this->parse_attributes( $decoded, $sub_field ); + // Encode the attribute value back. + $encoded = $coder->encode( $parsed ); + + if ( is_wp_error( $encoded ) ) { + continue; + } + + $attrs[ $key ] = $encoded; + } + } + + return $attrs; + } + + if ( is_array( $attrs ) ) { + // No more sub-keys to match but we still have sub-attributes: return everything. + return array_map( array( $this, 'parse_attributes' ), $attrs ); + } + + if ( is_scalar( $attrs ) ) { + // Maybe translate the value. + if ( '' === (string) $attrs ) { + // No need to translate. + return $attrs; + } + + $result = $this->add_entry_and_translate( (string) $attrs ); + + if ( '' === $result ) { + // No translations: return the original value. + return $attrs; + } + + return $result; + } + + // Not a value that can be translated. + return $attrs; + } + + /** + * Parses specific blocks. + * + * @since 3.6 + * + * @param array $block An associative array mimicking a WP_Block_Parser_Block object. + * @return array An array mimicking a WP_Block_Parser_Block object. + * + * @phpstan-param Block $block + * @phpstan-return Block + */ + private function parse_specific_blocks( array $block ): array { + if ( 'core/more' === $block['blockName'] && isset( $block['attrs']['customText'] ) ) { + // Special case for 'core/more' block content that need to be updated according to its translated attribute. + $core_more_content = ""; + $block = $this->update_block_with_content( $block, $core_more_content ); + } + + return $block; + } + + /** + * Adds the translation entry and return the translation if there is one. + * + * @since 3.6 + * + * @param string $attribute_value The attribute value. + * @return string Translated entry, empty if none. + */ + private function add_entry_and_translate( string $attribute_value ): string { + $entry = new Translation_Entry( + array( + 'singular' => trim( $attribute_value ), + 'context' => Context::to_string( + array( + Context::FIELD => PLL_Import_Export::POST_CONTENT, + ) + ), + ) + ); + + $result = call_user_func_array( $this->callback, array( &$entry ) ); + if ( ! $result instanceof Translation_Entry || empty( $result->translations[0] ) ) { + return ''; + } + + return $result->translations[0]; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-classic.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-classic.php new file mode 100644 index 0000000..1ede235 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-classic.php @@ -0,0 +1,109 @@ +non_translatable_contents = $non_translatable_contents; + $this->content = $content; + } + + /** + * Applies the defined callback on the content, and then returns a transformed content. + * + * @since 3.3 + * + * @param callable $callback A transformation to apply to the content, whether it is for export or import. + * @return string + */ + public function walk( $callback ) { + $this->callback = $callback; + + return $this->apply( $this->content ); + } + + /** + * Applies a callback on a given post content, whether it is to add a translation entry or translate it. + * + * @since 3.3 + * + * @param string $content A post content to apply a callback onto. + * @return string The processed content. + */ + private function apply( $content ) { + $translatable_content = str_replace( $this->non_translatable_contents, '', $content ); + if ( '' === str_replace( "\n", '', wp_strip_all_tags( $translatable_content ) ) ) { + return $content; + } + + $args = array( + 'singular' => $content, + 'context' => Context::to_string( + array( + Context::FIELD => PLL_Import_Export::POST_CONTENT, + ) + ), + ); + $entry = new Translation_Entry( $args ); + + $return = call_user_func_array( $this->callback, array( &$entry ) ); + + if ( $return instanceof Translation_Entry ) { + return $this->maybe_translate_entry( $return ); + } + + return $content; + } + + /** + * Checks if the translation entry exists and return it, otherwise return the source text. + * + * @since 3.3 + * + * @param Translation_Entry $entry A translation entry parsed from a translation document. + * @return string The translated string. + */ + private function maybe_translate_entry( $entry ) { + return isset( $entry->translations[0] ) ? $entry->translations[0] : $entry->singular; + } +} diff --git a/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-factory.php b/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-factory.php new file mode 100644 index 0000000..aa52a83 --- /dev/null +++ b/wp-content/plugins/polylang-pro/src/services/translation/translation-walker-factory.php @@ -0,0 +1,30 @@ +options = $options; + } + + /** + * Runs upgrade process. + * + * @since 3.7 + * + * @return void + */ + public function upgrade() { + foreach ( array( '3.7' ) as $version ) { + if ( version_compare( $this->options->get( 'version' ), $version, '<' ) ) { + $method_to_call = array( $this, 'upgrade_' . str_replace( '.', '_', $version ) ); + if ( is_callable( $method_to_call ) ) { + call_user_func( $method_to_call ); + } + } + } + } + + /** + * Migrates translated field groups to the new ACF integration. + * Transforms language taxonomy to group location. + * + * @since 3.7 + * + * @return void + */ + private function upgrade_3_7() { + if ( ! ACF_Main::can_use() ) { + return; + } + + if ( ! in_array( 'acf-field-group', $this->options->get( 'post_types' ), true ) ) { + return; + } + + $this->options->set( + 'post_types', + array_diff( + $this->options->get( 'post_types' ), + array( 'acf-field-group' ) + ) + ); + $this->options->save(); + + foreach ( acf_get_field_groups() as $group ) { + if ( empty( $group['ID'] ) ) { + continue; + } + + $group_language = wp_get_object_terms( $group['ID'], 'language' ); + + if ( empty( $group_language ) || is_wp_error( $group_language ) || 1 !== count( $group_language ) ) { + continue; + } + + $group_language = $group_language[0]; + $new_location = array( + 'param' => 'language', + 'operator' => '==', + 'value' => $group_language->slug, + ); + + foreach ( $group['location'] as &$location ) { + $location[] = $new_location; + } + + acf_update_field_group( $group ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/uninstall.php b/wp-content/plugins/polylang-pro/uninstall.php new file mode 100644 index 0000000..df7c549 --- /dev/null +++ b/wp-content/plugins/polylang-pro/uninstall.php @@ -0,0 +1,26 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ + private $vendorDir; + + // PSR-4 + /** + * @var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var list + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> + */ + private $prefixesPsr0 = array(); + /** + * @var list + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var array + */ + private $missingClasses = array(); + + /** @var string|null */ + private $apcuPrefix; + + /** + * @var array + */ + private static $registeredLoaders = array(); + + /** + * @param string|null $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return array> + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return list + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return list + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return array Array of classname => path + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + $includeFile = self::$includeFile; + $includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders keyed by their corresponding vendor directories. + * + * @return array + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } + + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/composer/InstalledVersions.php b/wp-content/plugins/polylang-pro/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..2052022 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/InstalledVersions.php @@ -0,0 +1,396 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to + * @internal + */ + private static $selfDir = null; + + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool + */ + private static $installedIsLocalDir; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints((string) $constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + + // when using reload, we disable the duplicate protection to ensure that self::$installed data is + // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, + // so we have to assume it does not, and that may result in duplicate data being returned when listing + // all installed packages for example + self::$installedIsLocalDir = false; + } + + /** + * @return string + */ + private static function getSelfDir() + { + if (self::$selfDir === null) { + self::$selfDir = strtr(__DIR__, '\\', '/'); + } + + return self::$selfDir; + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + $copiedLocalDir = false; + + if (self::$canGetVendors) { + $selfDir = self::getSelfDir(); + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + $vendorDir = strtr($vendorDir, '\\', '/'); + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { + self::$installed = $required; + self::$installedIsLocalDir = true; + } + } + if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { + $copiedLocalDir = true; + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; + } else { + self::$installed = array(); + } + } + + if (self::$installed !== array() && !$copiedLocalDir) { + $installed[] = self::$installed; + } + + return $installed; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/composer/LICENSE b/wp-content/plugins/polylang-pro/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/wp-content/plugins/polylang-pro/vendor/composer/autoload_classmap.php b/wp-content/plugins/polylang-pro/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..b3260f9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/autoload_classmap.php @@ -0,0 +1,420 @@ + $vendorDir . '/composer/InstalledVersions.php', + 'PLL_AS3CF' => $vendorDir . '/wpsyntex/polylang/src/integrations/wp-offload-media/as3cf.php', + 'PLL_Abstract_Activable' => $vendorDir . '/wpsyntex/polylang/src/install/abstract-activable.php', + 'PLL_Abstract_Activate' => $vendorDir . '/wpsyntex/polylang/src/install/abstract-activate.php', + 'PLL_Abstract_Deactivate' => $vendorDir . '/wpsyntex/polylang/src/install/abstract-deactivate.php', + 'PLL_Abstract_Filter_Template' => $baseDir . '/src/modules/frontend-filter-template/abstract-filter-template.php', + 'PLL_Abstract_Sitemaps' => $vendorDir . '/wpsyntex/polylang/src/modules/sitemaps/abstract-sitemaps.php', + 'PLL_Accept_Language' => $vendorDir . '/wpsyntex/polylang/src/frontend/accept-language.php', + 'PLL_Accept_Languages_Collection' => $vendorDir . '/wpsyntex/polylang/src/frontend/accept-languages-collection.php', + 'PLL_Activate' => $vendorDir . '/wpsyntex/polylang/src/install/activate.php', + 'PLL_Active_Languages' => $baseDir . '/src/modules/active-languages/active-languages.php', + 'PLL_Admin' => $vendorDir . '/wpsyntex/polylang/src/admin/admin.php', + 'PLL_Admin_Advanced_Media' => $baseDir . '/src/modules/media/admin-advanced-media.php', + 'PLL_Admin_Base' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-base.php', + 'PLL_Admin_Block_Editor' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-block-editor.php', + 'PLL_Admin_Classic_Editor' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-classic-editor.php', + 'PLL_Admin_Default_Term' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-default-term.php', + 'PLL_Admin_Filters' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-filters.php', + 'PLL_Admin_Filters_Columns' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-filters-columns.php', + 'PLL_Admin_Filters_Media' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-filters-media.php', + 'PLL_Admin_Filters_Post' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-filters-post.php', + 'PLL_Admin_Filters_Post_Base' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-filters-post-base.php', + 'PLL_Admin_Filters_Term' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-filters-term.php', + 'PLL_Admin_Filters_Widgets_Options' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-filters-widgets-options.php', + 'PLL_Admin_Links' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-links.php', + 'PLL_Admin_Loader' => $baseDir . '/src/services/admin-loader/admin-loader.php', + 'PLL_Admin_Model' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-model.php', + 'PLL_Admin_Nav_Menu' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-nav-menu.php', + 'PLL_Admin_Notices' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-notices.php', + 'PLL_Admin_Site_Health' => $vendorDir . '/wpsyntex/polylang/src/modules/site-health/admin-site-health.php', + 'PLL_Admin_Static_Pages' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-static-pages.php', + 'PLL_Admin_Strings' => $vendorDir . '/wpsyntex/polylang/src/admin/admin-strings.php', + 'PLL_Admin_Sync' => $vendorDir . '/wpsyntex/polylang/src/modules/sync/admin-sync.php', + 'PLL_Aqua_Resizer' => $vendorDir . '/wpsyntex/polylang/src/integrations/aqua-resizer/aqua-resizer.php', + 'PLL_Base' => $vendorDir . '/wpsyntex/polylang/src/base.php', + 'PLL_Bulk_Translate' => $baseDir . '/src/modules/bulk-translate/bulk-translate.php', + 'PLL_Bulk_Translate_Option' => $baseDir . '/src/modules/bulk-translate/bulk-translate-option.php', + 'PLL_CPAC' => $baseDir . '/src/integrations/admin-columns/cpac.php', + 'PLL_CPTUI' => $baseDir . '/src/integrations/cptui/cptui.php', + 'PLL_CRUD_Posts' => $vendorDir . '/wpsyntex/polylang/src/crud-posts.php', + 'PLL_CRUD_Terms' => $vendorDir . '/wpsyntex/polylang/src/crud-terms.php', + 'PLL_Cache' => $vendorDir . '/wpsyntex/polylang/src/cache.php', + 'PLL_Cache_Compat' => $vendorDir . '/wpsyntex/polylang/src/integrations/cache/cache-compat.php', + 'PLL_Canonical' => $vendorDir . '/wpsyntex/polylang/src/frontend/canonical.php', + 'PLL_Cft' => $vendorDir . '/wpsyntex/polylang/src/integrations/custom-field-template/cft.php', + 'PLL_Choose_Lang' => $vendorDir . '/wpsyntex/polylang/src/frontend/choose-lang.php', + 'PLL_Choose_Lang_Content' => $vendorDir . '/wpsyntex/polylang/src/frontend/choose-lang-content.php', + 'PLL_Choose_Lang_Domain' => $vendorDir . '/wpsyntex/polylang/src/frontend/choose-lang-domain.php', + 'PLL_Choose_Lang_Url' => $vendorDir . '/wpsyntex/polylang/src/frontend/choose-lang-url.php', + 'PLL_Collect_Linked_Posts' => $baseDir . '/src/services/collect-linked-objects/collect-linked-posts.php', + 'PLL_Collect_Linked_Terms' => $baseDir . '/src/services/collect-linked-objects/collect-linked-terms.php', + 'PLL_Content_Blocks' => $baseDir . '/src/integrations/content-blocks/content-blocks.php', + 'PLL_Cookie' => $vendorDir . '/wpsyntex/polylang/src/cookie.php', + 'PLL_DOM_Content' => $baseDir . '/src/services/dom/dom-content.php', + 'PLL_DOM_Document' => $baseDir . '/src/services/dom/dom-document.php', + 'PLL_DOM_Nodes_Iterator' => $baseDir . '/src/services/dom/dom-nodes-iterator.php', + 'PLL_Deactivate' => $vendorDir . '/wpsyntex/polylang/src/install/deactivate.php', + 'PLL_Default_Term' => $vendorDir . '/wpsyntex/polylang/src/default-term.php', + 'PLL_Divi_Builder' => $baseDir . '/src/integrations/divi/divi-builder.php', + 'PLL_Domain_Mapping' => $vendorDir . '/wpsyntex/polylang/src/integrations/domain-mapping/domain-mapping.php', + 'PLL_Duplicate' => $baseDir . '/src/modules/duplicate/duplicate.php', + 'PLL_Duplicate_Action' => $baseDir . '/src/modules/duplicate/duplicate-action.php', + 'PLL_Duplicate_Post' => $vendorDir . '/wpsyntex/polylang/src/integrations/duplicate-post/duplicate-post.php', + 'PLL_Duplicate_REST' => $baseDir . '/src/modules/duplicate/duplicate-rest.php', + 'PLL_Export_Bulk_Option' => $baseDir . '/src/modules/import-export/export/export-bulk-option.php', + 'PLL_Export_Container' => $baseDir . '/src/services/exporter/export-container.php', + 'PLL_Export_Data' => $baseDir . '/src/services/exporter/export-data.php', + 'PLL_Export_Data_From_Posts' => $baseDir . '/src/services/exporter/export-data-from-posts.php', + 'PLL_Export_Data_From_Strings' => $baseDir . '/src/services/exporter/export-data-from-strings.php', + 'PLL_Export_Download' => $baseDir . '/src/modules/import-export/export/export-download.php', + 'PLL_Export_File' => $baseDir . '/src/modules/import-export/export/export-file.php', + 'PLL_Export_Metas' => $baseDir . '/src/services/exporter/export-metas.php', + 'PLL_Export_Post_Metas' => $baseDir . '/src/services/exporter/export-post-metas.php', + 'PLL_Export_Posts' => $baseDir . '/src/services/exporter/export-posts.php', + 'PLL_Export_Strings' => $baseDir . '/src/services/exporter/export-strings.php', + 'PLL_Export_Strings_Action' => $baseDir . '/src/modules/import-export/export/export-strings-action.php', + 'PLL_Export_Term_Metas' => $baseDir . '/src/services/exporter/export-term-metas.php', + 'PLL_Export_Terms' => $baseDir . '/src/services/exporter/export-terms.php', + 'PLL_Export_Translated_Objects' => $baseDir . '/src/services/exporter/export-translated-objects.php', + 'PLL_FLBuilder' => $baseDir . '/src/integrations/beaver-builder/flbuilder.php', + 'PLL_FSE_Abstract_Bulk_Edit_Template_Slugs_Module' => $baseDir . '/src/modules/full-site-editing/fse-abstract-bulk-edit-template-slugs-module.php', + 'PLL_FSE_Abstract_Module' => $baseDir . '/src/modules/full-site-editing/fse-abstract-module.php', + 'PLL_FSE_Default_Language_Change' => $baseDir . '/src/modules/full-site-editing/fse-default-language-change.php', + 'PLL_FSE_Filter_Block_Types' => $baseDir . '/src/modules/full-site-editing/fse-filter-block-types.php', + 'PLL_FSE_Language' => $baseDir . '/src/modules/full-site-editing/fse-language.php', + 'PLL_FSE_Language_Slug_Change' => $baseDir . '/src/modules/full-site-editing/fse-language-slug-change.php', + 'PLL_FSE_Post_Deletion' => $baseDir . '/src/modules/full-site-editing/fse-post-deletion.php', + 'PLL_FSE_Post_Types' => $baseDir . '/src/modules/full-site-editing/fse-post-types.php', + 'PLL_FSE_Query_Filters' => $baseDir . '/src/modules/full-site-editing/fse-query-filters.php', + 'PLL_FSE_REST_Duplicate_Template' => $baseDir . '/src/modules/full-site-editing/fse-rest-duplicate-template.php', + 'PLL_FSE_REST_Enforce_Default_Template' => $baseDir . '/src/modules/full-site-editing/fse-rest-enforce-default-template.php', + 'PLL_FSE_REST_Route' => $baseDir . '/src/modules/full-site-editing/fse-rest-route.php', + 'PLL_FSE_Recreate_Language' => $baseDir . '/src/modules/full-site-editing/fse-recreate-language.php', + 'PLL_FSE_Template_Model' => $baseDir . '/src/modules/full-site-editing/fse-template-model.php', + 'PLL_FSE_Template_Slug' => $baseDir . '/src/modules/full-site-editing/fse-template-slug.php', + 'PLL_FSE_Template_Slug_Sync' => $baseDir . '/src/modules/full-site-editing/fse-template-slug-sync.php', + 'PLL_FSE_Tools' => $baseDir . '/src/modules/full-site-editing/fse-tools.php', + 'PLL_Featured_Content' => $vendorDir . '/wpsyntex/polylang/src/integrations/jetpack/featured-content.php', + 'PLL_File_Format' => $baseDir . '/src/modules/import-export/file-format/file-format.php', + 'PLL_File_Format_Factory' => $baseDir . '/src/modules/import-export/file-format/file-format-factory.php', + 'PLL_Filter_REST_Routes' => $vendorDir . '/wpsyntex/polylang/src/filter-rest-routes.php', + 'PLL_Filter_Template_Core_Taxonomy' => $baseDir . '/src/modules/frontend-filter-template/filter-template-core-taxonomy.php', + 'PLL_Filter_Template_Custom_Taxonomy' => $baseDir . '/src/modules/frontend-filter-template/filter-template-custom-taxonomy.php', + 'PLL_Filter_Template_Page' => $baseDir . '/src/modules/frontend-filter-template/filter-template-page.php', + 'PLL_Filter_Template_Single' => $baseDir . '/src/modules/frontend-filter-template/filter-template-single.php', + 'PLL_Filter_Templates' => $baseDir . '/src/modules/frontend-filter-template/filter-templates.php', + 'PLL_Filters' => $vendorDir . '/wpsyntex/polylang/src/filters.php', + 'PLL_Filters_Links' => $vendorDir . '/wpsyntex/polylang/src/filters-links.php', + 'PLL_Filters_Sanitization' => $vendorDir . '/wpsyntex/polylang/src/filters-sanitization.php', + 'PLL_Filters_Widgets_Options' => $vendorDir . '/wpsyntex/polylang/src/filters-widgets-options.php', + 'PLL_Format_Util' => $vendorDir . '/wpsyntex/polylang/src/format-util.php', + 'PLL_Frontend' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend.php', + 'PLL_Frontend_Auto_Translate' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend-auto-translate.php', + 'PLL_Frontend_Filters' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend-filters.php', + 'PLL_Frontend_Filters_Links' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend-filters-links.php', + 'PLL_Frontend_Filters_Search' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend-filters-search.php', + 'PLL_Frontend_Filters_Widgets' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend-filters-widgets.php', + 'PLL_Frontend_Links' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend-links.php', + 'PLL_Frontend_Nav_Menu' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend-nav-menu.php', + 'PLL_Frontend_Static_Pages' => $vendorDir . '/wpsyntex/polylang/src/frontend/frontend-static-pages.php', + 'PLL_Frontend_Translate_Slugs' => $baseDir . '/src/modules/translate-slugs/frontend-translate-slugs.php', + 'PLL_Import_Action' => $baseDir . '/src/modules/import-export/import/import-action.php', + 'PLL_Import_Export' => $baseDir . '/src/modules/import-export/import-export.php', + 'PLL_Import_File_Interface' => $baseDir . '/src/modules/import-export/import/import-file-interface.php', + 'PLL_Import_Object_Interface' => $baseDir . '/src/modules/import-export/import/import-object-interface.php', + 'PLL_Import_Posts' => $baseDir . '/src/modules/import-export/import/import-posts.php', + 'PLL_Import_Strings' => $baseDir . '/src/modules/import-export/import/import-strings.php', + 'PLL_Import_Terms' => $baseDir . '/src/modules/import-export/import/import-terms.php', + 'PLL_Integrations' => $vendorDir . '/wpsyntex/polylang/src/integrations/integrations.php', + 'PLL_Jetpack' => $vendorDir . '/wpsyntex/polylang/src/integrations/jetpack/jetpack.php', + 'PLL_Language' => $vendorDir . '/wpsyntex/polylang/src/language.php', + 'PLL_Language_Deprecated' => $vendorDir . '/wpsyntex/polylang/src/language-deprecated.php', + 'PLL_Language_Factory' => $vendorDir . '/wpsyntex/polylang/src/language-factory.php', + 'PLL_License' => $vendorDir . '/wpsyntex/polylang/src/license.php', + 'PLL_Links' => $vendorDir . '/wpsyntex/polylang/src/links.php', + 'PLL_Links_Abstract_Domain' => $vendorDir . '/wpsyntex/polylang/src/links-abstract-domain.php', + 'PLL_Links_Default' => $vendorDir . '/wpsyntex/polylang/src/links-default.php', + 'PLL_Links_Directory' => $vendorDir . '/wpsyntex/polylang/src/links-directory.php', + 'PLL_Links_Domain' => $vendorDir . '/wpsyntex/polylang/src/links-domain.php', + 'PLL_Links_Model' => $vendorDir . '/wpsyntex/polylang/src/links-model.php', + 'PLL_Links_Permalinks' => $vendorDir . '/wpsyntex/polylang/src/links-permalinks.php', + 'PLL_Links_Subdomain' => $vendorDir . '/wpsyntex/polylang/src/links-subdomain.php', + 'PLL_Locale_Fallback' => $baseDir . '/src/modules/locale-fallback/locale-fallback.php', + 'PLL_MO' => $vendorDir . '/wpsyntex/polylang/src/mo.php', + 'PLL_Manage_User_Capabilities' => $baseDir . '/src/services/manage-user-capabilities.php', + 'PLL_Media_Bulk_Option' => $baseDir . '/src/modules/media/media-bulk-option.php', + 'PLL_Metabox_Button' => $baseDir . '/src/services/metabox-button/metabox-button.php', + 'PLL_Metabox_User_Button' => $baseDir . '/src/services/metabox-button/metabox-user-button.php', + 'PLL_Model' => $vendorDir . '/wpsyntex/polylang/src/model.php', + 'PLL_Module_Interface' => $baseDir . '/src/modules/module-interface.php', + 'PLL_Multilingual_Sitemaps_Provider' => $vendorDir . '/wpsyntex/polylang/src/modules/sitemaps/multilingual-sitemaps-provider.php', + 'PLL_Nav_Menu' => $vendorDir . '/wpsyntex/polylang/src/nav-menu.php', + 'PLL_No_Category_Base' => $vendorDir . '/wpsyntex/polylang/src/integrations/no-category-base/no-category-base.php', + 'PLL_OLT_Manager' => $vendorDir . '/wpsyntex/polylang/src/olt-manager.php', + 'PLL_PO_Export' => $baseDir . '/src/modules/import-export/po/po-export.php', + 'PLL_PO_Format' => $baseDir . '/src/modules/import-export/po/po-format.php', + 'PLL_PO_Import' => $baseDir . '/src/modules/import-export/po/po-import.php', + 'PLL_Plugin_Updater' => $vendorDir . '/wpsyntex/polylang/src/install/plugin-updater.php', + 'PLL_Pro' => $baseDir . '/src/pro.php', + 'PLL_Query' => $vendorDir . '/wpsyntex/polylang/src/query.php', + 'PLL_REST_API' => $baseDir . '/src/modules/rest/rest-api.php', + 'PLL_REST_Request' => $vendorDir . '/wpsyntex/polylang/src/rest-request.php', + 'PLL_Settings' => $vendorDir . '/wpsyntex/polylang/src/settings/settings.php', + 'PLL_Settings_Advanced_Media' => $baseDir . '/src/modules/media/settings-advanced-media.php', + 'PLL_Settings_Browser' => $vendorDir . '/wpsyntex/polylang/src/settings/settings-browser.php', + 'PLL_Settings_CPT' => $vendorDir . '/wpsyntex/polylang/src/settings/settings-cpt.php', + 'PLL_Settings_Licenses' => $vendorDir . '/wpsyntex/polylang/src/settings/settings-licenses.php', + 'PLL_Settings_Media' => $vendorDir . '/wpsyntex/polylang/src/settings/settings-media.php', + 'PLL_Settings_Module' => $vendorDir . '/wpsyntex/polylang/src/settings/settings-module.php', + 'PLL_Settings_Preview_Machine_Translation' => $vendorDir . '/wpsyntex/polylang/src/modules/machine-translation/settings-preview-machine-translation.php', + 'PLL_Settings_Preview_Share_Slug' => $vendorDir . '/wpsyntex/polylang/src/modules/share-slug/settings-preview-share-slug.php', + 'PLL_Settings_Preview_Translate_Slugs' => $vendorDir . '/wpsyntex/polylang/src/modules/translate-slugs/settings-preview-translate-slugs.php', + 'PLL_Settings_Share_Slug' => $baseDir . '/src/modules/share-slug/settings-share-slug.php', + 'PLL_Settings_Sync' => $vendorDir . '/wpsyntex/polylang/src/modules/sync/settings-sync.php', + 'PLL_Settings_Translate_Slugs' => $baseDir . '/src/modules/translate-slugs/settings-translate-slugs.php', + 'PLL_Settings_Url' => $vendorDir . '/wpsyntex/polylang/src/settings/settings-url.php', + 'PLL_Share_Post_Slug' => $baseDir . '/src/modules/share-slug/share-post-slug.php', + 'PLL_Share_Term_Slug' => $baseDir . '/src/modules/share-slug/share-term-slug.php', + 'PLL_Sitemaps' => $vendorDir . '/wpsyntex/polylang/src/modules/sitemaps/sitemaps.php', + 'PLL_Sitemaps_Domain' => $vendorDir . '/wpsyntex/polylang/src/modules/sitemaps/sitemaps-domain.php', + 'PLL_Static_Pages' => $vendorDir . '/wpsyntex/polylang/src/static-pages.php', + 'PLL_Strings_Form_Trait' => $baseDir . '/src/modules/import-export/export/strings-form-trait.php', + 'PLL_Switcher' => $vendorDir . '/wpsyntex/polylang/src/switcher.php', + 'PLL_Sync' => $vendorDir . '/wpsyntex/polylang/src/modules/sync/sync.php', + 'PLL_Sync_Block_Parsing_Rules' => $baseDir . '/src/modules/sync/sync-block-parsing-rules.php', + 'PLL_Sync_Blocks' => $baseDir . '/src/modules/sync/sync-blocks.php', + 'PLL_Sync_Content' => $baseDir . '/src/modules/sync/sync-content.php', + 'PLL_Sync_HTML' => $baseDir . '/src/modules/sync/sync-html.php', + 'PLL_Sync_Ids' => $baseDir . '/src/modules/sync/sync-ids.php', + 'PLL_Sync_Metas' => $vendorDir . '/wpsyntex/polylang/src/modules/sync/sync-metas.php', + 'PLL_Sync_Navigation' => $baseDir . '/src/modules/sync/sync-navigation.php', + 'PLL_Sync_Post' => $baseDir . '/src/modules/sync-post/sync-post.php', + 'PLL_Sync_Post_Bulk_Option' => $baseDir . '/src/modules/sync-post/sync-post-bulk-option.php', + 'PLL_Sync_Post_Button' => $baseDir . '/src/modules/sync-post/sync-post-button.php', + 'PLL_Sync_Post_Metas' => $vendorDir . '/wpsyntex/polylang/src/modules/sync/sync-post-metas.php', + 'PLL_Sync_Post_Model' => $baseDir . '/src/modules/sync-post/sync-post-model.php', + 'PLL_Sync_Post_REST' => $baseDir . '/src/modules/sync-post/sync-post-rest.php', + 'PLL_Sync_Shortcodes' => $baseDir . '/src/modules/sync/sync-shortcodes.php', + 'PLL_Sync_Tax' => $vendorDir . '/wpsyntex/polylang/src/modules/sync/sync-tax.php', + 'PLL_Sync_Term_Metas' => $vendorDir . '/wpsyntex/polylang/src/modules/sync/sync-term-metas.php', + 'PLL_T15S' => $vendorDir . '/wpsyntex/polylang/src/install/t15s.php', + 'PLL_TEC' => $baseDir . '/src/integrations/events-calendar/tec.php', + 'PLL_Table_Languages' => $vendorDir . '/wpsyntex/polylang/src/settings/table-languages.php', + 'PLL_Table_Settings' => $vendorDir . '/wpsyntex/polylang/src/settings/table-settings.php', + 'PLL_Table_String' => $vendorDir . '/wpsyntex/polylang/src/settings/table-string.php', + 'PLL_Term_Slug' => $vendorDir . '/wpsyntex/polylang/src/term-slug.php', + 'PLL_Toggle_User_Button_REST' => $baseDir . '/src/services/metabox-button/toggle-user-button-rest.php', + 'PLL_Toggle_User_Meta' => $baseDir . '/src/services/metabox-button/toggle-user-meta.php', + 'PLL_Translatable_Object' => $vendorDir . '/wpsyntex/polylang/src/translatable-object.php', + 'PLL_Translatable_Object_With_Types_Interface' => $vendorDir . '/wpsyntex/polylang/src/translatable-object-with-types-interface.php', + 'PLL_Translatable_Object_With_Types_Trait' => $vendorDir . '/wpsyntex/polylang/src/translatable-object-with-types-trait.php', + 'PLL_Translatable_Objects' => $vendorDir . '/wpsyntex/polylang/src/translatable-objects.php', + 'PLL_Translate_Option' => $vendorDir . '/wpsyntex/polylang/src/translate-option.php', + 'PLL_Translate_Slugs' => $baseDir . '/src/modules/translate-slugs/translate-slugs.php', + 'PLL_Translate_Slugs_Model' => $baseDir . '/src/modules/translate-slugs/translate-slugs-model.php', + 'PLL_Translated_Object' => $vendorDir . '/wpsyntex/polylang/src/translated-object.php', + 'PLL_Translated_Post' => $vendorDir . '/wpsyntex/polylang/src/translated-post.php', + 'PLL_Translated_Term' => $vendorDir . '/wpsyntex/polylang/src/translated-term.php', + 'PLL_Translation_Block_Parsing_Rules' => $baseDir . '/src/services/translation/translation-block-parsing-rules.php', + 'PLL_Translation_Content' => $baseDir . '/src/services/translation/translation-content.php', + 'PLL_Translation_Data_Model_Interface' => $baseDir . '/src/services/translation/translation-data-model-interface.php', + 'PLL_Translation_Metas' => $baseDir . '/src/services/translation/translation-metas.php', + 'PLL_Translation_Object_Model_Trait' => $baseDir . '/src/services/translation/translation-object-model-trait.php', + 'PLL_Translation_Post_Metas' => $baseDir . '/src/services/translation/translation-post-metas.php', + 'PLL_Translation_Post_Model' => $baseDir . '/src/services/translation/translation-post-model.php', + 'PLL_Translation_Strings_Model' => $baseDir . '/src/services/translation/translation-strings-model.php', + 'PLL_Translation_Term_Metas' => $baseDir . '/src/services/translation/translation-term-metas.php', + 'PLL_Translation_Term_Model' => $baseDir . '/src/services/translation/translation-term-model.php', + 'PLL_Translation_Walker_Blocks' => $baseDir . '/src/services/translation/translation-walker-blocks.php', + 'PLL_Translation_Walker_Classic' => $baseDir . '/src/services/translation/translation-walker-classic.php', + 'PLL_Translation_Walker_Factory' => $baseDir . '/src/services/translation/translation-walker-factory.php', + 'PLL_Translation_Walker_Interface' => $baseDir . '/src/services/translation/translation-walker-interface.php', + 'PLL_Twenty_Seventeen' => $vendorDir . '/wpsyntex/polylang/src/integrations/twenty-seventeen/twenty-seven-teen.php', + 'PLL_Upgrade' => $vendorDir . '/wpsyntex/polylang/src/install/upgrade.php', + 'PLL_Usable' => $vendorDir . '/wpsyntex/polylang/src/install/usable.php', + 'PLL_WPML_API' => $vendorDir . '/wpsyntex/polylang/src/modules/wpml/wpml-api.php', + 'PLL_WPML_Compat' => $vendorDir . '/wpsyntex/polylang/src/modules/wpml/wpml-compat.php', + 'PLL_WPML_Config' => $vendorDir . '/wpsyntex/polylang/src/modules/wpml/wpml-config.php', + 'PLL_WPSEO' => $vendorDir . '/wpsyntex/polylang/src/integrations/wpseo/wpseo.php', + 'PLL_WPSEO_OGP' => $vendorDir . '/wpsyntex/polylang/src/integrations/wpseo/wpseo-ogp.php', + 'PLL_WP_Import' => $vendorDir . '/wpsyntex/polylang/src/integrations/wp-importer/wp-import.php', + 'PLL_WP_Sweep' => $vendorDir . '/wpsyntex/polylang/src/integrations/wp-sweep/wp-sweep.php', + 'PLL_Walker' => $vendorDir . '/wpsyntex/polylang/src/walker.php', + 'PLL_Walker_Dropdown' => $vendorDir . '/wpsyntex/polylang/src/walker-dropdown.php', + 'PLL_Walker_List' => $vendorDir . '/wpsyntex/polylang/src/walker-list.php', + 'PLL_Widget_Calendar' => $vendorDir . '/wpsyntex/polylang/src/widget-calendar.php', + 'PLL_Widget_Languages' => $vendorDir . '/wpsyntex/polylang/src/widget-languages.php', + 'PLL_Wizard' => $vendorDir . '/wpsyntex/polylang/src/modules/wizard/wizard.php', + 'PLL_Wizard_Pro' => $baseDir . '/src/modules/wizard/wizard-pro.php', + 'PLL_WordPress_Importer' => $vendorDir . '/wpsyntex/polylang/src/integrations/wp-importer/wordpress-importer.php', + 'PLL_Xdata_Base' => $baseDir . '/src/modules/xdata/xdata-base.php', + 'PLL_Xdata_Domain' => $baseDir . '/src/modules/xdata/xdata-domain.php', + 'PLL_Xdata_Session_Manager' => $baseDir . '/src/modules/xdata/xdata-session-manager.php', + 'PLL_Xdata_Subdomain' => $baseDir . '/src/modules/xdata/xdata-subdomain.php', + 'PLL_Xliff_Export_12' => $baseDir . '/src/modules/import-export/xliff/export/xliff-export-12.php', + 'PLL_Xliff_Export_20' => $baseDir . '/src/modules/import-export/xliff/export/xliff-export-20.php', + 'PLL_Xliff_Export_21' => $baseDir . '/src/modules/import-export/xliff/export/xliff-export-21.php', + 'PLL_Xliff_Export_Base' => $baseDir . '/src/modules/import-export/xliff/export/xliff-export-base.php', + 'PLL_Xliff_Format' => $baseDir . '/src/modules/import-export/xliff/xliff-format.php', + 'PLL_Xliff_Import' => $baseDir . '/src/modules/import-export/xliff/xliff-import.php', + 'PLL_Xliff_Import_Parser_12' => $baseDir . '/src/modules/import-export/xliff/xliff-import-parser-12.php', + 'PLL_Xliff_Import_Parser_21' => $baseDir . '/src/modules/import-export/xliff/xliff-import-parser-21.php', + 'PLL_Xliff_Import_Parser_Base' => $baseDir . '/src/modules/import-export/xliff/xliff-import-parser-base.php', + 'PLL_Yarpp' => $vendorDir . '/wpsyntex/polylang/src/integrations/yarpp/yarpp.php', + 'Polylang' => $vendorDir . '/wpsyntex/polylang/src/class-polylang.php', + 'WP_Syntex\\Polylang\\Blocks\\Language_Switcher\\Abstract_Block' => $vendorDir . '/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Abstract_Block.php', + 'WP_Syntex\\Polylang\\Blocks\\Language_Switcher\\Navigation\\Block' => $vendorDir . '/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/Block.php', + 'WP_Syntex\\Polylang\\Blocks\\Language_Switcher\\Standard\\Block' => $vendorDir . '/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/Block.php', + 'WP_Syntex\\Polylang\\Capabilities\\Capabilities' => $vendorDir . '/wpsyntex/polylang/src/Capabilities/Capabilities.php', + 'WP_Syntex\\Polylang\\Capabilities\\Create\\Abstract_Object' => $vendorDir . '/wpsyntex/polylang/src/Capabilities/Create/Abstract_Object.php', + 'WP_Syntex\\Polylang\\Capabilities\\Create\\Post' => $vendorDir . '/wpsyntex/polylang/src/Capabilities/Create/Post.php', + 'WP_Syntex\\Polylang\\Capabilities\\Create\\Term' => $vendorDir . '/wpsyntex/polylang/src/Capabilities/Create/Term.php', + 'WP_Syntex\\Polylang\\Capabilities\\User\\Creator' => $vendorDir . '/wpsyntex/polylang/src/Capabilities/User/Creator.php', + 'WP_Syntex\\Polylang\\Capabilities\\User\\Creator_Interface' => $vendorDir . '/wpsyntex/polylang/src/Capabilities/User/Creator_Interface.php', + 'WP_Syntex\\Polylang\\Capabilities\\User\\NOOP' => $vendorDir . '/wpsyntex/polylang/src/Capabilities/User/NOOP.php', + 'WP_Syntex\\Polylang\\Capabilities\\User\\User_Interface' => $vendorDir . '/wpsyntex/polylang/src/Capabilities/User/User_Interface.php', + 'WP_Syntex\\Polylang\\Model\\Hide_Default' => $vendorDir . '/wpsyntex/polylang/src/Model/Hide_Default.php', + 'WP_Syntex\\Polylang\\Model\\Hide_Empty' => $vendorDir . '/wpsyntex/polylang/src/Model/Hide_Empty.php', + 'WP_Syntex\\Polylang\\Model\\Languages' => $vendorDir . '/wpsyntex/polylang/src/Model/Languages.php', + 'WP_Syntex\\Polylang\\Model\\Languages_Proxies' => $vendorDir . '/wpsyntex/polylang/src/Model/Languages_Proxies.php', + 'WP_Syntex\\Polylang\\Model\\Languages_Proxy_Interface' => $vendorDir . '/wpsyntex/polylang/src/Model/Languages_Proxy_Interface.php', + 'WP_Syntex\\Polylang\\Model\\Post_Types' => $vendorDir . '/wpsyntex/polylang/src/Model/Post_Types.php', + 'WP_Syntex\\Polylang\\Model\\Taxonomies' => $vendorDir . '/wpsyntex/polylang/src/Model/Taxonomies.php', + 'WP_Syntex\\Polylang\\Options\\Abstract_Option' => $vendorDir . '/wpsyntex/polylang/src/Options/Abstract_Option.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Abstract_Object_Types' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Abstract_Object_Types.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Browser' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Browser.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Default_Lang' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Default_Lang.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Domains' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Domains.php', + 'WP_Syntex\\Polylang\\Options\\Business\\First_Activation' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/First_Activation.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Force_Lang' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Force_Lang.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Hide_Default' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Hide_Default.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Media_Support' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Media_Support.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Nav_Menus' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Nav_Menus.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Post_Types' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Post_Types.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Previous_Version' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Previous_Version.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Redirect_Lang' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Redirect_Lang.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Rewrite' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Rewrite.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Sync' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Sync.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Taxonomies' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Taxonomies.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Version' => $vendorDir . '/wpsyntex/polylang/src/Options/Business/Version.php', + 'WP_Syntex\\Polylang\\Options\\Inactive_Option' => $vendorDir . '/wpsyntex/polylang/src/Options/Inactive_Option.php', + 'WP_Syntex\\Polylang\\Options\\Options' => $vendorDir . '/wpsyntex/polylang/src/Options/Options.php', + 'WP_Syntex\\Polylang\\Options\\Primitive\\Abstract_Boolean' => $vendorDir . '/wpsyntex/polylang/src/Options/Primitive/Abstract_Boolean.php', + 'WP_Syntex\\Polylang\\Options\\Primitive\\Abstract_List' => $vendorDir . '/wpsyntex/polylang/src/Options/Primitive/Abstract_List.php', + 'WP_Syntex\\Polylang\\Options\\Primitive\\Abstract_Map' => $vendorDir . '/wpsyntex/polylang/src/Options/Primitive/Abstract_Map.php', + 'WP_Syntex\\Polylang\\Options\\Primitive\\Abstract_String' => $vendorDir . '/wpsyntex/polylang/src/Options/Primitive/Abstract_String.php', + 'WP_Syntex\\Polylang\\Options\\Registry' => $vendorDir . '/wpsyntex/polylang/src/Options/Registry.php', + 'WP_Syntex\\Polylang\\REST\\API' => $vendorDir . '/wpsyntex/polylang/src/modules/REST/API.php', + 'WP_Syntex\\Polylang\\REST\\Abstract_Controller' => $vendorDir . '/wpsyntex/polylang/src/modules/REST/Abstract_Controller.php', + 'WP_Syntex\\Polylang\\REST\\Request' => $vendorDir . '/wpsyntex/polylang/src/modules/REST/Request.php', + 'WP_Syntex\\Polylang\\REST\\V1\\Languages' => $vendorDir . '/wpsyntex/polylang/src/modules/REST/V1/Languages.php', + 'WP_Syntex\\Polylang\\REST\\V1\\Settings' => $vendorDir . '/wpsyntex/polylang/src/modules/REST/V1/Settings.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Filter_Preload_Paths' => $baseDir . '/src/modules/Editors/Filter_Preload_Paths.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Screens\\Abstract_Screen' => $baseDir . '/src/modules/Editors/Screens/Abstract_Screen.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Screens\\Post' => $baseDir . '/src/modules/Editors/Screens/Post.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Screens\\Site' => $baseDir . '/src/modules/Editors/Screens/Site.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Screens\\Widget' => $baseDir . '/src/modules/Editors/Screens/Widget.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Deactivate' => $baseDir . '/src/integrations/ACF/Deactivate.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Dispatcher' => $baseDir . '/src/integrations/ACF/Dispatcher.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Abstract_Object' => $baseDir . '/src/integrations/ACF/Entity/Abstract_Object.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Blocks' => $baseDir . '/src/integrations/ACF/Entity/Blocks.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Media' => $baseDir . '/src/integrations/ACF/Entity/Media.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Post' => $baseDir . '/src/integrations/ACF/Entity/Post.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Term' => $baseDir . '/src/integrations/ACF/Entity/Term.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Translatable_Entity_Interface' => $baseDir . '/src/integrations/ACF/Entity/Translatable_Entity_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Field_Settings' => $baseDir . '/src/integrations/ACF/Field_Settings.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Fields\\Repeater' => $baseDir . '/src/integrations/ACF/Fields/Repeater.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Labels\\Abstract_Object_Type' => $baseDir . '/src/integrations/ACF/Labels/Abstract_Object_Type.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Labels\\Field_Groups' => $baseDir . '/src/integrations/ACF/Labels/Field_Groups.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Labels\\Post_Type' => $baseDir . '/src/integrations/ACF/Labels/Post_Type.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Labels\\Taxonomy' => $baseDir . '/src/integrations/ACF/Labels/Taxonomy.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Location_Language' => $baseDir . '/src/integrations/ACF/Location_Language.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Main' => $baseDir . '/src/integrations/ACF/Main.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Abstract_Collect_Ids' => $baseDir . '/src/integrations/ACF/Strategy/Abstract_Collect_Ids.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Abstract_Strategy' => $baseDir . '/src/integrations/ACF/Strategy/Abstract_Strategy.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Collect_Post_Ids' => $baseDir . '/src/integrations/ACF/Strategy/Collect_Post_Ids.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Collect_Term_Ids' => $baseDir . '/src/integrations/ACF/Strategy/Collect_Term_Ids.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Copy' => $baseDir . '/src/integrations/ACF/Strategy/Copy.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Copy_All' => $baseDir . '/src/integrations/ACF/Strategy/Copy_All.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Export' => $baseDir . '/src/integrations/ACF/Strategy/Export.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Import' => $baseDir . '/src/integrations/ACF/Strategy/Import.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Synchronize' => $baseDir . '/src/integrations/ACF/Strategy/Synchronize.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Translation_Instructions' => $baseDir . '/src/integrations/ACF/Translation_Instructions.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Active_Languages\\Languages_Proxy' => $baseDir . '/src/modules/active-languages/Languages_Proxy.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Command\\Language' => $baseDir . '/src/modules/CLI/Command/Language.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Command\\Setting' => $baseDir . '/src/modules/CLI/Command/Setting.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Command\\Setting_Adapter' => $baseDir . '/src/modules/CLI/Command/Setting_Adapter.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Commands' => $baseDir . '/src/modules/CLI/Commands.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Formatter' => $baseDir . '/src/modules/CLI/Formatter.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Advanced_Capabilities' => $baseDir . '/src/modules/Capabilities/Advanced_Capabilities.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Create\\Post' => $baseDir . '/src/modules/Capabilities/Create/Post.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Create\\Term' => $baseDir . '/src/modules/Capabilities/Create/Term.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Languages_Proxy' => $baseDir . '/src/modules/Capabilities/Languages_Proxy.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Abstract_Mapper' => $baseDir . '/src/modules/Capabilities/Mapper/Abstract_Mapper.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Do_Not_Allow' => $baseDir . '/src/modules/Capabilities/Mapper/Do_Not_Allow.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Internal' => $baseDir . '/src/modules/Capabilities/Mapper/Internal.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Machine_Translation' => $baseDir . '/src/modules/Capabilities/Mapper/Machine_Translation.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Post' => $baseDir . '/src/modules/Capabilities/Mapper/Post.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Term' => $baseDir . '/src/modules/Capabilities/Mapper/Term.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\User\\Creator' => $baseDir . '/src/modules/Capabilities/User/Creator.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\User\\Translator' => $baseDir . '/src/modules/Capabilities/User/Translator.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Import_Export\\Services\\Context' => $baseDir . '/src/services/context.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Clients\\Client_Interface' => $baseDir . '/src/modules/Machine_Translation/Clients/Client_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Clients\\Deepl' => $baseDir . '/src/modules/Machine_Translation/Clients/Deepl.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Data' => $baseDir . '/src/modules/Machine_Translation/Data.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Factory' => $baseDir . '/src/modules/Machine_Translation/Factory.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Module_Settings' => $baseDir . '/src/modules/Machine_Translation/Module_Settings.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Posts\\Action' => $baseDir . '/src/modules/Machine_Translation/Posts/Action.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Posts\\Button' => $baseDir . '/src/modules/Machine_Translation/Posts/Button.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Posts\\Button_REST' => $baseDir . '/src/modules/Machine_Translation/Posts/Button_REST.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Processor' => $baseDir . '/src/modules/Machine_Translation/Processor.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Services\\Deepl' => $baseDir . '/src/modules/Machine_Translation/Services/Deepl.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Services\\Service_Interface' => $baseDir . '/src/modules/Machine_Translation/Services/Service_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Settings\\Deepl' => $baseDir . '/src/modules/Machine_Translation/Settings/Deepl.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Settings\\Settings_Interface' => $baseDir . '/src/modules/Machine_Translation/Settings/Settings_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Strings\\Action' => $baseDir . '/src/modules/Machine_Translation/Strings/Action.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Strings\\Metabox' => $baseDir . '/src/modules/Machine_Translation/Strings/Metabox.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Site_Health\\Info' => $baseDir . '/src/modules/Site_Health/Info.php', + 'WP_Syntex\\Polylang_Pro\\Options\\Business\\Machine_Translation_Enabled' => $baseDir . '/src/Options/Business/Machine_Translation_Enabled.php', + 'WP_Syntex\\Polylang_Pro\\Options\\Business\\Machine_Translation_Services' => $baseDir . '/src/Options/Business/Machine_Translation_Services.php', + 'WP_Syntex\\Polylang_Pro\\Options\\Business\\Media' => $baseDir . '/src/Options/Business/Media.php', + 'WP_Syntex\\Polylang_Pro\\Options\\Registry' => $baseDir . '/src/Options/Registry.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Abstract_Object' => $baseDir . '/src/modules/rest/Filtered/Abstract_Object.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Comment' => $baseDir . '/src/modules/rest/Filtered/Comment.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Post' => $baseDir . '/src/modules/rest/Filtered/Post.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Template' => $baseDir . '/src/modules/rest/Filtered/Template.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Term' => $baseDir . '/src/modules/rest/Filtered/Term.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translatable\\Abstract_Object' => $baseDir . '/src/modules/rest/Translatable/Abstract_object.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Abstract_Object' => $baseDir . '/src/modules/rest/Translated/Abstract_Object.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Attachment' => $baseDir . '/src/modules/rest/Translated/Attachment.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Post' => $baseDir . '/src/modules/rest/Translated/Post.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Template' => $baseDir . '/src/modules/rest/Translated/Template.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Term' => $baseDir . '/src/modules/rest/Translated/Term.php', + 'WP_Syntex\\Polylang_Pro\\REST\\V1\\Translation' => $baseDir . '/src/modules/rest/V1/Translation.php', + 'WP_Syntex\\Polylang_Pro\\REST\\V1\\Untranslated_Posts' => $baseDir . '/src/modules/rest/V1/Untranslated_Posts.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Base64_Encoding' => $baseDir . '/src/services/Encoding/Base64_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Data_Encoder_Interface' => $baseDir . '/src/services/Encoding/Data_Encoder_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Data_Encoding' => $baseDir . '/src/services/Encoding/Data_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Json_Encoding' => $baseDir . '/src/services/Encoding/Json_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Serialize_Encoding' => $baseDir . '/src/services/Encoding/Serialize_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Url_Encoding' => $baseDir . '/src/services/Encoding/Url_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Common_Trait' => $baseDir . '/dependencies/wpsyntex/updater/src/Common_Trait.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\EDD_SL_Plugin_Updater' => $baseDir . '/dependencies/wpsyntex/updater/src/EDD_SL_Plugin_Updater.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\License' => $baseDir . '/dependencies/wpsyntex/updater/src/License.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Settings' => $baseDir . '/dependencies/wpsyntex/updater/src/Settings.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Translations' => $baseDir . '/dependencies/wpsyntex/updater/src/Translations.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Updater' => $baseDir . '/dependencies/wpsyntex/updater/src/Updater.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Wizard_Licenses_Step' => $baseDir . '/dependencies/wpsyntex/updater/src/Wizard_Licenses_Step.php', + 'WP_Syntex\\Polylang_Pro\\Upgrade' => $baseDir . '/src/upgrade.php', + 'WP_Syntex\\Polylang_Pro\\Widget_Blocks\\Frontend_Filters' => $baseDir . '/src/modules/Widget_Blocks/Frontend_Filters.php', + 'WP_Syntex\\Polylang_Pro\\Widget_Blocks\\Language_Attribute' => $baseDir . '/src/modules/Widget_Blocks/Language_Attribute.php', +); diff --git a/wp-content/plugins/polylang-pro/vendor/composer/autoload_namespaces.php b/wp-content/plugins/polylang-pro/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..15a2ff3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/wpsyntex/polylang/bin', $vendorDir . '/wpsyntex/polylang/bin'), + 'WP_Syntex\\Lib\\' => array($vendorDir . '/wpsyntex/updater/lib'), +); diff --git a/wp-content/plugins/polylang-pro/vendor/composer/autoload_real.php b/wp-content/plugins/polylang-pro/vendor/composer/autoload_real.php new file mode 100644 index 0000000..8fb0433 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/autoload_real.php @@ -0,0 +1,38 @@ +register(true); + + return $loader; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/composer/autoload_static.php b/wp-content/plugins/polylang-pro/vendor/composer/autoload_static.php new file mode 100644 index 0000000..500d560 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/autoload_static.php @@ -0,0 +1,452 @@ + + array ( + 'WP_Syntex\\Polylang\\Script\\' => 26, + 'WP_Syntex\\Lib\\' => 14, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'WP_Syntex\\Polylang\\Script\\' => + array ( + 0 => __DIR__ . '/..' . '/wpsyntex/polylang/bin', + 1 => __DIR__ . '/..' . '/wpsyntex/polylang/bin', + ), + 'WP_Syntex\\Lib\\' => + array ( + 0 => __DIR__ . '/..' . '/wpsyntex/updater/lib', + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'PLL_AS3CF' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/wp-offload-media/as3cf.php', + 'PLL_Abstract_Activable' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/abstract-activable.php', + 'PLL_Abstract_Activate' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/abstract-activate.php', + 'PLL_Abstract_Deactivate' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/abstract-deactivate.php', + 'PLL_Abstract_Filter_Template' => __DIR__ . '/../..' . '/src/modules/frontend-filter-template/abstract-filter-template.php', + 'PLL_Abstract_Sitemaps' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sitemaps/abstract-sitemaps.php', + 'PLL_Accept_Language' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/accept-language.php', + 'PLL_Accept_Languages_Collection' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/accept-languages-collection.php', + 'PLL_Activate' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/activate.php', + 'PLL_Active_Languages' => __DIR__ . '/../..' . '/src/modules/active-languages/active-languages.php', + 'PLL_Admin' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin.php', + 'PLL_Admin_Advanced_Media' => __DIR__ . '/../..' . '/src/modules/media/admin-advanced-media.php', + 'PLL_Admin_Base' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-base.php', + 'PLL_Admin_Block_Editor' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-block-editor.php', + 'PLL_Admin_Classic_Editor' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-classic-editor.php', + 'PLL_Admin_Default_Term' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-default-term.php', + 'PLL_Admin_Filters' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-filters.php', + 'PLL_Admin_Filters_Columns' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-filters-columns.php', + 'PLL_Admin_Filters_Media' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-filters-media.php', + 'PLL_Admin_Filters_Post' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-filters-post.php', + 'PLL_Admin_Filters_Post_Base' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-filters-post-base.php', + 'PLL_Admin_Filters_Term' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-filters-term.php', + 'PLL_Admin_Filters_Widgets_Options' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-filters-widgets-options.php', + 'PLL_Admin_Links' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-links.php', + 'PLL_Admin_Loader' => __DIR__ . '/../..' . '/src/services/admin-loader/admin-loader.php', + 'PLL_Admin_Model' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-model.php', + 'PLL_Admin_Nav_Menu' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-nav-menu.php', + 'PLL_Admin_Notices' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-notices.php', + 'PLL_Admin_Site_Health' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/site-health/admin-site-health.php', + 'PLL_Admin_Static_Pages' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-static-pages.php', + 'PLL_Admin_Strings' => __DIR__ . '/..' . '/wpsyntex/polylang/src/admin/admin-strings.php', + 'PLL_Admin_Sync' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sync/admin-sync.php', + 'PLL_Aqua_Resizer' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/aqua-resizer/aqua-resizer.php', + 'PLL_Base' => __DIR__ . '/..' . '/wpsyntex/polylang/src/base.php', + 'PLL_Bulk_Translate' => __DIR__ . '/../..' . '/src/modules/bulk-translate/bulk-translate.php', + 'PLL_Bulk_Translate_Option' => __DIR__ . '/../..' . '/src/modules/bulk-translate/bulk-translate-option.php', + 'PLL_CPAC' => __DIR__ . '/../..' . '/src/integrations/admin-columns/cpac.php', + 'PLL_CPTUI' => __DIR__ . '/../..' . '/src/integrations/cptui/cptui.php', + 'PLL_CRUD_Posts' => __DIR__ . '/..' . '/wpsyntex/polylang/src/crud-posts.php', + 'PLL_CRUD_Terms' => __DIR__ . '/..' . '/wpsyntex/polylang/src/crud-terms.php', + 'PLL_Cache' => __DIR__ . '/..' . '/wpsyntex/polylang/src/cache.php', + 'PLL_Cache_Compat' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/cache/cache-compat.php', + 'PLL_Canonical' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/canonical.php', + 'PLL_Cft' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/custom-field-template/cft.php', + 'PLL_Choose_Lang' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/choose-lang.php', + 'PLL_Choose_Lang_Content' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/choose-lang-content.php', + 'PLL_Choose_Lang_Domain' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/choose-lang-domain.php', + 'PLL_Choose_Lang_Url' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/choose-lang-url.php', + 'PLL_Collect_Linked_Posts' => __DIR__ . '/../..' . '/src/services/collect-linked-objects/collect-linked-posts.php', + 'PLL_Collect_Linked_Terms' => __DIR__ . '/../..' . '/src/services/collect-linked-objects/collect-linked-terms.php', + 'PLL_Content_Blocks' => __DIR__ . '/../..' . '/src/integrations/content-blocks/content-blocks.php', + 'PLL_Cookie' => __DIR__ . '/..' . '/wpsyntex/polylang/src/cookie.php', + 'PLL_DOM_Content' => __DIR__ . '/../..' . '/src/services/dom/dom-content.php', + 'PLL_DOM_Document' => __DIR__ . '/../..' . '/src/services/dom/dom-document.php', + 'PLL_DOM_Nodes_Iterator' => __DIR__ . '/../..' . '/src/services/dom/dom-nodes-iterator.php', + 'PLL_Deactivate' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/deactivate.php', + 'PLL_Default_Term' => __DIR__ . '/..' . '/wpsyntex/polylang/src/default-term.php', + 'PLL_Divi_Builder' => __DIR__ . '/../..' . '/src/integrations/divi/divi-builder.php', + 'PLL_Domain_Mapping' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/domain-mapping/domain-mapping.php', + 'PLL_Duplicate' => __DIR__ . '/../..' . '/src/modules/duplicate/duplicate.php', + 'PLL_Duplicate_Action' => __DIR__ . '/../..' . '/src/modules/duplicate/duplicate-action.php', + 'PLL_Duplicate_Post' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/duplicate-post/duplicate-post.php', + 'PLL_Duplicate_REST' => __DIR__ . '/../..' . '/src/modules/duplicate/duplicate-rest.php', + 'PLL_Export_Bulk_Option' => __DIR__ . '/../..' . '/src/modules/import-export/export/export-bulk-option.php', + 'PLL_Export_Container' => __DIR__ . '/../..' . '/src/services/exporter/export-container.php', + 'PLL_Export_Data' => __DIR__ . '/../..' . '/src/services/exporter/export-data.php', + 'PLL_Export_Data_From_Posts' => __DIR__ . '/../..' . '/src/services/exporter/export-data-from-posts.php', + 'PLL_Export_Data_From_Strings' => __DIR__ . '/../..' . '/src/services/exporter/export-data-from-strings.php', + 'PLL_Export_Download' => __DIR__ . '/../..' . '/src/modules/import-export/export/export-download.php', + 'PLL_Export_File' => __DIR__ . '/../..' . '/src/modules/import-export/export/export-file.php', + 'PLL_Export_Metas' => __DIR__ . '/../..' . '/src/services/exporter/export-metas.php', + 'PLL_Export_Post_Metas' => __DIR__ . '/../..' . '/src/services/exporter/export-post-metas.php', + 'PLL_Export_Posts' => __DIR__ . '/../..' . '/src/services/exporter/export-posts.php', + 'PLL_Export_Strings' => __DIR__ . '/../..' . '/src/services/exporter/export-strings.php', + 'PLL_Export_Strings_Action' => __DIR__ . '/../..' . '/src/modules/import-export/export/export-strings-action.php', + 'PLL_Export_Term_Metas' => __DIR__ . '/../..' . '/src/services/exporter/export-term-metas.php', + 'PLL_Export_Terms' => __DIR__ . '/../..' . '/src/services/exporter/export-terms.php', + 'PLL_Export_Translated_Objects' => __DIR__ . '/../..' . '/src/services/exporter/export-translated-objects.php', + 'PLL_FLBuilder' => __DIR__ . '/../..' . '/src/integrations/beaver-builder/flbuilder.php', + 'PLL_FSE_Abstract_Bulk_Edit_Template_Slugs_Module' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-abstract-bulk-edit-template-slugs-module.php', + 'PLL_FSE_Abstract_Module' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-abstract-module.php', + 'PLL_FSE_Default_Language_Change' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-default-language-change.php', + 'PLL_FSE_Filter_Block_Types' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-filter-block-types.php', + 'PLL_FSE_Language' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-language.php', + 'PLL_FSE_Language_Slug_Change' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-language-slug-change.php', + 'PLL_FSE_Post_Deletion' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-post-deletion.php', + 'PLL_FSE_Post_Types' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-post-types.php', + 'PLL_FSE_Query_Filters' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-query-filters.php', + 'PLL_FSE_REST_Duplicate_Template' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-rest-duplicate-template.php', + 'PLL_FSE_REST_Enforce_Default_Template' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-rest-enforce-default-template.php', + 'PLL_FSE_REST_Route' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-rest-route.php', + 'PLL_FSE_Recreate_Language' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-recreate-language.php', + 'PLL_FSE_Template_Model' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-template-model.php', + 'PLL_FSE_Template_Slug' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-template-slug.php', + 'PLL_FSE_Template_Slug_Sync' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-template-slug-sync.php', + 'PLL_FSE_Tools' => __DIR__ . '/../..' . '/src/modules/full-site-editing/fse-tools.php', + 'PLL_Featured_Content' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/jetpack/featured-content.php', + 'PLL_File_Format' => __DIR__ . '/../..' . '/src/modules/import-export/file-format/file-format.php', + 'PLL_File_Format_Factory' => __DIR__ . '/../..' . '/src/modules/import-export/file-format/file-format-factory.php', + 'PLL_Filter_REST_Routes' => __DIR__ . '/..' . '/wpsyntex/polylang/src/filter-rest-routes.php', + 'PLL_Filter_Template_Core_Taxonomy' => __DIR__ . '/../..' . '/src/modules/frontend-filter-template/filter-template-core-taxonomy.php', + 'PLL_Filter_Template_Custom_Taxonomy' => __DIR__ . '/../..' . '/src/modules/frontend-filter-template/filter-template-custom-taxonomy.php', + 'PLL_Filter_Template_Page' => __DIR__ . '/../..' . '/src/modules/frontend-filter-template/filter-template-page.php', + 'PLL_Filter_Template_Single' => __DIR__ . '/../..' . '/src/modules/frontend-filter-template/filter-template-single.php', + 'PLL_Filter_Templates' => __DIR__ . '/../..' . '/src/modules/frontend-filter-template/filter-templates.php', + 'PLL_Filters' => __DIR__ . '/..' . '/wpsyntex/polylang/src/filters.php', + 'PLL_Filters_Links' => __DIR__ . '/..' . '/wpsyntex/polylang/src/filters-links.php', + 'PLL_Filters_Sanitization' => __DIR__ . '/..' . '/wpsyntex/polylang/src/filters-sanitization.php', + 'PLL_Filters_Widgets_Options' => __DIR__ . '/..' . '/wpsyntex/polylang/src/filters-widgets-options.php', + 'PLL_Format_Util' => __DIR__ . '/..' . '/wpsyntex/polylang/src/format-util.php', + 'PLL_Frontend' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend.php', + 'PLL_Frontend_Auto_Translate' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend-auto-translate.php', + 'PLL_Frontend_Filters' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend-filters.php', + 'PLL_Frontend_Filters_Links' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend-filters-links.php', + 'PLL_Frontend_Filters_Search' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend-filters-search.php', + 'PLL_Frontend_Filters_Widgets' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend-filters-widgets.php', + 'PLL_Frontend_Links' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend-links.php', + 'PLL_Frontend_Nav_Menu' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend-nav-menu.php', + 'PLL_Frontend_Static_Pages' => __DIR__ . '/..' . '/wpsyntex/polylang/src/frontend/frontend-static-pages.php', + 'PLL_Frontend_Translate_Slugs' => __DIR__ . '/../..' . '/src/modules/translate-slugs/frontend-translate-slugs.php', + 'PLL_Import_Action' => __DIR__ . '/../..' . '/src/modules/import-export/import/import-action.php', + 'PLL_Import_Export' => __DIR__ . '/../..' . '/src/modules/import-export/import-export.php', + 'PLL_Import_File_Interface' => __DIR__ . '/../..' . '/src/modules/import-export/import/import-file-interface.php', + 'PLL_Import_Object_Interface' => __DIR__ . '/../..' . '/src/modules/import-export/import/import-object-interface.php', + 'PLL_Import_Posts' => __DIR__ . '/../..' . '/src/modules/import-export/import/import-posts.php', + 'PLL_Import_Strings' => __DIR__ . '/../..' . '/src/modules/import-export/import/import-strings.php', + 'PLL_Import_Terms' => __DIR__ . '/../..' . '/src/modules/import-export/import/import-terms.php', + 'PLL_Integrations' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/integrations.php', + 'PLL_Jetpack' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/jetpack/jetpack.php', + 'PLL_Language' => __DIR__ . '/..' . '/wpsyntex/polylang/src/language.php', + 'PLL_Language_Deprecated' => __DIR__ . '/..' . '/wpsyntex/polylang/src/language-deprecated.php', + 'PLL_Language_Factory' => __DIR__ . '/..' . '/wpsyntex/polylang/src/language-factory.php', + 'PLL_License' => __DIR__ . '/..' . '/wpsyntex/polylang/src/license.php', + 'PLL_Links' => __DIR__ . '/..' . '/wpsyntex/polylang/src/links.php', + 'PLL_Links_Abstract_Domain' => __DIR__ . '/..' . '/wpsyntex/polylang/src/links-abstract-domain.php', + 'PLL_Links_Default' => __DIR__ . '/..' . '/wpsyntex/polylang/src/links-default.php', + 'PLL_Links_Directory' => __DIR__ . '/..' . '/wpsyntex/polylang/src/links-directory.php', + 'PLL_Links_Domain' => __DIR__ . '/..' . '/wpsyntex/polylang/src/links-domain.php', + 'PLL_Links_Model' => __DIR__ . '/..' . '/wpsyntex/polylang/src/links-model.php', + 'PLL_Links_Permalinks' => __DIR__ . '/..' . '/wpsyntex/polylang/src/links-permalinks.php', + 'PLL_Links_Subdomain' => __DIR__ . '/..' . '/wpsyntex/polylang/src/links-subdomain.php', + 'PLL_Locale_Fallback' => __DIR__ . '/../..' . '/src/modules/locale-fallback/locale-fallback.php', + 'PLL_MO' => __DIR__ . '/..' . '/wpsyntex/polylang/src/mo.php', + 'PLL_Manage_User_Capabilities' => __DIR__ . '/../..' . '/src/services/manage-user-capabilities.php', + 'PLL_Media_Bulk_Option' => __DIR__ . '/../..' . '/src/modules/media/media-bulk-option.php', + 'PLL_Metabox_Button' => __DIR__ . '/../..' . '/src/services/metabox-button/metabox-button.php', + 'PLL_Metabox_User_Button' => __DIR__ . '/../..' . '/src/services/metabox-button/metabox-user-button.php', + 'PLL_Model' => __DIR__ . '/..' . '/wpsyntex/polylang/src/model.php', + 'PLL_Module_Interface' => __DIR__ . '/../..' . '/src/modules/module-interface.php', + 'PLL_Multilingual_Sitemaps_Provider' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sitemaps/multilingual-sitemaps-provider.php', + 'PLL_Nav_Menu' => __DIR__ . '/..' . '/wpsyntex/polylang/src/nav-menu.php', + 'PLL_No_Category_Base' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/no-category-base/no-category-base.php', + 'PLL_OLT_Manager' => __DIR__ . '/..' . '/wpsyntex/polylang/src/olt-manager.php', + 'PLL_PO_Export' => __DIR__ . '/../..' . '/src/modules/import-export/po/po-export.php', + 'PLL_PO_Format' => __DIR__ . '/../..' . '/src/modules/import-export/po/po-format.php', + 'PLL_PO_Import' => __DIR__ . '/../..' . '/src/modules/import-export/po/po-import.php', + 'PLL_Plugin_Updater' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/plugin-updater.php', + 'PLL_Pro' => __DIR__ . '/../..' . '/src/pro.php', + 'PLL_Query' => __DIR__ . '/..' . '/wpsyntex/polylang/src/query.php', + 'PLL_REST_API' => __DIR__ . '/../..' . '/src/modules/rest/rest-api.php', + 'PLL_REST_Request' => __DIR__ . '/..' . '/wpsyntex/polylang/src/rest-request.php', + 'PLL_Settings' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/settings.php', + 'PLL_Settings_Advanced_Media' => __DIR__ . '/../..' . '/src/modules/media/settings-advanced-media.php', + 'PLL_Settings_Browser' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/settings-browser.php', + 'PLL_Settings_CPT' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/settings-cpt.php', + 'PLL_Settings_Licenses' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/settings-licenses.php', + 'PLL_Settings_Media' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/settings-media.php', + 'PLL_Settings_Module' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/settings-module.php', + 'PLL_Settings_Preview_Machine_Translation' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/machine-translation/settings-preview-machine-translation.php', + 'PLL_Settings_Preview_Share_Slug' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/share-slug/settings-preview-share-slug.php', + 'PLL_Settings_Preview_Translate_Slugs' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/translate-slugs/settings-preview-translate-slugs.php', + 'PLL_Settings_Share_Slug' => __DIR__ . '/../..' . '/src/modules/share-slug/settings-share-slug.php', + 'PLL_Settings_Sync' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sync/settings-sync.php', + 'PLL_Settings_Translate_Slugs' => __DIR__ . '/../..' . '/src/modules/translate-slugs/settings-translate-slugs.php', + 'PLL_Settings_Url' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/settings-url.php', + 'PLL_Share_Post_Slug' => __DIR__ . '/../..' . '/src/modules/share-slug/share-post-slug.php', + 'PLL_Share_Term_Slug' => __DIR__ . '/../..' . '/src/modules/share-slug/share-term-slug.php', + 'PLL_Sitemaps' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sitemaps/sitemaps.php', + 'PLL_Sitemaps_Domain' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sitemaps/sitemaps-domain.php', + 'PLL_Static_Pages' => __DIR__ . '/..' . '/wpsyntex/polylang/src/static-pages.php', + 'PLL_Strings_Form_Trait' => __DIR__ . '/../..' . '/src/modules/import-export/export/strings-form-trait.php', + 'PLL_Switcher' => __DIR__ . '/..' . '/wpsyntex/polylang/src/switcher.php', + 'PLL_Sync' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sync/sync.php', + 'PLL_Sync_Block_Parsing_Rules' => __DIR__ . '/../..' . '/src/modules/sync/sync-block-parsing-rules.php', + 'PLL_Sync_Blocks' => __DIR__ . '/../..' . '/src/modules/sync/sync-blocks.php', + 'PLL_Sync_Content' => __DIR__ . '/../..' . '/src/modules/sync/sync-content.php', + 'PLL_Sync_HTML' => __DIR__ . '/../..' . '/src/modules/sync/sync-html.php', + 'PLL_Sync_Ids' => __DIR__ . '/../..' . '/src/modules/sync/sync-ids.php', + 'PLL_Sync_Metas' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sync/sync-metas.php', + 'PLL_Sync_Navigation' => __DIR__ . '/../..' . '/src/modules/sync/sync-navigation.php', + 'PLL_Sync_Post' => __DIR__ . '/../..' . '/src/modules/sync-post/sync-post.php', + 'PLL_Sync_Post_Bulk_Option' => __DIR__ . '/../..' . '/src/modules/sync-post/sync-post-bulk-option.php', + 'PLL_Sync_Post_Button' => __DIR__ . '/../..' . '/src/modules/sync-post/sync-post-button.php', + 'PLL_Sync_Post_Metas' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sync/sync-post-metas.php', + 'PLL_Sync_Post_Model' => __DIR__ . '/../..' . '/src/modules/sync-post/sync-post-model.php', + 'PLL_Sync_Post_REST' => __DIR__ . '/../..' . '/src/modules/sync-post/sync-post-rest.php', + 'PLL_Sync_Shortcodes' => __DIR__ . '/../..' . '/src/modules/sync/sync-shortcodes.php', + 'PLL_Sync_Tax' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sync/sync-tax.php', + 'PLL_Sync_Term_Metas' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/sync/sync-term-metas.php', + 'PLL_T15S' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/t15s.php', + 'PLL_TEC' => __DIR__ . '/../..' . '/src/integrations/events-calendar/tec.php', + 'PLL_Table_Languages' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/table-languages.php', + 'PLL_Table_Settings' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/table-settings.php', + 'PLL_Table_String' => __DIR__ . '/..' . '/wpsyntex/polylang/src/settings/table-string.php', + 'PLL_Term_Slug' => __DIR__ . '/..' . '/wpsyntex/polylang/src/term-slug.php', + 'PLL_Toggle_User_Button_REST' => __DIR__ . '/../..' . '/src/services/metabox-button/toggle-user-button-rest.php', + 'PLL_Toggle_User_Meta' => __DIR__ . '/../..' . '/src/services/metabox-button/toggle-user-meta.php', + 'PLL_Translatable_Object' => __DIR__ . '/..' . '/wpsyntex/polylang/src/translatable-object.php', + 'PLL_Translatable_Object_With_Types_Interface' => __DIR__ . '/..' . '/wpsyntex/polylang/src/translatable-object-with-types-interface.php', + 'PLL_Translatable_Object_With_Types_Trait' => __DIR__ . '/..' . '/wpsyntex/polylang/src/translatable-object-with-types-trait.php', + 'PLL_Translatable_Objects' => __DIR__ . '/..' . '/wpsyntex/polylang/src/translatable-objects.php', + 'PLL_Translate_Option' => __DIR__ . '/..' . '/wpsyntex/polylang/src/translate-option.php', + 'PLL_Translate_Slugs' => __DIR__ . '/../..' . '/src/modules/translate-slugs/translate-slugs.php', + 'PLL_Translate_Slugs_Model' => __DIR__ . '/../..' . '/src/modules/translate-slugs/translate-slugs-model.php', + 'PLL_Translated_Object' => __DIR__ . '/..' . '/wpsyntex/polylang/src/translated-object.php', + 'PLL_Translated_Post' => __DIR__ . '/..' . '/wpsyntex/polylang/src/translated-post.php', + 'PLL_Translated_Term' => __DIR__ . '/..' . '/wpsyntex/polylang/src/translated-term.php', + 'PLL_Translation_Block_Parsing_Rules' => __DIR__ . '/../..' . '/src/services/translation/translation-block-parsing-rules.php', + 'PLL_Translation_Content' => __DIR__ . '/../..' . '/src/services/translation/translation-content.php', + 'PLL_Translation_Data_Model_Interface' => __DIR__ . '/../..' . '/src/services/translation/translation-data-model-interface.php', + 'PLL_Translation_Metas' => __DIR__ . '/../..' . '/src/services/translation/translation-metas.php', + 'PLL_Translation_Object_Model_Trait' => __DIR__ . '/../..' . '/src/services/translation/translation-object-model-trait.php', + 'PLL_Translation_Post_Metas' => __DIR__ . '/../..' . '/src/services/translation/translation-post-metas.php', + 'PLL_Translation_Post_Model' => __DIR__ . '/../..' . '/src/services/translation/translation-post-model.php', + 'PLL_Translation_Strings_Model' => __DIR__ . '/../..' . '/src/services/translation/translation-strings-model.php', + 'PLL_Translation_Term_Metas' => __DIR__ . '/../..' . '/src/services/translation/translation-term-metas.php', + 'PLL_Translation_Term_Model' => __DIR__ . '/../..' . '/src/services/translation/translation-term-model.php', + 'PLL_Translation_Walker_Blocks' => __DIR__ . '/../..' . '/src/services/translation/translation-walker-blocks.php', + 'PLL_Translation_Walker_Classic' => __DIR__ . '/../..' . '/src/services/translation/translation-walker-classic.php', + 'PLL_Translation_Walker_Factory' => __DIR__ . '/../..' . '/src/services/translation/translation-walker-factory.php', + 'PLL_Translation_Walker_Interface' => __DIR__ . '/../..' . '/src/services/translation/translation-walker-interface.php', + 'PLL_Twenty_Seventeen' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/twenty-seventeen/twenty-seven-teen.php', + 'PLL_Upgrade' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/upgrade.php', + 'PLL_Usable' => __DIR__ . '/..' . '/wpsyntex/polylang/src/install/usable.php', + 'PLL_WPML_API' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/wpml/wpml-api.php', + 'PLL_WPML_Compat' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/wpml/wpml-compat.php', + 'PLL_WPML_Config' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/wpml/wpml-config.php', + 'PLL_WPSEO' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/wpseo/wpseo.php', + 'PLL_WPSEO_OGP' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/wpseo/wpseo-ogp.php', + 'PLL_WP_Import' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/wp-importer/wp-import.php', + 'PLL_WP_Sweep' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/wp-sweep/wp-sweep.php', + 'PLL_Walker' => __DIR__ . '/..' . '/wpsyntex/polylang/src/walker.php', + 'PLL_Walker_Dropdown' => __DIR__ . '/..' . '/wpsyntex/polylang/src/walker-dropdown.php', + 'PLL_Walker_List' => __DIR__ . '/..' . '/wpsyntex/polylang/src/walker-list.php', + 'PLL_Widget_Calendar' => __DIR__ . '/..' . '/wpsyntex/polylang/src/widget-calendar.php', + 'PLL_Widget_Languages' => __DIR__ . '/..' . '/wpsyntex/polylang/src/widget-languages.php', + 'PLL_Wizard' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/wizard/wizard.php', + 'PLL_Wizard_Pro' => __DIR__ . '/../..' . '/src/modules/wizard/wizard-pro.php', + 'PLL_WordPress_Importer' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/wp-importer/wordpress-importer.php', + 'PLL_Xdata_Base' => __DIR__ . '/../..' . '/src/modules/xdata/xdata-base.php', + 'PLL_Xdata_Domain' => __DIR__ . '/../..' . '/src/modules/xdata/xdata-domain.php', + 'PLL_Xdata_Session_Manager' => __DIR__ . '/../..' . '/src/modules/xdata/xdata-session-manager.php', + 'PLL_Xdata_Subdomain' => __DIR__ . '/../..' . '/src/modules/xdata/xdata-subdomain.php', + 'PLL_Xliff_Export_12' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/export/xliff-export-12.php', + 'PLL_Xliff_Export_20' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/export/xliff-export-20.php', + 'PLL_Xliff_Export_21' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/export/xliff-export-21.php', + 'PLL_Xliff_Export_Base' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/export/xliff-export-base.php', + 'PLL_Xliff_Format' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/xliff-format.php', + 'PLL_Xliff_Import' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/xliff-import.php', + 'PLL_Xliff_Import_Parser_12' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/xliff-import-parser-12.php', + 'PLL_Xliff_Import_Parser_21' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/xliff-import-parser-21.php', + 'PLL_Xliff_Import_Parser_Base' => __DIR__ . '/../..' . '/src/modules/import-export/xliff/xliff-import-parser-base.php', + 'PLL_Yarpp' => __DIR__ . '/..' . '/wpsyntex/polylang/src/integrations/yarpp/yarpp.php', + 'Polylang' => __DIR__ . '/..' . '/wpsyntex/polylang/src/class-polylang.php', + 'WP_Syntex\\Polylang\\Blocks\\Language_Switcher\\Abstract_Block' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Abstract_Block.php', + 'WP_Syntex\\Polylang\\Blocks\\Language_Switcher\\Navigation\\Block' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/Block.php', + 'WP_Syntex\\Polylang\\Blocks\\Language_Switcher\\Standard\\Block' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/Block.php', + 'WP_Syntex\\Polylang\\Capabilities\\Capabilities' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Capabilities/Capabilities.php', + 'WP_Syntex\\Polylang\\Capabilities\\Create\\Abstract_Object' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Capabilities/Create/Abstract_Object.php', + 'WP_Syntex\\Polylang\\Capabilities\\Create\\Post' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Capabilities/Create/Post.php', + 'WP_Syntex\\Polylang\\Capabilities\\Create\\Term' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Capabilities/Create/Term.php', + 'WP_Syntex\\Polylang\\Capabilities\\User\\Creator' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Capabilities/User/Creator.php', + 'WP_Syntex\\Polylang\\Capabilities\\User\\Creator_Interface' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Capabilities/User/Creator_Interface.php', + 'WP_Syntex\\Polylang\\Capabilities\\User\\NOOP' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Capabilities/User/NOOP.php', + 'WP_Syntex\\Polylang\\Capabilities\\User\\User_Interface' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Capabilities/User/User_Interface.php', + 'WP_Syntex\\Polylang\\Model\\Hide_Default' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Model/Hide_Default.php', + 'WP_Syntex\\Polylang\\Model\\Hide_Empty' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Model/Hide_Empty.php', + 'WP_Syntex\\Polylang\\Model\\Languages' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Model/Languages.php', + 'WP_Syntex\\Polylang\\Model\\Languages_Proxies' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Model/Languages_Proxies.php', + 'WP_Syntex\\Polylang\\Model\\Languages_Proxy_Interface' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Model/Languages_Proxy_Interface.php', + 'WP_Syntex\\Polylang\\Model\\Post_Types' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Model/Post_Types.php', + 'WP_Syntex\\Polylang\\Model\\Taxonomies' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Model/Taxonomies.php', + 'WP_Syntex\\Polylang\\Options\\Abstract_Option' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Abstract_Option.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Abstract_Object_Types' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Abstract_Object_Types.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Browser' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Browser.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Default_Lang' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Default_Lang.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Domains' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Domains.php', + 'WP_Syntex\\Polylang\\Options\\Business\\First_Activation' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/First_Activation.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Force_Lang' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Force_Lang.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Hide_Default' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Hide_Default.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Media_Support' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Media_Support.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Nav_Menus' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Nav_Menus.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Post_Types' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Post_Types.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Previous_Version' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Previous_Version.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Redirect_Lang' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Redirect_Lang.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Rewrite' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Rewrite.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Sync' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Sync.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Taxonomies' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Taxonomies.php', + 'WP_Syntex\\Polylang\\Options\\Business\\Version' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Business/Version.php', + 'WP_Syntex\\Polylang\\Options\\Inactive_Option' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Inactive_Option.php', + 'WP_Syntex\\Polylang\\Options\\Options' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Options.php', + 'WP_Syntex\\Polylang\\Options\\Primitive\\Abstract_Boolean' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Primitive/Abstract_Boolean.php', + 'WP_Syntex\\Polylang\\Options\\Primitive\\Abstract_List' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Primitive/Abstract_List.php', + 'WP_Syntex\\Polylang\\Options\\Primitive\\Abstract_Map' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Primitive/Abstract_Map.php', + 'WP_Syntex\\Polylang\\Options\\Primitive\\Abstract_String' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Primitive/Abstract_String.php', + 'WP_Syntex\\Polylang\\Options\\Registry' => __DIR__ . '/..' . '/wpsyntex/polylang/src/Options/Registry.php', + 'WP_Syntex\\Polylang\\REST\\API' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/REST/API.php', + 'WP_Syntex\\Polylang\\REST\\Abstract_Controller' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/REST/Abstract_Controller.php', + 'WP_Syntex\\Polylang\\REST\\Request' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/REST/Request.php', + 'WP_Syntex\\Polylang\\REST\\V1\\Languages' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/REST/V1/Languages.php', + 'WP_Syntex\\Polylang\\REST\\V1\\Settings' => __DIR__ . '/..' . '/wpsyntex/polylang/src/modules/REST/V1/Settings.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Filter_Preload_Paths' => __DIR__ . '/../..' . '/src/modules/Editors/Filter_Preload_Paths.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Screens\\Abstract_Screen' => __DIR__ . '/../..' . '/src/modules/Editors/Screens/Abstract_Screen.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Screens\\Post' => __DIR__ . '/../..' . '/src/modules/Editors/Screens/Post.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Screens\\Site' => __DIR__ . '/../..' . '/src/modules/Editors/Screens/Site.php', + 'WP_Syntex\\Polylang_Pro\\Editors\\Screens\\Widget' => __DIR__ . '/../..' . '/src/modules/Editors/Screens/Widget.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Deactivate' => __DIR__ . '/../..' . '/src/integrations/ACF/Deactivate.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Dispatcher' => __DIR__ . '/../..' . '/src/integrations/ACF/Dispatcher.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Abstract_Object' => __DIR__ . '/../..' . '/src/integrations/ACF/Entity/Abstract_Object.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Blocks' => __DIR__ . '/../..' . '/src/integrations/ACF/Entity/Blocks.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Media' => __DIR__ . '/../..' . '/src/integrations/ACF/Entity/Media.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Post' => __DIR__ . '/../..' . '/src/integrations/ACF/Entity/Post.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Term' => __DIR__ . '/../..' . '/src/integrations/ACF/Entity/Term.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Entity\\Translatable_Entity_Interface' => __DIR__ . '/../..' . '/src/integrations/ACF/Entity/Translatable_Entity_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Field_Settings' => __DIR__ . '/../..' . '/src/integrations/ACF/Field_Settings.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Fields\\Repeater' => __DIR__ . '/../..' . '/src/integrations/ACF/Fields/Repeater.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Labels\\Abstract_Object_Type' => __DIR__ . '/../..' . '/src/integrations/ACF/Labels/Abstract_Object_Type.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Labels\\Field_Groups' => __DIR__ . '/../..' . '/src/integrations/ACF/Labels/Field_Groups.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Labels\\Post_Type' => __DIR__ . '/../..' . '/src/integrations/ACF/Labels/Post_Type.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Labels\\Taxonomy' => __DIR__ . '/../..' . '/src/integrations/ACF/Labels/Taxonomy.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Location_Language' => __DIR__ . '/../..' . '/src/integrations/ACF/Location_Language.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Main' => __DIR__ . '/../..' . '/src/integrations/ACF/Main.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Abstract_Collect_Ids' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Abstract_Collect_Ids.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Abstract_Strategy' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Abstract_Strategy.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Collect_Post_Ids' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Collect_Post_Ids.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Collect_Term_Ids' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Collect_Term_Ids.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Copy' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Copy.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Copy_All' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Copy_All.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Export' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Export.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Import' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Import.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Strategy\\Synchronize' => __DIR__ . '/../..' . '/src/integrations/ACF/Strategy/Synchronize.php', + 'WP_Syntex\\Polylang_Pro\\Integrations\\ACF\\Translation_Instructions' => __DIR__ . '/../..' . '/src/integrations/ACF/Translation_Instructions.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Active_Languages\\Languages_Proxy' => __DIR__ . '/../..' . '/src/modules/active-languages/Languages_Proxy.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Command\\Language' => __DIR__ . '/../..' . '/src/modules/CLI/Command/Language.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Command\\Setting' => __DIR__ . '/../..' . '/src/modules/CLI/Command/Setting.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Command\\Setting_Adapter' => __DIR__ . '/../..' . '/src/modules/CLI/Command/Setting_Adapter.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Commands' => __DIR__ . '/../..' . '/src/modules/CLI/Commands.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\CLI\\Formatter' => __DIR__ . '/../..' . '/src/modules/CLI/Formatter.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Advanced_Capabilities' => __DIR__ . '/../..' . '/src/modules/Capabilities/Advanced_Capabilities.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Create\\Post' => __DIR__ . '/../..' . '/src/modules/Capabilities/Create/Post.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Create\\Term' => __DIR__ . '/../..' . '/src/modules/Capabilities/Create/Term.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Languages_Proxy' => __DIR__ . '/../..' . '/src/modules/Capabilities/Languages_Proxy.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Abstract_Mapper' => __DIR__ . '/../..' . '/src/modules/Capabilities/Mapper/Abstract_Mapper.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Do_Not_Allow' => __DIR__ . '/../..' . '/src/modules/Capabilities/Mapper/Do_Not_Allow.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Internal' => __DIR__ . '/../..' . '/src/modules/Capabilities/Mapper/Internal.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Machine_Translation' => __DIR__ . '/../..' . '/src/modules/Capabilities/Mapper/Machine_Translation.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Post' => __DIR__ . '/../..' . '/src/modules/Capabilities/Mapper/Post.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\Mapper\\Term' => __DIR__ . '/../..' . '/src/modules/Capabilities/Mapper/Term.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\User\\Creator' => __DIR__ . '/../..' . '/src/modules/Capabilities/User/Creator.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Capabilities\\User\\Translator' => __DIR__ . '/../..' . '/src/modules/Capabilities/User/Translator.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Import_Export\\Services\\Context' => __DIR__ . '/../..' . '/src/services/context.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Clients\\Client_Interface' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Clients/Client_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Clients\\Deepl' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Clients/Deepl.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Data' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Data.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Factory' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Factory.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Module_Settings' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Module_Settings.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Posts\\Action' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Posts/Action.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Posts\\Button' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Posts/Button.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Posts\\Button_REST' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Posts/Button_REST.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Processor' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Processor.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Services\\Deepl' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Services/Deepl.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Services\\Service_Interface' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Services/Service_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Settings\\Deepl' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Settings/Deepl.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Settings\\Settings_Interface' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Settings/Settings_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Strings\\Action' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Strings/Action.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Machine_Translation\\Strings\\Metabox' => __DIR__ . '/../..' . '/src/modules/Machine_Translation/Strings/Metabox.php', + 'WP_Syntex\\Polylang_Pro\\Modules\\Site_Health\\Info' => __DIR__ . '/../..' . '/src/modules/Site_Health/Info.php', + 'WP_Syntex\\Polylang_Pro\\Options\\Business\\Machine_Translation_Enabled' => __DIR__ . '/../..' . '/src/Options/Business/Machine_Translation_Enabled.php', + 'WP_Syntex\\Polylang_Pro\\Options\\Business\\Machine_Translation_Services' => __DIR__ . '/../..' . '/src/Options/Business/Machine_Translation_Services.php', + 'WP_Syntex\\Polylang_Pro\\Options\\Business\\Media' => __DIR__ . '/../..' . '/src/Options/Business/Media.php', + 'WP_Syntex\\Polylang_Pro\\Options\\Registry' => __DIR__ . '/../..' . '/src/Options/Registry.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Abstract_Object' => __DIR__ . '/../..' . '/src/modules/rest/Filtered/Abstract_Object.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Comment' => __DIR__ . '/../..' . '/src/modules/rest/Filtered/Comment.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Post' => __DIR__ . '/../..' . '/src/modules/rest/Filtered/Post.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Template' => __DIR__ . '/../..' . '/src/modules/rest/Filtered/Template.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Filtered\\Term' => __DIR__ . '/../..' . '/src/modules/rest/Filtered/Term.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translatable\\Abstract_Object' => __DIR__ . '/../..' . '/src/modules/rest/Translatable/Abstract_object.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Abstract_Object' => __DIR__ . '/../..' . '/src/modules/rest/Translated/Abstract_Object.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Attachment' => __DIR__ . '/../..' . '/src/modules/rest/Translated/Attachment.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Post' => __DIR__ . '/../..' . '/src/modules/rest/Translated/Post.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Template' => __DIR__ . '/../..' . '/src/modules/rest/Translated/Template.php', + 'WP_Syntex\\Polylang_Pro\\REST\\Translated\\Term' => __DIR__ . '/../..' . '/src/modules/rest/Translated/Term.php', + 'WP_Syntex\\Polylang_Pro\\REST\\V1\\Translation' => __DIR__ . '/../..' . '/src/modules/rest/V1/Translation.php', + 'WP_Syntex\\Polylang_Pro\\REST\\V1\\Untranslated_Posts' => __DIR__ . '/../..' . '/src/modules/rest/V1/Untranslated_Posts.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Base64_Encoding' => __DIR__ . '/../..' . '/src/services/Encoding/Base64_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Data_Encoder_Interface' => __DIR__ . '/../..' . '/src/services/Encoding/Data_Encoder_Interface.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Data_Encoding' => __DIR__ . '/../..' . '/src/services/Encoding/Data_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Json_Encoding' => __DIR__ . '/../..' . '/src/services/Encoding/Json_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Serialize_Encoding' => __DIR__ . '/../..' . '/src/services/Encoding/Serialize_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Services\\Encoding\\Url_Encoding' => __DIR__ . '/../..' . '/src/services/Encoding/Url_Encoding.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Common_Trait' => __DIR__ . '/../..' . '/dependencies/wpsyntex/updater/src/Common_Trait.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\EDD_SL_Plugin_Updater' => __DIR__ . '/../..' . '/dependencies/wpsyntex/updater/src/EDD_SL_Plugin_Updater.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\License' => __DIR__ . '/../..' . '/dependencies/wpsyntex/updater/src/License.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Settings' => __DIR__ . '/../..' . '/dependencies/wpsyntex/updater/src/Settings.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Translations' => __DIR__ . '/../..' . '/dependencies/wpsyntex/updater/src/Translations.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Updater' => __DIR__ . '/../..' . '/dependencies/wpsyntex/updater/src/Updater.php', + 'WP_Syntex\\Polylang_Pro\\Updater\\Wizard_Licenses_Step' => __DIR__ . '/../..' . '/dependencies/wpsyntex/updater/src/Wizard_Licenses_Step.php', + 'WP_Syntex\\Polylang_Pro\\Upgrade' => __DIR__ . '/../..' . '/src/upgrade.php', + 'WP_Syntex\\Polylang_Pro\\Widget_Blocks\\Frontend_Filters' => __DIR__ . '/../..' . '/src/modules/Widget_Blocks/Frontend_Filters.php', + 'WP_Syntex\\Polylang_Pro\\Widget_Blocks\\Language_Attribute' => __DIR__ . '/../..' . '/src/modules/Widget_Blocks/Language_Attribute.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInitdaca4db56c8b0ec113324cf7a6b8bdc7::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitdaca4db56c8b0ec113324cf7a6b8bdc7::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitdaca4db56c8b0ec113324cf7a6b8bdc7::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/composer/installed.json b/wp-content/plugins/polylang-pro/vendor/composer/installed.json new file mode 100644 index 0000000..986b348 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/installed.json @@ -0,0 +1,148 @@ +{ + "packages": [ + { + "name": "wpsyntex/polylang", + "version": "3.8.x-dev", + "version_normalized": "3.8.9999999.9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/polylang/polylang.git", + "reference": "8d95a90ecf518633ee55beefac3ea60acda0c156" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/polylang/polylang/zipball/8d95a90ecf518633ee55beefac3ea60acda0c156", + "reference": "8d95a90ecf518633ee55beefac3ea60acda0c156", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "automattic/vipwpcs": "*", + "dealerdirect/phpcodesniffer-composer-installer": "*", + "phpcompatibility/phpcompatibility-wp": "^3", + "rector/rector": "^2", + "wp-coding-standards/wpcs": "^3", + "wpsyntex/object-cache-annihilator": "dev-master", + "wpsyntex/polylang-phpstan": "^2.0", + "wpsyntex/wp-phpunit": "dev-master", + "yoast/wp-test-utils": "^1.0.0" + }, + "time": "2026-04-27T13:46:13+00:00", + "type": "wordpress-plugin", + "installation-source": "dist", + "autoload": { + "psr-4": { + "WP_Syntex\\Polylang\\Script\\": "bin/" + }, + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "description": "Making WordPress multilingual.", + "homepage": "https://polylang.pro", + "support": { + "issues": "https://github.com/polylang/polylang/issues", + "source": "https://github.com/polylang/polylang/tree/3.8.x" + }, + "install-path": "../wpsyntex/polylang" + }, + { + "name": "wpsyntex/updater", + "version": "1.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "git@github.com:polylang/updater.git", + "reference": "116ba24b44bc5661991385df372480e07c4a6d5a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/polylang/updater/zipball/116ba24b44bc5661991385df372480e07c4a6d5a", + "reference": "116ba24b44bc5661991385df372480e07c4a6d5a", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "automattic/vipwpcs": "*", + "composer/composer": "*", + "dealerdirect/phpcodesniffer-composer-installer": "*", + "phpcompatibility/phpcompatibility-wp": "*", + "rector/rector": "^1.1", + "wp-coding-standards/wpcs": "*", + "wpsyntex/polylang-phpstan": "^1.2", + "wpsyntex/polylang-stubs": "dev-master", + "wpsyntex/wp-phpunit": "dev-master", + "yoast/wp-test-utils": "^1.0.0" + }, + "time": "2026-02-12T16:15:20+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "WP_Syntex\\Lib\\": "lib/" + } + }, + "autoload-dev": { + "classmap": [ + "tests/phpunit" + ], + "psr-4": { + "UPDATER_NAMESPACE\\": "src/" + } + }, + "scripts": { + "install-suite": [ + "bash vendor/wpsyntex/wp-phpunit/bin/install-wp-suite.sh" + ], + "install-suite-with-db": [ + "bash vendor/wpsyntex/wp-phpunit/bin/install-wp-suite.sh latest true" + ], + "install-tests": [ + "@install-suite" + ], + "install-tests-with-db": [ + "@install-suite-with-db" + ], + "test": [ + "vendor/bin/phpunit" + ], + "cs": [ + "vendor/bin/phpcs" + ], + "stan": [ + "vendor/bin/phpstan analyze --memory-limit=512M" + ], + "rector-dry": [ + "vendor/bin/rector process --dry-run" + ], + "lint": [ + "@cs", + "@stan", + "@rector-dry" + ], + "rector": [ + "vendor/bin/rector process" + ] + }, + "license": [ + "GPL-3.0-or-later" + ], + "description": "Library to manage licenses and update plugins and translations", + "homepage": "https://polylang.pro", + "support": { + "source": "https://github.com/polylang/updater/tree/1.0" + }, + "install-path": "../wpsyntex/updater" + } + ], + "dev": false, + "dev-package-names": [] +} diff --git a/wp-content/plugins/polylang-pro/vendor/composer/installed.php b/wp-content/plugins/polylang-pro/vendor/composer/installed.php new file mode 100644 index 0000000..d54d3de --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/installed.php @@ -0,0 +1,41 @@ + array( + 'name' => 'wpsyntex/polylang-pro', + 'pretty_version' => '3.8.x-dev', + 'version' => '3.8.9999999.9999999-dev', + 'reference' => '00842fa9a235a363c0a9340626563a8311a86b07', + 'type' => 'wordpress-plugin', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => false, + ), + 'versions' => array( + 'wpsyntex/polylang' => array( + 'pretty_version' => '3.8.x-dev', + 'version' => '3.8.9999999.9999999-dev', + 'reference' => '8d95a90ecf518633ee55beefac3ea60acda0c156', + 'type' => 'wordpress-plugin', + 'install_path' => __DIR__ . '/../wpsyntex/polylang', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'wpsyntex/polylang-pro' => array( + 'pretty_version' => '3.8.x-dev', + 'version' => '3.8.9999999.9999999-dev', + 'reference' => '00842fa9a235a363c0a9340626563a8311a86b07', + 'type' => 'wordpress-plugin', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'wpsyntex/updater' => array( + 'pretty_version' => '1.0', + 'version' => '1.0.0.0', + 'reference' => '116ba24b44bc5661991385df372480e07c4a6d5a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../wpsyntex/updater', + 'aliases' => array(), + 'dev_requirement' => false, + ), + ), +); diff --git a/wp-content/plugins/polylang-pro/vendor/composer/platform_check.php b/wp-content/plugins/polylang-pro/vendor/composer/platform_check.php new file mode 100644 index 0000000..580fa96 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70400)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/LICENSE b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/changelog.txt b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/changelog.txt new file mode 100644 index 0000000..d6e4452 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/changelog.txt @@ -0,0 +1,2510 @@ +== Changelog == + +This file contains only old changelog. See readme.txt for newer versions. + += 3.7.8 (2026-02-23) = + +* Pro: Add 'pll_create_post_translation' filter #2890 +* Pro: Fix ACF's layout fields instructions #2889 + += 3.7.7 (2026-01-26) = + +* Pro: Add DeepL support for 70 new languages. #1793 #2871 +* Fix advanced menu properties not displayed in customizer. Props Viktor Szépe. #1722 +* Fix incorrect slug when changing the language of a term. #1790 + += 3.7.6 (2026-01-06) = + +* Pro: Add support for WP 6.9 new blocks #2790 +* Pro: Fix insertion of navigation language switcher block in WP 6.9 #2847 +* Pro: Fix current post URL in site editor for WP 6.8+ #2843 +* Pro: Fix a conflict with Sensei LMS #2845 +* Fix categories not filtered per post language in quick edit #1785 + += 3.7.5 (2025-11-10) = + +* Pro: Updated DeepL supported languages list +* Pro: Fix a regression in cross domain login +* Pro: Fix post object field not correctly translated +* Pro: Fix a fatal error in EDD plugin updater when the request to the server fails +* Pro: Fix locale fallback in WP 6.8+ +* Pro: Add `pll_enable_acf_labels_translation` filter allowing to disable the translation of ACF labels +* Pro: Fix ACF image field not correctly translated when media translation is active +* Pro: Fix ACF image field in repeater not copied +* Pro: Fix ACF ajax request unexpectedly filtered by language when editing a field group +* Pro: Fix ACF blocks not translated when included inside a non-ACF block +* Pro: Add compatibility of the duplicate tool with Divi +* Fix Undefined array key "terms" in canonical.php #1691 +* Fix some regressions in the WPML API used by YITH WooCommerce Wishlist #1684 +* Fix LinkedIn site title preview with Yoast SEO #1686 +* Fix HTML language attribute on login page #1601 +* Fix conflict with WP Job Manager Application #1749 + += 3.7.4 (2025-10-28) = + +* Pro: Security: Fix a ReDoS vulnerability reported by Janine Moreira. +* Security: Fix deserialization of untrusted data reported by Phat RiO – BlueRock via Patchstack. + += 3.7.3 (2025-06-16) = + +* Pro: Always display ACF translation settings for field groups formerly translated in versions older than 3.7 +* Pro: Fix translation displayed in child fields of ACF layout fields when they should not +* Pro: Fix translation of the ACF field "Choice" when the translation is set to "Copy once" or "Synchronize" +* Pro: Fix a PHP warning when translating some blocks +* Pro: Fix impossibility to change the language of an empty post in the block editor +* Fix duplicate values in options #1672 +* Fix JS error in media library (grid view) #1674 +* Fix language dropdown not present in the media modal accessible from the media library grid view #1675 +* Fix DB error introduce by WooCommerce 9.9 #1681 + += 3.7.2 (2025-05-27) = + +* Pro: Require ACF 6.0+ to activate the integration to avoid fatal errors with older versions +* Pro: Add a new ACF field group setting to decide if translations instructions must be displayed +* Pro: Fix a fatal error when using ACF blocks with ACF < 6.3.0 +* Pro: Fix regression preventing to translate Oembed, URL and Email ACF fields +* Pro: Fix ACF fields not translated when they have a default value +* Pro: Fix empty ACF fields values not copied when the field has a default value +* Pro: Fix ACF field default values not translated when copying a post +* Pro: Fix possible fatal error if invalid types of data are sent for machine translation +* Pro: Fix term meta removed when a term is machine translated +* Fix nav menu locations not saved if invalid data are stored in database #1659 +* Fix parent relationship removed when a new translated term is created without parent #1671 + += 3.7.1 (2025-05-05) = + +* Pro: Do not display ACF fields translations settings when language location is set. +* Pro: Fix ACF taxonomy field terms not synchronized when "Save Terms" and "load terms" settings are activated. +* Pro: Fix duplicate options when using numeric keys for ACF choice fields. + += 3.7 (2025-04-22) = + +* Requires PHP 7.2 as minimum version +* Pro: Add DeepL machine translation for strings +* Pro: Consider Polylang Pro as equivalent to Polylang for plugin dependencies +* Pro: Add the details block and several labels in other blocks to XLIFF files and machine translation +* Pro: Allow to translate metas stored as objects +* Pro: Enhanced multilingual support of archive template hierarchy +* Pro: Wrap the language switcher block in a nav tag +* Pro: Support automatic IDs translation in blocks with new filters `pll_sync_block_rules_for_attributes` and `pll_sync_blocks_xpath_rules` +* Pro: Complete rewrite of ACF integration +* Pro: Add support for ACF blocks, post types and taxonomies. +* Pro: Remove the possibility to translate ACF field groups +* Pro: Add languages in ACF locations +* Pro: Add translation of ACF labels in the strings translations page +* Pro: Fix incorrect count of translated strings when importing strings translations +* Pro: Fix incorrect translation when an XLIFF import updates a term sharing its slug +* Pro: Fix term hierarchy with machine translation +* Pro: Fix indented items of a list block not translated with machine translation +* Pro: Fix navigation block inserted in the wrong language +* Update plugin updater to 1.9.4 +* Add translation of widgets custom html in strings translations #1423 +* Refactor core to manage the plugin options in an object #1451 +* Refactor core to give access to languages management in all contexts #1503 +* Remove the language set from the content option for new installs #1517 +* Allow numbers in language codes #1546 +* Display empty fields in the translations table for untranslated strings (instead of duplicating the original) #1574 +* Add REST API endpoints to manage options and languages #1505 #1569 +* Improve performance by registering the language taxonomy only once #1359 +* Add new API functions to insert and update posts and terms in a given language #1500 #1520 +* Add compatibility with jQuery 4 (planned in core for WP 6.8) #1612 +* Fix translations not loaded when the language is set from the content #1395 +* Fix possible term duplication #1490 +* Fix sanitization of translated options that may impact other strings #1571 +* Fix home link block not translated #1647 +* Fix a conflict with WooCommerce Price Based on Country #1638 + += 3.6.7 (2025-03-11) = + +* Pro: Security: Fix private content disclosure. +* Fix links wrongly removed in notices #1627 +* Fix all categories assigned when the default category is missing #1617 + += 3.6.6 (2025-01-13) = + +* Pro: Fix character encoding in the autocomplete field in the block editor languages panel +* Pro: Fix navigation language switcher block allowing a dropdown to hide the current language +* Pro: Fix translation of Media and text block when the media is shown on right +* Pro: Fix translation of the Cover block when fixed background is enabled +* Fix redirect of translated attachment page when attachment pages are disabled #1605 + += 3.6.5 (2024-11-05) = + +* Add compatibility with WP 6.7 +* Pro: Prevent infinite loop when the locale fallbacks reference each other +* Pro: Set canResegment attribute to no in XLIFF files +* Fix empty notice displayed if the plugin upgrade notice is set but empty + += 3.6.4 (2024-07-29) = + +* Pro: Fix infinite loop with WP 6.6 when the locale fallbacks include the main locale of a language +* Pro: Prevent saving the main locale among the locale fallbacks of a language +* Pro: Hide the characters consumption graph when the DeepL cost control is deactivated +* Add Yoast SEO social title and social description to the strings translations +* Fix incorrect page on front and page for posts translations when the option is saved with admin language filter active + += 3.6.3 (2024-06-18) = + +* Pro: Fix locale fallback for translations loaded just in time (requires WP 6.6) +* Allow to pass an array as context to icl_register_string() #1497 +* Fix admin bar search menu in WP 6.6 #1496 +* Fix a regression in the usage of the filter pll_flag #1489 + += 3.6.2 (2024-06-03) = + +* Pro: Fix XLIFF files not correctly imported when exported from older version than 3.6 +* Pro: Fix translated categories not assigned to translated post when using machine translation +* Pro: Fix 'lang' param not applied for secondary queries during a REST request +* Pro: Fix newlines for content edited in classic editor and translated with DeepL +* Pro: Fix a conflict with the Stream plugin on multisite + += 3.6.1 (2024-04-09) = + +* Pro: Fix ACF fields not shown after a post was translated with DeepL +* Remove rewrite when registering the language taxonomy #1457 +* Fix search block not filtered when displayed as button only #1459 +* Fix current language not kept when using switch_to_blog() in multisite #1458 + += 3.6 (2024-03-18) = + +* Requires WP 6.2 as minimum version +* Add compatibility with WP 6.5 +* Pro: Add DeepL machine translation for posts +* Pro: Add export and import in XLIFF 2.0/2.1 formats +* Pro: Improve translator comments in exported PO files +* Pro: Allow to export JSON encoded post and term metas in XLIFF files +* Pro: Allow to export block sub-attributes in XLIFF files +* Pro: Add footer notes block to XLIFF files +* Pro: Single files are now exported directly instead of inside a zip +* Pro: Reworked the language switcher navigation block +* Pro: Fix language switcher navigation block justification not aligned with core settings in overlay menu (requires WP 6.5) +* Pro: Fix a race condition which could lead to display a notice to the wrong user +* Pro: Fix a conflict with ACF when rewrite rules are flushed with WP-CLI on a multisite +* Pro: Fix import of several metas with same sources but different translations +* Add filter `pll_cookie_args` to filter the Polylang cookie arguments #1406 +* Fix wrong translated post types and taxononies after a `switch_to_blog()` #1415 +* Fix a minor performance issue for the page for posts #1412 +* Fix a JS errors after quick edit. Props @mcguffin #1435, #1444 +* Fix a possible warning in view-translations-post.php #1439 + += 3.5.4 (2024-02-06) = + +* Pro: Fix an accessibility issue int the navigation language switcher block +* Pro: Fix featured image not exported for posts with blocks +* Pro: Fix a conflict with the Flatsome builder +* Fix a notice when using system CRON. Props arielruminski #1397 +* Fix an edge case where a wrong post tag may be assigned to a post #1418 + += 3.5.3 (2023-12-11) = + +* Pro: Fix fatal error with The Events Calendar when rewrite param of event category is set to false +* Remove flag alt text in the language switcher when both the flag and language name are displayed #1393 +* Fix incorrect string translations when 2 languages are sharing the same locale in a multisite #1378 +* Fix posts lists not filtered by the current language when editing a post in the block editor #1386 +* Fix error when a tax query is filled with unexpected data #1396 + += 3.5.2 (2023-10-25) = + +* Pro: Fix terms not filtered by the current language in the block editor custom taxonomy component panel +* Fix incorrect rewrite rules leading to error 404 for the main site on multisite #1375 + += 3.5.1 (2023-10-17) = + +* Pro: Fix terms not filtered by the current language in the block editor custom taxonomy component panel +* Pro: Fix fatal error when using plain permalinks on multisite +* Pro: Fix rewrite rules incorrectly refreshed when saving strings translations +* Fix incorrect rewrite rules leading to error 404 on multisite #1366 +* Fix fatal error when using symlinked MU plugins that are not in open_basedir #1368 + += 3.5 (2023-10-09) = + +* Requires WordPress 5.9 as minimum version +* Pro: Manage navigation blocks translations in the site editor (requires WP 6.3) +* Pro: Manage pages translations in the site editor (requires WP 6.3) +* Pro: Manage patterns translations in the site editor (requires WP 6.3) +* Pro: Remove compatibility with the navigation screen removed from Gütenberg 15.1 +* Pro: Add filter 'pll_export_post_fields' to control post fields exported to XLIFF files +* Pro: Do not set default translation option to "translate" for ACF fields created before Polylang Pro is activated +* Pro: Fix Polylang not set as recently active when automatically deactivated by Polylang Pro +* Don't output javascript type for themes supporting html5 #1332 +* Hook WP_Query automatic translation to 'parse_query' instead of 'pre_get_posts' #1339 +* Improve preload paths management for the block editor #1341 +* Fix rewrite rules in WP 6.4 #1345 +* Fix: always assign the default language to new posts and terms if no language is specified #1351 +* Fix 'polylang' option not correctly created when a new site is created on a multisite #1319 +* Fix front page display switched to "Your latest posts" when deleting a static home page translation #1311 +* Fix wrong language assigned to terms #1336 +* Fix error when updating a translated option while the blog is switched on a multisite #1342 + += 3.4.6 (2023-09-13) = + +* Pro: Security: Fix unsafe custom style injection in navigation language switcher block + += 3.4.5 (2023-08-07) = + +* Requires PHP 7.0 as minimum version +* Pro: Fix error in site editor with WP 6.3 +* Pro: Remove usage of block_core_navigation_submenu_build_css_colors() deprecated in WP 6.3 +* Pro: Fix categories and tags kept in old language after the language of a post has been changed +* Add 'pll_admin_ajax_params' filter #1326 +* Fix error when changing the language of a post and the post type doesn't support excerpts #1323 + += 3.4.4 (2023-07-18) = + +* Pro: Register a default (empty) value for the "lang" param when listing posts and terms in REST API +* Pro: Fix categories list refresh when the language of a post is changed in the block editor +* Pro: Fix store "pll/metabox" is already registered +* Add Kirghiz to the predefined list of languages #1308 +* Fix incorrect flag url when WordPress is installed in a subfolder #1296 +* Fix wrong home page url in multisite #1300 + += 3.4.3 (2023-06-13) = + +* Adapt the language filter for `get_pages()` for WP 6.3 #1268 +* Fix static front page displaying latest posts when it is not translated #1295 +* Fix a database error in ANSI mode #1297 +* Fix a database error when accessing posts from another site in multisite #1301 + += 3.4.2 (2023-05-30) = + +* Fix empty languages displayed when Falang data are remaining in the database #1286 +* Fix PHP warning on term_props #1288 +* Fix blog page displayed in the customizer instead of the static front page when changing a setting #1289 + += 3.4.1 (2023-05-25) = + +* Fix incorrect site titles in My Site admin bar menu on multisites #1284 +* Fix incorrect home url when using multiple domains or subdomain and a static front page #1285 + += 3.4 (2023-05-23) = + +* Requires WP 5.8 as minimum version +* Pro: Language fallbacks are now stored in language description instead of a term meta. +* Pro: Add more error messages when doing wrong when importing or exporting translations +* Pro: Avoid to check for translations files existence if no language fallbacks are defined. +* Pro: Reduce the number of DB queries when exporting posts for translation +* Pro: Fix incorrect post slug after XLIFF import +* Pro: Fix a performance issue with the autocomplete field in the block editor languages panel +* Pro: Fix translations not refreshed when switching the language in the block editor sidebar +* Pro: Fix a performance issue in Site editor +* Pro: Fix a possible bug in Site editor when language term_id and term_taxonomy_id are different +* Pro: Fix deactivated language re-activated when it is edited. +* Pro: Fix language switcher in legacy widget menu not correctly rendered in widget block editor +* Pro: Fix error 404 for untranslated attached attachment +* Pro: Fix a deprecated notice in ACF integration +* Pro: Fix update compatibility with WP Umbrella +* Refactor core to allow to easily translate contents stored in custom tables +* Strings translations are now stored in a language term meta instead of post meta of specific post type #1209 +* Deprecate the filters `pll_languages_list` and `pll_after_languages_cache` #1210 +* Add a new property `PLL_Language::$is_default` #1228 +* Add a custom admin body class `pll-lang-{$language_code}` #1190 +* Add support for new WPML API filters #1266 +* Fix languages metabox autocomplete field not always returning expected results #1187 +* Fix language not displayed if the transient has been saved with an empty array #1247 +* Fix a PHP warning `Attempt to read property "home_url" on bool` #1206 +* Fix a conflict leading to a performance issue when translating the theme Astra options #1196 +* Fix related translations reset when updating Yoast SEO titles settings #1111 +* Fix a fatal error in case the registered strings option is corrupted #1264 +* Fix the language extraction from the URL in plain permalinks #1270 +* Fix content cleared when switching the language of a new post in the block editor #1272 +* Fix: Prevent saving strings translations with an empty source #1273 + += 3.3.3 (2023-04-11) = + +* Pro: Adapt the submenu colors of the navigation language switcher block to WP 6.2 +* Pro: Fix the dropdown setting in the navigation language switcher block +* Add Amharic, Aragonese and Spanish from Dominican Republic to the list of predefined languages #1248 +* Fix a deprecated notice in WP 6.2 when using multiple domains without the Internationalization PHP extension (intl) #1245 + += 3.3.2 (2023-03-06) = + +* Pro: Add compatibility with FSE changes introduced by WP 6.2 +* Pro: Adapt the navigation language switcher block for consistency with WP 6.2 +* Only store term ids in taxonomy relationships cache for WP 6.0+. Props @ocean90 #1154 +* Remove usage of `get_page_by_title()` deprecated in WP 6.2 #1213 +* Fix fatal error if the mu-plugins folder is not readable #1217 +* Fix a compatibility issue with plugins not expecting a null 'update_plugins' transient #1224 + += 3.3.1 (2023-01-09) = + +* Pro: Allow to translate Oembed, URL and Email ACF fields +* Pro: Fix ACF REST API mixing fields +* Pro: Fix ACF compatibility loaded when no language exist +* Pro: Fix headers of exported PO files. +* Pro: Fix spacing in language switcher navigation block preview +* Work around a bug in Sendinblue for WooCommerce causing a fatal error. #1156 +* Fix a regression with WooCommerce Product Add-Ons Ultimate. #1186 + += 3.3 (2022-11-28) = + +* Requires WP 5.7 as minimum version +* Pro: Allow to export and import XLIFF files for posts +* Pro: Honor the provided context for the navigation language switcher block. +* Pro: Remove the parent hyperlink in the navigation language switcher block. +* Pro: Add spacing between flag and name in the navigation language switcher block. +* Pro: Disallow some special characters in translated slugs to avoid 404 errors. +* Pro: Fix string translation not imported when the original is registered but has never been saved in database. +* Pro: Fix string translation not imported when it includes an html entity. +* Pro: Fix navigation language switcher block rendering in block editor. +* Pro: Fix navigation language switcher may be displayed wrong color. +* Translate the post pages in get_post_type_archive_link() on admin side too. #1000 +* Enable the block editor in page for posts translations to match the WordPress behavior since version 5.8 #1002 +* Improve the site health report #1062 #1076 +* Set the current language when saving a post #1065 +* The search block is now filtered by language #1081 +* Display slug of CPT and taxonomies in Custom post types and Taxonomies settings. Props @nicomollet #1112 +* Add support for wpml-config.xml to MU plugins #1140 Props Jeremy Simkins +* Fix some deprecated notices fired by PHP 8.1 #975 +* Fix some missing canonical redirect taxonomies #1074 +* Fix redirect when permalink structure has no trailing slash #1080 +* Fix language switcher in legacy navigation menu widget not rendered in widgets block editor #1083 +* Fix language in tax query when an OR relation is used #1098 +* Fix parent of translated category removed when assigning an untranslated parent #1105 +* Fix is_front_page() when a static front page is not translated #1123 +* Yoast SEO: Fix posts without language displayed in the sitemap #1103 +* Yoast SEO: Avoid syncing robots meta. #1118 + += 3.2.8 (2022-10-17) = + +* Fix PHP warning when a filtered taxonomy has no query var #1124 +* Fix SQL error when attempting to get objects without languages and no language exist #1126 +* Fix error when term slugs are provided as array in WP_Query #1119, #1132 Props Susanna Häggblom +* Fix a CSS regression in the wizard causing the default language icon to be removed #1137 + += 3.2.7 (2022-09-20) = + +* Work around a WooCommerce 6.9.x bug causing a fatal error in the wizard. #1116 + += 3.2.6 (2022-09-06) = + +* Pro: Fix a conflict with Kadence blocks +* Pro: Fix a conflict with Flatsome builder +* Fix media translation setting having no effect + += 3.2.5 (2022-06-28) = + +* Pro: Fix creation of WC product categories with shared slug via REST API +* Pro: Fix conflict with WooBuilder when editing a WC product +* Fix: Force empty string translation to empty string #1058 +* Fix CSS conflict with Dynamic content for Elementor #1060 + += 3.2.4 (2022-06-07) = + +* Pro: Remove "Navigation menus" from the post type settings list +* Pro: Fix block editor languages panel missing in WordPress 5.6 +* Pro: Fix wrongly indexed languages list returned by REST API when the first language is deactivated. +* Revert fix for category feed not redirected when the language code is wrong #1054 +* Fix wrong redirect of category when the url includes a query string #1048 +* Fix querying multiple categories failing + += 3.2.3 (2022-05-17) = + +* Pro: Fix a fatal error when inserting a term +* Pro: Fix translation of the block cover when duplicating a post +* Pro: Fix a CSS issue in bulk translate form introduced by WP 6.0 +* Pro: Fix a CSS issue in string import/export metaboxes. +* Prevent random languages order in WP 6.0 #1041 +* Translate site title in retrieve password email #1042 +* Fix 'lang' attribute in language widget dropdown #1039 + += 3.2.2 (2022-04-25) = + +* Pro: Fix redirect occurring for tags sharing the same slug as their translations +* Fix quick edit allowing to modify the language of the default category when it should not #1018 + += 3.2.1 (2022-04-14) = + +* Pro: Fix users with editor role not able to save or publish posts +* Pro: Fix FSE compatibility not loaded when the plugin Gütenberg is active +* Pro: Fix a fatal error occurring with Yoast SEO Premium +* Pro: Fix a fatal error with ACF when no language is defined + += 3.2 (2022-04-12) = + +* Requires WP 5.6 as minimum version +* Pro: Add compatibility with the full site editing introduced in WP 5.9 +* Pro: Add a language switcher block for the navigation block introduced in WP 5.9 +* Pro: Add compatibility with the new gallery block introduced in WP 5.9 +* Pro: Make the language switcher block available in the widget section of the customizer +* Pro: Fix wrong category when translating the latest posts block +* Pro: Fix the language switcher block when using the dropdown option +* Pro: Fix some edge cases with locale fallback +* Pro: Fix post template replacing the post content when duplicating a post +* Pro: Fix synchronization groups not correctly cleaned up when a language is deleted +* Pro: Fix incorrect sticky property when duplicating / synchronizing posts +* Pro: Fix "Page for posts" label after the page has been bulk translated +* Pro: Fix translated slug when the url includes a query string +* Pro: Synchronize ACF layout fields if a child field is synchronized or translatable +* Pro: Fix wrong field group translation displayed when using object cache with ACF +* Update plugin updater to 1.9.1 +* Add compatibility with the block site title introduced in WP 5.9 +* Add the list of wpml-config.xml files in the site health information +* Improve the performance of the get_pages() filter #980 +* Improve the compatibility of 'wpml_object_id' with the original filter #972 +* Prevent term_exists to be filtered by language in WP 6.0 +* Fix some PHP 8.1 deprecations #949 #985 +* Fix a fatal error in PHP 8.1 #987 +* Fix category feed not redirected when the language code is wrong #887 +* Fix default category not created for secondary languages (introduced in 3.1) #997 +* Fix parent page when the parent post type is not translatable #1001 +* Fix the Yoast SEO breadcrumb when it includes a non-synchronized taxonomy #1005 +* Fix a PHP Notice when adding a new language and Yoast SEO is active #979 +* Fix a PHP warning in Yoast SEO compatibility #954 + += 3.1.4 (2022-01-31) = + +* Pro: Adapt duplication and synchronization of the gallery block refactored in WP 5.9 +* Fix UI glitch in the classic editor custom fields form when changing a post language in WP 5.9 #970 + += 3.1.3 (2021-12-14) = + +* Fix user description escaping #934 +* Fix dismissable notice when creating a term in WP 5.9 #936 +* Fix empty search not handled correctly. Props Dominik Schilling #937 +* Fix warning occurring when a 3rd party plugin attempts to register anything else than a string using the WPML API #942 +* Fix Yoast SEO columns not correctly drawn when quick editing a post #943 + += 3.1.2 (2021-10-11) = + +* Pro: Fix parent page not filtered by language in the block editor since WP 5.6 +* Pro: Fix XLIFF mime type for PHP 7.0 and PHP 7.1 +* Fix settings page displaying the media modules when no language are defined +* Enforce Yoast SEO to use dynamic permalinks #882 +* Yoast SEO: Fix static front page and blog page breadcrumb + += 3.1.1 (2021-08-16) = + +* Pro: Fix a fatal error with The Events Calendar +* Allow to remove the cookie with the pll_cookie_expiration filter #905 + += 3.1 (2021-07-27) = + +* Add compatibility with WordPress 5.8 +* Raise Minimum WordPress version to 5.4 +* Pro: Allow to filter blocks by language in the widget block editor +* Pro: Allow to export and import XLIFF files for string translations +* Pro: Add the language switcher in the navigation block (experimental) +* Pro: Replace dashicons by svg icons in the block editor +* Pro: The Events Calendar: Add compatibility with Views V2 (only for sites using only one domain) +* Pro: Fix + icon displayed in the block editor sidebar when the user cannot create a translation +* Add a warning section to the site health for posts and terms without languages #825 +* Require the simplexml extension in the site health if a wpml-config.xml is found #827 +* Remove the information about the WPML compatibility mode in settings #843 +* The browser preferred language detection is now deactivated by default +* The media are now untranslated by default +* Highlight the language filter in the admin toolbar when it's active #821 +* Allow to query comments in multiple languages (just as posts and terms) #840 +* Don't disable the translation input field in the classic metabox #841 Props Onatcer +* Optimize all images including flags #848 Props lowwebtech +* Don't redirect if WordPress doesn't validate the redirect url to avoid redirects to /wp-admin/ #879 +* Fix media appearing to have a language after the language is changed in the media library grid view #807 +* Fix media not all deleted when bulk deleting from the grid view of the media library #830 +* Fix when more than one language switcher are added to the same menu #853 +* Fix PHP notice when adding a CPT archive link to a menu #868 Props davidwebca + += 3.0.6 (2021-06-22) = + +* Fix a conflict with the WooCommerce cart translation and cache plugins #876 + += 3.0.5 (2021-06-08) = + +* Pro: fix original post not assigned to a new translation when the languages sidebar is closed +* Pro: Attempt to fix zip file corrupted on some installations when exporting string translations +* Support session cookie with the pll_cookie_expiration filter #835 +* Fix javascript error when a plugin defines its own editor for translated post types #837 +* Fix languages displayed in screen options when editing a term #850 +* Cache: fix post type archive cache not cleared when saving a post #828 + += 3.0.4 (2021-04-27) = + +* Improve performance in the pages (or hierarchical post types) list table +* Fix an ajax conflict with WooCommerce License manager + += 3.0.3 (2021-03-23) = + +* Fix a warning when a language is corrupted in database (term_language missing) +* Fix confirmation modal with WooCommerce and WordPress < 5.6 +* Fix an ajax conflict with WooCommerce Tree Table Rate Shipping and HubSpot All-In-One Marketing + += 3.0.2 (2021-03-16) = + +* Move hreflang attributes higher in the head section #771 +* Fix custom flags not working (introduced in 3.0) +* Fix translation of the confirmation modal when changing the language of a post +* Fix js and css not loaded when Polylang is used as a mu-plugin (introduced in 3.0) +* Fix support for html5 stylesheet link tags #775 +* Fix possible warning in frontend-filters-links.php +* Yoast SEO Premium: Take over the multilingual compatibility removed in Yoast SEO Premium 15.8 #796 +* Yoast SEO: Fix CPT breadcrumb title when the option is left empty #794 +* Yoast SEO: Fix sitemap.xml not redirected on secondary domains #789 + += 3.0.1 (2021-03-10) = + +* Fix media gallery messed when editing a post in the classic editor +* Fix missing script dependency on old WP versions +* Fix CSS conflict with WooCommerce Bookings for WP < 5.6 +* Fix conflict resulting in '__' already defined in block-editor.js. #779 +* Fix search form removed for some themes. Props Marián Kadaňka. #780 +* Fix fatal error with very old versions of Yoast SEO. Props Nicola Peluchetti. #781 + += 3.0 (2021-03-08) = + +* Add compatibility with WordPress 5.7 +* Remove upgrades from Polylang older than 1.8 +* Remove deprecated class PLL_Pointer +* Pro: Hide the license keys +* Pro: Fix redirect to the home page of a deactivated language +* Pro: Fix synchronization of post status not working +* Pro: Fix language switcher block not working in a post retrieved in REST API +* Pro: Fix PO export of strings with line breaks +* Pro: Fix file block title customization lost +* Add a dialog box to ask a confirmation about a language change in classic and block editors +* Improve browser language detection #591 +* Improve robustness and documentation of code +* Fix media library after the language has been changed in the editor metabox +* Fix duplicated title attribute on flag link in posts list +* Fix legacy block editor language metabox compatibility with WordPress 5.6 +* Fix uploaded theme and plugin files in media library +* Fix site title not translated in email change confirmation email +* Fix remaining deprecated jQuery notices #741 +* Fix compatibility with GN publisher +* Fix compatibility with Woodmart theme search form +* Fix compatibility issue with 3rd party ajax requests since jQuery 3.3 #744 +* Fix CSS conflict with WooCommerce Bookings +* Fix browser error when displaying an embed and using a cache plugin #757 +* Fix post type archive title and metadesc not translated in Yoast SEO +* Fix PHP notice in REST API + += 2.9.2 (2021-02-02) = + +* Pro: Fix translation of CPTUI plural label and description not working +* Add Spanish (Ecuador) to the list of predefined languages +* Fix typo in "WordPress" string translation group. Props Viktor Szépe #682 + += 2.9.1 (2020-12-15) = + +* Fix PHP notice: Undefined property: PLL_Cache_Compat::$options with cache plugins. Props bahaa-almahamid. #658 +* Fix title of the search results page with Yoast SEO > 14.0 + += 2.9 (2020-12-07) = + +* Add compatibility with WordPress 5.6 +* Pro: Add locale fallback used when the theme or plugins translations are not available +* Pro: Fix SSO and browser preferred language redirect when using multiple domains +* Pro: Fix post slugs for German and Danish in the REST API +* Pro: Fix a fatal error in ACF integration when saving url modifications with multiple domains +* Pro: Fix a deprecated notice fired by ACF since the version 5.9.2 +* Pro: Fix ACF relationship fields not reloaded when changing the language in the classic editor +* Update plugin updater to version 1.8 +* Add Lower Sorbian to the list of predefined language +* Options are now translated on backend when using the admin language filter +* Keep previous translations when modifying an option value +* Add navigation markup to the language switcher widget +* Fix canonical redirect for taxonomy terms +* Fix a fatal error when deleting a post with a translation group corrupted in the database +* Fix a fatal error when switching to plain permalinks and using multiple domains +* Fix a conflict with WP Sweep which could corrupt languages +* Fix title displayed instead of meta description with Yoast SEO > 14.0 +* Fix PHP Notice: Undefined index: wp_the_query in /frontend/choose-lang-content.php on line 92 + += 2.8.4 (2020-11-03) = + +* Pro: Remove useless bulk translate action for ACF fields groups +* Pro: Fix the translation of the CPTUI labels when the language is set from the content +* Fix sitemaps redirected to the default language since WP 5.5.1 +* Fix object cache not flushed for sticky posts #601 +* Fix blog page broken when trashing a page and the blog page is not translated in all languages +* Fix custom flags ignored in WPML compatibility mode +* Fix breadcrumb for untranslated post types in Yoast SEO + += 2.8.3 (2020-10-13) = + +* Honor install_languages capability to download language packs +* Pro: Fix integrations not loaded (with The Events Calendar, CPTUI, Content blocks) +* Pro: Fix fatal error with ACF if a flexible content includes a repeater and a relationship +* Pro: Fix terms sharing their slug impossible to update without changing the slug +* When available, use wpcom_vip_get_page_by_path() instead of get_page_by_path() +* Fix queries filtered when editing a post that was declared untranslatable after it got a language +* Fix issues with Yoast SEO 14.0+ (breadcrumbs, canonical, title and description) + += 2.8.2 (2020-09-08) = + +* Pro: Fix posts sharing the same slug displayed on the same page +* Fix: Don't use a javascript localized string removed in WP 5.5 #568 +* Fix fatal error in site health when no language is defined #563 +* Fix various issues with Yoast SEO 14.x #65, #503, #505 +* Fix fatal error with MU Domain Mapping when saving domains in Polylang settings #569 + += 2.8.1 (2020-08-25) = + +* Pro: Fix fatal error with WP 4.9 +* Fix pll_the_languages() with 'raw' option returning html flag instead of flag url #558 +* Fix compatibility with Duplicate Posts not correctly loaded #557 +* Fix custom flag size in admin bar language switcher #559 +* Fix tag clouds mixed in the classic editor #561 + += 2.8 (2020-08-17) = + +* Pro: Add a language switcher block +* Pro: Add compatibility with block image edition introduced in WP 5.5 +* Pro: Fix our private taxonomies being displayed in the ACF field group rules. +* Pro: Fix incorrect flags loaded from the block editor +* Pro: Fix SSO causing a wrong redirect when using subdomains (introduced in 2.7.4) +* Pro: Fix a performance issue on the plugins list +* Pro: Fix option to automatically duplicate media in all languages when uploading a new file not honored in block image +* Use composer for autoload and Polylang Pro dependency on Polylang +* Display a flag for each post in the posts list tables (same for terms). #515 +* Add test for the homepage translations to Site Health +* Add debug information to Site Health +* Add compatibility with the sitemaps introduced in WP 5.5 #451 +* Always filter WP_Query by the current language +* Support wildcards in "admin-texts" parent keys in wpml-config.xml +* Fix sticky posts showed for all languages when the admin language filter is active #469 +* Fix a performance issue on the pages list +* Fix dependency to jQuery Migrate removed from WP 5.5 #539 +* Fix: output secure cookie when using a cache plugin and ssl #542 +* Fix the possibility to create 2 terms with the same name in the same language, without specifying the second slug. +* Fix sticky posts appearing 2 times in WP 5.5 + += 2.7.4 (2020-06-29) = + +* Pro: Allow using our /untranslated-posts REST endpoint for non-public post types +* Pro: Fix broken display in the block editor sidebar when a language has no flag +* Pro: Fix SSO breaking the preview on secondary domains +* Pro: Fix ACF translation option not working for term custom fields +* Pro: Fix a styling issue in the fields group list table in ACF 5.9 +* Add Spanish from Puerto Rico to the predefined list of languages + += 2.7.3 (2020-05-26) = + +* Security: Slash metas +* Pro: Fix categories not savedafter the language has been switched in the block editor +* Pro: Fix ACF fields stored as integers instead of strings +* Pro: Fix ACF untranslated posts or terms being copied when creating a new translation +* Pro: Fix PHP notice with ACF when a repeater or group is included in a flexible content +* Pro: Fix "DevTools failed to load SourceMap" warning in browser console +* Update plugin updater to 1.7.1 +* Honor the filter "pll_the_language_link" when the language switcher displays a dropdown #506 +* Fix "Something went wrong" message when quick editing untranslated post types #508 +* Fix wpseo_opengraph deprecated warning #509 + += 2.7.2 (2020-04-27) = + +* Pro: Re-allow to modify the capability for strings translations +* Pro: Fix redirect for posts having the same slug as a media +* Pro: Fix PHP notice with ACF flexible content +* Pro: Fix a fatal error with InfiniteWP +* Update plugin updater to 1.7 +* Fix font in setup wizard + += 2.7.1 (2020-04-09) = + +* Pro: Fix untranslated post types filtered by the parameter in the REST API #493 +* Fix fatal error when the function idn_to_ascii is not available +* Fix PHP warning warning when a 3rd party plugin declares options not stored in DB in wpml-config.xml #492 +* Fix fatal error when a 3rd party plugin declares options stored as objects in wpml-config.xml #494 + += 2.7 (2020-04-06) = + +* Minimum WordPress version is now 4.9 +* Pro: Strings translations can now be exported and imported (in PO format) +* Pro: Allow to decide individually which ACF fields to copy or synchronize +* Pro: Add action pll_inactive_language_requested +* Pro; Fix fatal error in The Events Calendar compatibility when no language is defined yet +* Pro: Fix bulk translate when a post has no language +* Pro: Fix reusable block saved without language +* Pro: Fix post requested by slug not filtered in REST API, when the slug is shared +* Add a setup wizard +* Add Swahili, Upper Sorbian, Sindhi and Spanish from Uruguay to the list of predefined languages +* Add flags in the predefined list of languages +* Allow to hide the metaboxes from the screen options +* The deletion of the plugin's data at uninstall is now controlled by a PHP constant instead of an option #456 +* Add parent in ajax response when selecting a term in autocomplete field #328 +* Add Vary: Accept-Language http header in home page redirect. Props @chesio #452 +* Improve performance to register/unregister WPML strings +* Add support for the action wpml_switch_language +* Add post_status to the list of accepted args of pll_count_posts() +* Apply the filter pll_preferred_language in wp-login.php +* Use filtered wrappers to create meta when creating media translations #231 +* Allow to translate the Twenty Seventeen header video Youtube url #460 +* Notices are now dismissed per site instead of per user #478 +* Fix terms not visible in the quick edit when only one language is defined and the admin language filter is active +* Fix post state not displayed for translations of the privacy policy page #395 +* Fix wildcards not correctly interpreted in wpml-config.xml +* Fix product categories with special characters duplicated when importing WooCommerce products #474 + += 2.6.10 (2020-02-19) = + +* Pro: Fix sticky posts not filtered in REST API (introduced in 2.6.9) +* Fix wrong language detected if a child page uses the slug of another language +* Fix a PHP notice with PHP 7.4. #438 +* Fix lang-item-first class in language switcher when the current language is hidden. #445 +* Fix partially a conflict with Fusion Builder (the other part of the conflict being in Fusion Builder). + += 2.6.9 (2020-01-15) = + +* Pro: Use 'parse_query' rather than 'rest_{$type}_query' to filter REST requests. +* Pro: Filter the comments REST endpoint. +* Pro: Fix duplication of terms without language. +* Pro: Fix fatal error when Admin Columns is activated and no language is defined yet. +* Fix shortlink when using one subdomain or domain per language + += 2.6.8 (2019-12-11) = + +* Pro: Fix conflict with JetThemesCore from Crocoblock +* Fix: better detection of REST requests when using plain permalinks +* Fix usage of deprecated action wpmu_new_blog in WP 5.1+ +* Fix PHP notices with PHP 7.4 + += 2.6.7 (2019-11-14) = + +* Require PHP 5.6 +* Fix PHP warning in WP 5.3 + += 2.6.6 (2019-11-12) = + +* Pro: Fix wrong ajax url when using one domain per language +* Pro: Fix conflict with user switching plugin when using multiple domains +* Pro: Fix latest posts block in WP 5.3 +* Fix database error when attempting to sync an untranslated page parent +* Fix a conflict with the theme Neptune by Osetin + += 2.6.5 (2019-10-09) = + +* Pro: Require ACF 5.7.11+ to activate the compatibility to avoid fatal errors with older versions +* Pro: Avoid translating empty front slug (could cause a wrong redirect to /wp-admin) +* Pro: Fix filter wp_unique_term_slug not always correctly applied. +* Pro: Fix a conflict with Divi causing post synchronization buttons to be displayed multiple times +* Avoid notice in WP CLI context + += 2.6.4 (2019-08-27) = + +* Pro: Fix a conflict preventing meta synchronization when ACF is active +* Pro: Fix post metas not correctly copied when translating a Beaver Builder page +* Pro: Fix a fatal error when posts made with Elementor are synchronized +* Pro: Fix Prewiew button not working correctly when using one domain per language +* Pro: Fix post synchronization not available for WP CRON and WP CLI +* Fix future posts not available in the autocomplete input field of the languages metabox +* Fix translations files not loaded on REST requests +* Fix deleted term parent not synchronized + += 2.6.3 (2019-08-06) = + +* Pro: Fix fatal error when updating an ACF field from frontend +* Pro: Add action 'pll_post_synchronized' +* Allow to get the current or default language object using the API. Props Jory Hogeveen. #359 +* Fix empty span in languages switcher widget when showing only flags +* Fix wpml_register_single_string when updating the original string + += 2.6.2 (2019-07-16) = + +* Pro: Fix slow admin in case the translations update server can't be reached +* Pro: Fix value not correctly translated for ACF clone fields in repeater +* Fix strings translations mixed when registered via the WPML compatibility. #381 + += 2.6.1 (2019-07-03) = + +* Pro: Fix Yoast SEO sitemap for inactive languages when using subdomains or multiple domains +* Fix fatal error in combination with Yoast SEO and Social Warfare +* Fix post type archive url in Yoast SEO sitemap + += 2.6 (2019-06-26) = + +* Pro: Remove all languages files. All translations are now maintained on TranslationsPress +* Pro: Move the languages metabox to a block editor plugin +* Pro: Better management of user capabilities when synchronizing posts +* Pro: Separate REST requests from the frontend +* Pro: Copy the post slug when duplicating a post +* Pro: Duplicate ACF term metas when terms are automatically duplicated when creating a new post translation +* Pro: Fix hierarchy lost when duplicating terms +* Pro: Fix page shared slugs with special characters +* Pro: Fix synchronized posts sharing their slug when the language is set from the content +* Pro: Fix PHP warning with ACF Pro 5.8.1 +* Pro: Fix ACF clone fields not translated in repeaters +* Better management of user capabilities when synchronizing taxonomies terms and custom fields +* Extend string translations search to translated strings #207 +* Update plugin updater to 1.6.18 +* Honor the filter `pll_flag` when performing the flag validation when creating a new language +* Modify the title and the label for the language switcher menu items #307 +* Add support for international domain names +* Add a title to the link icon used to add a translation #325 +* Add a notice when a static front page is not translated in a language +* Add support for custom term fields in wpml-config.xml +* Add filter `pll_admin_languages_filter` for the list of items the admin bar language filter +* Add compatibility with WP Offload Media Lite. Props Daniel Berkman +* Yoast SEO: Add post type archive url in all languages to the sitemap +* Fix www. not redirected to not www. for the home page in multiple domains #311 +* Fix cropped images not being synchronized +* Fix auto added page to menus when the page is created with the block editor +* Fix embed of translated static front page #318 +* Fix a possible infinite redirect if the static front page is not translated +* Fix incorrect behavior of action 'wpml_register_single_string' when updating the string source +* Fix fatal error with Jetpack when no languages has been defined yet #330 +* Fix a conflict with Laravel Valet. Props @chesio. #250 +* Fix a conflict with Thesis. +* Fix a conflict with Pods in the block editor. Props Jory Hogeveen. #369 +* Fix fatal error with Twenty Fourteen introduced in version 2.5.4. #374 + += 2.5.4 (2019-05-28) = + +* Add Kannada to the predefined languages list +* Yoast SEO: Fix primary product cat not copied or synchronized +* WPMU Domain Mapping: Fix incorrect domain used for the theme +* Fix style-rtl.css not loaded when the language is set from the content #356 +* Fix Jetpack featured pages not working. Props Anis Ladram. #357 +* Fix Call to undefined function wp_generate_attachment_metadata() + += 2.5.3 (2019-04-16) = + +* Add de_AT and pt_AO to the predefined languages list +* Pro: Add filter pll_translate_blocks +* Pro: fix PHP notice when the queried post type has been modified to an array +* Pro: fix PHP warning when combined with The Event Calendar and Page builder by SiteOrigin + += 2.5.2 (2019-02-12) = + +* Pro: Fix translated slugs not accepting forward slashes +* Pro: Fix fatal error with ACF Pro 5.7.11 +* Fix parent categories incorrectly synchronized #327 + += 2.5.1 (2019-01-16) = + +* Security: Fix categories and media duplication not protected from CSRF +* Pro: Allow to update the plugin with WP CLI +* Pro: Fix search in the button block not filtered in the correct language (needs WP 5.1) +* Add Saraiki to the predefined languages list +* Fix a conflict causing a blank page with Divi + += 2.5 (2018-12-06) = + +* Add compatibility with WP 5.0 +* Fix custom flags when the WP content folder is not in the WP install folder +* Fix PHP notice if a language has no flag + += 2.4.1 (2018-11-27) = + +* Pro: Add compatibility with REST API changes made in WP 5.0 +* Pro: Fix sticky posts in the REST API +* Pro: Fix overwritten custom post slug when the post is updated with the REST API +* Pro: Fix bulk translate for media +* Fix a conflict with Custom sidebars and Content aware sidebars +* Fix a conflict with the theme Pokemania +* Fix PHP notices when using the function 'icl_link_to_element' for terms +* Fix title slugs for posts written in German + += 2.4 (2018-11-12) = + +* Minimum WordPress version is now 4.7 +* Pro: Add the possibility to bulk duplicate or bulk synchronize posts. +* Pro: Add compatibility with Admin Columns +* Pro: Add synchronized posts to the REST API +* Pro: Fix variations messed when changing WooCommerce attributes slugs +* Pro: Fix incorrect language for ajax requests made on front by The Events Calendar +* Pro: Fix term not duplicated correctly when the language is set from the content +* Refactor the core to activate on front and for the REST api actions that were previously available only in the backend (language checks, synchronizations...). +* Add flags to widgets displayed in only one language (Props Jory Hogeveen) #257 +* Honor the filter 'pll_the_language_args' for all options in menus #237 +* Add better filters for default flags and custom flags +* Custom flags can now be stored in the polylang directory in the theme +* Custom flags can now use SVG +* Add compatibility with Jetpack featured content module +* Fix Twenty Fourteen featured posts possibly not filtered per language +* Fix home url not working with WordPress MU Domain mapping +* Fix Assigning a parent category breaking the hierarchy of translated category +* Fix: Accept 0,1 and 1.0 as q factors in browser preferred language detection (Props Dominic Rubas) +* Fix performance issue when using hundreds of widgets +* Fix translations possibly wrong if the post language is changed without saving the post after + += 2.3.11 (2018-10-03) = + +* Pro: Add action 'pll_created_sync_post' +* Pro: Fix language and translations not included for tags in the REST API +* Fix Assigning a parent category breaking the hierarchy of translated category + += 2.3.10 (2018-08-16) = + +* Fix Lingotek notice not dismissable +* Fix fatal error with the widget calendar + += 2.3.9 (2018-08-14) = + +* Add a notice to inform about Polylang for WooCommerce +* Deprecate PLL_Pointer +* Fix bulk editing pages with no language breaking hierarchy #281 +* Fix an edge case where rewrite rules could be messed on a multisite +* MU Domain Mapping: fix secondary domain redirected to primary domain + += 2.3.8 (2018-07-16) = + +* Pro: Duplicate term meta when duplicating a post creates new terms +* Pro: Add compatibility with ACF Pro when it's bundled with the theme +* Pro: Fix a fatal error when duplicating posts +* Set cookie during the home redirect +* Accept a port in the url to detect the site home +* Add filter 'pll_is_cache_active' to allow to load the cache compatibility #270 #274 +* Fix potential fatal error when a 3rd party misuses the 'wpml_active_languages' filter #268 +* Fix Uncaught TypeError: s.split is not a function. Props Wouter Van Vliet #262 +* Fix text alignment for RTL scripts in Lingotek panel #247 +* Fix html language attribute filter on admin +* Fix cookie expiration time when set in js. Props Jens Nachtigall #271 +* Fix fatal error when a 3rd party misuses the WP_Query tax_query param. Props JanneAalto #252 +* Fix an edge case which could mess home pages on a multisite + + += 2.3.7 (2018-06-07) = + +* Pro: The Events Calendar: Fix untranslated events shown in all languages +* Avoid displaying edit links of translations of the privacy policy page to non-admin +* Fix draft created when creating a new page on multisite +* Do not prevent using the cache for home when using WP Rocket 3.0.5 or later #236 +* Fix language filter applied to wrong queries on admin side + += 2.3.6 (2018-05-17) = + +* Pro: Fix post type archive slug not translated in ACF page link fields +* WP 4.9.6: Translate the privacy policy page +* WP 4.9.6: Add the translated user descriptions to exported personal data +* Update Plugin updater to version 1.6.16 +* Fix conflict with the plugin View Admin As. Props Jory Hogeveen. #253 + += 2.3.5 (2018-05-08) = + +* Pro: Fix translated CPT slugs when one CPT name is a substring of another one. Props Steve Reimer. +* Pro: Fix canonical redirection for post types archives when the CPT slug is translated +* Pro: Fix ACF private key uselessly synchronized when the public custom field is not synchronized +* Add filter 'pll_filter_query_excluded_query_vars' +* Redirect www. to non www. when using multiple domains +* Fix Yoast SEO category sitemap not filtered by language when using multiple domains +* Fix PLL_COOKIE === false not honored when using a cache plugin. #248 +* Fix empty predefined languages list + += 2.3.4 (2018-03-27) = + +* Pro: Fix conflict with Pods related to translated slugs for custom post types +* Add Friulian to the predefined languages list +* Fix conflict (javascript error) with Gütenberg #225 +* Fix conflict on ajax requests introduced by WooCommerce 3.3.4 +* Fix queries by 'category_name' not auto translated #238 + += 2.3.3 (2018-03-15) = + +* Pro: Fix tax query using a term sharing slugs (fix a conflict with Fusion Builder) +* Restore Polylang (free) on REST requests, while disabling the language filter as in v2.3 +* Rework auto translated query with taxonomy in different language #223 +* Synchronize Yoast SEO primary category (needs Yoast SEO 7.0+) +* Fix PHP warning introduced by Yoast SEO 7.0 #229 +* Fix tax query when using the relation 'OR' +* Fix a conflict with the combination of Barrel + WP Bakery Page Builder +* Fix broken redirect with MU domain mapping #226 +* Fix site title not translated in password change email + += 2.3.2 (2018-03-05) = + +* Pro: Fix REST requests not filtered by the requested language (introduced in 2.3). +* Pro: Fix error 404 on single posts if posts are untranslatable +* Deactivate Polylang (free) on REST requests by default. +* Fix translated terms unassigned from posts when deleting a term +* Fix auto translated query with taxonomy in different language returning empty results since WP 4.9 #223 +* Fix conflict with a homepage option of the theme Extra +* Fix warning when filtering get_pages() + += 2.3.1 (2018-02-15) = + +* Pro: Fix GET REST request with slug parameter deleting the post slug +* Fix http request with a custom query var being redirected to the home page #216 + += 2.3 (2018-01-30) = + +* Pro: Duplicating a post now duplicates untranslated terms and the featured image (if media are translatable) +* Pro: Add filter 'pll_sync_post_fields' +* Pro: Translate ACF Pro clone fields when creating a new field group translation +* Pro: Allow to share slugs when creating a post or term with the REST API +* Pro: Load asynchronously the script added on front for multiple domains and subdomains +* Pro: Fix 'lang' parameter not interpreted when the query includes 'name' +* Refactor the synchronization of metas for better synchronization and performance improvement +* Refactor the synchronization of taxonomy terms for performance improvement +* Refactor language and translations saving for performance improvement +* Refactor the synchronization of sticky posts +* Remove all languages files. All translations are now maintained on https://translate.wordpress.org/projects/wp-plugins/polylang #199 +* Refactor the list of languages to merge predefined languages, Facebook locales and fixes for W3C locales +* Automatically deactivate Polylang when activating Polylang Pro +* Disable programmatically translated post types and taxonomies in settings. Props Ulrich Pogson. #180 +* Set the cookie language in Javascript when a cache plugin is active +* Automatically remove the home page from cache when requesting the detection of the browser preferred language +* Use relative urls for the admin language filter in admin bar. #209 +* Disable auto translation of WP_Term_Query if it has a 'lang' parameter +* Don't filter REST requests by default. #211 +* Fix Yoast SEO statistics in dashboard showing only the default language. #211 +* Fix WP Rocket clearing the cache of the wrong adjacent post +* Fix random header image +* Fix home page not correctly loaded when adding a query var +* Fix: Impossible to change the language code when the language code is also a WordPress locale. + += 2.2.8 (2018-01-09) = + +* Pro: Fix: Impossible to link past events by translation in The Events Calendar +* Disallow to delete translations of the default term for all taxonomies +* Fix: Auto add pages adds WooCommerce pages in default language to menus in all languages +* Fix most used tag cloud in Tags metabox in WP4.9+. Props Pär Thernström. #208 + += 2.2.7 (2017-11-30) = + +* Fix queries by taxonomy broken since WP 4.9 +* Fix PHP notice in icl_object_id() + += 2.2.6 (2017-11-22) = + +* Pro: Fix query by post name and alternative language always returning the post in current language (when sharing slugs) +* Pro: Fix query by taxonomy and alternative language returning empty results +* Rework how translation files are loaded in ajax on front when the user is logged (in WP 4.7+) +* Add filter 'get_objects_with_no_lang_limit' +* Force loading the admin side when using WP CLI (Props chrisschrijver) +* Fix check for terms with no language not scaling +* Fix pll_count_posts not working with multiple post types +* Fix inconsistent spacing between flag and language name in language switcher parent menu item (Props Amit Tal) +* Fix spacing between flag and language name when displaying an RTL language +* Fix get_terms not accepting comma separated values for 'lang' parameter (Props Pavlo Zhukov) +* Fix possible wrong language detected in url when using subdomains (Props Pavlo Zhukov) +* Fix double escaped query + += 2.2.5 (2017-11-09) = + +* Update plugin updater class to 1.6.15 +* Add $link in cache key of links filters +* Add support for 'nav_menu' post type in wpml_object_id +* Fix conflict with Timber (introduced in 2.2.4) + += 2.2.4 (2017-10-26) = + +* Pro: Fix unknown language not redirected to default when using multiple domains +* Pro: Fix empty 'lang' query var not deactivating the language query filter +* Pro: Fix conflict with The Events Calendar and Visual Composer when used together +* Add new filter `pll_hide_archive_translation_url` #174 +* Add support for undocumented and deprecated WPML functions `wpml_object_id_filter` and `icl_get_current_language` +* Fix 'orderby' and 'order' in `wpml_active_languages`. Needs WP 4.7+ +* Fix `icl_get_languages` not returning all languages when skip_missing = 0. Props Loïc Blascos +* Fix `pll_translate_string` not working on admin #178 +* Fix PHP Warning in widget video in WP 4.9 +* Fix query using 'any' post type not filtered per language (introduced in 2.2) +* Fix untranslatable string in About metabox. Props Farhad Sakhaei +* Fix error with PHP 7.1 and Duplicate Post. Props Enea Scerba +* Fix query auto translation not active in ajax requests on frontend +* Fix query auto translation for 'postname' and 'pagename' +* Fix terms query auto translation not working for 'include' when no taxonomy is provided (WP 4.5+) + += 2.2.3 (2017-09-24) = + +* Fix editor removed on pages (introduced in 2.2.2) + += 2.2.2 (2017-09-22) = + +* Pro: Fix Duplicate post button not working when the user meta has been corrupted +* Fix PHP notice with the plugin Members #175 +* Fix page template select displayed when editing a translated page for posts +* Fix incompatibility with WP 4.8.2 (placeholder %1$s in prepare) + += 2.2.1 (2017-08-30) = + +* Pro: partially refactor REST API classes +* Pro: Fix duplicate content user meta not removed from DB when uninstalling the plugin +* Fix strings translations not removed from DB when uninstalling the plugin +* Fix incorrect translation files loaded in ajax on front when the user is logged in (WP 4.7+) +* Fix widget language dropdown removed when saving a widget (introduced in 2.2) +* Fix queries with negative values for the 'cat' parameter (introduced in 2.2 for queries made on frontend) +* Fix performance issue in combination with some plugins when the language is set from the content (introduced in 2.2) + += 2.2 (2017-08-16) = + +* Pro: Add support for the REST API +* Pro: Add integration with The Events Calendar +* Pro: Refactor ACF Pro integration for post metas and integrate term metas +* Pro: Ask confirmation if synchronizing a post overwrites an existing translation +* Pro: Separate sync post logic from interface +* Pro: Fix 'Detect browser language' option automatically deactivated +* Pro: Fix redirect to 404 when the 'page' slug translation includes non alphanumeric characters. +* Pro: Fix untranslated post type archive slug +* Pro: Fix ACF taxonomy fields not copied when the taxonomy is not translated #156 +* Pro: Fix fatal error with ACF4 +* Support a different content text direction in admin #45 +* Add support for wildcards and 'copy-once' attribute in wpml-config.xml +* Add minimal support for the filters 'wpml_display_language_names' and 'icl_ls_languages' +* Improve compatibility with the plugin WordPress MU Domain Mapping #116 +* Improve speed of the sticky posts filter #41 +* Remove redirect_lang option for multiple domains and subdomains +* Use secure cookie when using SSL +* Allow to copy/sync term metas with the filter 'pll_copy_term_metas' +* Filter ajax requests in term.php according to the term language +* Add error message in customizer when setting an untranslated static front page #47 +* Load static page class only if we are using a static front page +* Refactor parse_query filters to use the same code on frontend and admin +* Don't use add_language_to_link in filters +* Move ajaxPrefilter footer script on top +* Use wp_doing_ajax() instead of DOING_AJAX constant +* Fix queries custom tax not excluded from language filter on admin +* Fix WP translation not loaded when the language is set from the content on multisite. +* Fix the list of core post types in PLL_OLT_Manager for WP 4.7+ +* Fix post name and tag slug incorrectly sanitized for German and Danish +* Fix lang attribute in dropdowns +* Fix wpml_permalink filter #139 +* Fix WPML constants undefined on backend #151 +* Fix a conflict with the plugin Custom Permalinks #143 +* Fix menu location unexpectedly unset + += 2.1.6 (2017-07-17) = + +* Pro: fix duplicate post button not working in PHP 7.1 +* Pro: fix CPTUI untranslated labels on admin +* Adapt related posts filter to use slug instead of name to follow changes made on Jetpack server ( Props Steve Kaeser ) +* Fix PHP notices when translating CPT and custom tax titles in Yoast SEO +* Fix PHP warning when all plugins are networked activated + += 2.1.5 (2017-05-31) = + +* Add compatibility with new media widgets introduced in WP 4.8 +* Removing the language information in URL for the default language is now default +* Update plugin updater class to 1.6.12 +* Pro: fix PHP notices when duplicating the content +* Fix: test existence of `twentyseventeen_panel_count` instead of relying only on the active template +* Fix: set current property to false when removing the current-menu-item class #134 props @mowar +* Fix PHP notice when editing a term without language +* Fix possible PHP notice when deleting a category +* Fix fatal error with Gantry 5 + += 2.1.4 (2017-05-16) = + +* Pro: fix user not logged in on secondary domain when previewing changes +* Pro: fix archive links without language code in ACF link field (ACF 5.4.0+) +* Fix redirection from www subdomain to wrong language domain. +* Fix: selecting "Front page displays latest posts" in the customizer not cleaning the languages cache +* Fix accessibility of the admin language switcher + += 2.1.3 (2017-04-11) = + +* Pro: Fix translated slug of 'page' if it is translated to an empty string +* Update plugin updater class to 1.6.11 +* Strings registered with a wpml-config.xml file or WPML functions are now multiline by default +* Translate the site title in emails sent to the user +* Fix sanitize_user for specific locales +* Fix deprecation notice in Yoast SEO integration +* Fix: Clean term cache after the language has been set in mass #119 + += 2.1.2 (2017-03-09) = + +* Pro: Add filter 'pll_xdata_nonce_life' +* Pro: Fix translation of WooCommerce product attribute slug +* Pro: Fix product synchronization in WooCommerce 2.7 +* Pro: Fix error message when bulk trashing synchronized posts +* Add option to discard item spacing in the output of pll_the_languages() ( Props Ceslav Przywara ) #93 #95 +* Add as, dzo, kab, km, ml_IN, nl_BE, pa_IN, rhg, sah, ta_IN, tah, te, tt_RU to the predefined list of languages +* Update plugin updater class to 1.6.10 +* Fix: Remove the dependency to is_ssl() to detect the language in the url ( language set from the directory name ) +* Fix issue with secondary level domains +* Fix strings not translated in emails +* Fix incorrect usage of add_action() ( Props Peter J. Herrel ) #103 +* Fix wrong redirect in customizer in WP 4.7 + += 2.1.1 (2017-02-15) = + +* Pro: Add filter 'pll_enable_duplicate_media' for a fine control of automatic media duplication +* Add filter 'pll_links_model' for the links model class name +* Trim any starting ^ from modified rewrite rules +* Pro: Fix wrong count of plugins to update +* Fix slashed strings translations not saved #94 + += 2.1 (2017-01-25) = + +* Minimum WordPress version is now 4.4 +* Pro: Add support for synchronized posts (same post in multiple languages) +* Pro: Add support for custom post type UI and the Divi Builder +* Improve support of Yoast SEO (no category base and post type archive breadcrumb title) +* Move Languages menu at top level instead of submenu of the WordPress settings +* Copy the original post date when creating a translation and when the date is synchronized (Props Jory Hogeveen) #32 +* Remove hreflang attributes on paged pages and paged posts +* Add label to widget language dropdown for better accessibility (Props Lawrence Francell) #53 #56 +* Remove constants POLYLANG_URL and PLL_LOCAL_URL +* wp_get_sidebars_widgets() and is_active_sidebar() are now filtered according to widgets languages #54 +* Add functions pll_esc_html__(), pll_esc_html_e(), pll_esc_attr__() and pll_esc_attr_e() to the API (Props jegbagus) #83 +* Pro: Fix conflict between WooCommerce shop on front and translated shop base slug +* Pro: Fix $wp_rewrite search base and author_base not translated #68 +* Pro: Fix page preview does not log in the user when using subdomains +* Fix: avoid setting the language cookie on 404 pages +* Fix: rewrite rules order modified for custom post types archives +* Fix: conflict with WP All Import causing our filters to fail in "Add Media" modal when editing a post +* Fix: auto add pages not working for nav menus assigned to several locations +* Fix: Jetpack infinite scroll for multiple domains #58 #74 +* Fix: serialize error in Strings translations when balanceTags option is active #63 +* Fix: static front page preview when redirected from the languages page #49 +* Fix: Auto add pages not working for nav menus assigned to several locations +* Fix: Conflict with Woocommerce Show Single Variation +* Fix: Parent page not synchronized in Quick edit (introduced in 2.0.8) +* Fix: WPML API wpml_element_has_translations and wpml_post_language_details +* Fix: unattached media translations not in language switcher +* Fix: Conflict with WP Residence advanced search + += 2.0.12 (2016-12-19) = + +* Fix plugin not loaded first (introduced in 2.0.11) +* Fix wrong translations files loaded when the language is set from the content in WP 4.7 #76 +* Fix notice when a tax query has no terms (using EXISTS or NOT EXISTS) + += 2.0.11 (2016-12-12) = + +* Pro: Fix shared term slugs broken by a late change in WP 4.7 #73 +* Pro: Fix media taxonomies lost when creating a media translation when taxonomies sync is activated #72 +* Fix fatal error in customizer when Twenty Seventeen is activated and another theme is previewed #71 +* Fix wrong plugin language on admin if user locale is different from site locale in WP 4.7 + += 2.0.10 (2016-12-05) = + +* Add support for front page panels of Twenty Seventeen +* Remove draft posts from the language switcher even when the user is logged in +* Fix: Make argument 2 of icl_object_id optional +* Fix a conflict with the Divi theme (#67) + += 2.0.9 (2016-11-15) = + +* Fix javascript error in some ajax requests + += 2.0.8 (2016-11-14) = + +* Disable admin language feature in WP 4.7+ +* Pro: fix case where a media could lose its parent post when translated on the fly by the content duplication +* Pro: fix on the fly media created at content duplication attached to parent page instead of child page +* Fix translations input fields not populated in languages metabox when creating a new translation in WP 4.7 +* Fix possibility to delete the translations of the default category in WP 4.7 +* Fix tag search not filtered per language in Quick edit in WP 4.7 +* Fix dropdown language switcher not working for untranslated pages + += 2.0.7 (2016-10-18) = + +* Fix issues with static front pages introduced in version 2.0.6 + += 2.0.6 (2016-10-17) = + +* Pro: Fix translated paged slug not working on paged static front page +* Add support for WPML filter 'wpml_language_form_input_field' +* Fix PHP notice when using the WPML filter 'wpml_current_language' +* Fix cases where the admin language filter is not correctly taken into account +* Fix paged static front pages in plain permalinks +* Fix paged static front pages for multiple domains (#43) +* Fix warning occurring when a 3rd party plugin attempts to register anything but a string in the strings translations panel +* Fix cross domain http request for media when using multiple domains or subdomains +* Fix error 404 on pages when no language has been created yet + += 2.0.5 (2016-09-22) Five years after! = + +* Pro: Fix conflict with WPBakery Visual Composer +* Pro: Fix conflict between multiple domains SSO and FORCE_SSL_ADMIN +* Pro: Fix duplicated fields not displayed in new translation in ACF Pro 5.4+ +* Add Tibetan and Silesian to the predefined languages list +* Remove duplicated strings from the strings translations (even when they have a different name or group) +* The languages and translations of custom post types and taxonomies are no more activated by default at activation +* Allow to deactivate auto translation in secondary by setting 'lang' to an empty value +* Fix: invalidate the cache of PLL_MO ids when adding a new language +* Fix: don't filter secondary queries when editing a post in an untranslated post type + += 2.0.4 (2016-09-06) = + +* Add Gujarati to the predefined languages list +* Fix conflict with Page Builder. Other parts of the conflict are fixed in Page Builder 2.4.14 +* Fix plugins translations incorrectly loaded in WP 4.6 +* Fix error 404 on paged urls when using a non standard port + += 2.0.3 (2016-08-16) = + +* Pro: Fix PHP notice when hiding the language code in url and the language is set from subdomains +* Pro: Fix one more media being created when the duplicate media in all languages is activated (introduced in 2.0) +* Pro: Fix shared term slugs not working on PHP 7 +* Pro: Fix Polylang storing integers in some ACF Pro fields where ACF Pro stores strings +* Pro: Fix ACF Pro custom fields synchronized even when the custom fields synchronization option is deactivated (#40) +* Fix PHP notice: Undefined variable: original_value in /modules/wpml/wpml-api.php on line 168 +* Fix translations loaded too soon by plugins not correctly reloaded since WP 4.6 (#39) +* Fix: Remove the delete link for translations of the default category on PHP 7 +* Fix unescaped i18n strings in Lingotek presentation + += 2.0.2 (2016-08-03) = + +* Avoid fatal error when a 3rd party theme or plugin has a malformed wpml-config.xml file: the malformed wpml-config.xml file is simply ignored + += 2.0.1 (2016-08-02) = + +* Fix fatal error on PHP < 5.4 (introduced in 2.0) +* Fix custom flags not being loaded (introduced in 2.0) + += 2.0 (2016-08-02) = + +* Pro: Improve integration with ACF Pro +* Pro: Add support for single sign on across multiple domains or subdomains +* Pro: Add support for browser language detection when using multiple domains +* Pro: Add support for translation of the static portion of the post permalink structure +* Pro: Fix deactivated languages appearing in Yoast SEO sitemaps +* Pro: Fix impossibility to visit a deactivated language when using subdomains or multiple domains (#10) +* Pro: Fix when sharing slug on the page for posts, only one of them is accessible (#33) +* Add the possibility to use the language switcher as dropdown in menu +* Add support for custom logo introduced in WP 4.5 (#6) +* The backend current language ( PLL()->curlang ) is now equal to the language of current post or term being edited (#19) +* The sample permalink is now updated when changing the language in the Languages metabox +* Revamp the wpml-config.xml reader to use simplexml instead of our custom xml parser +* Improve support for the WPML API (including Hook API introduced in WPML 3.2) +* Add support for translation of meta titles and descriptions of custom post types and custom taxonomies in Yoast SEO +* Replace uncached functions by WPCOM VIP functions when available +* Improve compatibility with WP 4.6 +* Fix parent category wrongly assigned to post when synchronizing children categories (#21) +* Fix custom fonts not loaded when using multiple domains or subdomains +* Fix remove_accents() not working for German and Danish (#24) +* Fix incorrect static front pages urls on backend +* Fix impossible to directly enter the page number in strings translation table (introduced in 1.9.3) +* Fix conflict with WP Sweep (needs WP Sweep 1.0.8+) +* Fix potential performance issue by querying only taxonomies to show in quick edit to filter the category checklist +* Fix conflict (database error) with ReOrder-posts-within-categories plugin +* Fix languages per page option not saved + += 1.9.3 (2016-06-28) = + +* Pro: Allow to add slashes in url slugs translations +* Pro: Fix archive links not using translated slugs +* Pro: Fix visitor being redirected to 404 if his browser preference is set to an inactive language +* Fix strings translations table always back to page 1 when submitting the form (#14) +* Fix get_pages( array( 'lang' => '' ) ) not querying all the languages +* Fix switching the admin language filter can override the static front page settings (#16) + += 1.9.2 (2016-06-06) = + +* Pro: fix unreachable hierarchical custom post type posts when they are sharing slugs across languages +* Fix missing argument 3 in icl_t +* Fix conflict with WooCommerce product variations + += 1.9.1 (2016-05-23) = + +* Pro: add compatibility with Beaver Builder +* Pro: fix media wrongly created when adding a new media translation +* Add azb, ceb, de_CH_informal, es_GT, mr, nl_NL_formal to the predefined list of languages +* Fix the language switcher not linking to media translations for anonymous visitors + += 1.9 (2016-04-27) = + +* Pro: add the possibility to translate custom post types slugs, taxonomies slugs and more +* Pro: add the possibility to share the same post or term slug across languages +* Pro: add the possibility to duplicate the content when creating a new translation +* Pro: add the possibility to create all translations at once when uploading a media +* Pro: add the possibility to disable a language +* Add license and update management +* Add inline docs for all filters and actions +* When possible, the rel alternate hreflang now display only the language code (without the country code) +* When combined with flags in the language switcher, wrap the language name inside tags +* Add customizer selective refresh support for the language switcher widget ( needs WP 4.5+ ) +* Fix dynamic options of the language switcher widget not working in the customizer +* Fix possible error 404 on page shortlink when using subdomains or multiple domains +* Fix get_adjacent_post() and wp_get_archives() for untranslated post types ( needs WP 4.4+ ) +* Fix language homepage urls not present in Yoast SEO sitemap (when the homepages display posts) + += 1.8.5 (2016-04-03) = + +* Revert from $_SERVER['PHP_SELF'] to $_SERVER['SCRIPT_FILENAME'] to detect if the user is on login/register/signup page +* Fix incompatibility introduced by WP 4.5 in Edit single taxonomy term screen +* Fix existing post overridden when creating a language and a conflicting plugin sets the global $post on languages pages + += 1.8.4 (2016-03-06) = + +* Revert canonical redirection of static front page when combining plain permalinks + default language hidden in url (introduced in 1.8.2) + += 1.8.3 (2016-03-04) = + +* fix: All pages are redirected to the home page on some installations (introduced in 1.8.2) + += 1.8.2 (2016-03-02) = + +* Add support for the 'wpml_get_default_language()' function from the WPML API +* Stop blocking saving settings when errors are detected (invalid domains) +* Use publicly_queryable => true instead of public => true for the language taxonomy (WP 4.5+) +* fix: PHP notice when pll_default_language() is called before a language is created +* fix: PHP notice undefined property PLL_Language::$page_on_front +* fix: canonical redirection of static front page when combining plain permalinks + default language hidden in url +* fix: YARPP compatibility broken in v1.8 +* fix: Remove the delete link for translations of the default category (introduced back by WP 4.3) +* fix: settings not displayed with WP 4.1 or older + += 1.8.1 (2016-01-31) = + +* Update the list of Facebook locales used for Opengraph support with Yoast SEO and Jetpack +* fix: secondary query with translated post type and untranslated taxonomy mixes languages (introduced in 1.8) +* fix: issue with paged static front page when hiding the default language in url +* fix: potential issue with cache after synchronizations +* fix: trailing slash added to canonical home url outputted by Yoast SEO when using default permalinks + += 1.8 (2016-01-19) = + +* Minimum WordPress version is now 4.0 +* Add ary, bn_BD, en_ZA, es_AR, fr_CA and fr_BE to the predefined languages list +* Adopt WordPress coding standards +* New structure for translated posts and terms (=> several methods of PLL_Model are deprecated). +* Revamp the management of the static front page and page for posts +* Improve performance for navigation menus with a lot of pages +* The Polylang and WPML API are now loaded when 'plugins_loaded' is fired (on frontend only if at least one language has been defined) +* Add 'pll_get_post_translations()' and 'pll_get_term_translations()' to the API +* Add filter 'pll_cookie_expiration' to change the cookie expiration time +* Add support for 'wpml_get_language_information()' function from the WPML API +* The default language is now managed directly from the languages list table +* Various accessibility improvements +* It is now possible to choose the languages flags from the available list (custom flags on frontend still work as previously) +* Revamp the settings page (now a list table with inline configuration) +* Add an option to remove all data when uninstalling the plugin +* Add test of subdomains and domains accessibility +* Add post state for translations of the front page and posts page +* Add better support of the customizer menus introduced in WP 4.3 +* Media taxonomies (created by 3rd party plugins) are now filtered by language when editing a media +* Synchronization of taxonomies (created by 3rd party plugins) and meta are now enabled for media +* The 'hreflang' tag now refers to the locale instead of the 2-letters language code +* Workaround for WordPress locales not being W3C valid (see #33511) +* Workaround a bug in Nextgen Gallery causing redirect on album +* Add compatibility with Duplicate Post plugin to avoid duplicated post keeping the link to translations +* Add compatibility with Jetpack Related Posts +* fix: incorrect rewrite rules after changing how the language is set (need to flush rewrite rules after this) +* fix: password protected pages don't work on multiple domains +* fix: ensure that the page parent is in the correct language when using bulk edit +* fix: is_tax set on category and post tags archives when it should not +* fix: automatically added new top-level pages to menus are not filtered by language +* fix: nav menus locations are messed when changing the default language +* fix: error 404 for untranslated taxonomies pages +* fix: single posts and pages links do not include the language code when using the default permalinks and forcing the language code in url +* fix: missing trailing slash on home url when using default permalinks or a static front page +* fix: sticky visibility is copied to new translation only if the synchronization is activated +* fix: remove "» Languages » [language name]" from the feed title +* fix: spaces are not honored when searching strings translations +* fix: default language not set and terms translations not correctly imported when using WordPress Importer +* fix: the browser language detection does not differentiate 'en_US' and 'en_GB' +* fix: non alphanumeric characters query vars values lead to an infinite redirection loop on static front pages +* fix: user profile not saved for a language when the language code contains a "-" +* fix: non translated posts page always link to the static front page even when they should not +* fix: remove hreflang="x-default" when using one domain per language +* fix: deprecated function notice in WP 4.5 alpha +* fix: wrong url for attachments when media are translated and using subdomains +* fix: wrong url for unattached attachments when using subdirectories (since WP 4.4) +* fix: wrong url scheme for custom flags + += 1.7.12 (2015-11-13) = + +* The language taxonomy is now public for compatibility with WP 4.4 +* fix: nav menus locations are not correctly populated in customizer in WP 4.4 +* fix: the termmeta table was still deleted at upgrade +* fix: fatal error when using the argument 'post_id' in 'pll_the_languages()' (introduced in 1.7.11) [props EKesty](https://wordpress.org/support/topic/bug-on) +* fix: potential notice in 'pll_the_languages()' [props mattkeys](https://wordpress.org/support/topic/bug-on) + += 1.7.11 (2015-10-15) = + +* fix: conflict with GET ajax requests sent by the jquery method load +* fix: notice in frontend-nav-menu.php at line 211 (introduced in 1.7.10) [props Jesse Graupmann](https://wordpress.org/support/topic/warning-and-notice-on-upgrade) +* fix: the parent list in page attributes metabox is not in the correct language (introduced in 1.7.10) +* fix: error 404 for attachments +* fix: the language switcher is not displayed when combining "Forces link to front page" and "Hides languages with no translation" + += 1.7.10 (2015-09-28) = + +* Add Occitan translation contributed by [Cédric Valmary](http://www.totenoc.eu/) +* Add de_DE_formal, en_NZ, es_CO, hy, oci, ps and tl to the predefined languages list +* Add the filter 'pll_predefined_languages' and the actions 'pll_language_edit_form_fields' and 'pll_language_add_form_fields' +* the termmeta table (used in Polylang < 1.2) is no more deleted when uninstalling the plugin (as it will soon be included in WP) +* fix: prevent creating a media translation if one already exists +* fix: Attempt to translate the nav menus for themes registering a theme location but not using it in wp_nav_menu() +* fix: Jetpack infinite scroll +* fix: issue with terms languages when two languages have the same name +* fix: notices when deleting a tag and Lingotek is active +* fix: the languages cache is not cleaned when updating the site home url +* fix: conflict with the theme Ambition +* fix: front page canonical url displayed by Yoast SEO +* fix: typo in options definition at install [props null.bit](https://wordpress.org/support/topic/suggestions-for-two-new-filters?replies=5#post-7466159) +* fix: error when adding a term in a non-translated taxonomy + += 1.7.9 (2015-08-17) = + +* Minimum WordPress version is now v3.9 +* Add: hreflang="x-default" on front page when the default language code is not hidden in urls +* fix: remove hreflang links in html head section of paged archives to please Google +* fix: conflict with WPSEO sitemap caching when using multiple domains. [props Junaid Bhura](https://wordpress.org/support/topic/wp-seo-sitemap-and-translation-subdomain-issue?replies=8#post-7113817) +* fix: change the order of strings translations columns for better display on mobile devices in WP 4.3 +* fix: various issues with nav menus and customizer in WP 4.3 +* fix: correctly disallow unchecking both show names and show flags in the language switcher form + += 1.7.8 (2015-07-21) = + +* fix: conflict with PHP < 5.4 introduced in 1.7.7 + += 1.7.7 (2015-07-20) = + +* Add Romanian translation contributed by uskro +* Add Japanese translation contributed by [Eiko Toda](http://www.eikotoda.com) +* Update French translation contributed by [fxbenard](http://fxbenard.com/) +* The language locale is now validated with the same pattern as in WP 4.3. See #28303 +* fix: make sure that the language switcher never finds translations for untranslated post types (could occur when the post type was previously translated) +* fix: display the default category according to the admin language filter in settings->writing +* fix: flushing rewrite rules at network activation and de-activation is back. [props RavanH](https://polylang.wordpress.com/2015/06/10/polylang-1-7-6-and-multisite/comment-page-1/#comment-1138) +* fix: avoid a conflict with WP Super Cache preloading (loading 'polylang_mo' posts which are 404). [props ecdltf](https://wordpress.org/support/topic/polylang_mo-and-404s-take-2) +* fix: customizer menus issues introduced by changes in WP 4.1 +* fix: strings translations are not saved when pressing enter +* fix: it is not possible to de-activate the translation for custom post types and taxonomies from wpml-config.xml +* fix: conflict with plugins using stringified json in ajax requests + += 1.7.6 (2015-06-10) = + +* Add Galician translation contributed by [Toño Calo](http://fedellar.wordpress.com/) +* fix: incorrect post type archive link for untranslated post types +* fix: notices in wp-import.php +* fix: avoid flushing rewrite rules at network activation and de-activation +* fix: the note below the category list table displays the default category according to the admin language filter +* fix: wrong future posts permalinks +* fix: deleting a media translation deletes the file too +* fix: when using persistent object cache, get_terms is not always filtered by the correct language on admin side +* fix: it is possible to create two categories having the same translation +* fix: fatal error when using the dropdown language switcher in WP < 4.1 + += 1.7.5 (2015-05-11) = + +* Add 'pll_languages_list' filter +* fix: warning when a plugin calls 'icl_object_id' with an untranslated post type (seen in ACF 4.4.1) +* fix: the language is not correctly set from the url when using PATHINFO permalinks (introduced in 1.6!) +* fix: notice when a search is filtered by a taxonomy term in a different language + += 1.7.4 (2015-05-03) = + +* fix: translated taxonomies and post types from wpml-config.xml are not filtered on frontend (introduced in 1.7.2) +* fix: WPML strings translations not always loaded (introduced in 1.7) +* fix: $.ajaxPrefilter() may not work as expected [props ScreenfeedFr](https://wordpress.org/support/topic/ajaxprefilter-may-not-work-as-expected) +* fix: can't hide the language code for the default language when using subdomains +* fix: incorrect static front page url when hiding the default language information +* fix: an untranslated posts page may display posts in all languages +* fix: javascript error when changing the language of a hierarchical post type from the languages metabox in WP 4.2 +* fix: subdomains urls are malformed when the main site uses www. +* fix: suggest tags are not filtered in quick edit +* fix: parent page dropdown list not filtered in quick edit + += 1.7.3 (2015-04-11) = + +* the transient 'pll_languages_list' now stores an array of arrays instead of an array of PLL_Language objects +* fix: fatal error for users hosted at GoDaddy (due to PLL_Language objects stored in a transient) +* fix: additional query vars are removed from home page +* fix: categories are not filtered by the admin language switcher in posts list table (introduced in 1.7) +* fix: when using multiple domains, the domain url is lost when modifying the language slug +* fix: the queried object is incorrectly set for author archives (introduced in 1.6.5) +* fix: notice when a nav menu assigned to a translated nav menu location has been deleted +* fix: no canonical redirection when using pretty permalinks and querying default permalinks + += 1.7.2 (2015-03-23) = + +* fix: comments are filtered for posts in a post type not managed by Polylang +* fix: translated static front page don't work when setting PLL_CACHE_HOME_URL to false (introduced in 1.7) +* fix: the query for taxonomies on custom post types is broken (when adding the language code to the url) + += 1.7.1 (2015-03-20) = + +* fix: wrong redirection when using a static front page and replacing the page name by the language code (introduced in 1.7) + += 1.7 (2015-03-19) = + +* Minimum WordPress version is now v3.8 +* Add new languages to the predefined languages list: Swiss German, Hazaragi +* Add compatibility with nested tax queries introduced in WP 4.1 +* Add compatibility with splitting shared terms to be introduced in WP 4.2 +* Add the possibility to change the domain in the default language when using multiple domains (avoids a conflict with the domain mapping plugin) +* Add the possibility to set the language from the code in url when using default permalinks +* Adding the language code in url is now default at first activation (should improve the out of the box compatibility with other plugins and themes) +* Add new language switcher option to hide a language with no translation +* pll_the_languages() now outputs the js code to handle language change in dropdown list (as done by the widget) +* Improve performance by using base64 encoded flags + various slight optimizations +* Improve protection against chained redirects +* The find posts list is now filtered per media language when clicking on attach link in Media library +* Copy alternative text when creating a media translation +* The category checklist in quick edit is now filtered per post language instead of admin language filter +* Quick and bulk language edit don't break translations anymore if the new language is free +* Make it impossible to change the language of the default categories +* Make sure that a default category defined in settings->writing is translated in all languages +* Tweak css for mobiles in add and edit term form +* Tweak the query getting the list of available posts in the autocomplete input field in the post languages metabox +* fix: after adding a term translation, need to refresh the page before adding a new term +* fix: term translations rows are not modified in list table when a term is added / deleted or inline edited +* fix: post translations rows are not modified in list table when a post is inline edited +* fix: using brackets in language name breaks strings translations +* fix: quick edit may conflict with other plugins +* fix: impossible to use several dropdown languages widgets +* fix: pll_the_languages() may display a dropdown with empty options +* fix: the categories widget does not work correctly with dropdown +* fix: autosave post always created after manual save +* fix: tax query not filtered by language when using 'NOT IN' operator on a translated taxonomy +* fix: incorrect translation url for searches filtered by taxonomy +* fix: backward incompatibility for edited_term_taxonomy action introduced in WP 4.2 +* fix: the home link may be incorrect on MS Windows +* fix: tags in wrong language may be assigned when bulk editing posts in several languages +* fix: tags created when bulk editing posts are not assigned any language +* fix: Illegal string offset 'taxonomy' introduced in v1.6.5 +* fix: Undefined property: WP_Query::$queried_object_id when calling pll_the_languages(array('raw' => 1)) in a function hooked to 'wp'. props [KLicheR](https://wordpress.org/support/profile/klicher) +* fix: Notice in admin.php when used with MailPoet plugin + += 1.6.5 (2015-02-18) = + +* Add new correspondences between WordPress locales and Facebook locales (for WPSEO and Jetpack users) +* fix: quick draft posts are always assigned the default category in the default language +* fix: Notice: Undefined offset: 0 in wp-includes/query.php introduced in WP 4.1 +* fix: is_tax and is_archive are not correctly set when a custom taxonomy term is queried +* fix: conflict introduced by WPSEO 1.7.2+ + += 1.6.4 (2015-02-01) = + +* Add es_MX to predefined languages list +* Add compatibility with WordPress SEO sitemaps for multiple domains and subdomains +* fix: a new post is assigned the wrong (untranslated) default category if no category is assigned by the user +* fix: the home links now have the right scheme even if PLL_CACHE_HOME_URL is not set to false +* fix: fatal error when using old versions of WPSEO (I should do what I tell other to do!) +* fix: strings translations are not switched when using switch_to_blog + += 1.6.3 (2015-01-09) = + +* Add Georgian translation contributed by [Tours in Georgia](http://www.georgia-tours.eu/) +* fix: WXR export does not include the language of untranslated terms (will now work only for newly saved terms) +* fix: better cleaning of DB when translated objects are deleted +* fix: incorrect (ajax) translations links when modifying a term language +* fix: warning: Illegal string offset 'taxonomy' introduced by the combination of WP 4.1 and some plugins. + += 1.6.2 (2014-12-14) = + +* fix: bugs and inconsistencies compared to WPML in 'icl_get_languages' (should fix a conflict with Avada) +* fix: https issue +* fix: stop displaying an error when adding en_US as new language (translation not downloaded) +* fix: infinite redirect loop on (unattached) attachment links +* fix: impossible to add tags in post quick edit (introduced in 1.5) +* fix: the customizer does not land to the right page when cumulating: static front page + page name in url + default language code not hidden +* fix: read parent theme wpml-config.xml before child theme +* fix: add protection to avoid empty language +* fix: page preview link again + += 1.6.1 (2014-11-19) = + +* Add Brazilian Portuguese translation contributed by [Henrique Vianna](http://henriquevianna.com/) +* Improve compatibility with Types: allow custom fields to be populated when creating a new translation +* Make it impossible to remove the translations of the default category +* Fix: possibility to add a path when using multiple domains (same path for all languages) broken since v1.5.6 +* Fix: preview link for non default language when using multiple domains +* Fix: error displayed when setting the static front page and only one language has been defined +* Fix: revert changes on rewrite rules with front introduced in 1.6 +* Fix: conflict with WordPress SEO when no language has been created + += 1.6 (2014-10-27) = + +* Add Croatian translation contributed by Bajro +* Add new languages to predefined languages list: Azerbaijani, English (Australia), English (UK), Basque +* Add flag in front of the language select dropdown for posts and terms +* Add widget text translation +* Add opengraph support for locale and translations when WordPress SEO or Jetpack are activated +* Add error message if attempting to assign an untranslated page as static front page +* Add 'pll_sanitize_string_translation' filter to sanitize registered strings translations when saved +* Fix: change the en_US flag to US flag. The UK flag is now associated to en_GB +* Fix: change Belarusian locale from be_BY to bel to in agreement with translate.wordpress.org +* Fix home pages duplicate urls when using domains or subdomains +* Fix rewrite rules with front +* Fix: terms are always in default language when created from post bulk edit + += 1.5.6 (2014-10-11) = + +* Fix: the admin language filter is not active for paginated taxonomy in nav menu admin panel +* Fix: wrong redirection if a domain is a substring of another domain (ex: mysite.com and mysite.co) +* Fix: impossible to translate numeric values in options defined in wpml-config.xml +* Fix: call to undefined method PLL_Links::get_translation_url() with Avada theme +* Fix: manage_{$this->screen->taxonomy}_custom_icolumn is a filter and not an action + += 1.5.5 (2014-09-10) = + +* Fix: missing argument 4 in icl_translate +* Fix: conflict with Vantage theme +* Fix: possible issue with cookie domain on 'localhost' +* Fix: filtering string translations does not work when the group name contains a space +* Fix: Possible 404 error for attachments +* Fix: PHP notice when a shared term is not translated in all taxonomies + += 1.5.4 (2014-08-13) = + +* Add new API functions: pll_get_post_language, pll_get_term_language, pll_translate_string +* Add better compatibility with Jetpack 3 +* Fix: attachments don't get any language when uploaded from frontend +* Fix: authors cannot create tags +* Fix: too restrictive capability checks for some edge cases +* Fix: conflict with WPSEO: taxonomy metas cannot be saved + += 1.5.3 (2014-07-12) = + +* Add: Capability check before creating links in post list table +* Add: Possibility not to cache languages objects with option PLL_CACHE_LANGUAGES (for GoDaddy users) +* Fix: Saving a header or a background in menu Appearance resets nav menus locations (introduced in 1.5) +* Fix: sub-sub-options and deeper levels defined in wpml-config.xml are not translated +* Fix: Fatal error when creating a new site when Polylang is network activated (introduced in v1.5.1) +* Fix: Admin language forced to English when activating Polylang (before creating any new language) +* Fix: 'pll_count_posts' second parameter not taken into account +* Fix: 'edit-post' and 'create-posts' capabilities are not differentiated when saving a post + += 1.5.2 (2014-06-24) = + +* Fix: Revert post translations terms cleaning introduced in 1.5 as it seems to cause problems +* Fix: Impossible to delete a biographical info (introduced in 1.5) +* Fix: Security issue reported by [Gregory Viguier](http://www.screenfeed.fr/) + += 1.5.1 (2014-06-19) = + +* Add: filter 'pll_settings_tabs' and action 'pll_settings_active_tab_{$tab}' +* Add: possibility to add a path when using multiple domains (same path for all languages) +* Fix: Bad redirection if /language/ is added to urls (introduced in 1.5) +* Fix: Nav menu locations are not saved in customizer (introduced in 1.4) +* Fix: Unable to unset nav menu locations +* Fix: Incorrect link for date archives in language switcher (introduced in 1.5) +* Fix: Fatal error when using featured content in Twenty Fourteen +* Fix: Posts bulk edit broken (introduced in 1.5) +* Fix: Polylang does not play nice with switch_to_blog +* Fix: Warning: reset() expects parameter 1 to be array, null given in admin-filters-columns.php on line 81 + += 1.5 (2014-05-29) = + +* Add Ukrainian translation contributed by [http://getvoip.com/](http://getvoip.com/) +* Refresh translation metaboxes (again): now translated posts are chosen from an autocomplete input field +* Categories and post tags translations are also chosen in an autocomplete input field +* Better error management on languages pages +* Use Dashicons instead of Icomoon icons for WP 3.8+ +* Check if translated post is readable by the current user before displaying the language switcher +* Minimum Twenty Fourteen version is now 1.1 +* Code cleaning +* Add support for Quick draft introduced in WP 3.8 +* Add support for object cache plugins for recent posts and recent comments widgets +* Add support for pages with modified query in the language switcher (ex: when multiple post types queried on the same page) +* Add new API functions: pll_languages_list, pll_set_post_language, pll_set_term_language, pll_save_post_translations, pll_save_term_translations, pll_count_posts +* Add new filter pll_the_languages_args +* Add support for ICL_LANGUAGE_CODE == 'all' on admin side +* Fix: Galician flag +* Fix: static page on front pagination is broken +* Fix: search url may be broken +* Fix: PHP notice in icl_get_languages +* Fix: more robust way of detecting language in url when using directory +* Fix: delete translations terms orphans in database +* Fix: inconsistent behavior when setting page on front from customizer +* Fix: deleting a category assigns posts to wrong default category +* Fix: quick edit breaks synchronization +* Fix: some security issues + += 1.4.5 (2014-04-19) = + +* Fix: Notice when combined with WPSEO 1.5+ +* Fix: Impossible to disable a widget language filter once set (introduced in 1.4.4) +* Fix: Unexpected redirection of the homepage with language code when permalink structure has no trailing slash (introduced in 1.4.4) +* Fix: Some installs lead to wrong redirection when using domains (introduced in 1.4.4) +* Fix: Possible infinite redirection while previewing posts (introduced in 1.4.4) +* Fix: Uploaded medias don't get a language since WP 3.9 +* Fix: Compatibility with Twenty Fourteen Ephemera widget in the version shipped with WP 3.9 + += 1.4.4 (2014-04-09) = + +* Add: Compatibility with widgets customizer introduced in WP 3.9 +* Fix: No post in translation dropdown after switching the language in edit post (introduced in 1.4.3) +* Fix: No canonical redirection when there is no language code in url and the language code is not hidden for the default language +* Fix: Suppress language cookie when using multiple domains + += 1.4.3 (2014-03-22) = + +* Add: Serbian translation contributed by Sinisa +* Add: Myanmar translation contributed by Sithu Thwin +* Fix: comment form redirects to wp-admin when using multiple domains or subdomains. +* Fix: fatal error with old versions of PHP (tested on PHP 5.2.4) +* Fix: Bad gateway experienced by users hosted by wpengine.com +* Fix: links got from tiny MCE link button are filtered with admin language filter instead of current post language +* Fix: possibly wrong redirection in check_language_code_in_url when using multiple domains or subdomains + += 1.4.2 (2014-02-24) = + +* Add: check multiple post types in PLL_Model::count_posts +* Fix: error 404 on category links when setting the language by content (introduced in 1.4.1) +* Fix: PHP notices in frontend-nav-menu.php with Artisteer themes +* Fix: decrease the memory usage of untranslated posts list +* Fix: home page not correctly redirected to canonical when using page on front and page name is kept in url + += 1.4.1 (2014-02-16) = + +* Add: Czech translation contributed by [Přemysl Karbula](http://www.premyslkarbula.cz) +* Fix: the displayed language is not correct in quick edit for categories and post tags +* Fix: the language switcher does not display the correct link for translated parent categories if only children have posts +* Fix: 3rd parameter of icl_object_id is not optional +* Fix: issue when combining multiple domains and browser detection -> the combination is now forbidden +* Fix: conflict Shiba Media Library: link between media translations is lost when using media quick edit +* Fix: notice when using taxonomies in wpml-config.xml +* Fix: incorrect post format link +* Fix: Twenty Fourteen Ephemera widget strings are not translated + += 1.4 (2014-01-22) = + +* Add Traditional Chinese translation contributed by [香腸](http://sofree.cc/) +* Minimum WordPress version is now v3.5 +* Refresh translations metaboxes: now translated posts are chosen in a dropdown list +* Check if translated archives for category, tag and post format are empty before displaying the language switcher +* Add specific management of translated featured tag in Twenty Fourteen +* Add the possibility not to cache homepage urls with option PLL_CACHE_HOME_URL (for users having several domains). +* The function get_pages is now filtered by language +* Ajax requests on frontend are now automatically detected. It is no more necessary to set 'pll_load_front' :) +* Various performance improvements +* 'pll_get_post_types' and 'pll_get_taxonomies' filters must be added *before* 'after_setup_theme' is fired +* Pre 1.2 data will be removed from DB at first upgrade at least 60 days after upgrade to 1.4 +* Removed some duplicate code between admin and frontend +* Bug correction: incorrect pagination when using domains or subdomains +* Bug correction: post format link not translated +* Bug correction: impossible to use child terms with same name in hierarchical taxonomies +* Bug correction: the terms list table is filtered according to new translation language instead of admin language filter + += 1.3.1 (2013-12-13) = + +* Bug correction: fatal error on settings page if a static front page without language is set +* Bug correction: wrong home url when using different domains per language + += 1.3 (2013-12-11) = + +* Refresh admin UI for better look in WP 3.8 and more dynamic comportment +* The "Detect browser language" option does now also controls returning visits (based on cookie). +* Improved performance by optimizing some queries for WP 3.5+ +* The user biography in default language is now stored in default WordPress usermeta +* Add language parameter in API function pll_home_url and allow to call it on admin side +* Calling 'get_terms' with the 'lang' parameter now uses a cache object per language +* Bug correction: conflict with unstranslated taxonomies +* Bug correction: possible malformed translation archive url in language switcher +* Bug correction: a wrong language may be displayed in quick edit dropdown +* Bug correction: it is possible to add multiple translations (in the same language) for a single taxonomy term +* Bug correction: non public post types and taxonomies are visible in Polylang settings +* Bug correction: the language is always chosen from cookie (or browser preferences) in some installations +* Bug correction: Firefox language preference is not recognized when comparison is made on locale (instead of ISO 639-1 language code) +* Bug correction: incorrect tax_query in PLL_Auto_Translate + += 1.2.4 (2013-11-28) = + +* Better support for theme customizer +* Bug correction: admin bar search does not filter by language +* Bug correction: possible conflict on secondary query when querying taxonomies or single page +* Bug correction: post type is not included in url when editing or adding a term translation +* Bug correction: various warnings and PHP notices + += 1.2.3 (2013-11-17) = + +* Avoid fatal error when upgrading with Nextgen Gallery active +* Bug correction: menus locations of non default language are lost at theme deactivation +* Bug correction: impossible to set menus locations of non default language in some specific cases +* Bug correction: bbpress admin is broken + += 1.2.2 (2013-11-14) = + +* Updated Polish translation thanks to [Bartosz](http://www.dfactory.eu/) +* Delay strings translations upgrade from 'wp_loaded' to 'admin_init' to avoid fatal error when wp-ecommerce is active +* Remove Jetpack infinite scroll compatibility code as it seems useless with new Polylang 1.2 code structure +* Bug correction: fatal error when doing ajax on frontend +* Bug correction: ICL_LANGUAGE_CODE incorrectly defined when doing ajax on frontend +* Bug correction: ['current_lang'] and ['no-translation'] indexes disappeared from pll_the_languages raw output +* Bug correction: invalid argument supplied for foreach() in /polylang/include/mo.php on line 57 +* Bug correction: cookie may not be correctly set +* Bug correction: languages columns may not be displayed in custom post types and custom taxonomies tables + += 1.2.1 (2013-11-11) = + +* Update badly encoded Latvian translation +* Suppress one query in PLL_WPML_Config when not in multisite +* Bug correction: strings translations are not correctly upgraded +* Bug correction: nav menus locations are not correctly upgraded for non default language + += 1.2 (2013-11-10) = + +This version does include important changes in database. More than ever, make a database backup before upgrading + +* Add Arabic translation contributed by [Anas Sulaiman](http://ahs.pw/) +* Major rewrite with new structure +* Change the language and translations model from meta to taxonomy (no extra termmeta table created anymore) +* Move the strings translations from option to a custom post type +* Add support for language code in subdomain and for one different domain per language (experimental) +* Add support of WordPress Importer plugin. Export must have been done with Polylang 1.2+ (experimental) +* Add support for theme navigation customizer (was de-activated by Polylang since WP 3.4) +* Request confirmation for deleting a language +* Better management of default category for each language +* Now check if date and post type archives are translated before displaying the language switcher +* Update management of the 'copy' action of the custom fields section in wpml-config.xml +* Add support for ICL_LANGUAGE_CODE and ICL_LANGUAGE_NAME of the WPML API on admin side +* Add support of WPSEO custom strings translations when the language is set from content +* Modify admin language filter for valid html and better visibility +* Synchronization is now disabled by default (due to too much conflicts / questions on the forum) +* Include rel="alternate" hreflang="x" selflink per google recommendation +* Improve inline documentation +* Bug correction: wrong datatype for second argument in polylang/include/auto-translate.php (introduced in 1.1.6) +* Bug correction: same id is used for all language items in menu +* Bug correction: wpml-config.xml file not loaded for sitewide active plugins on network installations +* Bug correction: page parent dropdown list (in page attributes metabox) not correctly displayed when switching from a language with empty list + += 1.1.6 (2013-10-13) = + +* Add the possibility to display the upgrade notice on plugins page +* Bug correction: Illegal string offset 'taxonomy' in polylang/include/auto-translate.php +* Bug correction: user defined strings translations are not loaded on admin side +* Bug correction: untranslated post types are auto translated +* Bug correction: tags are not added to post when the name exists in several languages and they are not translations of each other + += 1.1.5 (2013-09-15) = + +* Add compatibility with Aqua Resizer (often used in portfolio themes) +* Add support of 'icl_get_default_language' function from the WPML API +* Remove the 3 characters limitation for the language code +* Change default names for zh_CN, zh_HK, zh_TW +* Bug correction: urls are modified in search forms + += 1.1.4 (2013-08-16) = + +* Add simplified Chinese language contributed by [Changmeng Hu](http://www.wpdaxue.com) +* Add Indonesian language contributed by [ajoull](http://www.ajoull.com/) +* Bug correction: nav menu locations are lost when using the admin language filter +* Bug correction: the cookie is not set when adding the language code to all urls (introduced in 1.1.3) + += 1.1.3 (2013-07-21) = + +* Add Venetian language contributed by Michele Brunelli +* Bug correction: wrong rewrite rules for non translated custom post type archives +* Bug correction: 'post_id' parameter of pll_the_languages does not work +* Bug correction: warning in wp_nav_menu_objects with Artisteer generated themes +* Bug correction: warning when used together with theme my login plugin +* Bug correction: language slug is modified and translations are lost when creating a nav menu with the same name as a language + += 1.1.2 (2013-06-18) = + +* Posts and terms now inherit parent's language if created outside the standard WordPress ui +* Improve the compatibility with the plugins Types and The Events Calendar, and again with WordPress SEO +* Improve performance +* Improve html validation +* Add 'raw' argument to 'pll_the_languages' +* Add the filter 'pll_translation_url' +* Bug correction: no language is set for a (translated custom taxonomy) term when added from a (non translated) custom post type edit page +* Bug correction: warning if 'get_terms' is called with a non-array 'include' argument (introduced in 1.1.1) +* Bug correction: warning if the menu language switcher has nothing to display + += 1.1.1 (2013-05-20) = + +* Move nav menu language switcher split from 'wp_nav_menu_objects' to 'wp_get_nav_menu_items' filter +* Add the filter 'pll_redirect_home' +* Automatically translate ids in 'include' argument of 'get_terms' (useful for the menus in the Suffusion theme) +* Add compatibility with Jetpack infinite scroll +* Bug correction: rtl text direction not set when adding the language code to all urls (introduced in 1.1) +* Bug correction: hide again navigation panel in theme customizer as it still doesn't work +* Bug correction: is_home not set on translated page when searching an empty string +* Bug correction: fatal error when creating a post or term from frontend (introduced in 1.1) +* Bug correction: attachments may load a wrong language when media translation was enabled then disabled +* Bug correction: warning when querying posts before the action 'wp_loaded' has been fired (in auto-translate.php) +* Bug correction: potential issue if other plugins use the filter 'get_nav_menu' +* Bug correction: interference between language inline edit and search in admin list tables +* Bug correction: auto-translate breaks queries tax_query when the 'field' is set to 'id' +* Bug correction: search is not filtered by language for default permalinks (introduced in 1.1) +* Tests done with WP 3.6 beta 3 and Twenty thirteen + += 1.1 (2013-05-10) = + +* When adding the language to all urls, the language is now defined in (plugins_loaded, 1) for better compatibility with some plugins (WordPress SEO) +* When querying posts and terms, ids are now automatically translated +* Add the possibility to group string translations +* Add the possibility to delete strings registered with 'icl_register_string' +* Move the option 'polylang_widgets' in general polylang options +* Better integration of the multilingual nav menus (everything is now integrated in the menus page of WordPress +* The language switcher is now a menu item which can be placed everywhere in a nav menu +* Posts or terms created from frontend are now assigned the current language (or another one if specified in the variable 'lang') +* Bug correction: continents-cities-xx_XX.mo not downloaded +* Bug correction: a gzipped 404 page is downloaded when a mo file does not exist on WordPress languages files repository +* Bug correction: post_date_gmt not synchronized together with post_date +* Tests done with WP 3.6 beta 2 and Twenty thirteen + += 1.0.4 (2013-04-08) = + +* Add Estonian translation contributed by [Ahto Naris](http://profiles.wordpress.org/ahtonaris/) +* Now compatible with languages files stored in wp-content/languages/themes +* Bug correction: page preview does not work when adding the language code to all urls +* Bug correction: error when a post type or taxonomy label is not a string +* Bug correction: admin text section of wpml-config.xml (introduced in 1.0.3) +* Bug correction: infinite redirect loop when querying an unattached media and the language code is added to all urls +* Bug correction: the text direction is not set from Polylang options when the language code is added to all urls +* Bug correction: get_adjacent_post is filtered by language even for post types without language +* Bug correction: the home url is not not in the correct language in wp-login.php +* Bug correction: the language is not correctly set when using date and name permalinks (introduced in 1.0.3) + += 1.0.3 (2013-03-17) = + +* Add Catalan translation contributed by [Núria Martínez Berenguer](http://nuriamb.capa.webfactional.com) +* Add Ukrainian translation contributed by [cmd soft](http://www.cmd-soft.com/) +* Improve compatibility with WordPress SEO (sitemap for categories and tags) +* A query is no more filtered by language when setting the parameter 'lang' to an empty value +* Add the possibility to create a custom wpml-config.xml file in wp-content/polylang/ +* Bug correction: custom menus are not displayed on search page (introduced in 1.0.2) +* Bug correction: sql error when filtering terms by language (introduced in 1.0.2) +* Bug correction: SSL doesn't work properly +* Bug correction: php notice on IIS servers +* Bug correction: clicking on the radio buttons in the admin language switcher does not work in Chrome +* Bug correction: on multisite, the signup page is redirected to the home page +* Bug correction: date archives are not correctly filtered for the default language when hiding the language code and using date and name permalinks +* Bug correction: only one wpml-config.xml file is parsed + += 1.0.2 (2013-02-26) = + +* Add the possibility to query comments by language +* Add the possibility not to set a cookie by defining PLL_COOKIE to false (Polylang may not work as expected on some pages) +* Now a returning visitor is redirected to its preferred language when visiting the front page in the default language +* Add compatibility with the plugin Custom field template (copy and synchronize custom fields) +* Improve compatibility with plugins or themes which overwrite columns in posts list table +* Add the filter 'pll_get_flag' +* Add support of 'icl_unregister_string' function from the WPML API +* Bug correction: synchronizing custom fields breaks the plugin Advanced Custom Fields +* Bug correction: 'pll_default_language' broken +* Bug correction: rewrite rules are not flushed when re-activating the plugin +* Bug correction: feed urls are not correctly escaped when using default permalinks +* Bug correction: notice Undefined index: media_support +* Bug correction: custom post types and taxonomies set in wpml-config.xml are not hidden +* Bug correction: get_terms cannot query multiple languages +* Bug correction: 'icl_register_string' is now persistent as in WPML (fixes Nextgen gallery translations which were not working) + += 1.0.1 (2013-01-28) = + +* Add Swedish translation contributed by [matsii](http://wordpress.org/support/profile/matsii) +* Add 2 new API functions : 'pll_is_translated_post_type' and 'pll_is_translated_taxonomy' +* Bug correction: when using a static front page, the posts page is not filtered by language (introduced in 1.0) +* Bug correction: disable translation for hard coded menu as it creates more problems than it solves (introduced in 1.0) + += 1.0 (2013-01-24) = + +* Add Hungarian translation contributed by Csaba Erdei +* Add Norwegian translation contributed by [Tom Boersma](http://www.oransje.com/) +* Add Slovak translation contributed by [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/user-reviews/) +* Code cleaning -> remove compatibility with versions older than 0.8 +* Add search in the string translations list table +* Add options to better control the synchronization of various metas for posts +* It is now possible to synchronize sticky posts and publication dates +* Add option to disable the multilingual support of media +* Add options to better control the multilingual capability of custom post types and taxonomies +* Better integration with new media management in WP 3.5 +* Improve menu translation for themes which register a theme location but don't use it in wp_nav_menu (hard coded menu) +* Add the pll_preferred_language filter allowing plugins to modify the language set by browser preferences detection +* Add support of the WPML config file +* Add support of 'icl_get_languages' and 'icl_link_to_element' functions from the WPML API +* Add compatibility with YARPP and improve compatibility with WordPress SEO +* Change cookie name which conflicts with Quick cache and allow users to overwrite it by defining the constant PLL_COOKIE +* Bug correction: again the canonical redirection +* Bug correction: the languages are not correctly displayed after they have been modified using quick edit +* Bug correction: undefined index notice when saving strings translation when the admin language filter is active +* Bug correction: rewrite rules are not correctly flushed when adding / deleting a language (introduced in 0.9.2) +* Bug correction: the list of pages is displayed when a static font page translation is not translated (now replaced by the list of posts) +* Bug correction: permalinks are not modified when doing cron and the language code is added to all urls +* Bug correction: creating a new term with the same name as a language may modify the language code (slug) + += 0.9.8 (2012-12-05) = + +* Bug correction: ajax on frontend does not work when adding the language code to all urls +* Bug correction: search forms using the get_search_form filter do not work + += 0.9.7 (2012-12-04) = + +* Bug correction: the admin language filter does filter non translatable post types +* Bug correction: again the canonical redirection +* Bug correction: fatal error when Polylang is used together with 'Author Avatars List' +* Bug correction: widget titles uselessly appear in the strings translations table when the widget is set for only one language +* Tests done with WordPress 3.5 RC3 and Twenty Twelve + += 0.9.6 (2012-11-26) = + +* It is now possible to query the terms by language using the WordPress function 'get_terms' +* Bug correction: search for empty string in default language displays posts in all languages when hiding the URL language information for default language +* Bug correction: completely reworked the canonical redirection introduced in 0.9.5 which created more problems than it solved +* Bug correction: ajax for media translations does not work +* Started tests with WordPress 3.5 RC1 and Twenty Twelve + += 0.9.5 (2012-11-13) = + +* The user can now choose the number of languages and strings translations to display +* Add compatibility with the 'icl_object_id' function and ICL_LANGUAGE_CODE and ICL_LANGUAGE_NAME constants from the WPML API +* Add 17 languages to the predefined list (automatic download and update of language files won't work) +* Bug correction: post preview does not work when adding the language code to all urls +* Bug correction: redirect to front page in default language when posting a comment on static front page +* Bug correction: impossible to create terms with the same name in different languages +* Bug correction: query string added by other plugins is erased when adding the language code to all urls +* Bug correction: redirect erase 'POST' variables on homepage when adding the language code to all urls +* Bug correction: English (en_US) loads rtl style when using a localized WordPress package with an rtl language +* Bug correction: on some installation strings translations do not work with some special characters +* Bug correction: incoming links are not redirected to canonical url when adding the language code to all urls and hiding the code for the default language +* Bug correction: search form does not work in non default language when using permalinks without trailing slash + += 0.9.4 (2012-10-23) = + +* Add Afrikaans translation contributed by [Kobus Joubert](http://translate3d.com/) +* Add Belarusian translation contributed by [Alexander Markevitch](http://fourfeathers.by/) +* Add Afrikaans (af) and Belarusian (be_BY) to predefined languages list (automatic download and update of language files won't work) +* Add the possibility to translate the date format and time format +* Add compatibility with the 'icl_get_home_url' function from the WPML API +* Bug correction: still some issues with string translations +* Bug correction: search is not filtered by the (default) language when the language is set by content and the language code is hidden for the default language +* Bug correction: posts & pages preview urls are broken when adding the language code to all urls +* Bug correction: automatically added new top-level pages to menus are not filtered by language +* Bug correction: the admin language filter messes the categories languages when editing a post and the parent dropdown list when editing a category +* Bug correction: search form does not work when using a static front page (introduced in 0.9.2) +* Bug correction: can't set languages for categories and post tags on blogs created after polylang has been activated at network level +* Bug correction: menus don't work with catch box theme ('has_nav_menu' not correctly filtered) + += 0.9.3 (2012-10-08) = + +* Add Bulgarian translation contributed by [pavelsof](http://wordpress.org/support/profile/pavelsof) +* Add compatibility with WPML API for strings translations +* Bug correction: dates are not translated (introduced in 0.9.2) +* Bug correction: the language is lost when keeping - No change - for language in bulk edit +* Bug correction: categories and tags are duplicate (when default language is set automatically to existing content and categories and tags share the same name) + += 0.9.2 (2012-09-30) = + +* Support new WordPress (WP 3.5+) convention for js and css files naming +* Improve performance, mainly on frontend +* Bug correction: the category language is not set when creating it in the post editor (introduced in 0.9) +* Bug correction: unable to add a query string when using a static front page +* Bug correction: ajax tag suggestion in "edit post" conflicts with the admin content language filter +* Bug correction: ugly notices when trying to access a static front page which has not been translated +* Bug correction: the language code is added to custom post types and taxonomies permalinks even if they are not translatable +* Bug correction: some arrays in wp_locale mix English and other language +* Bug correction: the media language is not correctly set when uploading from post if the post has not been saved after choosing the language + += 0.9.1 (2012-09-20) = + +* Add Finnish translation contributed by [Jani Alha](http://www.wysiwyg.fi) +* Bug correction: improve the robustness of the admin content language filter +* Bug correction: the language switcher displays languages which have no posts or pages (introduced in 0.9) +* Bug correction: wrong default language when adding a new media +* Bug correction: the dropdown language switcher does not switch language when there is no post translation +* Bug correction: issue with translations when using category quick edit +* Bug correction: home redirects to 404 when combining static front page + force_lang = 1 + hide_default = 0 + += 0.9 (2012-09-12) = + +* Add Turkish translation contributed by [darchws](http://darch.ws/) +* Add media translation support +* Add a persistent content language filter on admin side (WP 3.2+ required) +* Add biographical info translation +* Add multiline support for string translations +* Add the possibility to clean the strings translation database +* Add quick edit and bulk edit support for posts and pages +* Add quick edit support for categories and tags +* The language is now loaded with 'setup_theme' action instead of 'wp' action when always adding language information url +* Search form now does use javascript only for searchform.php when pretty permalinks are not used +* Add the option PLL_SEARCH_FORM_JS to disable the js code used to modify the search form +* Suppress the option PLL_SYNC, replaced by an option in the language settings ui +* Suppress the PLL_DISPLAY_ALL option +* Suppress the template tag 'the_languages' (replaced by 'pll_the_languages' since v0.5) +* Suppress the function 'pll_is_front_page' (useless since 0.8.2) +* Bug correction: the browser language is sometimes not correctly detected by Android +* Bug correction: the rtl text direction is not correct when editing an existing language +* Bug correction: rss feed does not work if translated site title or tagline contains special characters +* Bug correction: post types and taxonomies labels are not translated on frontend +* Bug correction: the filter 'pll_copy_post_metas' does not work for metas with multiple values +* Bug correction: translations table for post and terms are uselessly serialized two times +* Bug correction: attempt to suppress conflict with themes which hardcode the name of nav menus (but do define a theme location) +* Bug correction: homepage displays all posts when the front page displays a static page and no page is selected for front page (but one is selected for posts page) +* Bug correction: widgets disappear when Polylang is enabled + += 0.8.10 (2012-08-06) = + +* Add Lithuanian (lt_LT) to predefined languages list (automatic download and update of language files won't work) +* Add Lithuanian translation contributed by [Naglis Jonaitis](http://najo.lt/) +* Bug correction: empty string translation issue +* Bug correction: 'wp_list_pages' does not filter custom post types +* Bug correction: warning if posts are queried before the action 'wp_loaded' has been fired +* Bug correction: notice in twentyten when requesting a date archive with no posts + += 0.8.9 (2012-07-20) = + +* Add Portuguese translation contributed by [Vitor Carvalho](http://vcarvalho.com/) + += 0.8.8 (2012-07-18) = + +* Validation improvement thanks to kg69design +* Bug correction: custom post types rewrite rules are broken when registered with query_var=>false +* Bug correction: user admin language not deleted when uninstalling the plugin +* Bug correction: pll_current_language('name') returns locale instead of language name +* Bug correction: ajax on frontend does not work +* Bug correction: homepage pagination broken when redirecting the language page to a static front page +* Bug correction: taxonomies conflicts on custom post types +* Bug correction: the admin language is not updated when edited by other users + += 0.8.7 (2012-06-10) = + +* Add the possibility to load Polylang API for ajax requests on frontend +* Bug correction: search form is broken when using a static front page +* Bug correction: admin bar search does not work +* Tests done with WordPress 3.4 RC2 + += 0.8.6 (2012-05-23) = + +* Add the possibility to use a local config file to set options +* Improve robustness (less PHP notices) +* Bug correction: Menus not showing in preview mode +* Bug correction: fatal error when customizing a theme in WP 3.4 beta 4 +* Bug correction: second page of search results returns 404 when using pretty permalinks + += 0.8.5 (2012-05-14) = + +* Bug correction : sites using static front page are messed in v0.8.4 + += 0.8.4 (2012-05-13) = + +* Add a new argument 'post_id' to the function pll_the_languages to display posts translations within the loop +* Bug correction: every posts in every languages are shown on the homepage when requesting the wrong one with or without 'www.' +* Bug correction: every posts in every languages are shown when requesting /?p=string +* Bug correction: the language is not correctly set for wp-signup.php and wp-activate.php +* Bug correction: wrong home links when using permalinks with front with WP 3.3 and older +* Bug correction: wrong redirection after posting a comment when adding the language information to all urls +* Bug correction: term language may be lost in some situations +* Bug correction: post language is set to default if updated outside the edit post page +* Bug correction: javascript error in WP 3.1 +* Bug correction: can't toggle visibility of tags metabox in edit post panel +* Tests done with WordPress 3.4 beta 4 + += 0.8.3 (2012-04-10) = + +* Add Danish translation contributed by [Compute](http://wordpress.org/support/profile/compute) +* Add Spanish translation contributed by Curro +* Add the possibility to add a content in a different language than the current one by setting explicitly the lang parameter in the secondary query +* Add support of PATHINFO permalinks +* Bug correction: secondary queries not correctly filtered by language +* Bug correction: wrong archives links when using permalinks with front +* Bug correction: wrong homepage link when keeping 'language' in permalinks with front +* Bug correction: flush_rewrite_rules notice when setting up a static front page (introduced in 0.8.2) +* Bug correction: every posts in every languages are shown when hitting the homepage with a query string unknown to WP (thanks to Gonçalo Peres) +* Bug correction: every posts in every languages are shown on the homepage when PHP adds index.php to the url +* Tests done with WordPress 3.4 beta 1 + + += 0.8.2 (2012-03-20) = + +* Add Italian translation contributed by [Luca Barbetti](http://wordpress.org/support/profile/lucabarbetti) +* Improve performance on admin side +* Comment status and ping status are now copied when adding a new translation +* Deprecated API function 'pll_is_front_page' as it is now useless +* Bug correction: Wrong translation url for taxonomies when adding the language information to all urls +* Bug correction: "translation" of search page does not work if the site is only made of pages +* Bug correction: wrong language permalink structure introduced in 0.8.1 +* Bug correction: wrong language set when clicking on "add new" translation in edit category and edit tags panels +* Bug correction: site does not display if no languages are set +* Bug correction: get_author_posts_url is 404 +* Bug correction: homepage is 404 when using a static front page and adding the language information to all urls + += 0.8.1 (2012-03-11) = + +* Add Latvian translation contributed by [@AndyDeGroo](http://twitter.com/AndyDeGroo) +* It is now possible to synchronize multiple values for custom fields +* Add new API function pll_current_language +* Add the pll_rewrite_rules filter allowing plugins to filter rewrite rules by language +* WP 3.4 preparation: disable the menu section in the customize theme admin panel (unusable with Polylang) +* Bug correction: removing 'language' in permalinks does not work in WP 3.4 alpha +* Bug correction: problems with custom post type archives when 'has_archive' is set (thanks to AndyDeGroo) +* Bug correction: 404 error when combining %postname% permastructure with "Add language information to all URL" option +* Bug correction: translated custom strings are duplicated if registered several times +* Bug correction: queries with an array of post types are not correctly filtered +* Bug correction: wp-login.php always in English + += 0.8 (2012-02-29) = + +* Sticky posts are now filtered by language +* It is now possible to use the language page as home page +* Add an "About Polylang" metabox on the languages admin page +* Add the pll_the_languages filter allowing to filter the whole output of the language switcher +* Add a new argument 'display_names_as' to the function pll_the_languages +* Add pll_get_post_types & pll_get_taxonomies filters allowing to enable / disable the language filter for post types & taxonomies +* Add ckb to predefined languages list +* Completely reworked the string translation storage in the database +* Some performance improvements on admin side +* Improve compatibility with other plugins broken by the home url filter +* Add an option to disable the home url filter +* Add an option to disable synchronization of metas between translations +* Bug correction: body class 'home' is not set on translated homepage +* Bug correction: robots.txt is broken when adding the language code to all urls (including default language) +* Bug correction: bad name for the Czech flag +* Bug correction: bad language information in rss feed for WP < 3.4 +* Bug correction: signup broken on multisite +* Bug correction: the translation url is set to self when using a static front page and no page for posts and there is no translation +* Bug correction: problems with custom post type archive titles +* Bug correction: problems with custom post type if rewrite slug is different from post_type (thanks to AndyDeGroo) +* Bug correction: quick edit still breaks translation linking of pages (thanks to AndyDeGroo) +* Bug correction: bad rewrite rules for feeds (introduced in 0.7.2) +* Bug correction: the order is not saved when creating a language +* Bug correction: the categories list is not updated when adding a new category (ajax broken) + += 0.7.2 (2012-02-15) = + +* Add Polish translation contributed by [Peter Paciorkiewicz](http://www.paciorkiewicz.pl) +* Add 5 new languages to predefined list +* completely reworked rewrite rules +* WP 3.4 preparation: add new WordPress languages files to download when creating a new language +* Bug correction: custom nav menus do not work in Artisteer generated themes +* Bug correction: having a single language causes multiple warnings while saving post/page. +* Bug correction: custom nav menu broken on archives pages +* Bug correction: the language switcher does not link to translated post type archive when using pretty permalinks +* Bug correction: the tags are not saved in the right language when translated tags have the same name +* Bug correction: bad link in post preview when adding language code to all urls +* Bug correction: feed not filtered by language when adding language code to all urls +* Bug correction: duplicate canonical link when used together with WordPress SEO by Yoast +* Bug correction: the all posts admin page is messed if another plugin adds a column +* Bug correction: 404 error on static front page when adding language code to all urls (including default language) + += 0.7.1 (2012-02-06) = + +* Allow using 3 characters languages codes (ISO 639-2 or 639-3) +* The predefined languages dropdown list now displays the locale to help differentiate some languages +* Add 5 new languages to predefined list +* Bug correction: the filter 'pll_copy_post_metas' does not work +* Bug correction: impossible to add a tag in the edit post panel +* Bug correction: rewrite rules not correct +* Bug correction: cache issue with css and js files + += 0.7 (2012-01-30) = + +* Add Hebrew translation contributed by [ArielK](http://www.arielk.net) +* Add support for RTL languages for both frontend and admin +* Twenty Ten and Twenty Eleven languages files are now automatically downloaded when creating a new language +* Improve filtering tags by language in the edit post panel +* Category parent dropdown list is now filtered by language +* Category parents are now synchronized between translations +* Add the possibility to have the language information in all URL +* Add support for post formats +* Add option allowing not to show the current language in the language switcher (for both menu and widget) +* Add a title attribute (and the possibility to personalize it with a filter) to flags +* pll_get_post and pll_get_term second parameter is now optional and defaults to current language +* Add pll_the_language_link filter allowing to filter translation links outputted by the language switcher +* The option PLL_DISPLAY_ALL is no longer supported +* Bug correction: Autosave reset to default language +* Bug correction: blog info not translated in feeds +* Bug correction: post comments feed always in default language +* Bug correction: undefined index notice when setting up a custom menu widget +* Bug correction: rewrite rules are not correctly reset when deactivating the plugin +* Bug correction: is_home not correctly set on pages 2, 3... +* Bug correction: avoid naming conflicts (in sql queries) with other themes / plugins +* Bug correction: bad language detection and url rewriting of custom post types archives + += 0.6.1 (2012-01-12) = + +* Add Dutch translation contributed by [AlbertGn](http://wordpress.org/support/profile/albertgn) +* Disable everything except the languages management panel while no language has been created +* Bug correction: can't have the same featured image in translated posts +* Bug correction: parent page dropdown does appear only after the page has been saved +* Bug correction: archives widget not working anymore +* Bug correction: string translations does not work for WP < 3.3 +* Bug correction: fix fatal error in string translations caused by widgets using the old API +* Bug correction: the strings translation panel is unable to translate strings with special characters +* Bug correction: Polylang "is_front_page" returns true on archives pages + += 0.6 (2012-01-07) = + +* Add Greek translation contributed by [theodotos](http://www.ubuntucy.org) +* WordPress languages files are now automatically downloaded when creating a new language (and updated when updating WordPress) +* Add the possibility to change the order of the languages in the language switcher +* Add the possibility to translate the site title, tagline and widgets titles +* Categories, post tags, featured image, page parent, page template and menu order are now copied when adding a new translation +* Translations are now accessibles in the "Posts", "Pages", "Categories" and "Post tags" admin panels +* Improve the dropdown language switcher widget (sends now to translated page or home page based on options) +* Move custom flags from polylang/local_flags to wp_content/polylang +* Add two options to "pll_the_languages" ('hide_if_no_translation' and 'hide_current'). *The function does not output ul tag anymore* +* Improve API +* Bug correction: Twenty eleven custom Header problem with v0.5.1 +* Bug correction: front-page.php not loaded for translated front page + += 0.5.1 (2011-12-18) = + +* Improved German translation contributed by [Christian Ries](http://www.singbyfoot.lu) +* Bug correction: translated homepage not recognized as home page when it displays posts +* Bug correction: predefined language list does not work on IE8 +* Bug correction: on some installations, "Add New" post doesn't keep intended language +* Bug correction: fatal error when Polylang is used together with the plugin Tabbed Widgets +* Bug correction: language Switcher points sometimes to wrong places + += 0.5 (2011-12-07) = + +* Add multisite support +* Rework the Polylang admin panel. There is now a set of predefined languages +* Improve categories and tags language filter in the edit post panel +* Categories and tags created in the edit post panel are now created with the same language as the post +* The language switcher can now force the link to the front page instead of the translated page +* The nav menus can now display a language switcher +* Improved performance +* Optimized the calendar widget (less code and sql queries executed) +* Added the possibility to display posts and terms with no language set (see the documentation to know how to enable this functionality) +* Started the creation of a small API for theme and plugin programmers +* Bug correction: when using a static front page, the page for posts does not work when using the default permalink settings +* Bug correction: the search form does not work if a static front page is used +* Bug correction: quick edit breaks translations +* Bug correction: categories and post tags translations don't work for more than 2 languages +* Bug correction: the output of wp_page_menu is not correct for non default languages + += 0.4.4 (2011-11-28) = + +* Bug correction: When using a static front page, the translated home page displays posts instead of the translated page +* Bug correction: Automatic language setting of existing categories and post tags does not work correctly + += 0.4.3 (2011-11-19) = + +* Add Russian translation contributed by [yoyurec](http://yoyurec.in.ua) +* Bug correction: impossible to suppress the language name in the language switcher widget settings +* Bug correction: post's page does not work when using a static front page +* Bug correction: flags in local_flags directory are removed after an automatic upgrade (now works for an upgrade from 0.4.3+ to a higher version) +* Bug correction: switching to default language displays a 404 Error when hiding the default language in url and displaying the language switcher as dropdown +* Other minor bug corrections +* Tests done with WordPress 3.3 beta 3 + += 0.4.2 (2011-11-16) = + +* Bug correction: language settings page is broken in v0.4.1 + += 0.4.1 (2011-11-16) = + +* Bug correction: flags shows even when you set doesn't to show +* Bug correction: custom taxonomies do not work +* Bug correction: some users get the fatal error: call to undefined function wp_get_current_user() in /wp-includes/user.php on line 227 + += 0.4 (2011-11-10) = + +* Add a documentation (in English only) +* Add the possibility to hide the url language information for the default language +* Add the possibility to set the admin language in the user profile +* Add the possibility to fill existing posts, pages, categories & tags with the default language +* Add support for custom post types and custom taxonomies +* Add the possibility to display flags in the language switcher +* Add CSS classes to customize rendering of the language switcher +* Add the possibility to display the language switcher as a dropdown list +* Add support for calendar widget +* Improve performance: less sql queries +* Improve data validation when creating or updating languages +* Bug correction: 'wp_list_pages' page order is ignored when the plugin is enabled +* Bug correction: when using 'edit' or 'add new' (translation) for posts, the categories appear in the wrong language +* Bug correction: pages are not included in language post count +* Bug correction: the language switcher does not display languages if there are only pages +* Bug correction: the widget filter does not allow to come back to 'all languages' once a language has been set +* Other minor bug corrections + += 0.3.2 (2011-10-20) = + +* Bug correction: authors pages are not filtered by language +* Bug correction: language pages use the archive template +* Bug correction: database error for comments on posts and pages +* Bug correction: "Add new" translation for pages creates a post instead of a page +* Bug correction: the search query does not look into pages + += 0.3.1 (2011-10-16) = + +* Bug correction: the widget settings cannot be saved when activating Polylang +* Bug correction: the archives widget does not display any links +* Bug correction: ajax form for translations not working in the 'Categories' and 'Post tags' admin panels + += 0.3 (2011-10-07) = + +* Add language filter for widgets +* Improved performance for filtering pages by language +* Improved security +* Minor bug correction with versions management + += 0.2 (2011-10-05) = + +* Add language filter for nav menus +* Add German translation +* Add language filter for recent comments +* Add ajax to term edit form +* Add ajax to post metabox +* Improved performance for filtering terms by language +* Bugs correction + += 0.1 (2011-09-22) = +* Initial release diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ad.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ad.png new file mode 100644 index 0000000000000000000000000000000000000000..0523f1b2c9a2c2f59244f620a12a0e3c76188b9a GIT binary patch literal 378 zcmV-=0fqjFP)V#CTFAJebM5US=noDxPsV+X+sL?0=`1YA z001aOzw+`{=qM--DzyO;uHfJR)YJg8nKP&W004eTL_t(|0R_P^5&aktc7Yl)n;vCeJedO*@UCx~FA^+&BAa$;{J@9p_GT{h6!$KrWJ1mVUC Y{?aQMvt|j29RL6T07*qoM6N<$g3=ALQ~&?~ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ae.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ae.png new file mode 100644 index 0000000000000000000000000000000000000000..c47bfeb3ff291882a9203b1a301a04bcccb262b7 GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!2~3KHq6QcQmZ{(978G?lYbmQ=GoVHaJqhc!;`PCuP>BRSoOc6GBKQ&nS)p0szZyfDO1d@63!(L^TWhKw$7DZ zmh}dxq>;nd)Q{I;slXC;Hm`&O{ag)?cpN@-HZsaBTafVe^XD&Lwlp)$sN12Lz^l<= az`&6AUi5uziLe#W*$kepelF{r5}E)@sZm}4 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/af.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/af.png new file mode 100644 index 0000000000000000000000000000000000000000..b1a1a3b6dd47fcad29b9df0cba1f56d4f92d2f3d GIT binary patch literal 365 zcmV-z0h0cSP)i0GXMYk&%)8jgI()g!y-Oz?gMoykh`S0ELBxetv#RsI;uHTwNwB`0CRJ5_|DGr$jC9JF>GvX@0fhdEP)qKCH?H3R zXBOd^6EHoYx0ksD{zRM@Vvc1*3wwg`Kkbc5YS&1di zKrOBpWMwFe2DOWMH4MLcG|A6(D)iBWSw)!+5h=NdK9R5yF0Uc**}0$a$+j`)`m>S8 zw@3f~%3v2}C4`eiwVCB16W{l>5Yqj3uCN5mfHXkU>F}^^wuMKM2E#u;atKHRlv$~( zBk9G4`nHQ_Ng6j0k|4Cu1Pl%EV_-l|ZgXK_V`&Lf!3T%}>{1fx00&ev$Y+qjMiLF& ZoB%#K=c*Vuu;2gy002ovPDHLkV1gqJq!|DJ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ai.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ai.png new file mode 100644 index 0000000000000000000000000000000000000000..4aa642544bb73f2549c9404f2e18204fd429ebd2 GIT binary patch literal 392 zcmV;30eAk1P)F#k{fCV2frwb2&|IO>URkHr%iZdstFVTmP?*i{^!fYj?*IT( z07V!ZhDk(0RCob3OQoU$Q52lH zeplavL_{M0{~w!>N}`e0-Hx9TVoLUs^MQE=oTC>zqC%1YSlhB^P(oS$0t}8cmKX-l z+vLZ0IB|)l5kVYQ)#VVD0q8m$#M6G-ra*Db;z*{Y7I?cMDSZG`Qb`X5tbcZo07B6Q m;FOCD0YX}k2$A9dJ?lrRLnTR}Kv%*500002zu4YhaLOW4B^jU0GRFP*CJv zQE)^+;ZZ}~N<8CZSFr#9#BXO@M@2zFK}0(_tVKTCL^XL@S4c=mIX5>_I5u!KG21*W z;#f<0R8qxTP`F4vV=*k2H7waRCG3WM)Lc=3Nkz^)FV`;~+D<{K001#1B-SYyp#T8Y zCKR3k0G0p%CGvMR0001hNklN!!I70 z3=#NxEMu2kB`%Jb;xXM#ARi`US7ObR=H46 zwnas;003eD09y5w0Q=5``NU`Ty;$aD|2E;qXXdpnlE=yT12MV@bAvs(6aWAK07*qoM6N<$ Eg3hdG?EnA( literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/an.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/an.png new file mode 100644 index 0000000000000000000000000000000000000000..2b61643ece1164bd8fb54614c33d6340313697bc GIT binary patch literal 242 zcmVEhzz{{H^`YHIuY`}gJbr|jE>QRh0Fi|ANMFI^&1<`&d%5X01$JF>;M1&P)S5VRCoae z!Lbd(P!K>dzspB~f|3fc|6=qk5GB|FAt4Jw0;(bZ3YCV1llfAVAsnZoR--v9sr07*qoM6N<$f-#k6^8f$< literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ao.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ao.png new file mode 100644 index 0000000000000000000000000000000000000000..742882fe1b2e97c2bb27311e7109c44f20860a4f GIT binary patch literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltse}NZ5ZAMsnnyJ>c57&?S6Bbi z-u}6^_ET=|$JFExv9TYUy}!NFdFSE&*2?OAu-{Ukf}_S?uj;?i)&0D|vO`TxQ&ZEy z!NJPPYV#(&rbfMIk9Bf$^?|_D)KpPX@%%Y$Sy|bKU8Q9}yP`Z@978G?Sr2*^9dck` zF#M{+_U`9@<6uUfJ`onjO#+MdY-W>;ZO(GYTy79ld8Ro1{rb>N>^E=x6)Ej~RGDx4 zkMG>!?D}~z#f?7=>%}9g9zLk^jmVSO$NYi+K!D&(`%wS+KwB6*UHx3vIVCg!0IW%1 AWdHyG literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ar.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ar.png new file mode 100644 index 0000000000000000000000000000000000000000..46d43f450e1967017f1cf21fc5a7f702d53c3bc8 GIT binary patch literal 260 zcmV+f0sH=mP)FNFb{rmg-`tr8<>2UVtV)ga))YR1WbW*NjRpeKqN|bAd)7FERyeGPC*aA&`K zL-SHC;b;qoGz+5|Ht7Y9`C1)5;%>Eakt z!Pwigm65@KgXMAG+xbP0l+XkK?&LcN literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/as.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/as.png new file mode 100644 index 0000000000000000000000000000000000000000..e66a3ae208334a99e0f3cabe1b5e855b222ff4ee GIT binary patch literal 428 zcmV;d0aN~oP)@g1{!cp>rI^oq%O_1D!7VI|R<@Rw*<%NN+AoW@Tj&5i3MZ z?Os;))<$BeQObKoMR`r(A57ee344=T`@_G%=}H8ffSQAYpOF6Z=N^3dbO9{hmDYdK zod5O#z{CVD+zCuTt$Gl?62zwR@4xFcz7T~s3>+t0REl)fCO%1j zD>!lTx8>;$PppqIuoyHjtXVCjzA-&7_)+8czbmGC90_F6KOpbX!%?lOGASEqFoUP7 KpUXO@geCxnT2$)* literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/au.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/au.png new file mode 100644 index 0000000000000000000000000000000000000000..8b0d24453e572b3322bf569c4d4572e58c467428 GIT binary patch literal 402 zcmV;D0d4+?P))xrb?b+R@w9;~i zx@Uc~$Iszga;we<2jPv7<$izVZf@OVW>9FSvAWeTPnc70tdB8MgSG$wDSL{#=*`l~iI$+c+@+AMy2II!oWTG99cn^#S$emNcAiRWt(%FeL0z9I zNt1VuzBW{vm8HiSJBR=P4*&oH1@aEB0001)Nkl*;hhP~bl)*r|XmF%NOQ)*l#Y-f(Ad8>)KD1*Ekw7mO z=j;86lkh}DrgG8f-2Ytk!QXo)I+@4-Ba->q0Q>B2`RG^n<3{x1JM-Qs;IshVumAu~uK+xy z%~?AG00012NklD z?7K8UTFr+Bq}$fg2ueE|LaSqWQc9|0%=LTy>9 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ax.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ax.png new file mode 100644 index 0000000000000000000000000000000000000000..256d61e611b15e93464cdd24929dd2a9746b09cc GIT binary patch literal 384 zcmV-`0e}99P)aVN$a;c*K7d%l8*OVSN2y=^iW3eL_O~}F6}EL+W-LeyI<(AEX-E`Gj6jY zVXpuHOzX^LHEp{WS+4EUc>n-J(2W290A0?e>{kE)0D(zFK~#7FO^kziKw%IBXMe=D zt^VssAF=Ul&waX;5U7Us9P^+FPI%^|$l`_a)D$47b%(55(E0NcW`Fnc0#!+P{}``)GDS+&!8&LzZo39f2?_ eVQP+vz$YacnjvW6*0=Nk0000gh8`sG_74Krc)!RP7yFU>e}z56Tv+1 RI~D){002ovPDHLkV1nOVhvWbN literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ba.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ba.png new file mode 100644 index 0000000000000000000000000000000000000000..d10cd5cf43be8de2ec85826beaabc58eeb490d71 GIT binary patch literal 340 zcmV-a0jvIrP)BA?hS*Apjw>{GxBWN1{~uKY$Fed zc$^TFb6ik&1*fsT9_7~!6UOt37I<7#`fs&r9=gYbDF~h^M?mOEr2&?06tGLwBof%9 zaCQ&x;E1OmX8%FZ_1Wfx_`Fk=#-tbqKAe)GB4PS|`qxj@Ic>KsCX7H3rZEf(_`@8Q zW`c^tI#CTLh^JA&7I6$X>zwRtq;JQ6NC>D&r2!U=jWLG__{oF;2&l1rD_R@UA_0gs mk|&@E@DnYWMGO2tHQ*b`)(=ud^L@nt0000sL22S z|6jS;*15>yqLxBLy2&&TtrrD3H!AY$meoe=YN-j;&x zA!BNq-1F4<=M!gY?*AcnKv%cg(_En}`0kB2tF~R_S^GR$bJ@M+_Erm+Cw`iHbSls) N22WQ%mvv4FO#mP(PRjrQ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bb.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bb.png new file mode 100644 index 0000000000000000000000000000000000000000..e786361eb6f893ed03a5e53d4dad8c3851681f1f GIT binary patch literal 316 zcmV-C0mJ@@P)&S_sheb z0&w~-h>Q$plXV-PKq6VIeLF-z#GGmg)MX?g&7GiKwAq;)`W5aNy+(yf|?8ogl zQ9VtnKj;nzhm`N;$m~RHf6fa>lVi*MM_%7oQn|uUxXpO~#_B2J(>WVmml9$)U`q}F O0000vff@m7V*X zf0&z{j`8@Rr?=NaUbIN`i-H1g7H^iH&}9RK(-mB7KocW9T^vIy7+DW8W*u@6aX466 zKYhv7-}gfVlvd8=ROx);p!D>Xj&Eq_bvNUpA3SPbrxZUsUU>VI_45cmADgq@kYGQo!Y+Cv*O$0o}Sgcq{i@r-P)6H=2KOj6(Dzey85}Sb4q9e06vvhp8x;= literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/be.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/be.png new file mode 100644 index 0000000000000000000000000000000000000000..94470bc8560523ba2461cc07897795415ec11116 GIT binary patch literal 272 zcmV+r0q_2aP)Cnxqn zK~PXo`S~>T@iX-s8|DB2_x2}naB)XRNA>a@^A8U{KR?F+05&!@)!zW(^D2RPuuN2ZnZeW!0@8J_;I5D zgK)Q7j}2daFu7~2bW2_Io}2jwpvkoi>4(!jw|UxcvNv02roK#FdXbdC907xs1`O&9 z3gnPbQo+c2(6NijQN&^6o>%r-a^u56(%j1-XpD)78&qol`;+01f474gdfE literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bg.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bg.png new file mode 100644 index 0000000000000000000000000000000000000000..fd9b9766730c58fce131722d5901e867fc748ff2 GIT binary patch literal 255 zcmVPO>1x2Ew zaP*Fu8Hj*_58)bs=x0Cx907G=8UfP)MnD755Ks;)0ssI#F5h|2Q6vBW002ovPDHLk FV1nAJJ0MM`ot~ z|Ni}b`SN>v``@h0-{IlEeSBUpF#Nf4<)?$g4^z``Iy&E!ls+HxL{@{(ynu z_3PK?rH)@2~*_gWM3&W_6FUI3iow&>&t;ucLK6ULhh?e& literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bi.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bi.png new file mode 100644 index 0000000000000000000000000000000000000000..2331b802c148fcea23b156742877ec0f370fc996 GIT binary patch literal 400 zcmV;B0dM|^P)nq2R;ItQSM`Gc@$n6a!K|&%~UD>uJ|%klRWm8opM115B}2Gf=$n$!yeD z6R&Cw;w=t!_Ne*hfRT+Jc8u?Bt*f^D$>)KHy+^{1(15=@(HodeD#FZ})a1mZ3R0Gd zMrrsXq{muSvld{*z)RJ!qiRoNdmKJ;S#dxLV;Pw(&!4eY;00JK_nLEOdjo^jHn}a5 u(U#FtR_8~fhc%H@cz#0000NqG-|elw>g#@0Q~W9| z`GkQX>qwUK7U$1=eAer%?gNc2VPHsPVDM*n!N3rr_H6}FB+S#rF{Fag_r%sjmH-~+ z3+nY*!EE2+4bB`-=~lK_?ZL*;vVYpORZG8Q?LMvJa>+%+)#vk_uLk literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bm.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bm.png new file mode 100644 index 0000000000000000000000000000000000000000..7c8046c7302e4fe4c2abaa17d335a47b927a4fdd GIT binary patch literal 371 zcmV-(0gV2MP)^xU0&K$ zRoYHYpa1~O6BFizh2(W~*hWUxJw4MmH_L&eE{Fop_vV#pRIz0NNA~#C(pDQF+H*Xoo{-ux5WSD=M0ci@N{-&Lkv+ z!fkrHVu%0$%pD!a3k!k(0IxtTOaK4?eMv+?RCoa`iZfybP!t7co)NoD_P?C8G0QZu z^)HV^%Ym0XAJx5d_CBok8dn#9_#hz R$wUAE002ovPDHLkV1gEMqO1S_ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bn.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bn.png new file mode 100644 index 0000000000000000000000000000000000000000..59c2eb453490446a86a12b365452491be0303f61 GIT binary patch literal 360 zcmV-u0hj)XP)v;I;ZTIJ9_2gXi5Kn(zKn-`NdF*^oWxBC&41H4eTpQmC=z9tP3#cgm+2c+UX+}0%&9DJuWpz)EH zD_468>-1tC9$v&db~%v07VsqU$_6iDhlLmkn{dd_J=g;aULFUmXVZ580000)S=?**@mgGRmO<>COP>$^etb0MX@o#ot-M+)lgLL%7yC zvC%0{mH+^<0B_-MNY+R?(K<8GGbzp~7|9s`hyZ5ZW?9-<0D}Mkp#T7p0GKz1uK)l5 zOG!jQRCob3%!OeDK@bDM>SM@1Rx|r|7$gN~)Xan^y)I1oclp#^GU9VyjzUuUSf&%k vjwLd7S-LZvp^+K~JMn^OUOc;T#v8M5y`%}0HYEaD00000NkvXXu0mjf@?L=< literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/br.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/br.png new file mode 100644 index 0000000000000000000000000000000000000000..eabb7ba388e4ad7290fefec8aae9e42ac80d5a46 GIT binary patch literal 353 zcmV-n0iOPeP)LI zABrEA%X3?U>2sU;y4Lr8pxX5E7IwHd0097xl(ep`qBEEeGLJH_-#;f__Y;E?HKj1v z5A_}Z004bSL_t(|0Y!)ddIc~Lg#U??+IH`Mrs6~0XWP4D0iex`xEdDXz#;5nP&Yb2 zr5}W*mA$S*hxP8>yep}L)6MsoRNL!D^&(M5?>m@CRUIGk{?lM8JNLi3Jm?Op*}b31 z#zR_<|9^SEw+F+4Y(j`9wi?K8#b%E00000NkvXXu0mjfFK(BQ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bs.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bs.png new file mode 100644 index 0000000000000000000000000000000000000000..741a25ca79453ddf110117aa4d2a5455db52613e GIT binary patch literal 335 zcmV-V0kHmwP)g;t4;jcNcq+}_tG-=&@1-OBI%#J(>Uj002ovPDHLkV1ks^jAj4; literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bt.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/bt.png new file mode 100644 index 0000000000000000000000000000000000000000..65571d1b6e5ef3cea0306f7a01690ea08f3f23fd GIT binary patch literal 368 zcmV-$0gwKPP)aft_}EeTj8W|X0R7ue_4fDd>+I>% zU*Nn{_GK&gibLlB0Q}xZ_|-F4F- z^l}vC-^1$M)aHmm^nfw)=A72h&+)L2;Nju&RS)uM3*Z0%{N!Wd!NJ&zRq}i(`K(^? zkx%oW0PhI^?+^gpP5Mm$004kVL_t(|0X2!WK?MN-#gcPBq`_O9lKrPZM!@yE>#JT8 z5fG;YG9%C!1VvnqBtoKIfo_FFnFAnmq@>Z3hxxj9mYK|=7?L0p0wtp+DuQt|CdDvr z_d3Xd%XYJ>@)c9N{PW;^bBXkJ1LZmz4!5I#$yH?0?Yvc0Ucj>V?!4J O0000S|?W zrKhK-sH7w!B9fn5-2N9S<0myk(g5Y(ZRRAyBoyr;B4q1taT0L%u@}0t|-d zp9%Q3WN7^O|2^Z<xgH0+KF*7ZBJ_x!r@|%@z#u;DuJOFERS;q} egqx)D0{8*o9~z!8?xZ0A0000UXsvm`gWD8Uyu z$h)`a!M^fqLoNUt#})1XFRi2@D4`gq!XtKoefjG;DiH)O9UuVvg%dx68b&sTpn|&5 zI@ACU_PGzM(f}%k4bTw$N6t1TEj8jFUBVmK=RdAV1DFGvt>L~S1ZP9bjr=A78jo{7 tRi6P*{!IbQK{~=kF@r>{0=jXp#0mB(&XWKD002ovPDHLkV1me}wKM<# literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ca.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ca.png new file mode 100644 index 0000000000000000000000000000000000000000..5cbb1260be383b9e1aede1049760eadd428abcb8 GIT binary patch literal 340 zcmV-a0jvIrP)Y^`^4>2r^_rjRSXkU8D&SF9 zvH$?=8-5m>+7Zf0MF0Q#KgoXCS)@J004+dL_t(|0VRn=Lc>rHhQFD3 zf^TqE*!_kqV0h?>2o%#K1X{*yZjqCVa zXRlETq96ORe6Zu-n8qKaEy|35^=f8rpRfV_@@-00000+vhyu@(Ab zP4!78@;(*%?mzhJGxg^q)~OEWSs3Q+8_}c*n09TG0000`Nkl(o%>(NK`CNiUIC9*RqRu3i8E0Iki6 z{@zwztZ&fDP^r61-pocyomxSdTf@OS7luU=gFtMiQ_#geH<3}&zai$$I}Uz2Op-1M zdNh@|FD3v00DwtEK~#7FEscYDxx zMZm*3K*i~d@~3uK;+Qx^zJIk&9`YHs&~^X-002ovPDHLk FV1kdRmMs7P literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cd.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cd.png new file mode 100644 index 0000000000000000000000000000000000000000..c282ffe63b6c09d9683aa09984420e8316f02503 GIT binary patch literal 301 zcmV+|0n+}7P)eTB%+OkRvHpjsLPUc2d0mrkH{Emp}MG(NR^2{Ni z`>{Q1_XlKbya7@1J}&5uf`JM!1Byy~xZ_f%tx=gmh4R>ezW-qEvlrg*YbR7pVxZ=S z;Uz|)x>3UBuwn#G6^2F~yRS{`-On34bOe~eS_O`vwwpvvk5rPGs>m7Mm0+I8R@DYL zFQ-~KbKwMQP(T%&!9p&jF4R!Vk`ruB0Yk$d=QAkk?kf!x00000NkvXXu0mjfRaAp` literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cf.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cf.png new file mode 100644 index 0000000000000000000000000000000000000000..b67aa2d09fba9d45fd81845e209f373adde74854 GIT binary patch literal 355 zcmV-p0i6DcP)z`Tc5YfTQ?&p7!nSe)>W}Z;HYow`T6lr1G&H!lxJal-y5qW}+oX}vk%`KQnb4UEYzhEf0Bp%@ zO}$M)xIr|sH1{ehAe|r*ml80gFaQ|<09gR`BO`RZ0MF`W!sR==;4AeV9kSaJtk()W zj{wER0Q>u1`T0=w^*8hLEY8jV)ztvt;Q-nI0LScXUH||9VM#F#tfp z`PpPuo{z#~*l_>LcnKN`AkL&V`|x5?txDO3Jf>s4Wk_uO1fEu+ae`bDj(N;r`64wx zD!N}2H7+98Q(%to$a9_IHRor-pI@PAuj1y-#y=4a5DG~%80!E4002ovPDHLkV1hcG BrmX+~ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cg.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cg.png new file mode 100644 index 0000000000000000000000000000000000000000..ff346931977c0e9df80e2209e2fbffb39cbcc262 GIT binary patch literal 259 zcmV+e0sQ`nP)Y%$002ov JPDHLkV1i{)WR(B_ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ch.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ch.png new file mode 100644 index 0000000000000000000000000000000000000000..29f6c55bffcb016407e4815010cb9f467ac30185 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1SHkYJtzcHd7dtgAr*|tKh8He)NfGehzS)n z`V}4X$6T4Y$?j0-pS~`pMf(jtTt5DM`C{b&mgQUvOng{xs7*NO@j#qs!D`}WF`S~l(D?Zdd{I^Z__xBsj8};?|562Dwi2(e4 z0Q;~${K94TbN~Q?0PtM^+}zyO*46~7zvch{08dFoK~#7FUB`uC1OW&Hz=7kEck92* zcXvg10=%!#Af6+Nmc3Ad*eBG@MUg*#zmg#jy`16yX3|NT`u8-l@ib5@R5&JEw51sn c0&Cjc8Bcc!yiB zT9g1IcZ(K301|3e7g?rJYybcu002G!05AXm5-2}@=ETe1)Zf{vwAH)G=+D)hr^<1H zs%d#KZsqNqUR195;6f02wC$004tYL_t(| z0X0qovcymj?0$%?6MWwPHd|Pg*LIwYJx!3EwyuN(-LU`=#Fcp)S8S=2B!%aBRpphg zOS-h0r9-T3d;N-TmVLAIT?nN&N;w+V{cP!3>8pR@^rrdNY;w3KF@gJL>FTp}o8kKo tf#s0vEfV;kZ4>OK(3Bx)xA0J4q#AolDA*j_W$^$2002ovPDHLkV1lTtm-qkx literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cl.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cl.png new file mode 100644 index 0000000000000000000000000000000000000000..6d3f3b69d682e1fbc3faff46c1bb4d974acf9d19 GIT binary patch literal 240 zcmVr$rW06ef#mDA_yK4m9TkoQj qbZrBrBv~XS!Q$W~3Cj}?KY%~#aSD{Q!^-Rc00006a`OBPn8b04yVE0-QC^2OO-C)g1b9>1gUT*?mO?~=~`3H>?=e@B7=yLo{2mn zc7gx@5b*U)43VBzA6CKA{Sx?Ho%4(iDRDTeB!s|#V5RxEnfYw5@l;m23JZWEE6Y}p zY_(>X%?Va(ID+SAA;2)(RR>k?4P}yTPfJ0-wm^m)uq_3S%M=g@QsUV*n?uDwPgB>^ zZ0Bv~z2v6{?8hWv+lfcOwl-j!0}P`9wwMUOHa-e>6M}i_KksKdV?6@_R#~;^bmo|# z&4I}z25fU6*&MK~4V1scU!?pc5iy_vq8_4-0QW@CY9J}`12%96!~6yq!~g&Q07*qo IM6N<$f>J4i5C8xG literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cn.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cn.png new file mode 100644 index 0000000000000000000000000000000000000000..f64afc15d7cce3ebd546b640094ecd4ce2df4cce GIT binary patch literal 252 zcmV2Po8W@hGHT;)?!<4a1l008~-Ui;-+@SRZh&P(Ax zKi@Yu-7+!UD=XS3C+v$x+94s>8XBqq0M-)|(+v%y005r=04W-f!2kdNT1iAfRCob3 z$b|vJKorAJ$z|Gq(K01D{`4#WP6V*_+9^|%`jySW&(p>YWDr2=A|ZvujgbLcuy2eeePHH(7E)!b>3~0%v;(? zH{_$P3I|+bV3^Oqa^emH!~5ivR~}x^ZS9{Kn>^Ogxhp8Poq^$9SQt>nDF%iE3=AeW zD*J#|dwRM!hEy=J9%STVG8ACgc;?n;hlBt3hjy8AwsaIVdc28oR{3emrgYMvLq)l^ zE9BC?XRRTVbb`E2yo&95aOROst>=-VCw&ROnI-c$T4n}{0nG%O>gwmR&MBb@01$~} Ag8%>k literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cr.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cr.png new file mode 100644 index 0000000000000000000000000000000000000000..55139ecf2c5ceb70180b9cda33b28a40899cee42 GIT binary patch literal 270 zcmV+p0rCEcP)qtSw!&3Tf@ag4h7Jo5AN zXobFAe7FDrApihK001=iK;)GG002%&L_t(|0R_P^4gmlV0KwVIkr0Viq4fWM>GT9M zfe;~!h~(V~h@jnq5Wm@DkxKa-22v@LMX6-UUS5SOVW#sh#0@-~CAkx7;z9VrA4!}C Uze}9;!&V#MqcB9#CoYiBN((eEO?qOp6$;kWs z{rUO&_V)Ml^!4N9<@Q-v`@FpGO-`s&b6bzkP>IY)gUCRB#q~%?>q0^`cET}iyc=D# z003U?LP7uldiiH(`lh7yuC4Cx@z&Vf%m4rY0B*vE>9ha<0B%V{K~#7F1;H^^!ax8( z!TE7X((tTowekM<;S5?@z~(`mNu3svbhcLz$$e~dEeWv?Hq8?{I~#Pi|6L_Le|uk+ z%hucy&Si1GZ0qcp$8o$~a~VGG>)S&DbI|xHK0xjJQ?8O&$M;P0oneEP)AyGmP~B2IhOT-uLfv{QUg<`{DTb`1JJj{2f1Jo@ed96Z2$lO07*qoM6N<$f=d^Sk^lez literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cx.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cx.png new file mode 100644 index 0000000000000000000000000000000000000000..a2d748e48c684577229af46f348ac090ecfcb95e GIT binary patch literal 385 zcmV-{0e=38P)7>yVKgCPT;(WefSx|KoNytGJ%2tz2cuozWWA5is;!wacy zDS&r>+Wvq~O&{JgyrF8TpvmXBK|fG11= zIfj7a&!4U60H=SOYFT>8PMYT0Jj*!|VWuju#isbSwcr f1t#PNIYy2E|A*G9Qw)O*00000NkvXXu0mjfGj^nz literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cy.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/cy.png new file mode 100644 index 0000000000000000000000000000000000000000..7f9ed40d385e87e28a36cddca457ebec4a69deb1 GIT binary patch literal 232 zcmVP)h($b2|lzPH~*PSHf00016Nkl`6 zrglIGX+}Flt^qqrEt=6$d*p}5MEAt`g|XyU_W5NogmGTSoyBdE#`Evk7RwC#bH3hV ifgu>5VS^J09U;+yYr2O#VcK1AbP2&2t?0CM1bfiFE3E!7y|=T13}dY4GgwhfIcRm z8dC$%-5)|ifaslv2Lu5%Ll96M+!UyW7zSRTZ;;Vh1_n4fhKc}IR8%W!;vRee0000< KMNUMnLSTYSzGdG4 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/de.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/de.png new file mode 100644 index 0000000000000000000000000000000000000000..41bc81b64cf974e13043d9b4f2ed0265c1b5d275 GIT binary patch literal 357 zcmV-r0h<1aP)-XV1?r+q3ebZ$FH9oR*j1&AFjkw!vo`i@*i zh8#kUk)3BmVRk7C2jAQA2%zlADN2jc>?(Qou7YbejTR*B;GZ_5tFLs$a8AtaDK*)l z-XnnGNxGvzj9iAS6nucrm%yjU3xb-Q6q9F4!j!0V@IONq9o~U%-fVu&aS+g2y#1`r zjeF^XIdFEFl6-0c_4a%*M`)Q`X|;eh&?*q)cZ`Q`Y8L#Ye8hO100000NkvXXu0mjf DhIpfc literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dj.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dj.png new file mode 100644 index 0000000000000000000000000000000000000000..fb82dcc92d75320f5b060db167b7c8033bade21f GIT binary patch literal 315 zcmV-B0mS}^P)h$w`qV@i` zxcu_+`}_O;%gg<3ZTzaLz~t9%v&&+u#B{XE07ilQv$L}6vO?8CD$Xh*&>|Yl8V<+~ zGte^tk^tWH-gMt|0EYlh*iMqR&4?zO-2gm*{ivajL z(hNxiG*SPL(p7oMIWRTf6(Rozpc}s*h&ir*h(FhwG*^-vwFWpr1ZdNI8t^J)@fiRB N002ovPDHLkV1ikhlDGf> literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dk.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dk.png new file mode 100644 index 0000000000000000000000000000000000000000..3b9282c232b273e869c7cc37c6244cdb0f6db99e GIT binary patch literal 219 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltDVqSF5Z8AM41fRr{qg3_V+Mw+ z3=H3^s=k+%{`~RdOIq5O*x1j(!5`e*-dkJ0*4KZfr1bUc*XKe)Cm9%?K7IP~!UexI za}0pyM0vV6hEy=J9(43O0^}R|&sw+2)%L^xa3w#DTO!s0w;63Od%mt|TeAP;m8ft} zdFF*GJgwFzU+8@}#Cn`TKjwhU^MzaYRk7J6D;fOwYPR)o-g8~ql=}ZW8tbS05}MW; S8CeLlg~8L+&t;ucLK6Th6IxpU literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dm.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/dm.png new file mode 100644 index 0000000000000000000000000000000000000000..5488cb52e0bb53f7a8f7ea458963338651b3884c GIT binary patch literal 386 zcmV-|0e$|7P)r<7aY(gDplll(pc@sP6#y&%5}OkD=3M|I0OjT7u`s>w0001eNklh3h>;0OP{O~RW@e`=rBVyf(Q*Y4b%Yvt{f!EB$-QvhYFoq z2f3n#m*UTkisFM2Ky%Wv`O9+9JD;k>ywPyhe` literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/do.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/do.png new file mode 100644 index 0000000000000000000000000000000000000000..d27ef3d79c11f30b86a6106fda8bc9e27edf3a5e GIT binary patch literal 264 zcmV+j0r&oiP)O@3qg39CH;N1WKQf#|NW4JzCv|Dt)003S!RImU5Q_3oL zX8-^IT1iAfRCoae!7&oSPyj%|eLqA(qf@y5<&+9x#EjjbR3up_RZ<7e~DB7KBN9nVs*E4!2q5+l=!6zP5J0xusZ1T>1S2oR!<4r>J-oQzUz zpQ5l}+X8I0MJcc405fqOT8$jHocc^>N~l3Pc@^yB-n;D^?>I8ksmTQazBhIgl^URSM}db{p)i2=VT30 ziI}y^d!W2;n6_wlkDr~$VWw-zUWkGtt z(EtGHa&qoaP2xpG+&MYfDJj(&8m0gM=>P!tU|I1)Jnb?p+5iB`006`Q06t6iDgXcg zR7pfZRCoae!BGyuKmb6&dD|^Q_;CMYA|$G25|I$KB2m<25iw{pB4SX?y(3~1N7%ayqO0V6&PmBr&G)Bpeg07*qoM6N<$ Ef@f`mxc~qF literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ee.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ee.png new file mode 100644 index 0000000000000000000000000000000000000000..e49b1b47fbb470d20bef83d46ab726b762d0f95f GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!2~3KHq6QcQgb|A978G?lM^=BH#GHpbC~!h zjU_3b%UyvtRC?Z_zz_cPTGRt)5=v0{+NIhcB9nj2(7u?aUXg<>eKeG8#M;p4_{6)A53IY%E7p7Q?1G zo!DP%_se(eD=TpjIMHF7>L7H}NkM$cLw&X%KR+LDcNey|UGwYLSM3RZMLBKi|H*W- zEx0s&`>h5Q4}PtRUtcttmwgoAb!drgo;K~;p;m6|gayl%iFL@$@nu^yXHE=R8%6X{wyGX&xRi@Z4eDW7e1Ac0ICKdJw1?yNADj4^}PK25`utS2nk0(KRn{$ zfoOOD3Zoo`g#C$j>+OKZXq6EVsV-50Ai>!Ja0JwYq5+5kwgJxG9g-)u9>~ qV!_A{hHPL+3x*Vc2*lXMzyJVnuKWyh=edah0000kEq0N~!bI`1kkPR8-kZOZN2i)`Qg#Z8mVo5|nRCoae!NCfGP!t8gIoBs- z;wmEg|Bn;enhQxE%>+m!7b-?bq*Hzks3g6h04c@bo@oqn8i_u%W8OuXBJ8(3k0M$+ ywmE49kIUz6WhqdkS+Nuf-~IH41m)G$X2Bn-_Z5EA2G45%0000WtZ8e^4EZzYo`d8tfku^h2KnSZ{eeuX!QZ{Ts{eV}_p9Yjcv|M)(u z`EgR>^^nrbyx&ip3?Ja}m53|HLyp5<|Gj{p+=7+LZ2rfYlGoEIk7sfpPDWlGxqhqR z){U4i=e0FX+;Tg#-ETYa3v+d{6IQP$y`CUF^z_zL{`H|xS9{K$8$EOk8usq>d$>(p zYRhx)3v_{7z-HLvF?%xg>Zrnrjzht+U@T9#M>E=U#m;I4{|AM6Ca%DzXVo0at{rPs*PK zY(4YLN5>a-U;Y&#$9C#x3kVekK7A|yt`Q*Pt6|dk$F!gAlTH^KqHIhdl;}BKT16hT ixsq1b0yZijLBulCZs+Zc{K0Ji0000i_`%d3pV8Z2Vzi{8?H0QBnCwNclfM_cS#0Dk}Z`0RH}R{{B?;@=)#J zNBa6d_xCXO_b2uB9p~o&@qSh8XH)Irjq&q3^ue<1)YbFz6XW9m_wL=}noI0aPr=Wr z>&i*Dyq@+VBJ>m#@(c^%002a{g&6<<0AEQ&K~#7F1;If|#Xt~1!FrPpMg;eQTkn6W ze+5x-j8#DpQBH`IeukB#Wb3umy-4jD^i+M7T)%^tJ@@BImwgT9>`%J*p2cw-_xY>~ ow9b*mL4LsB76Y;0n-i;!fCq*Q~&?~07*qoM6N<$f`CniNdN!< literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/esperanto.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/esperanto.png new file mode 100644 index 0000000000000000000000000000000000000000..00306b663f2a7c4c3c6b49163d0ec89fc8a538d6 GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!2~3KHq6QcQpuh!jv*C{$v^tJlD;1`I+Jps zd4bfkxcS_PPh?I`jMeJqZZvTSVYYPGZ2$Kci^|XEpOalVc+KzKXIS-m*A3Pb;iZfj z26I%_EPUw0d?CkT(~Sg22WA20NQq0#>l-Clt~*FEF?=xDrMPpps29*W22WQ%mvv4F FO#m!EHID!Q literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/et.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/et.png new file mode 100644 index 0000000000000000000000000000000000000000..45a622fe206bf1593d043f5e6fe799b56b04d9a3 GIT binary patch literal 353 zcmV-n0iOPeP)EQ{QOCY#@DvljhoE0c)QH@_9pf9AN2GX z_4PdF<^Y(>u=Dc~^z}4kvgG*y0Q`h$`)Ee{Vn6g*JaDMh@;VdqQ!d~D0Q_QO_(MbZ zIXU$*GV>}b%t2Z56c_Rg3;JAK`BGBz008X(0OtSzP1;Gr00017NkloeXec<75Rs@4h$KyxWRcW0--S}>Ik!^h*7IKVSP)z5e$-7LBzT4pI(%9t0%-a3^{)46E`T6tl-Bp6wOM2Bna?vtq%>V$2y~NeHz|Q~x zov5ACy@D&BI!z;!{ML!yq4CNaSFvJG$2*8r7El}t z0>~11BQOep`ku!G+68s#nUer})*v$r!&Wt_gn|13YW{}kNCQC1u?*=|I5x9NGNAwf002ovPDHLk FV1m`9M%yqN<*+ z)o6ORVRf@xZm?8ou1;gB001xj4-oyFoBV)){B?BxXJ$!Wran}mS(VjOn&C>5-9n4l zLs_K&03-6bzw3vMy?mE8O`gBm=y7|srI)(bh?%8>r!YyJfUC7PdAd4Lod5tBc`Rg* zi@1<&o1}rIHcOQ(M3}Y9)}WuB000giH;|Z-k%4)2Lv^YoKa`S=kxzoNb7^UMd4+v) zYybcSRm0kN0001kNkl^K207RVm`T2{n)`YCmf2hv@JC=E) z%m6NnZJWpd9f6B*uDt*N09r{zK~#7F1;GJM!$1%KG0)ybDG2fZpF*1|UnH{KRr()qg>aA9?uuej?ia literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fo.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fo.png new file mode 100644 index 0000000000000000000000000000000000000000..4cad1fc6d5282e78193d17c11ef103f3ea3d22a2 GIT binary patch literal 243 zcmVlr7|NnEB@9%Hq)$T}ebiRCoae!OKd+02DyMIX5p5 z+_(_`{}0`STAIe0pzcACjk*U)E9~7b2?h%zaZ=k(CGuX@ul{f#+*8{=j%S2>)|r<> tPbc^p3Qkxwa6R5W;Gz}Z*YfL=@DDV$6o7UFSTO(q002ovPDHLkV1f!LYr+5k literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fr.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/fr.png new file mode 100644 index 0000000000000000000000000000000000000000..9e443e685ccef502c811a7a9b092b9849b07c481 GIT binary patch literal 271 zcmV+q0r38bP)Md7G{HQ>RRE{Sh?xvN!zK&!wMP1@)YO-$H=L`C-WTxqFT=lo#ee_${r>Iv z$AZDUg+7PRuWslrq#u|+}3uQete$&UX0 o)o;>|+-`HdiD!xy>6^FNt8e7oqw4u*I?!kaPgg&ebxsLQ0201(^Z)<= literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/galicia.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/galicia.png new file mode 100644 index 0000000000000000000000000000000000000000..ed6568761b9f751cd4aaff736e30204c661c3822 GIT binary patch literal 254 zcmV-$oh89ss@96>Nk1Jem6$Q&gaWG zKGkF|=y{#hEZcd%*$RsaA107*qoM6N<$ Eg5C;+Qvd(} literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gb.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gb.png new file mode 100644 index 0000000000000000000000000000000000000000..f8c4cbdbdfa0655754bba87e4ab10eac665e158b GIT binary patch literal 394 zcmV;50d@X~P)w*~T7kKoQE#NE%KxjW{{R1>u-pHXivNs(jGWTR$m9L} z{E)WP|G~Zg|NsAKY5rkhd63lfqOA0bi=L{|88n#TzTfAc_(+vV7P&NW)R4^^qBRY{R*i@A)JliY+PEGBRN{v%R0gfD_q`)|j zq{#`sEL8*qLW<7ilr$deNPp`}d(OI3hLhwaT`+1eir-;=ElKUCKX{RA@{KFIlbK?9 oYu}!&o!$FiD0hsliI;C@D~ek$DBVg^Q~&?~07*qoM6N<$f;c|EMF0Q* literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gd.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gd.png new file mode 100644 index 0000000000000000000000000000000000000000..060fe2b96754a59c2e924330ea458111a273d047 GIT binary patch literal 415 zcmV;Q0bu@#P) z1B|3W5C!0l55X}w+qP{RYumQH8#`;;wr$(C&DYb(Ao*r~)vFfSBs}YmWL2B26Z})l zge;2Cn>j+J37O!apS@CzH~I~@)_YZ$wGK&G=@4FS`@LB9$JG1NAPd-L>sr)_HFf^m z=>G-ly`NyU^EoWH--hb)6aTZ${tbCa1Dl+{|MZ{WUi@RC_1kjG2UfjM_oS!tmP7ij z(*dUd0p18`kHE)-kNA%&eYvFi0s``Hy$QdF(u2MS;j7<$UI2}|9BJT1?2A(4m-EH9 zAW!24w|ck7Zh?Sv{9n1)H>my+`xuQEByNLS#;IEYM^MVV_q>4s-8+L6`8O%F8q>w3 zm+G!9Hl2a_$|G2=M&uqAcyBM)YMPN6Q(OJfw;@rCKlix0oneEP)+9>} z#?DxLA^M-@^`ug>#r1#$4`1ttL)YR&Qfb?x=;AUOV&(QSE z%J61k^z`)jv99!?~#r2nUvZV5%5`4?@~?dM?vZ_D%1b~!otGjd2rNEL&(U; zk*LY$0001WNklORFlK83jzn}?`ERVHH08l!CAUExuf}E)a zI0(Z)v34@x%8Mimx8F44vOQUu&s6AF8g(J169PT_w3V4Cep_vI8g%4}!r}&bFbB+U sL7`0#DCSX`^j+GvTP+B8UL>5rAMv6gA9+8|O#lD@07*qoM6N<$f{>Gtx&QzG literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gh.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gh.png new file mode 100644 index 0000000000000000000000000000000000000000..573e1b1e6e7251232199325d26261b366e415bcf GIT binary patch literal 269 zcmV+o0rLKdP)Vs3`%O*yLPGd5GWH}S{rv#`{&fBQQ2hKv^Yl2Fnm70N zC-w9o^z;Iu64jJ5F*C&)3& z0+I5%82YC^49-5fD=MEuz3l~QdsP^2#OIi!p!>>^Z+p-=TU_xd|5|S8R=g5lDa#3% TB`n*P00000NkvXXu0mjf;E8B` literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gi.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gi.png new file mode 100644 index 0000000000000000000000000000000000000000..412a6428b9af6e2ac274deb04a4641a6359669e3 GIT binary patch literal 269 zcmV+o0rLKdP)Q|ABxO*IN<0001JNklu?yh4_%*Q@SJT4t-YY^?%BZ+gs~W> TdXASK00000NkvXXu0mjf&+CIv literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gl.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gl.png new file mode 100644 index 0000000000000000000000000000000000000000..9a376c8eeff842526e3975e365f495a08279b778 GIT binary patch literal 259 zcmV+e0sQ`nP)+9m;;{X5u{P6Jm;^O=J`uF$u`jwUZUS9iBQv7FU{J_B2*x39^O8Y}Y`Owh#J3IMr zZ~dpI`ktQkjEv?20{H*{_P4k5CMNR{5%e)J-~a&c0Rawawg3PC0Axu-K~#7F1;Nn{ z0WlN>z&W?o4HCi2{{Jr`k+o800tf`rkOagYO?r}i1f$R^y|+_9QPq2@3LE{Lh46C0 z^O$w_LfjIvm+d=wpag`~kGA7pB?wk#+z8002ov JPDHLkV1lH7d*=WE literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gm.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gm.png new file mode 100644 index 0000000000000000000000000000000000000000..d39aa5b6f70b61010ee1c1e29142e0a030df6863 GIT binary patch literal 302 zcmV+}0nz@6P)`wd3oY&Y~Eg8+f!56NJyLj0M$D@(JU2q~?*M85 zV83BOu|YJeG%2Jh7o8UjlnVeP08+S802}}SSO5S<001=rA_TFA00014NklFD-p@Q=JPW$eP?7}<9^OQ zYn`>%+Gm-q2tROp_g9jLeNE1T4-sQ}kyk7R|2)_kbXGWN-~a#s07*qoM6N<$f-94E A)c^nh literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gn.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gn.png new file mode 100644 index 0000000000000000000000000000000000000000..e6e8ec88d5e86ac6f2dbd420bd92f1ab87a801c1 GIT binary patch literal 293 zcmV+=0owkFP)T?G0M7tQXglJo>Cd) z+UObuC0dHsk~5v1>CBW7NX8LLUt#Tkv~YscW(TH2C0aA@Cfzcvy$0z4b*7`y9A}!- zOuyRK{ti(qrjybpyk$B@LC$nm>By{On*1C6TM9J?)#4IA(HMLPg14sKh6`*@&b4n} rXuzUTxP+f?($78l#9-nLG8hg3uG6esjwk9X00000NkvXXu0mjfu+x6k literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gp.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gp.png new file mode 100644 index 0000000000000000000000000000000000000000..aceeea92512af0df1c90827e97b5e09e98d6227c GIT binary patch literal 264 zcmV+j0r&oiP)P!Z007$nnf#BD{D+76e0}$FbMR9Nmv z0Mh^f#sFUMZ5;pr08vRqK~#7F1;Nn?!cY`Iv7Faip`Z)+=l%;?q|_t`B4iK|ogD!| z_nN&Tm0YtN$1NelvTd)VGBU3Aq|EMjjPE*288E+s0M9%U-iTV^gMdGoCJE3GJ;GZ6 O00003hq2dCGZp$#rbSY+=A)R=QS6vq=C&0GrMHIjcD-q$#4& z{rmj;`T6+y@VWT!xA*t<^!4=f^YY{6V`H2E003Uzw*UaB005r=0O9i(ApigX zUP(kjRCoae!9h;LP!K>dzn@7c%5s_}<6c$N7N2;WNn|y=OcVCy|-g&mEq~b5K9IFWc O0000`TO+s_~YZ_!_Mrz$mzGl=YfRIj-=j)pWS_y z+&N^?@bdNR?e)pa*E3$uEn3YeRmuh%s^#bJnXKW}-0*>d$)>mF2r#0nvB&@bj=;D> zkpKVyT}ebiRCob3%7F&MFaU(%@7l;{3>(1K_kX$?Yyw+5MDe@B7vh+NQPgBNL(tQ{ zK@r1_rx0QPWGa)Uvz!84Pci4Q1;PSbo_Qf7$1U}8#}9APO4c4wjY&bU0{-nT5y{5V R_+9`2002ovPDHLkV1k1ce;xn; literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gs.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gs.png new file mode 100644 index 0000000000000000000000000000000000000000..2efa092bd66a8fadd9bf88a1824a00aed6c0edcc GIT binary patch literal 392 zcmV;30eAk1P)P*7+xBYPwr$(CZ8ui!HmGge`f6T&->3IzN<-e(DwBxU=k%SZ%g=F8 zK5}Qt&y?s5(S4$;>*K=uIJQ2>a5+DBVR@k;Aq%6wtOjT8h(>AYFbpBVAPg=}KUP*> zMn-o+tz4omeSP@!2n%3L%W!Y3e}21s`|9}Sjn&InmQS9TUcau37eWc0_yARyfY#&a zfJ2>`ZH$5c1{!Gx28JdkCJPGc^bC>+C1G8-)Le#3g>wL)dfB76g7ER9ErdHe`$0f9 z9Ka!z&pk#}l?X(%7k9K1w)y_ufKe(1WT5ZeGlq6RZZ5ZzpqIBln6zGRK)?rWgof}& zXrPh1rM0`VI4mp69P6e72yi?Uje)409i7ky8oC>V`yd>OzIah>dz?NkjrR@0)qOvE m+ii95Fol}})qsddA^-quG0!8wiT!f`0000eSWP04wqU743$%|9-Om`~3X)`1oX^{9B#-ZK(b9_4q@K_Bn?2P?q`t0pjiO z^(=q%B6{;2b@Bi|_q@W)i#OCs0000_Nkl^yvh!|C&%$0Xrxt z`sJda=pHWTz@*3E1c`mEIz%?ZLVJW6$0Eca2K!)0toPn9C>fs9@)%z+K5}rse((oH W+!2M`vUNxR0000_0P_F z*vMans+WL1godgR0O}U^ZOx-2ec8b*kIFKcPr_-eo|4f};5V003D@ zL_t(|0R_Q9P6II%Krz3cjF5tQ|AVrqS}_zmPzcF|NYXpkA|vVd+K{j6En^~WYn>cM ziEd9vc4THvj^(kHX|Fn#V=%ezd0DXY_tB5h;d!-)Z#=+1f@ci8xfJfh00000NkvXX Hu0mjfKpAjF literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gw.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gw.png new file mode 100644 index 0000000000000000000000000000000000000000..762cdee1217b59ae4ff6fac03bbaef641cd71745 GIT binary patch literal 297 zcmV+^0oMMBP)Viq`ubS>^G*C9tLQHq z!2W~b?$4#32C|*I>SF(ppGJ@WDkA=8kr;Nav|J{?2S-!$H%|y*QJVR2_B~>of348I vFYSzSedp+}Xgt4+tN0K)xlu`2@Xc5P0Lu}{XhXl#00000NkvXXu0mjfyz77r literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gy.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/gy.png new file mode 100644 index 0000000000000000000000000000000000000000..e90b8f78996b6fa33ac2f02049ea906b8a1a73c2 GIT binary patch literal 429 zcmV;e0aE^nP)-W>u#QkP@INXW^)?6lRl^Rd+rC@UAJ#^-gqY9DxDk*$R0i{d+@;V z*X`KkGa}JLvG^B~RUIj+iOTR`ue4o>Je`D1B>VXj0qKn!{TD8VUO4yd<4p0k*B~ z{@S`-oHzD_eMBM_fL(I>^yjNb(E*d72IrvzmcGDh`7DcBs7{*)1Kj8hZBOB$YfMcf zx^mtSs7{;NJ%s%Er*EXfZ4;M(ePbabcM4zwT1_-q800000NkvXXu0mjfyZX?% literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hk.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hk.png new file mode 100644 index 0000000000000000000000000000000000000000..d285f57c9a4f6dff7507678fadf2a04cfa5cb171 GIT binary patch literal 240 zcmVP)t-s>Hq-a z007wl0QP%(^mTRfY;5vjVewd4@={XnN=ncG0QrrM`kS2WKR@a003Y~L_t(|0R_QPPJ>VsK*2e@OA3km-=^`) z+S1@mfDmMnNUC8atCE+E#J<1ptT{*W^;w@|UW1LQ`#F7QvaDsU$Jnm}*i0 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hm.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/hm.png new file mode 100644 index 0000000000000000000000000000000000000000..8b0d24453e572b3322bf569c4d4572e58c467428 GIT binary patch literal 402 zcmV;D0d4+?P))xrb?b+R@w9;~i zx@Uc~$Iszga;we<2jPv7<$izVZf@OVW>9FSvAWeTPnc70tdB8MgSG$wDSL{#=*`l~iI$+c+@+AMy2II!oWTG99cn^#S$emNcAiRWt(%FeL0z9I zNt1VuzBW{vm8HiSJBR=P4*&oH1@aEB0001)Nkl*;hhP~bl)*r|XmF%NOQ)*l#Y-f(Ad8>)KD1*Ekw7mO z=j;86lkh}DrgG8f-2Ytk!Q$=A1wZY}EyyHSzrswD9{r&y)^!1pj;Q9Iagqhjt>+{IS$f&j9#Kgqq<>fa|oEJa4 z3^B9-089V?SBTTC-v9srT}ebiRCoae!7*+EF#rI;S)UIficqD?|KFA#(IDrXnLvmn zCnBV#1{sq6cF!V`T*tgeg<6~g#$iq^jPby=t#$1QJsTwP@cx>wbC!G)pJTF;@hhRZ d<%SxN4v?AnJf5LIXq4q2{emfL?^4=s7q18#Y1QZC|p=t?#l``#A^-ntFwS zVIoumTs05@C4dO16rvhKgY#~n24GOa5wdN_Mj$kRklscpl3Wf&Tyr1@tO$Vs8Sgj# Te4hMg00000NkvXXu0mjf;izqM literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ht.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ht.png new file mode 100644 index 0000000000000000000000000000000000000000..bc5a38573966dea65dce24284a50d701f2560fe8 GIT binary patch literal 278 zcmV+x0qOpUP)lb*i>uQN@LOh0GoS( z)NgjqWNOJ&TfzVUdHnzY_;_mkTS@v&Joi8^^)epwB@p8P0O$Y!@m);tQ9tcRH0nMo z>oXnbCJ^Nu3&;Qf^J`q%007be0Aq{*`v3p{P)S5VRCoae!9fziP!K@De%}x&8|D7z zR4gL8gAx(BK}2a-l9h6t6Ui#6>rj?TWTu^nIM=*NB=Wn={ktVaI%bg+33ERAkO<@L cu@eXQ1GSh6r2JN^vj6}907*qoM6N<$g4Bj978G?lP!)nu*$l*-WK4{ z`MYTm6R+**6AcTN2L=j!IdPu9BkYi=g15s3+iG@>T`QNeIy#s+F*{!6;H@`2ps(^l zRMe*WTTkPLEFWHur88C;ni^ObsjT%coAI2%QSGu%gGY7KHm~(vIosD%?B3z9nL(iN zdJ!|Lq=e)GDUMZc*BM+Gy_p_xtdq}UIU=%xjm=j=s8P{v4hO?UU$!*CuMR#yXEJ!Y L`njxgN@xNAZBa!q literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/id.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/id.png new file mode 100644 index 0000000000000000000000000000000000000000..fc6b7b990a470e4f5804497878d6250525e1051c GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltDc1m>5ZC)m4Cfgb-c0Oz-`?=1 zJnvO@@{7cXy$lS`!hN6kIz4hWzh|ueZQrg>tCzoBF#C)I|DQj9e*XOV{rmUNpFcl) z_Uyrf2XEiKed>AI3}~Rcr;B4q1taUhje^Y%0t|+4|5kg*?D%iRX{f-eprFjL@@z*> ziDYL_%UOd-5#{rhTZHfba#YGt5X=ZtituT8esKQXO$Evoj0Y;&Qy<>mH63UqgQu&X J%Q~loCIATNSdRbz literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ie.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ie.png new file mode 100644 index 0000000000000000000000000000000000000000..0432bc77950db7ad4df141b941f3f718953493f3 GIT binary patch literal 243 zcmV-6jLY7O83004CWI<7hZWB>qF0JzAw&d$!pwyMgWdVc@_08~jtK~#7F1;JZR z!cYJ}!8!LqY7^q0``@J$h%yrrNYp}5X#LyjDYw)$A_QR&;*`mPqn8uYpMe7>rs+O@ t_F+3=P7G}D0v5jyU)b-9EZzU002ovPDHLkV1iCsXCVLp literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/il.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/il.png new file mode 100644 index 0000000000000000000000000000000000000000..315ac318a5073527e28a61a4a56de49485a9fc51 GIT binary patch literal 218 zcmV<0044v4P)FMd` z=jY_)dsK~#7F1;J4cf-nF;vA#_f@cuVdKMW9U0|k+`fDq*g zLTCV8m%s?FxgYCfQHSj3rr&pQj`Z`I_vyW`Hx6jJ7t9C9Z2@gVER%^(lQ^)0KW7gR Ub5>j0oneEP))&tJcWPtM@-GPt8il5JfmdgNh0EonhXR>EstY25CS5Tx- zM4v=Cm^uI=003_QfWLqM82|uf0Cl)^09OD2L;wIZ0Fi~yfB*mhR7pfZRCoae!2wPJ zK@>o-zMXHfVD$bMl@JKCwgE&agCxmoScxQC-$$tSL-y~Sxj1y4qR9nc^$rf8We4V7 slq8=yZZ}F2)~tOl{z%Fg@)J)M|0vK7mu6KL+5i9m07*qoM6N<$f{E&d4gdfE literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/io.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/io.png new file mode 100644 index 0000000000000000000000000000000000000000..e928207376751711116b28147fa453fa83c6d9ed GIT binary patch literal 438 zcmV;n0ZIOeP)Mf2eEQ zwr$&}t?1acS=+W9)wU+tI$7hJ+1Vq4(U#7M!I7cbmf_@dHkK$WQZhPf>v|J2E4aQu zW3E`_;brBv>&-PZe(&Ct+dZ#SPs(Mpd@dWPf*dbCq&|A(zx%}ZPyg_fOyxX@HjeOT`^oznGl%)SWbR7PJdHhW(86TRWS+Tvth<>Dr?gD+jL%+uemF` zBq%rw>}&U3C}3OPpMNbn2|=QhD%Se z?pAPXL4nn0PA+^WCen|p!e>+zm<7(7YY-ev--`0)>kC=|_ rw~UuPm^TaYGI25yjQt3nB0R`Hf1?7mPt8&~00000NkvXXu0mjf=T3b$ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ir.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ir.png new file mode 100644 index 0000000000000000000000000000000000000000..bdbf70da31e3f45ceda28319b2d00139ca54eda3 GIT binary patch literal 311 zcmV-70m%M|P){{Hy(_xicH_4M@S=H~gAm-eNl`i6%0f`a_z<@(jt^~}umtE=+E!}GAP z;Ddqo008`CWcfis_ck{4D=YLH8}J7Q-T(mlS6BE;OXvUq;s5}LyQ}d4003V}L_t(| z0R_Q9a)SU21Td{}Dddv>|1_C0cBMcf5kYc7M1=G@2qoCfJDHlAY-(zb{t31sqe!v4 zx|M>m@Z_8Vebx8+T%XR7{rgS&&h7RR!W_*>e1)Lx=%+8?!9QPG9G-ixg$n=x002ov JPDHLkV1n0tk+lE- literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/is.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/is.png new file mode 100644 index 0000000000000000000000000000000000000000..3dd06dba8ee74fc9c9593aff0fdd392f028a9bcc GIT binary patch literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltsgMAl5LX7xS%3fjy91K%W?*e( zV5neV$nRKj^?hYU*~~Lp6HY`lA7o&NejO3+TfN7rXq#ou<`)6}zkdDt_U+rtS1+GA z*gr8gy04_Tn}I<)ah*cs3I+xj`BLW`pn)--E{-7;jH<_vCbB9pIBc|8@b35e$p3mf zRaYEVI9YW3|J(bzi^P=8>zg&Bn;-nrsOWcCeOvmp%EtLe+jnvYd@kED`**I~i`SJ2 tr@ls5=3Gz9c{csTrmGRRzuh|^7%)|6&I*-_?Ld1NJYD@<);T3K0RRPKW=a46 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/it.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/it.png new file mode 100644 index 0000000000000000000000000000000000000000..9dc1a86bc5a46210ca1169f6f77c8744e0d0793b GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltslWiA5Lbpy28ITPCr_T-yLazB z14H@A^1pxo{`&RnXIR*GH@D=2$q{=ae*F0H)!6u}hDN}SfUnZhj~E!-x4M7*`t>tE zpZ!LAh5`n&)n*J)45v?@K79D_?AVhzK*K{kT^vIy7+DW`b1^xJuxz;U`+~x*FaN?z zRC$<_ggiJJBUprr_@&J^c18<2uhCe4NTAzD%k6m4sel*TWY|)7>$W#mWglgnFR`!f ibwQ=UJXa3;AIt@}ICkG=3*QMepTX1B&t;ucLK6V%3Ra=s2+!Y(zXoh=VPIBhr)PEzE1 zocrzOoEy2xS9rY7pR_p+4qENsWwz^`{l?_*4fP4@ymaP2y?>b4`}XDC_3Kv+6|W!$ z7zG|<4H{lsA+3p8DDiXg{CRVZ9y!#@aOTXJ&#z9$J0ECDIuISQ1wb8Qw&L0uj(WJ&+yE3 zbGHF%S)Tpa0ojHgYc?CKS*5pF*=aUB82$Uh3B3&X2LwZ!6SWz$Ksrlf7Ryb;$??7u zD#FKD3l2jS;V^A!^gV2fu`zkiO#!No8m&VosxsY{K##}66EaVGh3Fi^38LMdtm@&Blku}gCtFE%qKtEur#;IXjhK1Va!+GqMp-4V}QC^=Dv+2P1zNvOz-XC*nX?{{H^^`}_9x_TS&%`MkXOe0=(mD<|c_}AC>CMMI< z)Am|gERfz900010Nkl-wv3ghMi|ItkqA=`vF QQUCw|07*qoM6N<$f@FAQX8-^I literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ke.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ke.png new file mode 100644 index 0000000000000000000000000000000000000000..33306eea18e057e743d65fe93e78a03f36054298 GIT binary patch literal 343 zcmV-d0jU0oP)CcZO4tEs8sn()KxpYJbW568!M<>hd* zyZiF=!14HagJUO?Ne@Kdg(Y9HiSQm63i$S!v-_>Hdz69Ut)az@k|ta+6!2sc6Ry|= zPW08)8=~#)Q2vR(Ulhxc*x&!-rea#)y1Y0U`z?I8f$56D*r7 p0cjv5c7YOj{CTW}X!9tsj=w7w)xHnPW(WWP002ovPDHLkV1hw$lw$w@ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kg.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kg.png new file mode 100644 index 0000000000000000000000000000000000000000..73f997f22c431f5628cea7a6f0386454b2f8ebde GIT binary patch literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltsqg@w5Z4b33@;fN9x*WdsILBA zQSrU7=xavCm)O`ZA;F(~d~Px@e5>^QTI%r8#reIpmU;fV==gn(&1*%O zi$Dd3v_GUOy%ZP!+^YX&rq**lzEcbg##<U-#7>Eakt!6rP$2?h$jz{n_hn9{=m(&!l*s>vPX$bAJ3*>i*``tSdFM tz6<+tzg+q6uVU#GAEobI#(8rdh+o>ky?1fX?+TzL44$rjF6*2UngHPfW!nG% literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kh.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kh.png new file mode 100644 index 0000000000000000000000000000000000000000..ee718d9dcd82f14be9e700574ffc4bb1bd8d8a98 GIT binary patch literal 300 zcmV+{0n`48P)GUX?mc<$YhI^L#${oyokeKVEIe^&WjJv}ey; yvprbk)4^d#w{@s|p?<$xQ(4Im8Yd5X5c~sfY7-C`b1HHG0000Sh;KW>UN*EcH+pAkQu#?NzLUNW54z_`L$OPD% zS;Sk#eFTe7?;I$#sEud0bndw(%+9P_0G>KFcT(E0uHiW{Fmcd1a)et=i)7+(V_;({ zJYEB!0$v6inWpC;P9T$}LoI#*1Mp`67Rb4mvE~>4!+j65Sw~5-=wr$(CZKsT#Cbn(ccHX%s*8KkC?->w@VzM(vj%FB# z)1Sk@GeQhWWT)HcmfQ8MGvnHh%@nS#w5f{=8HycP5tjyMqe_#^0W}1-x4!UciBoo< z!~|O>TeG{fI2c$TxPG;qpP#+9zP`=`nBKiO&?wWuv}B1?dS4b!>GYRD-CP|;aUhf{ z1fDr&$I~O!;aER~`yW_kWlxL8356X1^#jBJc3 zCGl5SurLbG0Xzp)&jEe_pOG9?6&l>~4RiBiLS%m;uqbYF%)bQV>6G|fd qm?C762?%cs`FFthz5NXLKJ@@0bwS@60qVK{00001 zZ~YN${R?FL0b2I}Me)1T`{eHb-|73>=J}qy>+t{p_lt`6cX;-3a`R+m@mE;zN=nxN z0Q<Gc)NUBh%pa z&fN2Vq}~85>i`<&01e<4nWe}8003)AL_t(|0R_Q9PQx%11;BascTz$n_UyR-*|H@P z4R&V&k_bVz06|ENB!m#Nml(-4hD84F_GNpl{ewixvq`I0Uo(;FpBnQVXIhR_N0WPR xkH5`TonK}4IqmCk4X-6z6MQ2`&4nLA;0^e07|&gM`;Pzs002ovPDHLkV1j8=huZ)E literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kr.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kr.png new file mode 100644 index 0000000000000000000000000000000000000000..ea24bd06a63a6da0844928273041466372a4dce9 GIT binary patch literal 339 zcmV-Z0j&OsP)*|V%ihg~5{Mp%LV`F!B zciG|JuCK2B_VxOako!eN`aeGTcy;LL=<~9+={iHUp2TErzfo$&$9a>|+Sseb@G@@N zq^;W2*3^2U=4_JPRaI4KX=%vS?atHDpP!#19EVc?004(cL_t(|0VT)-azp_X1<}3_ zv27Kz|MkQ+#-5Kp#TIocph_ZX1capFFknvVu*k5#sHUw3^yYF#MZZ20cwzl*eWI}V z8X3J}(Dr33n(0U!m|)w}JtJ}q7@W11o@ax&p1qL5;D+tv``Ow1%Pol+xB2J~$DN-a lwD{gl5MnsfjF002ovPDHLkV1lF^v#J09 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kurdistan.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kurdistan.png new file mode 100644 index 0000000000000000000000000000000000000000..fded8c5dbfcfb66fba483ffd9d1a46af00472fe7 GIT binary patch literal 239 zcmVz;aR3|!{Cf8P-z`^|0U$O=46gy0 z;AJz+01z9u3nF%QzKz(~^&cH4?kM|TzuoJ9<91Il8=D%CUIvCK-ftNCo&RISQ+>b~ pmpoW6koW{rL=Fb)1(`w#1^{`Z$%pe|7qQKCNB~9vU}Iogs#`p;JTIy*C#EL=J^-)J zue;*AvfZ+(*s4vcO>%N`P*70e;o|%I`}g>wcM5)$bL2g?8e;#^$yR8;UwOYS~C+yDU6001528b1I408dFo zK~#7F1;K#{!cY)EvAoZuS$q(4Yn$g-wcl=KE!yRJLEXw4`zc1(0_3Hb^rhX07*qoM6N<$g38!-xc~qF literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ky.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ky.png new file mode 100644 index 0000000000000000000000000000000000000000..c2cd820172a525ea7096cb0abc682ef479ee2268 GIT binary patch literal 386 zcmV-|0e$|7P)QZLV$Gwr$(CZQHhOJKsFnT6_C_!9O!q^{U@bb(ZelcB%Bp#QCEr zz=t)X2GMgOcB0=z?@qzZGot(S@|*Q$&*;wl#&TWzY(?Yow~14hv0IszeG$O-LPwmm zVV01pJ7xC}dd{M?VrUhtP3E>8M3_JG2La2zwh`|H0 zQ5uHsvDGthd2YB-U7liv_Q(eKsLQZBHvC41>*`|+t?Z$LQ$^PtJJib0RHsM==gQbKL7v#07*qoM6N<$f;4Hmn*aa+ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kz.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/kz.png new file mode 100644 index 0000000000000000000000000000000000000000..52f6cfec2e850b0a81b02e34548b73045c54bb98 GIT binary patch literal 350 zcmV-k0iphhP)CfJn`qn(_)=-?%sZh=If7s*r(=yc2SzgcOMauL5jppReJEqQz zi_EQR+5B?U=#AFO%+qXn(a?R%xV6h}KF9I^hT>t?`moZGr^|ph#q#XmcL0FihpGbm zCmRj`004SPL_t(|0Ug2BVZ%@Wz(DD7IQCaz|J};W5YwHg!zm$xm}m-s%b$c10xmeU z0BZt+wN@z*NrMCXNRGw)vrEvv_IwQ6tRgA7-|N=r-4On^Z`(*Ok^lez literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/la.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/la.png new file mode 100644 index 0000000000000000000000000000000000000000..a93fb5da79cfa16cb638b9e6f9e9393a340678b9 GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltsnP(S5ZAv94Br_TJ~A-8Vqo}J zQSm1y=U06EkAQ$2Cf|b-Hf=0luq0*j{OI0UL2c8#>tuntME5k!dz9aEJGtfNg&Q9{ z3(ni7osFoz%D~X^_QUs|KYu=b`Pne`qID-J(J- z^Phzk=^a-y?Z~c5{~wWZ&Z57zJmNvoB_*+AALspyYyDX}_1!PQ+hO7l9Rs)z3jbg~ Xdz$~OYLfJ7pe+oZu6{1-oD!M&@COr|441zD(>eeE002ovPDHLkV1iHaXnz0z literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lc.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lc.png new file mode 100644 index 0000000000000000000000000000000000000000..72526dbd80f264436b9ae4ab3d92e544989d0dbd GIT binary patch literal 331 zcmV-R0kr;!P)^MR)ZyY4j>%@ukQ4qsRE3!uOA~_PgTwh_CgOy7h{(^eSNDf2j1%-059h8>&8{UcmPL* d5G%#TqPt z#WQ2TqO7BjpQ0vQy(0-=ppm$Ucd3GIqk3hUa9WdOOo;#h3F80&^Ll6RU`q8{MDtKN z?MyT9Kqu`p809Dr&j0}ISwiYlJm^X>?87UEWW+o&dl6$rHAkk#WzDYUH z8~0dJMn+@rJ+3Olb@f}4h-=KFk`kSBV)b4nuj8CIj^3-}bM-978G?lM@m;oSYKVB_$?Y zR8-l*+v6a$Eobki$H)B@Zr)^%B+S47S8gv#Md44|rlF>AK-E&O~+$~S? z2PHMU$jcEBxXbsArAr})VO89Y7c2qHs}6FogfMJZT(h*6JwTHs(Nwx)oz-k+*J+GX z|5yAKN>Y*A{E#DqSwkbP%yjWi=_G?YIUGz}PPqyxW=wbON|~~l^EL}|Xc)1lF(1k~ lWTv1b#Hs7-T0B93fl)i)W>_%GOQ8E1JYD@<);T3K0RXtqPow|< literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ls.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ls.png new file mode 100644 index 0000000000000000000000000000000000000000..3c0f37fd612700f0bf3e1dff71afcaf029ec7cc9 GIT binary patch literal 343 zcmV-d0jU0oP)gwm`=jG+)-rnB1&DQ`vjp5R@_VMWa`}_U<{`&g(j=$SdpUMCMX7~2<(z}h#w1n#M z^Fo%yD~Z3L0Ccd@Abgw-nhh(ZD*!4036=>-r*m(fv;ZuF0164imDscZ5IW*((O)>%qD1s(^wXCYlthPNEh7nm4(GNq1oC%*0 z>?*U~8~xgQpG7X@Yk)4Tdjl10%L^ly`JhDg=U1a^WZd-BG;M+ pXV38XMT3GjpA>!;&?tD_-2kby7RSK02CM)8002ovPDHLkV1kgZpkV+2 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lt.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lt.png new file mode 100644 index 0000000000000000000000000000000000000000..9860367ef2b1f22e9f100819851496fad56f8b58 GIT binary patch literal 313 zcmV-90mlA`P)$U*>>wx^{bNuFH_~Bar)ByYARQlma_uV;M4#p`84gllqX0{DXY^c5eJ^W%prM{=U2Zt*Pf25$)~m{r&y=`ug|x z_w@Dk-{0R}vi7*%{G!tOl*;vm#PD^sRDurM1Rg+s)In*aa+ M07*qoM6N<$f}%us)Bpeg literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lv.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/lv.png new file mode 100644 index 0000000000000000000000000000000000000000..ec616e835b29e81491ef898a89db77c776cdd98f GIT binary patch literal 248 zcmVKCHm58sq9P(U008IE z(Dmo%@ZsU@+}!Ec*UFxr{r&y+_V&o2pqmmBCjbEJy{4W3003M`L_t(|0R_P^Qo}$L zKrubi3!0000Bd^_|BJzx>vwIT`=} literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ma.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ma.png new file mode 100644 index 0000000000000000000000000000000000000000..a96ae4578890c1030d9db06f6312c50cb607a6b4 GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltDW?FR5ZC_<41XCIzA-R-s;-u}Cp={G&SuWD+$%Pqc0NL);|Jshj^ zkbyyFgVQIVX`!Ajjv*C{tOpJA4m$`i7@k|l=P~iv|N5m-w>zBJ95pOEH1_IGn;MkQ zti5zi=hgc=ukhTC`}Eo3{D(h$tIoeG-%-5s%JPTDriQdh&kBAP>FKxl0QV2}#7N%! Ug}Tdk11(_iboFyt=akR{0M2bzasU7T literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mc.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mc.png new file mode 100644 index 0000000000000000000000000000000000000000..a4a03893e8f522841a95a7f19ac41a25198afcad GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltDfSj+ zxZ$IEA^>QVlc$SgNChM7!Hv8P1_BI*_q9Vj-t5;9ZAxHoC`(b8WYgU_ zFJ6q58Qep#T5?0G{m00O-L0<-GuS8~A1b003%9L_t(|0Ug0HI>i7G2Eh6E z%X*stfKuiDr&7`Z0A>Orz7-OUAVS`wJ3cz{=lQ*eF|)1`EErvHW_vYXXXScq935d$ zH*89k8IxJq?DASx2Fu>v`Hr(jv|e~HFZb*}6_HyD`Twl>0gsgsX(L+nGynhq07*qo IM6N<$g7qhZ&j0`b literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/me.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/me.png new file mode 100644 index 0000000000000000000000000000000000000000..70d7b4f577ea2afadc40ec054b7772980cf5aea5 GIT binary patch literal 270 zcmV+p0rCEcP)lLRIhl|A8DU6#{kufiyxy)Xqdi{%s&*5X&w( z>UF$7)9bzw8Y`1!d#9GM-+nmBoaAutVziZV{NAo7s5zOOU{uRu;e_@c_`|rs7Z@B2 U6QnN|&j0`b07*qoM6N<$f>&2<-~a#s literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mg.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mg.png new file mode 100644 index 0000000000000000000000000000000000000000..fd71126afdfb6b5cabb9761beccab51985680c72 GIT binary patch literal 267 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltsr&$+5Z8C_-u-4^_{6~Qih@ui0r_GL)FZ zz!11A*m$k6`UZ8GOa}r;B4q1taT0N57T;0f&QC7ycX-2+!O5pSQD3Fga8~;M9VS68?Y~5JrkQ( zFR4hGqt&^;c20!nr!(JJ*DRhDxq0V@s5)ZEiC!W1Gt=YqY PRxo(F`njxgN@xNA1=4Cf literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mh.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mh.png new file mode 100644 index 0000000000000000000000000000000000000000..572b2cc0ebaa220c36b1b851c8dd3e0eef074e87 GIT binary patch literal 376 zcmV-;0f+vHP)2&Ng1J+7wSIn{(~4p1005q@ z)BgVcl&H~6aI!{eu03Y4KVqe$ZDI9&D)*8}>0AJ+x7BiJgw%96_NZ<4~9QJxMsk1|@K000t8XsDKTcNs;P5kHe} zahK4Zg0rQq*}}R+Kxzyla{vG}lQyv+0001gNklEV}qNF+sWl<{YVviIT0!kQ7J1|X6l0@^3-#F9CRuapn79pvw+KC;! zpF10AP-V@k_Y$3{k*0^%48DRZp-+UTw!VKa*O=;w;f?RLLI~J_QRt&jA$L%RgsBNB WTp5M-dl+m00000pt+qP}nwr#hu$_+PIZ}j41ZQJ^dJ@ei&Inm_a`(cD>3iqIJMI-dA zRuUngqLz~3qNqd&<8lYrxa7uPbDv*vE?olq{4qP_C|HLMTHCjRerSW?Sz(l|ESSPQ zU^INQoweS1yvbU-S`xSjj9Jr^$&<8Wi;47{`uL$yTDb>IJY**wa=@pwF}HA zbASc){%}T>-F=mTeUv$K=oD)*Kz3@m?~V}O#AyS70w{0L?GdEi^(wn z=d^B|Ktk*ivm+OMvlX+&_lt)I4Jc-( zE_LqOY^z=NXf}ogg4{Pd$&;@(@WW1^iVn@jF#88y`52&%GSfd}@2=JI*I#55rPdwE xY6h4MRM>+nK4>4Z@G@=$_s>p-KQSma0RR!hv118B$~q zXtuDKYnZ#2@doFEoam#;Gv;SNyS0b~dgWfEr32c8l bf_NF6ZAGW-OWFDj=m-W+S3j3^P6OH2DhL;5~G z`aV1M^)oZ{EG+dVCig~0=Kuix*i!z)S2s8K^&1=ZK0f}3cK)qX{ex05G59Mf_Wj&! z`(Zy#K=1Pp5Bt_aAt3cXH0~J{@!$Xe`m;d*0Mq~g+UVaa`2YX_aY;l$RCoae!7)w( zQ2;=}d7tI$qS=NZ*53a()?UEQLIZ^0OrY=>NoEg2lw2~Ox-Y4!TJ+ivwYoODEzU)) zv)jb5cX@wnotX}Q2G@;sHm3sy8_R4O2Re?OJ(>o-X!pW>sqwshr_0oneEP)HI;}dZ+N|2_+PUAjoxvdhGXR&+mkpT> z04D&fz~Jrx0044HL_t(|0R_Q94#F@D0Kr{5DW>Jbf&ae|0aBq!nGpaHL_DLx%}w0-rc;CrMYyFylsoPY=*Ubm%!1~ zv&y=F=*X4yz^nP>nbppacaEn}bf`;jrDKG%ti8Vc@1~!&r-YrrwZ+Nh$${qJrbKF@ zU4E|s05#*Hrb>%o@{py0{B@_PRho)LoQqdVvB6`v48M|2V{fhj@{ z@967@h@0K;#D0AD0HZ7X%rcz3h6YQPHpweeX!BehAy!!k!HV~p1s}KH8h!x3mG}Sv N002ovPDHLkV1mxavW)-$ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mq.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mq.png new file mode 100644 index 0000000000000000000000000000000000000000..16a24fce6b53b0805ede71564efb747068ca88fd GIT binary patch literal 295 zcmV+?0oeYDP)>C%-RO3Vz`x1gUU;(r06$G> ztGL43(b(t8(&g>$@u6>{^6gMZR!)s25Z)tMiH+el!8fUz-R1 zgdyfbXl-07xs^m)Ue4d9k$?xD;2uc$hxHS?YHaNBnTCC^sw-#b%JY&r=L_)l8#@5+ t#|ReQr1a^5pCN=uYh ziU0tF004Rb0B!&PWB>qM0D8-Mb;)&Y!)<22W?#TxT)tUUx>QTHO8`XxPqa^@+DAUH zJ~*y5FsLslqbEhNMF39#_xe9LoH(xDPM*{zA(bH!oDq7-NiLBt-0dQ2!5ph6gD)ROw5SI`DF8}~6001EX=@JW30001TNkl_6x5DDk+S#nQ*`KPOsML0V zzj1oJWplb`Xs%spv{huX&JYpila%CufaP{|<7Z~qYjIs&s83w1bdcd@h1^hIumAuq z?xCO5fQzhklucBnkfX{=Tdw58%b<|D!i1W~gqNIts7FnqhM&`ur*i-RAZjjgl#04O zNuYn5!$no9K24@IMWUdNSH_<~000nie!nk4pD8+l(ph0`2f)eL-QB|n;3fb708~jtK~#7F1;N1$!Y}{;F<%<^gV=veq^c#s4p2bN3cne0 z=J~kdu@2=r$4o%!Fm5+%QHlWzM+)O@EjE?WYgpJM0|Pe7AQQXIb@UU{jgRl?1^(sH V7+!cfveWL( z4LS4AOwQcv3bEH`d~vg^Y z{$sq`KGoD}CsC_Jq?J-#tb~92H9G_H5+}>={~lj` zjI_zDB%`??2~5zG5G|g>Q+TEM41CR)-pnR{KCvY=P!(nW2VqDDg*y8=xy5Cp3gF27 z!BOCJ7x%JvrZjKcyJUv`sjJJt#~PqJN#w%~7Ju2kidmdStppxovC6ROWTeL%@~07*qoM6N<$g7ZL~ Ah5!Hn literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mv.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mv.png new file mode 100644 index 0000000000000000000000000000000000000000..22a5982d7b332f255ce6a725e0507dfd9c3f2cc8 GIT binary patch literal 269 zcmV+o0rLKdP)P!a z0Ri3s0NDTl(*OYXd3p74aq?wk@LXB%Pfq4fN9IC0=r}gzDJShhLdXCBed>O6=XH$g zj==N6YUOKR;b7t;9o6*KpzEPp+gY>jvsB<%QQ1%46%gkzF1`Q&w(Pb}7X&E)003o4 zL_t(|0R_PUPJ;jxK(RhP%%O?#{^#=wn#D1&4TMOtArg6Jn=2MlwPL4AdRRbh>zdVR zQJTB+9vBF7{{HxPb9Dtvn&$!Yw#Lb6$JRE+&h9{8AL6vM7UktVR8_^r#f5}~3=Itl zlfsk~l%CovCMFv?I)HY*oGkve`1k-zg4_^t8yk0PX9w4&robG3s;qn}BXcG!45!@O z$DEvav-dQ3YF}wJAjfQx(=!1Q&3K$g&Kanr|#}Li= zfk(nh0`Z;lGa58f?^T!UlmpRbQSN4L;Hc;LUGp2hmVX7jCjuA*u?9{PP7Ex8*}pu3 oK?e!gP%e}OrTIvjLXX1zJ>tEk_Dm<FDF*+|B?1#sC0;y_tTymUg#~{r&y=`ugW*Yi6y3U8#Ha_V(jPP2WOD<5*m{0032_ zcG}Rq-#9)`p>g2W#mBIWgI+w+#;*WT0IRj5jeTkK@$uU&GvG~7NS$k)t(iNPVb~)n zuK)l5LjV9b001Qb)YR0<#Kak-G$Q~20BT7@K~#7FHORF=1W*74u)J@$H#qxmg}Xz8 zoK%-G0f9t_E?ES>(T7ZCqD7J-GFV$}l1?M4&18IcD2Fk$=hhy!S=~|?bno{7wGSMZS7+X>(AD7Xgp;A&(Lxd0$GANfZYxFDi;Vq00000NkvXXu0mjfgphvU literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/my.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/my.png new file mode 100644 index 0000000000000000000000000000000000000000..ef4fc0700cc407866964cc00107a8dc294c12a25 GIT binary patch literal 323 zcmV-J0lfZ+P)(QItu`|+ijZ03_Z);;1kkuQLwsamRy!C!I`4tn5padzHXsES1OV+k V6?VehEO-C_002ovPDHLkV1kipl@0&^ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mz.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/mz.png new file mode 100644 index 0000000000000000000000000000000000000000..c120273959169f834ae057dd14892504be0b0e94 GIT binary patch literal 378 zcmV-=0fqjFP)V&Eq-ee}@FzB*a^g1BVHR z8jC#Zcu2@lkX=Zjopqfxm{yvCcBwWcS11RfxuWnj<16`t2C%i6)sha16?jKIO?wJA z5^sP&!@j2So`lHQK=stp6g4(CMh#63QMk@&$RS&VG`LwVR7fHOJx%|lbbgBddG`a} zKY0gF9=*7C`_a`axABDFw{nb3)L7}68f;X_qha^+=c2ctxJ7XG+$A`5`YawY4U>d~ zIGV3Dsf~JR&}vK)YCtuw0iU#I%arc^`>@?nIyKfvVIQvHo?^g7UYZlrfQ?bT6a9Lt z=N`4*dVyMPI0?&j$6>YM)i_@% literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/na.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/na.png new file mode 100644 index 0000000000000000000000000000000000000000..cb1488aa90b8be92982816e2f3596ccfabd53b19 GIT binary patch literal 403 zcmV;E0c`$>P)M^balyYZpCM3#O>$r^3&G(Vr2MCOYPHV_S;^3b*E8K zx>r}Zw!7r`cX#GqvhrD>CDB(opq^aNdiHYIj)q>54 zIjlJVKLFz6^77u|`deE0JU{coz{uptKd?X)ofH5u0QsPxm)4yhq8|;J4Kk@R`*3RT zv#-+S(Nn!!E2b;n*yrQf&8*(A044zT1q0sd-OQ?!0Av86G`(N|004_gL_t(|0Ub@n zVFNG_lgxIRx&1UWL3sbn5%`3e(LP3r;0Z*ulVB{U8B1{ENMc189}997QWCg`$I`9k zWu~X=Q|$jyEI|FflB+QlgMv@=@~bdCQ*B^BAoyL002ovPDHLkV1oX)zMudA literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nc.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nc.png new file mode 100644 index 0000000000000000000000000000000000000000..bf83cce3d4b164000fd7025c1e76e15a4d131f00 GIT binary patch literal 375 zcmV--0f_#IP)br0puMSHk=;&) z*l`wp9{@4^00#ZPgZueb_QgB*FIe{`Q1u>5 z^cY3;IbY`h0Q~NCZ*E4Ln?LyXGV>Bbo*iKPVGe$-Zzi0AQqmsmM`VT|HKjcu<0CLyl-Qh+Y5~000dDxR!J~0001H zNkl;4U V71_!>>|Ou>002ovPDHLkV1l&9rUw83 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ne.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ne.png new file mode 100644 index 0000000000000000000000000000000000000000..1db0c05b685828b65f1ab1c0cfeae27163617e18 GIT binary patch literal 278 zcmV+x0qOpUP) zKLGhJ0Pz+8|F3%csdN3MX#AU6`;$-V0RZ}oM)`p__jfG#*u?$r<@o5{_T|{zwx0F% z_5J<*`Lcxg&9m3n*ZTVU`o5Xe)YQh{#_06u-|yho=+>ghq5yILV7_5Nut77aGbW-Y z50no8BLGskQUGHB09XJ3N&o;g06q?ElK=n!P)S5VRCoae!O;zZ01!a2J~%`ZCvg7_ z{evL3fruc3M5M_|7LngQ?|_JVnJqYWT`&V?`}PC|!*zIpwNC+oW-E!{UWWU@NrYz_c10BogfT9aA;B>(^x0LswHJ=CF90001VNkl!F#2)ROovhzu`Y+pWP^^tSuh&r#HM>6A_-*^XCRG1& fd3pH$djH@9TInT^&w}vl00000NkvXXu0mjfCe(9c literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ng.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ng.png new file mode 100644 index 0000000000000000000000000000000000000000..71db60520e0546e40fb447e90dc1149198cb7f79 GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltslWiA5Lbq728LFKyU*{we*c;w zk)ir@b;Zew??1l(`Sa)Fw~vu~BmH;yGx#tVt~69#qUyTE)oz0wgAIe|Jkf$JRi^);MVdI`x_aCGs9QZAN zaW6;e%odSzO;VauOpc#rn|^C`#={BkS|9vKiTGzEBXPS5NKCJuDX62jCQy3Ei4TG` idyiIp{K21on7?_aVCj-IRi!}l89ZJ6T-G@yGywp%)m-EN literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ni.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ni.png new file mode 100644 index 0000000000000000000000000000000000000000..8a3df9f4c8da91ab2052966f4fa7945f9d741410 GIT binary patch literal 270 zcmV+p0rCEcP)*iu{Qmy_`tFwZ=!*9C_Vo1h=jZ3H#Inzkcje{f?c#uYx8@au^8f?j zl3&;jBO&(us7BV;aD~}2&~`9<-GgD&wV;>E5$o}e=MFddMI>M-0%hd0i6O6 Ur|RpV(EtDd07*qoM6N<$f@Cs*p8x;= literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nl.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nl.png new file mode 100644 index 0000000000000000000000000000000000000000..34b52a24afc66b11b7bc60e338bc9348241734a8 GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltspJ5k5ZC_<41X9HJ~J@9Vqo}R z+w-rqI{uj{sH)H9Ck01a3{rl_Judm;}UAuPe(xpob(*5Q0 z&&Tv0^KCj{U$N7;aI0p<2APC43=Dw`%niK3OBoof85k-U7}ABBRQCa`^Y(Oc45?sb zJ=n>6$U%U?@cdn_&I|SHZM>RfS(=QTRBGM5opzjEZ7%rIXf?B9Mx%fqZ&N{%oTz8f qIU9TLNxjwl(>uIp)V9c*{b1g3o+m3a<;Vu0u?(KBelF{r5}E*S2VB7b literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/no.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/no.png new file mode 100644 index 0000000000000000000000000000000000000000..0f98f5e2aa93542c4124b335aff674547ef144b1 GIT binary patch literal 239 zcmVP)t-s;s5~t z{{941(b@q4&j0}OdU%w%>+fo4?p|E#OGv>00D7k7=s!K>GBD#OCHngM_4W1U=H_ml z;$oHFP>9(846ol45wrjR?(XjSLP0kG003V}L_t(|0R_QX3IZ_@1;BdgjvENx|BikO zW}H|RBzqSGF&%UDAViuv=4wi082}}sBzQCg(&_0+2=?f`?)(UF_UP}0GusWH$Dl;G p;T@^zdh}Nbac_s$ua?sj`~jV67mFpMxpx2n002ovPDHLkV1l+IV(|a~ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/np.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/np.png new file mode 100644 index 0000000000000000000000000000000000000000..4fda5d66c8ff7affddc79f1b15835ac8f392fd59 GIT binary patch literal 255 zcmV+PgeEx&PP!w_VI{ts2lLL47(};-w z8-ON*#NmqAxlI2b1quQsL8gG%APiOrl7pKB#2^8j7yxUxv%J@OMKb^Z002ovPDHLk FV1gm#Y~la_ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nr.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/nr.png new file mode 100644 index 0000000000000000000000000000000000000000..e4d797778f5109c53f9d8ddd97bcb9f65b7c1983 GIT binary patch literal 261 zcmV+g0s8)lP)gxu7Ja&6Z56&u=4*)aV#M zDnpM#B7Juq`~F&L#_7FB_j#C^aax%?n`)evv<}}jBc*DIn=8N{lYR%TQhQ07@*{^^4LsiytZW&V(h{NQo$oulyUOz-JR@$63N&_MG_O6}%G z$hP16wX~k9?&;$|?Bzo4=S5Uh%Y%B#ZDY0O$~pY`VCmsJ=iWNu!!eK5<$M4D0EJ0J zK~#7F9m&OE12GVV;r|H|EuTV{aANMi9iO%YvquY`G%PeTFCoLbdXlR4R!v&;ax68u z-0(?~tH9A4G~*l$)nk6>r2W@XA?n2X&G~P)dD(t^{45tgJC(mZGGAsw%;_8h%(H2l yl|z7>$9p6^3KA+yG-j*DLjtGd49_#v1V#grI3Tr0D4lx%0000lQ_P~Lxy-pkC)Nj}?Rg6#MwP>s(So5FvpekOGxiJ{Ep&q#hxX&(MR;Jp_Ih@Dxx zdi%Z+j_h}FQfapS4zT~Je!tg9K1Ka+&({5&pRMqh1_Y%VPtUG%KGPzYx>CG`20xmA lXxGp94Nxnx0J%0qa|;0bBwGIaG?@SZ002ovPDHLkV1m+nqu2ld literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/occitania.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/occitania.png new file mode 100644 index 0000000000000000000000000000000000000000..08688df9b00e079bf0e20edaf7fa5ac5763512f8 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!VDx^&Io`cqyv0HT(2<7+?0@fk;C`8hUZ-` z*KK9-M;^k@;sqZ23SGbd*#M}_*3-o?q=GS-fys@LjU&OR;X=gTe~DWM4f D#YQdh literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/om.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/om.png new file mode 100644 index 0000000000000000000000000000000000000000..2eb3a1553fa1776220767e38a7dea71e31c0b234 GIT binary patch literal 255 zcmV06hQzHUPBn@%I1# z08~jtK~#7F1;H^6K~WSy!8y+(5*kYTU!g)F`InhM5RqNQtik-Y^Koi02G`~I9T)~| zZMKped%;o?Sx=Udz-H+pi8(C~B?)ZqZ#TXOy;LRn;15Ps5{hNqnm_;m002ovPDHLk FV1i;3Vg&#I literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pa.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pa.png new file mode 100644 index 0000000000000000000000000000000000000000..1f84ae5a9983adce0736cd54603cdad049f4a33c GIT binary patch literal 292 zcmV+<0o(qGP)GJ;l{QdHCbMa+m^HWssMn;jr`-8dp@j5#0FE8yUC)NM}x!C*b9UT;Z z^`6Q4d9wEJe}Dj5^JAy>T%+|=pY=?c^Y!)h)YQ}fQ}IQW@$QU_&d$yNOYrf~&~B~v z06**iEam_g;O_PjD*ylhYDq*vRCobB$2CF(KokSemzj^dLy6q~NK|-*yRF9)fXv** zUy}&=h@SaTmB`n8<8OX0M5I%Afu88PZ0DUN@<6PAR=uoBBzs(%UuX+PzfgNFtJTu< qFWkMKP^|F$lkVflIXM%;D+T``_Y;~~bT<(I0000pmS|Ni~6kkHq!Umr3s{LRXGeeT?|W5@FM zUVZ~K$KTV%F{FZ#^`IlyVFLjcgR^T4MQ;7CH(4$)$BU8CF=?WM(z~ON1hfJ<61laU zZX{_a=9r#azc1}Z)&ibwOkC;OJ7(;AzQWulJ#|`i4M(H>b_bri{J@C{K%*HvUHx3v IIVCg!0IPFS$^ZZW literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pf.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pf.png new file mode 100644 index 0000000000000000000000000000000000000000..4663091b2f367e4a4b1de6d73e307fd8811cf867 GIT binary patch literal 269 zcmV+o0rLKdP)v?(TY;5LXVdYs_<4;hr007`aL*6<%+b}TLCnxFZ>izxw`}@uB+<*A^ z`1JJj=H}-5`sDBJaNB27=$udL;a>6alfIFH?Dg`QvBH^zna|b29DpEnGKKHE9FUizZRE_FA(VeIXoOL2SOe8KW-ZRJYxDI#ptW1CW?mW=xCsx%IN6J{{C>)K&3zp zK=f_3+Gi#CuXc6_4Iv>R2M!#VGk31LhsPXeXP_L=R3Q33LHp}2`L8unUnWYTXaK4P z>H(_Wv}qHNj5jyGU<7go5CK&K^?bG${$gT+&;T*p(a{mewzjr5G%x_7nGzB}mwb_s z0P6X~&j-}-5TYSHJsqSP41hX;O4VQh80hDOgn+7n2xuEZ15oM4jT?JhBqAsTftEoqVzW3$ z_2};2+xp$T_IFvE54`{W-+S)JaSn-WqOF9DvDH|0Y$-At&AIMNv-#R+JhFQIL90~m zv{LB?qCkj&QX#ZjZ~TX4T|=>WwYYFmD4gf>r+^93Jc%z62OXvQ?RFoJ|93l^JvPlt z4mwhLb$fJq#P!Eku1)UuS-_?{5)iG8qcY(s5!li^7CC2x?@!_nWjg<*(X zE|ST>XF3fS_H=+f{SLwNlV4kz+~%N*fWK03=6svxwC#^n3d1PyyqWO*KG@y!%VmaA o#|+!QfjF{IgGZy!AP z_wV2D-@m_q|Ni2}jh_q*|N8p==H~v2kN@HC|I^X&Ap^sAW8*JcTHh2DJ_`!IWnk!g zCMyXt&eO#)q=J$4;6}m220RRgHfIn0UO#)XsDeXBN~1t}qre*m4haFqDsI7_^R6Dz sD10ZdxTQxz^~k5v69U(`|LBR=KR?Oo>o;v%5zsIOPgg&ebxsLQ0QW0T&j0`b literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pm.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pm.png new file mode 100644 index 0000000000000000000000000000000000000000..b6cd50f2433f9d1dcb3c6a10312701f6957e79a8 GIT binary patch literal 439 zcmV;o0Z9IdP)P?VmpL$cT7z^R~)JN3pCETfhk27Eu z+0da3fM5WF#Q%3^&Uq8<=MBArL04NWqp^V#ieekA$HSA;zjVw-t?;*<- h9L=(SiOrC5?ILXn^Z4tFT_gYi002ovPDHLkV1lj`(9Qq= literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pn.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pn.png new file mode 100644 index 0000000000000000000000000000000000000000..600994df5476e47e8380218b7f761edd6ce5ebc7 GIT binary patch literal 440 zcmV;p0Z0CcP)95zN$0JF_{)6CPToc90H93_RqN5g~ zsWsBJ*Pb;J=@Y3E$uc2I#KXXE&4rHsy^Hnr!Oq3Ao*vx&nZ=yqwUCq*70Vhx%Ag1k z)L?+KH-Y0MG`$Bfq%uYbPSn~3F>T9v$ge}4s~xqtdV~4bDk7v{+S5L`r6|nkRc$l zf*A&(B1!|V1k*tU&>IP$sz!N#(fx}tM0X(2hX8Dr;DcBOO91xWFL7m+uOI*$NX?UA z3-G%u*#Nda`fij~d;{0i)r{yC1ga3onN&y_l(PQKP5UH~0SnBy90UPP0ck*wNCpou ivIqJPhSb4G9)bXS+V4G%Yqli-0000Fj?44F3%xfW(4%(iWtzk04wzt`tHIImJ_xk>#P zR|R87}aP5-js`hk%k7|Ig6SOb~olx zQhH$lq(BE|GoRZEb}$(dgLat8N=k0#toHXS3~6!Kj3M1+QS)5|*++I*=F)5Um*gPS f8>msL+yM9AO!q4m4=t`000000NkvXXu0mjfzxI<& literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ps.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ps.png new file mode 100644 index 0000000000000000000000000000000000000000..e313f3183763e598aebc678ab72e445d9bf9cd3c GIT binary patch literal 266 zcmV+l0rmcgP)^MR`W1_VG5P!GCl7(mzX$HVitqZ1JQ z?CC>Mji~{jYD^7(($gWTfqpR literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pt.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/pt.png new file mode 100644 index 0000000000000000000000000000000000000000..c90c4456d1a16c4e455d355482d3fe72e86e93df GIT binary patch literal 360 zcmV-u0hj)XP)LuMD0uWEXs;k4lU|YgABI_bi z`=%`BZgT@byB)QJAWXj~DoP8>vq2a6en_uhe8FUbF#RkqkH-@#*ij*{#t#P=opeR* ztMdG#Ijh52gJ%OhVH#k2d;!OW03d8l+oJY)r}0&$rg$2_-=~5h6&xxY7|vCu?*`Jf z0p=hQ&?10i0IY-d0oGI2C`5rsAS#5&iokR(c$^5>7lRAU!rD;C#XznA0000(8$Z_frZSuI<5FHsr4nL z^hC1xsN0(R`WgTH0sZ?A^!O(@A3Kh-Q4q% zjPZ?!_4W4D*yQ)p&zrt_aDmIv)ZprTcIxc%00_{1mFjDT=3ji{RCC};YTi6w+cQ|$ z006200LB0Sxzy@j(*OVfR7pfZRCoae!9jAuKo9^iwLK20B8U9{sbF@If`A|=M3VP# zS#c0s&o&MO&2@*Vbw9j*8sMsR!W^)Bp9fy(|MPIe6Ri2GB$Cezd$)Sm^y2xmpHn7p2Ws&1 zba4!+U}Qb$$k!Ag;IMHYr$piNzy2qWN$lg?=Gf{`rqQ{M*Cx;Hr(}VlSF(efrrNaZ zDU*1AS1nU%+gdYKrTK2)q{+J;rmEO|Jto;;-xSVgqIudu1mqS^S3j3^P64N_! z)qTFmvu!wK^haHGLNb5kzea9GXJMc&$H}Vk{FW~n7@obdDE44{;RLjg!PC{xWt~$( F69C8zII;i$ literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ro.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ro.png new file mode 100644 index 0000000000000000000000000000000000000000..24e989a3a0464ac66dbf71580bea16382d5b4ba7 GIT binary patch literal 272 zcmV+r0q_2aP)Hq+En&tfbZTa(D`BqlpGa=B|BXA~ W^9wu=8y`9V0000ujP)&d|?qbL;Et z7k1d*00011Nkls~ux%0OkMy{c>{tP*D9kI{7g% z_b4d$ARzV>6!f$J0NrVf(?oC4JZa7|V#+LB$RSh05k`9e0Q3O?`(R=BI5_ktC-V^y z-~a&lO-<2GjPtaK6AFk{l3uB-T3& P00000NkvXXu0mjfm$P!B literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/rw.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/rw.png new file mode 100644 index 0000000000000000000000000000000000000000..2ce1645669b9ddea2c2f809077cb4dc644781a6b GIT binary patch literal 315 zcmV-B0mS}^P)aQ6CD`uj=o^+5FXFzxXo+us2C`aJgbB=hqU zr|8WlOR|MX)nCsU#+$5*nKd04e|gVgOmWSvRORDxoR>761TN002e+05$*s zA^^9YnVbLs08~jtK~#7F1;K|A!axuJF|B=1n1KT5zezGkfkZ+Ugj5ZiB~|r(Zdg+6 zZOddO<%q|%TTvvw`;f(Fh}Udbe1_mXmy(Da_Bn;e&k4~OS#dvm;}2QU47Ys|jRODx N002ovPDHLkV1iD-h^qhq literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sa.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sa.png new file mode 100644 index 0000000000000000000000000000000000000000..0246b1a6ac90d3f212fdf954864ade7acf5faeb4 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltDc1m>5LX5d1_nC@1|tRrMFs{z zpeRG#rn=HKrRhu3V&=vK&j|9G=;_dHZ_ube`@q~C7j~{Yv%Y&;{B@z=i2vSW){e|5`=kj-mz=Vix!4|wkO>08gf?=K=s^o>ui_;>E}=QF>aUMlmL fwEgr|F~$e-$G^#0Z8u8S1-a7G)z4*}Q$iB}sUBDR literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sb.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sb.png new file mode 100644 index 0000000000000000000000000000000000000000..da51301e33d09a04a0018a888889880c7db39e73 GIT binary patch literal 361 zcmV-v0ha!WP)3UAREYlp>1#k<}R2R%5ZE31H+<4uYdgb3)BN7H*9!cRP-2#GBY1Q zP;3kcEuXRS$;A{PO3PvZf@45EmoI+>ssqXe1l|E6PtThU_E5BYLGAOiZfB0T*mv18 zfWfi;{ufW4{D2q?SMBWlpucX()1z@f)r&UR$(74NH2~#+jsdCzl0d6GJwZz01|Qh( zpjNF8R4rO0im(Cbbf5;HY9I+W`1&bJpuup}KxEWp1ktb$=opC7iu~P&SGPi39Nce& zteQ8A7oh>@bfD_hGiP1fnGG~}^)?rvQZ&^l8rCn~1~<51t}Ui&2m%U%l!qJIoY*`G z7{>dLrTb3ugCL;)AP8tG1OZh;G=L&+!z>1eGzJEC24VmJTtd+aVLh5?00000NkvXX Hu0mjfa>TP+d-5a(p~$e5OBBq2zJ!lOs6RvQktfe>4+ zwdo#j46<2gZ5>#Qfi83uL(OFFz}x$d5Dd7^GB2i_WYUhuffbFK;jooTjRg)5PJZpu z;)HDkgOh>RPVPUOF|*Oo+HC|>MY%`)Up9UNYQLxHy8iX~Ap@xA?h>yojBH@$^G36& z`;H8hE0=y7ceQu-us-ro|I~f1cj{CkoB|%lv+;a`(=%`V+vr28zFa7`O5!RJCKm{^TT$xi>XTwK9%u$Yr5zQ0D#|cUB{R6z; V5rcjriN^o{002ovPDHLkV1jEDqGbR8 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/scotland.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/scotland.png new file mode 100644 index 0000000000000000000000000000000000000000..eda0d49132ac559951beb247e272331bf507a53c GIT binary patch literal 354 zcmV-o0iFJdP)GAX=ZNU2a`X67q z6m!7<0f!-X#2-qr^Yil(Shg>8!m!Te02G}70Ac`Hs#R2EZU6uPkV!;ARCoa`hy!wl zVHm{nyhd%?y8l@^>^G=?+uXq>5s=v!fu2*ASy}cjLDWtQ^33{eFj-92xlBkR|7@7i zmtkCX<9*;4izNr6k|Kup?12n&Aqa_$V;&Ujcn1y zDb%(_F8OWji_qWw%>f57-1-;qZ*Ol;Uf)uh0M3#k@zWX8x&QzG07*qoM6N<$f1V}^K$ugh@AWGSk^5FBMpTB-W z(03U4^7ShOUAS-oMT7e`_s}Jwn5yCE+_`fg4OvIBAgUoYV5ml*GiS~)FqDEcK+Jym z>LnaK!3Os2+XvMERBi8QZwv8&T%NyBmbd-gQ9+HeHioS$ey9Kd zH~ZN~B6_6x);ajnF80nM^ve|HivaY{G!$^53}~AG037X}0DhIbdH?_bR!KxbRCobJ z#|2>nKmbG0_YZ~&=3nBNxotQ>bYRYvBJrH_ZSXlHA9DycX--xRwhKwE0o(Zd|LgRz ys<$(}PUmvp2=e#2UV86&d-EoymfUd1HTVJ;SqrFlLD1p=0000`qR~008rIbL&At=`}X!DJl8y z@AKv4s-u5?Aq=pT%cg{+z$t70u@MXF0pP@?p~0`l+{z?{AxPRauwxDh#>= oQoNkBGnn5(YyUG#c&l;7D9RYigqvSHeS12`HzELR4Vnw%Xoz_Zk_? z_442z9&oZUm`=_GwTF;eawHO+vkUl#PBkQml?u=A-$@}2{~t;V vu(t@q%nVQuFaQ6GAQfZ}0I2`~us}f5G&IjDD#{NJ!~g(% zTU*;rP1XPaoB#lfGp*zI0000}NklE!#%Q}O>>8HT5VOKrnT71@}=wY2MqFmfSi_G4tk3ETig W@(+dn$+)rr0000ON literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sm.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sm.png new file mode 100644 index 0000000000000000000000000000000000000000..fe9a6bb9ed4a7589858de80d552e6b4e36257921 GIT binary patch literal 311 zcmV-70m%M|P);m0CoJ0#rkl! z`=rg&x20u_z_pO7u1TTwK%DbjtM&jXWm9?)c^nhWl2OqRCobJ$i)G| z01yDd-MA+|C?frrguifiJHHVC|0OZyNVUhu0r=W5RM14WN zu2pyPhMdGBscUMD7_7MN_d~}iHAMDjn32O3YKZL-1Qygpa0iIK5Dp*y?+O3_002ov JPDHLkV1g)lmy`ei literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sn.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sn.png new file mode 100644 index 0000000000000000000000000000000000000000..889c002a2acd8cee4be55a0ebf8aa72edadd6b04 GIT binary patch literal 284 zcmV+%0ptFOP)Jb@`1wNk_%-z|F7+cL_C7vRx>5jo z0G!l2=kqf6_b2of6-Ty5#N|CqwKTHdD{91QKCwQB%q{fv8}bbe-~a#saR2~l003VA z08s$z-T>&^0Oi#H;+-eg0001ANkl{3C))o20000sbIunRU=>Px#07*qoM6N<$f(sFAhX4Qo literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sr.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sr.png new file mode 100644 index 0000000000000000000000000000000000000000..b1684cb1f53167f8da15f1e523350537a299abf7 GIT binary patch literal 297 zcmV+^0oMMBP)oUSIpI zPyAC;`b|ytMn(5NJ?8)b{6C~>H~8~1^AQpBGBe`<0Qk2p z{Cs`v^X%yF>B`#7GpjWKB>(_R002Dz051SzT7=sG003P{L_t(|0R_Raal%j#K*4>| zL12cA%!vu;zbi5~AVz=K4MYeTA|mw@1Pl92k(ByeN4q9U7&NBV%3RuLtn)Hw2IKL6 vZXF-p9FBXhcPzgIwM~RSP+MG|A}9M7s&x?P`hCUj00000NkvXXu0mjfw@Z8n literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ss.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ss.png new file mode 100644 index 0000000000000000000000000000000000000000..833eef24098f39c293f37279f4b083d7fae2b53a GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3HGD9`RZNsZLK9$B+uf=GxKjvr1$NmPj%P2ByM2*)wQbvOqsFOX*2da@@9f<&`Nl^%LzP4nK;*?aai&vz zV&1T`oM_11*1E}Jsy~fC1n+8J!;6Z?aKGdZ-6PTviCk=Y{=PGO!w0xla1qYr9D~Cd zd-tSl!y`)o3k!wyLut^XA@Oa4{;|{0JG_6w&?dlRcq30xKYA$Ss8m;Bbo_Kq<_W2E zKOi(UX{$)ITqZkR)-okQ_2;hY%S}Y%LwMNn^XCsCZcMbz&u9J4ohxD@7o&;P=zo z^UT%nlcL=I{{H;@`{~zt-_?Nj_V)Dj^ycQ~kFQ|G&g;6(p@*8(G+5UsPt*VarLwwh zw*UYDQ%OWYRCoae!O;oAKmb6oyxz5f2n7dl|Ka=-1SwUMKtw335|KVrLlWt$y&%MI znH!=aS`g}*IMnG#lq;Q<}#_;P)N}Iy@E?Rk3{&Ebtwxhmp_|R!Mka``fgtDIo7|L nzG_Z-aI@Pr&t=+YW`_F82!Y7chl|621~YiN`njxgN@xNApyFSf literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sz.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/sz.png new file mode 100644 index 0000000000000000000000000000000000000000..9ae485123898b561ea1e6afe796fa485cf8398d4 GIT binary patch literal 402 zcmV;D0d4+?P)low{`jDsTf34Qco8Io`PO z?$RY1(4U%!zdiTw_uRY3b>BYRvjV2g2}UF^5Na&qHZQzsctXfk-6(-!Q#MJJlu2wU w2f3|E=q~9N8SjHBa^GXeMLU+`mK5%{01ZnK8+V-_&;S4c07*qoM6N<$g3JQ90{{R3 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tc.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tc.png new file mode 100644 index 0000000000000000000000000000000000000000..e6972adfb8998d51cc2fb11bafb0b6951dcb82f0 GIT binary patch literal 413 zcmV;O0b>4%P)V^qUzC}vA&eNzVJkRpK56LN$XZ}E|at=1Olcx zfWsi0MJtu)9kpJ%G~(txV`(*`uQw$pk9W|krj5s6w>5acY66ZJ4lny~HGl{J^}gZgA?Y1y_3W4S>5T7bYwciQ&j0{)kkx62)av7h_33%?=5p`X zW$I2(=t4v2I6COxg7M{P<}WY+C9h$C(C6NJ@8V#Ao7q@-&g;=qs5gX9r z4&ScEBFN!LItd{njVTF9;za@bP?jQM#u$=HxfZA0(5Wacowf}>tCov$%F;TLZu2tZL%b9Vp$002ovPDHLkV1iIoejES* literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tf.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tf.png new file mode 100644 index 0000000000000000000000000000000000000000..fe4ade762b10bfdddd91967e5c29e37362914a80 GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltsgMAl5LX7avj6}8{{;e|2tyPD zgEs?%b@%k6e+vr#W@QyO?#QUv9G$b~kGs2n;!?NBh4w*n&An$bFsT2swfkvms_Qg~ zfgyu|L9n)K&(r5`?mv9K_we;^eOKauh9!8qIEGX(>UK4YIy;K6re8bgc%!~^oFDFJG@D zRjeTTLqj^SI5Ma(D5EA7niV*yHUKREOQjG1J^=N}4D{h=;Ee#*xdrCZJKxG9+r$v8 zeE>zUK>#EG$L>eQ0001XNkl z008a)0RMu4{dRWyY;5^rV)s^7{{H^>`1tYh@jpPXuCLygnbnMq&w_)=cX!4B0DVct7>o(n1|UQRLXuxAAfROwB65u7c3xyRmEPM0 z*-a(Wvi7x`Nn|-b!*#<>?lsSVz@tVYo}?1IaKayh^bN2_4sIF%0000yd+QQt%;k}UY<>HlOi}vvD{r>*dnRVp7!&5PL^3E0X z&`tO0OZVwc=D9;%=Gwvl0050iL_t(|0R_Q9Zo)tiMZy1i+T)lAkl4Y7OK|_2umvF& zK~V%Io}Q)(A%R3lCK(kVT!g$A7MGWdiRhZ%Es(FFP0#PNhpT6u%bfr1J=ELgZ#2tp z?p2cPV9Vf=L>*LH?f~wqUx~7N^?fhl^zx(E3cilvkQQ1d&Vu8XY^iZ3M;V;B9z;qK bdD)i_Om;TcZg8OW00000NkvXXu0mjfPI<9# literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tj.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tj.png new file mode 100644 index 0000000000000000000000000000000000000000..192bd87e0d77797b6cb9bc7d84d196fe63b196e8 GIT binary patch literal 250 zcmV*<#~DGY;4|MUffhv*-T8vi7d&^aC*iUHJ005F*eBkHm z_j`-K(aUq8tCH2tVW_BiLSDWmM#({5(p`4fv$TG=xoywLS9*hu00510hv1Brqcu{| zi^Q4jRU&IXFZy|2!ea$>kI zN-y7+o`>fh;oCyK_n?@~g`}L;a#gt-j*eT;xoqn?iL>olpx9THf&qe*!}ZFCH2B7% r)Hq}M6n@1g`8&5V!odA2{~QC<|LP_Pie!JJ00000NkvXXu0mjf-K(}u literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tl.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tl.png new file mode 100644 index 0000000000000000000000000000000000000000..e65b54a7778f39a3ccc2188444c255b6fb085915 GIT binary patch literal 342 zcmV-c0jd6pP)+5U5;0$-#CT(^a z-yp80nk^~e3UcY}Y&JF3W*8nG-8=01{A?AE8(?tLbaXU+(F`O>QWOPGV6)}sxe-;| zP60lH2CCBEe!ppWeR-j28lKkHcJ%NDk+4e7&DEoUzbOHYcqSpi zpdoD23oJ{QENS1$XG|jBrf7yTEz7yccpTzcf`jEXPV7Q z2@yy&l(-h$0dj+l6EmYk^Zq}{@5H{_N5y9spRr)_>|K4%p@)xkR^u13 z#6{;`83hV@eZ8yjX2oQc1(WY^9IlI87yYXC|I?}jy&XGNpRWwuIZsq#TC})m*YW&A z3?Uv;|JlyWiTyfd#{PoD$TIt#_oUad{%B10yTH%LkT_4_@v`FgA|Stdy85}Sb4q9e E09)C6T>t<8 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tn.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tn.png new file mode 100644 index 0000000000000000000000000000000000000000..57e21bdda64462adfd91708968a7f452f550a9b4 GIT binary patch literal 245 zcmVPEP0m0Q+AcpwDvYO^eQU(LPGeA zjP)EG_@AEg4i4b}0Qjt|M!=NN0001JNkl}(r8i>dCrk{5$Sc?x9|E=DTL>_9pguJXoTVYTK7buh{-;l>f@KfQetwt v+{%5P5lz^B{pkI=LNX*`au9kFOt64ItC#te>BkHVpZWQBB|85Fn&9i{ z;uuoFXnKNi*%1Q<*NerIf3WWQpIgV%bII|^!=kuvRwvhdH}$L$pL{&zmEn$5Z8YU4Br_TJ}@x+tEu^0 zQ209~cl~5DNPEbjcBuTMudA5@$KLkoaU;U6pD({>^w3BfoO%=c!)#~Qf%*|v>6Fm&_x@LB`-(DLqP j8fWXZwDi9_d-ebTOR4++V|>`j00000NkvXXu0mjfqlA=f literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tv.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tv.png new file mode 100644 index 0000000000000000000000000000000000000000..359b8be846a5dd810153b0f2719dd248c141f592 GIT binary patch literal 331 zcmV-R0kr;!P)fTsTWeDe9T9YDumnhjA3)B|)9NCQ_j z1JLg{!vq67c<=xeFTlWtAYfnv(c)MS2s+ql0gMD7In`Ysf*2W)B2oi}#KCByG{d1J dP<%6@A^^e@D%xfpv`YX0002ovPDHLkV1k^pg%SV& literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tw.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tw.png new file mode 100644 index 0000000000000000000000000000000000000000..e026cb721151c7a90315970133313b54f0a4a14b GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltsgMAl5LX6;Eeui{83flnWMKHo z!0>^Ap>fguojaeG&A9z5Gy8XZ{LjF^7Yq#3rrr7Z^UuG3|Dswhe{%Ew>E!g&((;?3 z;dd>quWD+3)#qMYxqX$B`ywj(iI?}JNHHJK{9sQP$B+s})`N|_hYSQ54CC#T-t5;| z5z-*5;(Efl&Ra0ouhu>E?)4`5=OMh>#j(XJmc6O4x?`HS{-@0Ltf2KrCuRwW1^Fi3 ktUA7UcSMdnhyDll@_hb^x+Pj(K;s!aUHx3vIVCg!0OIRetpET3 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tz.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/tz.png new file mode 100644 index 0000000000000000000000000000000000000000..3b1090ac08402aece11caaa203da6c0c8e6821bb GIT binary patch literal 388 zcmV-~0ek+5P)O3b5^N9zT%lH|RiH?eO8~LT z|3wSmmli%(m%n-Q=H;UY4}g>1r+`#80mg!AllFhZ>%X9ef~SrSy@6_}odOBeIA`w9 z>gK2Z?vMZeJf~85$=gkBk6@8C98JDAGBcoWLE}JwA>*-?k3h1t=4IXqdB4W&0aK<< zi@G?0tQq^Ji??p*L<2k^rO*UUcz7_?Bnk=n iGmhaXXc|CA!TTvUbKq9>22ol70000>TDsazwbnqd(g01G_}u{f{AK$3N%{FY`1mdM_8|216!P*7^z<>{xd8I=D(=q! z=feOlp%dr;002lyL_t(|0Zq&S1_MD51<_Z%Sr8Cl?tjfl5)6!A@H8EWWOpOG^kCxB z-g`Ja`+QojI=+6dRvUXY9LCV$(Mpip@N0P@_`n}8Hj-Z3-5swo@@ELpw?ak)U0d~iNhrA#!H(%Ag=uc zVdXt=i!a#ud!U)QrJlNIGWTk;h=?cB$HeIW{srBaFCcbw6c!Y4EXy@Eve&MG=G-}x zr%!i@D4eJzBC_(w4=8!}9?%s7uzUPuU$_97$B#qNg9nH9?j;0mA8dK>;6Xz}1G>(< zevO~A=Aa*-iIB27np|$6`q7>FEM+mbJbX~S$NY=f>ivR!s zfJsC_RCoa$iZw#TKo|yRl6BmnhAQ_z3k_~P?zVZqekQ#{P!UH;3~`M8gmJEbeMFyD zRUZcVwNfoxsi)kwqbGFP7p1*5hm_05hWbo};K1OAemnmB{Qlr<2pw(J3s`%l#)-jflVjn{Pz;2PJ+NijRXzxc~qF07*qoM6N<$g61l*;s5{u literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/uy.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/uy.png new file mode 100644 index 0000000000000000000000000000000000000000..6d3f7e24601549702a7da2e32e90e5fd71499414 GIT binary patch literal 305 zcmV-10nYx3P)Eq+%_x9=Y^Plwg`k=$-kGkZCw&i=T;s80Y_4Qry@|N%P`Rnoa=zTjh5@xjS?|bd-cVC^_Q;$z1Z;vRjMa^%m4s? z+1}%>y2fs&-p|z75|xN$0001VNkljrE?=$x299#0x+54-fWy^o^#D+b@>=I!YT7-d+5O-T@j487gh?GsHaoKFJHa@r7J7T@2SE@}CtN?=2q1!M03&r65`rS2999GXE}#xkaoGt000000 LNkvXXu0mjf61H~T literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/va.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/va.png new file mode 100644 index 0000000000000000000000000000000000000000..05f59d182cc9c004839c68e696d0010a8765e4cb GIT binary patch literal 305 zcmV-10nYx3P)(CJE z&IISl0P*nQ>+9>};^h4BlKk(E{OyVO`1bqz`rX~#`|Eo8>2mq!YWMc;^YioK;K#_q ze7?Pb_vK==sbgKQ3*4FmrTdIg{_2N?O=c?Y(V&Sr$->I{_x3JLB(EICx z;lcpgw*bngdkhz zHYy62kRqpb2GYqFx-Nx9CsKMzZ5brz5U#B1yT(dN&fg(QSFEq1C4UU%lcaC$4WGD7 zx0s9R1T#q684TCg^ZC_P)M$l}DEbky-8z2Hbb;K7vAU7qj00000NkvXXu0mjf D+9RAb literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vc.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vc.png new file mode 100644 index 0000000000000000000000000000000000000000..0e0626b98d6bebcaefbb19d6890e598f4f0495c8 GIT binary patch literal 359 zcmV-t0hs=YP)I%n_;%CIAsoT%C3dk-ok9#wr$%uzpuvn#CJaD-Fpck-4qqzd69hN zc9Ma3Q`k`;9UZel^Yj$S63TIT72sX(sgL=h_#!VZ>A*~wq ztBMei7D^W~C@~<)JfQ^w(%|;SDP_h2P3Q(FhJ0})hV&1Di^~{>K{4vl4U#70@WbAj zDAKN(c#ALz)(_CFXXkQ8q18L^s$u`HwWfhqO>j3%0hy5ReAw20sWwJfQ*t zcO|R=u5Qc#egpI}G_+6)hmd%1+(p2C6T?;&113R~<_#W~|HYVQr}6**002ovPDHLk FV1j~yn2i7c literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ve.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ve.png new file mode 100644 index 0000000000000000000000000000000000000000..a4ac3357cb8663bad37d8c9d892cae6474aa85e4 GIT binary patch literal 332 zcmV-S0ki&zP)t<#D9{cQdHT>Sh|`ua!ezyO1U-(Fwby4z^^`91jf zFZT8(_4OdG$&T`Q_#FCnwPx8_qmD)BpgDrl#sNG}M}!`A|^a z008X(0OtSz;{X6y0SxQ_003M`L_t(|0R_Q1a>FnH05L30U6mXE|DAC(5d$O(29maF z8ANJ2>o?h?ua~v{l1-|8e)_p6B{jL|NZ(<9o(Ubf9b;j>OL7sE()QCkNhO&2Oir-@x1H(!``B}qLrXmg88S$M8(M_p1uer#VjNoGJwTDeL! z(RC4oUqGC8Oe`xbiHTmTt$vAqR*GZ{gl7znbPK6ZNz-}|d@D=mcH__h004$bL_t(| z0US&Nq61M7O9rcty7#|dZ9FZ;NJ5Z97D%9F<(FuP@cJHYN`&pR{abZ0h16c7BZ@nmH+?%07*qoM6N<$f}OI20ssI2 literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vg.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vg.png new file mode 100644 index 0000000000000000000000000000000000000000..47df07b9c6354748094096497558f0ddab8ccad5 GIT binary patch literal 394 zcmV;50d@X~P)sxB|8DJiAzqMp)zi>Pdt zU5i{(g=bWQWKn`p001?Sf4;zdn38g;Jv^^|r*Eypok@H~001po7s>Gxs zBBfiAMnri&001M&!)Ae>O~=4o8XBOWn`*AETdb^B000?`o5KA7004qXL_t(|0X2$) zxkEt|gy&!HWBf6<|Bg~YY}+^-A%KfL2J~q01;E*X5a516T+Q_u0oJlR^LrsWulsTC z^6yIfl+`&Gd7%W}nW8ytr5~>aHU!OOCkOMrFI^6%vCr4ADm#f-nj7k>Advg;DBwbJ oXuCz6N^=B{Jm^=dC?zFHH|R?uX79Bmi2wiq07*qoM6N<$g6`I&7XSbN literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vi.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/vi.png new file mode 100644 index 0000000000000000000000000000000000000000..12e7fb367d30cd38d8511220260e30ab7072fdb3 GIT binary patch literal 415 zcmV;Q0bu@#P)qzO~ zSmoL}-`rimz-;m8Q;UD$k&M8IgRXaS)!x>D?&vJf&nD;R&eYV^`T6?Q&%WZ~fO%)k zV@}>(M&4OK*5uVcMPL zl1}R1LAJN?iHXjrYbB->9fRK|#O$yk9Ud{3&<;WpDr8!u*@Q{ufR4U+(U|4qE@ZX!}(`=GQN) zA3wCeJF9&b68e#+^N@kz0i*RFpvlpmE{-7;jI0M6eGfZ`I2i8V-On^N;QRcEi~_z* zS?mffW|O8!wdG8$;(fCDoJl>~*VLKsCN8zAo1T`|=6Zaq`fs@^J=y8+?%F22n&kKI m`SI<)G-Ri%^cS{$V98%zxdX)o zxv@Z{-k$D2Jx@+M0MX;)#t?MxpdthT1-F#KJbhq;FT@6*D5lvW!U8}96olFUG#+lY zMWmV0L<8+B+6osGfJpSLC=l_V;s+w2Aj2fE2B41-s%Ilq!l80+B4AK&!&eSt!-^= zC}C@RdvkMhuB~;{&9+@he!Qw|lOFw6MxzNaQ-yg`JzXm+%YY+{WTXrP`!xyt>G|;) zYozOcylZ%Hr{?+%fGDm|sHUcd5^#+WG#u5ve}n7sgeaupbX>iH^0+Oybq))rfG7$> z8!*r=c=G@n77*HRUBM6MmX<2dA73zV$AS`~>%4nsx@P_g4=)X)JXQ7aeWd%|y@r5w zzk~qR4#v+A^G|UgyR?X7nX-Du52SH{rv~pn0dVlz%;DqUo7Lg_{(Hq^pOH(1BY0cC zO&5K!aN|{?&?8mLi%Vy2Vt(#_R9*H!)yd-!{)S&+3KoSD5ME{7^OnA?=5&=e@&-Vc z00N=`5B6ZjAtewwN&sl1MDZU?fKKoZ{-Eac0BxWU$^&wa7KkVf4H z&Gq&5@7dV^0F&O0jlv%vb^rk7zrVQ+4Qv1a=dqa_0001RNklv+Qq1#_!m;pTQwNy*ytqFhobs^Yok&?%nU>(D~ER@u!v5 z4-=DbT3X*!Rlmx~Ihr4hzlYrEPC->NQIbN`KXSQG}a+Lb_{o6n5>Tmb=)t-3q z{MuT9FUfza6n0rwfzpv(JH%ndfL4SiEe9Z9)503RpEASR9wFpr@aCLRK zq7=t!w~UOOHTGq1Zj?zxurqs4JYZwMz%^^e3%{g40&{{H^;vad?^8-cCN*JS?`ev$wXludS}*nVaL1mY?@oe*gdgbV)=(RCoa$ zhl7Cx0RRIhS@Zwce|cwHt2hFLkQy_Xly@uunny!nAPQ{XeCs|Kc-@d|D@p_*1Qq96 z5R{bLEEM_nXCmG{Qwa-?APs^P%`#-T4hfQ%V7Sn545N^yF;9vXf=|284yuB;Y)X7B1|r$50Ceg|kV?JLvrZRikeo2^<4X~_X%be9!bpRV<^)}xjuR)!IGlXO?%kP;BS#8}G{~id*q-7jP#fu| zkL#~osbs)pAk7o#4;QS-CZvcchR9(HhTB2fa1Ep?^#wC*P$B>T002ovPDHLkV1hdS ByvP6m literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/zm.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/zm.png new file mode 100644 index 0000000000000000000000000000000000000000..0b4bbfaee700aa1f4b77a09d125e94d13292ac27 GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~o!3-oFZT@ltshj|x5Lc!~CWbl&hDrv8LI#FZ z28M731{a2@r>9OhIic%lSJT0!xf@HLE{x$-WT@U(UAC*Na7SU*maLQwDY5I~-gMel ztWOVH8RoadkHLiDt)8ZygoL!P;6nz6*K(5Y1OzzP+1@r7zp%G3)z>-Az%W_lWHZp- z5KkA!kP1fDgN}Sn0Rj#i?f!9GT>5?g5^LcDH`p|Vo+<<`OzaKvoPUdd>XxE+%2T(j zuHF{1Dm5WkQ#)Z&l#ywF_T(t08FzLDuYZ5}yoLYAwCL?S|HVl2%w~Le_7Tv022WQ% Jmvv4FO#p4+T{!>% literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/zw.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/zw.png new file mode 100644 index 0000000000000000000000000000000000000000..a808419edaedc38deb99e73b12e770cfd8511cd2 GIT binary patch literal 374 zcmV-+0g3*JP)sD^?>h}WJqMw?YZG*I zECYO2SJMdt{bJ4L3YcU5^;X4)!+hmWHbcp+l~8zo9$MT8A(fJEJ2MrraD&D#(7AIi z_{=`=KfD#Zwk-qK)w2MfcQBzT$PLT0li(d2Zl|$^#{2~fU@{Ff5=2W&GZx0^mVnzB zZF2cw^7)Mre|QlSwPhlMMrqCt4fX8Oc)@uJudKz1@sC48&ff8SXmsOGz&=(M$Axp! z-ZleTnn&}Yv8aG%38Q6f?hEIeQHa^eNJXq=ICU(kEFpwfNZ3zp. + */ + +defined( 'ABSPATH' ) || exit; + +if ( defined( 'POLYLANG_VERSION' ) ) { + // The user is attempting to activate a second plugin instance, typically Polylang and Polylang Pro. + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + require_once ABSPATH . 'wp-includes/pluggable.php'; + + if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) { + deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate this plugin. + // WP does not allow us to send a custom meaningful message, so just tell the plugin has been deactivated. + wp_safe_redirect( add_query_arg( 'deactivate', 'true', remove_query_arg( 'activate' ) ) ); + exit; + } + return; +} + +// Go on loading the plugin. +define( 'POLYLANG_VERSION', '3.8.3' ); +define( 'PLL_MIN_WP_VERSION', '6.5' ); +define( 'PLL_MIN_PHP_VERSION', '7.4' ); + +define( 'POLYLANG_FILE', __FILE__ ); +define( 'POLYLANG_DIR', __DIR__ ); + +// Whether we are using Polylang or Polylang Pro, get the filename of the plugin in use. +if ( ! defined( 'POLYLANG_ROOT_FILE' ) ) { + define( 'POLYLANG_ROOT_FILE', __FILE__ ); +} + +if ( ! defined( 'POLYLANG_BASENAME' ) ) { + define( 'POLYLANG_BASENAME', plugin_basename( __FILE__ ) ); // Plugin name as known by WP. + require __DIR__ . '/vendor/autoload.php'; +} + +define( 'POLYLANG', ucwords( str_replace( '-', ' ', dirname( POLYLANG_BASENAME ) ) ) ); + +if ( ! empty( $_GET['deactivate-polylang'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + return; +} + +require POLYLANG_DIR . '/src/constant-functions.php'; +if ( ! PLL_Usable::can_activate() ) { + // WP version or php version is too old. + return; +} + +define( 'POLYLANG_ACTIVE', true ); + +if ( PLL_Deactivate::is_deactivation() ) { + // Stopping here if we are going to deactivate the plugin (avoids breaking rewrite rules). + PLL_Deactivate::add_hooks(); + return; +} + +PLL_Activate::add_hooks(); +new Polylang(); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/readme.md b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/readme.md new file mode 100644 index 0000000..619a2f7 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/readme.md @@ -0,0 +1,29 @@ +# ![Polylang](.github/assets/polylang-logo.svg) [POLYLANG](https://wordpress.org/plugins/polylang/) + +Welcome to the Polylang repository on GitHub. Here you can browse the source, discuss open issues and keep track of the development. + +If you are not a developer, we recommend to [download Polylang](https://wordpress.org/plugins/polylang/) from WordPress directory. + +## [Pre-requisites](#pre-requisites) + +Before starting, make sure that you have the following software installed and working on your computer: + +1. A local [WordPress](https://wordpress.org/support/article/how-to-install-wordpress/) (6.5 or later) instance +2. [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) to clone the Polylang repository (or your fork of the Polylang repository). +3. [Node.js](https://nodejs.org/en/download/) which provides [NPM](https://docs.npmjs.com/). They are both required by [Webpack](https://webpack.js.org/guides/getting-started/) that Polylang uses to build and minify CSS and javascript files. We recommend to install Node.js LTS version. +4. [Composer](https://getcomposer.org/doc/00-intro.md) because Polylang uses its autoloader to work and it is required to install development tools such as PHP CodeSniffer that ensures your code follows coding standards. + +## [How to set up Polylang](#how-to-setup-polylang) + +The simplest way is to clone locally this repository and build it directly in your local WordPress instance by following the steps below: + +1. Go to your local WordPress instance wp-content/plugins/ folder:
    +`cd your/local/wordpress/path/wp-content/plugins` +2. Clone there the polylang repository (or your fork) from GitHub:
    +`git clone https://github.com/polylang/polylang.git` +3. Go to your local Polylang clone folder from there: `cd polylang` +4. Run the composer command: `composer build` +5. Activate Polylang as if you had installed it from WordPress.org:
    +See + +**Note**: we recommend for Windows users to use `Git Bash` provided with [Git for Windows](https://git-scm.com/download/win) instead of the command or powershell terminal. diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/readme.txt b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/readme.txt new file mode 100644 index 0000000..85ea8fe --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/readme.txt @@ -0,0 +1,171 @@ +=== Polylang === +Contributors: Chouby, manooweb, raaaahman, marianne38, sebastienserre, greglone, hugod +Donate link: https://polylang.pro +Tags: multilingual, translate, translation, language, localization +Requires at least: 6.5 +Tested up to: 6.9 +Requires PHP: 7.4 +Stable tag: 3.8.3 +License: GPLv3 or later +License URI: https://www.gnu.org/licenses/gpl-3.0.html + +Go multilingual in a simple and efficient way. Keep writing posts and taxonomy terms as usual while defining their languages all at once. + +== Description == + +With Polylang fully integrated to WordPress and using only its built-in core features (taxonomies), keep steady performances on your site and create a multilingual site featuring from just one extra language to 10 or more depending on your needs. There is no limit in the number of languages added and WordPress’ language packs are automatically downloaded when ready. + += Features = + +Depending on the type of site you have built or are planning to build, a combination of plugins from the list below might be of interest. +All plugins include a wizard allowing to setup them in just a few clicks. + +### Polylang + +Polylang and [Polylang Pro](https://polylang.pro) share the same core providing features such as: + +* Translating posts, pages, media, categories, post tags, custom post types and taxonomies, RSS feeds; RTL scripts are supported. +* The language is either set by the language code in URL, or you can use a different sub-domain or domain per language. +* Automatic copy of categories, post tags and other metas when creating a new post or page translation. +* Translating classic menus and classic widgets. Also accessible with [Site Editor Classic Features](https://wordpress.org/plugins/fse-classic/) in block themes. +* Customizable language switchers available as blocks, classic widget or classic navigation menu item. +* Compatibility with Yoast SEO. + +### Polylang Pro + +Helps optimizing the time spent translating your site with some very useful extra features such as: + +* Better integration in the new Block Editor. +* Language options available in the widget block editor. +* Template parts translatable in the site editor (FSE). +* Duplicate and/or synchronize content across post translations. +* Improved compatibility with other plugins such as [ACF Pro](https://polylang.pro/doc/working-with-acf-pro/). +* Share the same URL slug for posts or terms across languages. +* [Translate URL slugs](https://polylang.pro/doc/translating-urls-slugs/) for categories, author bases, custom post types and more... +* Machine translation with DeepL. +* Export and import of content in XLIFF format for outsourced professional translation. +* **Access to a Premium Support for personalized assistance.** + +### Polylang for WooCommerce + +[Add-on](https://polylang.pro/downloads/polylang-for-woocommerce/) for the compatibility with WooCommerce which provides features such as: + +* Translating WooCommerce pages (shop, check-out, cart, my account), product categories and global attribute terms directly in the WooCommerce interface. +* Translating WooCommerce e-mails and sending them to customers in their language. +* Products metadata synchronization. +* Compatibility with the native WooCommerce CSV import & export tool. +* Compatibility with popular plugins such as WooCommerce Subscriptions, Product Bundles, WooCommerce Bookings, Shipment Tracking and more. +* Ability to use the WooCommerce REST API (available with Polylang Pro). +* **Access to a Premium Support for personalized assistance.** + += Our other free plugins = + +* [WPML to Polylang](https://wordpress.org/plugins/wpml-to-polylang/) allows migrating from WPML to Polylang. +* [Site Editor Classic Features](https://wordpress.org/plugins/fse-classic/) allows to use classic widgets (including the Polylang language switcher) and menus in the site editor (FSE). + += Credits = + +Thanks a lot to all translators who [help translating Polylang](https://translate.wordpress.org/projects/wp-plugins/polylang). +Thanks a lot to [Alex Lopez](http://www.alexlopez.rocks/) for the design of the logo. +Most of the flags included with Polylang are coming from [famfamfam](http://famfamfam.com/) and are public domain. +Wherever third party code has been used, credit has been given in the code’s comments. + +== Installation == + +1. Make sure you are using WordPress 6.5 or later and that your server is running PHP 7.4 or later (same requirement as WordPress itself). +1. If you tried other multilingual plugins, deactivate them before activating Polylang, otherwise, you may get unexpected results! +1. Install and activate the plugin as usual from the 'Plugins' menu in WordPress. +1. The [setup wizard](https://polylang.pro/documentation/support/getting-started/setup-wizard/) is automatically launched to help you get started more easily with Polylang by configuring the main features. + +== Frequently Asked Questions == + += Where to find help ? = + +* First time users should read [Polylang - Getting started](https://polylang.pro/documentation/support/getting-started/), which explains the basics and includes a lot of screenshots. +* Read the [documentation](https://polylang.pro/documentation/support/). It includes a [FAQ](https://polylang.pro/documentation/support/faq/) and the [documentation for developers](https://polylang.pro/documentation/support/developers/). +* Search the [community support forum](https://wordpress.org/search/). You will probably find your answers here. +* Read the sticky posts in the [community support forum](http://wordpress.org/support/plugin/polylang). +* If you still have a problem, open a new thread in the [community support forum](http://wordpress.org/support/plugin/polylang). +* [Polylang Pro and Polylang for WooCommerce](https://polylang.pro) users have access to our premium support through helpdesk. + += Is Polylang compatible with WooCommerce? = + +* You need [Polylang for WooCommerce](https://polylang.pro/pricing/polylang-for-woocommerce/), premium addon described above, which will make both plugins work together. + += Where do I report security bugs found in this plugin? = + +* Please report security bugs found in the source code of the Polylang plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/d83984d2-d748-43e3-88e2-6dd3bd2c881d). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. + +== Screenshots == + +1. The Polylang languages admin panel +2. The Strings translations admin panel +3. Multilingual media library +4. The Edit Post screen with the Languages metabox + +== Changelog == + += 3.8.3 (2026-04-27) = + +* Pro: Improve performance of the languages sidebar in the block editor #2989 +* Pro: Fix impossibility to add more than one translation at once from the block editor sidebar #2985 +* Pro: Fix HTML entities displayed in translation inputs in the block editor sidebar #2984 +* Pro: Fix error when editing a pattern from the post editor #2990 +* Pro: Fix sync icon incorrectly shown as active on new posts #2995 +* Pro: Fix `pll_sync_post` REST API field returning an empty array instead of an ampty object #2995 +* Pro: Fix ACF fields in a repeater nested in a flexible content overwritten with wrong values #2975 +* Fix language switcher block error in Widget screen #1856 +* Fix PHP warning in site health #1862 +* Fix wrong cookie sent in some cases #1863 +* Fix error with WordPress Importer when the imported file has synchronized posts #1853 + += 3.8.2 (2026-04-07) = + +* Pro: Fix refresh issues in block editor languages panel #2965 +* Pro: Fix error when unlinking 2 translations in block editor #2970 +* Pro: Fix fatal error when a repeater is previously created in ACF Pro but ACF is active #2972 +* Fix settings redirect in Playground #1840 +* Fix possible fatal error when the default language has been corrupted in DB #1843 + += 3.8.1 (2026-03-19) = + +* Fix fatal error when the cache is suspended #1837 #1839 + += 3.8 (2026-03-17) = + +* Requires PHP 7.4 and WP 6.5 as minimum version +* Pro: Use autonomous updater #2475 +* Pro: Add capabilities allowing to control permissions per language +* Pro: Add capabilities to control access to languages and strings translations +* Pro: Allow to manage languages and settings with WP CLI #2653 +* Pro: Add smart duplication in site editor #2559 +* Pro: Add support for DeepL glossaries #2687 +* Pro: Add locale fallback support to machine translation #2685 +* Pro: Add Support encoding for block attributes in wpml-config.xml #1683, #2660 +* Pro: Improve extensibility of the block editor languages panel #2553 +* Pro: Add support for new blocks introduced in WP 7.0 #2933 #2941 +* Pro: Hide language selector on inner blocks in Widget Block Editor #2900 +* Pro: Fix page template not copied when creating a new page translation in the block editor #2581 +* Pro: Fix SVG icons lost when using machine translation +* Pro: Fix a performance issue with the translation of ACF labels #2670 +* Pro: Fix product status wrongly modified when updating a product with the REST API #2540 +* Pro: Fix inactive languages not displayed when they should in REST API #2791 +* Pro: Fix translation of ACF repeaters with pagination #2674 +* Pro: Fix ACF's layout fields instructions #2889 +* Pro: Fix ACF's taxonomy fields not synchronized #2948 +* Pro: Fix event dates of The Events Calendar not duplicated #2894 +* Add language switcher block and navigation language switcher block #1811 +* Add support for multiple encodings in wpml-config.xml #1679, #2655 +* Enforce transients in DB and in object cache are synchronized #1653, #2598 +* Enforce passing all translations when saving the translations of a post or term #1690 +* Hide the admin language filter when editing posts #1698 +* Improve performance by preventing DB queries to fetch the language terms #1650 +* Fix edge cases where the translation group could be corrupted #1690 +* Fix a fatal error on multisite when saving a post after having switched to a site without Polylang #1700 +* Fix a fatal error when translating a custom table #1730 +* Fix warning when requesting a non-existing language #1665 +* Fix strings translations import with WP Importer #1637 +* Fix edge cases leading to wrong languages order #1777 +* Fix a fatal error with the plugin Groups #1834 + +See [changelog.txt](https://plugins.svn.wordpress.org/polylang/trunk/changelog.txt) for older changelog diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Capabilities.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Capabilities.php new file mode 100644 index 0000000..f69b997 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Capabilities.php @@ -0,0 +1,86 @@ +get( $user ?? wp_get_current_user() ); + } + + /** + * Sets the user creator to be used for capability checks. + * + * Having a separate class to create the decorated user allows for better decoupling. + * This allows to set a creator object without dependence to a `WP_User`. + * + * @since 3.8 + * + * @param Creator_Interface $creator The user creator to be used for capability checks. + * @return void + */ + public static function set_user_creator( Creator_Interface $creator ): void { + self::$creator = $creator; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Abstract_Object.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Abstract_Object.php new file mode 100644 index 0000000..86db27a --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Abstract_Object.php @@ -0,0 +1,64 @@ +model = $model; + $this->request = $request; + $this->pref_lang = $pref_lang; + $this->curlang = $curlang; + } + + /** + * Returns the language to set for an object creation or update based on the global context. + * + * @since 3.8 + * + * @param int $id The object ID. + * @return PLL_Language The language defined from the global context. + */ + abstract public function get_language( int $id = 0 ): PLL_Language; +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Post.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Post.php new file mode 100644 index 0000000..006b204 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Post.php @@ -0,0 +1,70 @@ +model->get_default_language(); + $user = Capabilities::get_user(); + + if ( ! empty( $_GET['new_lang'] ) && $lang = $this->model->get_language( sanitize_key( $_GET['new_lang'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // Defined only on admin. + return $lang; + } + if ( ! isset( $this->pref_lang ) && ! empty( $_REQUEST['lang'] ) && $lang = $this->model->get_language( sanitize_key( $_REQUEST['lang'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // Testing $this->pref_lang makes this test pass only on frontend. + return $lang; + } + if ( $this->request && $lang = $this->request->get_language() ) { + // REST request. + return $lang; + } + if ( ( $parent_id = wp_get_post_parent_id( $id ) ) && $parent_lang = $this->model->post->get_language( $parent_id ) ) { + // Use parent if exists. + return $parent_lang; + } + if ( isset( $this->pref_lang ) && $user->can_translate( $this->pref_lang ) ) { + // Always defined on admin, never defined on frontend. + return $this->pref_lang; + } + if ( ! empty( $this->curlang ) ) { + // Only on frontend due to the previous test always true on admin. + return $this->curlang; + } + if ( $user->is_translator() ) { + // Use default language if user can translate into it... + if ( $user->can_translate( $default_language ) ) { + return $default_language; + } + + // ... or its preferred one. + $preferred_language = $this->model->get_language( $user->get_preferred_language_slug() ); + if ( $preferred_language ) { + return $preferred_language; + } + } + + // In all other cases use default language because we must have a language to set. + return $default_language; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Term.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Term.php new file mode 100644 index 0000000..33b71cc --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/Create/Term.php @@ -0,0 +1,77 @@ +model->get_default_language(); + $user = Capabilities::get_user(); + + if ( ! empty( $_GET['new_lang'] ) && $lang = $this->model->get_language( sanitize_key( $_GET['new_lang'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // Defined only on admin. + return $lang; + } + if ( ! empty( $_POST['term_lang_choice'] ) && is_string( $_POST['term_lang_choice'] ) && $lang = $this->model->get_language( sanitize_key( $_POST['term_lang_choice'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + return $lang; + } + if ( ! empty( $_POST['inline_lang_choice'] ) && is_string( $_POST['inline_lang_choice'] ) && $lang = $this->model->get_language( sanitize_key( $_POST['inline_lang_choice'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + return $lang; + } + if ( ! isset( $this->pref_lang ) && ! empty( $_REQUEST['lang'] ) && $lang = $this->model->get_language( sanitize_key( $_REQUEST['lang'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // Testing $this->pref_lang makes this test pass only on frontend. + return $lang; + } + if ( $this->request && $lang = $this->request->get_language() ) { + // REST request. + return $lang; + } + if ( ( $term = get_term( $id, $taxonomy ) ) && ! empty( $term->parent ) && $parent_lang = $this->model->term->get_language( $term->parent ) ) { + // Sets language from term parent if exists thanks to Scott Kingsley Clark. + return $parent_lang; + } + if ( isset( $this->pref_lang ) && $user->can_translate( $this->pref_lang ) ) { + // Always defined on admin, never defined on frontend. + return $this->pref_lang; + } + if ( ! empty( $this->curlang ) ) { + // Only on frontend due to the previous test always true on admin. + return $this->curlang; + } + if ( $user->is_translator() ) { + // Use default language if user can translate into it... + if ( $user->can_translate( $default_language ) ) { + return $default_language; + } + + // ... or its preferred one. + $preferred_language = $this->model->get_language( $user->get_preferred_language_slug() ); + if ( $preferred_language ) { + return $preferred_language; + } + } + + // In all other cases use default language because we must have a language to set. + return $default_language; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/Creator.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/Creator.php new file mode 100644 index 0000000..350c9a0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/Creator.php @@ -0,0 +1,41 @@ +instance && $user->ID === $this->instance->get_id() ) { + return $this->instance; + } + + $this->instance = new NOOP( $user ); + + return $this->instance; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/Creator_Interface.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/Creator_Interface.php new file mode 100644 index 0000000..e499d5c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/Creator_Interface.php @@ -0,0 +1,26 @@ +user = $user; + } + + /** + * Returns the user ID. + * + * @since 3.8 + * + * @return int + */ + public function get_id(): int { + return $this->user->ID; + } + + /** + * Tells if the user is a translator (has a translator capability). + * Always returns false for NOOP user. + * + * @since 3.8 + * + * @return bool + */ + public function is_translator(): bool { + return false; + } + + /** + * Tells if the user can translate to the given language. + * Always returns true for NOOP user. + * + * @since 3.8 + * + * @param PLL_Language $language A language object. + * @return bool + */ + public function can_translate( PLL_Language $language ): bool { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return true; + } + + /** + * Tells if the user can translate to all the given languages. + * Always returns true for NOOP user. + * + * @since 3.8 + * + * @param array $languages List of language slugs. + * @return bool + * + * @phpstan-param array $languages + */ + public function can_translate_all( array $languages ): bool { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return true; + } + + /** + * Tells if the user has the specified capability. + * Delegates to WP_User. + * + * @since 3.8 + * + * @param string $capability Capability name. + * @param mixed ...$args Optional further parameters, typically starting with an object ID. + * @return bool + */ + public function has_cap( $capability, ...$args ): bool { + return $this->user->has_cap( $capability, ...$args ); + } + + /** + * Returns the preferred language of the user. + * Always returns an empty string for NOOP user. + * + * @since 3.8 + * + * @return string The preferred language slug, empty string if no preferred language is found. + */ + public function get_preferred_language_slug(): string { + return ''; + } + + /** + * Checks if the current user has the rights to assign a language to an object and dies if not. + * Does nothing for NOOP user (always allows). + * + * @since 3.8 + * + * @param PLL_Language $language The language to assign. + * @return void|never Dies if the user does not have the rights, does nothing otherwise. + */ + public function can_translate_or_die( PLL_Language $language ): void { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // Never say die! + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/User_Interface.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/User_Interface.php new file mode 100644 index 0000000..3f50b3a --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Capabilities/User/User_Interface.php @@ -0,0 +1,89 @@ + $languages + */ + public function can_translate_all( array $languages ): bool; + + /** + * Tells if the user has the specified capability. + * + * @since 3.8 + * + * @param string $capability Capability name. + * @param mixed ...$args Optional further parameters, typically starting with an object ID. + * @return bool + */ + public function has_cap( $capability, ...$args ): bool; + + /** + * Returns the preferred language of the user. + * + * @since 3.8 + * + * @return string The preferred language slug, empty string if no preferred language is found. + */ + public function get_preferred_language_slug(): string; + + /** + * Checks if the current user has the rights to assign a language to an object and dies if not. + * + * @since 3.8 + * + * @param PLL_Language $language The language to assign. + * @return void|never Dies if the user does not have the rights, does nothing otherwise. + */ + public function can_translate_or_die( PLL_Language $language ): void; +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Hide_Default.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Hide_Default.php new file mode 100644 index 0000000..d8cfc40 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Hide_Default.php @@ -0,0 +1,39 @@ +is_default; + } + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Hide_Empty.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Hide_Empty.php new file mode 100644 index 0000000..37f6053 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Hide_Empty.php @@ -0,0 +1,39 @@ +get_tax_prop( 'language', 'count' ) > 0; + } + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages.php new file mode 100644 index 0000000..e6c5f85 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages.php @@ -0,0 +1,1396 @@ + + */ + private $cache; + + /** + * Flag set to true during the language objects creation. + * + * @var bool + */ + private $is_creating_list = false; + + /** + * Tells if {@see WP_Syntex\Polylang\Model\Languages::get_list()} can be used. + * + * @var bool + */ + private $languages_ready = false; + + /** + * List of automatic language proxies. + * + * @var Languages_Proxy_Interface[] + * + * @phpstan-var array + */ + private $automatic_proxies = array(); + + /** + * List of language proxies. + * + * @var Languages_Proxy_Interface[] + * + * @phpstan-var array + */ + private $proxies = array(); + + /** + * Constructor. + * + * @since 3.7 + * + * @param Options $options Polylang's options. + * @param PLL_Translatable_Objects $translatable_objects Translatable objects registry. + * @param PLL_Cache $cache Internal non persistent cache object. + * + * @phpstan-param PLL_Cache $cache + */ + public function __construct( Options $options, PLL_Translatable_Objects $translatable_objects, PLL_Cache $cache ) { + $this->options = $options; + $this->translatable_objects = $translatable_objects; + $this->cache = $cache; + } + + /** + * Returns the language by its term_id, tl_term_id, slug or locale. + * + * @since 0.1 + * @since 3.4 Allow to get a language by `term_taxonomy_id`. + * @since 3.7 Moved from `PLL_Model::get_language()` to `WP_Syntex\Polylang\Model\Languages::get()`. + * + * @param mixed $value `term_id`, `term_taxonomy_id`, `slug`, `locale`, or `w3c` of the queried language. + * `term_id` and `term_taxonomy_id` can be fetched for any language taxonomy. + * /!\ For the `term_taxonomy_id`, prefix the ID by `tt:` (ex: `"tt:{$tt_id}"`), + * this is to prevent confusion between `term_id` and `term_taxonomy_id`. + * @return PLL_Language|false Language object, false if no language found. + * + * @phpstan-param PLL_Language|WP_Term|int|string $value + */ + public function get( $value ) { + if ( $value instanceof PLL_Language ) { + return $value; + } + + // Cast WP_Term to PLL_Language. + if ( $value instanceof WP_Term ) { + return $this->get( $value->term_id ); + } + + $return = $this->cache->get( 'language:' . $value ); + + if ( $return instanceof PLL_Language ) { + return $return; + } + + foreach ( $this->get_list() as $lang ) { + foreach ( $lang->get_tax_props() as $props ) { + $this->cache->set( 'language:' . $props['term_id'], $lang ); + $this->cache->set( 'language:tt:' . $props['term_taxonomy_id'], $lang ); + } + $this->cache->set( 'language:' . $lang->slug, $lang ); + $this->cache->set( 'language:' . $lang->locale, $lang ); + $this->cache->set( 'language:' . $lang->w3c, $lang ); + } + + /** @var PLL_Language|false */ + return $this->cache->get( 'language:' . $value ); + } + + /** + * Adds a new language and creates a default category for this language. + * + * @since 1.2 + * @since 3.7 Moved from `PLL_Admin_Model::add_language()` to `WP_Syntex\Polylang\Model\Languages::add()`. + * @since 3.8 Returns the new object language. + * + * @param array $args { + * Arguments used to create the language. + * + * @type string $locale WordPress locale. If something wrong is used for the locale, the .mo files will + * not be loaded... + * @type string $name Optional. Language name (used only for display). Default to the language name from {@see src/settings/languages.php}. + * @type string $slug Optional. Language code (ideally 2-letters ISO 639-1 language code). Default to the language code from {@see src/settings/languages.php}. + * @type bool $rtl Optional. True if rtl language, false otherwise. Default is false. + * @type bool $is_rtl Optional. True if rtl language, false otherwise. Will be converted to rtl. Default is false. + * @type int $term_group Optional. Language order when displayed. Default is 0. + * @type string $flag Optional. Country code, {@see src/settings/flags.php}. + * @type string $flag_code Optional. Country code, {@see src/settings/flags.php}. Will be converted to flag. + * @type bool $no_default_cat Optional. If set, no default category will be created for this language. Default is false. + * } + * @return PLL_Language|WP_Error The object language on success, a `WP_Error` otherwise. + * + * @phpstan-param array{ + * name?: string, + * slug?: string, + * locale?: string, + * rtl?: bool, + * is_rtl?: bool, + * term_group?: int|numeric-string, + * flag?: string, + * flag_code?: string, + * no_default_cat?: bool + * } $args + */ + public function add( $args ) { + $args['rtl'] = $args['rtl'] ?? $args['is_rtl'] ?? null; + $args['flag'] = $args['flag'] ?? $args['flag_code'] ?? null; + $args['term_group'] = $args['term_group'] ?? 0; + + if ( ! empty( $args['locale'] ) && ( ! isset( $args['name'] ) || ! isset( $args['slug'] ) ) ) { + $languages = include POLYLANG_DIR . '/src/settings/languages.php'; + if ( ! empty( $languages[ $args['locale'] ] ) ) { + $found = $languages[ $args['locale'] ]; + $args['name'] = $args['name'] ?? $found['name']; + $args['slug'] = $args['slug'] ?? $found['code']; + $args['rtl'] = $args['rtl'] ?? 'rtl' === $found['dir']; + $args['flag'] = $args['flag'] ?? $found['flag']; + } + } + + $errors = $this->validate_lang( $args ); + if ( $errors->has_errors() ) { + return $errors; + } + + /** + * @phpstan-var array{ + * name: non-empty-string, + * slug: non-empty-string, + * locale: non-empty-string, + * rtl: bool, + * term_group: int|numeric-string, + * flag?: non-empty-string, + * no_default_cat?: bool + * } $args + */ + // First the language taxonomy. + $result = wp_insert_term( + $args['name'], + 'language', + array( + 'slug' => $args['slug'], + 'description' => $this->build_metas( $args ), + ) + ); + if ( is_wp_error( $result ) ) { + return new WP_Error( 'pll_add_language', __( 'Could not add the language.', 'polylang' ) ); + } + + $id = (int) $result['term_id']; + + $result = wp_update_term( $id, 'language', array( 'term_group' => (int) $args['term_group'] ) ); // Can't set the term group directly in `wp_insert_term()`. + if ( is_wp_error( $result ) ) { + return new WP_Error( 'pll_add_language', __( 'Could not set the language order.', 'polylang' ) ); + } + + // The other language taxonomies. + $errors = $this->update_secondary_language_terms( $args['slug'], $args['name'] ); + if ( $errors->has_errors() ) { + return $errors; + } + + if ( empty( $this->options['default_lang'] ) ) { + // If this is the first language created, set it as default language + $this->options['default_lang'] = $args['slug']; + } + + // Refresh languages. + $this->clean_cache(); + $new_language = $this->get( $id ); + + if ( ! $new_language ) { + return new WP_Error( 'pll_add_language', __( 'Could not add the language.', 'polylang' ) ); + } + + flush_rewrite_rules(); // Refresh rewrite rules. + + /** + * Fires after a language is added. + * + * @since 1.9 + * + * @param array $args { + * Arguments used to create the language. + * + * @type string $name Language name (used only for display). + * @type string $slug Language code (ideally 2-letters ISO 639-1 language code). + * @type string $locale WordPress locale. If something wrong is used for the locale, the .mo files will + * not be loaded... + * @type bool $rtl True if rtl language, false otherwise. + * @type int $term_group Language order when displayed. + * @type string $flag Optional. Country code, {@see src/settings/flags.php}. + * @type bool $no_default_cat Optional. If set, no default category will be created for this language. + * } + */ + do_action( 'pll_add_language', $args ); + + return $new_language; + } + + /** + * Updates language properties. + * + * @since 1.2 + * @since 3.7 Moved from `PLL_Admin_Model::update_language()` to `WP_Syntex\Polylang\Model\Languages::update()`. + * @since 3.8 Returns the updated object language. + * + * @param array $args { + * Arguments used to modify the language. + * + * @type int $lang_id ID of the language to modify. + * @type string $name Optional. Language name (used only for display). + * @type string $slug Optional. Language code (ideally 2-letters ISO 639-1 language code). + * @type string $locale Optional. WordPress locale. If something wrong is used for the locale, the .mo files will + * not be loaded... + * @type bool $rtl Optional. True if rtl language, false otherwise. + * @type bool $is_rtl Optional. True if rtl language, false otherwise. Will be converted to rtl. + * @type int $term_group Optional. Language order when displayed. + * @type string $flag Optional, country code, {@see src/settings/flags.php}. + * @type string $flag_code Optional. Country code, {@see src/settings/flags.php}. Will be converted to flag. + * } + * @return PLL_Language|WP_Error The updated object language on success, a `WP_Error` otherwise. + * + * @phpstan-param array{ + * lang_id: int|numeric-string, + * name?: string, + * slug?: string, + * locale?: string, + * rtl?: bool, + * is_rtl?: bool, + * term_group?: int|numeric-string, + * flag?: string, + * flag_code?: string + * } $args + */ + public function update( $args ) { + $id = (int) $args['lang_id']; + $lang = $this->get( $id ); + + if ( empty( $lang ) ) { + return new WP_Error( 'pll_invalid_language_id', __( 'The language does not seem to exist.', 'polylang' ) ); + } + + $args['locale'] = $args['locale'] ?? $lang->locale; + $args['name'] = $args['name'] ?? $lang->name; + $args['slug'] = $args['slug'] ?? $lang->slug; + $args['rtl'] = $args['rtl'] ?? $args['is_rtl'] ?? $lang->is_rtl; + $args['flag'] = $args['flag'] ?? $args['flag_code'] ?? $lang->flag_code; + $args['term_group'] = $args['term_group'] ?? $lang->term_group; + + $errors = $this->validate_lang( $args, $lang ); + if ( $errors->has_errors() ) { + return $errors; + } + + /** + * @phpstan-var array{ + * lang_id: int|numeric-string, + * name: non-empty-string, + * slug: non-empty-string, + * locale: non-empty-string, + * rtl: bool, + * term_group: int|numeric-string, + * flag?: non-empty-string + * } $args + */ + // Update links to this language in posts and terms in case the slug has been modified. + $slug = $args['slug']; + $old_slug = $lang->slug; + + // Update the language itself. + $errors = $this->update_secondary_language_terms( $args['slug'], $args['name'], $lang ); + if ( $errors->has_errors() ) { + return $errors; + } + + $result = wp_update_term( + $lang->get_tax_prop( 'language', 'term_id' ), + 'language', + array( + 'slug' => $slug, + 'name' => $args['name'], + 'description' => $this->build_metas( $args ), + 'term_group' => (int) $args['term_group'], + ) + ); + if ( is_wp_error( $result ) ) { + return new WP_Error( 'pll_update_language', __( 'Could not update the language.', 'polylang' ) ); + } + + if ( $old_slug !== $slug ) { + // Update the language slug in translations. + $errors = $this->update_translations( $old_slug, $slug ); + if ( $errors->has_errors() ) { + return $errors; + } + + // Update language option in widgets. + foreach ( $GLOBALS['wp_registered_widgets'] as $widget ) { + if ( ! empty( $widget['callback'][0] ) && ! empty( $widget['params'][0]['number'] ) ) { + $obj = $widget['callback'][0]; + $number = $widget['params'][0]['number']; + if ( is_object( $obj ) && method_exists( $obj, 'get_settings' ) && method_exists( $obj, 'save_settings' ) ) { + $settings = $obj->get_settings(); + if ( isset( $settings[ $number ]['pll_lang'] ) && $settings[ $number ]['pll_lang'] == $old_slug ) { + $settings[ $number ]['pll_lang'] = $slug; + $obj->save_settings( $settings ); + } + } + } + } + + // Update menus locations in options. + $nav_menus = $this->options->get( 'nav_menus' ); + + if ( ! empty( $nav_menus ) ) { + foreach ( $nav_menus as $theme => $locations ) { + foreach ( array_keys( $locations ) as $location ) { + if ( isset( $nav_menus[ $theme ][ $location ][ $old_slug ] ) ) { + $nav_menus[ $theme ][ $location ][ $slug ] = $nav_menus[ $theme ][ $location ][ $old_slug ]; + unset( $nav_menus[ $theme ][ $location ][ $old_slug ] ); + } + } + } + + $this->options->set( 'nav_menus', $nav_menus ); + } + + /* + * Update domains in options. + * This must happen after the term is saved (see `Options\Business\Domains::sanitize()`). + */ + $domains = $this->options->get( 'domains' ); + + if ( isset( $domains[ $old_slug ] ) ) { + $domains[ $slug ] = $domains[ $old_slug ]; + unset( $domains[ $old_slug ] ); + $this->options->set( 'domains', $domains ); + } + + /* + * Update the default language option if necessary. + * This must happen after the term is saved (see `Options\Business\Default_Lang::sanitize()`). + */ + if ( $lang->is_default ) { + $this->options->set( 'default_lang', $slug ); + } + } + + // Refresh languages. + $this->clean_cache(); + $updated_language = $this->get( $id ); + + if ( ! $updated_language ) { + return new WP_Error( 'pll_update_language', __( 'Could not update the language.', 'polylang' ) ); + } + + // Refresh rewrite rules. + flush_rewrite_rules(); + + /** + * Fires after a language is updated. + * + * @since 1.9 + * @since 3.2 Added $lang parameter. + * + * @param array $args { + * Arguments used to modify the language. @see WP_Syntex\Polylang\Model\Languages::update(). + * + * @type string $name Language name (used only for display). + * @type string $slug Language code (ideally 2-letters ISO 639-1 language code). + * @type string $locale WordPress locale. + * @type bool $rtl True if rtl language, false otherwise. + * @type int $term_group Language order when displayed. + * @type string $no_default_cat Optional, if set, no default category has been created for this language. + * @type string $flag Optional, country code, @see src/settings/flags.php. + * } + * @param PLL_Language $lang Previous value of the language being edited. + */ + do_action( 'pll_update_language', $args, $lang ); + + return $updated_language; + } + + /** + * Deletes a language. + * + * @since 1.2 + * @since 3.7 Moved from `PLL_Admin_Model::delete_language()` to `WP_Syntex\Polylang\Model\Languages::delete()`. + * + * @param int $lang_id Language term_id. + * @return bool + */ + public function delete( $lang_id ): bool { + $lang = $this->get( (int) $lang_id ); + + if ( empty( $lang ) ) { + return false; + } + + // Oops! We are deleting the default language... + // Need to do this before losing the information for default category translations. + if ( $lang->is_default ) { + $slugs = $this->get_list( array( 'fields' => 'slug' ) ); + $slugs = array_diff( $slugs, array( $lang->slug ) ); + + if ( ! empty( $slugs ) ) { + $this->update_default( reset( $slugs ) ); // Arbitrary choice... + } else { + unset( $this->options['default_lang'] ); + } + } + + // Delete the translations. + $this->update_translations( $lang->slug ); + + // Delete language option in widgets. + foreach ( $GLOBALS['wp_registered_widgets'] as $widget ) { + if ( ! empty( $widget['callback'][0] ) && ! empty( $widget['params'][0]['number'] ) ) { + $obj = $widget['callback'][0]; + $number = $widget['params'][0]['number']; + if ( is_object( $obj ) && method_exists( $obj, 'get_settings' ) && method_exists( $obj, 'save_settings' ) ) { + $settings = $obj->get_settings(); + if ( isset( $settings[ $number ]['pll_lang'] ) && $settings[ $number ]['pll_lang'] == $lang->slug ) { + unset( $settings[ $number ]['pll_lang'] ); + $obj->save_settings( $settings ); + } + } + } + } + + // Delete menus locations. + $nav_menus = $this->options->get( 'nav_menus' ); + + if ( ! empty( $nav_menus ) ) { + foreach ( $nav_menus as $theme => $locations ) { + foreach ( array_keys( $locations ) as $location ) { + unset( $nav_menus[ $theme ][ $location ][ $lang->slug ] ); + } + } + + $this->options->set( 'nav_menus', $nav_menus ); + } + + // Delete users options. + delete_metadata( 'user', 0, 'pll_filter_content', '', true ); + delete_metadata( 'user', 0, "description_{$lang->slug}", '', true ); + + // Delete domain. + $domains = $this->options->get( 'domains' ); + unset( $domains[ $lang->slug ] ); + $this->options->set( 'domains', $domains ); + + /* + * Delete the language itself. + * + * Reverses the language taxonomies order is required to make sure 'language' is deleted in last. + * + * The initial order with the 'language' taxonomy at the beginning of 'PLL_Language::term_props' property + * is done by {@see PLL_Model::filter_terms_orderby()} + */ + foreach ( array_reverse( $lang->get_tax_props( 'term_id' ) ) as $taxonomy_name => $term_id ) { + wp_delete_term( $term_id, $taxonomy_name ); + } + + // Refresh languages. + $this->clean_cache(); + $this->get_list(); + + flush_rewrite_rules(); // refresh rewrite rules + return true; + } + + /** + * Checks if there are languages or not. + * + * @since 3.3 + * @since 3.7 Moved from `PLL_Model::has_languages()` to `WP_Syntex\Polylang\Model\Languages::has()`. + * + * @return bool True if there are, false otherwise. + */ + public function has(): bool { + if ( ! empty( $this->cache->get( self::CACHE_KEY ) ) ) { + return true; + } + + if ( ! empty( get_transient( self::TRANSIENT_NAME ) ) ) { + return true; + } + + return ! empty( $this->get_terms() ); + } + + /** + * Returns the list of available languages. + * - Stores the list in a db transient (except flags), unless `PLL_CACHE_LANGUAGES` is set to false. + * - Caches the list (with flags) in a `PLL_Cache` object. + * + * @since 0.1 + * @since 3.7 Moved from `PLL_Model::get_languages_list()` to `WP_Syntex\Polylang\Model\Languages::get_list()`. + * + * @param array $args { + * @type string $fields Returns only that field if set; {@see PLL_Language} for a list of fields. + * @type bool $hide_empty Hides languages with no posts if set to `true` (defaults to `false`). Deprecated, use the `hide_empty` filter instead. + * @type bool $hide_default Hides default language from the list (default to `false`). Deprecated, use the `hide_default` filter instead. + * } + * @return array List of PLL_Language objects or PLL_Language object properties. + */ + public function get_list( $args = array() ): array { + if ( ! $this->are_ready() ) { + _doing_it_wrong( + __METHOD__ . '()', + "It must not be called before the hook 'pll_pre_init'.", + '3.4' + ); + } + + if ( ! empty( $args['hide_empty'] ) ) { + _deprecated_argument( + __METHOD__, + '3.8', + sprintf( + /* translators: 1: argument name, 2: PHP code snippet. */ + esc_html__( 'The argument %1$s has been replaced by %2$s.', 'polylang' ), + 'hide_empty', + 'PLL()->model->languages->filter( \'hide_empty\' )->get_list()' + ) + ); + } + + if ( ! empty( $args['hide_default'] ) ) { + _deprecated_argument( + __METHOD__, + '3.8', + sprintf( + /* translators: 1: argument name, 2: PHP code snippet. */ + esc_html__( 'The argument %1$s has been replaced by %2$s.', 'polylang' ), + 'hide_default', + 'PLL()->model->languages->filter( \'hide_default\' )->get_list()' + ) + ); + } + + $languages = $this->cache->get( self::CACHE_KEY ); + + if ( ! is_array( $languages ) ) { + // Bail out early if languages are currently created to avoid an infinite loop. + if ( $this->is_creating_list ) { + return array(); + } + + $this->is_creating_list = true; + + if ( ! pll_get_constant( 'PLL_CACHE_LANGUAGES', true ) ) { + // Create the languages from taxonomies. + $languages = $this->get_from_taxonomies(); + } else { + $languages = get_transient( self::TRANSIENT_NAME ); + + if ( empty( $languages ) || ! is_array( $languages ) || empty( reset( $languages )['term_props'] ) ) { // Test `term_props` in case we got a transient older than 3.4. + // Create the languages from taxonomies. + $languages = $this->get_from_taxonomies(); + } else { + // Create the languages directly from arrays stored in the transient. + $languages = array_map( + array( new PLL_Language_Factory( $this->options ), 'get' ), + $languages + ); + + // Remove potential empty language. + $languages = array_filter( $languages ); + + // Re-index. + $languages = array_values( $languages ); + } + } + + /** + * Filters the list of languages *after* it is stored in the persistent cache. + * /!\ This filter is fired *before* the $polylang object is available. + * + * @since 1.8 + * @since 3.4 Deprecated. If you used this hook to filter URLs, you may hook `'site_url'` instead. + * @deprecated + * + * @param PLL_Language[] $languages The list of language objects. + */ + $languages = apply_filters_deprecated( 'pll_after_languages_cache', array( $languages ), '3.4' ); + + foreach ( $this->automatic_proxies as $proxy ) { + $languages = $proxy->filter( $languages ); + } + + if ( $this->are_ready() ) { + $this->cache->set( self::CACHE_KEY, $languages ); + } + + $this->is_creating_list = false; + } + + // Backward compatibility with Polylang < 3.8. + $languages = array_filter( + $languages, + function ( $lang ) use ( $args ) { + $keep_empty = empty( $args['hide_empty'] ) || $lang->get_tax_prop( 'language', 'count' ); + $keep_default = empty( $args['hide_default'] ) || ! $lang->is_default; + return $keep_empty && $keep_default; + } + ); + + $languages = array_values( $languages ); // Re-index. + return $this->maybe_convert_list( $languages, (array) $args ); + } + + /** + * Tells if {@see WP_Syntex\Polylang\Model\Languages::get_list()} can be used. + * + * @since 3.4 + * @since 3.7 Moved from `PLL_Model::are_languages_ready()` to `WP_Syntex\Polylang\Model\Languages::are_ready()`. + * + * @return bool + */ + public function are_ready(): bool { + return $this->languages_ready; + } + + /** + * Sets the internal property `$languages_ready` to `true`, telling that {@see WP_Syntex\Polylang\Model\Languages::get_list()} can be used. + * + * @since 3.4 + * @since 3.7 Moved from `PLL_Model::set_languages_ready()` to `WP_Syntex\Polylang\Model\Languages::set_ready()`. + * + * @return void + */ + public function set_ready(): void { + $this->languages_ready = true; + } + + /** + * Returns the default language. + * + * @since 3.4 + * @since 3.7 Moved from `PLL_Model::get_default_language()` to `WP_Syntex\Polylang\Model\Languages::get_default()`. + * + * @return PLL_Language|false Default language object, `false` if no language found. + */ + public function get_default() { + if ( ! empty( $this->options['default_lang'] ) ) { + return $this->get( $this->options['default_lang'] ); + } + + // It happens that there the default language is lost. We require one, so let's select one arbitrarily. + $terms = $this->get_terms(); + if ( empty( $terms ) ) { + return false; + } + + $default_term = reset( $terms ); + $this->update_default( $default_term->slug ); + + return $this->get( $this->options['default_lang'] ); + } + + /** + * Updates the default language. + * Takes care to update default category, nav menu locations, and flushes cache and rewrite rules. + * + * @since 1.8 + * @since 3.7 Moved from `PLL_Admin_Model::update_default_lang()` to `WP_Syntex\Polylang\Model\Languages::update_default()`. + * Returns a `WP_Error` object. + * + * @param string $slug New language slug. + * @return WP_Error A `WP_Error` object containing possible errors during slug validation/sanitization. + */ + public function update_default( $slug ): WP_Error { + $prev_default_lang = $this->options->get( 'default_lang' ); + + if ( $prev_default_lang === $slug ) { + return new WP_Error(); + } + + $errors = $this->options->set( 'default_lang', $slug ); + + if ( $errors->has_errors() ) { + return $errors; + } + + // The nav menus stored in theme locations should be in the default language. + $theme = get_stylesheet(); + if ( ! empty( $this->options['nav_menus'][ $theme ] ) ) { + $menus = array(); + + foreach ( $this->options['nav_menus'][ $theme ] as $key => $loc ) { + $menus[ $key ] = empty( $loc[ $slug ] ) ? 0 : $loc[ $slug ]; + } + set_theme_mod( 'nav_menu_locations', $menus ); + } + + /** + * Fires when a default language is updated. + * + * @since 3.1 + * @since 3.7 The previous default language's slug is passed as 2nd param. + * The default language is updated before this hook is fired. + * + * @param string $slug New default language's slug. + * @param string $prev_default_lang Previous default language's slug. + */ + do_action( 'pll_update_default_lang', $slug, $prev_default_lang ); + + // Update options. + + $this->clean_cache(); + flush_rewrite_rules(); + + return new WP_Error(); + } + + /** + * Maybe adds the missing language terms for 3rd party language taxonomies. + * + * @since 3.4 + * @since 3.7 Moved from `PLL_Model::maybe_create_language_terms()` to `WP_Syntex\Polylang\Model\Languages::maybe_create_terms()`. + * + * @return void + */ + public function maybe_create_terms(): void { + $registered_taxonomies = array_diff( + $this->translatable_objects->get_taxonomy_names( array( 'language' ) ), + // Exclude the post and term language taxonomies from the list. + array( + $this->translatable_objects->get( 'post' )->get_tax_language(), + $this->translatable_objects->get( 'term' )->get_tax_language(), + ) + ); + + if ( empty( $registered_taxonomies ) ) { + // No 3rd party language taxonomies. + return; + } + + // We have at least one 3rd party language taxonomy. + $known_taxonomies = get_option( 'pll_language_taxonomies', array() ); + $known_taxonomies = is_array( $known_taxonomies ) ? $known_taxonomies : array(); + $new_taxonomies = array_diff( $registered_taxonomies, $known_taxonomies ); + + if ( empty( $new_taxonomies ) ) { + // No new 3rd party language taxonomies. + return; + } + + // We have at least one unknown 3rd party language taxonomy. + foreach ( $this->get_list() as $language ) { + $this->update_secondary_language_terms( $language->slug, $language->name, $language, $new_taxonomies ); + } + + // Clear the cache, so the new `term_id` and `term_taxonomy_id` appear in the languages list. + $this->clean_cache(); + + // Keep the previous values, so this is triggered only once per taxonomy. + update_option( 'pll_language_taxonomies', array_merge( $known_taxonomies, $new_taxonomies ) ); + } + + /** + * Cleans language cache. + * + * @since 3.7 + * + * @return void + */ + public function clean_cache(): void { + delete_transient( self::TRANSIENT_NAME ); + $this->clean_local_cache(); + } + + /** + * Cleans local language cache. + * + * @since 3.8 + * + * @return void + */ + public function clean_local_cache(): void { + $this->cache->clean(); + } + + /** + * Deletes the transient from the options table since WordPress does not do it when using object cache. + * + * @since 3.8 + * + * @return void + */ + public function delete_transient_from_options_table(): void { + if ( wp_using_ext_object_cache() || wp_installing() ) { + delete_option( '_transient_' . self::TRANSIENT_NAME ); + } + } + + /** + * Applies arguments that change the type of the elements of the given list of languages. + * + * @since 3.8 + * + * @param PLL_Language[] $languages The list of language objects. + * @param array $args { + * @type string $fields Optional. Returns only that field if set; {@see PLL_Language} for a list of fields. + * } + * @return array List of `PLL_Language` objects or `PLL_Language` object properties. + */ + public function maybe_convert_list( array $languages, array $args ): array { + if ( ! empty( $args['fields'] ) ) { + return wp_list_pluck( $languages, $args['fields'] ); + } + return $languages; + } + + /** + * Registers languages proxies. + * + * @since 3.8 + * + * @param Languages_Proxy_Interface $proxy Proxy instance. + * @param string $mode Optional. Tell how the proxy must be applied. Possible values are: + * - `callable`: the proxy must be called manually with `filter()`. + * - `automatic`: the proxy is meant to be always called, automatically. + * Default is `callable`. + * @return self + * + * @phpstan-param 'callable'|'automatic' $mode + */ + public function register_proxy( Languages_Proxy_Interface $proxy, string $mode = 'callable' ): self { + if ( 'automatic' === $mode ) { + $this->automatic_proxies[ $proxy->key() ] = $proxy; + } else { + $this->proxies[ $proxy->key() ] = $proxy; + } + return $this; + } + + /** + * Stacks a proxy that will filter the list of languages. + * + * @since 3.8 + * + * @param string $key Proxy's key. + * @return Languages_Proxies + */ + public function filter( string $key ): Languages_Proxies { + return new Languages_Proxies( $this, $this->proxies, $key ); + } + + /** + * Builds the language metas into an array and serializes it, to be stored in the term description. + * + * @since 3.4 + * @since 3.7 Moved from `PLL_Admin_Model::build_language_metas()` to `WP_Syntex\Polylang\Model\Languages::build_metas()`. + * + * @param array $args { + * Arguments used to build the language metas. + * + * @type string $name Language name (used only for display). + * @type string $slug Language code (ideally 2-letters ISO 639-1 language code). + * @type string $locale WordPress locale. If something wrong is used for the locale, the .mo files will not + * be loaded... + * @type bool $rtl True if rtl language, false otherwise. + * @type int $term_group Language order when displayed. + * @type int $lang_id Optional, ID of the language to modify. An empty value means the language is being + * created. + * @type string $flag Optional, country code, {@see src/settings/flags.php}. + * } + * @return string The serialized description array updated. + * + * @phpstan-param array{ + * name: non-empty-string, + * slug: non-empty-string, + * locale: non-empty-string, + * rtl: bool, + * term_group: int|numeric-string, + * lang_id?: int|numeric-string, + * flag?: non-empty-string + * } $args + */ + protected function build_metas( array $args ): string { + if ( ! empty( $args['lang_id'] ) ) { + $language_term = get_term( (int) $args['lang_id'] ); + + if ( $language_term instanceof WP_Term ) { + $old_data = maybe_unserialize( $language_term->description ); + } + } + + if ( empty( $old_data ) || ! is_array( $old_data ) ) { + $old_data = array(); + } + + $new_data = array( + 'locale' => $args['locale'], + 'rtl' => ! empty( $args['rtl'] ), + 'flag_code' => empty( $args['flag'] ) ? '' : $args['flag'], + ); + + /** + * Allow to add data to store for a language. + * `$locale`, `$rtl`, and `$flag_code` cannot be overwritten. + * + * @since 3.4 + * + * @param mixed[] $add_data Data to add. + * @param mixed[] $args { + * Arguments used to create the language. + * + * @type string $name Language name (used only for display). + * @type string $slug Language code (ideally 2-letters ISO 639-1 language code). + * @type string $locale WordPress locale. If something wrong is used for the locale, the .mo files will + * not be loaded... + * @type bool $rtl True if rtl language, false otherwise. + * @type int $term_group Language order when displayed. + * @type int $lang_id Optional, ID of the language to modify. An empty value means the language is + * being created. + * @type string $flag Optional, country code, {@see src/settings/flags.php}. + * } + * @param mixed[] $new_data New data. + * @param mixed[] $old_data { + * Original data. Contains at least the following: + * + * @type string $locale WordPress locale. + * @type bool $rtl True if rtl language, false otherwise. + * @type string $flag_code Country code. + * } + */ + $add_data = apply_filters( 'pll_language_metas', array(), $args, $new_data, $old_data ); + // Don't allow to overwrite `$locale`, `$rtl`, and `$flag_code`. + $new_data = array_merge( $old_data, $add_data, $new_data ); + + /** @var non-empty-string $serialized maybe_serialize() cannot return anything else than a string when fed by an array. */ + $serialized = maybe_serialize( $new_data ); + return $serialized; + } + + /** + * Validates data entered when creating or updating a language. + * + * @since 0.4 + * @since 3.7 Moved from `PLL_Admin_Model::validate_lang()` to `WP_Syntex\Polylang\Model\Languages::validate_lang()`. + * + * @param array $args Parameters of {@see WP_Syntex\Polylang\Model\Languages::add() or @see WP_Syntex\Polylang\Model\Languages::update()}. + * @param PLL_Language|null $lang Optional the language currently updated, the language is created if not set. + * @return WP_Error + * + * @phpstan-param array{ + * locale?: string, + * slug?: string, + * name?: string, + * flag?: string + * } $args + */ + protected function validate_lang( $args, ?PLL_Language $lang = null ): WP_Error { + $errors = new WP_Error(); + + // Validate locale with the same pattern as WP 4.3. See #28303. + if ( empty( $args['locale'] ) || ! preg_match( '#' . self::LOCALE_PATTERN . '#', $args['locale'], $matches ) ) { + $errors->add( 'pll_invalid_locale', __( 'Enter a valid WordPress locale', 'polylang' ) ); + } + + // Validate slug characters. + if ( empty( $args['slug'] ) || ! preg_match( '#' . self::SLUG_PATTERN . '#', $args['slug'] ) ) { + $errors->add( 'pll_invalid_slug', __( 'The language code contains invalid characters', 'polylang' ) ); + } + + // Validate slug is unique. + foreach ( $this->get_list() as $language ) { + if ( ! empty( $args['slug'] ) && $language->slug === $args['slug'] && ( null === $lang || $lang->term_id !== $language->term_id ) ) { + $errors->add( 'pll_non_unique_slug', __( 'The language code must be unique', 'polylang' ) ); + } + } + + // Validate name. + // No need to sanitize it as `wp_insert_term()` will do it for us. + if ( empty( $args['name'] ) ) { + $errors->add( 'pll_invalid_name', __( 'The language must have a name', 'polylang' ) ); + } + + // Validate flag. + if ( ! empty( $args['flag'] ) && ! is_readable( POLYLANG_DIR . '/flags/' . $args['flag'] . '.png' ) ) { + $flag = PLL_Language::get_flag_information( $args['flag'] ); + + if ( ! empty( $flag['url'] ) ) { + $response = function_exists( 'vip_safe_wp_remote_get' ) ? vip_safe_wp_remote_get( sanitize_url( $flag['url'] ) ) : wp_remote_get( sanitize_url( $flag['url'] ) ); + } + + if ( empty( $response ) || is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { + $errors->add( 'pll_invalid_flag', __( 'The flag does not exist', 'polylang' ) ); + } + } + + return $errors; + } + + /** + * Updates the translations when a language slug has been modified in settings or deletes them when a language is removed. + * + * @since 0.5 + * @since 3.7 Moved from `PLL_Admin_Model::update_translations()` to `WP_Syntex\Polylang\Model\Languages::update_translations()`. + * Visibility changed from public to protected. + * + * @global $wpdb wpdb global instance. + * + * @param string $old_slug The old language slug. + * @param string $new_slug Optional, the new language slug, if not set it means that the language has been deleted. + * @return WP_Error + * + * @phpstan-param non-empty-string $old_slug + */ + protected function update_translations( $old_slug, $new_slug = '' ): WP_Error { + global $wpdb; + + $term_ids = array(); + $dr = array(); + $dt = array(); + $ut = array(); + $errors = new WP_Error(); + + $taxonomies = $this->translatable_objects->get_taxonomy_names( array( 'translations' ) ); + $terms = get_terms( array( 'taxonomy' => $taxonomies ) ); + + if ( is_array( $terms ) ) { + foreach ( $terms as $term ) { + $term_ids[ $term->taxonomy ][] = $term->term_id; + $tr = maybe_unserialize( $term->description ); + $tr = is_array( $tr ) ? $tr : array(); + + /** + * Filters the unserialized translation group description before it is + * updated when a language is deleted or a language slug is changed. + * + * @since 3.2 + * + * @param (int|string[])[] $tr { + * List of translations with lang codes as array keys and IDs as array values. + * Also in this array: + * + * @type string[] $sync List of synchronized translations with lang codes as array keys and array values. + * } + * @param string $old_slug The old language slug. + * @param string $new_slug The new language slug. + * @param WP_Term $term The term containing the post or term translation group. + */ + $tr = apply_filters( 'update_translation_group', $tr, $old_slug, $new_slug, $term ); + + if ( ! empty( $tr[ $old_slug ] ) ) { + if ( $new_slug ) { + $tr[ $new_slug ] = $tr[ $old_slug ]; // Suppress this for delete. + } else { + $dr['id'][] = (int) $tr[ $old_slug ]; + $dr['tt'][] = (int) $term->term_taxonomy_id; + } + unset( $tr[ $old_slug ] ); + + if ( empty( $tr ) || 1 == count( $tr ) ) { + $dt['t'][] = (int) $term->term_id; + $dt['tt'][] = (int) $term->term_taxonomy_id; + } else { + $ut['case'][] = array( $term->term_id, maybe_serialize( $tr ) ); + $ut['in'][] = (int) $term->term_id; + } + } + } + } + + // Delete relationships. + if ( ! empty( $dr ) ) { + $result = $wpdb->query( + $wpdb->prepare( + sprintf( + "DELETE FROM {$wpdb->term_relationships} WHERE object_id IN (%s) AND term_taxonomy_id IN (%s)", + implode( ',', array_fill( 0, count( $dr['id'] ), '%d' ) ), + implode( ',', array_fill( 0, count( $dr['tt'] ), '%d' ) ) + ), + array_merge( $dr['id'], $dr['tt'] ) + ) + ); + if ( false === $result ) { + $errors->add( 'pll_delete_relationships', __( 'Could not delete relationships.', 'polylang' ) ); + } + } + + // Delete terms. + if ( ! empty( $dt ) ) { + $result = $wpdb->query( + $wpdb->prepare( + sprintf( + "DELETE FROM {$wpdb->terms} WHERE term_id IN (%s)", + implode( ',', array_fill( 0, count( $dt['t'] ), '%d' ) ) + ), + $dt['t'] + ) + ); + if ( false === $result ) { + $errors->add( 'pll_delete_terms', __( 'Could not delete translation groups.', 'polylang' ) ); + } + + $result = $wpdb->query( + $wpdb->prepare( + sprintf( + "DELETE FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id IN (%s)", + implode( ',', array_fill( 0, count( $dt['tt'] ), '%d' ) ) + ), + $dt['tt'] + ) + ); + if ( false === $result ) { + $errors->add( 'pll_delete_term_taxonomy', __( 'Could not delete translation groups.', 'polylang' ) ); + } + } + + // Update terms. + if ( ! empty( $ut ) ) { + $result = $wpdb->query( + $wpdb->prepare( + sprintf( + "UPDATE {$wpdb->term_taxonomy} SET description = ( CASE term_id %s END ) WHERE term_id IN (%s)", + implode( ' ', array_fill( 0, count( $ut['case'] ), 'WHEN %d THEN %s' ) ), + implode( ',', array_fill( 0, count( $ut['in'] ), '%d' ) ) + ), + array_merge( array_merge( ...$ut['case'] ), $ut['in'] ) + ) + ); + if ( false === $result ) { + $errors->add( 'pll_update_term_taxonomy', __( 'Could not update translation groups.', 'polylang' ) ); + } + } + + if ( ! empty( $term_ids ) ) { + foreach ( $term_ids as $taxonomy => $ids ) { + clean_term_cache( $ids, $taxonomy ); + } + } + + return $errors; + } + + /** + * Updates or adds new terms for a secondary language taxonomy (aka not 'language'). + * + * @since 3.4 + * @since 3.7 Moved from `PLL_Model::update_secondary_language_terms()` to `WP_Syntex\Polylang\Model\Languages::update_secondary_language_terms()`. + * + * @param string $slug Language term slug (with or without the `pll_` prefix). + * @param string $name Language name (label). + * @param PLL_Language|null $language Optional. A language object. Required to update the existing terms. + * @param string[] $taxonomies Optional. List of language taxonomies to deal with. An empty value means + * all of them. Defaults to all taxonomies. + * @return WP_Error + * + * @phpstan-param non-empty-string $slug + * @phpstan-param non-empty-string $name + * @phpstan-param array $taxonomies + */ + protected function update_secondary_language_terms( $slug, $name, ?PLL_Language $language = null, array $taxonomies = array() ): WP_Error { + $slug = 0 === strpos( $slug, 'pll_' ) ? $slug : "pll_$slug"; + $errors = new WP_Error(); + + foreach ( $this->translatable_objects->get_secondary_translatable_objects() as $object ) { + if ( ! empty( $taxonomies ) && ! in_array( $object->get_tax_language(), $taxonomies, true ) ) { + // Not in the list. + continue; + } + + if ( ! empty( $language ) ) { + $term_id = $language->get_tax_prop( $object->get_tax_language(), 'term_id' ); + } else { + $term_id = 0; + } + + if ( empty( $term_id ) ) { + // Attempt to repair the language if a term has been deleted by a database cleaning tool. + $result = wp_insert_term( $name, $object->get_tax_language(), array( 'slug' => $slug ) ); + if ( is_wp_error( $result ) ) { + $errors->add( + 'pll_add_secondary_language_terms', + /* translators: %s is a taxonomy name */ + sprintf( __( 'Could not add secondary language term for taxonomy %s.', 'polylang' ), $object->get_tax_language() ) + ); + } + continue; + } + + /** @var PLL_Language $language */ + if ( "pll_{$language->slug}" !== $slug || $language->name !== $name ) { + // Something has changed. + $result = wp_update_term( $term_id, $object->get_tax_language(), array( 'slug' => $slug, 'name' => $name ) ); + if ( is_wp_error( $result ) ) { + $errors->add( + 'pll_update_secondary_language_terms', + /* translators: %s is a taxonomy name */ + sprintf( __( 'Could not update secondary language term for taxonomy %s.', 'polylang' ), $object->get_tax_language() ) + ); + } + } + } + + return $errors; + } + + /** + * Returns the list of available languages, based on the language taxonomy terms. + * Stores the list in a db transient and in a `PLL_Cache` object. + * + * @since 3.4 + * @since 3.7 Moved from `PLL_Model::get_languages_from_taxonomies()` to `WP_Syntex\Polylang\Model\Languages::get_from_taxonomies()`. + * + * @return PLL_Language[] An array of `PLL_Language` objects, array keys are the type. + * + * @phpstan-return list + */ + protected function get_from_taxonomies(): array { + $terms_by_slug = array(); + + foreach ( $this->get_terms() as $term ) { + // Except for language taxonomy term slugs, remove 'pll_' prefix from the other language taxonomy term slugs. + $key = 'language' === $term->taxonomy ? $term->slug : substr( $term->slug, 4 ); + $terms_by_slug[ $key ][ $term->taxonomy ] = $term; + } + + /** + * @var ( + * array{ + * string: array{ + * language: WP_Term, + * }&array + * } + * ) $terms_by_slug + */ + $languages = array_filter( + array_map( + array( new PLL_Language_Factory( $this->options ), 'get_from_terms' ), + array_values( $terms_by_slug ) + ) + ); + + /** + * Filters the list of languages *before* it is stored in the persistent cache. + * /!\ This filter is fired *before* the $polylang object is available. + * + * @since 1.7.5 + * @since 3.4 Deprecated. + * @deprecated + * + * @param PLL_Language[] $languages The list of language objects. + * @param Language $model `Language` object. + */ + $languages = apply_filters_deprecated( 'pll_languages_list', array( $languages, $this ), '3.4', 'pll_additional_language_data' ); + + if ( ! $this->are_ready() ) { + // Do not cache an incomplete list. + /** @var list $languages */ + return $languages; + } + + /* + * Don't store directly objects as it badly break with some hosts ( GoDaddy ) due to race conditions when using object cache. + * Thanks to captin411 for catching this! + * + * @see https://wordpress.org/support/topic/fatal-error-pll_model_languages_list?replies=8#post-6782255 + */ + $languages_data = array_map( + function ( $language ) { + return $language->to_array( 'db' ); + }, + $languages + ); + + set_transient( self::TRANSIENT_NAME, $languages_data ); + + /** @var list $languages */ + return $languages; + } + + /** + * Returns the list of existing language terms. + * - Returns all terms, that are or not assigned to posts. + * - Terms are ordered by `term_group` and `term_id` (see `WP_Syntex\Polylang\Model\Languages::filter_terms_orderby()`). + * + * @since 3.2.3 + * @since 3.7 Moved from `PLL_Model::get_language_terms()` to `WP_Syntex\Polylang\Model\Languages::get_terms()`. + * + * @return WP_Term[] + */ + protected function get_terms(): array { + $terms = get_terms( + array( + 'taxonomy' => $this->translatable_objects->get_taxonomy_names( array( 'language' ) ), + 'hide_empty' => false, + ) + ); + + if ( empty( $terms ) || is_wp_error( $terms ) ) { + return array(); + } + + $callback = static function ( $a, $b ) { + if ( $a->taxonomy !== $b->taxonomy ) { + // Sort terms by 'language' taxonomy first. + return 'language' === $a->taxonomy ? -1 : 1; + } + if ( $a->term_group !== $b->term_group ) { + // Then by term_group. + return $a->term_group < $b->term_group ? -1 : 1; + } + // Then by term_id. + return $a->term_id < $b->term_id ? -1 : 1; + }; + + usort( $terms, $callback ); + return $terms; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages_Proxies.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages_Proxies.php new file mode 100644 index 0000000..6997831 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages_Proxies.php @@ -0,0 +1,88 @@ + + */ + private $proxies = array(); + + /** + * @var string[] + */ + protected $stack = array(); + + /** + * Constructor. + * + * @since 3.8 + * + * @param Languages $languages Languages' model. + * @param array $proxies List of registered proxies. + * @param string $parent Key of the first item of the proxies stack to traverse. + */ + public function __construct( Languages $languages, array $proxies, string $parent ) { + $this->languages = $languages; + $this->proxies = $proxies; + $this->stack[] = $parent; + } + + /** + * Returns the list of available languages after passing it through proxies. + * + * @since 3.8 + * + * @param array $args Optional arguments to pass to `Languages::get_list()`. + * @return array List of `PLL_Language` objects or `PLL_Language` object properties. + */ + public function get_list( array $args = array() ): array { + $all_args = $args; + unset( $args['fields'] ); + + $languages = $this->languages->get_list( $args ); + + foreach ( $this->stack as $key ) { + if ( ! isset( $this->proxies[ $key ] ) ) { + continue; + } + $languages = $this->proxies[ $key ]->filter( $languages ); + } + + $languages = array_values( $languages ); // Re-index. + + return $this->languages->maybe_convert_list( $languages, $all_args ); + } + + /** + * Stacks a proxy that will filter the list of languages. + * + * @since 3.8 + * + * @param string $key Proxy's key. + * @return Languages_Proxies + */ + public function filter( string $key ): Languages_Proxies { + $this->stack[] = $key; + return $this; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages_Proxy_Interface.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages_Proxy_Interface.php new file mode 100644 index 0000000..59e4086 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Languages_Proxy_Interface.php @@ -0,0 +1,38 @@ +translated_object = $translated_object; + } + + /** + * Returns post types that need to be translated. + * The post types list is cached for better better performance. + * The method waits for 'after_setup_theme' to apply the cache + * to allow themes adding the filter in functions.php. + * + * @since 1.2 + * @since 3.7 Moved from `PLL_Model::get_translated_post_types()` to `WP_Syntex\Polylang\Model\Taxonomies::get_translated()`. + * + * @param bool $filter True if we should return only valid registered post types. + * @return string[] Post type names for which Polylang manages languages and translations. + */ + public function get_translated( $filter = true ): array { + return $this->translated_object->get_translated_object_types( $filter ); + } + + /** + * Returns true if Polylang manages languages and translations for this post type. + * + * @since 1.2 + * @since 3.7 Moved from `PLL_Model::is_translated_post_type()` to `WP_Syntex\Polylang\Model\Taxonomies::is_translated()`. + * + * @param string|string[] $post_type Post type name or array of post type names. + * @return bool + */ + public function is_translated( $post_type ): bool { + if ( empty( array_filter( (array) $post_type ) ) ) { + return false; + } + + /** @phpstan-var non-empty-array|non-empty-string $post_type */ + return $this->translated_object->is_translated_object_type( $post_type ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Taxonomies.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Taxonomies.php new file mode 100644 index 0000000..a882363 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Model/Taxonomies.php @@ -0,0 +1,135 @@ +translated_object = $translated_object; + } + + /** + * Returns taxonomies that need to be translated. + * The taxonomies list is cached for better better performance. + * The method waits for 'after_setup_theme' to apply the cache + * to allow themes adding the filter in functions.php. + * + * @since 1.2 + * @since 3.7 Moved from `PLL_Model::get_translated_taxonomies()` to `WP_Syntex\Polylang\Model\Taxonomies::get_translated()`. + * + * @param bool $filter True if we should return only valid registered taxonomies. + * @return string[] Array of registered taxonomy names for which Polylang manages languages and translations. + */ + public function get_translated( $filter = true ): array { + return $this->translated_object->get_translated_object_types( $filter ); + } + + /** + * Returns true if Polylang manages languages and translations for this taxonomy. + * + * @since 1.2 + * @since 3.7 Moved from `PLL_Model::is_translated_taxonomy()` to `WP_Syntex\Polylang\Model\Taxonomies::is_translated()`. + * + * @param string|string[] $tax Taxonomy name or array of taxonomy names. + * @return bool + */ + public function is_translated( $tax ): bool { + if ( empty( array_filter( (array) $tax ) ) ) { + return false; + } + + return $this->translated_object->is_translated_object_type( $tax ); + } + + /** + * Return taxonomies that need to be filtered (post_format like). + * + * @since 1.7 + * @since 3.7 Moved from `PLL_Model::get_filtered_taxonomies()` to `WP_Syntex\Polylang\Model\Taxonomies::get_filtered()`. + * + * @param bool $filter True if we should return only valid registered taxonomies. + * @return string[] Array of registered taxonomy names. + */ + public function get_filtered( $filter = true ): array { + if ( did_action( 'after_setup_theme' ) ) { + static $taxonomies = null; + } + + if ( empty( $taxonomies ) ) { + $taxonomies = array( 'post_format' => 'post_format' ); + + /** + * Filters the list of taxonomies not translatable but filtered by language. + * Includes only the post format by default + * The filter must be added soon in the WordPress loading process: + * in a function hooked to ‘plugins_loaded’ or directly in functions.php for themes. + * + * @since 1.7 + * + * @param string[] $taxonomies List of taxonomy names. + * @param bool $is_settings True when displaying the list of custom taxonomies in Polylang settings. + */ + $taxonomies = apply_filters( 'pll_filtered_taxonomies', $taxonomies, false ); + } + + return $filter ? array_intersect( $taxonomies, get_taxonomies() ) : $taxonomies; + } + + /** + * Returns true if Polylang filters this taxonomy per language. + * + * @since 1.7 + * @since 3.7 Moved from `PLL_Model::is_filtered_taxonomy()` to `WP_Syntex\Polylang\Model\Taxonomies::is_filtered()`. + * + * @param string|string[] $tax Taxonomy name or array of taxonomy names. + * @return bool + */ + public function is_filtered( $tax ): bool { + $taxonomies = $this->get_filtered( false ); + return ( is_array( $tax ) && array_intersect( $tax, $taxonomies ) ) || in_array( $tax, $taxonomies ); + } + + /** + * Returns the query vars of all filtered taxonomies. + * + * @since 1.7 + * @since 3.7 Moved from `PLL_Model::get_filtered_taxonomies_query_vars()` to `WP_Syntex\Polylang\Model\Taxonomies::get_filtered_query_vars()`. + * + * @return string[] + */ + public function get_filtered_query_vars(): array { + $query_vars = array(); + foreach ( $this->get_filtered() as $filtered_tax ) { + $tax = get_taxonomy( $filtered_tax ); + if ( ! empty( $tax ) && is_string( $tax->query_var ) ) { + $query_vars[] = $tax->query_var; + } + } + return $query_vars; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Abstract_Option.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Abstract_Option.php new file mode 100644 index 0000000..b9e0dc1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Abstract_Option.php @@ -0,0 +1,338 @@ +errors = new WP_Error(); + + if ( ! isset( $value ) ) { + $this->value = $this->get_default(); + return; + } + + $value = rest_sanitize_value_from_schema( $this->prepare( $value ), $this->get_data_structure(), static::key() ); + + if ( ! is_wp_error( $value ) ) { + $this->value = $value; + } else { + $this->value = $this->get_default(); + } + } + + /** + * Returns option key. + * + * @since 3.7 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + abstract public static function key(): string; + + /** + * Sets option's value if valid, does nothing otherwise. + * + * @since 3.7 + * + * @param mixed $value Value to set. + * @param Options $options All options. + * @return bool True if the value has been assigned. False in case of errors. + */ + public function set( $value, Options $options ): bool { + $this->errors = new WP_Error(); // Reset errors. + $value = $this->prepare( $value ); + $is_valid = rest_validate_value_from_schema( $value, $this->get_data_structure(), static::key() ); + + if ( is_wp_error( $is_valid ) ) { + // Blocking validation error. + $this->errors->merge_from( $is_valid ); + return false; + } + + $value = $this->sanitize( $value, $options ); + + if ( is_wp_error( $value ) ) { + // Blocking sanitization error. + $this->errors->merge_from( $value ); + return false; + } + + $this->value = $value; + return true; + } + + /** + * Returns option's value. + * + * @since 3.7 + * + * @return mixed + */ + public function get() { + return $this->value; + } + + /** + * Sets default option value. + * + * @since 3.7 + * + * @return mixed The new value. + */ + public function reset() { + $this->value = $this->get_default(); + return $this->value; + } + + /** + * Returns JSON schema of the option. + * + * @since 3.7 + * + * @return array The schema. + * + * @phpstan-return Schema + */ + public function get_schema(): array { + if ( is_array( $this->schema ) ) { + return $this->schema; + } + + $this->schema = array_merge( + array( + 'description' => $this->get_description(), + 'default' => $this->get_default(), + ), + $this->get_data_structure() + ); + + return $this->schema; + } + + /** + * Returns non-blocking sanitization errors. + * + * @since 3.7 + * + * @return WP_Error + */ + public function get_errors(): WP_Error { + return $this->errors; + } + + /** + * Prepares a value before validation. + * + * @since 3.7 + * + * @param mixed $value Value to format. + * @return mixed + */ + protected function prepare( $value ) { + return $value; + } + + /** + * Sanitizes option's value, can be overridden for specific cases not handled by `rest_sanitize_value_from_schema()`. + * Can populate the `$errors` property with blocking and non-blocking errors: in case of non-blocking errors, + * the value is sanitized and can be stored. + * + * @since 3.7 + * + * @param mixed $value Value to sanitize. + * @param Options $options All options. + * @return mixed The sanitized value. An instance of `WP_Error` in case of blocking error. + */ + protected function sanitize( $value, Options $options ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return rest_sanitize_value_from_schema( $value, $this->get_data_structure(), static::key() ); + } + + /** + * Returns the default value. + * + * @since 3.7 + * + * @return mixed + */ + abstract protected function get_default(); + + /** + * Returns the JSON schema part specific to this option. + * + * @since 3.7 + * + * @return array Partial schema. + * + * @phpstan-return array{type: SchemaType} + */ + abstract protected function get_data_structure(): array; + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + abstract protected function get_description(): string; + + /** + * Returns a list of language terms. + * + * @since 3.7 + * + * @return array + * + * @phpstan-return list + */ + protected function get_language_terms(): array { + $language_terms = get_terms( + array( + 'taxonomy' => 'language', + 'hide_empty' => false, + ) + ); + return is_array( $language_terms ) ? $language_terms : array(); + } + + /** + * Adds a non-blocking error warning about unknown language slugs. + * + * @since 3.7 + * + * @param array $language_slugs List of language slugs. + * @return void + */ + protected function add_unknown_languages_warning( array $language_slugs ): void { + if ( 1 === count( $language_slugs ) ) { + /* translators: %s is a language slug. */ + $message = __( 'The language %s is unknown and has been discarded.', 'polylang' ); + } else { + /* translators: %s is a list of language slugs. */ + $message = __( 'The languages %s are unknown and have been discarded.', 'polylang' ); + } + + $this->errors->add( + sprintf( 'pll_unknown_%s_languages', static::key() ), + sprintf( + $message, + wp_sprintf_l( + '%l', + array_map( + function ( $slug ) { + return "{$slug}"; + }, + $language_slugs + ) + ) + ), + 'warning' + ); + } + + /** + * Adds information to the site health info array. + * Does nothing by default. + * + * @since 3.8 + * + * @param Options $options An instance of the Options class providing additional configuration. + * + * @return array The updated site health information. + */ + public function get_site_health_info( Options $options ): array { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return array(); + } + + /** + * Renders site health information by appending additional fields. + * + * @since 3.8 + * + * @param mixed $value The value to be added to the site health fields. + * + * @return array Updated array of site health information including the new fields. + */ + protected function format_single_value_for_site_health_info( $value ): array { + if ( empty( $value ) ) { + return array(); + } + + return array( + 'label' => ucfirst( static::key() ), + 'value' => $value, + ); + } + + /** + * Formats an array to display in options information. + * + * @since 3.8 + * + * @param array $array An array of formatted data. + * @return string + */ + protected function format_array_for_site_health_info( array $array ): string { + array_walk( + $array, + function ( &$value, $key ) { + $value = "$key => $value"; + } + ); + + return '[' . implode( ', ', $array ) . ']'; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Abstract_Object_Types.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Abstract_Object_Types.php new file mode 100644 index 0000000..f0fa9e9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Abstract_Object_Types.php @@ -0,0 +1,54 @@ +|WP_Error + */ + protected function sanitize( $value, Options $options ) { + $value = parent::sanitize( $value, $options ); + + if ( is_wp_error( $value ) ) { + // Blocking sanitization error. + return $value; + } + + /** @var array $value */ + return array_values( array_intersect( $value, $this->get_object_types() ) ); + } + + /** + * Returns non-core object types. + * + * @since 3.7 + * + * @return string[] Object type names list. + * + * @phpstan-return array + */ + abstract protected function get_object_types(): array; +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Browser.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Browser.php new file mode 100644 index 0000000..dfe2704 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Browser.php @@ -0,0 +1,90 @@ +get() ) { + $value = '0: ' . __( 'Detect browser language deactivated', 'polylang' ); + } else { + $value = '1: ' . __( 'Detect browser language activated', 'polylang' ); + } + + return $this->format_single_value_for_site_health_info( $value ); + } + + /** + * Sanitizes option's value. + * Can populate the `$errors` property with blocking and non-blocking errors: in case of non-blocking errors, + * the value is sanitized and can be stored. + * + * @since 3.7 + * + * @param bool $value Value to sanitize. + * @param Options $options All options. + * @return bool|WP_Error The sanitized value. An instance of `WP_Error` in case of blocking error. + */ + protected function sanitize( $value, Options $options ) { + if ( 3 === $options->get( 'force_lang' ) && ! class_exists( 'PLL_Xdata_Domain', true ) ) { + // Cannot share cookies between domains without Polylang Pro. + return false; + } + + /** @var bool|WP_Error */ + $value = parent::sanitize( $value, $options ); + return $value; + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return sprintf( + /* translators: %1$s and %2$s are "true/false" values. */ + __( 'Detect preferred browser language on front page: %1$s to detect, %2$s to not detect.', 'polylang' ), + '`true`', + '`false`' + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Default_Lang.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Default_Lang.php new file mode 100644 index 0000000..2585696 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Default_Lang.php @@ -0,0 +1,86 @@ + + */ +class Domains extends Abstract_Map { + /** + * Returns option key. + * + * @since 3.7 + * + * @return string + * + * @phpstan-return 'domains' + */ + public static function key(): string { + return 'domains'; + } + + /** + * Returns the default value. + * + * @since 3.7 + * + * @return array + */ + protected function get_default() { + return array(); + } + + /** + * Returns the JSON schema part specific to the inner structure of this option. + * + * @since 3.8 + * + * @return array Inner structure. + */ + protected function get_inner_structure(): array { + return array( + 'patternProperties' => array( + Languages::SLUG_PATTERN => array( // Language slug as key. + 'type' => 'string', + 'format' => 'uri', + ), + ), + 'additionalProperties' => false, + ); + } + + /** + * Sanitizes option's value. + * Can populate the `$errors` property with blocking and non-blocking errors: in case of non-blocking errors, + * the value is sanitized and can be stored. + * + * @since 3.7 + * + * @param array $value Value to sanitize. + * @param Options $options All options. + * @return array|WP_Error The sanitized value. An instance of `WP_Error` in case of blocking error. + * + * @phpstan-return DomainsValue|WP_Error + */ + protected function sanitize( $value, Options $options ) { + // Sanitize new URLs. + $value = parent::sanitize( $value, $options ); + + if ( is_wp_error( $value ) ) { + // Blocking error. + return $value; + } + + /** @phpstan-var DomainsValue */ + $current_value = $this->get(); + /** @phpstan-var DomainsValue $value */ + $all_values = array(); // Previous and new values. + $missing_langs = array(); // Lang names corresponding to the empty values. + $language_terms = $this->get_language_terms(); + + // Detect empty values, fill missing keys with previous values. + foreach ( $language_terms as $lang ) { + if ( array_key_exists( $lang->slug, $value ) ) { + // Use the new value. + $all_values[ $lang->slug ] = $value[ $lang->slug ]; + unset( $value[ $lang->slug ] ); + } else { + // Use previous value. + $all_values[ $lang->slug ] = $current_value[ $lang->slug ] ?? ''; + } + + if ( empty( $all_values[ $lang->slug ] ) ) { + // The value is empty. + $missing_langs[] = $lang->name; + } + } + + // Detect invalid language slugs. + if ( ! empty( $value ) ) { + // Non-blocking error. + $this->add_unknown_languages_warning( array_keys( $value ) ); + } + + if ( 3 === $options->get( 'force_lang' ) && ! empty( $missing_langs ) ) { + // Non-blocking error. + if ( 1 === count( $missing_langs ) ) { + /* translators: %s is a native language name. */ + $message = __( 'Please enter a valid URL for %s.', 'polylang' ); + } else { + /* translators: %s is a list of native language names. */ + $message = __( 'Please enter valid URLs for %s.', 'polylang' ); + } + + $this->errors->add( + 'pll_empty_domains', + sprintf( $message, wp_sprintf_l( '%l', $missing_langs ) ), + 'warning' + ); + } + + // Ping all URLs to make sure they are valid. + if ( $options->get( 'force_lang' ) > 1 ) { + $failed_urls = array(); + + foreach ( array_filter( $all_values ) as $url ) { + $url = add_query_arg( 'deactivate-polylang', 1, $url ); + // Don't redefine vip_safe_wp_remote_get() as it has not the same signature as wp_remote_get(). + $response = function_exists( 'vip_safe_wp_remote_get' ) ? vip_safe_wp_remote_get( $url ) : wp_remote_get( $url ); + + if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { + $failed_urls[] = $url; + } + } + + if ( ! empty( $failed_urls ) ) { + // Non-blocking error. + if ( 1 === count( $failed_urls ) ) { + /* translators: %s is a URL. */ + $message = __( 'Polylang was unable to access the %s URL. Please check that the URL is valid.', 'polylang' ); + } else { + /* translators: %s is a list of URLs. */ + $message = __( 'Polylang was unable to access the %s URLs. Please check that the URLs are valid.', 'polylang' ); + } + $this->errors->add( + 'pll_invalid_domains', + sprintf( $message, wp_sprintf_l( '%l', $failed_urls ) ), + 'warning' + ); + } + } + + /** @phpstan-var DomainsValue */ + return $all_values; + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'Domains used when the language is set from different domains.', 'polylang' ); + } + + /** + * Adds information to the site health info array. + * + * @since 3.8 + * + * @param Options $options An instance of the Options class providing additional configuration. + * + * @return array The updated site health information. + */ + public function get_site_health_info( Options $options ): array { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + if ( 3 === $options->get( 'force_lang' ) ) { + return $this->format_single_value_for_site_health_info( $this->get() ); + } + + return parent::get_site_health_info( $options ); + } + + /** + * Returns the reset value for a key. + * + * @since 3.8 + * + * @param string $key The key to reset. Unused. + * @return mixed The reset value. + */ + protected function reset_value( string $key ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return ''; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/First_Activation.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/First_Activation.php new file mode 100644 index 0000000..454eed5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/First_Activation.php @@ -0,0 +1,86 @@ + + */ + protected function get_default() { + return time(); + } + + /** + * Returns the JSON schema part specific to this option. + * + * @since 3.7 + * + * @return array Partial schema. + * + * @phpstan-return array{type: 'integer', minimum: 0, maximum: int<0, max>, readonly: true} + */ + protected function get_data_structure(): array { + return array( + 'type' => 'integer', + 'minimum' => 0, + 'maximum' => PHP_INT_MAX, + 'readonly' => true, + ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'Time of first activation of Polylang.', 'polylang' ); + } + + /** + * Adds information to the site health info array. + * + * @since 3.8 + * + * @param Options $options An instance of the Options class providing additional configuration. + * + * @return array The updated site health information. + */ + public function get_site_health_info( Options $options ): array { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return $this->format_single_value_for_site_health_info( wp_date( get_option( 'date_format' ), $this->get() ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Force_Lang.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Force_Lang.php new file mode 100644 index 0000000..9882903 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Force_Lang.php @@ -0,0 +1,99 @@ +get() ) { + case '0': + $value = '0: ' . __( 'The language is set from content', 'polylang' ); + break; + case '1': + $value = '1: ' . __( 'The language is set from the directory name in pretty permalinks', 'polylang' ); + break; + case '2': + $value = '2: ' . __( 'The language is set from the subdomain name in pretty permalinks', 'polylang' ); + break; + case '3': + $value = '3: ' . __( 'The language is set from different domains', 'polylang' ); + break; + default: + $value = ''; + break; + } + + return $this->format_single_value_for_site_health_info( $value ); + } + /** + * Returns the default value. + * + * @since 3.7 + * + * @return int + */ + protected function get_default() { + return 1; + } + + /** + * Returns the JSON schema part specific to this option. + * + * @since 3.7 + * + * @return array Partial schema. + * + * @phpstan-return array{type: 'integer', enum: list<0|1|2|3>|list<1|2|3>} + */ + protected function get_data_structure(): array { + return array( + 'type' => 'integer', + 'enum' => 'yes' === get_option( 'pll_language_from_content_available' ) ? array( 0, 1, 2, 3 ) : array( 1, 2, 3 ), + ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'Determine how the current language is defined.', 'polylang' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Hide_Default.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Hide_Default.php new file mode 100644 index 0000000..599db04 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Hide_Default.php @@ -0,0 +1,98 @@ +get() ) { + $value = '1: ' . __( 'Hide URL language information for default language', 'polylang' ); + } else { + $value = '0: ' . __( 'Display URL language information for default language', 'polylang' ); + } + + return $this->format_single_value_for_site_health_info( $value ); + } + /** + * Returns the default value. + * + * @since 3.7 + * + * @return bool + */ + protected function get_default() { + return true; + } + + /** + * Sanitizes option's value. + * Can populate the `$errors` property with blocking and non-blocking errors: in case of non-blocking errors, + * the value is sanitized and can be stored. + * + * @since 3.7 + * + * @param bool $value Value to sanitize. + * @param Options $options All options. + * @return bool|WP_Error The sanitized value. An instance of `WP_Error` in case of blocking error. + */ + protected function sanitize( $value, Options $options ) { + if ( 3 === $options->get( 'force_lang' ) ) { + return false; + } + + /** @var bool|WP_Error */ + return parent::sanitize( $value, $options ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return sprintf( + /* translators: %1$s and %2$s are "true/false" values. */ + __( 'Remove the language code in URL for the default language: %1$s to hide, %2$s to display.', 'polylang' ), + '`true`', + '`false`' + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Media_Support.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Media_Support.php new file mode 100644 index 0000000..ecc931c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Media_Support.php @@ -0,0 +1,67 @@ +get() ) { + $value = '1: ' . __( 'The media are translated', 'polylang' ); + } else { + $value = '0: ' . __( 'The media are not translated', 'polylang' ); + } + + return $this->format_single_value_for_site_health_info( $value ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return sprintf( + /* translators: %1$s and %2$s are "true/false" values. */ + __( 'Translate media: %1$s to translate, %2$s otherwise.', 'polylang' ), + '`true`', + '`false`' + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Nav_Menus.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Nav_Menus.php new file mode 100644 index 0000000..dddb0b2 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Nav_Menus.php @@ -0,0 +1,188 @@ +> + * > + * > + */ +class Nav_Menus extends Abstract_Option { + /** + * Returns option key. + * + * @since 3.7 + * + * @return string + * + * @phpstan-return 'nav_menus' + */ + public static function key(): string { + return 'nav_menus'; + } + + /** + * Adds information to the site health info array. + * + * @since 3.8 + * + * @param Options $options An instance of the Options class providing additional configuration. + * + * @return array The updated site health information. + */ + public function get_site_health_info( Options $options ): array { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $current_theme = get_stylesheet(); + /** @phpstan-var NavMenusValue $nav_menus */ + $nav_menus = $this->get(); + if ( empty( $nav_menus[ $current_theme ] ) ) { + return array(); + } + + $parts = array(); + foreach ( $nav_menus[ $current_theme ] as $location => $lang ) { + if ( empty( $lang ) ) { + $parts[] = sprintf( '%1$s: %2$s', $location, __( 'Not used', 'polylang' ) ); + } else { + $parts[] = sprintf( + '%1$s: %2$s', + $location, + $this->format_array_for_site_health_info( $lang ) + ); + } + } + + return $this->format_single_value_for_site_health_info( implode( ' | ', $parts ) ); + } + + /** + * Returns the default value. + * + * @since 3.7 + * + * @return array + */ + protected function get_default() { + return array(); + } + + /** + * Returns the JSON schema part specific to this option. + * + * @since 3.7 + * + * @return array Partial schema. + */ + protected function get_data_structure(): array { + return array( + 'type' => 'object', // Correspond to associative array in PHP, @see{https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/#primitive-types}. + 'patternProperties' => array( + '[^\/:<>\*\?"\|]+' => array( // Excludes invalid directory name characters @see https://developer.wordpress.org/reference/classes/wp_rest_themes_controller/register_routes/ + 'type' => 'object', + 'patternProperties' => array( + '[\w-]+' => array( // Accepted characters for menu locations @see https://developer.wordpress.org/reference/classes/wp_rest_menu_locations_controller/register_routes/ + 'type' => 'object', + 'patternProperties' => array( + Languages::SLUG_PATTERN => array( // Language slug as key. + 'type' => 'integer', + 'minimum' => 0, // A post ID. + ), + ), + 'additionalProperties' => false, + ), + ), + 'additionalProperties' => false, + ), + ), + 'additionalProperties' => false, + ); + } + + /** + * Sanitizes option's value. + * Can populate the `$errors` property with blocking and non-blocking errors: in case of non-blocking errors, + * the value is sanitized and can be stored. + * + * @since 3.7 + * + * @param array $value Value to sanitize. + * @param Options $options All options. + * @return array|WP_Error The sanitized value. An instance of `WP_Error` in case of blocking error. + * + * @phpstan-return NavMenusValue|WP_Error + */ + protected function sanitize( $value, Options $options ) { + // Sanitize new value. + $value = parent::sanitize( $value, $options ); + + if ( is_wp_error( $value ) ) { + // Blocking error. + return $value; + } + + /** @phpstan-var NavMenusValue $value */ + if ( empty( $value ) ) { + // Nothing to validate. + return $value; + } + + $all_langs = array(); + $language_terms = wp_list_pluck( $this->get_language_terms(), 'slug' ); + + foreach ( $value as $theme_slug => $menu_ids_by_location ) { + foreach ( $menu_ids_by_location as $location => $menu_ids ) { + // Make sure the language slugs correspond to an existing language. + $value[ $theme_slug ][ $location ] = array(); + + foreach ( $language_terms as $lang_slug ) { + if ( ! empty( $menu_ids[ $lang_slug ] ) ) { + $value[ $theme_slug ][ $location ][ $lang_slug ] = $menu_ids[ $lang_slug ]; + } + } + + // Detect unknown languages. + $all_langs = array_merge( $all_langs, $menu_ids ); + } + } + + /** @phpstan-var NavMenusValue $value */ + $unknown_langs = array_diff_key( $all_langs, array_flip( $language_terms ) ); + + // Detect invalid language slugs. + if ( ! empty( $unknown_langs ) ) { + // Non-blocking error. + $this->add_unknown_languages_warning( array_keys( $unknown_langs ) ); + } + + return $value; + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'Translated navigation menus for each theme.', 'polylang' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Post_Types.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Post_Types.php new file mode 100644 index 0000000..fa59783 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Post_Types.php @@ -0,0 +1,53 @@ + + */ + protected function get_object_types(): array { + /** @phpstan-var array */ + return get_post_types( array( '_builtin' => false ) ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'List of post types to translate.', 'polylang' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Previous_Version.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Previous_Version.php new file mode 100644 index 0000000..1711038 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Previous_Version.php @@ -0,0 +1,57 @@ +get() ) { + return $this->format_single_value_for_site_health_info( __( 'This is the first activation', 'polylang' ) ); + } + return parent::get_site_health_info( $options ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Redirect_Lang.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Redirect_Lang.php new file mode 100644 index 0000000..8ca9db3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Redirect_Lang.php @@ -0,0 +1,67 @@ +get() ) { + $value = '1: ' . __( 'The front page URL contains the language code instead of the page name or page id', 'polylang' ); + } else { + $value = '0: ' . __( 'The front page URL contains the page name or page id instead of the language code', 'polylang' ); + } + + return $this->format_single_value_for_site_health_info( $value ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return sprintf( + /* translators: %1$s and %2$s are "true/false" values. */ + __( 'Remove the page name or page ID from the URL of the front page: %1$s to remove, %2$s to keep.', 'polylang' ), + '`true`', + '`false`' + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Rewrite.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Rewrite.php new file mode 100644 index 0000000..d3cdc51 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Rewrite.php @@ -0,0 +1,86 @@ +get() ) { + $value = '1: ' . sprintf( + /* translators: %s is a URL slug: `/language/`. */ + __( 'Remove %s in pretty permalinks', 'polylang' ), + '`/language/`' + ); + } else { + $value = '0: ' . sprintf( + /* translators: %s is a URL slug: `/language/`. */ + __( 'Keep %s in pretty permalinks', 'polylang' ), + '`/language/`' + ); + } + + return $this->format_single_value_for_site_health_info( $value ); + } + /** + * Returns the default value. + * + * @since 3.7 + * + * @return bool + */ + protected function get_default() { + return true; + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return sprintf( + /* translators: %1$s is a URL slug: `/language/`. %2$s and %3$s are "true/false" values. */ + __( 'Remove %1$s in pretty permalinks: %2$s to remove, %3$s to keep.', 'polylang' ), + '`/language/`', + '`true`', + '`false`' + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Sync.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Sync.php new file mode 100644 index 0000000..f566947 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Sync.php @@ -0,0 +1,89 @@ +get() ) ) { + $value = '0: ' . __( 'Synchronization disabled', 'polylang' ); + } else { + $value = implode( ', ', $this->get() ); + } + + return $this->format_single_value_for_site_health_info( $value ); + } + + /** + * Returns the JSON schema part specific to this option. + * + * @since 3.7 + * + * @return array Partial schema. + * + * @phpstan-return array{type: 'array', items: array{type: SchemaType, enum: non-empty-list}} + */ + protected function get_data_structure(): array { + $GLOBALS['l10n']['polylang'] = new NOOP_Translations(); // Prevents loading the translations too early. + $enum = array_keys( PLL_Settings_Sync::list_metas_to_sync() ); + unset( $GLOBALS['l10n']['polylang'] ); + + return array( + 'type' => 'array', + 'items' => array( + 'type' => $this->get_type(), + 'enum' => $enum, + ), + ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'List of data to synchronize.', 'polylang' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Taxonomies.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Taxonomies.php new file mode 100644 index 0000000..9b1681f --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Taxonomies.php @@ -0,0 +1,54 @@ + + */ + protected function get_object_types(): array { + $public_taxonomies = get_taxonomies( array( '_builtin' => false ) ); + /** @phpstan-var array */ + return array_diff( $public_taxonomies, get_taxonomies( array( '_pll' => true ) ) ); + } + + /** + * Returns the description used in the JSON schema. + * + * @since 3.7 + * + * @return string + */ + protected function get_description(): string { + return __( 'List of taxonomies to translate.', 'polylang' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Version.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Version.php new file mode 100644 index 0000000..4fb43b6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Business/Version.php @@ -0,0 +1,54 @@ + true ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Inactive_Option.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Inactive_Option.php new file mode 100644 index 0000000..e1f9066 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Inactive_Option.php @@ -0,0 +1,139 @@ +option = $option; + $this->errors = new WP_Error(); + + // Make sure the option doesn't contain any value. + $this->option->reset(); + } + + /** + * Returns option key. + * + * @since 3.8 + * + * @return string + * + * @phpstan-return non-falsy-string + */ + public static function key(): string { + return self::$key; + } + + /** + * Does nothing except adding an error. + * + * @since 3.8 + * + * @param mixed $value Value to set. + * @param Options $options All options. + * @return bool True if the value has been assigned. False in case of errors. + */ + public function set( $value, Options $options ): bool { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + if ( ! in_array( self::ERROR_CODE, $this->errors->get_error_codes(), true ) ) { + $this->errors->add( + self::ERROR_CODE, + /* translators: %s is a blog ID. */ + sprintf( __( 'Polylang is not active on site %s.', 'polylang' ), (int) get_current_blog_id() ) + ); + } + return false; + } + + /** + * Returns the value of the option, usually the default value for inactive options. + * + * @since 3.8 + * + * @return mixed + */ + public function get() { + return $this->option->get(); + } + + /** + * Returns an empty schema. + * + * @since 3.8 + * + * @return array The schema. + */ + public function get_schema(): array { + return array(); + } + + /** + * Returns the default value. + * + * @since 3.8 + * + * @return mixed + */ + protected function get_default() { + return $this->option->get(); + } + + /** + * Not used but required by `Abstract_Option`. + * + * @since 3.8 + * + * @return array Partial schema. + */ + protected function get_data_structure(): array { + return array(); + } + + /** + * Not used but required by `Abstract_Option`. + * + * @since 3.8 + * + * @return string + */ + protected function get_description(): string { + return ''; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Options.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Options.php new file mode 100644 index 0000000..b4a2a4d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Options.php @@ -0,0 +1,740 @@ + + * @implements IteratorAggregate + * + * @phpstan-import-type Schema from Abstract_Option as OptionSchema + * @phpstan-type Schema array{ + * '$schema': non-falsy-string, + * title: non-falsy-string, + * description: string, + * type: 'object', + * properties: array, + * additionalProperties: false + * } + */ +class Options implements ArrayAccess, IteratorAggregate { + public const OPTION_NAME = 'polylang'; + + /** + * Polylang's options, by blog ID. + * Raw value if option is not registered yet, `Abstract_Option` instance otherwise. + * + * @var Abstract_Option[][]|mixed[][] + * @phpstan-var array> + */ + private $options = array(); + + /** + * Tells if the options have been modified, by blog ID. + * + * @var bool[] + * @phpstan-var array + */ + private $modified = array(); + + /** + * The original blog ID. + * + * @var int + */ + private $blog_id; + + /** + * The current blog ID. + * + * @var int + */ + private $current_blog_id; + + /** + * Map of memoized values of blog IDs to tell if Polylang is active. + * + * @var bool[] + * @phpstan-var array + */ + private $is_plugin_active = array(); + + /** + * Cached options JSON schema by blog ID. + * + * @var array[]|null + * @phpstan-var array|null + */ + private $schema; + + /** + * Constructor. + * + * @since 3.7 + */ + public function __construct() { + // Keep track of the blog ID. + $this->blog_id = (int) get_current_blog_id(); + $this->current_blog_id = $this->blog_id; + $this->is_plugin_active = array( $this->blog_id => true ); + + // Handle options. + $this->init_options_for_current_blog(); + + add_filter( 'pre_update_option_polylang', array( $this, 'protect_wp_option_storage' ), 1 ); + add_action( 'switch_blog', array( $this, 'on_blog_switch' ), -1000 ); // Options must be ready early. + add_action( 'shutdown', array( $this, 'save_all' ), 1000 ); // Make sure to save options after everything. + } + + /** + * Registers an option. + * Options must be registered in the right order: some options depend on other options' value. + * + * @since 3.7 + * + * @param string $class_name Option class to register. + * @return self + * + * @phpstan-param class-string $class_name + */ + public function register( string $class_name ): self { + $key = $class_name::key(); + + if ( ! array_key_exists( $key, $this->options[ $this->current_blog_id ] ) ) { + // Option raw value doesn't exist in database, use default instead. + $this->options[ $this->current_blog_id ][ $key ] = $this->maybe_make_option_inactive( + new $class_name() + ); + return $this; + } + + // If option exists in database, use this value. + if ( $this->options[ $this->current_blog_id ][ $key ] instanceof Abstract_Option ) { + // Already registered, do nothing. + $this->options[ $this->current_blog_id ][ $key ] = $this->maybe_make_option_inactive( + $this->options[ $this->current_blog_id ][ $key ] + ); + return $this; + } + + // Option raw value exists in database, use it. + $this->options[ $this->current_blog_id ][ $key ] = $this->maybe_make_option_inactive( + new $class_name( $this->options[ $this->current_blog_id ][ $key ] ) + ); + + return $this; + } + + /** + * Prevents storing an instance of `Options` into the database. + * + * @since 3.7 + * + * @param array|Options $value The options to store. + * @return array + */ + public function protect_wp_option_storage( $value ) { + if ( $value instanceof self ) { + return $value->get_all(); + } + return $value; + } + + /** + * Initializes options for the newly switched blog if applicable. + * + * @since 3.7 + * + * @param int $blog_id The blog ID. + * @return void + */ + public function on_blog_switch( $blog_id ): void { + $this->current_blog_id = (int) $blog_id; + + if ( isset( $this->options[ $blog_id ] ) ) { + return; + } + + $this->init_options_for_current_blog(); + } + + /** + * Stores the options into the database for all blogs. + * Hooked to `shutdown`. + * + * @since 3.7 + * + * @return void + */ + public function save_all(): void { + // Find blog with modified options. + $modified = $this->get_modified(); + + if ( empty( $modified ) ) { + // Not modified. + return; + } + + remove_action( 'switch_blog', array( $this, 'on_blog_switch' ), -1000 ); + + // Handle the original blog first, maybe this will prevent the use of `switch_to_blog()`. + if ( isset( $modified[ $this->blog_id ] ) && $this->current_blog_id === $this->blog_id ) { + $this->save(); + unset( $modified[ $this->blog_id ] ); + + if ( empty( $modified ) ) { + // All done, no need of `switch_to_blog()`. + return; + } + } + + foreach ( $modified as $blog_id => $_yup ) { + switch_to_blog( $blog_id ); + $this->save(); + restore_current_blog(); + } + } + + /** + * Stores the options into the database. + * + * @since 3.7 + * + * @return bool True if the options were updated, false otherwise. + */ + public function save(): bool { + if ( empty( $this->modified[ $this->current_blog_id ] ) ) { + return false; + } + + unset( $this->modified[ $this->current_blog_id ] ); + + if ( is_multisite() && ! get_site( $this->current_blog_id ) ) { // Cached by `$this->get_modified()` if called from `$this->save_all()`. + // Deleted. Should not happen if called from `$this->save_all()`. + return false; + } + + $options = get_option( self::OPTION_NAME, array() ); + + if ( is_array( $options ) ) { + // Preserve options that are not from Polylang. + $options = array_merge( $options, $this->get_all() ); + } else { + $options = $this->get_all(); + } + + return update_option( self::OPTION_NAME, $options ); + } + + /** + * Returns all options. + * + * @since 3.7 + * + * @return mixed[] All options values. + */ + public function get_all(): array { + if ( empty( $this->options[ $this->current_blog_id ] ) ) { + // No options. + return array(); + } + + return array_map( + function ( $value ) { + return $value->get(); + }, + array_filter( + $this->options[ $this->current_blog_id ], + function ( $value ) { + return $value instanceof Abstract_Option; + } + ) + ); + } + + /** + * Merges a subset of options into the current blog ones. + * + * @since 3.7 + * + * @param array $values Array of raw options. + * @return WP_Error + */ + public function merge( array $values ): WP_Error { + $errors = new WP_Error(); + + foreach ( $this->options[ $this->current_blog_id ] as $key => $option ) { + if ( ! isset( $values[ $key ] ) || ! $this->has( $key ) ) { + continue; + } + + $option_errors = $this->set( $key, $values[ $key ] ); + + if ( $option_errors->has_errors() ) { + // Blocking and non-blocking errors. + $errors->merge_from( $option_errors ); + } + + unset( $values[ $key ] ); + } + + if ( empty( $values ) ) { + return $errors; + } + + // Merge all "unknown option" errors into a single error message. + if ( 1 === count( $values ) ) { + /* translators: %s is the name of an option. */ + $message = __( 'Unknown option key %s.', 'polylang' ); + } else { + /* translators: %s is a list of option names. */ + $message = __( 'Unknown option keys %s.', 'polylang' ); + } + + $errors->add( + 'pll_unknown_option_keys', + sprintf( + $message, + wp_sprintf_l( + '%l', + array_map( + function ( $value ) { + return "'$value'"; + }, + array_keys( $values ) + ) + ) + ) + ); + + return $errors; + } + + /** + * Returns JSON schema for all options of the current blog. + * + * @since 3.7 + * + * @return array The schema. + * + * @phpstan-return Schema + */ + public function get_schema(): array { + if ( isset( $this->schema[ $this->current_blog_id ] ) ) { + return $this->schema[ $this->current_blog_id ]; + } + + $properties = array(); + + if ( $this->is_plugin_active() ) { + foreach ( $this->options[ $this->current_blog_id ] as $option ) { + if ( ! $option instanceof Abstract_Option || empty( $option->get_schema() ) ) { + continue; + } + + $properties[ $option->key() ] = $option->get_schema(); + } + } + + $this->schema[ $this->current_blog_id ] = array( + '$schema' => 'http://json-schema.org/draft-04/schema#', + 'title' => static::OPTION_NAME, + 'description' => __( 'Polylang options', 'polylang' ), + 'type' => 'object', + 'properties' => $properties, + 'additionalProperties' => false, + ); + + return $this->schema[ $this->current_blog_id ]; + } + + /** + * Tells if an option exists. + * + * @since 3.7 + * + * @param string $key The name of the option to check for. + * @return bool + */ + public function has( string $key ): bool { + return isset( $this->options[ $this->current_blog_id ][ $key ] ) && $this->options[ $this->current_blog_id ][ $key ] instanceof Abstract_Option; + } + + /** + * Returns the value of the specified option. + * + * @since 3.7 + * + * @param string $key The name of the option to retrieve. + * @return mixed + */ + public function get( string $key ) { + if ( ! $this->has( $key ) ) { + $v = null; + return $v; + } + + /** @var Abstract_Option */ + $option = $this->options[ $this->current_blog_id ][ $key ]; + return $option->get(); + } + + /** + * Assigns a value to the specified option. + * + * This doesn't allow to set an unknown option. + * When doing multiple `set()`, options must be set in the right order: some options depend on other options' value. + * + * @since 3.7 + * + * @param string $key The name of the option to assign the value to. + * @param mixed $value The value to set. + * @return WP_Error + */ + public function set( string $key, $value ): WP_Error { + if ( ! $this->has( $key ) ) { + /* translators: %s is the name of an option. */ + return new WP_Error( 'pll_unknown_option_key', sprintf( __( 'Unknown option key %s.', 'polylang' ), "'$key'" ) ); + } + + /** @var Abstract_Option */ + $option = $this->options[ $this->current_blog_id ][ $key ]; + $old_value = $option->get(); + + if ( $option->set( $value, $this ) && $option->get() !== $old_value ) { + // No blocking errors: the value can be stored. + $this->modified[ $this->current_blog_id ] = true; + } + + // Return errors. + return $option->get_errors(); + } + + /** + * Resets an option to its default value. + * + * @since 3.7 + * + * @param string $key The name of the option to reset. + * @return mixed The new value. + */ + public function reset( string $key ) { + if ( ! $this->has( $key ) ) { + return null; + } + + /** @var Abstract_Option */ + $option = $this->options[ $this->current_blog_id ][ $key ]; + + if ( $option->get() !== $option->reset() ) { + $this->modified[ $this->current_blog_id ] = true; + } + + return $option->get(); + } + + /** + * Removes an option sub value from its array. + * + * @since 3.8 + * + * @param string $key The name of the option to splice. + * @param mixed $value The value to remove. + * @return WP_Error An error object, empty if the value was removed successfully. + */ + public function remove( string $key, $value ): WP_Error { + if ( ! $this->has( $key ) ) { + return new WP_Error( + 'pll_unknown_option_key', + /* translators: %s is the name of an option. */ + sprintf( __( 'Unknown option key %s.', 'polylang' ), "'$key'" ) + ); + } + + $option = $this->options[ $this->current_blog_id ][ $key ]; + + if ( ! $option instanceof Abstract_List && ! $option instanceof Abstract_Map ) { + return new WP_Error( + 'pll_invalid_option_type', + /* translators: %s is the name of an option. */ + sprintf( __( 'Option %s is not a list or map.', 'polylang' ), "'$key'" ) + ); + } + + if ( $option->remove( $value ) ) { + $this->modified[ $this->current_blog_id ] = true; + return new WP_Error(); + } + + return new WP_Error( + 'pll_remove_failed', + /* translators: %1$s is the value to remove. %2$s is the name of an option. */ + sprintf( __( 'Failed to remove %1$s from %2$s.', 'polylang' ), print_r( $value, true ), "'$key'" ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r + ); + } + + + /** + * Adds a value to an option. + * + * @since 3.8 + * + * @param string $key The name of the option to add the value to. + * @param mixed $value The value to add. + * @return WP_Error An error object, empty if the value was added successfully. + */ + public function add( string $key, $value ): WP_Error { + if ( ! $this->has( $key ) ) { + return new WP_Error( + 'pll_unknown_option_key', + /* translators: %s is the name of an option. */ + sprintf( __( 'Unknown option key %s.', 'polylang' ), "'$key'" ) + ); + } + + $option = $this->options[ $this->current_blog_id ][ $key ]; + + if ( ! $option instanceof Abstract_List && ! $option instanceof Abstract_Map ) { + return new WP_Error( + 'pll_invalid_option_type', + /* translators: %s is the name of an option. */ + sprintf( __( 'Option %s is not a list or map.', 'polylang' ), "'$key'" ) + ); + } + + if ( $option->add( $value, $this ) ) { + $this->modified[ $this->current_blog_id ] = true; + return new WP_Error(); + } + + return new WP_Error( + 'pll_add_failed', + /* translators: %1$s is the value to add. %2$s is the name of an option. */ + sprintf( __( 'Failed to add %1$s to %2$s.', 'polylang' ), print_r( $value, true ), "'$key'" ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r + ); + } + + /** + * Tells if an option exists. + * Required by interface `ArrayAccess`. + * + * @since 3.7 + * + * @param string $offset The name of the option to check for. + * @return bool + */ + public function offsetExists( $offset ): bool { + return $this->has( (string) $offset ); + } + + /** + * Returns the value of the specified option. + * Required by interface `ArrayAccess`. + * + * @since 3.7 + * + * @param string $offset The name of the option to retrieve. + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet( $offset ) { + return $this->get( (string) $offset ); + } + + /** + * Assigns a value to the specified option. + * This doesn't allow to set an unknown option. + * Required by interface `ArrayAccess`. + * + * @since 3.7 + * + * @param string $offset The name of the option to assign the value to. + * @param mixed $value The value to set. + * @return void + */ + public function offsetSet( $offset, $value ): void { + $this->set( (string) $offset, $value ); + } + + /** + * Resets an option. + * This doesn't allow to unset an option, this resets it to its default value instead. + * Required by interface `ArrayAccess`. + * + * @since 3.7 + * + * @param string $offset The name of the option to unset. + * @return void + */ + public function offsetUnset( $offset ): void { + $this->reset( (string) $offset ); + } + + /** + * Returns all current site's option values. + * Required by interface `IteratorAggregate`. + * + * @since 3.7 + * + * @return ArrayIterator + * + * @phpstan-return ArrayIterator + */ + public function getIterator(): ArrayIterator { + return new ArrayIterator( $this->get_all() ); + } + + /** + * Retrieves site health information based on the current blog's options. + * + * @since 3.8 + * + * @return array The site health information array. + */ + public function get_site_health_info(): array { + $infos = array(); + foreach ( $this->options[ $this->current_blog_id ] as $option ) { + if ( ! $option instanceof Abstract_Option ) { + continue; + } + + $info = $option->get_site_health_info( $this ); + + if ( ! empty( $info ) ) { + $infos[ $option::key() ] = $info; + } + } + + return $infos; + } + + /** + * Returns the list of modified sites. + * On multisite, sites are cached. + * /!\ At this point, some sites may have been deleted. They are removed from `$this->modified` here. + * + * @since 3.7 + * + * @return bool[] + * @phpstan-return array + */ + private function get_modified(): array { + if ( empty( $this->modified ) ) { + // Not modified. + return $this->modified; + } + + // Cleanup deleted sites and cache existing ones. + if ( ! is_multisite() ) { + // Not multisite: no need to cache or verify existence. + return $this->modified; + } + + // Fetch all the data instead of only the IDs, so it is cached. + $sites = get_sites( + array( + 'site__in' => array_keys( $this->modified ), + 'number' => count( $this->modified ), + ) + ); + + // Keep only existing blogs. + $this->modified = array(); + foreach ( $sites as $site ) { + $this->modified[ $site->id ] = true; + } + + return $this->modified; + } + + /** + * Initializes options for the current blog. + * + * @since 3.7 + * + * @return void + */ + private function init_options_for_current_blog(): void { + if ( ! $this->is_plugin_active() ) { + // Don't try to get the options from the DB. + $this->options[ $this->current_blog_id ] = array(); + } else { + $options = get_option( self::OPTION_NAME ); + + if ( empty( $options ) || ! is_array( $options ) ) { + $this->options[ $this->current_blog_id ] = array(); + $this->modified[ $this->current_blog_id ] = true; + } else { + $this->options[ $this->current_blog_id ] = $options; + } + } + + /** + * Fires after the options have been init for the current blog. + * This is the best place to register options. + * + * @since 3.7 + * @since 3.8 New parameter `$is_plugin_active`. + * + * @param Options $options Instance of the options. + * @param int $current_blog_id Current blog ID. + * @param bool $is_plugin_active True if Polylang is active on the current site, false otherwise. + * This can be false after calling `switch_to_blog()`. + */ + do_action( 'pll_init_options_for_blog', $this, $this->current_blog_id, $this->is_plugin_active() ); + } + + /** + * Tells if Polylang is active on the current blog. + * + * @since 3.8 + * + * @return bool + */ + private function is_plugin_active(): bool { + if ( isset( $this->is_plugin_active[ $this->current_blog_id ] ) ) { + return $this->is_plugin_active[ $this->current_blog_id ]; + } + + $this->is_plugin_active[ $this->current_blog_id ] = pll_is_plugin_active( POLYLANG_BASENAME ) || doing_action( 'activate_' . POLYLANG_BASENAME ); + + return $this->is_plugin_active[ $this->current_blog_id ]; + } + + /** + * Decorates options if we are on a site where Polylang is not active. + * + * @since 3.8 + * + * @param Abstract_Option $option The option to decorate. + * @return Abstract_Option + */ + private function maybe_make_option_inactive( Abstract_Option $option ): Abstract_Option { + if ( $this->is_plugin_active() || $option instanceof Inactive_Option ) { + return $option; + } + + return new Inactive_Option( $option ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_Boolean.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_Boolean.php new file mode 100644 index 0000000..34ba455 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_Boolean.php @@ -0,0 +1,44 @@ + 'boolean', + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_List.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_List.php new file mode 100644 index 0000000..e6db4dd --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_List.php @@ -0,0 +1,129 @@ + 'array', + 'items' => array( + 'type' => $this->get_type(), + ), + ); + } + + /** + * Removes an item from the list. + * + * @since 3.8 + * + * @param mixed $item The item to remove. + * @return bool True if the value has been removed. False otherwise. + */ + public function remove( $item ): bool { + if ( ! in_array( $item, $this->value, true ) ) { + return false; + } + + $this->value = array_diff( + $this->value, + array( $item ) + ); + + return true; + } + + /** + * Adds an item to the list. + * + * @since 3.8 + * + * @param mixed $item The item to add. + * @param Options $options The options instance. + * @return bool True if the value was added successfully. False otherwise. + */ + public function add( $item, Options $options ): bool { + /** @var array $updated_value */ + $updated_value = $this->get(); + $updated_value[] = $item; + + return $this->set( + $updated_value, + $options + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_Map.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_Map.php new file mode 100644 index 0000000..e87652c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_Map.php @@ -0,0 +1,105 @@ +get_inner_structure(), + array( + 'type' => 'object', // Correspond to associative array in PHP, @see{https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/#primitive-types}. + ) + ); + } + + /** + * Removes a key from the map. + * + * @since 3.8 + * + * @param string $key The key to remove. + * @return bool True if the key has been removed. False otherwise. + */ + public function remove( string $key ): bool { + if ( ! array_key_exists( $key, $this->value ) ) { + return false; + } + + $this->value[ $key ] = $this->reset_value( $key ); + + return true; + } + + /** + * Adds an item to the map. + * + * @since 3.8 + * + * @param array $item The item(s) to add. Must be a key-value pair. + * @param Options $options The options instance. + * @return bool True if the value was added successfully. False otherwise. + */ + public function add( $item, Options $options ): bool { + if ( ! is_array( $item ) ) { + return false; + } + + /** @var array $old_value */ + $old_value = $this->get(); + $updated_value = array_merge( + $old_value, + $item + ); + + return $this->set( + $updated_value, + $options + ); + } + + /** + * Returns the JSON schema part specific to the inner structure of this option. + * + * @since 3.8 + * + * @return array Partial schema. + */ + abstract protected function get_inner_structure(): array; + + /** + * Returns the reset value for a key. + * + * @since 3.8 + * + * @param string $key The key to reset. + * @return mixed The reset value. + */ + abstract protected function reset_value( string $key ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_String.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_String.php new file mode 100644 index 0000000..13c6899 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Primitive/Abstract_String.php @@ -0,0 +1,57 @@ + 'string', + ); + } + + /** + * Adds information to the site health info array. + * + * @since 3.8 + * + * @param Options $options An instance of the Options class providing additional configuration. + * + * @return array The updated site health information. + */ + public function get_site_health_info( Options $options ): array { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return $this->format_single_value_for_site_health_info( $this->get() ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Registry.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Registry.php new file mode 100644 index 0000000..71461be --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/Options/Registry.php @@ -0,0 +1,52 @@ +static_pages = new PLL_Admin_Static_Pages( $this ); + $this->model->set_languages_ready(); + } + + /** + * Setups filters and action needed on all admin pages and on plugins page + * Loads the settings pages or the filters base on the request + * + * @since 1.2 + */ + public function init() { + parent::init(); + + $this->notices = new PLL_Admin_Notices( $this ); + + $this->default_term = new PLL_Admin_Default_Term( $this ); + $this->default_term->add_hooks(); + + if ( ! $this->model->has_languages() ) { + return; + } + + $this->links = new PLL_Admin_Links( $this ); // FIXME needed here ? + $this->filters_links = new PLL_Filters_Links( $this ); // FIXME needed here ? + + // Filter admin language for users + // We must not call user info before WordPress defines user roles in wp-settings.php + add_action( 'setup_theme', array( $this, 'init_user' ) ); + add_filter( 'request', array( $this, 'request' ) ); + + // Adds the languages in admin bar + add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100 ); // 100 determines the position + } + + /** + * Adds links to Polylang's admin panels to the WordPress admin menu. + * + * @since 0.1 + * + * @return void + */ + public function add_menus(): void { + global $admin_page_hooks; + + $parent = ''; + $first_tab = ''; + + foreach ( $this->get_menu_items() as $tab => $title ) { + $page = self::get_screen_slug( $tab ); + $capa = $this->get_menu_capability( $tab ); + + if ( empty( $parent ) ) { + $parent = $page; + $first_tab = $tab; + + /* + * WP actually doesn't care about the user capability used here, as long as it has sub-menus: it will + * use the ones from the sub-menus. See `_wp_menu_output()`. + * Ex: a user with `manage_translations` will still be able to access the Translations page, even if the + * main menu has `manage_options`. + */ + add_menu_page( $title, __( 'Languages', 'polylang' ), $capa, $parent, '__return_null', 'dashicons-translation' ); + $admin_page_hooks[ $parent ] = self::SCREEN_PREFIX; // Hack to avoid the localization of the hook name. See: https://core.trac.wordpress.org/ticket/18857 + } + + add_submenu_page( $parent, $title, $title, $capa, $page, array( $this, 'languages_page' ) ); + } + + /* + * Get rid of the `toplevel` prefix in hook names. + * + * In the WP admin, if an admin screen is the first of its menu (like the PLL's "Languages" screen), the hooks + * fired in the screen get a `toplevel` prefix (ex: `toplevel_page_mlang`) while all the other screens get a + * slug based on the parent screen title (ex: `languages_page_mlang_strings`, where `languages` is the parent + * screen's slug). This will not prevent the `toplevel` hooks to fire, but it will fire the `languages` hooks in + * addition: this way, screens can be removed or moved around without the need of hooking both prefixes: using + * the hooks with the `languages` prefix will work in both cases. + * + * @see get_plugin_page_hookname() + */ + foreach ( array( 'load-', 'admin_print_styles-', 'admin_print_scripts-', 'admin_head-', '', 'admin_print_footer_scripts-', 'admin_footer-' ) as $prefix ) { + add_action( + "{$prefix}toplevel_page_{$parent}", + static function () use ( $prefix, $first_tab ) { + do_action( $prefix . self::get_screen_id( $first_tab ) ); + } + ); + } + + /* + * Ensure a common CSS class to the `` tag. + * + * Due to the `toplevel` "issue" described earlier, the CSS class `toplevel_page_mlang` (for example) is added + * to the body. This adds a class with the `languages` prefix. This ensures we have a common CSS class, even if + * the screen is moved to the 1st position in the menu. + */ + add_action( + // Target the screen in 1st position only. + "admin_head-toplevel_page_{$parent}", + static function () use ( $first_tab ) { + add_filter( + 'admin_body_class', + static function ( $admin_body_classes ) use ( $first_tab ) { + return $admin_body_classes . ' ' . self::get_screen_id( $first_tab ); + } + ); + } + ); + + /** + * Also modify the screen ID and base. + * + * Note: the global variables `$page_hook` and `$hook_suffix` are not changed, their value is still + * `toplevel_page_mlang`. Changing them breaks things because we can't filter `get_plugin_page_hookname()`. + * This is why the above hooks are still needed. + */ + add_action( + 'current_screen', + static function ( $current_screen ) use ( $parent, $first_tab ) { + if ( "toplevel_page_{$parent}" !== $current_screen->id ) { + return; + } + + $current_screen->id = self::get_screen_id( $first_tab ); + $current_screen->base = self::get_screen_id( $first_tab ); + } + ); + } + + /** + * Dummy method to display the 3 tabs pages: languages, strings translations, settings. + * Overwritten in `PLL_Settings`. + * + * @since 3.7 + * + * @return void + */ + public function languages_page() {} + + /** + * Setup js scripts & css styles ( only on the relevant pages ) + * + * @since 0.6 + * + * @return void + */ + public function admin_enqueue_scripts() { + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_enqueue_script( 'pll_admin', plugins_url( "/js/build/admin{$suffix}.js", POLYLANG_ROOT_FILE ), array( 'jquery' ), POLYLANG_VERSION, true ); + $inline_script = sprintf( 'let pll_admin = %s;', wp_json_encode( array( 'ajax_filter' => $this->get_ajax_filter_data() ) ) ); + wp_add_inline_script( 'pll_admin', $inline_script, 'before' ); + + $screen = get_current_screen(); + if ( empty( $screen ) ) { + return; + } + + /* + * For each script: + * 0 => the pages on which to load the script + * 1 => the scripts it needs to work + * 2 => true if loaded even if languages have not been defined yet, false otherwise + * 3 => true if loaded in footer + */ + $scripts = array( + 'user' => array( array( 'profile', 'user-edit' ), array( 'jquery' ), false, false ), + 'widgets' => array( array( 'widgets' ), array( 'jquery' ), false, false ), + ); + + $block_screens = array( 'widgets', 'site-editor' ); + + if ( ! empty( $screen->post_type ) && $this->model->is_translated_post_type( $screen->post_type ) ) { + $scripts['post'] = array( array( 'edit' ), array( 'jquery', 'wp-ajax-response' ), false, true ); + + // Classic editor. + if ( ! method_exists( $screen, 'is_block_editor' ) || ! $screen->is_block_editor() ) { + $scripts['classic-editor'] = array( array( 'post', 'media', 'async-upload' ), array( 'jquery', 'wp-ajax-response', 'post', 'jquery-ui-dialog', 'wp-i18n' ), false, true ); + } + + // Block editor with legacy metabox in WP 5.0+. + $block_screens[] = 'post'; + } + + if ( $this->options['media_support'] ) { + $scripts['media'] = array( array( 'upload' ), array( 'jquery' ), false, true ); + } + + if ( $this->is_block_editor( $screen ) ) { + $scripts['block-editor'] = array( $block_screens, array( 'jquery', 'wp-ajax-response', 'wp-api-fetch', 'jquery-ui-dialog', 'wp-i18n' ), false, true ); + } + + if ( ! empty( $screen->taxonomy ) && $this->model->is_translated_taxonomy( $screen->taxonomy ) ) { + $scripts['term'] = array( array( 'edit-tags', 'term' ), array( 'jquery', 'wp-ajax-response', 'jquery-ui-autocomplete' ), false, true ); + } + + foreach ( $scripts as $script => $v ) { + if ( in_array( $screen->base, $v[0] ) && ( $v[2] || $this->model->has_languages() ) ) { + wp_enqueue_script( "pll_{$script}", plugins_url( "/js/build/{$script}{$suffix}.js", POLYLANG_ROOT_FILE ), $v[1], POLYLANG_VERSION, $v[3] ); + if ( 'classic-editor' === $script || 'block-editor' === $script ) { + wp_set_script_translations( "pll_{$script}", 'polylang' ); + } + } + } + + wp_register_style( 'polylang_admin', plugins_url( "/css/build/admin{$suffix}.css", POLYLANG_ROOT_FILE ), array( 'wp-jquery-ui-dialog' ), POLYLANG_VERSION ); + wp_enqueue_style( 'polylang_dialog', plugins_url( "/css/build/dialog{$suffix}.css", POLYLANG_ROOT_FILE ), array( 'polylang_admin' ), POLYLANG_VERSION ); + + $this->add_inline_scripts(); + } + + /** + * Tells whether or not the given screen is block editor kind. + * e.g. widget, site or post editor. + * + * @since 3.3 + * + * @param WP_Screen $screen Screen object. + * @return bool True if the screen is a block editor, false otherwise. + */ + protected function is_block_editor( $screen ) { + return method_exists( $screen, 'is_block_editor' ) && $screen->is_block_editor() && ! pll_use_block_editor_plugin(); + } + + /** + * Enqueue scripts to the WP Customizer. + * + * @since 2.4.0 + * + * @return void + */ + public function customize_controls_enqueue_scripts() { + if ( $this->model->has_languages() ) { + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + wp_enqueue_script( 'pll_widgets', plugins_url( '/js/build/widgets' . $suffix . '.js', POLYLANG_ROOT_FILE ), array( 'jquery' ), POLYLANG_VERSION, true ); + $this->add_inline_scripts(); + } + } + + /** + * Adds inline scripts to set the default language in JS + * and localizes scripts. + * + * @since 3.3 + * + * @return void + */ + private function add_inline_scripts() { + if ( wp_script_is( 'pll_block-editor', 'enqueued' ) ) { + $default_lang_script = 'const pllDefaultLanguage = "' . $this->options['default_lang'] . '";'; + wp_add_inline_script( + 'pll_block-editor', + $default_lang_script, + 'before' + ); + } + if ( wp_script_is( 'pll_widgets', 'enqueued' ) ) { + wp_localize_script( + 'pll_widgets', + 'pll_widgets', + array( + 'flags' => wp_list_pluck( $this->model->get_languages_list(), 'flag', 'slug' ), + ) + ); + } + } + + /** + * Returns the data to use with the AJAX filter. + * The final goal is to detect if an ajax request is made on admin or frontend. + * + * Takes care to various situations: + * - When the AJAX request has no `options.data` thanks to ScreenfeedFr. + * See: https://wordpress.org/support/topic/ajaxprefilter-may-not-work-as-expected. + * - When `options.data` is a JSON string. + * See: https://wordpress.org/support/topic/polylang-breaking-third-party-ajax-requests-on-admin-panels. + * - When `options.data` is an empty string (GET request with the method 'load'). + * See: https://wordpress.org/support/topic/invalid-url-during-wordpress-new-dashboard-widget-operation. + * + * @since 3.7 + * + * @return array + */ + public function get_ajax_filter_data(): array { + global $post, $tag; + + $params = array( 'pll_ajax_backend' => 1 ); + if ( $post instanceof WP_Post && $this->model->post_types->is_translated( $post->post_type ) ) { + $params['pll_post_id'] = $post->ID; + } + + if ( $tag instanceof WP_Term && $this->model->taxonomies->is_translated( $tag->taxonomy ) ) { + $params['pll_term_id'] = $tag->term_id; + } + + /** + * Filters the list of parameters to add to the admin ajax request. + * + * @since 3.4.5 + * + * @param array $params List of parameters to add to the admin ajax request. + */ + return (array) apply_filters( 'pll_admin_ajax_params', $params ); + } + + /** + * Sets the admin current language, used to filter the content + * + * @since 2.0 + * + * @return void + */ + public function set_current_language() { + $this->curlang = $this->filter_lang; + + // Edit Post + if ( isset( $_REQUEST['pll_post_id'] ) && $lang = $this->model->post->get_language( (int) $_REQUEST['pll_post_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->curlang = $lang; + } elseif ( 'post.php' === $GLOBALS['pagenow'] && isset( $_GET['post'] ) && $this->model->is_translated_post_type( get_post_type( (int) $_GET['post'] ) ) && $lang = $this->model->post->get_language( (int) $_GET['post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->curlang = $lang; + } elseif ( 'post-new.php' === $GLOBALS['pagenow'] && ( empty( $_GET['post_type'] ) || $this->model->is_translated_post_type( sanitize_key( $_GET['post_type'] ) ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->curlang = empty( $_GET['new_lang'] ) ? $this->pref_lang : $this->model->get_language( sanitize_key( $_GET['new_lang'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + } + + // Edit Term + elseif ( isset( $_REQUEST['pll_term_id'] ) && $lang = $this->model->term->get_language( (int) $_REQUEST['pll_term_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->curlang = $lang; + } elseif ( in_array( $GLOBALS['pagenow'], array( 'edit-tags.php', 'term.php' ) ) && isset( $_GET['taxonomy'] ) && $this->model->is_translated_taxonomy( sanitize_key( $_GET['taxonomy'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + if ( isset( $_GET['tag_ID'] ) && $lang = $this->model->term->get_language( (int) $_GET['tag_ID'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->curlang = $lang; + } elseif ( ! empty( $_GET['new_lang'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->curlang = $this->model->get_language( sanitize_key( $_GET['new_lang'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + } elseif ( empty( $this->curlang ) ) { + $this->curlang = $this->pref_lang; + } + } + + // Ajax + if ( wp_doing_ajax() && ! empty( $_REQUEST['lang'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->curlang = $this->model->get_language( sanitize_key( $_REQUEST['lang'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + } + + /** + * Filters the current language used by Polylang in the admin context. + * + * @since 3.2 + * + * @param PLL_Language|false|null $curlang Instance of the current language. + * @param PLL_Admin_Base $polylang Instance of the main Polylang's object. + */ + $this->curlang = apply_filters( 'pll_admin_current_language', $this->curlang, $this ); + + // Inform that the admin language has been set. + if ( $this->curlang instanceof PLL_Language ) { + /** This action is documented in src/frontend/choose-lang.php */ + do_action( 'pll_language_defined', $this->curlang->slug, $this->curlang ); + } else { + /** This action is documented in src/class-polylang.php */ + do_action( 'pll_no_language_defined' ); // To load overridden textdomains. + } + } + + /** + * Defines the backend language and the admin language filter based on user preferences. + * + * @since 1.2.3 + * + * @return void + */ + public function init_user() { + /* + * $_GET['lang'] is numeric when editing a language, not when selecting a new language in the filter. + * We intentionally don't use a nonce to update the language filter. + */ + if ( ! wp_doing_ajax() && ! empty( $_GET['lang'] ) && ! is_numeric( sanitize_key( $_GET['lang'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $user_id = get_current_user_id(); + if ( current_user_can( 'edit_user', $user_id ) ) { + $lang = $this->model->get_language( sanitize_key( $_GET['lang'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + update_user_meta( $user_id, 'pll_filter_content', $lang ? $lang->slug : '' ); + } + } + + $this->filter_lang = $this->model->get_language( get_user_meta( get_current_user_id(), 'pll_filter_content', true ) ); + + // Set preferred language for use when saving posts and terms: must not be empty. + $this->pref_lang = empty( $this->filter_lang ) ? $this->model->get_default_language() : $this->filter_lang; + + /** + * Filters the preferred language on admin side. + * The preferred language is used for example to determine the language of a new post. + * + * @since 1.2.3 + * + * @param PLL_Language $pref_lang Preferred language. + */ + $this->pref_lang = apply_filters( 'pll_admin_preferred_language', $this->pref_lang ); + + $this->set_current_language(); + } + + /** + * Avoids parsing a tax query when all languages are requested + * Fixes https://wordpress.org/support/topic/notice-undefined-offset-0-in-wp-includesqueryphp-on-line-3877 introduced in WP 4.1 + * + * @see https://core.trac.wordpress.org/ticket/31246 the suggestion of @boonebgorges. + * + * @since 1.6.5 + * + * @param array $qvars The array of requested query variables. + * @return array + */ + public function request( $qvars ) { + if ( isset( $qvars['lang'] ) && 'all' === $qvars['lang'] ) { + unset( $qvars['lang'] ); + } + + return $qvars; + } + + /** + * Adds the languages list in admin bar for the admin languages filter. + * + * @since 0.9 + * + * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar global object. + * @return void + */ + public function admin_bar_menu( $wp_admin_bar ) { + $all_item = (object) array( + 'slug' => 'all', + 'name' => __( 'Show all languages', 'polylang' ), + 'flag' => '', + ); + + $selected = empty( $this->filter_lang ) ? $all_item : $this->filter_lang; + + $title = sprintf( + '%2$s%3$s', + $selected instanceof PLL_Language ? sprintf( ' lang="%s"', esc_attr( $selected->get_locale( 'display' ) ) ) : '', + __( 'Filters content by language', 'polylang' ), + esc_html( $selected->name ) + ); + + $all_items = array_merge( array( $all_item ), $this->model->get_languages_list() ); + $items = $all_items; + + if ( $this->should_hide_admin_bar_menu() ) { + $items = array(); + } + + /** + * Filters the admin bar language filter submenu items. + * + * @since 2.6 + * @since 3.8 Added `$all_items` parameter. + * + * @param array $items The items of the admin languages filter to display (may be empty if menu hidden). + * @param array $all_items Complete unfiltered list of all available language items. + */ + $items = apply_filters( 'pll_admin_languages_filter', $items, $all_items ); + + if ( empty( $items ) ) { + return; + } + + $wp_admin_bar->add_menu( + array( + 'id' => 'languages', + 'title' => $selected->flag . $title, + 'href' => esc_url( add_query_arg( 'lang', $selected->slug, remove_query_arg( 'paged' ) ) ), + 'meta' => array( + 'title' => __( 'Filters content by language', 'polylang' ), + 'class' => 'all' === $selected->slug ? '' : 'pll-filtered-languages', + ), + ) + ); + + foreach ( $items as $lang ) { + if ( $selected->slug === $lang->slug ) { + continue; + } + + $wp_admin_bar->add_menu( + array( + 'parent' => 'languages', + 'id' => $lang->slug, + 'title' => $lang->flag . esc_html( $lang->name ), + 'href' => esc_url( add_query_arg( 'lang', $lang->slug, remove_query_arg( 'paged' ) ) ), + 'meta' => 'all' === $lang->slug ? array() : array( 'lang' => esc_attr( $lang->get_locale( 'display' ) ) ), + ) + ); + } + } + + /** + * Remove the customize submenu when using a block theme. + * + * WordPress removes the Customizer menu if a block theme is activated and no other plugins interact with it. + * As Polylang interacts with the Customizer, we have to delete this menu ourselves in the case of a block theme, + * unless another plugin than Polylang interacts with the Customizer. + * + * @since 3.2 + * + * @return void + */ + public function remove_customize_submenu() { + if ( ! $this->should_customize_menu_be_removed() ) { + return; + } + + global $submenu; + + if ( ! empty( $submenu['themes.php'] ) ) { + foreach ( $submenu['themes.php'] as $submenu_item ) { + if ( 'customize' === $submenu_item[1] ) { + remove_submenu_page( 'themes.php', $submenu_item[2] ); + } + } + } + } + + /** + * Tells if the Polylang's admin bar menu should be hidden for the current page. + * Conventionally, it should be hidden on edition pages. + * + * @since 3.8 + * + * @return bool + */ + public function should_hide_admin_bar_menu(): bool { + global $pagenow, $typenow, $taxnow; + + if ( in_array( $pagenow, array( 'post.php', 'post-new.php' ), true ) ) { + return ! empty( $typenow ); + } + + if ( 'term.php' === $pagenow ) { + return ! empty( $taxnow ); + } + + return false; + } + + /** + * Returns the ID of a Polylang's settings screen. + * + * @since 3.8 + * + * @param string $tab The name of the screen (`lang`, `strings`, `settings`). + * @return string + * + * @phpstan-return non-empty-string + */ + public static function get_screen_id( string $tab ): string { + return sprintf( '%s_page_%s', self::SCREEN_PREFIX, self::get_screen_slug( $tab ) ); + } + + /** + * Returns the slug of a Polylang's settings screen, as seen in the URL. + * + * @since 3.8 + * + * @param string $tab The name of the screen (`lang`, `strings`, `settings`). + * @return string + * + * @phpstan-return non-empty-string + */ + public static function get_screen_slug( string $tab ): string { + return 'lang' === $tab ? 'mlang' : "mlang_$tab"; + } + + /** + * Returns the list of sub-menu items. + * + * @since 3.8 + * + * @return string[] List of sub-menu items with page slugs as array keys, and sub-menu titles as array values. + * + * @phpstan-return array + */ + protected function get_menu_items(): array { + $tabs = array( + 'lang' => __( 'Languages', 'polylang' ), + ); + + // Only if at least one language has been created. + if ( ! empty( $this->model->languages->filter( 'translator' )->get_list() ) ) { + $tabs['strings'] = __( 'Translations', 'polylang' ); + } + + $tabs['settings'] = __( 'Settings', 'polylang' ); + + /** + * Filter the list of sub-menu items in Polylang settings. + * + * @since 1.5.1 + * + * @param string[] $tabs List of sub-menu items with page slugs as array keys and titles as array values. + */ + return (array) apply_filters( 'pll_settings_tabs', $tabs ); + } + + /** + * Returns the user capability required to access the given menu page. + * + * @since 3.8 + * + * @param string $menu Menu slug. + * @return string + */ + protected function get_menu_capability( string $menu ): string { + switch ( $menu ) { + case 'lang': + return Capabilities::LANGUAGES; + + case 'strings': + return Capabilities::TRANSLATIONS; + } + + return 'manage_options'; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-block-editor.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-block-editor.php new file mode 100644 index 0000000..e1a8439 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-block-editor.php @@ -0,0 +1,88 @@ +model = &$polylang->model; + $this->filter_rest_routes = new PLL_Filter_REST_Routes( $polylang->model ); + + add_filter( 'block_editor_rest_api_preload_paths', array( $this, 'filter_preload_paths' ), 50, 2 ); + add_action( 'admin_enqueue_scripts', array( $this, 'add_block_editor_inline_script' ), 15 ); // After `PLL_Admin_Base::admin_enqueue_scripts()` to ensure `pll_block-editor`script is enqueued. + } + + /** + * Filters preload paths based on the context (block editor for posts, site editor or widget editor for instance). + * + * @since 3.5 + * + * @param array $preload_paths Preload paths. + * @param WP_Block_Editor_Context $context Editor context. + * @return array Filtered preload paths. + */ + public function filter_preload_paths( $preload_paths, $context ) { + if ( ! $context instanceof WP_Block_Editor_Context ) { + return $preload_paths; + } + + if ( 'core/edit-post' !== $context->name || ! $context->post instanceof WP_Post ) { + // Do nothing if not post editor. + return $preload_paths; + } + + if ( ! $this->model->is_translated_post_type( $context->post->post_type ) ) { + return $preload_paths; + } + + $language = $this->model->post->get_language( $context->post->ID ); + + if ( empty( $language ) ) { + return $preload_paths; + } + + return $this->filter_rest_routes->add_query_parameters( + $preload_paths, + array( + 'lang' => $language->slug, + ) + ); + } + + /** + * Adds inline block editor script for filterable REST routes. + * + * @since 3.5 + * + * @return void + */ + public function add_block_editor_inline_script() { + $handle = 'pll_block-editor'; + + if ( wp_script_is( $handle, 'enqueued' ) ) { + $this->filter_rest_routes->add_inline_script( $handle ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-classic-editor.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-classic-editor.php new file mode 100644 index 0000000..fb37755 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-classic-editor.php @@ -0,0 +1,385 @@ +model = &$polylang->model; + $this->links = &$polylang->links; + $this->curlang = &$polylang->curlang; + $this->pref_lang = &$polylang->pref_lang; + + // Adds the Languages box in the 'Edit Post' and 'Edit Page' panels + add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) ); + + // Ajax response for changing the language in the post metabox + add_action( 'wp_ajax_post_lang_choice', array( $this, 'post_lang_choice' ) ); + add_action( 'wp_ajax_pll_posts_not_translated', array( $this, 'ajax_posts_not_translated' ) ); + + // Filters the pages by language in the parent dropdown list in the page attributes metabox + add_filter( 'page_attributes_dropdown_pages_args', array( $this, 'page_attributes_dropdown_pages_args' ), 10, 2 ); + + // Notice + add_action( 'edit_form_top', array( $this, 'edit_form_top' ) ); + } + + /** + * Adds the Language box in the 'Edit Post' and 'Edit Page' panels ( as well as in custom post types panels ) + * + * @since 0.1 + * + * @param string $post_type Current post type + * @return void + */ + public function add_meta_boxes( $post_type ) { + if ( $this->model->is_translated_post_type( $post_type ) ) { + add_meta_box( + 'ml_box', + __( 'Languages', 'polylang' ), + array( $this, 'post_language' ), + $post_type, + 'side', + 'high', + array( + '__back_compat_meta_box' => pll_use_block_editor_plugin(), + ) + ); + } + } + + /** + * Displays the Languages metabox in the 'Edit Post' and 'Edit Page' panels + * + * @since 0.1 + * + * @param WP_Post $post Current post object. + * @return void + */ + public function post_language( WP_Post $post ): void { + $post_type = $post->post_type; + $from_post_id = 0; + $lang = $this->model->post->get_language( $post->ID ); + $new_post_data = $this->links->get_data_from_new_post_translation_request(); + + if ( ! empty( $new_post_data ) ) { + $from_post_id = $new_post_data['from_post']->ID; + $lang = $new_post_data['new_lang']; + } + + if ( empty( $lang ) ) { + $lang = $this->pref_lang; + } + + $dropdown = new PLL_Walker_Dropdown(); + + $id = ( 'attachment' === $post_type ) ? sprintf( 'attachments[%d][language]', (int) $post->ID ) : 'post_lang_choice'; + + $dropdown_html = $dropdown->walk( + $this->model->languages->filter( 'translator' )->get_list(), + -1, + array( + 'name' => $id, + 'class' => 'post_lang_choice tags-input', + 'selected' => $lang ? $lang->slug : '', + 'flag' => true, + ) + ); + + wp_nonce_field( 'pll_language', '_pll_nonce' ); + + // NOTE: the class "tags-input" allows to include the field in the autosave $_POST ( see autosave.js ) + printf( + '

    %1$s

    + +
    %4$s
    ', + esc_html__( 'Language', 'polylang' ), + esc_attr( $id ), + ( 'attachment' === $post_type ? 'media' : 'post' ), + $dropdown_html // phpcs:ignore WordPress.Security.EscapeOutput + ); + + /** + * Fires before displaying the list of translations in the Languages metabox for posts. + * + * @since 1.8 + * + * @param string $post_type The post type. + */ + do_action( 'pll_before_post_translations', $post_type ); + + echo '
    '; + if ( $lang ) { + if ( 'attachment' === $post_type ) { + include __DIR__ . '/view-translations-media.php'; + } else { + include __DIR__ . '/view-translations-post.php'; + } + } + echo '
    ' . "\n"; + } + + /** + * Ajax response for changing the language in the post metabox + * + * @since 0.2 + * + * @return void + */ + public function post_lang_choice() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( ! isset( $_POST['post_id'], $_POST['lang'], $_POST['post_type'] ) ) { + wp_die( 'The request is missing the parameter "post_type", "lang" and/or "post_id".' ); + } + + global $post_ID; // Obliged to use the global variable for wp_popular_terms_checklist(). + $post_ID = (int) $_POST['post_id']; + $post = get_post( $post_ID ); + + if ( ! $post instanceof WP_Post ) { + wp_die( esc_html( "Invalid post ID {$post_ID}." ) ); + } + + $lang_slug = sanitize_key( $_POST['lang'] ); + $lang = $this->model->get_language( $lang_slug ); + + if ( empty( $lang ) ) { + wp_die( esc_html( "{$lang_slug} is not a valid language code." ) ); + } + + Capabilities::get_user()->can_translate_or_die( $lang ); + + $post_type_object = get_post_type_object( $post->post_type ); + + if ( empty( $post_type_object ) ) { + wp_die( esc_html( "{$post->post_type} is not a valid post type." ) ); + } + + if ( ! current_user_can( $post_type_object->cap->edit_post, $post->ID ) ) { + wp_die( 'You are not allowed to edit this post.' ); + } + + $this->model->post->set_language( $post->ID, $lang ); + + ob_start(); + if ( 'attachment' === $post->post_type ) { + include __DIR__ . '/view-translations-media.php'; + } else { + include __DIR__ . '/view-translations-post.php'; + } + $x = new WP_Ajax_Response( array( 'what' => 'translations', 'data' => ob_get_contents() ) ); + ob_end_clean(); + + // Categories + if ( isset( $_POST['taxonomies'] ) ) { // Not set for pages + $supplemental = array(); + + foreach ( array_map( 'sanitize_key', $_POST['taxonomies'] ) as $taxname ) { + $taxonomy = get_taxonomy( $taxname ); + + if ( ! empty( $taxonomy ) ) { + ob_start(); + $popular_ids = wp_popular_terms_checklist( $taxonomy->name ); + $supplemental['populars'] = ob_get_contents(); + ob_end_clean(); + + ob_start(); + // Use $post->ID to remember checked terms in case we come back to the original language + wp_terms_checklist( $post->ID, array( 'taxonomy' => $taxonomy->name, 'popular_cats' => $popular_ids ) ); + $supplemental['all'] = ob_get_contents(); + ob_end_clean(); + + $supplemental['dropdown'] = wp_dropdown_categories( + array( + 'taxonomy' => $taxonomy->name, + 'hide_empty' => 0, + 'name' => 'new' . $taxonomy->name . '_parent', + 'orderby' => 'name', + 'hierarchical' => 1, + 'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —', + 'echo' => 0, + ) + ); + + $x->Add( array( 'what' => 'taxonomy', 'data' => $taxonomy->name, 'supplemental' => $supplemental ) ); + } + } + } + + // Parent dropdown list ( only for hierarchical post types ) + if ( in_array( $post->post_type, get_post_types( array( 'hierarchical' => true ) ) ) ) { + // Args and filter from 'page_attributes_meta_box' in wp-admin/includes/meta-boxes.php of WP 4.2.1 + $dropdown_args = array( + 'post_type' => $post->post_type, + 'exclude_tree' => $post->ID, + 'selected' => $post->post_parent, + 'name' => 'parent_id', + 'show_option_none' => __( '(no parent)', 'polylang' ), + 'sort_column' => 'menu_order, post_title', + 'echo' => 0, + ); + + /** This filter is documented in wp-admin/includes/meta-boxes.php */ + $dropdown_args = (array) apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); // Since WP 3.3. + $dropdown_args['echo'] = 0; // Make sure to not print it. + + /** @var string $data */ + $data = wp_dropdown_pages( $dropdown_args ); // phpcs:ignore WordPress.Security.EscapeOutput + + $x->Add( array( 'what' => 'pages', 'data' => $data ) ); + } + + // Flag + $x->Add( array( 'what' => 'flag', 'data' => empty( $lang->flag ) ? esc_html( $lang->slug ) : $lang->flag ) ); + + // Sample permalink + $x->Add( array( 'what' => 'permalink', 'data' => get_sample_permalink_html( $post->ID ) ) ); + + $x->send(); + } + + /** + * Ajax response for input in translation autocomplete input box + * + * @since 1.5 + * + * @return void + */ + public function ajax_posts_not_translated() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( ! isset( $_GET['post_type'], $_GET['post_language'], $_GET['translation_language'], $_GET['term'], $_GET['pll_post_id'] ) ) { + wp_die( 0 ); + } + + $post_type = sanitize_key( $_GET['post_type'] ); + + if ( ! post_type_exists( $post_type ) ) { + wp_die( 0 ); + } + + $term = wp_unslash( $_GET['term'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput + + $post_language = $this->model->get_language( sanitize_key( $_GET['post_language'] ) ); + $translation_language = $this->model->get_language( sanitize_key( $_GET['translation_language'] ) ); + + $return = array(); + + $untranslated_posts = $this->model->post->get_untranslated( $post_type, $post_language, $translation_language, $term ); + + // format output + foreach ( $untranslated_posts as $post ) { + $return[] = array( + 'id' => $post->ID, + 'value' => $post->post_title, + 'link' => $this->links->get_edit_post_link_html( $post ), + ); + } + + // Add current translation in list + if ( $post_id = $this->model->post->get_translation( (int) $_GET['pll_post_id'], $translation_language ) ) { + $post = get_post( $post_id ); + + if ( ! empty( $post ) ) { + array_unshift( + $return, + array( + 'id' => $post_id, + 'value' => $post->post_title, + 'link' => $this->links->get_edit_post_link_html( $post ), + ) + ); + } + } + + wp_die( wp_json_encode( $return ) ); + } + + /** + * Filters the pages by language in the parent dropdown list in the page attributes metabox. + * + * @since 0.6 + * + * @param array $dropdown_args Arguments passed to wp_dropdown_pages(). + * @param WP_Post $post The page being edited. + * @return array Modified arguments. + */ + public function page_attributes_dropdown_pages_args( $dropdown_args, $post ) { + $language = isset( $_POST['lang'] ) ? $this->model->get_language( sanitize_key( $_POST['lang'] ) ) : $this->model->post->get_language( $post->ID ); // phpcs:ignore WordPress.Security.NonceVerification + + if ( empty( $language ) ) { + $language = $this->pref_lang; + } + + if ( ! empty( $language ) ) { + $dropdown_args['lang'] = $language->slug; + } + + return $dropdown_args; + } + + /** + * Displays a notice if the user has not sufficient rights to overwrite synchronized taxonomies and metas. + * + * @since 2.6 + * + * @param WP_Post $post the post currently being edited. + * @return void + */ + public function edit_form_top( $post ) { + if ( ! $this->model->post->current_user_can_synchronize( $post->ID ) ) { + ?> +
    +

    + +

    +
    + taxonomies as $taxonomy ) { + if ( 'category' === $taxonomy ) { + // Adds the language column in the 'Terms' table. + add_filter( 'pll_first_language_term_column', array( $this, 'first_language_column' ), 10, 2 ); + } + } + } + + /** + * Identifies the default term in the terms list table to disable the language dropdown in JS. + * + * @since 3.7 + * + * @param string $out The output. + * @param int $term_id The term id. + * @return string The HTML string. + */ + public function first_language_column( $out, $term_id ) { + if ( $this->is_default_term( $term_id ) ) { + $out .= sprintf( '', intval( $term_id ) ); + } + + return $out; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-columns.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-columns.php new file mode 100644 index 0000000..22cc09c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-columns.php @@ -0,0 +1,418 @@ +links` is instantiated on `wp_loaded` (prio 1), see `PLL_Admin_Base::init()`. + * This means `$polylang->links` cannot be `null`. + * + * @var PLL_Admin_Links + */ + public $links; + + /** + * Language selected in the admin language filter. + * + * @var PLL_Language|null + */ + public $filter_lang; + + /** + * Constructor: setups filters and actions. + * + * @since 1.2 + * + * @param object $polylang The Polylang object. + */ + public function __construct( &$polylang ) { + $this->links = &$polylang->links; + $this->model = &$polylang->model; + $this->filter_lang = &$polylang->filter_lang; + + // Hide the column of the filtered language. + add_filter( 'hidden_columns', array( $this, 'hidden_columns' ) ); // Since WP 4.4. + + // Add the language and translations columns in 'All Posts', 'All Pages' and 'Media library' panels. + foreach ( $this->model->get_translated_post_types() as $type ) { + // Use the latest filter late as some plugins purely overwrite what's done by others :( + // Specific case for media. + add_filter( 'manage_' . ( 'attachment' == $type ? 'upload' : 'edit-' . $type ) . '_columns', array( $this, 'add_post_column' ), 100 ); + add_action( 'manage_' . ( 'attachment' == $type ? 'media' : $type . '_posts' ) . '_custom_column', array( $this, 'post_column' ), 10, 2 ); + } + + // Quick edit and bulk edit. + add_filter( 'quick_edit_custom_box', array( $this, 'quick_edit_custom_box' ) ); + add_filter( 'bulk_edit_custom_box', array( $this, 'quick_edit_custom_box' ) ); + + // Adds the language column in the 'Categories' and 'Post Tags' tables. + foreach ( $this->model->get_translated_taxonomies() as $tax ) { + add_filter( 'manage_edit-' . $tax . '_columns', array( $this, 'add_term_column' ) ); + add_filter( 'manage_' . $tax . '_custom_column', array( $this, 'term_column' ), 10, 3 ); + } + + // Ajax responses to update list table rows. + add_action( 'wp_ajax_pll_update_post_rows', array( $this, 'ajax_update_post_rows' ) ); + add_action( 'wp_ajax_pll_update_term_rows', array( $this, 'ajax_update_term_rows' ) ); + } + + /** + * Adds languages and translations columns in posts, pages, media, categories and tags tables. + * + * @since 0.8.2 + * + * @param string[] $columns List of table columns. + * @param string $before The column before which we want to add our languages. + * @return string[] Modified list of columns. + */ + protected function add_column( array $columns, string $before ): array { + if ( $n = array_search( $before, array_keys( $columns ) ) ) { + $end = array_slice( $columns, $n ); + $columns = array_slice( $columns, 0, $n ); + } + + foreach ( $this->model->get_languages_list() as $language ) { + $columns[ 'language_' . $language->slug ] = $this->links->get_flag_html( $language ) . '' . esc_html( $language->name ) . ''; + } + + return isset( $end ) ? array_merge( $columns, $end ) : $columns; + } + + /** + * Returns the first language column in posts, pages, media, categories and tags tables. + * + * @since 0.9 + * + * @return string First language column name. + */ + protected function get_first_language_column(): string { + $languages = $this->model->get_languages_list(); + $language = reset( $languages ); + return ! empty( $language ) ? "language_{$language->slug}" : ''; + } + + /** + * Hides the column for the filtered language. + * + * @since 2.7 + * + * @param string[] $hidden Array of hidden columns. + * @return string[] + */ + public function hidden_columns( $hidden ) { + if ( ! empty( $this->filter_lang ) ) { + $hidden[] = 'language_' . $this->filter_lang->slug; + } + return $hidden; + } + + /** + * Adds the language and translations columns ( before the comments column ) in the posts, pages and media library tables. + * + * @since 0.1 + * + * @param string[] $columns List of posts table columns. + * @return string[] Modified list of columns. + */ + public function add_post_column( $columns ) { + return $this->add_column( (array) $columns, 'comments' ); + } + + /** + * Fills the language and translations columns in the posts, pages and media library tables + * take care that when doing ajax inline edit, the post may not be updated in database yet. + * + * @since 0.1 + * + * @param string $column Column name. + * @param int $post_id Post ID. + * @return void + */ + public function post_column( $column, $post_id ): void { + if ( ! str_starts_with( $column, 'language_' ) ) { + return; + } + + $post = get_post( (int) $post_id ); + + if ( ! $post instanceof WP_Post ) { + // Should not happen. + return; + } + + $inline = isset( $_POST['inline_lang_choice'], $_REQUEST['_inline_edit'] ) && is_string( $_REQUEST['_inline_edit'] ) && wp_verify_nonce( $_REQUEST['_inline_edit'], 'inlineeditnonce' ); + $lang = $inline ? $this->model->get_language( sanitize_key( $_POST['inline_lang_choice'] ) ) : $this->model->post->get_language( $post->ID ); + + if ( empty( $lang ) ) { + return; + } + + $language = $this->model->get_language( substr( $column, 9 ) ); + + if ( empty( $language ) ) { + return; + } + + // Hidden field containing the post language for quick edit. + if ( $column === $this->get_first_language_column() ) { + printf( '', (int) $post->ID, esc_html( $lang->slug ) ); + } + + $tr_id = $this->model->post->get( $post->ID, $language ); + $tr_post = $tr_id ? get_post( $tr_id ) : null; + + if ( ! $tr_post instanceof WP_Post ) { + // Link to add a new translation: no translation for this language yet, or it doesn't exist anymore. + echo $this->links->get_new_post_link_html( $post, $language ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + return; + } + + // Link to edit (or not) the post or a translation. + echo $this->links->get_edit_post_link_html( $tr_post, $tr_post->ID === $post->ID ? 'list_current' : 'list_translation' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** + * Quick edit & bulk edit. + * + * @since 0.9 + * + * @param string $column Column name. + * @return string Unmodified column. + */ + public function quick_edit_custom_box( $column ) { + if ( $column !== $this->get_first_language_column() ) { + return $column; + } + + $elements = $this->model->languages->filter( 'translator' )->get_list(); + if ( current_filter() == 'bulk_edit_custom_box' ) { + array_unshift( $elements, (object) array( 'slug' => -1, 'name' => __( '— No Change —', 'polylang' ) ) ); + } + + $dropdown = new PLL_Walker_Dropdown(); + printf( + '
    +
    + +
    +
    ', + esc_html__( 'Language', 'polylang' ), + $dropdown->walk( $elements, -1, array( 'name' => 'inline_lang_choice', 'id' => '' ) ) // phpcs:ignore WordPress.Security.EscapeOutput + ); + + return $column; + } + + /** + * Adds the language column (before the posts column) in the 'Categories' or 'Post Tags' table. + * + * @since 0.1 + * + * @param string[] $columns List of terms table columns. + * @return string[] modified List of columns. + */ + public function add_term_column( $columns ) { + $screen = get_current_screen(); + + // Avoid displaying languages in screen options when editing a term. + if ( $screen instanceof WP_Screen && 'term' === $screen->base ) { + return $columns; + } + + return $this->add_column( (array) $columns, 'posts' ); + } + + /** + * Fills the language column in the taxonomy terms list table. + * + * @since 0.1 + * + * @param string $out Column output. + * @param string $column Column name. + * @param int $term_id Term ID. + * @return string + */ + public function term_column( $out, $column, $term_id ) { + if ( ! str_starts_with( $column, 'language_' ) ) { + return $out; + } + + $term_id = (int) $term_id; + $inline = isset( $_POST['inline_lang_choice'], $_REQUEST['_inline_edit'] ) && is_string( $_REQUEST['_inline_edit'] ) && wp_verify_nonce( $_REQUEST['_inline_edit'], 'taxinlineeditnonce' ); + $lang = $inline ? $this->model->get_language( sanitize_key( $_POST['inline_lang_choice'] ) ) : $this->model->term->get_language( $term_id ); + + if ( empty( $lang ) ) { + return $out; + } + + if ( isset( $GLOBALS['post_type'] ) ) { + $post_type = $GLOBALS['post_type']; + } elseif ( isset( $_REQUEST['post_type'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $post_type = sanitize_key( $_REQUEST['post_type'] ); // phpcs:ignore WordPress.Security.NonceVerification + } + + if ( isset( $GLOBALS['taxonomy'] ) ) { + $taxonomy = $GLOBALS['taxonomy']; + } elseif ( isset( $_REQUEST['taxonomy'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $taxonomy = sanitize_key( $_REQUEST['taxonomy'] ); // phpcs:ignore WordPress.Security.NonceVerification + } + + if ( ! isset( $taxonomy, $post_type ) || ! is_string( $post_type ) || ! is_string( $taxonomy ) || ! post_type_exists( $post_type ) || ! taxonomy_exists( $taxonomy ) ) { + return $out; + } + + $language = $this->model->get_language( substr( $column, 9 ) ); + + if ( empty( $language ) ) { + return $out; + } + + $term = get_term( $term_id, $taxonomy ); + + if ( ! $term instanceof WP_Term ) { + // Should not happen. + return $out; + } + + $tr_id = $this->model->term->get( $term->term_id, $language ); + $tr_term = $tr_id ? get_term( $tr_id, $taxonomy ) : null; + + if ( ! $tr_term instanceof WP_Term ) { + // Link to add a new translation: no translation for this language yet, or it doesn't exist anymore. + $out .= $this->links->get_new_term_link_html( $term, $post_type, $language ); + } else { + // Link to edit (or not) the term or a translation. + $out .= $this->links->get_edit_term_link_html( $tr_term, $post_type, $tr_term->term_id === $term->term_id ? 'list_current' : 'list_translation' ); + } + + if ( $this->get_first_language_column() === $column ) { + // Hidden field containing the term language for quick edit. + $out .= sprintf( '', $term->term_id, esc_html( $lang->slug ) ); + + /** + * Filters the output of the first language column in the terms list table. + * + * @since 3.7 + * + * @param string $output First language column output. + * @param int $term_id Term ID. + * @param string $lang Language code. + */ + $out = apply_filters( 'pll_first_language_term_column', $out, $term->term_id, $lang->slug ); + } + + return $out; + } + + /** + * Update rows of translated posts when the language is modified in quick edit. + * + * @since 1.7 + * + * @return void + * + * @phpstan-return never + */ + public function ajax_update_post_rows(): void { + check_ajax_referer( 'inlineeditnonce', '_pll_nonce' ); + + if ( ! isset( $_POST['post_type'], $_POST['post_id'], $_POST['screen'] ) ) { + wp_die( 0 ); + } + + $post_type = sanitize_key( $_POST['post_type'] ); + + if ( ! post_type_exists( $post_type ) || ! $this->model->is_translated_post_type( $post_type ) ) { + wp_die( 0 ); + } + + /** @var WP_Posts_List_Table $wp_list_table */ + $wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => sanitize_key( $_POST['screen'] ) ) ); + + $x = new WP_Ajax_Response(); + + // Collect old translations. + $translations = empty( $_POST['translations'] ) ? array() : explode( ',', $_POST['translations'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput + $translations = array_map( 'intval', $translations ); + $translations = array_merge( $translations, array( (int) $_POST['post_id'] ) ); // Add current post + + foreach ( $translations as $post_id ) { + $level = is_post_type_hierarchical( $post_type ) ? count( get_ancestors( $post_id, $post_type ) ) : 0; + if ( $post = get_post( $post_id ) ) { + ob_start(); + $wp_list_table->single_row( $post, $level ); + $data = (string) ob_get_clean(); + $x->add( array( 'what' => 'row', 'data' => $data, 'supplemental' => array( 'post_id' => $post_id ) ) ); + } + } + + $x->send(); + } + + /** + * Update rows of translated terms when adding / deleting a translation + * or when the language is modified in quick edit. + * + * @since 1.7 + * + * @return void + * + * @phpstan-return never + */ + public function ajax_update_term_rows(): void { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( ! isset( $_POST['taxonomy'], $_POST['term_id'], $_POST['screen'] ) ) { + wp_die( 0 ); + } + + $taxonomy = sanitize_key( $_POST['taxonomy'] ); + + if ( ! taxonomy_exists( $taxonomy ) || ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + wp_die( 0 ); + } + + /** @var WP_Terms_List_Table $wp_list_table */ + $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => sanitize_key( $_POST['screen'] ) ) ); + + $x = new WP_Ajax_Response(); + + // Collect old translations. + $translations = empty( $_POST['translations'] ) ? array() : explode( ',', $_POST['translations'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput + $translations = array_map( 'intval', $translations ); + $translations = array_merge( $translations, $this->model->term->get_translations( (int) $_POST['term_id'] ) ); // Add current translations. + $translations = array_unique( $translations ); // Remove duplicates. + + foreach ( $translations as $term_id ) { + $level = is_taxonomy_hierarchical( $taxonomy ) ? count( get_ancestors( $term_id, $taxonomy ) ) : 0; + $tag = get_term( $term_id, $taxonomy ); + + if ( ! $tag instanceof WP_Term ) { + continue; + } + + ob_start(); + $wp_list_table->single_row( $tag, $level ); + $data = (string) ob_get_clean(); + $x->add( array( 'what' => 'row', 'data' => $data, 'supplemental' => array( 'term_id' => $term_id ) ) ); + } + + $x->send(); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-media.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-media.php new file mode 100644 index 0000000..2b04166 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-media.php @@ -0,0 +1,151 @@ +posts = &$polylang->posts; + + // Adds the language field and translations tables in the 'Edit Media' panel. + add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 ); + + // Adds actions related to languages when creating, saving or deleting media. + add_filter( 'attachment_fields_to_save', array( $this, 'save_media' ), 10, 2 ); + + // Maybe creates a media translation. + add_action( 'admin_init', array( $this, 'translate_media' ) ); + } + + /** + * Adds the language field and translations tables in the 'Edit Media' panel. + * Needs WP 3.5+ + * + * @since 0.9 + * + * @param array $fields List of form fields. + * @param WP_Post $post The attachment being edited. + * @return array Modified list of form fields. + */ + public function attachment_fields_to_edit( $fields, $post ) { + if ( 'post.php' === $GLOBALS['pagenow'] ) { + return $fields; // Don't add anything on edit media panel since we have the metabox. + } + + $post_id = $post->ID; + $lang = $this->model->post->get_language( $post_id ); + $user = Capabilities::get_user(); + $languages = $this->model->languages->filter( 'translator' )->get_list(); + + if ( empty( $lang ) ) { + // The media has no language: prepend an empty option to prevent displaying a wrong information. + array_unshift( $languages, (object) array( 'slug' => '', 'name' => '' ) ); + } elseif ( ! $user->can_translate( $lang ) ) { + // The user cannot translate this language, so it isn't in `$languages` (the dropdown will be disabled). + if ( ! in_array( $lang, $languages, true ) ) { + array_unshift( $languages, $lang ); + } + } + + // Disable the dropdown if: + // - the media has no language and the user is a translator, + // - or the media has a language but the user is not allowed to translate it. + $disabled = empty( $lang ) ? $user->is_translator() : ! $user->can_translate( $lang ); + + $dropdown = new PLL_Walker_Dropdown(); + $fields['language'] = array( + 'label' => __( 'Language', 'polylang' ), + 'input' => 'html', + 'html' => $dropdown->walk( + $languages, + -1, + array( + 'name' => sprintf( 'attachments[%d][language]', $post_id ), + 'class' => 'media_lang_choice', + 'selected' => $lang ? $lang->slug : '', + 'disabled' => $disabled, + ) + ), + ); + + return $fields; + } + + /** + * Maybe creates a media translation. + * + * @since 0.9 + * + * @return void + */ + public function translate_media() { + $data = $this->links->get_data_from_new_media_translation_request(); + if ( empty( $data ) ) { + return; + } + + $post_id = $data['from_post']->ID; + + // Bails if the translations already exists. + if ( $this->model->post->get_translation( $post_id, $data['new_lang'] ) ) { + wp_safe_redirect( wp_get_referer() ); + exit; + } + + $tr_id = $this->model->post->create_media_translation( $post_id, $data['new_lang'] ); + wp_safe_redirect( admin_url( sprintf( 'post.php?post=%d&action=edit', $tr_id ) ) ); // WP 3.5+. + exit; + } + + /** + * Called when a media is saved + * Saves language and translations + * + * @since 0.9 + * + * @param array $post An array of post data. + * @param array $attachment An array of attachment metadata. + * @return array Unmodified $post + */ + public function save_media( $post, $attachment ) { + // Language is filled in attachment by the function applying the filter 'attachment_fields_to_save' + // All security checks have been done by functions applying this filter + if ( empty( $attachment['language'] ) || ! current_user_can( 'edit_post', $post['ID'] ) ) { + return $post; + } + + $language = $this->model->get_language( $attachment['language'] ); + + if ( empty( $language ) ) { + return $post; + } + + Capabilities::get_user()->can_translate_or_die( $language ); + + $this->model->post->set_language( $post['ID'], $language ); + + return $post; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-post-base.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-post-base.php new file mode 100644 index 0000000..6d7dd9d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-post-base.php @@ -0,0 +1,65 @@ +links = &$polylang->links; + $this->model = &$polylang->model; + $this->pref_lang = &$polylang->pref_lang; + } + + /** + * Save translations from the languages metabox. + * + * @since 1.5 + * + * @param int $post_id Post id of the post being saved. + * @param int[] $arr An array with language codes as key and post id as value. + * @return int[] The array of translated post ids. + */ + protected function save_translations( $post_id, $arr ) { + // Security check as 'wp_insert_post' can be called from outside WP admin. + check_admin_referer( 'pll_language', '_pll_nonce' ); + + $translations = $this->model->post->save_translations( $post_id, $arr ); + return $translations; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-post.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-post.php new file mode 100644 index 0000000..1d5e94e --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-post.php @@ -0,0 +1,261 @@ +curlang = &$polylang->curlang; + + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); + + // Filters posts, pages and media by language + add_action( 'parse_query', array( $this, 'parse_query' ) ); + + // Adds actions and filters related to languages when creating, saving or deleting posts and pages + add_action( 'load-post.php', array( $this, 'edit_post' ) ); + add_action( 'load-edit.php', array( $this, 'bulk_edit_posts' ) ); + add_action( 'wp_ajax_inline-save', array( $this, 'inline_edit_post' ), 0 ); // Before WordPress + + // Sets the language in Tiny MCE + add_filter( 'tiny_mce_before_init', array( $this, 'tiny_mce_before_init' ) ); + } + + /** + * Outputs a javascript list of terms ordered by language and hierarchical taxonomies + * to filter the category checklist per post language in quick edit + * Outputs a javascript list of pages ordered by language + * to filter the parent dropdown per post language in quick edit + * + * @since 1.7 + * + * @return void + */ + public function admin_enqueue_scripts() { + $screen = get_current_screen(); + + if ( empty( $screen ) ) { + return; + } + + // Hierarchical taxonomies + if ( 'edit' == $screen->base && $taxonomies = get_object_taxonomies( $screen->post_type, 'objects' ) ) { + // Get translated hierarchical taxonomies + $hierarchical_taxonomies = array(); + foreach ( $taxonomies as $taxonomy ) { + if ( $taxonomy->hierarchical && $taxonomy->show_in_quick_edit && $this->model->is_translated_taxonomy( $taxonomy->name ) ) { + $hierarchical_taxonomies[] = $taxonomy->name; + } + } + + if ( ! empty( $hierarchical_taxonomies ) ) { + $terms = get_terms( array( 'taxonomy' => $hierarchical_taxonomies, 'get' => 'all' ) ); + $term_languages = array(); + + if ( is_array( $terms ) ) { + foreach ( $terms as $term ) { + if ( $lang = $this->model->term->get_language( $term->term_id ) ) { + $term_languages[ $lang->slug ][ $term->taxonomy ][] = $term->term_id; + } + } + } + + // Send all these data to javascript + if ( ! empty( $term_languages ) ) { + wp_localize_script( 'pll_post', 'pll_term_languages', $term_languages ); + } + } + } + + // Hierarchical post types + if ( 'edit' == $screen->base && is_post_type_hierarchical( $screen->post_type ) ) { + $pages = get_pages( array( 'sort_column' => 'menu_order, post_title' ) ); // Same arguments as the parent pages dropdown to avoid an extra query. + + update_post_caches( $pages, $screen->post_type, true, false ); + + $page_languages = array(); + + foreach ( $pages as $page ) { + if ( $lang = $this->model->post->get_language( $page->ID ) ) { + $page_languages[ $lang->slug ][] = $page->ID; + } + } + + // Send all these data to javascript + if ( ! empty( $page_languages ) ) { + wp_localize_script( 'pll_post', 'pll_page_languages', $page_languages ); + } + } + } + + /** + * Filters posts, pages and media by language. + * + * @since 0.1 + * + * @param WP_Query $query WP_Query object. + * @return void + */ + public function parse_query( $query ) { + $pll_query = new PLL_Query( $query, $this->model ); + $pll_query->filter_query( $this->curlang ); + } + + /** + * Save language and translation when editing a post (post.php). + * + * @since 2.3 + * + * @return void + */ + public function edit_post() { + if ( ! isset( $_POST['post_lang_choice'], $_POST['post_ID'] ) ) { + return; + } + + check_admin_referer( 'pll_language', '_pll_nonce' ); + + $post_id = (int) $_POST['post_ID']; + $post = get_post( $post_id ); + + if ( empty( $post ) ) { + return; + } + + $post_type_object = get_post_type_object( $post->post_type ); + + if ( empty( $post_type_object ) ) { + return; + } + + $user = Capabilities::get_user(); + if ( ! $user->has_cap( $post_type_object->cap->edit_post, $post_id ) ) { + return; + } + + $language = $this->model->get_language( sanitize_key( $_POST['post_lang_choice'] ) ); + + if ( empty( $language ) ) { + return; + } + + $user->can_translate_or_die( $language ); + + $this->model->post->set_language( $post_id, $language ); + + if ( ! isset( $_POST['post_tr_lang'] ) ) { + return; + } + + $this->save_translations( $post_id, array_map( 'absint', $_POST['post_tr_lang'] ) ); + } + + /** + * Save language when bulk editing posts. + * + * @since 2.3 + * + * @return void + */ + public function bulk_edit_posts() { + if ( ! isset( $_GET['bulk_edit'], $_GET['inline_lang_choice'], $_REQUEST['post'], $_REQUEST['_wpnonce'] ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-posts' ) ) { + return; + } + + if ( -1 === $_GET['inline_lang_choice'] ) { + return; + } + + $language = $this->model->get_language( sanitize_key( $_GET['inline_lang_choice'] ) ); + + if ( empty( $language ) ) { + return; + } + + $user = Capabilities::get_user(); + $user->can_translate_or_die( $language ); + + $post_ids = array_map( 'intval', (array) $_REQUEST['post'] ); + foreach ( $post_ids as $post_id ) { + if ( $user->has_cap( 'edit_post', $post_id ) ) { + $this->model->post->set_language( $post_id, $language ); + } + } + } + + /** + * Save language when inline editing a post. + * + * @since 2.3 + * + * @return void + */ + public function inline_edit_post() { + if ( ! isset( $_POST['post_ID'], $_POST['inline_lang_choice'], $_REQUEST['_inline_edit'] ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_inline_edit'], 'inlineeditnonce' ) ) { + return; + } + + $language = $this->model->get_language( sanitize_key( $_POST['inline_lang_choice'] ) ); + + if ( empty( $language ) ) { + return; + } + + $user = Capabilities::get_user(); + $user->can_translate_or_die( $language ); + + $post_id = (int) $_POST['post_ID']; + + if ( ! $post_id || ! $user->has_cap( 'edit_post', $post_id ) ) { + return; + } + + $this->model->post->set_language( $post_id, $language ); + } + + /** + * Sets the language attribute and text direction for Tiny MCE. + * + * @since 2.2 + * + * @param array $mce_init TinyMCE config. + * @return array + */ + public function tiny_mce_before_init( $mce_init ) { + if ( ! empty( $this->curlang ) ) { + $mce_init['wp_lang_attr'] = $this->curlang->get_locale( 'display' ); + $mce_init['directionality'] = $this->curlang->is_rtl ? 'rtl' : 'ltr'; + } + return $mce_init; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-term.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-term.php new file mode 100644 index 0000000..3007841 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-term.php @@ -0,0 +1,734 @@ +links = &$polylang->links; + $this->model = &$polylang->model; + $this->pref_lang = &$polylang->pref_lang; + $this->default_term = &$polylang->default_term; + + foreach ( $this->model->get_translated_taxonomies() as $tax ) { + // Adds the language field in the 'Categories' and 'Post Tags' panels + add_action( $tax . '_add_form_fields', array( $this, 'add_term_form' ) ); + + // Adds the language field and translations tables in the 'Edit Category' and 'Edit Tag' panels + add_action( $tax . '_edit_form_fields', array( $this, 'edit_term_form' ) ); + } + + // Adds actions related to languages when creating or saving categories and post tags + add_filter( 'wp_dropdown_cats', array( $this, 'wp_dropdown_cats' ) ); + add_action( 'create_term', array( $this, 'save_term' ), 900, 3 ); + add_action( 'edit_term', array( $this, 'save_term' ), 900, 3 ); // Late as it may conflict with other plugins, see http://wordpress.org/support/topic/polylang-and-wordpress-seo-by-yoast + add_action( 'pre_post_update', array( $this, 'pre_post_update' ) ); + add_filter( 'pll_inserted_term_language', array( $this, 'get_inserted_term_language' ) ); + add_filter( 'pll_inserted_term_parent', array( $this, 'get_inserted_term_parent' ), 10, 2 ); + + // Ajax response for edit term form + add_action( 'wp_ajax_term_lang_choice', array( $this, 'term_lang_choice' ) ); + add_action( 'wp_ajax_pll_terms_not_translated', array( $this, 'ajax_terms_not_translated' ) ); + + // Updates the translations term ids when splitting a shared term + add_action( 'split_shared_term', array( $this, 'split_shared_term' ), 10, 4 ); // WP 4.2 + } + + /** + * Adds the language field in the 'Categories' and 'Post Tags' panels + * + * @since 0.1 + * + * @return void + */ + public function add_term_form() { + if ( isset( $_GET['taxonomy'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $taxonomy = sanitize_key( $_GET['taxonomy'] ); // phpcs:ignore WordPress.Security.NonceVerification + } + + if ( isset( $_REQUEST['post_type'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $post_type = sanitize_key( $_REQUEST['post_type'] ); // phpcs:ignore WordPress.Security.NonceVerification + } + + if ( isset( $GLOBALS['post_type'] ) ) { + $post_type = $GLOBALS['post_type']; + } + + if ( ! isset( $taxonomy, $post_type ) || ! taxonomy_exists( $taxonomy ) || ! post_type_exists( $post_type ) ) { + return; + } + + $from_term_id = isset( $_GET['from_tag'] ) ? (int) $_GET['from_tag'] : 0; // phpcs:ignore WordPress.Security.NonceVerification + + $lang = isset( $_GET['new_lang'] ) ? $this->model->get_language( sanitize_key( $_GET['new_lang'] ) ) : $this->pref_lang; // phpcs:ignore WordPress.Security.NonceVerification + + $dropdown = new PLL_Walker_Dropdown(); + + $dropdown_html = $dropdown->walk( + $this->model->languages->filter( 'translator' )->get_list(), + -1, + array( + 'name' => 'term_lang_choice', + 'value' => 'term_id', + 'selected' => $lang ? $lang->term_id : '', + 'flag' => true, + ) + ); + + wp_nonce_field( 'pll_language', '_pll_nonce' ); + + printf( + '
    + +
    %s
    +

    %s

    +
    ', + esc_html__( 'Language', 'polylang' ), + $dropdown_html, // phpcs:ignore + esc_html__( 'Sets the language', 'polylang' ) + ); + + if ( ! empty( $from_term_id ) ) { + printf( '', (int) $from_term_id ); + } + + // Adds translation fields + echo '
    '; + if ( $lang ) { + include __DIR__ . '/view-translations-term.php'; + } + echo '
    ' . "\n"; + } + + /** + * Adds the language field and translations tables in the 'Edit Category' and 'Edit Tag' panels. + * + * @since 0.1 + * + * @param WP_Term $term The term being edited. + * @return void + */ + public function edit_term_form( $term ) { + if ( isset( $_REQUEST['post_type'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $post_type = sanitize_key( $_REQUEST['post_type'] ); // phpcs:ignore WordPress.Security.NonceVerification + } + + if ( isset( $GLOBALS['post_type'] ) ) { + $post_type = $GLOBALS['post_type']; + } + + if ( ! isset( $post_type ) || ! post_type_exists( $post_type ) ) { + return; + } + + $taxonomy = $term->taxonomy; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + + $lang = $this->model->term->get_language( $term->term_id ); + $lang = empty( $lang ) ? $this->pref_lang : $lang; + + // Disable the language dropdown and the translations input fields for default terms to prevent removal + $disabled = $this->default_term->is_default_term( $term->term_id ); + + $dropdown = new PLL_Walker_Dropdown(); + + $dropdown_html = $dropdown->walk( + $this->model->languages->filter( 'translator' )->get_list(), + -1, + array( + 'name' => 'term_lang_choice', + 'value' => 'term_id', + 'selected' => $lang->term_id, + 'disabled' => $disabled, + 'flag' => true, + ) + ); + + wp_nonce_field( 'pll_language', '_pll_nonce' ); + + printf( + ' + + + + + %s
    +

    %s

    + + ', + esc_html__( 'Language', 'polylang' ), + $dropdown_html, // phpcs:ignore + esc_html__( 'Sets the language', 'polylang' ) + ); + + echo ''; + include __DIR__ . '/view-translations-term.php'; + echo '' . "\n"; + } + + /** + * Translates term parent if exists when using "Add new" ( translation ) + * + * @since 0.7 + * + * @param string $output html markup for dropdown list of categories + * @return string modified html + */ + public function wp_dropdown_cats( $output ) { + if ( isset( $_GET['taxonomy'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $taxonomy = sanitize_key( $_GET['taxonomy'] ); // phpcs:ignore WordPress.Security.NonceVerification + } + + if ( isset( $taxonomy, $_GET['from_tag'], $_GET['new_lang'] ) && taxonomy_exists( $taxonomy ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $term = get_term( (int) $_GET['from_tag'], $taxonomy ); // phpcs:ignore WordPress.Security.NonceVerification + + if ( $term instanceof WP_Term && $id = $term->parent ) { + $lang = $this->model->get_language( sanitize_key( $_GET['new_lang'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + if ( $parent = $this->model->term->get_translation( $id, $lang ) ) { + return str_replace( '"' . $parent . '"', '"' . $parent . '" selected="selected"', $output ); + } + } + } + return $output; + } + + /** + * Stores the current post_id when bulk editing posts for use in save_language and get_inserted_term_language. + * + * @since 1.7 + * + * @param int $post_id Post ID. + * @return void + */ + public function pre_post_update( $post_id ) { + if ( isset( $_GET['bulk_edit'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->post_id = $post_id; + } + } + + /** + * Saves the language of a term. + * + * @since 1.5 + * + * @param int $term_id The term ID. + * @param string $taxonomy Taxonomy name. + * @return void|never + */ + protected function save_language( $term_id, $taxonomy ) { + $term_id = (int) $term_id; + + /* + * Category metabox. + */ + if ( isset( $_POST['term_lang_choice'], $_REQUEST[ '_ajax_nonce-add-' . $taxonomy ] ) && wp_verify_nonce( $_REQUEST[ '_ajax_nonce-add-' . $taxonomy ], 'add-' . $taxonomy ) ) { + $this->maybe_set_language( $term_id, sanitize_key( $_POST['term_lang_choice'] ) ); + return; + } + + /* + * Edit tags or tags metabox. + */ + if ( isset( $_POST['term_lang_choice'] ) ) { + check_admin_referer( 'pll_language', '_pll_nonce' ); + $this->maybe_set_language( $term_id, sanitize_key( $_POST['term_lang_choice'] ) ); + return; + } + + /* + * *Post* bulk edit, in case a new term is created. + */ + if ( isset( $_GET['bulk_edit'], $_GET['inline_lang_choice'], $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-posts' ) ) { + /* + * Bulk edit does not modify the language, so we possibly create a tag in several languages. + */ + if ( -1 === (int) $_GET['inline_lang_choice'] ) { + // The language of the current term is set a according to the language of the current post. + $language = $this->model->post->get_language( $this->post_id ); + + if ( empty( $language ) ) { + return; + } + + Capabilities::get_user()->can_translate_or_die( $language ); + + $this->model->term->set_language( $term_id, $language ); + $term = get_term( $term_id, $taxonomy ); + + // Get all terms with the same name. + if ( $term instanceof WP_Term ) { + $term_ids = get_terms( array( 'taxonomy' => $taxonomy, 'name' => $term->name, 'hide_empty' => false, 'fields' => 'ids' ) ); + + // If we have several terms with the same name, they are translations of each other. + if ( is_array( $term_ids ) && count( $term_ids ) > 1 ) { + $translations = array(); + + foreach ( $term_ids as $_id ) { + $translations[ $this->model->term->get_language( $_id )->slug ] = $_id; + } + + $this->model->term->save_translations( $term_id, $translations ); + } + } + return; + } + + if ( current_user_can( 'edit_term', $term_id ) ) { + $this->maybe_set_language( $term_id, sanitize_key( $_GET['inline_lang_choice'] ) ); + } + return; + } + + /* + * Quick edit. + */ + if ( isset( $_POST['inline_lang_choice'], $_REQUEST['_inline_edit'] ) ) { + if ( ! wp_verify_nonce( $_REQUEST['_inline_edit'], 'inlineeditnonce' ) && ! wp_verify_nonce( $_REQUEST['_inline_edit'], 'taxinlineeditnonce' ) ) { // Post quick edit or tag quick edit? + return; + } + + $this->maybe_set_language( $term_id, sanitize_key( $_POST['inline_lang_choice'] ) ); + return; + } + + /* + * Edit post. + */ + if ( isset( $_POST['post_lang_choice'] ) ) { // FIXME should be useless now. + check_admin_referer( 'pll_language', '_pll_nonce' ); + $this->maybe_set_language( $term_id, sanitize_key( $_POST['post_lang_choice'] ) ); + } + } + + /** + * Sets the language of a term if the user is allowed to. + * + * @since 3.8 + * + * @param int $term_id The term ID. + * @param string $language Language slug. + * @return void|never + */ + private function maybe_set_language( int $term_id, string $language ): void { + $language = $this->model->get_language( $language ); + + if ( empty( $language ) ) { + return; + } + + Capabilities::get_user()->can_translate_or_die( $language ); + + $this->model->term->set_language( $term_id, $language ); + } + + /** + * Save translations from our form. + * + * @since 1.5 + * + * @param int $term_id The term id of the term being saved. + * @return int[] The array of translated term ids. + */ + protected function save_translations( $term_id ) { + // Security check as 'wp_update_term' can be called from outside WP admin. + check_admin_referer( 'pll_language', '_pll_nonce' ); + + $translations = array(); + + // Save translations after checking the translated term is in the right language ( as well as cast id to int ). + if ( isset( $_POST['term_tr_lang'] ) ) { + foreach ( array_map( 'absint', $_POST['term_tr_lang'] ) as $lang => $tr_id ) { + $tr_lang = $this->model->term->get_language( $tr_id ); + $translations[ $lang ] = $tr_lang && $tr_lang->slug == $lang ? $tr_id : 0; + } + } + + $this->model->term->save_translations( $term_id, $translations ); + + return $translations; + } + + /** + * Called when a category or post tag is created or edited + * Saves language and translations + * + * @since 0.1 + * + * @param int $term_id Term ID. + * @param int $tt_id Term taxonomy ID. + * @param string $taxonomy Taxonomy name. + * @return void + */ + public function save_term( $term_id, $tt_id, $taxonomy ) { + // Does nothing except on taxonomies which are filterable + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return; + } + + $tax = get_taxonomy( $taxonomy ); + + if ( empty( $tax ) ) { + return; + } + + // Capability check + // As 'wp_update_term' can be called from outside WP admin + // 2nd test for creating tags when creating / editing a post + if ( current_user_can( $tax->cap->edit_terms ) || ( isset( $_POST['tax_input'][ $taxonomy ] ) && current_user_can( $tax->cap->assign_terms ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->save_language( $term_id, $taxonomy ); + + if ( isset( $_POST['term_tr_lang'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $this->save_translations( $term_id ); + } + } + } + + /** + * Ajax response for edit term form + * + * @since 0.2 + * + * @return void + */ + public function term_lang_choice() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( ! isset( $_POST['taxonomy'], $_POST['post_type'], $_POST['lang'] ) ) { + wp_die( 0 ); + } + + $lang = $this->model->get_language( sanitize_key( $_POST['lang'] ) ); + $taxonomy = sanitize_key( $_POST['taxonomy'] ); + $post_type = sanitize_key( $_POST['post_type'] ); + + if ( empty( $lang ) || ! post_type_exists( $post_type ) || ! taxonomy_exists( $taxonomy ) ) { + wp_die( 0 ); + } + + if ( ! empty( $_POST['term_id'] ) ) { + $term = get_term( (int) $_POST['term_id'], $taxonomy ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $term = $term instanceof WP_Term ? $term : null; + } + + ob_start(); + include __DIR__ . '/view-translations-term.php'; + $x = new WP_Ajax_Response( array( 'what' => 'translations', 'data' => ob_get_contents() ) ); + ob_end_clean(); + + // Parent dropdown list ( only for hierarchical taxonomies ) + // $args copied from edit_tags.php except echo + if ( is_taxonomy_hierarchical( $taxonomy ) ) { + $args = array( + 'hide_empty' => 0, + 'hide_if_empty' => false, + 'taxonomy' => $taxonomy, + 'name' => 'parent', + 'orderby' => 'name', + 'hierarchical' => true, + 'show_option_none' => __( 'None', 'polylang' ), + 'echo' => 0, + ); + $x->Add( array( 'what' => 'parent', 'data' => wp_dropdown_categories( $args ) ) ); + } + + // Tag cloud + // Tests copied from edit_tags.php + else { + $tax = get_taxonomy( $taxonomy ); + if ( ! empty( $tax ) && ! is_null( $tax->labels->popular_items ) ) { + $args = array( 'taxonomy' => $taxonomy, 'echo' => false ); + if ( current_user_can( $tax->cap->edit_terms ) ) { + $args = array_merge( $args, array( 'link' => 'edit' ) ); + } + + $tag_cloud = wp_tag_cloud( $args ); + + if ( ! empty( $tag_cloud ) ) { + /** @phpstan-var non-falsy-string $tag_cloud */ + $html = sprintf( '

    %1$s

    %2$s
    ', esc_html( $tax->labels->popular_items ), $tag_cloud ); + $x->Add( array( 'what' => 'tag_cloud', 'data' => $html ) ); + } + } + } + + // Flag + $x->Add( array( 'what' => 'flag', 'data' => empty( $lang->flag ) ? esc_html( $lang->slug ) : $lang->flag ) ); + + $x->send(); + } + + /** + * Ajax response for input in translation autocomplete input box. + * + * @since 1.5 + * + * @return void + */ + public function ajax_terms_not_translated() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( ! isset( $_GET['term'], $_GET['post_type'], $_GET['taxonomy'], $_GET['term_language'], $_GET['translation_language'] ) ) { + wp_die( 0 ); + } + + /** @var string */ + $s = wp_unslash( $_GET['term'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput + $post_type = sanitize_key( $_GET['post_type'] ); + $taxonomy = sanitize_key( $_GET['taxonomy'] ); + + if ( ! post_type_exists( $post_type ) || ! taxonomy_exists( $taxonomy ) ) { + wp_die( 0 ); + } + + $term_language = $this->model->get_language( sanitize_key( $_GET['term_language'] ) ); + $translation_language = $this->model->get_language( sanitize_key( $_GET['translation_language'] ) ); + + $terms = array(); + $return = array(); + + // Add current translation in list. + // Not in add term as term_id is not set. + if ( isset( $_GET['term_id'] ) && 'undefined' !== $_GET['term_id'] && $term_id = $this->model->term->get_translation( (int) $_GET['term_id'], $translation_language ) ) { + $terms = array( get_term( $term_id, $taxonomy ) ); + } + + // It is more efficient to use one common query for all languages as soon as there are more than 2. + $all_terms = get_terms( array( 'taxonomy' => $taxonomy, 'hide_empty' => false, 'lang' => '', 'name__like' => $s ) ); + if ( is_array( $all_terms ) ) { + foreach ( $all_terms as $term ) { + $lang = $this->model->term->get_language( $term->term_id ); + + if ( $lang && $lang->slug == $translation_language->slug && ! $this->model->term->get_translation( $term->term_id, $term_language ) ) { + $terms[] = $term; + } + } + } + + // Format the ajax response. + foreach ( $terms as $term ) { + if ( ! $term instanceof WP_Term ) { + continue; + } + + $parents_list = get_term_parents_list( + $term->term_id, + $term->taxonomy, + array( + 'separator' => ' > ', + 'link' => false, + ) + ); + + if ( ! is_string( $parents_list ) ) { + continue; + } + + $return[] = array( + 'id' => $term->term_id, + 'value' => rtrim( $parents_list, ' >' ), // Trim the separator added at the end by WP. + 'link' => $this->links->get_edit_term_link_html( $term, $post_type ), + ); + } + + wp_die( wp_json_encode( $return ) ); + } + + /** + * Updates the translations term ids when splitting a shared term + * Splits translations if these are shared terms too + * + * @since 1.7 + * + * @param int $term_id ID of the formerly shared term. + * @param int $new_term_id ID of the new term created for the $term_taxonomy_id. + * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split. + * @param string $taxonomy Taxonomy name. + * @return void + */ + public function split_shared_term( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) { + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return; + } + + // Avoid recursion + static $avoid_recursion = false; + if ( $avoid_recursion ) { + return; + } + + $lang = $this->model->term->get_language( $term_id ); + if ( empty( $lang ) ) { + return; + } + + $avoid_recursion = true; + $translations = array(); + + foreach ( $this->model->term->get_translations( $term_id ) as $key => $tr_id ) { + if ( $lang->slug == $key ) { + $translations[ $key ] = $new_term_id; + } + else { + $tr_term = get_term( $tr_id, $taxonomy ); + + if ( ! $tr_term instanceof WP_Term ) { + continue; + } + + $split_term_id = _split_shared_term( $tr_id, $tr_term->term_taxonomy_id ); + + if ( is_int( $split_term_id ) ) { + $translations[ $key ] = $split_term_id; + } else { + $translations[ $key ] = $tr_id; + } + + // Hack translation ids sent by the form to avoid overwrite in PLL_Admin_Filters_Term::save_translations + if ( isset( $_POST['term_tr_lang'][ $key ] ) && $_POST['term_tr_lang'][ $key ] == $tr_id ) { // phpcs:ignore WordPress.Security.NonceVerification + $_POST['term_tr_lang'][ $key ] = $translations[ $key ]; + } + } + + $this->model->term->set_language( $translations[ $key ], $key ); + } + + $this->model->term->save_translations( $new_term_id, $translations ); + $avoid_recursion = false; + } + + /** + * Returns the language for subsequently inserted term in admin. + * + * @since 3.3 + * + * @param PLL_Language|null $lang Term language object if found, null otherwise. + * @return PLL_Language|null Language object, null if none found. + */ + public function get_inserted_term_language( $lang ) { + if ( $lang instanceof PLL_Language ) { + return $lang; + } + + if ( ! empty( $_POST['term_lang_choice'] ) && is_string( $_POST['term_lang_choice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $lang_slug = sanitize_key( $_POST['term_lang_choice'] ); // phpcs:ignore WordPress.Security.NonceVerification + $lang = $this->model->get_language( $lang_slug ); + return $lang instanceof PLL_Language ? $lang : null; + } + + if ( ! empty( $_POST['inline_lang_choice'] ) && is_string( $_POST['inline_lang_choice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $lang_slug = sanitize_key( $_POST['inline_lang_choice'] ); // phpcs:ignore WordPress.Security.NonceVerification + $lang = $this->model->get_language( $lang_slug ); + return $lang instanceof PLL_Language ? $lang : null; + } + + // *Post* bulk edit, in case a new term is created + if ( isset( $_GET['bulk_edit'], $_GET['inline_lang_choice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // Bulk edit does not modify the language + if ( -1 === (int) $_GET['inline_lang_choice'] ) { // phpcs:ignore WordPress.Security.NonceVerification + $lang = $this->model->post->get_language( $this->post_id ); + return $lang instanceof PLL_Language ? $lang : null; + } elseif ( is_string( $_GET['inline_lang_choice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $lang_slug = sanitize_key( $_GET['inline_lang_choice'] ); // phpcs:ignore WordPress.Security.NonceVerification + $lang = $this->model->get_language( $lang_slug ); + return $lang instanceof PLL_Language ? $lang : null; + } + } + + // Special cases for default categories as the select is disabled. + $default_term = get_option( 'default_category' ); + + if ( ! is_numeric( $default_term ) ) { + return null; + } + + if ( ! empty( $_POST['tag_ID'] ) && in_array( (int) $default_term, $this->model->term->get_translations( (int) $_POST['tag_ID'] ), true ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $lang = $this->model->term->get_language( (int) $_POST['tag_ID'] ); // phpcs:ignore WordPress.Security.NonceVerification + return $lang instanceof PLL_Language ? $lang : null; + } + + if ( ! empty( $_POST['tax_ID'] ) && in_array( (int) $default_term, $this->model->term->get_translations( (int) $_POST['tax_ID'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $lang = $this->model->term->get_language( (int) $_POST['tax_ID'] ); // phpcs:ignore WordPress.Security.NonceVerification + return $lang instanceof PLL_Language ? $lang : null; + } + + return null; + } + + /** + * Filters the subsequently inserted term parent in admin. + * + * @since 3.3 + * + * @param int $parent Parent term ID, 0 if none found. + * @param string $taxonomy Term taxonomy. + * @return int Parent term ID if found, 0 otherwise. + */ + public function get_inserted_term_parent( $parent, $taxonomy ) { + if ( $parent ) { + return $parent; + } + + if ( isset( $_POST['parent'], $_POST['term_lang_choice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $parent = intval( $_POST['parent'] ); // phpcs:ignore WordPress.Security.NonceVerification + } elseif ( isset( $_POST[ "new{$taxonomy}_parent" ], $_POST['term_lang_choice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $parent = intval( $_POST[ "new{$taxonomy}_parent" ] ); // phpcs:ignore WordPress.Security.NonceVerification + } + + return $parent; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-widgets-options.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-widgets-options.php new file mode 100644 index 0000000..164ae93 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters-widgets-options.php @@ -0,0 +1,36 @@ +> $widget + */ + public function in_widget_form( $widget, $return, $instance ) { + $screen = get_current_screen(); + + // Test the Widgets screen and the Customizer to avoid displaying the option in page builders + // Saving the widget reloads the form. And curiously the action is in $_REQUEST but neither in $_POST, nor in $_GET. + if ( ( isset( $screen ) && 'widgets' === $screen->base ) || ( isset( $_REQUEST['action'] ) && 'save-widget' === $_REQUEST['action'] ) || isset( $GLOBALS['wp_customize'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + parent::in_widget_form( $widget, $return, $instance ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters.php new file mode 100644 index 0000000..bac5548 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-filters.php @@ -0,0 +1,127 @@ +model->get_languages_list() as $lang ) { + $meta = $lang->is_default ? 'description' : 'description_' . $lang->slug; + $description = empty( $_POST[ 'description_' . $lang->slug ] ) ? '' : trim( $_POST[ 'description_' . $lang->slug ] ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput + + /** This filter is documented in wp-includes/user.php */ + $description = apply_filters( 'pre_user_description', $description ); // Applies WP default filter wp_filter_kses + update_user_meta( $user_id, $meta, $description ); + } + } + + /** + * Outputs hidden information to modify the biography form with js. + * + * @since 0.4 + * + * @param WP_User $profileuser The current WP_User object. + * @return void + */ + public function personal_options( $profileuser ) { + foreach ( $this->model->get_languages_list() as $lang ) { + $meta = $lang->is_default ? 'description' : 'description_' . $lang->slug; + $description = get_user_meta( $profileuser->ID, $meta, true ); + + printf( + '', + esc_attr( $lang->slug ), + esc_attr( $lang->name ), + sanitize_user_field( 'description', $description, $profileuser->ID, 'edit' ) + ); + } + } + + /** + * Allows to update translations files for plugins and themes. + * + * @since 1.6 + * + * @param string[] $locales List of locales to update for plugins and themes. + * @return string[] + */ + public function update_check_locales( $locales ) { + return array_merge( $locales, $this->model->get_languages_list( array( 'fields' => 'locale' ) ) ); + } + + /** + * Adds custom classes to the body + * + * @since 2.2 Adds a text direction dependent class to the body. + * @since 3.4 Adds a language dependent class to the body. + * + * @param string $classes Space-separated list of CSS classes. + * @return string + */ + public function admin_body_class( $classes ) { + if ( ! empty( $this->curlang ) ) { + $classes .= ' pll-dir-' . ( $this->curlang->is_rtl ? 'rtl' : 'ltr' ); + $classes .= ' pll-lang-' . $this->curlang->slug; + } + return $classes; + } + + /** + * Adds post state for translations of the privacy policy page. + * + * @since 2.7 + * + * @param string[] $post_states An array of post display states. + * @param WP_Post $post The current post object. + * @return string[] + */ + public function display_post_states( $post_states, $post ) { + $page_for_privacy_policy = get_option( 'wp_page_for_privacy_policy' ); + + if ( $page_for_privacy_policy && in_array( $post->ID, $this->model->post->get_translations( $page_for_privacy_policy ) ) ) { + $post_states['page_for_privacy_policy'] = __( 'Privacy Policy Page', 'polylang' ); + } + + return $post_states; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-links.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-links.php new file mode 100644 index 0000000..224e215 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-links.php @@ -0,0 +1,438 @@ +user = Capabilities::get_user(); + } + + /** + * Returns the html markup for a new post translation link. + * + * @since 3.8 + * + * @param WP_Post $post The source post. + * @param PLL_Language $language The language of the new translation. + * @return string + */ + public function get_new_post_link_html( WP_Post $post, PLL_Language $language ): string { + $link = $this->get_new_post_translation_link( $post, $language ); + return $this->new_translation_link( $link, $language ); + } + + /** + * Returns the URL to create a new post translation. + * Returns an empty string if the current user is not allowed to create posts in the given language. + * + * @since 1.5 + * @since 3.8 Changed first parameter type from `int` to `WP_Post`. + * + * @param WP_Post $post The source post. + * @param PLL_Language $language The language of the new translation. + * @param string $context Optional. Defaults to 'display' which encodes '&' to '&'. + * Otherwise, preserves '&'. + * @return string + */ + public function get_new_post_translation_link( WP_Post $post, PLL_Language $language, string $context = 'display' ): string { + if ( ! $this->user->can_translate( $language ) ) { + return ''; + } + + $post_type_object = get_post_type_object( $post->post_type ); + + if ( empty( $post_type_object ) || ! $this->user->has_cap( $post_type_object->cap->create_posts ) ) { + return ''; + } + + // Special case for the privacy policy page which is associated to a specific capability + if ( 'page' === $post_type_object->name && ! $this->user->has_cap( 'manage_privacy_options' ) ) { + $privacy_page = get_option( 'wp_page_for_privacy_policy' ); + $privacy_page = is_numeric( $privacy_page ) ? (int) $privacy_page : 0; + + if ( $privacy_page && in_array( $post->ID, $this->model->post->get_translations( $privacy_page ) ) ) { + return ''; + } + } + + if ( 'attachment' === $post->post_type ) { + $args = array( + 'action' => 'translate_media', + 'from_media' => $post->ID, + 'new_lang' => $language->slug, + ); + + $link = add_query_arg( $args, admin_url( 'admin.php' ) ); + + // Add nonce for media as we will directly publish a new attachment from a click on this link + if ( 'display' === $context ) { + $link = wp_nonce_url( $link, 'translate_media' ); + } else { + $link = add_query_arg( '_wpnonce', wp_create_nonce( 'translate_media' ), $link ); + } + } else { + $args = array( + 'post_type' => $post->post_type, + 'from_post' => $post->ID, + 'new_lang' => $language->slug, + ); + + $link = add_query_arg( $args, admin_url( 'post-new.php' ) ); + + if ( 'display' === $context ) { + $link = wp_nonce_url( $link, 'new-post-translation' ); + } else { + $link = add_query_arg( '_wpnonce', wp_create_nonce( 'new-post-translation' ), $link ); + } + } + + /** + * Filters the new post translation link. + * + * @since 1.8 + * + * @param string $link The new post translation link. + * @param PLL_Language $language The language of the new translation. + * @param int $post_id The source post id. + */ + return apply_filters( 'pll_get_new_post_translation_link', $link, $language, $post->ID ); + } + + /** + * Returns the html markup for a new translation link. + * + * @since 2.6 + * + * @param string $link The new translation link. + * @param PLL_Language $language The language of the new translation. + * @return string + */ + protected function new_translation_link( string $link, PLL_Language $language ): string { + if ( empty( $link ) ) { + return sprintf( + '', + /* translators: accessibility text, %s is a native language name */ + esc_attr( sprintf( __( 'You are not allowed to add a translation in %s', 'polylang' ), $language->name ) ) + ); + } + + /* translators: accessibility text, %s is a native language name */ + $hint = sprintf( __( 'Add a translation in %s', 'polylang' ), $language->name ); + return sprintf( + '
    %3$s', + esc_url( $link ), + esc_attr( $hint ), + esc_html( $hint ) + ); + } + + /** + * Returns the html markup for a post translation link. + * + * @since 3.8 + * + * @param WP_Post $post The post. + * @param string $mode Optional. How the link should be displayed: with a pen icon or a language's flag. + * Possible values are: + * - `metabox_translation` (pen icon in metabox), + * - `list_translation` (pen icon in items list), + * - `list_current` (flag in items list). + * Default is `metabox_translation`. + * @return string + * + * @phpstan-param 'metabox_translation'|'list_translation'|'list_current' $mode + */ + public function get_edit_post_link_html( WP_Post $post, string $mode = 'metabox_translation' ): string { + $language = $this->model->post->get_language( $post->ID ); + + if ( empty( $language ) ) { + // Should not happen. + return ''; + } + + $url = (string) get_edit_post_link( $post->ID ); + return $this->get_edit_item_link_html( $url, $language, $post->ID, $post->post_title, $mode ); + } + + /** + * Returns the html markup for a translation link. + * + * @since 3.8 + * + * @param string $url URL of the edition link. + * @param PLL_Language $language Language of the item. + * @param int $item_id ID of the item. Used only in `list_translation` mode. + * @param string $item_name Name of the item. Not used in `metabox_translation` mode. + * @param string $mode How the link should be displayed: with a pen icon or a language's flag. + * Possible values are: + * - `metabox_translation` (pen icon in metabox), + * - `list_translation` (pen icon in items list), + * - `list_current` (flag in items list). + * Default is `metabox_translation`. + * @return string + * + * @phpstan-param 'metabox_translation'|'list_translation'|'list_current' $mode + */ + private function get_edit_item_link_html( string $url, PLL_Language $language, int $item_id, string $item_name, string $mode ): string { + if ( 'list_current' === $mode ) { + $flag = $this->get_flag_html( $language ); + $class = 'pll_column_flag'; + } else { + $flag = ''; + $class = 'pll_icon_edit'; + } + + if ( empty( $url ) ) { + // The current user is not allowed to edit the item. + if ( 'list_current' === $mode ) { + /* translators: accessibility text, %s is a native language name */ + $hint = sprintf( __( 'You are not allowed to edit this item in %s', 'polylang' ), $language->name ); + } else { + /* translators: accessibility text, %s is a native language name */ + $hint = sprintf( __( 'You are not allowed to edit a translation in %s', 'polylang' ), $language->name ); + } + + return sprintf( + '%s', + esc_attr( $hint ), + esc_attr( $class ), + $flag // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ); + } + + // The current user is allowed to edit the item. + if ( 'list_current' === $mode ) { + /* translators: accessibility text, %s is a native language name */ + $hint = sprintf( __( 'Edit this item in %s', 'polylang' ), $language->name ); + } elseif ( 'list_translation' === $mode ) { + /* translators: accessibility text, %s is a native language name */ + $hint = sprintf( __( 'Edit the translation in %s', 'polylang' ), $language->name ); + $class .= " translation_{$item_id}"; + } else { + /* translators: accessibility text, %s is a native language name */ + $hint = sprintf( __( 'Edit the translation in %s', 'polylang' ), $language->name ); + $item_name = $hint; + } + + return sprintf( + '%s%s', + esc_url( $url ), + esc_attr( $class ), + esc_attr( $item_name ), + esc_html( $hint ), + $flag // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ); + } + + /** + * Returns the html markup for a new term translation. + * + * @since 3.8 + * + * @param WP_Term $term The source term. + * @param string $post_type Post type name. + * @param PLL_Language $language The language of the new translation. + * @return string + */ + public function get_new_term_link_html( WP_Term $term, string $post_type, PLL_Language $language ): string { + $link = $this->get_new_term_translation_link( $term, $post_type, $language ); + return $this->new_translation_link( $link, $language ); + } + + /** + * Returns the URL to create a new term translation. + * Returns an empty string if the current user is not allowed to create terms in the given language. + * + * @since 1.5 + * @since 3.8 Changed first parameter type from `int` to `WP_Term`. + * Removed 2nd parameter `$taxonomy`. + * + * @param WP_Term $term The source term. + * @param string $post_type Post type name. + * @param PLL_Language $language The language of the new translation. + * @return string + */ + public function get_new_term_translation_link( WP_Term $term, string $post_type, PLL_Language $language ): string { + if ( ! $this->user->can_translate( $language ) ) { + return ''; + } + + $tax = get_taxonomy( $term->taxonomy ); + if ( ! $tax || ! $this->user->has_cap( $tax->cap->edit_terms ) ) { + return ''; + } + + $args = array( + 'taxonomy' => $term->taxonomy, + 'post_type' => $post_type, + 'from_tag' => $term->term_id, + 'new_lang' => $language->slug, + ); + + $link = add_query_arg( $args, admin_url( 'edit-tags.php' ) ); + + /** + * Filters the new term translation link. + * + * @since 1.8 + * + * @param string $link The new term translation link. + * @param PLL_Language $language The language of the new translation. + * @param int $term_id The source term id. + * @param string $taxonomy Taxonomy name. + * @param string $post_type Post type name. + */ + return apply_filters( 'pll_get_new_term_translation_link', $link, $language, $term->term_id, $term->taxonomy, $post_type ); + } + + /** + * Returns the html markup for a term translation link. + * + * @since 3.8 + * + * @param WP_Term $term The term. + * @param string $post_type Post type name. + * @param string $mode Optional. How the link should be displayed: with a pen icon or a language's flag. + * Possible values are: + * - `metabox_translation` (pen icon in metabox), + * - `list_translation` (pen icon in items list), + * - `list_current` (flag in items list). + * Default is `metabox_translation`. + * @return string + * + * @phpstan-param 'metabox_translation'|'list_translation'|'list_current' $mode + */ + public function get_edit_term_link_html( WP_Term $term, string $post_type, string $mode = 'metabox_translation' ): string { + $language = $this->model->term->get_language( $term->term_id ); + + if ( empty( $language ) ) { + return ''; + } + + $url = (string) get_edit_term_link( $term->term_id, $term->taxonomy, $post_type ); + return $this->get_edit_item_link_html( $url, $language, $term->term_id, $term->name, $mode ); + } + + /** + * Returns the language flag or the language slug if there is no flag. + * + * @since 3.8 + * + * @param PLL_Language $language PLL_Language object. + * @return string + */ + public function get_flag_html( PLL_Language $language ): string { + return $language->flag ?: sprintf( '%s', esc_html( $language->slug ) ); + } + + /** + * Returns some data (`from_post` and `new_lang`) from the current request. + * + * @since 3.7 + * @since 3.8 Removed parameter. + * + * @return array { + * @type WP_Post $from_post The source post. + * @type PLL_Language $new_lang The target language. + * } + * + * @phpstan-return array{}|array{from_post: WP_Post, new_lang: PLL_Language}|never + */ + public function get_data_from_new_post_translation_request(): array { + if ( isset( $_GET['from_media'] ) ) { + return $this->get_data_from_new_media_translation_request(); + } + + if ( ! isset( $GLOBALS['pagenow'], $GLOBALS['post_type'], $_GET['_wpnonce'], $_GET['from_post'], $_GET['new_lang'], $_GET['post_type'] ) ) { + return array(); + } + + if ( 'post-new.php' !== $GLOBALS['pagenow'] || ! $this->model->is_translated_post_type( $GLOBALS['post_type'] ) ) { + return array(); + } + + // Capability check already done in post-new.php. + check_admin_referer( 'new-post-translation' ); + return $this->get_objects_from_new_post_translation_request( (int) $_GET['from_post'], sanitize_key( $_GET['new_lang'] ) ); + } + + /** + * Returns some data (`from_post` and `new_lang`) from the current request. + * + * @since 3.7 + * + * @return array { + * @type WP_Post $from_post The source media. + * @type PLL_Language $new_lang The target language. + * } + * + * @phpstan-return array{}|array{from_post: WP_Post, new_lang: PLL_Language}|never + */ + public function get_data_from_new_media_translation_request(): array { + if ( ! $this->options['media_support'] ) { + return array(); + } + + if ( ! isset( $_GET['action'], $_GET['_wpnonce'], $_GET['from_media'], $_GET['new_lang'] ) || 'translate_media' !== $_GET['action'] ) { + return array(); + } + + check_admin_referer( 'translate_media' ); + return $this->get_objects_from_new_post_translation_request( (int) $_GET['from_media'], sanitize_key( $_GET['new_lang'] ) ); + } + + /** + * Returns the objects given the post ID and language slug provided in the new post translation request. + * + * @since 3.7 + * + * @param int $post_id The original Post ID provided. + * @param string $lang_slug The new translation language provided + * @return array { + * @type WP_Post $from_post The source post. + * @type PLL_Language $new_lang The target language. + * } + * + * @phpstan-return array{}|array{from_post: WP_Post, new_lang: PLL_Language}|never + */ + private function get_objects_from_new_post_translation_request( int $post_id, string $lang_slug ): array { + if ( $post_id <= 0 || empty( $lang_slug ) ) { + return array(); + } + + $post = get_post( $post_id ); + $lang = $this->model->get_language( $lang_slug ); + + if ( empty( $post ) || empty( $lang ) ) { + return array(); + } + + return array( + 'from_post' => $post, + 'new_lang' => $lang, + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-model.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-model.php new file mode 100644 index 0000000..15adaf8 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-model.php @@ -0,0 +1,11 @@ +theme, array( $this, 'pre_update_option_theme_mods' ) ); + add_action( 'delete_nav_menu', array( $this, 'delete_nav_menu' ) ); + + $this->create_nav_menu_locations(); + } + + /** + * Adds the language switcher metabox. + * + * @since 3.7.7 + * + * @return void + */ + public function add_meta_box() { + // FIXME not displayed if Polylang is activated before the first time the user goes to nav menus http://core.trac.wordpress.org/ticket/16828 + add_meta_box( 'pll_lang_switch_box', __( 'Language switcher', 'polylang' ), array( $this, 'lang_switch' ), 'nav-menus', 'side', 'high' ); + } + + /** + * Language switcher metabox + * The checkbox and all hidden fields are important + * Thanks to John Morris for his very interesting post http://www.johnmorrisonline.com/how-to-add-a-fully-functional-custom-meta-box-to-wordpress-navigation-menus/ + * + * @since 1.1 + * + * @return void + */ + public function lang_switch() { + global $_nav_menu_placeholder, $nav_menu_selected_id; + $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; + ?> +
    +
    +
      +
    • + + + + +
    • +
    +
    +

    + + class="button-secondary submit-add-to-menu right" value="" name="add-post-type-menu-item" id="submit-posttype-lang-switch"> + + +

    +
    + base ) { + return; + } + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + wp_enqueue_script( 'pll_nav_menu', plugins_url( "/js/build/nav-menu{$suffix}.js", POLYLANG_ROOT_FILE ), array(), POLYLANG_VERSION ); + + $data = array( + 'strings' => PLL_Switcher::get_switcher_options( 'menu', 'string' ), // The strings for the options + 'title' => __( 'Languages', 'polylang' ), // The title + 'val' => array(), + ); + + // Get all language switcher menu items + $items = get_posts( + array( + 'numberposts' => -1, + 'nopaging' => true, + 'post_type' => 'nav_menu_item', + 'fields' => 'ids', + 'meta_key' => '_pll_menu_item', + ) + ); + + // The options values for the language switcher + foreach ( $items as $item ) { + $data['val'][ $item ] = get_post_meta( $item, '_pll_menu_item', true ); + } + + // Send all these data to javascript + wp_localize_script( 'pll_nav_menu', 'pll_data', $data ); + } + + /** + * Save our menu item options. + * + * @since 1.1 + * + * @param int $menu_id ID of the updated menu. + * @param int $menu_item_db_id ID of the updated menu item. + * @return void + */ + public function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0 ) { + if ( ! current_user_can( 'edit_theme_options' ) ) { + return; + } + + if ( ! isset( $_REQUEST['update-nav-menu-nonce'] ) || ! wp_verify_nonce( $_REQUEST['update-nav-menu-nonce'], 'update-nav_menu' ) ) { + return; + } + + if ( empty( $_POST['menu-item-url'] ) || ! is_array( $_POST['menu-item-url'] ) || empty( $_POST['menu-item-url'][ $menu_item_db_id ] ) || '#pll_switcher' !== $_POST['menu-item-url'][ $menu_item_db_id ] ) { + return; + } + + $options = array( 'hide_if_no_translation' => 0, 'hide_current' => 0, 'force_home' => 0, 'show_flags' => 0, 'show_names' => 1, 'dropdown' => 0 ); // Default values. + + // Our jQuery form has not been displayed. + if ( empty( $_POST['menu-item-pll-detect'][ $menu_item_db_id ] ) ) { + if ( ! get_post_meta( $menu_item_db_id, '_pll_menu_item', true ) ) { // Our options were never saved. + update_post_meta( $menu_item_db_id, '_pll_menu_item', $options ); + } + } else { + foreach ( array_keys( $options ) as $opt ) { + $options[ $opt ] = empty( $_POST[ 'menu-item-' . $opt ][ $menu_item_db_id ] ) ? 0 : 1; + } + update_post_meta( $menu_item_db_id, '_pll_menu_item', $options ); // Allow us to easily identify our nav menu item. + } + } + + /** + * Assigns menu languages and translations based on (temporary) locations. + * + * @since 1.8 + * + * @param array $locations Nav menu locations. + * @return array + */ + public function update_nav_menu_locations( $locations ) { + // Extract language and menu from locations. + $nav_menus = $this->options->get( 'nav_menus' ); + + foreach ( $locations as $loc => $menu ) { + $infos = $this->explode_location( $loc ); + $nav_menus[ $this->theme ][ $infos['location'] ][ $infos['lang'] ] = $menu ?: 0; + + if ( $this->options->get( 'default_lang' ) !== $infos['lang'] ) { + unset( $locations[ $loc ] ); // Remove temporary locations before database update. + } + } + + $this->options->set( 'nav_menus', $nav_menus ); + + return $locations; + } + + /** + * Assigns menu languages and translations based on (temporary) locations. + * + * @since 1.1 + * + * @param mixed $mods Theme mods. + * @return mixed + */ + public function pre_update_option_theme_mods( $mods ) { + global $wp_customize; + + if ( ! current_user_can( 'edit_theme_options' ) || ! is_array( $mods ) || ! isset( $mods['nav_menu_locations'] ) || ! is_array( $mods['nav_menu_locations'] ) ) { + return $mods; + } + + /* + * Manage Locations tab in Appearance -> Menus. + */ + if ( isset( $_GET['action'], $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'save-menu-locations' ) && 'locations' === $_GET['action'] ) { + $nav_menus = $this->options->get( 'nav_menus' ); + + $nav_menus[ $this->theme ] = array(); + $this->options->set( 'nav_menus', $nav_menus ); + + $mods['nav_menu_locations'] = $this->update_nav_menu_locations( $mods['nav_menu_locations'] ); + return $mods; + } + + /* + * Edit Menus tab in Appearance -> Menus. + */ + if ( isset( $_POST['action'], $_REQUEST['update-nav-menu-nonce'] ) && wp_verify_nonce( $_REQUEST['update-nav-menu-nonce'], 'update-nav_menu' ) && 'update' === $_POST['action'] ) { + $nav_menus = $this->options->get( 'nav_menus' ); + + $nav_menus[ $this->theme ] = array(); + $this->options->set( 'nav_menus', $nav_menus ); + + $mods['nav_menu_locations'] = $this->update_nav_menu_locations( $mods['nav_menu_locations'] ); + return $mods; + } + + if ( ! $wp_customize instanceof WP_Customize_Manager ) { + return $mods; + } + + /* + * Customizer. Don't reset locations in this case. + */ + $action = 'save-customize_' . $wp_customize->get_stylesheet(); + if ( isset( $_POST['action'], $_REQUEST['nonce'] ) && wp_verify_nonce( $_REQUEST['nonce'], $action ) && 'customize_save' == $_POST['action'] ) { + $mods['nav_menu_locations'] = $this->update_nav_menu_locations( $mods['nav_menu_locations'] ); + } + + return $mods; + } + + /** + * Fills temporary menu locations based on menus translations + * + * @since 1.2 + * + * @param bool|array $menus Associative array of registered navigation menu IDs keyed by their location name. + * @return bool|array + */ + public function theme_mod_nav_menu_locations( $menus ) { + // Prefill locations with 0 value in case a location does not exist in $menus + $locations = get_registered_nav_menus(); + if ( is_array( $locations ) ) { + $locations = array_fill_keys( array_keys( $locations ), 0 ); + $menus = is_array( $menus ) ? array_merge( $locations, $menus ) : $locations; + } + + if ( is_array( $menus ) ) { + foreach ( array_keys( $menus ) as $loc ) { + foreach ( $this->model->get_languages_list() as $lang ) { + if ( ! empty( $this->options['nav_menus'][ $this->theme ][ $loc ][ $lang->slug ] ) && term_exists( $this->options['nav_menus'][ $this->theme ][ $loc ][ $lang->slug ], 'nav_menu' ) ) { + $menus[ $this->combine_location( $loc, $lang ) ] = $this->options['nav_menus'][ $this->theme ][ $loc ][ $lang->slug ]; + } + } + } + } + + return $menus; + } + + /** + * Removes the nav menu term_id from the locations stored in Polylang options when a nav menu is deleted + * + * @since 1.7.3 + * + * @param int $term_id nav menu id + * @return void + */ + public function delete_nav_menu( $term_id ) { + $nav_menus = $this->options->get( 'nav_menus' ); + + if ( empty( $nav_menus ) ) { + return; + } + + foreach ( $nav_menus as $theme => $locations ) { + foreach ( $locations as $loc => $languages ) { + foreach ( $languages as $lang => $menu_id ) { + if ( $menu_id === $term_id ) { + unset( $nav_menus[ $theme ][ $loc ][ $lang ] ); + } + } + } + } + + $this->options->set( 'nav_menus', $nav_menus ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-notices.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-notices.php new file mode 100644 index 0000000..3dd2e93 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-notices.php @@ -0,0 +1,295 @@ +options = $polylang->options; + + add_action( 'admin_init', array( $this, 'hide_notice' ) ); + add_action( 'admin_notices', array( $this, 'display_notices' ) ); + } + + /** + * Add a custom notice + * + * @since 2.3.9 + * + * @param string $name Notice name + * @param string $html Content of the notice + * @return void + */ + public static function add_notice( $name, $html ) { + self::$notices[ $name ] = $html; + } + + /** + * Get custom notices. + * + * @since 2.3.9 + * + * @return string[] + */ + public static function get_notices() { + return self::$notices; + } + + /** + * Has a notice been dismissed? + * + * @since 2.3.9 + * + * @param string $notice Notice name + * @return bool + */ + public static function is_dismissed( $notice ) { + $dismissed = get_option( 'pll_dismissed_notices', array() ); + + // Handle legacy user meta + $dismissed_meta = get_user_meta( get_current_user_id(), 'pll_dismissed_notices', true ); + if ( is_array( $dismissed_meta ) ) { + if ( array_diff( $dismissed_meta, $dismissed ) ) { + $dismissed = array_merge( $dismissed, $dismissed_meta ); + update_option( 'pll_dismissed_notices', $dismissed ); + } + if ( ! is_multisite() ) { + // Don't delete on multisite to avoid the notices to appear in other sites. + delete_user_meta( get_current_user_id(), 'pll_dismissed_notices' ); + } + } + + return in_array( $notice, $dismissed ); + } + + /** + * Should we display notices on this screen? + * + * @since 2.3.9 + * + * @param string $notice The notice name. + * @param array $allowed_screens The screens allowed to display the notice. + * If empty, default screens are used, i.e. dashboard, plugins, languages, strings and settings. + * + * @return bool + */ + protected function can_display_notice( string $notice, array $allowed_screens = array() ) { + $screen = get_current_screen(); + + if ( empty( $screen ) ) { + return false; + } + + if ( empty( $allowed_screens ) ) { + $allowed_screens = array( + 'dashboard', + 'plugins', + PLL_Admin_Base::get_screen_id( 'lang' ), + PLL_Admin_Base::get_screen_id( 'strings' ), + PLL_Admin_Base::get_screen_id( 'settings' ), + ); + } + + /** + * Filters admin notices which can be displayed. + * + * @since 2.7.0 + * + * @param bool $display Whether the notice should be displayed or not. + * @param string $notice The notice name. + */ + return apply_filters( 'pll_can_display_notice', in_array( $screen->id, $allowed_screens, true ), $notice ); + } + + /** + * Stores a dismissed notice in the database. + * + * @since 2.3.9 + * + * @param string $notice Notice name. + * @return void + */ + public static function dismiss( $notice ) { + $dismissed = get_option( 'pll_dismissed_notices', array() ); + + if ( ! in_array( $notice, $dismissed ) ) { + $dismissed[] = $notice; + update_option( 'pll_dismissed_notices', array_unique( $dismissed ) ); + } + } + + /** + * Handle a click on the dismiss button + * + * @since 2.3.9 + * + * @return void + */ + public function hide_notice() { + if ( isset( $_GET['pll-hide-notice'], $_GET['_pll_notice_nonce'] ) ) { + $notice = sanitize_key( $_GET['pll-hide-notice'] ); + check_admin_referer( $notice, '_pll_notice_nonce' ); + self::dismiss( $notice ); + wp_safe_redirect( remove_query_arg( array( 'pll-hide-notice', '_pll_notice_nonce' ), wp_get_referer() ) ); + exit; + } + } + + /** + * Displays notices + * + * @since 2.3.9 + * + * @return void + */ + public function display_notices() { + if ( current_user_can( 'manage_options' ) ) { + // Core notices + if ( defined( 'WOOCOMMERCE_VERSION' ) && ! defined( 'PLLWC_VERSION' ) && $this->can_display_notice( 'pllwc' ) && ! static::is_dismissed( 'pllwc' ) ) { + $this->pllwc_notice(); + } + + if ( ! defined( 'POLYLANG_PRO' ) && $this->can_display_notice( 'review' ) && ! static::is_dismissed( 'review' ) && ! empty( $this->options['first_activation'] ) && time() > $this->options['first_activation'] + 15 * DAY_IN_SECONDS ) { + $this->review_notice(); + } + + $allowed_screen = PLL_Admin_Base::get_screen_id( 'strings' ); + if ( + ( ! empty( $this->options['previous_version'] ) && version_compare( $this->options['previous_version'], '3.7.0', '<' ) ) + && $this->can_display_notice( 'empty-strings-translations', (array) $allowed_screen ) + && ! static::is_dismissed( 'empty-strings-translations' ) + ) { + $this->empty_strings_translations_notice(); + } + + // Custom notices + foreach ( static::get_notices() as $notice => $html ) { + if ( $this->can_display_notice( $notice ) && ! static::is_dismissed( $notice ) ) { + ?> +
    + dismiss_button( $notice ); + echo wp_kses_post( $html ); + ?> +
    + %s', + esc_url( wp_nonce_url( add_query_arg( 'pll-hide-notice', $name ), $name, '_pll_notice_nonce' ) ), + /* translators: accessibility text */ + esc_html__( 'Dismiss this notice.', 'polylang' ) + ); + } + + /** + * Displays a notice if WooCommerce is activated without Polylang for WooCommerce + * + * @since 2.3.9 + * + * @return void + */ + private function pllwc_notice() { + ?> +
    + dismiss_button( 'pllwc' ); ?> +

    + ', + '' + ); + ?> +

    +
    + +
    + dismiss_button( 'review' ); ?> +

    + ', + '' + ); + ?> +

    +
    + +
    + dismiss_button( 'empty-strings-translations' ); ?> +

    + +

    +
    + links = &$polylang->links; + + // Add post state for translations of the front page and posts page + add_filter( 'display_post_states', array( $this, 'display_post_states' ), 10, 2 ); + + // Refreshes the language cache when a static front page or page for for posts has been translated. + add_action( 'pll_save_post', array( $this, 'pll_save_post' ), 10, 3 ); + + // Prevents WP resetting the option + add_filter( 'pre_update_option_show_on_front', array( $this, 'update_show_on_front' ), 10, 2 ); + + add_action( 'admin_notices', array( $this, 'notice_must_translate' ) ); + } + + /** + * Adds post state for translations of the front page and posts page. + * + * @since 1.8 + * + * @param string[] $post_states An array of post display states. + * @param WP_Post $post The current post object. + * @return string[] + */ + public function display_post_states( $post_states, $post ) { + if ( in_array( $post->ID, $this->model->get_languages_list( array( 'fields' => 'page_on_front' ) ) ) ) { + $post_states['page_on_front'] = __( 'Front Page', 'polylang' ); + } + + if ( in_array( $post->ID, $this->model->get_languages_list( array( 'fields' => 'page_for_posts' ) ) ) ) { + $post_states['page_for_posts'] = __( 'Posts Page', 'polylang' ); + } + + return $post_states; + } + + /** + * Refreshes the language cache when a static front page or page for for posts has been translated. + * + * @since 1.8 + * + * @param int $post_id Not used. + * @param WP_Post $post Not used. + * @param int[] $translations Translations of the post being saved. + * @return void + */ + public function pll_save_post( $post_id, $post, $translations ) { + if ( in_array( $this->page_on_front, $translations ) || in_array( $this->page_for_posts, $translations ) ) { + $this->model->clean_languages_cache(); + } + } + + /** + * Prevents WP resetting the option if the admin language filter is active for a language with no pages. + * + * @since 1.9.3 + * + * @param string $value The new, unserialized option value. + * @param string $old_value The old option value. + * @return string + */ + public function update_show_on_front( $value, $old_value ) { + if ( ! empty( $GLOBALS['pagenow'] ) && 'options-reading.php' === $GLOBALS['pagenow'] && 'posts' === $value && ! get_pages() && get_pages( array( 'lang' => '' ) ) ) { + $value = $old_value; + } + return $value; + } + + /** + * Add a notice to translate the static front page if it is not translated in all languages + * This is especially useful after a new language is created. + * The notice is not dismissible and displayed on the Languages pages and the list of pages. + * + * @since 2.6 + * + * @return void + */ + public function notice_must_translate() { + $screen = get_current_screen(); + + if ( ! empty( $screen ) && ( PLL_Admin_Base::get_screen_id( 'lang' ) === $screen->id || 'edit-page' === $screen->id ) ) { + $message = $this->get_must_translate_message(); + + if ( ! empty( $message ) ) { + printf( + '

    %s

    ', + $message // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ); + } + } + } + + /** + * Returns the message asking to translate the static front page in all languages. + * + * @since 2.8 + * + * @return string + */ + public function get_must_translate_message() { + if ( ! $this->page_on_front ) { + return ''; + } + + $page_on_front = get_post( $this->page_on_front ); + + if ( ! $page_on_front instanceof WP_Post ) { + return ''; + } + + $untranslated = array(); + + foreach ( $this->model->get_languages_list() as $language ) { + if ( ! $this->model->post->get( $page_on_front->ID, $language ) ) { + $untranslated[] = sprintf( + '%s', + esc_url( $this->links->get_new_post_translation_link( $page_on_front, $language ) ), + esc_html( $language->name ) + ); + } + } + + if ( empty( $untranslated ) ) { + return ''; + } + + return sprintf( + /* translators: %s is a comma separated list of native language names */ + esc_html__( 'You must translate your static front page in %s.', 'polylang' ), + implode( ', ', $untranslated ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-strings.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-strings.php new file mode 100644 index 0000000..93d8c2a --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin-strings.php @@ -0,0 +1,152 @@ + __( 'Widget title', 'polylang' ), + 'widget_text' => __( 'Widget text', 'polylang' ), + ); + + global $wp_registered_widgets; + $sidebars = wp_get_sidebars_widgets(); + foreach ( $sidebars as $sidebar => $widgets ) { + if ( 'wp_inactive_widgets' == $sidebar || empty( $widgets ) ) { + continue; + } + + foreach ( $widgets as $widget ) { + // Nothing can be done if the widget is created using pre WP2.8 API. There is no object, so we can't access it to get the widget options. + if ( ! isset( $wp_registered_widgets[ $widget ]['callback'][0] ) || ! $wp_registered_widgets[ $widget ]['callback'][0] instanceof WP_Widget ) { + continue; + } + + $widget_instance = $wp_registered_widgets[ $widget ]['callback'][0]; + $widget_settings = $widget_instance->get_settings(); + $number = $wp_registered_widgets[ $widget ]['params'][0]['number']; + + // Don't enable widget translation if the widget is visible in only one language or if there is no title. + if ( ! empty( $widget_settings[ $number ]['pll_lang'] ) ) { + continue; + } + + // Widget title. + if ( ! empty( $widget_settings[ $number ]['title'] ) ) { + self::register_string( self::$default_strings['widget_title'], $widget_settings[ $number ]['title'], 'Widget' ); + } + + // Text of the Widget text. + if ( ! empty( $widget_settings[ $number ]['text'] ) ) { + self::register_string( self::$default_strings['widget_text'], $widget_settings[ $number ]['text'], 'Widget', true ); + } + + // Content of the widget custom html. + if ( $widget_instance instanceof WP_Widget_Custom_HTML && ! empty( $widget_settings[ $number ]['content'] ) ) { + self::register_string( self::$default_strings['widget_text'], $widget_settings[ $number ]['content'], 'Widget', true ); + } + } + } + + /** + * Filter the list of strings registered for translation + * Mainly for use by our PLL_WPML_Compat class + * + * @since 1.0.2 + * + * @param array $strings list of strings + */ + self::$strings = apply_filters( 'pll_get_strings', self::$strings ); + return self::$strings; + } + + /** + * Performs the sanitization ( before saving in DB ) of default strings translations + * + * @since 1.6 + * + * @param string $translation The string translation. + * @param string $name The name as defined in pll_register_string. Unused. + * @param string $context The context as defined in pll_register_string. Unused. + * @param string $original The original string to translate. Unused. + * @param string $previous The previous string translation. + * @return string + */ + public static function sanitize_string_translation( $translation, $name, $context, $original, $previous ) { + if ( trim( $previous ) === trim( $translation ) ) { + // Don't overwrite the translation to prevent breaking the string. + return $translation; + } + + if ( $name === self::$default_strings['widget_title'] ) { + return sanitize_text_field( $translation ); + } + + if ( ! current_user_can( 'unfiltered_html' ) ) { + $translation = wp_kses_post( $translation ); + } + + return $translation; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin.php new file mode 100644 index 0000000..4b95c18 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/admin.php @@ -0,0 +1,180 @@ +model->has_languages() ) { + add_action( 'wp_loaded', array( $this, 'add_filters' ), 5 ); + } + } + + /** + * Adds a 'settings' link for our plugin in the plugins list table. + * + * @since 0.1 + * + * @param string[] $links List of links associated to the plugin. + * @return string[] Modified list of links. + */ + public function plugin_action_links( $links ) { + array_unshift( $links, '' . __( 'Settings', 'polylang' ) . '' ); + return $links; + } + + /** + * Adds the upgrade notice in plugins table + * + * @since 1.1.6 + * + * @param array $plugin_data Not used + * @param object $r Plugin update data + * @return void + */ + public function plugin_update_message( $plugin_data, $r ) { + if ( ! empty( $r->upgrade_notice ) ) { + printf( '

    %s

    ', esc_html( $r->upgrade_notice ) ); + } + } + + /** + * Setup filters for admin pages + * + * @since 1.2 + * @since 2.7 instantiate a PLL_Bulk_Translate instance. + * @return void + */ + public function add_filters() { + $this->filters_sanitization = new PLL_Filters_Sanitization( $this->get_locale_for_sanitization() ); + $this->filters_widgets_options = new PLL_Admin_Filters_Widgets_Options( $this ); + + // All these are separated just for convenience and maintainability + $classes = array( 'Filters', 'Filters_Columns', 'Filters_Post', 'Filters_Term', 'Nav_Menu', 'Classic_Editor', 'Block_Editor' ); + + // Don't load media filters if option is disabled or if user has no right + if ( $this->options['media_support'] && ( $obj = get_post_type_object( 'attachment' ) ) && ( current_user_can( $obj->cap->edit_posts ) || current_user_can( $obj->cap->create_posts ) ) ) { + $classes[] = 'Filters_Media'; + } + + foreach ( $classes as $class ) { + $obj = strtolower( $class ); + + /** + * Filter the class to instantiate when loading admin filters + * + * @since 1.5 + * + * @param string $class class name + */ + $class = apply_filters( 'pll_' . $obj, 'PLL_Admin_' . $class ); + $this->$obj = new $class( $this ); + } + } + + /** + * Retrieve the locale according to the current language instead of the language + * of the admin interface. + * + * @since 2.0 + * + * @return string + */ + public function get_locale_for_sanitization() { + $locale = get_locale(); + + if ( isset( $_POST['post_lang_choice'] ) && $lang = $this->model->get_language( sanitize_key( $_POST['post_lang_choice'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $locale = $lang->locale; + } elseif ( isset( $_POST['term_lang_choice'] ) && $lang = $this->model->get_language( sanitize_key( $_POST['term_lang_choice'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $locale = $lang->locale; + } elseif ( isset( $_POST['inline_lang_choice'] ) && $lang = $this->model->get_language( sanitize_key( $_POST['inline_lang_choice'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $locale = $lang->locale; + } elseif ( ! empty( $this->curlang ) ) { + $locale = $this->curlang->locale; + } + + return $locale; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-media.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-media.php new file mode 100644 index 0000000..4f09773 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-media.php @@ -0,0 +1,51 @@ + +

    + + model->get_languages_list() as $language ) { + if ( $language->term_id === $lang->term_id ) { + continue; + } + + $translation_id = $this->model->post->get_translation( $post->ID, $language ); + $translation = null; + + if ( ! empty( $translation_id ) && $translation_id !== $post->ID ) { + $translation = get_post( $translation_id ); + } + ?> + + + + + +
    flag; // phpcs:ignore WordPress.Security.EscapeOutput ?>name ); ?> + ', + esc_attr( $language->slug ), + (int) $translation->ID + ); + echo $this->links->get_edit_post_link_html( $translation ); // phpcs:ignore WordPress.Security.EscapeOutput + } else { + // The translation doesn't exist. + echo $this->links->get_new_post_link_html( $post, $language ); // phpcs:ignore WordPress.Security.EscapeOutput + } + ?> +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-post.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-post.php new file mode 100644 index 0000000..1fbbe4b --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-post.php @@ -0,0 +1,79 @@ + +

    + + model->get_languages_list() as $language ) { + if ( $language->term_id === $lang->term_id ) { + continue; + } + + $translation_id = $this->model->post->get_translation( $post->ID, $language ); + if ( ! $translation_id || $translation_id === $post->ID ) { // $translation_id == $post->ID happens if the post has been (auto)saved before changing the language. + $translation_id = 0; + } + + if ( ! empty( $from_post_id ) ) { + $translation_id = $this->model->post->get( $from_post_id, $language ); + } + + $add_link = $this->links->get_new_post_link_html( $post, $language ); + $link = $add_link; + $translation = null; + if ( $translation_id ) { + $translation = get_post( $translation_id ); + + if ( $translation instanceof WP_Post ) { + $link = $this->links->get_edit_post_link_html( $translation ); + } + } + ?> + + + + + slug, $post->post_type ); + ?> + + + +
    flag ?: esc_html( $language->slug ); // phpcs:ignore WordPress.Security.EscapeOutput ?> + %2$s + + ', + esc_attr( $language->slug ), + /* translators: accessibility text */ + esc_html__( 'Translation', 'polylang' ), + ( empty( $translation ) ? '0' : esc_attr( (string) $translation->ID ) ), + ( empty( $translation ) ? '' : esc_attr( $translation->post_title ) ), + esc_attr( $language->get_locale( 'display' ) ), + ( $language->is_rtl ? 'rtl' : 'ltr' ) + ); + ?> +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-term.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-term.php new file mode 100644 index 0000000..c84dae1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/admin/view-translations-term.php @@ -0,0 +1,102 @@ + + + + +

    + + + model->get_languages_list() as $language ) { + if ( $language->term_id == $lang->term_id ) { + continue; + } + + // Look for any existing translation in this language + // Take care not to propose a self link + $translation = null; + if ( ! empty( $term ) && ( $translation_id = $this->model->term->get_translation( $term->term_id, $language ) ) && $translation_id !== $term->term_id ) { + $translation = get_term( $translation_id, $taxonomy ); + } + if ( ! empty( $from_term_id ) && ( $translation_id = $this->model->term->get( $from_term_id, $language ) ) && ! $this->model->term->get_translation( $translation_id, $lang ) ) { + $translation = get_term( $translation_id, $taxonomy ); + } + $translation_exists = $translation instanceof WP_Term; + + $add_link = ! empty( $term ) ? $this->links->get_new_term_link_html( $term, $post_type, $language ) : ''; // Do not display the add new link in add term form ($term not set). + $link = $add_link; + + if ( $translation_exists ) { + $link = $this->links->get_edit_term_link_html( $translation, $post_type ); + } + ?> + + + + + + + + + +
    + flag ?: esc_html( $language->slug ); // phpcs:ignore WordPress.Security.EscapeOutput ?> + %2$s', + ! empty( $term ) ? '' : ' screen-reader-text', + esc_html( $language->name ) + ); + ?> + + %2$s + + ', + esc_attr( $language->slug ), + /* translators: accessibility text */ + esc_html__( 'Translation', 'polylang' ), + $translation_exists ? (int) $translation->term_id : 0, + $translation_exists ? esc_attr( $translation->name ) : '', + disabled( empty( $disabled ), false, false ), + esc_attr( $language->get_locale( 'display' ) ), + ( $language->is_rtl ? 'rtl' : 'ltr' ) + ); + ?> +
    + + + links ) ) { + return empty( $args['raw'] ) ? '' : array(); + } + + $switcher = new PLL_Switcher(); + return $switcher->the_languages( PLL()->links, $args ); +} + +/** + * Returns the current language on frontend. + * Returns the language set in admin language filter on backend (false if set to all languages). + * + * @api + * @since 0.8.1 + * @since 3.4 Accepts composite values. + * + * @param string $field Optional, the language field to return (@see PLL_Language), defaults to `'slug'`. + * Pass `\OBJECT` constant to get the language object. A composite value can be used for language + * term property values, in the form of `{language_taxonomy_name}:{property_name}` (see + * {@see PLL_Language::get_tax_prop()} for the possible values). Ex: `term_language:term_taxonomy_id`. + * @return string|int|bool|string[]|PLL_Language The requested field or object for the current language, `false` if the field isn't set or if current language doesn't exist yet. + * + * @phpstan-return ( + * $field is \OBJECT ? PLL_Language : ( + * $field is 'slug' ? non-empty-string : string|int|bool|list + * ) + * )|false + */ +function pll_current_language( $field = 'slug' ) { + if ( empty( PLL()->curlang ) ) { + return false; + } + + if ( \OBJECT === $field ) { + return PLL()->curlang; + } + + return PLL()->curlang->get_prop( $field ); +} + +/** + * Returns the default language. + * + * @api + * @since 1.0 + * @since 3.4 Accepts composite values. + * + * @param string $field Optional, the language field to return (@see PLL_Language), defaults to `'slug'`. + * Pass `\OBJECT` constant to get the language object. A composite value can be used for language + * term property values, in the form of `{language_taxonomy_name}:{property_name}` (see + * {@see PLL_Language::get_tax_prop()} for the possible values). Ex: `term_language:term_taxonomy_id`. + * @return string|int|bool|string[]|PLL_Language The requested field or object for the default language, `false` if the field isn't set or if default language doesn't exist yet. + * + * @phpstan-return ( + * $field is \OBJECT ? PLL_Language : ( + * $field is 'slug' ? non-empty-string : string|int|bool|list + * ) + * )|false + */ +function pll_default_language( $field = 'slug' ) { + $lang = PLL()->model->get_default_language(); + + if ( empty( $lang ) ) { + return false; + } + + if ( \OBJECT === $field ) { + return $lang; + } + + return $lang->get_prop( $field ); +} + +/** + * Among the post and its translations, returns the ID of the post which is in the language represented by $lang. + * + * @api + * @since 0.5 + * @since 3.4 Returns `0` instead of `false` if not translated or if the post has no language. + * @since 3.4 $lang accepts `PLL_Language` or string. + * + * @param int $post_id Post ID. + * @param PLL_Language|string $lang Optional language (object or slug), defaults to the current language. + * @return int The translation post ID if exists. 0 if not translated, the post has no language or if the language doesn't exist. + * + * @phpstan-return int<0, max> + */ +function pll_get_post( $post_id, $lang = '' ) { + $lang = $lang ?: pll_current_language(); + + if ( empty( $lang ) ) { + return 0; + } + + return PLL()->model->post->get( $post_id, $lang ); +} + +/** + * Among the term and its translations, returns the ID of the term which is in the language represented by $lang. + * + * @api + * @since 0.5 + * @since 3.4 Returns `0` instead of `false` if not translated or if the term has no language. + * @since 3.4 $lang accepts PLL_Language or string. + * + * @param int $term_id Term ID. + * @param PLL_Language|string $lang Optional language (object or slug), defaults to the current language. + * @return int The translation term ID if exists. 0 if not translated, the term has no language or if the language doesn't exist. + * + * @phpstan-return int<0, max> + */ +function pll_get_term( $term_id, $lang = '' ) { + $lang = $lang ?: pll_current_language(); + + if ( empty( $lang ) ) { + return 0; + } + + return PLL()->model->term->get( $term_id, $lang ); +} + +/** + * Returns the home url in a language. + * + * @api + * @since 0.8 + * + * @param string $lang Optional language code, defaults to the current language. + * @return string + */ +function pll_home_url( $lang = '' ) { + if ( empty( $lang ) ) { + $lang = pll_current_language(); + } + + if ( empty( $lang ) || empty( PLL()->links ) ) { + return home_url( '/' ); + } + + return PLL()->links->get_home_url( $lang ); +} + +/** + * Registers a string for translation in the "strings translation" panel. + * + * @api + * @since 0.6 + * + * @param string $name A unique name for the string. + * @param string $string The string to register. + * @param string $context Optional, the group in which the string is registered, defaults to 'polylang'. + * @param bool $multiline Optional, true if the string table should display a multiline textarea, + * false if should display a single line input, defaults to false. + * @return void + */ +function pll_register_string( $name, $string, $context = 'Polylang', $multiline = false ) { + if ( PLL() instanceof PLL_Admin_Base ) { + PLL_Admin_Strings::register_string( $name, $string, $context, $multiline ); + } +} + +/** + * Translates a string ( previously registered with pll_register_string ). + * + * @api + * @since 0.6 + * + * @param string $string The string to translate. + * @return string The string translated in the current language. + */ +function pll__( $string ) { + if ( ! is_scalar( $string ) || '' === $string ) { + return $string; + } + + return __( $string, 'pll_string' ); // PHPCS:ignore WordPress.WP.I18n +} + +/** + * Translates a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML output. + * + * @api + * @since 2.1 + * + * @param string $string The string to translate. + * @return string The string translated in the current language. + */ +function pll_esc_html__( $string ) { + return esc_html( pll__( $string ) ); +} + +/** + * Translates a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML attributes. + * + * @api + * @since 2.1 + * + * @param string $string The string to translate. + * @return string The string translated in the current language. + */ +function pll_esc_attr__( $string ) { + return esc_attr( pll__( $string ) ); +} + +/** + * Echoes a translated string ( previously registered with pll_register_string ) + * It is an equivalent of _e() and is not escaped. + * + * @api + * @since 0.6 + * + * @param string $string The string to translate. + * @return void + */ +function pll_e( $string ) { + echo pll__( $string ); // phpcs:ignore +} + +/** + * Echoes a translated string ( previously registered with pll_register_string ) and escapes it for safe use in HTML output. + * + * @api + * @since 2.1 + * + * @param string $string The string to translate. + * @return void + */ +function pll_esc_html_e( $string ) { + echo pll_esc_html__( $string ); // phpcs:ignore WordPress.Security.EscapeOutput +} + +/** + * Echoes a translated a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML attributes. + * + * @api + * @since 2.1 + * + * @param string $string The string to translate. + * @return void + */ +function pll_esc_attr_e( $string ) { + echo pll_esc_attr__( $string ); // phpcs:ignore WordPress.Security.EscapeOutput +} + +/** + * Translates a string ( previously registered with pll_register_string ). + * + * @api + * @since 1.5.4 + * + * @param string $string The string to translate. + * @param string $lang Language code. + * @return string The string translated in the requested language. + */ +function pll_translate_string( $string, $lang ) { + if ( PLL() instanceof PLL_Frontend && pll_current_language() === $lang ) { + return pll__( $string ); + } + + if ( ! is_scalar( $string ) || '' === $string ) { + return $string; + } + + $lang = PLL()->model->get_language( $lang ); + + if ( empty( $lang ) ) { + return $string; + } + + $mo = new PLL_MO(); + $mo->import_from_db( $lang ); + + return $mo->translate( $string ); +} + +/** + * Returns true if Polylang manages languages and translations for this post type. + * + * @api + * @since 1.0.1 + * + * @param string $post_type Post type name. + * @return bool + */ +function pll_is_translated_post_type( $post_type ) { + return PLL()->model->is_translated_post_type( $post_type ); +} + +/** + * Returns true if Polylang manages languages and translations for this taxonomy. + * + * @api + * @since 1.0.1 + * + * @param string $tax Taxonomy name. + * @return bool + */ +function pll_is_translated_taxonomy( $tax ) { + return PLL()->model->is_translated_taxonomy( $tax ); +} + +/** + * Returns the list of available languages. + * + * @api + * @since 1.5 + * + * @param array $args { + * Optional array of arguments. + * + * @type bool $hide_empty Hides languages with no posts if set to true ( defaults to false ). + * @type string $fields Return only that field if set ( @see PLL_Language for a list of fields ), defaults to 'slug'. + * } + * @return string[] + */ +function pll_languages_list( $args = array() ) { + $args = wp_parse_args( $args, array( 'fields' => 'slug' ) ); + $hide_empty = ! empty( $args['hide_empty'] ) ? 'hide_empty' : ''; + $hide_default = ! empty( $args['hide_default'] ) ? 'hide_default' : ''; + unset( $args['hide_empty'], $args['hide_default'] ); + + return PLL()->model->languages + ->filter( $hide_empty ) + ->filter( $hide_default ) + ->get_list( $args ); +} + +/** + * Sets the post language. + * + * @api + * @since 1.5 + * @since 3.4 $lang accepts PLL_Language or string. + * @since 3.4 Returns a boolean. + * + * @param int $id Post ID. + * @param PLL_Language|string $lang Language (object or slug). + * @return bool True when successfully assigned. False otherwise (or if the given language is already assigned to + * the post). + */ +function pll_set_post_language( $id, $lang ) { + return PLL()->model->post->set_language( $id, $lang ); +} + +/** + * Sets the term language. + * + * @api + * @since 1.5 + * @since 3.4 $lang accepts PLL_Language or string. + * @since 3.4 Returns a boolean. + * + * @param int $id Term ID. + * @param PLL_Language|string $lang Language (object or slug). + * @return bool True when successfully assigned. False otherwise (or if the given language is already assigned to + * the term). + */ +function pll_set_term_language( $id, $lang ) { + return PLL()->model->term->set_language( $id, $lang ); +} + +/** + * Save posts translations. + * + * @api + * @since 1.5 + * @since 3.4 Returns an associative array of translations. + * + * @param int[] $arr An associative array of translations with language code as key and post ID as value. + * @return int[] An associative array with language codes as key and post IDs as values. + * + * @phpstan-return array + */ +function pll_save_post_translations( $arr ) { + $id = reset( $arr ); + if ( $id ) { + return PLL()->model->post->save_translations( $id, $arr ); + } + + return array(); +} + +/** + * Save terms translations + * + * @api + * @since 1.5 + * @since 3.4 Returns an associative array of translations. + * + * @param int[] $arr An associative array of translations with language code as key and term ID as value. + * @return int[] An associative array with language codes as key and term IDs as values. + * + * @phpstan-return array + */ +function pll_save_term_translations( $arr ) { + $id = reset( $arr ); + if ( $id ) { + return PLL()->model->term->save_translations( $id, $arr ); + } + + return array(); +} + +/** + * Returns the post language. + * + * @api + * @since 1.5.4 + * @since 3.4 Accepts composite values for `$field`. + * + * @param int $post_id Post ID. + * @param string $field Optional, the language field to return (@see PLL_Language), defaults to `'slug'`. + * Pass `\OBJECT` constant to get the language object. A composite value can be used for language + * term property values, in the form of `{language_taxonomy_name}:{property_name}` (see + * {@see PLL_Language::get_tax_prop()} for the possible values). Ex: `term_language:term_taxonomy_id`. + * @return string|int|bool|string[]|PLL_Language The requested field or object for the post language, `false` if no language is associated to that post. + * + * @phpstan-return ( + * $field is \OBJECT ? PLL_Language : ( + * $field is 'slug' ? non-empty-string : string|int|bool|list + * ) + * )|false + */ +function pll_get_post_language( $post_id, $field = 'slug' ) { + $lang = PLL()->model->post->get_language( $post_id ); + + if ( empty( $lang ) || \OBJECT === $field ) { + return $lang; + } + + return $lang->get_prop( $field ); +} + +/** + * Returns the term language. + * + * @api + * @since 1.5.4 + * @since 3.4 Accepts composite values for `$field`. + * + * @param int $term_id Term ID. + * @param string $field Optional, the language field to return (@see PLL_Language), defaults to `'slug'`. + * Pass `\OBJECT` constant to get the language object. A composite value can be used for language + * term property values, in the form of `{language_taxonomy_name}:{property_name}` (see + * {@see PLL_Language::get_tax_prop()} for the possible values). Ex: `term_language:term_taxonomy_id`. + * @return string|int|bool|string[]|PLL_Language The requested field or object for the post language, `false` if no language is associated to that term. + * + * @phpstan-return ( + * $field is \OBJECT ? PLL_Language : ( + * $field is 'slug' ? non-empty-string : string|int|bool|list + * ) + * )|false + */ +function pll_get_term_language( $term_id, $field = 'slug' ) { + $lang = PLL()->model->term->get_language( $term_id ); + + if ( empty( $lang ) || \OBJECT === $field ) { + return $lang; + } + + return $lang->get_prop( $field ); +} + +/** + * Returns an array of translations of a post. + * + * @api + * @since 1.8 + * + * @param int $post_id Post ID. + * @return int[] An associative array of translations with language code as key and translation post ID as value. + * + * @phpstan-return array + */ +function pll_get_post_translations( $post_id ) { + return PLL()->model->post->get_translations( $post_id ); +} + +/** + * Returns an array of translations of a term. + * + * @api + * @since 1.8 + * + * @param int $term_id Term ID. + * @return int[] An associative array of translations with language code as key and translation term ID as value. + * + * @phpstan-return array + */ +function pll_get_term_translations( $term_id ) { + return PLL()->model->term->get_translations( $term_id ); +} + +/** + * Counts posts in a language. + * + * @api + * @since 1.5 + * + * @param string $lang Language code. + * @param array $args { + * Optional array of arguments. + * + * @type string $post_type Post type. + * @type int $m YearMonth ( ex: 201307 ). + * @type int $year 4 digit year. + * @type int $monthnum Month number (from 1 to 12). + * @type int $day Day of the month (from 1 to 31). + * @type int $author Author id. + * @type string $author_name Author nicename. + * @type string $post_format Post format. + * @type string $post_status Post status. + * } + * @return int Posts count. + */ +function pll_count_posts( $lang, $args = array() ) { + $lang = PLL()->model->get_language( $lang ); + + if ( empty( $lang ) ) { + return 0; + } + + return PLL()->model->count_posts( $lang, $args ); +} + +/** + * Wraps `wp_insert_post` with language feature. + * + * @since 3.7 + * + * @param array $postarr { + * An array of elements that make up a post to insert. + * @See https://developer.wordpress.org/reference/functions/wp_insert_post/ wp_insert_post() for accepted arguments. + * + * @type string[] $translations The translation group to assign to the post with language slug as keys and post ID as values. + * } + * @param PLL_Language|string $language The post language object or slug. + * @return int|WP_Error The post ID on success. The value `WP_Error` on failure. + */ +function pll_insert_post( array $postarr, $language ) { + $language = PLL()->model->get_language( $language ); + + if ( ! $language instanceof PLL_Language ) { + return new WP_Error( 'invalid_language', __( 'Please provide a valid language.', 'polylang' ) ); + } + + return PLL()->model->post->insert( $postarr, $language ); +} + +/** + * Wraps `wp_insert_term` with language feature. + * + * @since 3.7 + * + * @param string $term The term name to add. + * @param string $taxonomy The taxonomy to which to add the term. + * @param PLL_Language|string $language The term language object or slug. + * @param array $args { + * Optional. Array of arguments for inserting a term. + * + * @type string $alias_of Slug of the term to make this term an alias of. + * Default empty string. Accepts a term slug. + * @type string $description The term description. Default empty string. + * @type int $parent The id of the parent term. Default 0. + * @type string $slug The term slug to use. Default empty string. + * @type string[] $translations The translation group to assign to the term with language slug as keys and `term_id` as values. + * } + * @return array|WP_Error { + * An array of the new term data, `WP_Error` otherwise. + * + * @type int $term_id The new term ID. + * @type int|string $term_taxonomy_id The new term taxonomy ID. Can be a numeric string. + * } + */ +function pll_insert_term( string $term, string $taxonomy, $language, array $args = array() ) { + $language = PLL()->model->get_language( $language ); + + if ( ! $language instanceof PLL_Language ) { + return new WP_Error( 'invalid_language', __( 'Please provide a valid language.', 'polylang' ) ); + } + + return PLL()->model->term->insert( $term, $taxonomy, $language, $args ); +} + +/** + * Wraps `wp_update_post` with language feature. + * + * @since 3.7 + * + * @param array $postarr { + * Optional. An array of elements that make up a post to update. + * @See https://developer.wordpress.org/reference/functions/wp_insert_post/ wp_insert_post() for accepted arguments. + * + * @type PLL_Language|string $lang The post language object or slug. + * @type string[] $translations The translation group to assign to the post with language slug as keys and post ID as values. + * } + * @return int|WP_Error The post ID on success. The value `WP_Error` on failure. + */ +function pll_update_post( array $postarr ) { + return PLL()->model->post->update( $postarr ); +} + +/** + * Wraps `wp_update_term` with language feature. + * + * @since 3.7 + * + * @param int $term_id The ID of the term. + * @param array $args { + * Optional. Array of arguments for updating a term. + * + * @type string $alias_of Slug of the term to make this term an alias of. + * Default empty string. Accepts a term slug. + * @type string $description The term description. Default empty string. + * @type int $parent The id of the parent term. Default 0. + * @type string $slug The term slug to use. Default empty string. + * @type string $name The term name. + * @type PLL_Language|string $lang The term language object or slug. + * @type string[] $translations The translation group to assign to the term with language slug as keys and `term_id` as values. + * } + * @return array|WP_Error { + * An array containing the `term_id` and `term_taxonomy_id`, `WP_Error` otherwise. + * + * @type int $term_id The new term ID. + * @type int|string $term_taxonomy_id The new term taxonomy ID. Can be a numeric string. + * } + */ +function pll_update_term( int $term_id, array $args = array() ) { + return PLL()->model->term->update( $term_id, $args ); +} + +/** + * Allows to access the Polylang instance. + * However, it is always preferable to use API functions + * as internal methods may be changed without prior notice. + * + * @since 1.8 + * + * @return PLL_Frontend|PLL_Admin|PLL_Settings|PLL_REST_Request + */ +function PLL() { // PHPCS:ignore WordPress.NamingConventions.ValidFunctionName + return $GLOBALS['polylang']; +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/base.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/base.php new file mode 100644 index 0000000..0ae5f1a --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/base.php @@ -0,0 +1,237 @@ +capabilities = new Capabilities(); + $this->links_model = &$links_model; + $this->model = &$links_model->model; + $this->options = $this->model->options; + $this->request = new Request( $this->model ); + + $GLOBALS['l10n_unloaded']['pll_string'] = true; // Short-circuit _load_textdomain_just_in_time() for 'pll_string' domain in WP 4.6+ + + add_action( 'widgets_init', array( $this, 'widgets_init' ) ); + + // User defined strings translations + add_action( 'pll_language_defined', array( $this, 'load_strings_translations' ), 5 ); + add_action( 'change_locale', array( $this, 'load_strings_translations' ) ); // Since WP 4.7 + add_action( 'personal_options_update', array( $this, 'load_strings_translations' ), 1, 0 ); // Before WP, for confirmation request when changing the user email. + add_action( 'lostpassword_post', array( $this, 'load_strings_translations' ), 10, 0 ); // Password reset email. + // Switch_to_blog + add_action( 'switch_blog', array( $this, 'switch_blog' ), 10, 2 ); + } + + /** + * Instantiates classes reacting to CRUD operations on posts and terms, + * only when at least one language is defined. + * + * @since 2.6 + * + * @return void + */ + public function init() { + if ( $this->model->has_languages() ) { + $this->posts = new PLL_CRUD_Posts( $this ); + $this->terms = new PLL_CRUD_Terms( $this ); + + // WordPress options. + new PLL_Translate_Option( 'blogname', array(), array( 'context' => 'WordPress' ) ); + new PLL_Translate_Option( 'blogdescription', array(), array( 'context' => 'WordPress' ) ); + new PLL_Translate_Option( 'date_format', array(), array( 'context' => 'WordPress' ) ); + new PLL_Translate_Option( 'time_format', array(), array( 'context' => 'WordPress' ) ); + } + } + + /** + * Registers our widgets + * + * @since 0.1 + * + * @return void + */ + public function widgets_init() { + register_widget( 'PLL_Widget_Languages' ); + + // Overwrites the calendar widget to filter posts by language + if ( ! defined( 'PLL_WIDGET_CALENDAR' ) || PLL_WIDGET_CALENDAR ) { + unregister_widget( 'WP_Widget_Calendar' ); + register_widget( 'PLL_Widget_Calendar' ); + } + } + + /** + * Loads user defined strings translations + * + * @since 1.2 + * @since 2.1.3 $locale parameter added. + * + * @param string $locale Language locale or slug. Defaults to current locale. + * @return void + */ + public function load_strings_translations( $locale = '' ) { + if ( empty( $locale ) ) { + $locale = ( is_admin() && ! Polylang::is_ajax_on_front() ) ? get_user_locale() : get_locale(); + } + + $language = $this->model->get_language( $locale ); + + if ( ! empty( $language ) ) { + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + $GLOBALS['l10n']['pll_string'] = &$mo; + } else { + unset( $GLOBALS['l10n']['pll_string'] ); + } + } + + /** + * Resets some variables when the blog is switched. + * Applied only if Polylang is active on the new blog. + * + * @since 1.5.1 + * + * @param int $new_blog_id New blog ID. + * @param int $prev_blog_id Previous blog ID. + * @return void + */ + public function switch_blog( $new_blog_id, $prev_blog_id ) { + if ( (int) $new_blog_id === (int) $prev_blog_id ) { + // Do nothing if same blog. + return; + } + + $this->links_model->remove_filters(); + + if ( $this->is_active_on_current_site() ) { + $this->links_model = $this->model->get_links_model(); + } + } + + /** + * Checks if Polylang is active on the current blog (useful when the blog is switched). + * + * @since 3.5.2 + * + * @return bool + */ + protected function is_active_on_current_site(): bool { + return pll_is_plugin_active( POLYLANG_BASENAME ) && ! empty( $this->options['version'] ); + } + + /** + * Check if the customize menu should be removed or not. + * + * @since 3.2 + * + * @return bool True if it should be removed, false otherwise. + */ + public function should_customize_menu_be_removed() { + // Exit if a block theme isn't activated. + if ( ! function_exists( 'wp_is_block_theme' ) || ! wp_is_block_theme() ) { + return false; + } + + return ! $this->is_customize_register_hooked(); + } + + /** + * Tells whether or not Polylang or third party callbacks are hooked to `customize_register`. + * + * @since 3.4.3 + * + * @global $wp_filter + * + * @return bool True if Polylang's callbacks are hooked, false otherwise. + */ + protected function is_customize_register_hooked() { + global $wp_filter; + + if ( empty( $wp_filter['customize_register'] ) || ! $wp_filter['customize_register'] instanceof WP_Hook ) { + return false; + } + + /* + * 'customize_register' is hooked by: + * @see PLL_Nav_Menu::create_nav_menu_locations() + * @see PLL_Frontend_Static_Pages::filter_customizer() + */ + $floor = 0; + if ( ! empty( $this->nav_menu ) && (bool) $wp_filter['customize_register']->has_filter( 'customize_register', array( $this->nav_menu, 'create_nav_menu_locations' ) ) ) { + ++$floor; + } + + if ( ! empty( $this->static_pages ) && (bool) $wp_filter['customize_register']->has_filter( 'customize_register', array( $this->static_pages, 'filter_customizer' ) ) ) { + ++$floor; + } + + $count = array_sum( array_map( 'count', $wp_filter['customize_register']->callbacks ) ); + + return $count > $floor; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/cache.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/cache.php new file mode 100644 index 0000000..816d9ac --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/cache.php @@ -0,0 +1,121 @@ +> + */ + protected $cache = array(); + + /** + * Constructor. + * + * @since 1.7 + */ + public function __construct() { + $this->blog_id = get_current_blog_id(); + add_action( 'switch_blog', array( $this, 'switch_blog' ) ); + } + + /** + * Called when switching blog. + * + * @since 1.7 + * + * @param int $new_blog_id New blog ID. + * @return void + */ + public function switch_blog( $new_blog_id ) { + $this->blog_id = $new_blog_id; + } + + /** + * Adds a value in cache. + * + * @since 1.7 + * @since 3.6 Returns the cached value. + * + * @param string $key Cache key. + * @param mixed $data The value to add to the cache. + * @return mixed + * + * @phpstan-param non-empty-string $key + * @phpstan-param TCacheData $data + * @phpstan-return TCacheData + */ + public function set( $key, $data ) { + $this->cache[ $this->blog_id ][ $key ] = $data; + + return $data; + } + + /** + * Returns value from cache. + * + * @since 1.7 + * + * @param string $key Cache key. + * @return mixed + * + * @phpstan-param non-empty-string $key + * @phpstan-return TCacheData|false + */ + public function get( $key ) { + return $this->cache[ $this->blog_id ][ $key ] ?? false; + } + + /** + * Cleans the cache (for this blog only). + * + * @since 1.7 + * + * @param string $key Optional. Cache key. An empty string to clean the whole cache for the current blog. + * Default is an empty string. + * @return void + */ + public function clean( $key = '' ) { + if ( '' === $key ) { + unset( $this->cache[ $this->blog_id ] ); + } else { + unset( $this->cache[ $this->blog_id ][ $key ] ); + } + } + + /** + * Generates and returns a "unique" cache key, depending on `$data` and prefixed by `$prefix`. + * + * @since 3.6 + * + * @param string $prefix String to prefix the cache key. + * @param string|array|object $data Data. + * @return string + * + * @phpstan-param non-empty-string $prefix + * @phpstan-return non-empty-string + */ + public function get_unique_key( string $prefix, $data ): string { + /** @var scalar */ + $serialized = maybe_serialize( $data ); + return $prefix . md5( (string) $serialized ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/class-polylang.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/class-polylang.php new file mode 100644 index 0000000..228a696 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/class-polylang.php @@ -0,0 +1,293 @@ +upgrade() ) { // If the version is too old + return; + } + } + } else { + // In some edge cases, it's possible that no options were found in the database. + $options['version'] = POLYLANG_VERSION; + } + + /** + * Filter the model class to use + * /!\ this filter is fired *before* the $polylang object is available + * + * @since 1.5 + * + * @param string $class either PLL_Model or PLL_Admin_Model + */ + $class = apply_filters( 'pll_model', PLL_SETTINGS || self::is_wizard() ? 'PLL_Admin_Model' : 'PLL_Model' ); + /** @var PLL_Model $model */ + $model = new $class( $options ); + + if ( ! $model->has_languages() ) { + /** + * Fires when no language has been defined yet + * Used to load overridden textdomains + * + * @since 1.2 + */ + do_action( 'pll_no_language_defined' ); + } + + $class = ''; + + if ( PLL_SETTINGS ) { + $class = 'PLL_Settings'; + } elseif ( PLL_ADMIN ) { + $class = 'PLL_Admin'; + } elseif ( self::is_rest_request() ) { + $class = 'PLL_REST_Request'; + } elseif ( $model->has_languages() ) { + $class = 'PLL_Frontend'; + } + + /** + * Filters the class to use to instantiate the $polylang object + * + * @since 2.6 + * + * @param string $class A class name. + */ + $class = apply_filters( 'pll_context', $class ); + + if ( ! empty( $class ) ) { + /** @phpstan-var class-string $class */ + $this->init_context( $class, $model ); + } + } + + /** + * Polylang initialization. + * Setups the Polylang Context, loads the modules and init Polylang. + * + * @since 3.6 + * + * @param string $class The class name. + * @param PLL_Model $model Instance of PLL_Model. + * @return PLL_Base + * + * @phpstan-param class-string $class + * @phpstan-return TPLLClass + */ + public function init_context( string $class, PLL_Model $model ): PLL_Base { + global $polylang; + + $links_model = $model->get_links_model(); + $polylang = new $class( $links_model ); + + /** + * Fires after Polylang's model init. + * This is the best place to register a custom table (see `PLL_Model`'s constructor). + * /!\ This hook is fired *before* the $polylang object is available. + * /!\ The languages are also not available yet. + * + * @since 3.4 + * + * @param PLL_Model $model Polylang model. + */ + do_action( 'pll_model_init', $model ); + + $model->maybe_create_language_terms(); + + /** + * Fires after the $polylang object is created and before the API is loaded + * + * @since 2.0 + * + * @param object $polylang + */ + do_action_ref_array( 'pll_pre_init', array( &$polylang ) ); + + // Loads the API + require_once POLYLANG_DIR . '/src/api.php'; + + // Loads the modules. + $load_scripts = require POLYLANG_DIR . '/src/modules/module-build.php'; + + foreach ( $load_scripts as $load_script ) { + require_once POLYLANG_DIR . "/src/modules/{$load_script}/load.php"; + } + + $polylang->init(); + + /** + * Fires after the $polylang object and the API is loaded + * + * @since 1.7 + * + * @param object $polylang + */ + do_action_ref_array( 'pll_init', array( &$polylang ) ); + + return $polylang; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/constant-functions.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/constant-functions.php new file mode 100644 index 0000000..b72aa38 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/constant-functions.php @@ -0,0 +1,66 @@ + 0 !== $expiration ? time() + $expiration : 0, + 'path' => COOKIEPATH, + 'domain' => COOKIE_DOMAIN, // Cookie domain must be set to false for localhost (default value for `COOKIE_DOMAIN`) thanks to Stephen Harris. + 'secure' => is_ssl(), + 'httponly' => false, + 'samesite' => 'Lax', + ); + + $args = wp_parse_args( $args, $defaults ); + + /** + * Filters the Polylang cookie arguments. + * /!\ This filter may be fired *before* the theme is loaded. + * + * @since 3.6 + * + * @param array $args { + * Optional. Array of arguments for setting the cookie. + * + * @type int $expires Cookie duration. + * If a cookie duration of 0 is specified, a session cookie will be set. + * If a negative cookie duration is specified, the cookie is removed. + * @type string $path Cookie path. + * @type string $domain Cookie domain. Must be set to false for localhost (default value for `COOKIE_DOMAIN`). + * @type bool $secure Should the cookie be sent only over https? + * @type bool $httponly Should the cookie be accessed only over http protocol?. + * @type string $samesite Either 'Strict', 'Lax' or 'None'. + * } + */ + return (array) apply_filters( 'pll_cookie_args', $args ); + } + + /** + * Sets the cookie. + * + * @since 2.9 + * + * @param string $lang Language cookie value. + * @param array $args { + * Optional. Array of arguments for setting the cookie. + * + * @type string $path Cookie path, defaults to COOKIEPATH. + * @type string $domain Cookie domain, defaults to COOKIE_DOMAIN + * @type bool $secure Should the cookie be sent only over https? + * @type bool $httponly Should the cookie accessed only over http protocol? Defaults to false. + * @type string $samesite Either 'Strict', 'Lax' or 'None', defaults to 'Lax'. + * } + * @return void + */ + public static function set( $lang, $args = array() ) { + $args = self::parse_args( $args ); + + if ( ! headers_sent() && PLL_COOKIE !== false && self::get() !== $lang ) { + setcookie( PLL_COOKIE, $lang, $args ); + } + } + + /** + * Returns the language cookie value. + * + * @since 2.9 + * + * @return string + */ + public static function get() { + return isset( $_COOKIE[ PLL_COOKIE ] ) ? sanitize_key( $_COOKIE[ PLL_COOKIE ] ) : ''; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/crud-posts.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/crud-posts.php new file mode 100644 index 0000000..7e6b539 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/crud-posts.php @@ -0,0 +1,445 @@ +options = $polylang->options; + $this->model = &$polylang->model; + $this->pref_lang = &$polylang->pref_lang; + $this->curlang = &$polylang->curlang; + $this->request = &$polylang->request; + + add_action( 'save_post', array( $this, 'save_post' ), 10, 2 ); + add_action( 'set_object_terms', array( $this, 'set_object_terms' ), 10, 4 ); + add_filter( 'wp_insert_post_parent', array( $this, 'wp_insert_post_parent' ), 10, 2 ); + add_action( 'before_delete_post', array( $this, 'delete_post' ) ); + add_action( 'post_updated', array( $this, 'force_tags_translation' ), 10, 3 ); + + // Specific for media + if ( $polylang->options['media_support'] ) { + add_action( 'add_attachment', array( $this, 'set_default_language' ) ); + add_action( 'delete_attachment', array( $this, 'delete_post' ) ); + add_filter( 'wp_delete_file', array( $this, 'wp_delete_file' ) ); + } + } + + /** + * Allows to set a language by default for posts if it has no language yet. + * + * @since 1.5 + * + * @param int $post_id Post ID. + * @return void + */ + public function set_default_language( $post_id ) { + if ( is_multisite() && ms_is_switched() && ! $this->model->has_languages() ) { + return; + } + + if ( $this->model->post->get_language( $post_id ) ) { + return; + } + + $post_language = new Create_Post( + $this->model, + $this->request, + $this->pref_lang instanceof PLL_Language ? $this->pref_lang : null, // Can be `false` as well... + $this->curlang instanceof PLL_Language ? $this->curlang : null // Can be `false` as well... + ); + + $this->model->post->set_language( + $post_id, + $post_language->get_language( (int) $post_id ) + ); + } + + /** + * Called when a post ( or page ) is saved, published or updated. + * + * @since 0.1 + * @since 2.3 Does not save the language and translations anymore, unless the post has no language yet. + * + * @param int $post_id Post id of the post being saved. + * @param WP_Post $post The post being saved. + * @return void + */ + public function save_post( $post_id, $post ) { + if ( is_multisite() && ms_is_switched() && ! $this->model->has_languages() ) { + return; + } + + if ( ! $this->model->is_translated_post_type( $post->post_type ) ) { + return; + } + + if ( $id = wp_is_post_revision( $post_id ) ) { + $post_id = $id; + } + + $lang = $this->model->post->get_language( $post_id ); + + if ( empty( $lang ) ) { + $this->set_default_language( $post_id ); + } + + /** + * Fires after the post language and translations are saved. + * + * @since 1.2 + * + * @param int $post_id Post id. + * @param WP_Post $post Post object. + * @param int[] $translations The list of translations post ids. + */ + do_action( 'pll_save_post', $post_id, $post, $this->model->post->get_translations( $post_id ) ); + } + + /** + * Makes sure that saved terms are in the right language. + * + * @since 2.3 + * + * @param int $object_id Object ID. + * @param int[]|string[] $terms An array of object term IDs or slugs. + * @param int[] $tt_ids An array of term taxonomy IDs. + * @param string $taxonomy Taxonomy slug. + * @return void + */ + public function set_object_terms( $object_id, $terms, $tt_ids, $taxonomy ) { + static $avoid_recursion; + + if ( $avoid_recursion || empty( $terms ) || ! is_array( $terms ) || empty( $tt_ids ) + || ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return; + } + + $lang = $this->model->post->get_language( $object_id ); + + if ( empty( $lang ) ) { + return; + } + + // Use the term_taxonomy_ids to get all the requested terms in 1 query. + $new_terms = get_terms( + array( + 'taxonomy' => $taxonomy, + 'term_taxonomy_id' => array_map( 'intval', $tt_ids ), + 'lang' => '', + ) + ); + + if ( empty( $new_terms ) || ! is_array( $new_terms ) ) { + // Terms not found. + return; + } + + $new_term_ids_translated = $this->translate_terms( $new_terms, $taxonomy, $lang ); + + // Query the object's term. + $orig_terms = get_terms( + array( + 'taxonomy' => $taxonomy, + 'object_ids' => $object_id, + 'lang' => '', + ) + ); + + if ( is_array( $orig_terms ) ) { + $orig_term_ids = wp_list_pluck( $orig_terms, 'term_id' ); + $orig_term_ids_translated = $this->translate_terms( $orig_terms, $taxonomy, $lang ); + + // Terms that are not in the translated list. + $remove_term_ids = array_diff( $orig_term_ids, $orig_term_ids_translated ); + + if ( ! empty( $remove_term_ids ) ) { + wp_remove_object_terms( $object_id, $remove_term_ids, $taxonomy ); + } + } else { + $orig_term_ids = array(); + $orig_term_ids_translated = array(); + } + + // Terms to add. + $add_term_ids = array_unique( array_merge( $orig_term_ids_translated, $new_term_ids_translated ) ); + $add_term_ids = array_diff( $add_term_ids, $orig_term_ids ); + + if ( ! empty( $add_term_ids ) ) { + $avoid_recursion = true; + wp_set_object_terms( $object_id, $add_term_ids, $taxonomy, true ); // Append. + $avoid_recursion = false; + } + } + + /** + * Make sure that the post parent is in the correct language. + * + * @since 1.8 + * + * @param int $post_parent Post parent ID. + * @param int $post_id Post ID. + * @return int + */ + public function wp_insert_post_parent( $post_parent, $post_id ) { + $lang = $this->model->post->get_language( $post_id ); + $parent_post_type = $post_parent > 0 ? get_post_type( $post_parent ) : null; + // Dont break the hierarchy in case the post has no language + if ( ! empty( $lang ) && ! empty( $parent_post_type ) && $this->model->is_translated_post_type( $parent_post_type ) ) { + $post_parent = $this->model->post->get_translation( $post_parent, $lang ); + } + + return $post_parent; + } + + /** + * Called when a post, page or media is deleted + * Don't delete translations if this is a post revision thanks to AndyDeGroo who caught this bug + * http://wordpress.org/support/topic/plugin-polylang-quick-edit-still-breaks-translation-linking-of-pages-in-072 + * + * @since 0.1 + * + * @param int $post_id Post ID. + * @return void + */ + public function delete_post( $post_id ) { + if ( ! wp_is_post_revision( $post_id ) ) { + $this->model->post->delete_translation( $post_id ); + } + } + + /** + * Prevents WP deleting files when there are still media using them. + * + * @since 0.9 + * + * @param string $file Path to the file to delete. + * @return string Empty or unmodified path. + */ + public function wp_delete_file( $file ) { + global $wpdb; + + $uploadpath = wp_upload_dir(); + + // Get the main attached file. + $attached_file = substr_replace( $file, '', 0, strlen( trailingslashit( $uploadpath['basedir'] ) ) ); + $attached_file = preg_replace( '#-\d+x\d+\.([a-z]+)$#', '.$1', $attached_file ); + + $ids = $wpdb->get_col( + $wpdb->prepare( + "SELECT post_id FROM $wpdb->postmeta + WHERE meta_key = '_wp_attached_file' AND meta_value = %s", + $attached_file + ) + ); + + if ( ! empty( $ids ) ) { + return ''; // Prevent deleting the file. + } + + return $file; + } + + /** + * Creates a media translation + * + * @since 1.8 + * @since 3.7 Deprecated in favor of PLL_Translated_Post::create_media_translation(). + * + * @param int $post_id Original attachment id. + * @param string|PLL_Language $lang New translation language. + * @return int Attachment id of the translated media. + */ + public function create_media_translation( $post_id, $lang ) { + _deprecated_function( __METHOD__, '3.7', 'PLL_Translated_Post::create_media_translation()' ); + return $this->model->post->create_media_translation( $post_id, $lang ); + } + + /** + * Ensure that tags are in the correct language when a post is updated, due to `tags_input` parameter being removed in `wp_update_post()`. + * + * @since 3.4.5 + * + * @param int $post_id Post ID, unused. + * @param WP_Post $post_after Post object following the update. + * @param WP_Post $post_before Post object before the update. + * @return void + */ + public function force_tags_translation( $post_id, $post_after, $post_before ) { + if ( ! is_object_in_taxonomy( $post_before->post_type, 'post_tag' ) ) { + return; + } + + $terms = get_the_terms( $post_before, 'post_tag' ); + + if ( empty( $terms ) || ! is_array( $terms ) ) { + return; + } + + $term_ids = wp_list_pluck( $terms, 'term_id' ); + + // Let's ensure that `PLL_CRUD_Posts::set_object_terms()` will do its job. + wp_set_post_terms( $post_id, $term_ids, 'post_tag' ); + } + + /** + * Makes sure that all terms in the given list are in the given language. + * If not the case, the terms are translated or created (for a hierarchical taxonomy, terms are created recursively). + * + * @since 3.5 + * + * @param WP_Term[] $terms List of terms to translate. + * @param string $taxonomy The terms' taxonomy. + * @param PLL_Language $language The language to translate the terms into. + * @return int[] List of `term_id`s. + * + * @phpstan-return array + */ + private function translate_terms( array $terms, string $taxonomy, PLL_Language $language ): array { + $term_ids_translated = array(); + + foreach ( $terms as $term ) { + $term_ids_translated[] = $this->translate_term( $term, $taxonomy, $language ); + } + + return array_filter( $term_ids_translated ); + } + + /** + * Translates the given term into the given language. + * If the translation doesn't exist, it is created (for a hierarchical taxonomy, terms are created recursively). + * + * @since 3.5 + * + * @param WP_Term $term The term to translate. + * @param string $taxonomy The term's taxonomy. + * @param PLL_Language $language The language to translate the term into. + * @return int A `term_id` on success, `0` on failure. + * + * @phpstan-return int<0, max> + */ + private function translate_term( WP_Term $term, string $taxonomy, PLL_Language $language ): int { + // Check if the term is in the correct language or if a translation exists. + $tr_term_id = $this->model->term->get( $term->term_id, $language ); + + if ( ! empty( $tr_term_id ) ) { + // Already in the correct language. + return $tr_term_id; + } + + // Or choose the correct language for tags (initially defined by name). + $tr_term_id = $this->model->term_exists( $term->name, $taxonomy, $term->parent, $language ); + + if ( ! empty( $tr_term_id ) ) { + return $tr_term_id; + } + + // Or create the term in the correct language. + $tr_parent_term_id = 0; + + if ( $term->parent > 0 && is_taxonomy_hierarchical( $taxonomy ) ) { + $parent = get_term( $term->parent, $taxonomy ); + + if ( $parent instanceof WP_Term ) { + // Translate the parent recursively. + $tr_parent_term_id = $this->translate_term( $parent, $taxonomy, $language ); + } + } + + $lang_callback = function ( $lang, $tax, $slug ) use ( $language, $term, $taxonomy ) { + if ( ! $lang instanceof PLL_Language && $tax === $taxonomy && $slug === $term->slug ) { + return $language; + } + return $lang; + }; + $parent_callback = function ( $parent_id, $tax, $slug ) use ( $tr_parent_term_id, $term, $taxonomy ) { + if ( empty( $parent_id ) && $tax === $taxonomy && $slug === $term->slug ) { + return $tr_parent_term_id; + } + return $parent_id; + }; + add_filter( 'pll_inserted_term_language', $lang_callback, 10, 3 ); + add_filter( 'pll_inserted_term_parent', $parent_callback, 10, 3 ); + $new_term_info = wp_insert_term( + $term->name, + $taxonomy, + array( + 'parent' => $tr_parent_term_id, + 'slug' => $term->slug, // Useless but prevents the use of `sanitize_title()` and for consistency with `$lang_callback`. + ) + ); + remove_filter( 'pll_inserted_term_language', $lang_callback ); + remove_filter( 'pll_inserted_term_parent', $parent_callback ); + + if ( is_wp_error( $new_term_info ) ) { + // Term creation failed. + return 0; + } + + $tr_term_id = max( 0, (int) $new_term_info['term_id'] ); + + if ( empty( $tr_term_id ) ) { + return 0; + } + + $this->model->term->set_language( $tr_term_id, $language ); + + $trs = $this->model->term->get_translations( $term->term_id ); + + $trs[ $language->slug ] = $tr_term_id; + + $this->model->term->save_translations( $term->term_id, $trs ); + + return $tr_term_id; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/crud-terms.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/crud-terms.php new file mode 100644 index 0000000..12a2d6d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/crud-terms.php @@ -0,0 +1,333 @@ +options = $polylang->options; + $this->model = &$polylang->model; + $this->curlang = &$polylang->curlang; + $this->filter_lang = &$polylang->filter_lang; + $this->pref_lang = &$polylang->pref_lang; + $this->request = &$polylang->request; + + // Saving terms. + add_action( 'create_term', array( $this, 'save_term' ), 999, 3 ); + add_action( 'edit_term', array( $this, 'save_term' ), 999, 3 ); // After PLL_Admin_Filters_Term + add_filter( 'pre_term_name', array( $this, 'set_pre_term_name' ) ); + add_filter( 'pre_term_slug', array( $this, 'set_pre_term_slug' ), 10, 2 ); + add_filter( 'pre_term_term_id', array( $this, 'set_pre_term_id' ) ); + + // Filters terms query by language. + add_filter( 'get_terms_args', array( $this, 'adjust_query_lang' ) ); + add_filter( 'terms_clauses', array( $this, 'terms_clauses' ), 10, 3 ); + add_action( 'pre_get_posts', array( $this, 'set_tax_query_lang' ), 999 ); + add_action( 'posts_selection', array( $this, 'unset_tax_query_lang' ), 0 ); + + // Deleting terms. + add_action( 'pre_delete_term', array( $this, 'delete_term' ), 10, 2 ); + } + + /** + * Allows to set a language by default for terms if it has no language yet. + * + * @since 1.5.4 + * + * @param int $term_id Term ID. + * @param string $taxonomy Taxonomy name. + * @return void + */ + protected function set_default_language( $term_id, $taxonomy ) { + $term_language = new Create_Term( + $this->model, + $this->request, + $this->pref_lang instanceof PLL_Language ? $this->pref_lang : null, // Can be `false` as well... + $this->curlang instanceof PLL_Language ? $this->curlang : null // Can be `false` as well... + ); + + $this->model->term->set_language( + $term_id, + $term_language->get_language( (int) $term_id, (string) $taxonomy ) + ); + } + + /** + * Called when a category or post tag is created or edited. + * Does nothing except on taxonomies which are filterable. + * + * @since 0.1 + * + * @param int $term_id Term id of the term being saved. + * @param int $tt_id Term taxonomy id. + * @param string $taxonomy Taxonomy name. + * @return void + */ + public function save_term( $term_id, $tt_id, $taxonomy ) { + if ( is_multisite() && ms_is_switched() && ! $this->model->has_languages() ) { + return; + } + + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return; + } + + $lang = $this->model->term->get_language( $term_id ); + + if ( empty( $lang ) ) { + $this->set_default_language( $term_id, $taxonomy ); + } + + /** + * Fires after the term language and translations are saved. + * + * @since 1.2 + * + * @param int $term_id Term id. + * @param string $taxonomy Taxonomy name. + * @param int[] $translations The list of translations term ids. + */ + do_action( 'pll_save_term', $term_id, $taxonomy, $this->model->term->get_translations( $term_id ) ); + } + + /** + * Returns the languages to filter `WP_Term_Query`. + * + * @since 3.8 + * + * @param string[] $taxonomies Queried taxonomies. + * @param array $args WP_Term_Query arguments. + * @return PLL_Language[] The languages to filter `WP_Term_Query`. + */ + protected function get_queried_languages( $taxonomies, $args ): array { + global $pagenow; + + /* + * Do nothing except on taxonomies which are filterable. + * Since WP 4.7, make sure not to filter wp_get_object_terms(). + */ + if ( ! $this->model->is_translated_taxonomy( $taxonomies ) || ! empty( $args['object_ids'] ) ) { + return array(); + } + + // If get_terms() is queried with a 'lang' parameter. + if ( isset( $args['lang'] ) ) { + $languages = is_string( $args['lang'] ) ? explode( ',', $args['lang'] ) : $args['lang']; + return array_filter( array_map( array( $this->model, 'get_language' ), (array) $languages ) ); + } + + // On the tags page, everything should be filtered according to the admin language filter except the parent dropdown. + if ( 'edit-tags.php' === $pagenow && empty( $args['class'] ) ) { + return ! empty( $this->filter_lang ) ? array( $this->filter_lang ) : array(); + } + + return ! empty( $this->curlang ) ? array( $this->curlang ) : array(); + } + + /** + * Adjusts query language for `_get_term_hierarchy()` and `WP_Query`. + * + * @since 1.3 + * @since 3.8 Renamed from `get_terms_args()`. + * + * @param array $args WP_Term_Query arguments. + * @return array Modified arguments. + */ + public function adjust_query_lang( $args ) { + // Don't break _get_term_hierarchy(). + if ( 'all' === $args['get'] && 'id' === $args['orderby'] && 'id=>parent' === $args['fields'] ) { + $args['lang'] = ''; + } + + if ( isset( $this->tax_query_lang ) ) { + $args['lang'] = empty( $this->tax_query_lang ) && ! empty( $this->curlang ) && ! empty( $args['slug'] ) ? $this->curlang->slug : $this->tax_query_lang; + } + + return $args; + } + + /** + * Filters categories and post tags by language(s) when needed on admin side + * + * @since 0.2 + * + * @param string[] $clauses List of sql clauses. + * @param string[] $taxonomies List of taxonomies. + * @param array $args WP_Term_Query arguments. + * @return string[] Modified sql clauses. + */ + public function terms_clauses( $clauses, $taxonomies, $args ) { + $languages = $this->get_queried_languages( $taxonomies, $args ); + return $this->model->terms_clauses( $clauses, $languages ); + } + + /** + * Sets the WP_Term_Query language when doing a WP_Query. + * Needed since WP 4.9. + * + * @since 2.3.2 + * + * @param WP_Query $query WP_Query object. + * @return void + */ + public function set_tax_query_lang( $query ) { + $this->tax_query_lang = $query->query_vars['lang'] ?? ''; + } + + /** + * Removes the WP_Term_Query language filter for WP_Query. + * Needed since WP 4.9. + * + * @since 2.3.2 + * + * @return void + */ + public function unset_tax_query_lang() { + unset( $this->tax_query_lang ); + } + + /** + * Called when a category or post tag is deleted + * Deletes language and translations + * + * @since 0.1 + * + * @param int $term_id Id of the term to delete. + * @param string $taxonomy Name of the taxonomy. + * @return void + */ + public function delete_term( $term_id, $taxonomy ) { + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return; + } + + // Delete translation and relationships only if the term is translatable. + $this->model->term->delete_translation( $term_id ); + $this->model->term->delete_language( $term_id ); + } + + /** + * Stores the term name for use in pre_term_slug + * + * @since 0.9.5 + * + * @param string $name term name + * @return string unmodified term name + */ + public function set_pre_term_name( $name ) { + $this->pre_term_name = is_string( $name ) ? $name : ''; + + return $name; + } + + /** + * Appends language slug to the term slug if needed. + * + * @since 3.3 + * + * @param string $slug Term slug. + * @param string $taxonomy Term taxonomy. + * @return string Slug with a language suffix if found. + */ + public function set_pre_term_slug( $slug, $taxonomy ) { + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) || ! is_string( $slug ) ) { + return $slug; + } + + $term_slug = new PLL_Term_Slug( $this->model, $slug, $taxonomy, $this->pre_term_name, $this->pre_term_id ); + + return $term_slug->get_suffixed_slug( '-' ); + } + + /** + * Stores the term ID to use in `pre_term_slug`. + * + * @since 3.7.7 + * + * @param int $term_id Term ID. + * @return int Unmodified term ID. + */ + public function set_pre_term_id( $term_id ) { + $this->pre_term_id = is_numeric( $term_id ) ? (int) $term_id : 0; + + return $term_id; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/default-term.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/default-term.php new file mode 100644 index 0000000..f8c04da --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/default-term.php @@ -0,0 +1,231 @@ +model = &$polylang->model; + $this->curlang = &$polylang->curlang; + $this->taxonomies = $this->model->get_translated_taxonomies(); + } + + /** + * Setups filters and actions needed. + * + * @since 3.1 + * + * @return void + */ + public function add_hooks() { + foreach ( $this->taxonomies as $taxonomy ) { + if ( 'category' === $taxonomy ) { + // Allows to get the default terms in all languages. + add_filter( 'option_default_' . $taxonomy, array( $this, 'option_default_term' ) ); + add_action( 'update_option_default_' . $taxonomy, array( $this, 'update_option_default_term' ), 10, 2 ); + } + } + add_action( 'pll_add_language', array( $this, 'handle_default_term_on_create_language' ) ); + + // The default term should be in the default language. + add_action( 'pll_update_default_lang', array( $this, 'update_default_term_language' ) ); + + // Prevents deleting all the translations of the default term. + add_filter( 'map_meta_cap', array( $this, 'fix_delete_default_term' ), 10, 4 ); + } + + /** + * Filters the default term to return the one in the right language. + * + * @since 1.2 + * + * @param int $taxonomy_term_id The taxonomy term id. + * @return int A taxonomy term id. + */ + public function option_default_term( $taxonomy_term_id ) { + if ( isset( $this->curlang ) && $tr = $this->model->term->get( $taxonomy_term_id, $this->curlang ) ) { + $taxonomy_term_id = $tr; + } + return $taxonomy_term_id; + } + + /** + * Checks if the new default term is translated in all languages. + * If not, create the translations. + * + * @since 1.7 + * + * @param int $old_value The old option value. + * @param int $value The new option value. + * @return void + */ + public function update_option_default_term( $old_value, $value ) { + $default_cat_lang = $this->model->term->get_language( $value ); + + // Assign a default language to default term. + if ( ! $default_cat_lang ) { + $default_cat_lang = $this->model->get_default_language(); + $this->model->term->set_language( (int) $value, $default_cat_lang ); + } + + if ( empty( $default_cat_lang ) ) { + return; + } + + $current_filter = current_filter(); + if ( ! $current_filter ) { + return; + } + + $taxonomy = substr( $current_filter, 22 ); + + foreach ( $this->model->get_languages_list() as $language ) { + if ( $language->slug != $default_cat_lang->slug && ! $this->model->term->get_translation( $value, $language ) ) { + $this->create_default_term( $language, $taxonomy ); + } + } + } + + /** + * Creates a default term for a language. + * + * @since 1.2 + * + * @param PLL_Language|string|int $lang Language. + * @param string $taxonomy The current taxonomy. + * @return void + */ + public function create_default_term( $lang, $taxonomy ) { + $lang = $this->model->get_language( $lang ); + + // Create a new term. + // FIXME this is translated in admin language when we would like it in $lang + $cat_name = __( 'Uncategorized', 'polylang' ); + $cat_slug = sanitize_title( $cat_name . '-' . $lang->slug ); + $cat = wp_insert_term( $cat_name, $taxonomy, array( 'slug' => $cat_slug ) ); + + // Check that the term was not previously created (in case the language was deleted and recreated). + $cat = $cat->error_data['term_exists'] ?? $cat['term_id']; + + // Set language. + $this->model->term->set_language( (int) $cat, $lang ); + + // This is a translation of the default term. + $default = (int) get_option( 'default_' . $taxonomy ); + $translations = $this->model->term->get_translations( $default ); + + $this->model->term->save_translations( (int) $cat, $translations ); + } + + /** + * Manages the default term when new languages are created. + * + * @since 3.1 + * + * @param array $args Argument used to create the language. @see `Model\Languages::add()`. + * @return void + */ + public function handle_default_term_on_create_language( $args ) { + foreach ( $this->taxonomies as $taxonomy ) { + if ( 'category' === $taxonomy ) { + $default = (int) get_option( 'default_' . $taxonomy ); + + // Assign default language to default term. + if ( ! $this->model->term->get_language( $default ) ) { + $this->model->term->set_language( $default, $args['slug'] ); + } elseif ( empty( $args['no_default_cat'] ) && ! $this->model->term->get( $default, $args['slug'] ) ) { + $this->create_default_term( $args['slug'], $taxonomy ); + } + } + } + } + + /** + * Prevents deleting all the translations of the default term. + * + * @since 2.1 + * + * @param array $caps The user's actual capabilities. + * @param string $cap Capability name. + * @param int $user_id The user ID. + * @param array $args Adds the context to the cap. The term id. + * @return array + */ + public function fix_delete_default_term( $caps, $cap, $user_id, $args ) { + if ( 'delete_term' === $cap && $this->is_default_term( reset( $args ) ) ) { + $caps[] = 'do_not_allow'; + } + + return $caps; + } + + /** + * Checks if the term is the default term. + * + * @since 3.1 + * + * @param int $term_id The term ID. + * @return bool True if the term is the default term, false otherwise. + */ + public function is_default_term( $term_id ) { + $term = get_term( $term_id ); + if ( $term instanceof WP_Term ) { + $default_term_id = get_option( 'default_' . $term->taxonomy ); + return $default_term_id && in_array( $default_term_id, $this->model->term->get_translations( $term_id ) ); + } + return false; + } + + /** + * Updates the default term language. + * + * @since 3.1 + * + * @param string $slug Language slug. + * @return void + */ + public function update_default_term_language( $slug ) { + foreach ( $this->taxonomies as $taxonomy ) { + if ( 'category' === $taxonomy ) { + $default_cats = $this->model->term->get_translations( get_option( 'default_' . $taxonomy ) ); + if ( isset( $default_cats[ $slug ] ) ) { + update_option( 'default_' . $taxonomy, $default_cats[ $slug ] ); + } + } + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filter-rest-routes.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filter-rest-routes.php new file mode 100644 index 0000000..95e5c3e --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filter-rest-routes.php @@ -0,0 +1,185 @@ + + */ + private $filtered_routes = array(); + + /** + * @var PLL_Model + */ + private $model; + + /** + * Constructor. + * + * @since 3.5 + * + * @param PLL_Model $model Shared instance of the current PLL_Model. + */ + public function __construct( PLL_Model $model ) { + $this->model = $model; + } + + /** + * Adds query parameters to preload paths. + * + * @since 3.5 + * + * @param (string|string[])[] $preload_paths Array of paths to preload. + * @param array $args Array of query strings to add paired by key/value. + * @return (string|string[])[] + */ + public function add_query_parameters( array $preload_paths, array $args ): array { + foreach ( $preload_paths as $k => $path ) { + if ( empty( $path ) ) { + continue; + } + + $query_params = array(); + // If the method request is OPTIONS, $path is an array and the first element is the path + if ( is_array( $path ) ) { + $temp_path = $path[0]; + } else { + $temp_path = $path; + } + + $path_parts = wp_parse_url( $temp_path ); + + if ( ! isset( $path_parts['path'] ) || ! $this->is_filtered( $path_parts['path'] ) ) { + continue; + } + + if ( ! empty( $path_parts['query'] ) ) { + parse_str( $path_parts['query'], $query_params ); + } + + // Add params in query params + foreach ( $args as $key => $value ) { + $query_params[ $key ] = $value; + } + + // Sort query params to put it in the same order as the preloading middleware does + ksort( $query_params ); + + // Replace the key by the correct path with query params reordered + $sorted_path = add_query_arg( urlencode_deep( $query_params ), $path_parts['path'] ); + + if ( is_array( $path ) ) { + $preload_paths[ $k ][0] = $sorted_path; + } else { + $preload_paths[ $k ] = $sorted_path; + } + } + + return $preload_paths; + } + + /** + * Adds inline script to declare filtered REST route on client side. + * + * @since 3.5 + * + * @param string $script_handle Name of the script to add the inline script to. + * @return void + */ + public function add_inline_script( string $script_handle ) { + $script_var = 'window.pllFilteredRoutes = ' . (string) wp_json_encode( $this->get() ); + + wp_add_inline_script( $script_handle, $script_var, 'before' ); + } + + /** + * Returns filtered REST routes by entity type (e.g. post type or taxonomy). + * + * @since 3.5 + * + * @return string[] REST routes. + * @phpstan-return array + */ + private function get(): array { + if ( ! empty( $this->filtered_routes ) ) { + return $this->filtered_routes; + } + + $translatable_post_types = $this->model->get_translated_post_types(); + $translatable_taxonomies = $this->model->get_translated_taxonomies(); + + $post_types = get_post_types( array( 'show_in_rest' => true ), 'objects' ); + $taxonomies = get_taxonomies( array( 'show_in_rest' => true ), 'objects' ); + + $filtered_entities = $this->extract_filtered_rest_entities( + array_merge( $post_types, $taxonomies ), + array_merge( $translatable_post_types, $translatable_taxonomies ) + ); + + /** + * Filters REST routes filterable by languages. + * + * @since 3.7 + * + * @param string[] $routes Array of filterable REST routes, with types as key. + */ + $this->filtered_routes = apply_filters( + 'pll_filtered_rest_routes', + array_merge( + $filtered_entities, + array( 'search' => 'wp/v2/search' ) + ) + ); + + return $this->filtered_routes; + } + + /** + * Tells if a given route is fileterable by language. + * + * @since 3.5 + * + * @param string $rest_route Route to test. + * @return bool Whether the route is filterable or not. + */ + private function is_filtered( string $rest_route ): bool { + $rest_route = trim( $rest_route ); + + return ! preg_match( '/\d+$/', $rest_route ) && in_array( trim( $rest_route, '/' ), $this->get(), true ); + } + + /** + * Extracts filterable REST route from an array of entity objects + * from a list of translatable entities (e.g. post types or taxonomies). + * + * @since 3.5 + * + * @param object[] $rest_entities Array of post type or taxonomy objects. + * @param string[] $translatable_entities Array of translatable entity names. + * @return string[] Filtered routes. + * @phpstan-param array $rest_entities + * @phpstan-return array + */ + private function extract_filtered_rest_entities( array $rest_entities, array $translatable_entities ) { + $filtered_entities = array(); + foreach ( $rest_entities as $rest_entity ) { + if ( in_array( $rest_entity->name, $translatable_entities, true ) ) { + $rest_base = empty( $rest_entity->rest_base ) ? $rest_entity->name : $rest_entity->rest_base; + $rest_namespace = empty( $rest_entity->rest_namespace ) ? 'wp/v2' : $rest_entity->rest_namespace; + + $filtered_entities[ $rest_entity->name ] = "{$rest_namespace}/{$rest_base}"; + } + } + + return $filtered_entities; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-links.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-links.php new file mode 100644 index 0000000..1954809 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-links.php @@ -0,0 +1,203 @@ +links = &$polylang->links; + $this->links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = $polylang->options; + $this->curlang = &$polylang->curlang; + + // Low priority on links filters to come after any other modifications. + if ( $this->options['force_lang'] ) { + add_filter( 'post_link', array( $this, 'post_type_link' ), 20, 2 ); + add_filter( '_get_page_link', array( $this, '_get_page_link' ), 20, 2 ); + } + + add_filter( 'post_type_link', array( $this, 'post_type_link' ), 20, 2 ); + add_filter( 'term_link', array( $this, 'term_link' ), 20, 3 ); + + if ( $this->options['force_lang'] > 0 ) { + add_filter( 'attachment_link', array( $this, 'attachment_link' ), 20, 2 ); + } + + // Keeps the preview post link on default domain when using multiple domains and SSO is not available. + if ( 3 === $this->options['force_lang'] && ! class_exists( 'PLL_Xdata_Domain' ) ) { + add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 20 ); + } + + // Rewrites post types archives links to filter them by language. + add_filter( 'post_type_archive_link', array( $this, 'post_type_archive_link' ), 20, 2 ); + } + + /** + * Modifies page links + * + * @since 1.7 + * + * @param string $link post link + * @param int $post_id post ID + * @return string modified post link + */ + public function _get_page_link( $link, $post_id ) { + // /!\ WP does not use pretty permalinks for preview + return false !== strpos( $link, 'preview=true' ) && false !== strpos( $link, 'page_id=' ) ? $link : $this->links_model->switch_language_in_link( $link, $this->model->post->get_language( $post_id ) ); + } + + /** + * Modifies attachment links + * + * @since 1.6.2 + * + * @param string $link attachment link + * @param int $post_id attachment link + * @return string modified attachment link + */ + public function attachment_link( $link, $post_id ) { + return wp_get_post_parent_id( $post_id ) ? $link : $this->links_model->switch_language_in_link( $link, $this->model->post->get_language( $post_id ) ); + } + + /** + * Modifies custom posts links. + * + * @since 1.6 + * + * @param string $link Post link. + * @param WP_Post $post Post object. + * @return string Modified post link. + */ + public function post_type_link( $link, $post ) { + // /!\ WP does not use pretty permalinks for preview + if ( ( false === strpos( $link, 'preview=true' ) || false === strpos( $link, 'p=' ) ) && $this->model->is_translated_post_type( $post->post_type ) ) { + $lang = $this->model->post->get_language( $post->ID ); + $link = $this->options['force_lang'] ? $this->links_model->switch_language_in_link( $link, $lang ) : $link; + + /** + * Filters a post or custom post type link. + * + * @since 1.6 + * + * @param string $link The post link. + * @param PLL_Language $lang The current language. + * @param WP_Post $post The post object. + */ + $link = apply_filters( 'pll_post_type_link', $link, $lang, $post ); + } + + return $link; + } + + /** + * Modifies term links. + * + * @since 0.7 + * + * @param string $link Term link. + * @param WP_Term $term Term object. + * @param string $tax Taxonomy name; + * @return string Modified term link. + */ + public function term_link( $link, $term, $tax ) { + if ( $this->model->is_translated_taxonomy( $tax ) ) { + $lang = $this->model->term->get_language( $term->term_id ); + $link = $this->options['force_lang'] ? $this->links_model->switch_language_in_link( $link, $lang ) : $link; + + /** + * Filter a term link + * + * @since 1.6 + * + * @param string $link The term link. + * @param PLL_Language $lang The current language. + * @param WP_Term $term The term object. + */ + return apply_filters( 'pll_term_link', $link, $lang, $term ); + } + + // In case someone calls get_term_link for the 'language' taxonomy. + if ( 'language' === $tax ) { + $lang = $this->model->get_language( $term->term_id ); + if ( $lang ) { + return $this->links_model->home_url( $lang ); + } + } + + return $link; + } + + /** + * Keeps the preview post link on default domain when using multiple domains. + * + * @since 1.6.1 + * + * @param string $url URL used for the post preview. + * @return string The modified url. + */ + public function preview_post_link( $url ) { + return $this->links_model->remove_language_from_link( $url ); + } + + /** + * Modifies the post type archive links to add the language parameter + * only if the post type is translated. + * + * The filter was originally only on frontend but is needed on admin too for + * compatibility with the archive link of the ACF link field since ACF 5.4.0. + * + * @since 1.7.6 + * + * @param string $link The post type archive permalink. + * @param string $post_type Post type name. + * @return string + */ + public function post_type_archive_link( $link, $post_type ) { + return $this->model->is_translated_post_type( $post_type ) && 'post' !== $post_type ? $this->links_model->switch_language_in_link( $link, $this->curlang ) : $link; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-sanitization.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-sanitization.php new file mode 100644 index 0000000..1bdd2a1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-sanitization.php @@ -0,0 +1,106 @@ +locale = $locale; + + // We need specific filters for some languages like German and Danish + $specific_locales = array( 'da_DK', 'de_DE', 'de_DE_formal', 'de_CH', 'de_CH_informal', 'ca', 'sr_RS', 'bs_BA' ); + if ( in_array( $locale, $specific_locales ) ) { + add_filter( 'sanitize_title', array( $this, 'sanitize_title' ), 10, 3 ); + add_filter( 'sanitize_user', array( $this, 'sanitize_user' ), 10, 3 ); + } + } + + /** + * Retrieve the locale code of the language. + * + * @since 2.0 + * + * @return string + */ + public function get_locale() { + return $this->locale; + } + + /** + * Maybe fix the result of sanitize_title() in case the languages include German or Danish + * Without this filter, if language of the title being sanitized is different from the language + * used for the admin interface and if one this language is German or Danish, some specific + * characters such as ä, ö, ü, ß are incorrectly sanitized. + * + * All the process is done by the remove_accents() WordPress function based on the locale value + * + * @link https://github.com/WordPress/WordPress/blob/5.5.1/wp-includes/formatting.php#L1920-L1944 + * + * @since 2.0 + * + * @param string $title Sanitized title. + * @param string $raw_title The title prior to sanitization. + * @param string $context The context for which the title is being sanitized. + * @return string + */ + public function sanitize_title( $title, $raw_title, $context ) { + static $once = false; + + if ( ! $once && 'save' == $context && ! empty( $title ) ) { + $once = true; + add_filter( 'locale', array( $this, 'get_locale' ), 20 ); // After the filter for the admin interface + $title = sanitize_title( $raw_title, '', $context ); + remove_filter( 'locale', array( $this, 'get_locale' ), 20 ); + $once = false; + } + return $title; + } + + /** + * Maybe fix the result of sanitize_user() in case the languages include German or Danish + * + * All the process is done by the remove_accents() WordPress function based on the locale value + * + * @link https://github.com/WordPress/WordPress/blob/5.5-branch/wp-includes/formatting.php#L1920-L1944 + * + * @since 2.0 + * + * @param string $username Sanitized username. + * @param string $raw_username The username prior to sanitization. + * @param bool $strict Whether to limit the sanitization to specific characters. Default false. + * @return string + */ + public function sanitize_user( $username, $raw_username, $strict ) { + static $once = false; + + if ( ! $once ) { + $once = true; + add_filter( 'locale', array( $this, 'get_locale' ), 20 ); // After the filter for the admin interface + $username = sanitize_user( $raw_username, $strict ); + remove_filter( 'locale', array( $this, 'get_locale' ), 20 ); + $once = false; + } + return $username; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-widgets-options.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-widgets-options.php new file mode 100644 index 0000000..8ac649e --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters-widgets-options.php @@ -0,0 +1,94 @@ +model = $polylang->model; + + add_action( 'in_widget_form', array( $this, 'in_widget_form' ), 10, 3 ); + add_filter( 'widget_update_callback', array( $this, 'widget_update_callback' ), 10, 2 ); + } + + /** + * Add the language filter field to the widgets options form. + * + * @since 3.0 Moved PLL_Admin_Filters. + * @since 3.1 Rename lang_choice field name and id to pll_lang as the widget setting. + * + * @param WP_Widget $widget The widget instance (passed by reference). + * @param null $return Return null if new fields are added. + * @param array $instance An array of the widget's settings. + * @return void + * + * @phpstan-param WP_Widget> $widget + */ + public function in_widget_form( $widget, $return, $instance ) { + $dropdown = new PLL_Walker_Dropdown(); + + $dropdown_html = $dropdown->walk( + array_merge( + array( (object) array( 'slug' => 0, 'name' => __( 'All languages', 'polylang' ) ) ), + $this->model->get_languages_list() + ), + -1, + array( + 'id' => $widget->get_field_id( 'pll_lang' ), + 'name' => $widget->get_field_name( 'pll_lang' ), + 'class' => 'tags-input pll-lang-choice', + 'selected' => empty( $instance['pll_lang'] ) ? '' : $instance['pll_lang'], + ) + ); + + printf( + '

    ', + esc_attr( $widget->get_field_id( 'pll_lang' ) ), + esc_html__( 'The widget is displayed for:', 'polylang' ), + $dropdown_html // phpcs:ignore WordPress.Security.EscapeOutput + ); + } + + /** + * Called when widget options are saved. + * Saves the language associated to the widget. + * + * @since 0.3 + * @since 3.0 Moved from PLL_Admin_Filters. + * @since 3.1 Remove unused $old_instance and $widget parameters. + * + * @param array $instance The current Widget's options. + * @param array $new_instance The new Widget's options. + * @return array Widget options. + */ + public function widget_update_callback( $instance, $new_instance ) { + if ( ! empty( $new_instance['pll_lang'] ) && $lang = $this->model->get_language( $new_instance['pll_lang'] ) ) { + $instance['pll_lang'] = $lang->slug; + } else { + unset( $instance['pll_lang'] ); + } + + return $instance; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters.php new file mode 100644 index 0000000..a692172 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/filters.php @@ -0,0 +1,400 @@ +links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = $polylang->options; + $this->curlang = &$polylang->curlang; + + // Deletes our cache for sticky posts when the list is updated. + add_action( 'update_option_sticky_posts', array( $this, 'delete_sticky_posts_cache' ) ); + add_action( 'add_option_sticky_posts', array( $this, 'delete_sticky_posts_cache' ) ); + add_action( 'delete_option_sticky_posts', array( $this, 'delete_sticky_posts_cache' ) ); + + // Filters the comments according to the current language. + add_action( 'parse_comment_query', array( $this, 'parse_comment_query' ) ); + add_filter( 'comments_clauses', array( $this, 'comments_clauses' ), 10, 2 ); + + // Filters the get_pages function according to the current language. + add_filter( 'get_pages_query_args', array( $this, 'get_pages_query_args' ), 10, 2 ); + + // Rewrites next and previous post links to filter them by language. + add_filter( 'get_previous_post_join', array( $this, 'posts_join' ), 10, 5 ); + add_filter( 'get_next_post_join', array( $this, 'posts_join' ), 10, 5 ); + add_filter( 'get_previous_post_where', array( $this, 'posts_where' ), 10, 5 ); + add_filter( 'get_next_post_where', array( $this, 'posts_where' ), 10, 5 ); + + // Converts the locale to a valid W3C locale. + add_filter( 'language_attributes', array( $this, 'language_attributes' ) ); + + // Translate the site title in emails sent to users + add_filter( 'password_change_email', array( $this, 'translate_user_email' ) ); + add_filter( 'email_change_email', array( $this, 'translate_user_email' ) ); + + // Translates the privacy policy page. + add_filter( 'option_wp_page_for_privacy_policy', array( $this, 'translate_page_for_privacy_policy' ), 20 ); // Since WP 4.9.6. + add_filter( 'map_meta_cap', array( $this, 'fix_privacy_policy_page_editing' ), 10, 4 ); + + // Personal data exporter. + add_filter( 'wp_privacy_personal_data_exporters', array( $this, 'register_personal_data_exporter' ), 0 ); // Since WP 4.9.6. + + // Fix for `term_exists()`. + add_filter( 'term_exists_default_query_args', array( $this, 'term_exists_default_query_args' ), 0, 3 ); // Since WP 6.0.0. + } + + /** + * Deletes the cache for multilingual sticky posts. + * + * @since 2.8.4 + * + * @return void + */ + public function delete_sticky_posts_cache() { + wp_cache_delete( 'sticky_posts', 'options' ); + } + + /** + * Get the language to filter a comments query. + * + * @since 2.0 + * @since 3.1 Always returns an array. Renamed from get_comments_queried_language(). + * + * @param WP_Comment_Query $query WP_Comment_Query object. + * @return PLL_Language[] The languages to use in the filter. + */ + protected function get_comments_queried_languages( $query ) { + // Don't filter comments if comment ids or post ids are specified. + $plucked = wp_array_slice_assoc( $query->query_vars, array( 'comment__in', 'parent', 'post_id', 'post__in', 'post_parent' ) ); + $fields = array_filter( $plucked ); + if ( ! empty( $fields ) ) { + return array(); + } + + // Don't filter comments if a non translated post type is specified. + if ( ! empty( $query->query_vars['post_type'] ) && ! $this->model->is_translated_post_type( $query->query_vars['post_type'] ) ) { + return array(); + } + + // If comments are queried with a 'lang' parameter, keeps only language codes. + if ( isset( $query->query_vars['lang'] ) ) { + $languages = is_string( $query->query_vars['lang'] ) ? explode( ',', $query->query_vars['lang'] ) : $query->query_vars['lang']; + if ( is_array( $languages ) ) { + $languages = array_map( array( $this->model, 'get_language' ), $languages ); + return array_filter( $languages ); + } + } + + if ( ! empty( $this->curlang ) ) { + return array( $this->curlang ); + } + + return array(); + } + + /** + * Adds a language dependent cache domain when querying comments. + * Useful as the 'lang' parameter is not included in cache key by WordPress. + * Needed since WP 4.6 as comments have been added to persistent cache. See #36906, #37419. + * + * @since 2.0 + * + * @param WP_Comment_Query $query WP_Comment_Query object. + * @return void + */ + public function parse_comment_query( $query ) { + $lang = $this->get_comments_queried_languages( $query ); + if ( ! empty( $lang ) ) { + $lang = wp_list_pluck( $lang, 'slug' ); + $key = '_' . implode( ',', $lang ); + $query->query_vars['cache_domain'] = empty( $query->query_vars['cache_domain'] ) ? 'pll' . $key : $query->query_vars['cache_domain'] . $key; + } + } + + /** + * Filters the comments according to the current language. + * Used by the recent comments widget and admin language filter. + * + * @since 0.2 + * + * @param string[] $clauses SQL clauses. + * @param WP_Comment_Query $query WP_Comment_Query object. + * @return string[] Modified $clauses. + */ + public function comments_clauses( $clauses, $query ) { + global $wpdb; + + $lang = $this->get_comments_queried_languages( $query ); + + if ( ! empty( $lang ) ) { + $lang = wp_list_pluck( $lang, 'slug' ); + + // If this clause is not already added by WP. + if ( ! preg_match( "#JOIN\s+{$wpdb->posts}\s+ON\s+(({$wpdb->posts}\.)?ID|({$wpdb->comments}\.)?comment_post_ID)\s*=#", $clauses['join'] ) ) { + $clauses['join'] .= " JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID"; + } + + $clauses['join'] .= $this->model->post->join_clause(); + $clauses['where'] .= $this->model->post->where_clause( $lang ); + } + return $clauses; + } + + /** + * Filters the WP_Query in get_pages() per language. + * + * @since 3.4.3 + * + * @param array $query_args Array of arguments passed to WP_Query. + * @param array $parsed_args Array of get_pages() arguments. + * @return array Array of arguments passed to WP_Query with the language. + */ + public function get_pages_query_args( $query_args, $parsed_args ) { + if ( isset( $parsed_args['lang'] ) ) { + $query_args['lang'] = $parsed_args['lang']; + } + + return $query_args; + } + + /** + * Modifies the sql request for get_adjacent_post to filter by the current language. + * + * @since 0.1 + * + * @param string $sql The JOIN clause in the SQL. + * @param bool $in_same_term Whether post should be in a same taxonomy term. + * @param int[] $excluded_terms Array of excluded term IDs. + * @param string $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true. + * @param WP_Post $post WP_Post object. + * @return string Modified JOIN clause. + */ + public function posts_join( $sql, $in_same_term, $excluded_terms, $taxonomy, $post ) { + return $this->model->is_translated_post_type( $post->post_type ) && ! empty( $this->curlang ) ? $sql . $this->model->post->join_clause( 'p' ) : $sql; + } + + /** + * Modifies the sql request for wp_get_archives and get_adjacent_post to filter by the current language. + * + * @since 0.1 + * + * @param string $sql The WHERE clause in the SQL. + * @param bool $in_same_term Whether post should be in a same taxonomy term. + * @param int[] $excluded_terms Array of excluded term IDs. + * @param string $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true. + * @param WP_Post $post WP_Post object. + * @return string Modified WHERE clause. + */ + public function posts_where( $sql, $in_same_term, $excluded_terms, $taxonomy, $post ) { + return $this->model->is_translated_post_type( $post->post_type ) && ! empty( $this->curlang ) ? $sql . $this->model->post->where_clause( $this->curlang ) : $sql; + } + + /** + * Converts WordPress locale to valid W3 locale in html language attributes + * + * @since 1.8 + * + * @param string $output language attributes + * @return string + */ + public function language_attributes( $output ) { + $language = $this->model->get_language( determine_locale() ); + + if ( ! $language ) { + return $output; + } + + return str_replace( '"' . get_bloginfo( 'language' ) . '"', '"' . $language->get_locale( 'display' ) . '"', $output ); + } + + /** + * Translates the site title in emails sent to the user (change email, reset password) + * It is necessary to filter the email because WP evaluates the site title before calling switch_to_locale() + * + * @since 2.1.3 + * + * @param string[] $email Email contents. + * @return string[] Translated email contents. + */ + public function translate_user_email( $email ) { + $blog_name = wp_specialchars_decode( pll__( get_option( 'blogname' ) ), ENT_QUOTES ); + $email['subject'] = sprintf( $email['subject'], $blog_name ); + $email['message'] = str_replace( '###SITENAME###', $blog_name, $email['message'] ); + return $email; + } + + /** + * Translates the privacy policy page, on both frontend and admin + * + * @since 2.3.6 + * + * @param int $id Privacy policy page id + * @return int + */ + public function translate_page_for_privacy_policy( $id ) { + return empty( $this->curlang ) ? $id : $this->model->post->get( $id, $this->curlang ); + } + + /** + * Prevents edit and delete links for the translations of the privacy policy page for non admin + * + * @since 2.3.7 + * + * @param array $caps The user's actual capabilities. + * @param string $cap Capability name. + * @param int $user_id The user ID. + * @param array $args Adds the context to the cap. The category id. + * @return array + */ + public function fix_privacy_policy_page_editing( $caps, $cap, $user_id, $args ) { + if ( ! in_array( $cap, array( 'edit_page', 'edit_post', 'delete_page', 'delete_post' ), true ) ) { + return $caps; + } + + if ( empty( $args[0] ) ) { + return $caps; + } + + /* + * We expect a post ID, but nothing prevents to receive a `WP_Post`, + * so let make sure we manipulate a post ID in any case. + */ + $post = get_post( $args[0] ); + if ( ! $post ) { + return $caps; + } + + $privacy_page = get_option( 'wp_page_for_privacy_policy' ); + if ( $privacy_page && in_array( $post->ID, $this->model->post->get_translations( $privacy_page ), true ) ) { + $caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) ); + } + + return $caps; + } + + /** + * Register our personal data exporter + * + * @since 2.3.6 + * + * @param array $exporters Personal data exporters + * @return array + */ + public function register_personal_data_exporter( $exporters ) { + $exporters[] = array( + 'exporter_friendly_name' => __( 'Translated user descriptions', 'polylang' ), + 'callback' => array( $this, 'user_data_exporter' ), + ); + return $exporters; + } + + /** + * Export translated user description as WP exports only the description in the default language + * + * @since 2.3.6 + * + * @param string $email_address User email address + * @return array Personal data + */ + public function user_data_exporter( $email_address ) { + $email_address = trim( $email_address ); + $data_to_export = array(); + $user_data_to_export = array(); + + if ( $user = get_user_by( 'email', $email_address ) ) { + foreach ( $this->model->get_languages_list() as $lang ) { + if ( ! $lang->is_default && $value = get_user_meta( $user->ID, 'description_' . $lang->slug, true ) ) { + $user_data_to_export[] = array( + /* translators: %s is a language native name */ + 'name' => sprintf( __( 'User description - %s', 'polylang' ), $lang->name ), + 'value' => $value, + ); + } + } + + if ( ! empty( $user_data_to_export ) ) { + $data_to_export[] = array( + 'group_id' => 'user', + 'group_label' => __( 'User', 'polylang' ), + 'item_id' => "user-{$user->ID}", + 'data' => $user_data_to_export, + ); + } + } + + return array( + 'data' => $data_to_export, + 'done' => true, + ); + } + + /** + * Filters default query arguments for checking if a term exists. + * In `term_exists()`, WP 6.0 uses `get_terms()`, which is filtered by language by Polylang. + * This filter prevents `term_exists()` to be filtered by language. + * + * @since 3.2 + * + * @param array $defaults An array of arguments passed to get_terms(). + * @param int|string $term The term to check. Accepts term ID, slug, or name. + * @param string $taxonomy The taxonomy name to use. An empty string indicates the search is against all taxonomies. + * @return array + */ + public function term_exists_default_query_args( $defaults, $term, $taxonomy ) { + if ( ! empty( $taxonomy ) && ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return $defaults; + } + + if ( ! is_array( $defaults ) ) { + $defaults = array(); + } + + if ( ! isset( $defaults['lang'] ) ) { + $defaults['lang'] = ''; + } + + return $defaults; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/format-util.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/format-util.php new file mode 100644 index 0000000..6de30fa --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/format-util.php @@ -0,0 +1,107 @@ + + */ + private $patterns = array(); + + /** + * Filters the given list to return only the values whose the key or value matches the given format. + * + * @since 3.6 + * @since 3.7 Only accepts arrays as first parameter. + * + * @param array $list A list with keys or values to match against `$format`. + * @param string $format A format, where `*` means "any characters" (`.*`), unless escaped. + * @param string $mode Optional. Tell if we should filter the keys or values from `$list`. + * Possible values are `'use_keys'` and `'use_values'`. Default is `'use_keys'`. + * @return array + * + * @template TArrayValue + * @phpstan-param ($mode is 'use_keys' ? array : array) $list + * @phpstan-param 'use_keys'|'use_values' $mode + * @phpstan-return ($mode is 'use_keys' ? array : array) + */ + public function filter_list( array $list, string $format, string $mode = 'use_keys' ): array { + $filter = function ( $key ) use ( $format ) { + return $this->matches( (string) $key, $format ); + }; + + if ( 'use_values' === $mode ) { + return array_filter( $list, $filter ); + } + + return array_filter( $list, $filter, ARRAY_FILTER_USE_KEY ); + } + + /** + * Tells if the given string matches the given format. + * + * @since 3.6 + * + * @param string $key A string to test. + * @param string $format A format, where `*` means "any characters" (`.*`), unless escaped. + * @return bool + */ + public function matches( string $key, string $format ): bool { + if ( ! $this->is_format( $format ) ) { + return $key === $format; + } + + if ( '*' === $format ) { + return true; + } + + if ( empty( $this->patterns[ $format ] ) ) { + $pattern = addcslashes( $format, '.+?[^]$(){}=!<>|:-#/' ); // Escape regular expression characters (list from `preg_quote()` but `*` and `\` are ignored). + $pattern = preg_replace( + array( + '/\\\(?!\*)/', // Escape `\` characters except if followed by `*`. + '/(?patterns[ $format ] = $pattern; + } else { + $pattern = $this->patterns[ $format ]; + } + + return (bool) preg_match( "/^{$pattern}$/", $key ); + } + + /** + * Tells if the given string is a format (that includes a `*`). + * + * @since 3.7 + * + * @param string $format Format to test. + * @return bool + * + * @phpstan-assert-if-true non-empty-string $format + */ + public function is_format( string $format ): bool { + return (bool) preg_match( '/(? '(\b[a-z]{2,3}|[a-z]{4}|[a-z]{5-8}\b)', + 'language-extension' => '(?:-(\b[a-z]{3}){1,3}\b)?', + 'script' => '(?:-(\b[a-z]{4})\b)?', + 'region' => '(?:-(\b[a-z]{2}|[0-9]{3})\b)?', + 'variant' => '(?:-(\b[0-9][a-z]{1,3}|[a-z][a-z0-9]{4,7})\b)?', + 'extension' => '(?:-(\b[a-wy-z]-[a-z0-9]{2,8})\b)?', + 'private-use' => '(?:-(\bx-[a-z0-9]{1,8})\b)?', + ); + + /** + * @var string[] { + * @type string $language Usually 2 or three letters (ISO 639). + * @type string $language-extension Up to three groups of 3 letters. + * @type string $script Four letters. + * @type string $region Either two letters of three digits. + * @type string $variant Either one digit followed by 1 to 3 letters, or a letter followed by 2 to 7 alphanumerical characters. + * @type string $extension One letter that cannot be an 'x', followed by 2 to 8 alphanumerical characters. + * @type string $private-use Starts by 'x-', followed by 1 to 8 alphanumerical characters. + * } + */ + protected $subtags; + + /** + * @var float + */ + protected $quality; + + /** + * PLL_Accept_Language constructor. + * + * @since 3.0 + * + * @param string[] $subtags With subtag name as keys and subtag values as names. + * @param mixed $quality Floating point value from 0.0 to 1.0. Higher values indicates a user's preference. + */ + public function __construct( $subtags, $quality = 1.0 ) { + $this->subtags = $subtags; + $this->quality = is_numeric( $quality ) ? floatval( $quality ) : 1.0; + } + + /** + * Creates a new instance from an array resulting of a PHP {@see preg_match()} or {@see preg_match_all()} call. + * + * @since 3.0 + * + * @param string[] $matches Expects first entry to be full match, following entries to be subtags and last entry to be quality factor. + * @return PLL_Accept_Language + */ + public static function from_array( $matches ) { + $subtags = array_combine( + array_keys( array_slice( self::SUBTAG_PATTERNS, 0, count( $matches ) - 1 ) ), + array_slice( $matches, 1, count( self::SUBTAG_PATTERNS ) ) + ); + $quality = count( $matches ) === 9 ? $matches[8] : 1.0; + + return new PLL_Accept_Language( $subtags, $quality ); + } + + /** + * Returns the full language tag. + * + * @since 3.0 + * + * @return string + */ + public function __toString() { + $subtags = array_filter( + $this->subtags, + function ( $subtag ) { + return ! empty( trim( $subtag ) ); + } + ); + return implode( '-', $subtags ); + } + + /** + * Returns the quality factor as negotiated by the browser agent. + * + * @since 3.0 + * + * @return float + */ + public function get_quality() { + return $this->quality; + } + + /** + * Returns a subtag from the language tag. + * + * @since 3.0 + * + * @param string $name A valid subtag name, {@see PLL_Accept_Language::SUBTAG_PATTERNS} for available subtag names. + * @return string + */ + public function get_subtag( $name ) { + return $this->subtags[ $name ] ?? ''; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/accept-languages-collection.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/accept-languages-collection.php new file mode 100644 index 0000000..1e512c1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/accept-languages-collection.php @@ -0,0 +1,143 @@ +1|0)(?>\.[0-9]+)?)'; + $full_pattern = "/{$language_pattern}(?:{$quality_pattern})?/i"; + + preg_match_all( + $full_pattern, + $http_header, + $lang_parse, + PREG_SET_ORDER + ); + + return new PLL_Accept_Languages_Collection( + array_map( + array( PLL_Accept_Language::class, 'from_array' ), + $lang_parse + ) + ); + } + + /** + * PLL_Accept_Languages_Collection constructor. + * + * @since 3.0 + * + * @param PLL_Accept_Language[] $accept_languages Objects representing Accept-Language HTTP headers. + */ + public function __construct( $accept_languages = array() ) { + $this->accept_languages = $accept_languages; + } + + /** + * Bubble sort (need a stable sort for Android, so can't use a PHP sort function). + * + * @since 3.0 + * + * @return void + */ + public function bubble_sort() { + $k = $this->accept_languages; + $v = array_map( + function ( $accept_lang ) { + return $accept_lang->get_quality(); + }, + $this->accept_languages + ); + + if ( $n = count( $k ) ) { + + if ( $n > 1 ) { + for ( $i = 2; $i <= $n; $i++ ) { + for ( $j = 0; $j <= $n - 2; $j++ ) { + if ( $v[ $j ] < $v[ $j + 1 ] ) { + // Swap values. + $temp = $v[ $j ]; + $v[ $j ] = $v[ $j + 1 ]; + $v[ $j + 1 ] = $temp; + // Swap keys. + $temp = $k[ $j ]; + $k[ $j ] = $k[ $j + 1 ]; + $k[ $j + 1 ] = $temp; + } + } + } + } + $this->accept_languages = array_filter( + $k, + function ( $accept_lang ) { + return $accept_lang->get_quality() > 0; + } + ); + } + } + + /** + * Looks through sorted list and use first one that matches our language list. + * + * @since 3.0 + * + * @param PLL_Language[] $languages The language list. + * @return string|false A language slug if there's a match, false otherwise. + */ + public function find_best_match( $languages = array() ) { + foreach ( $this->accept_languages as $accept_lang ) { + // First loop to match the exact locale. + foreach ( $languages as $language ) { + if ( 0 === strcasecmp( $accept_lang, $language->get_locale( 'display' ) ) ) { + return $language->slug; + } + } + + // In order of priority. + $subsets = array(); + if ( ! empty( $accept_lang->get_subtag( 'region' ) ) ) { + $subsets[] = $accept_lang->get_subtag( 'language' ) . '-' . $accept_lang->get_subtag( 'region' ); + $subsets[] = $accept_lang->get_subtag( 'region' ); + } + if ( ! empty( $accept_lang->get_subtag( 'variant' ) ) ) { + $subsets[] = $accept_lang->get_subtag( 'language' ) . '-' . $accept_lang->get_subtag( 'variant' ); + } + $subsets[] = $accept_lang->get_subtag( 'language' ); + + // More loops to match the subsets. + foreach ( $languages as $language ) { + foreach ( $subsets as $subset ) { + + if ( 0 === stripos( $subset, $language->slug ) || 0 === stripos( $language->get_locale( 'display' ), $subset ) ) { + return $language->slug; + } + } + } + } + return false; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/canonical.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/canonical.php new file mode 100644 index 0000000..681e38b --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/canonical.php @@ -0,0 +1,275 @@ +links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = $polylang->options; + $this->curlang = &$polylang->curlang; + } + + /** + * If the language code is not in agreement with the language of the content, + * redirects incoming links to the proper URL to avoid duplicate content. + * + * @since 0.9.6 + * + * @global WP_Query $wp_query WordPress Query object. + * @global bool $is_IIS + * + * @param string $requested_url Optional, defaults to requested url. + * @param bool $do_redirect Optional, whether to perform the redirect or not. + * @return string|void Returns if redirect is not performed. + */ + public function check_canonical_url( $requested_url = '', $do_redirect = true ) { + global $wp_query; + + // Don't redirect in same cases as WP. + if ( is_trackback() || is_search() || is_admin() || is_preview() || is_robots() || ( $GLOBALS['is_IIS'] && ! iis7_supports_permalinks() ) ) { + return; + } + + // Don't redirect mysite.com/?attachment_id= to mysite.com/en/?attachment_id=. + if ( 1 == $this->options['force_lang'] && is_attachment() && isset( $_GET['attachment_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + return; + } + + /* + * If the default language code is not hidden and the static front page url contains the page name, + * the customizer lands here and the code below would redirect to the list of posts. + */ + if ( is_customize_preview() ) { + return; + } + + if ( empty( $requested_url ) ) { + $requested_url = pll_get_requested_url(); + } + + if ( ( is_single() && ( ! is_attachment() || get_option( 'wp_attachment_pages_enabled' ) ) ) || ( is_page() && ! is_front_page() ) ) { + $post = get_post(); + if ( $post instanceof WP_Post && $this->model->is_translated_post_type( $post->post_type ) ) { + $language = $this->model->post->get_language( (int) $post->ID ); + } + } + + if ( ! empty( $wp_query->tax_query ) ) { + if ( $this->model->is_translated_taxonomy( $this->get_queried_taxonomy( $wp_query->tax_query ) ) ) { + $term_id = $this->get_queried_term_id( $wp_query->tax_query ); + if ( $term_id ) { + $language = $this->model->term->get_language( $term_id ); + } + } + } + + if ( $wp_query->is_posts_page ) { + $page_id = get_query_var( 'page_id' ); + if ( ! $page_id ) { + $page_id = get_queried_object_id(); + } + if ( $page_id && is_numeric( $page_id ) ) { + $language = $this->model->post->get_language( (int) $page_id ); + } + } + + if ( 3 === $this->options['force_lang'] ) { + $requested_host = wp_parse_url( $requested_url, PHP_URL_HOST ); + foreach ( $this->options['domains'] as $lang => $domain ) { + $host = wp_parse_url( $domain, PHP_URL_HOST ); + if ( $requested_host && $host && ltrim( $requested_host, 'w.' ) === ltrim( $host, 'w.' ) ) { + $language = $this->model->get_language( $lang ); + } + } + } + + if ( empty( $language ) ) { + /** @var PLL_Language $language */ + $language = $this->curlang; + $redirect_url = $requested_url; + } else { + $redirect_url = $this->redirect_canonical( $requested_url, $language ); + $redirect_url = $this->options['force_lang'] ? + $this->links_model->switch_language_in_link( $redirect_url, $language ) : + $this->links_model->remove_language_from_link( $redirect_url ); // Works only for default permalinks. + } + + + /** + * Filters the canonical url detected by Polylang. + * + * @since 1.6 + * + * @param string|false $redirect_url False or the url to redirect to. + * @param PLL_Language $language The language detected. + */ + $redirect_url = apply_filters( 'pll_check_canonical_url', $redirect_url, $language ); + + if ( ! $redirect_url || $requested_url === $redirect_url ) { + return $requested_url; + } + + if ( ! $do_redirect ) { + return $redirect_url; + } + + // Protect against chained redirects. + if ( $redirect_url === $this->check_canonical_url( $redirect_url, false ) && wp_validate_redirect( $redirect_url ) ) { + wp_safe_redirect( $redirect_url, 301, POLYLANG ); + exit; + } + } + + /** + * Returns the term_id of the requested term. + * + * @since 2.9 + * + * @param WP_Tax_Query $tax_query An instance of WP_Tax_Query. + * @return int + */ + protected function get_queried_term_id( $tax_query ) { + $queried_terms = $tax_query->queried_terms; + $taxonomy = $this->get_queried_taxonomy( $tax_query ); + + if ( ! isset( $queried_terms[ $taxonomy ]['terms'] ) || ! is_array( $queried_terms[ $taxonomy ]['terms'] ) ) { + return 0; + } + + if ( ! isset( $queried_terms[ $taxonomy ]['field'] ) ) { + return 0; + } + + $field = $queried_terms[ $taxonomy ]['field']; + $term = reset( $queried_terms[ $taxonomy ]['terms'] ); + $lang = isset( $queried_terms['language']['terms'] ) ? reset( $queried_terms['language']['terms'] ) : ''; + + // We can get a term_id when requesting a plain permalink, eg /?cat=1. + if ( 'term_id' === $field ) { + return $term; + } + + // We get a slug when requesting a pretty permalink. Let's query all corresponding terms. + $args = array( + 'lang' => '', + 'taxonomy' => $taxonomy, + $field => $term, + 'hide_empty' => false, + 'fields' => 'ids', + ); + $term_ids = get_terms( $args ); + + if ( ! is_array( $term_ids ) || empty( $term_ids ) ) { + return 0; + } + + $term_ids = array_filter( $term_ids, 'is_numeric' ); + + $filtered_terms_by_lang = array_filter( + $term_ids, + function ( $term_id ) use ( $lang ) { + $term_lang = $this->model->term->get_language( (int) $term_id ); + + return ! empty( $term_lang ) && $term_lang->slug === $lang; + } + ); + + $tr_term = (int) reset( $filtered_terms_by_lang ); + + if ( ! empty( $tr_term ) ) { + // The queried term exists in the desired language. + return $tr_term; + } + + // The queried term doesn't exist in the desired language, let's return the first one retrieved. + return (int) reset( $term_ids ); + } + + /** + * Find the taxonomy being queried. + * + * @since 2.9 + * + * @param WP_Tax_Query $tax_query An instance of WP_Tax_Query. + * @return string A taxonomy slug + */ + protected function get_queried_taxonomy( $tax_query ) { + $queried_terms = $tax_query->queried_terms; + unset( $queried_terms['language'] ); + + return (string) key( $queried_terms ); + } + + /** + * Evaluates the canonical redirect url through the dedicated WP function. + * + * @since 3.3 + * + * @global WP_Query $wp_query WordPress Query object. + * + * @param string $url Requested url. + * @param PLL_Language $language Language of the queried object. + * @return string + */ + protected function redirect_canonical( $url, $language ) { + /** + * @var WP_Query + */ + global $wp_query; + + $this->curlang = $language; // Hack to filter the `page_for_posts` option in the correct language. + + $backup_wp_query = $wp_query; + + if ( isset( $wp_query->tax_query ) ) { + unset( $wp_query->tax_query->queried_terms['language'] ); + unset( $wp_query->query['lang'] ); + } + + $redirect_url = redirect_canonical( $url, false ); + + $wp_query = $backup_wp_query; + + return $redirect_url ?: $url; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-content.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-content.php new file mode 100644 index 0000000..d49893d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-content.php @@ -0,0 +1,160 @@ +options['media_support'] ) ) { + return false; + } + + $var = get_query_var( 'lang' ); + + if ( ! empty( $var ) && is_string( $var ) ) { + $lang = explode( ',', $var ); + return $this->model->get_language( reset( $lang ) ); // Choose the first queried language. + } + + if ( is_singular() ) { + foreach ( $this->get_singular_query_vars() as $var ) { + if ( ! empty( $var ) && is_numeric( $var ) ) { + return $this->model->post->get_language( (int) $var ); + } + } + } + + foreach ( $this->model->get_translated_taxonomies() as $taxonomy ) { + $tax_object = get_taxonomy( $taxonomy ); + + if ( empty( $tax_object ) || empty( $tax_object->query_var ) ) { + continue; + } + + $var = get_query_var( $tax_object->query_var ); + + if ( ! is_string( $var ) || empty( $var ) ) { + continue; + } + + $term = get_term_by( 'slug', $var, $taxonomy ); + + if ( ! $term instanceof WP_Term ) { + continue; + } + + return $this->model->term->get_language( $term->term_id ); + } + + return false; + } + + /** + * Returns the values of query vars corresponding to "singular" pages. + * + * @since 3.8 + * + * @return Generator + */ + private function get_singular_query_vars(): Generator { + yield get_queried_object_id(); + yield get_query_var( 'p' ); + yield get_query_var( 'page_id' ); + yield get_query_var( 'attachment_id' ); + } + + /** + * Sets the language for the home page. + * Adds the lang query var when querying archives with no language code. + * + * @since 1.2 + * + * @param WP_Query $query Instance of WP_Query. + * @return void + */ + public function parse_main_query( $query ) { + if ( empty( $GLOBALS['wp_the_query'] ) || $query !== $GLOBALS['wp_the_query'] ) { + return; + } + + $qv = $query->query_vars; + + // Homepage is requested, let's set the language + // Take care to avoid posts page for which is_home = 1 + if ( empty( $query->query ) && ( is_home() || is_page() ) ) { + $this->set_language( $this->get_home_language() ); + $this->home_requested(); + } + + parent::parse_main_query( $query ); + + $is_archive = ( count( $query->query ) == 1 && ! empty( $qv['paged'] ) ) || + $query->is_date || + $query->is_author || + ( ! empty( $qv['post_type'] ) && $query->is_post_type_archive && $this->model->is_translated_post_type( $qv['post_type'] ) ); + + // Sets the language in case we hide the default language + // Use $query->query['s'] as is_search is not set when search is empty + // http://wordpress.org/support/topic/search-for-empty-string-in-default-language + if ( $this->options['hide_default'] && ! isset( $qv['lang'] ) && ( $is_archive || isset( $query->query['s'] ) || ( count( $query->query ) == 1 && ! empty( $qv['feed'] ) ) ) ) { + $this->set_language( $this->model->get_default_language() ); + $this->set_curlang_in_query( $query ); + } + } + + /** + * Sets the language from content. + * + * @since 1.2 + * + * @return void + */ + public function wp(): void { + parent::set_language(); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-domain.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-domain.php new file mode 100644 index 0000000..d94ddc5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-domain.php @@ -0,0 +1,45 @@ +model->get_language( $this->links_model->get_language_from_url() ); + } + + /** + * Adds query vars to query for home pages in all languages + * + * @since 1.5 + * + * @return void + */ + public function home_requested() { + $this->set_curlang_in_query( $GLOBALS['wp_query'] ); + /** This action is documented in src/frontend/choose-lang.php */ + do_action( 'pll_home_requested' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-url.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-url.php new file mode 100644 index 0000000..3874a86 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang-url.php @@ -0,0 +1,125 @@ +set_language(); + } + + add_filter( 'request', array( $this, 'request' ) ); + } + + /** + * Returns the language according to information found in the url. + * + * @since 1.2 + * @since 3.8 Renamed from `get_language_from_url()`. + * + * @return PLL_Language|false + */ + protected function get_current_language() { + $host = str_replace( 'www.', '', (string) wp_parse_url( $this->links_model->home, PHP_URL_HOST ) ); // Remove www. for the comparison. + $home_path = (string) wp_parse_url( $this->links_model->home, PHP_URL_PATH ); + + $requested_url = pll_get_requested_url(); + $requested_host = str_replace( 'www.', '', (string) wp_parse_url( $requested_url, PHP_URL_HOST ) ); // Remove www. for the comparison. + $requested_path = rtrim( str_replace( $this->index, '', (string) wp_parse_url( $requested_url, PHP_URL_PATH ) ), '/' ); // Some PHP setups turn requests for / into /index.php in REQUEST_URI. + $requested_query = wp_parse_url( $requested_url, PHP_URL_QUERY ); + + // Home is requested. + if ( $requested_host === $host && $requested_path === $home_path && empty( $requested_query ) ) { + add_action( 'setup_theme', array( $this, 'home_requested' ) ); + return $this->get_home_language(); + } + + // Take care to post & page preview http://wordpress.org/support/topic/static-frontpage-url-parameter-url-language-information. + if ( isset( $_GET['preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + foreach ( array( 'p', 'page_id' ) as $var ) { + if ( empty( $_GET[ $var ] ) || ! is_numeric( $_GET[ $var ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + continue; + } + $lang = $this->model->post->get_language( (int) $_GET[ $var ] ); // phpcs:ignore WordPress.Security.NonceVerification + return $lang ?: $this->model->get_default_language(); + } + } + + // Take care to (unattached) attachments. + if ( ! empty( $_GET['attachment_id'] ) && is_numeric( $_GET['attachment_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + return $this->model->post->get_language( (int) $_GET['attachment_id'] ); // phpcs:ignore WordPress.Security.NonceVerification + } + + $slug = $this->links_model->get_language_from_url(); + + if ( ! empty( $slug ) ) { + return $this->model->get_language( $slug ); + } + + if ( $this->options['hide_default'] ) { + return $this->model->get_default_language(); + } + + return false; + } + + + /** + * Adds the current language in query vars + * useful for subdomains and multiple domains + * + * @since 1.8 + * + * @param array $qv main request query vars + * @return array modified query vars + */ + public function request( $qv ) { + // FIXME take care not to break untranslated content + // FIXME media ? + + // Untranslated post types + if ( isset( $qv['post_type'] ) && ! $this->model->is_translated_post_type( $qv['post_type'] ) ) { + return $qv; + } + + // Untranslated taxonomies + $tax_qv = array_filter( wp_list_pluck( get_taxonomies( array(), 'objects' ), 'query_var' ) ); // Get all taxonomies query vars + $tax_qv = array_intersect( $tax_qv, array_keys( $qv ) ); // Get all queried taxonomies query vars + + if ( ! $this->model->is_translated_taxonomy( array_keys( $tax_qv ) ) ) { + return $qv; + } + + if ( isset( $this->curlang ) && empty( $qv['lang'] ) ) { + $qv['lang'] = $this->curlang->slug; + } + + return $qv; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang.php new file mode 100644 index 0000000..a0a9e9c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/choose-lang.php @@ -0,0 +1,377 @@ +links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = $polylang->options; + + $this->curlang = &$polylang->curlang; + } + + /** + * Sets the language for ajax requests + * and setup actions + * Any child class must call this method if it overrides it + * + * @since 1.8 + * + * @return void + */ + public function init() { + if ( Polylang::is_ajax_on_front() || ! wp_using_themes() ) { + $this->set_language( empty( $_REQUEST['lang'] ) ? $this->get_preferred_language() : $this->model->get_language( sanitize_key( $_REQUEST['lang'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification + } + + add_action( 'pre_comment_on_post', array( $this, 'pre_comment_on_post' ) ); // sets the language of comment + add_action( 'parse_query', array( $this, 'parse_main_query' ), 2 ); // sets the language in special cases + add_action( 'wp', array( $this, 'maybe_setcookie' ), 7 ); + } + + /** + * Sets the current language. + * Also fires the action 'pll_language_defined'. + * + * @since 1.2 + * + * @param PLL_Language|false $curlang Optional. Current language. Default is `false`. + * @return void + */ + protected function set_language( $curlang = false ): void { + // Don't set the language a second time. + if ( isset( $this->curlang ) ) { + return; + } + + if ( ! $curlang instanceof PLL_Language ) { + $curlang = $this->get_current_language(); + + if ( ! $curlang instanceof PLL_Language ) { + $curlang = $this->get_preferred_language(); + } + } + + /** + * Filters the language before it is set. + * + * @since 0.9 + * @since 3.8 Is used all the time, not only when the language is defined by the content. + * + * @param PLL_Language|false $curlang Language object or false if none was found. + */ + $curlang = apply_filters( 'pll_get_current_language', $curlang ?? false ); + + if ( ! $curlang instanceof PLL_Language ) { + $curlang = $this->model->get_default_language(); + + if ( ! $curlang instanceof PLL_Language ) { + return; + } + } + + $this->curlang = $curlang; + + $GLOBALS['text_direction'] = $this->curlang->is_rtl ? 'rtl' : 'ltr'; + if ( did_action( 'wp_default_styles' ) ) { + wp_styles()->text_direction = $GLOBALS['text_direction']; + } + + /** + * Fires when the current language is defined. + * + * @since 0.9.5 + * + * @param string $slug Current language code. + * @param PLL_Language $curlang Current language object. + */ + do_action( 'pll_language_defined', $this->curlang->slug, $this->curlang ); + } + + /** + * Returns the language to assign as the current one. + * + * @since 3.8 + * + * @return PLL_Language|false + */ + abstract protected function get_current_language(); + + /** + * Set a cookie to remember the language. + * Setting PLL_COOKIE to false will disable cookie although it will break some functionalities + * + * @since 1.5 + * + * @return void + */ + public function maybe_setcookie() { + // Don't set cookie in javascript when a cache plugin is active. + if ( ! pll_is_cache_active() && ! empty( $this->curlang ) && ! is_404() && ! is_favicon() ) { + $args = array( + 'domain' => 2 === $this->options['force_lang'] ? wp_parse_url( $this->links_model->home, PHP_URL_HOST ) : COOKIE_DOMAIN, + 'samesite' => 3 === $this->options['force_lang'] ? 'None' : 'Lax', + ); + PLL_Cookie::set( $this->curlang->slug, $args ); + } + } + + /** + * Get the preferred language according to the browser preferences. + * + * @since 1.8 + * + * @return string|bool The preferred language slug or false. + */ + public function get_preferred_browser_language() { + if ( isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) { + $accept_langs = PLL_Accept_Languages_Collection::from_accept_language_header( sanitize_text_field( wp_unslash( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) ); + + $accept_langs->bubble_sort(); + + $languages = $this->model->languages->filter( 'hide_empty' )->get_list(); // Hides languages with no post. + + /** + * Filters the list of languages to use to match the browser preferences. + * + * @since 1.9.3 + * + * @param array $languages Array of PLL_Language objects. + */ + $languages = apply_filters( 'pll_languages_for_browser_preferences', $languages ); + + return $accept_langs->find_best_match( $languages ); + } + + return false; + } + + /** + * Returns the preferred language + * either from the cookie if it's a returning visit + * or according to browser preference + * or the default language + * + * @since 0.1 + * + * @return PLL_Language|false browser preferred language or default language + */ + public function get_preferred_language() { + $language = false; + $cookie = false; + + if ( isset( $_COOKIE[ PLL_COOKIE ] ) ) { + // Check first if the user was already browsing this site. + $language = sanitize_key( $_COOKIE[ PLL_COOKIE ] ); + $cookie = true; + } elseif ( $this->options['browser'] ) { + $language = $this->get_preferred_browser_language(); + } + + /** + * Filter the visitor's preferred language (normally set first by cookie + * if this is not the first visit, then by the browser preferences). + * If no preferred language has been found or set by this filter, + * Polylang fallbacks to the default language + * + * @since 1.0 + * @since 2.7 Added $cookie parameter. + * + * @param string|bool $language Preferred language code, false if none has been found. + * @param bool $cookie Whether the preferred language has been defined by the cookie. + */ + $slug = apply_filters( 'pll_preferred_language', $language, $cookie ); + + // Return default if there is no preferences in the browser or preferences does not match our languages or it is requested not to use the browser preference. + $lang = $this->model->get_language( $slug ); + return $lang ?: $this->model->get_default_language(); + } + + /** + * Returns the language when home page is requested. + * + * @since 3.8 + * + * @return PLL_Language|false + */ + protected function get_home_language() { + // Test referer in case PLL_COOKIE is set to false. Since WP 3.6.1, wp_get_referer() validates the host which is exactly what we want. + // Thanks to Ov3rfly http://wordpress.org/support/topic/enhance-feature-when-front-page-is-visited-set-language-according-to-browser. + if ( $this->options['hide_default'] && ( wp_get_referer() || ! $this->options['browser'] ) ) { + return $this->model->get_default_language(); + } + return $this->get_preferred_language(); // Returns the language according to browser preference or default language. + } + + /** + * To call when the home page has been requested + * Make sure to call this after 'setup_theme' has been fired as we need $wp_query + * Performs a redirection to the home page in the current language if needed + * + * @since 0.9 + * + * @return void + */ + public function home_requested() { + if ( empty( $this->curlang ) ) { + return; + } + + // We are already on the right page + if ( $this->curlang->is_default && $this->options['hide_default'] ) { + $this->set_curlang_in_query( $GLOBALS['wp_query'] ); + + /** + * Fires when the site root page is requested + * + * @since 1.8 + */ + do_action( 'pll_home_requested' ); + } + // Redirect to the home page in the right language + // Test to avoid crash if get_home_url returns something wrong + // FIXME why this happens? http://wordpress.org/support/topic/polylang-crashes-1 + // Don't redirect if $_POST is not empty as it could break other plugins + elseif ( is_string( $redirect = $this->curlang->get_home_url() ) && empty( $_POST ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // Don't forget the query string which may be added by plugins + $query_string = wp_parse_url( pll_get_requested_url(), PHP_URL_QUERY ); + if ( ! empty( $query_string ) ) { + $redirect .= ( $this->links_model->using_permalinks ? '?' : '&' ) . $query_string; + } + + /** + * When a visitor reaches the site home, Polylang redirects to the home page in the correct language. + * This filter allows plugins to modify the redirected url or prevent this redirection + * /!\ this filter may be fired *before* the theme is loaded + * + * @since 1.1.1 + * + * @param string $redirect the url the visitor will be redirected to + */ + $redirect = apply_filters( 'pll_redirect_home', $redirect ); + if ( $redirect && wp_validate_redirect( $redirect ) ) { + $this->maybe_setcookie(); + header( 'Vary: Accept-Language' ); + wp_safe_redirect( $redirect, 302, POLYLANG ); + exit; + } + } + } + + /** + * Set the language when posting a comment + * + * @since 0.8.4 + * + * @param int $post_id the post being commented + * @return void + */ + public function pre_comment_on_post( $post_id ) { + $this->set_language( $this->model->post->get_language( $post_id ) ); + } + + /** + * Modifies some main query vars for the home page and the page for posts + * to enable one home page (and one page for posts) per language. + * + * @since 1.2 + * + * @param WP_Query $query Instance of WP_Query. + * @return void + */ + public function parse_main_query( $query ) { + if ( ! $query->is_main_query() ) { + return; + } + + /** + * This filter allows to set the language based on information contained in the main query + * + * @since 1.8 + * + * @param PLL_Language|false $lang Language object or false. + * @param WP_Query $query WP_Query object. + */ + if ( $lang = apply_filters( 'pll_set_language_from_query', false, $query ) ) { + $this->set_language( $lang ); + $this->set_curlang_in_query( $query ); + } elseif ( ( count( $query->query ) == 1 || ( is_paged() && count( $query->query ) == 2 ) ) && $lang = get_query_var( 'lang' ) ) { + $lang = $this->model->get_language( $lang ); + $this->set_language( $lang ); // Set the language now otherwise it will be too late to filter sticky posts! + + // Set is_home on translated home page when it displays posts. It must be true on page 2, 3... too. + $query->is_home = true; + $query->is_tax = false; + $query->is_archive = false; + + // Filters is_front_page() in case a static front page is not translated in this language. + add_filter( 'option_show_on_front', array( $this, 'filter_option_show_on_front' ) ); + } + } + + /** + * Filters the option show_on_front when the current front page displays posts. + * + * This is useful when a static front page is not translated in all languages. + * + * @return string + */ + public function filter_option_show_on_front() { + return 'posts'; + } + + /** + * Sets the current language in the query. + * + * @since 2.2 + * + * @param WP_Query $query Instance of WP_Query. + * @return void + */ + protected function set_curlang_in_query( &$query ) { + if ( ! empty( $this->curlang ) ) { + $pll_query = new PLL_Query( $query, $this->model ); + $pll_query->set_language( $this->curlang ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-auto-translate.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-auto-translate.php new file mode 100644 index 0000000..68b4bef --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-auto-translate.php @@ -0,0 +1,346 @@ +model = &$polylang->model; + $this->curlang = &$polylang->curlang; + + add_action( 'parse_query', array( $this, 'translate_included_ids_in_query' ), 100 ); // After all Polylang filters. + add_filter( 'get_terms_args', array( $this, 'get_terms_args' ), 20, 2 ); + } + + /** + * Helper function to get the translated post in the current language. + * + * @since 1.8 + * + * @param int $post_id The ID of the post to translate. + * @return int + * + * @phpstan-return int<0, max> + */ + protected function get_post( $post_id ) { + return $this->model->post->get( $post_id, $this->curlang ); + } + + /** + * Helper function to get the translated term in the current language. + * + * @since 1.8 + * + * @param int $term_id The ID of the term to translate. + * @return int + * + * @phpstan-return int<0, max> + */ + protected function get_term( $term_id ) { + return $this->model->term->get( $term_id, $this->curlang ); + } + + /** + * Filters posts query to automatically translate included ids + * + * @since 1.1 + * + * @param WP_Query $query WP_Query object + * @return void + */ + public function translate_included_ids_in_query( $query ) { + global $wpdb; + $qv = &$query->query_vars; + + if ( $query->is_main_query() || isset( $qv['lang'] ) || ( ! empty( $qv['post_type'] ) && ! $this->model->is_translated_post_type( $qv['post_type'] ) ) ) { + return; + } + + // /!\ always keep untranslated as is + + // Term ids separated by a comma + $arr = array(); + if ( ! empty( $qv['cat'] ) ) { + foreach ( explode( ',', $qv['cat'] ) as $cat ) { + $tr = $this->get_term( abs( (int) $cat ) ); + $arr[] = $cat < 0 ? -$tr : $tr; + } + + $qv['cat'] = implode( ',', $arr ); + } + + // Category_name + $arr = array(); + if ( ! empty( $qv['category_name'] ) ) { + foreach ( explode( ',', $qv['category_name'] ) as $slug ) { + $arr[] = $this->get_translated_term_by( 'slug', $slug, 'category' ); + } + + $qv['category_name'] = implode( ',', $arr ); + } + + // Array of term ids + foreach ( array( 'category__and', 'category__in', 'category__not_in', 'tag__and', 'tag__in', 'tag__not_in' ) as $key ) { + $arr = array(); + if ( ! empty( $qv[ $key ] ) ) { + foreach ( $qv[ $key ] as $cat ) { + $tr = $this->get_term( $cat ); + $arr[] = $tr ?: $cat; + } + $qv[ $key ] = $arr; + } + } + + // Tag + if ( ! empty( $qv['tag'] ) ) { + $qv['tag'] = $this->translate_terms_list( $qv['tag'], 'post_tag' ); + } + + // tag_id can only take one id + if ( ! empty( $qv['tag_id'] ) && $tr_id = $this->get_term( $qv['tag_id'] ) ) { + $qv['tag_id'] = $tr_id; + } + + // Array of tag slugs + foreach ( array( 'tag_slug__and', 'tag_slug__in' ) as $key ) { + $arr = array(); + if ( ! empty( $qv[ $key ] ) ) { + foreach ( $qv[ $key ] as $slug ) { + $arr[] = $this->get_translated_term_by( 'slug', $slug, 'post_tag' ); + } + + $qv[ $key ] = $arr; + } + } + + // Custom taxonomies + // According to the codex, this type of query is deprecated as of WP 3.1 but it does not appear in WP 3.5 source code + foreach ( array_intersect( $this->model->get_translated_taxonomies(), get_taxonomies( array( '_builtin' => false ) ) ) as $taxonomy ) { + $tax = get_taxonomy( $taxonomy ); + if ( ! empty( $tax ) && ! empty( $tax->query_var ) && ! empty( $qv[ $tax->query_var ] ) ) { + $qv[ $tax->query_var ] = $this->translate_terms_list( $qv[ $tax->query_var ], $taxonomy ); + } + } + + // Tax_query since WP 3.1 + if ( ! empty( $qv['tax_query'] ) && is_array( $qv['tax_query'] ) ) { + $qv['tax_query'] = $this->translate_tax_query_recursive( $qv['tax_query'] ); + } + + // p, page_id, post_parent can only take one id + foreach ( array( 'p', 'page_id', 'post_parent' ) as $key ) { + if ( ! empty( $qv[ $key ] ) && $tr_id = $this->get_post( $qv[ $key ] ) ) { + $qv[ $key ] = $tr_id; + } + } + + // name, can only take one slug + if ( ! empty( $qv['name'] ) && is_string( $qv['name'] ) ) { + if ( empty( $qv['post_type'] ) ) { + $post_types = array( 'post' ); + } elseif ( 'any' === $qv['post_type'] ) { + $post_types = get_post_types( array( 'exclude_from_search' => false ) ); // May return a empty array + } else { + $post_types = (array) $qv['post_type']; + } + + if ( ! empty( $post_types ) ) { + // No function to get post by name except get_posts itself + $id = $wpdb->get_var( + sprintf( + "SELECT ID from {$wpdb->posts} + WHERE {$wpdb->posts}.post_type IN ( '%s' ) + AND post_name='%s'", + implode( "', '", esc_sql( $post_types ) ), + esc_sql( $qv['name'] ) + ) + ); + if ( $id ) { + $tr_id = $this->get_post( $id ); + if ( $tr_id ) { + $tr = get_post( $tr_id ); + if ( $tr ) { + $qv['name'] = $tr->post_name; + } + } + } + } + } + + // pagename, the page id is already available in queried_object_id + if ( ! empty( $qv['pagename'] ) && ! empty( $query->queried_object_id ) && $tr_id = $this->get_post( $query->queried_object_id ) ) { + $query->queried_object_id = $tr_id; + $qv['pagename'] = get_page_uri( $tr_id ); + } + + // Array of post ids + // post_parent__in & post_parent__not_in since WP 3.6 + foreach ( array( 'post__in', 'post__not_in', 'post_parent__in', 'post_parent__not_in' ) as $key ) { // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn + $arr = array(); + if ( ! empty( $qv[ $key ] ) ) { + // post__in used by the 2 functions below + // Useless to filter them as output is already in the right language and would result in performance loss + foreach ( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ) as $trace ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions + if ( in_array( $trace['function'], array( 'wp_nav_menu', 'gallery_shortcode' ) ) ) { + return; + } + } + + foreach ( $qv[ $key ] as $p ) { + $tr = $this->get_post( $p ); + $arr[] = $tr ?: $p; + } + + $qv[ $key ] = $arr; + } + } + } + + /** + * Filters the terms query to automatically translate included ids. + * + * @since 1.1.1 + * + * @param array $args An array of get_terms() arguments. + * @param array $taxonomies An array of taxonomy names. + * @return array + */ + public function get_terms_args( $args, $taxonomies ) { + if ( ! isset( $args['lang'] ) && ! empty( $args['include'] ) && ( empty( $taxonomies ) || $this->model->is_translated_taxonomy( $taxonomies ) ) ) { + $arr = array(); + + foreach ( wp_parse_id_list( $args['include'] ) as $id ) { + $tr = $this->get_term( $id ); + $arr[] = $tr ?: $id; + } + + $args['include'] = $arr; + } + return $args; + } + + /** + * Translates tax queries + * Compatible with nested tax queries introduced in WP 4.1 + * + * @since 1.7 + * + * @param array $tax_queries An array of tax queries. + * @return array Translated tax queries. + */ + protected function translate_tax_query_recursive( $tax_queries ) { + foreach ( $tax_queries as $key => $q ) { + if ( ! is_array( $q ) ) { + continue; + } + + if ( isset( $q['taxonomy'], $q['terms'] ) && $this->model->is_translated_taxonomy( $q['taxonomy'] ) ) { + $arr = array(); + $field = isset( $q['field'] ) && in_array( $q['field'], array( 'slug', 'name' ) ) ? $q['field'] : 'term_id'; + foreach ( (array) $q['terms'] as $t ) { + $arr[] = $this->get_translated_term_by( $field, $t, $q['taxonomy'] ); + } + + $tax_queries[ $key ]['terms'] = $arr; + } else { + // Nested queries. + $tax_queries[ $key ] = $this->translate_tax_query_recursive( $q ); + } + } + + return $tax_queries; + } + + /** + * Translates a term given one field. + * + * @since 2.3.3 + * + * @param string $field Either 'slug', 'name', 'term_id', or 'term_taxonomy_id' + * @param string|int $term Search for this term value + * @param string $taxonomy Taxonomy name. + * @return string|int Translated term slug, name, term_id or term_taxonomy_id + */ + protected function get_translated_term_by( $field, $term, $taxonomy ) { + if ( 'term_id' === $field ) { + if ( $tr_id = $this->get_term( $term ) ) { + return $tr_id; + } + } else { + $terms = get_terms( array( 'taxonomy' => $taxonomy, $field => $term, 'lang' => '' ) ); + + if ( ! empty( $terms ) && is_array( $terms ) ) { + $t = reset( $terms ); + if ( ! $t instanceof WP_Term ) { + return $term; + } + $tr_id = $this->get_term( $t->term_id ); + + if ( ! is_wp_error( $tr = get_term( $tr_id, $taxonomy ) ) ) { + return $tr->$field; + } + } + } + return $term; + } + + /** + * Translates a list of term slugs provided either as an array or a string + * with slugs separated by a comma or a '+'. + * + * @since 3.2.8 + * + * @param string|string[] $query_var The list of term slugs. + * @param string $taxonomy The taxonomy for terms. + * @return string|string[] The translated list. + */ + protected function translate_terms_list( $query_var, $taxonomy ) { + $slugs = array(); + + if ( is_array( $query_var ) ) { + $slugs = $query_var; + } elseif ( is_string( $query_var ) ) { + $sep = strpos( $query_var, ',' ) !== false ? ',' : '+'; // Two possible separators. + $slugs = explode( $sep, $query_var ); + } + + foreach ( $slugs as &$slug ) { + if ( ! is_string( $slug ) ) { + // We got an unexpected query var, let return it unchanged. + return $query_var; + } + $slug = $this->get_translated_term_by( 'slug', $slug, $taxonomy ); + } + + if ( ! empty( $sep ) ) { + return implode( $sep, $slugs ); + } + + return $slugs; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-links.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-links.php new file mode 100644 index 0000000..bb19e08 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-links.php @@ -0,0 +1,369 @@ + + */ + public $cache; + + /** + * Stores a list of files and functions that home_url() must not filter. + * + * @var array + */ + private $black_list = array(); + + /** + * Stores a list of files and functions that home_url() must filter. + * + * @var array + */ + private $white_list = array(); + + /** + * Constructor + * Adds filters once the language is defined + * Low priority on links filters to come after any other modification + * + * @since 1.8 + * + * @param PLL_Frontend $polylang The Polylang object. + */ + public function __construct( &$polylang ) { + parent::__construct( $polylang ); + + $this->curlang = &$polylang->curlang; + $this->cache = new PLL_Cache(); + + // Rewrites author and date links to filter them by language + foreach ( array( 'feed_link', 'author_link', 'search_link', 'year_link', 'month_link', 'day_link' ) as $filter ) { + add_filter( $filter, array( $this, 'archive_link' ), 20 ); + } + + // Meta in the html head section + add_action( 'wp_head', array( $this, 'wp_head' ), 1 ); + + // Modifies the home url + if ( pll_get_constant( 'PLL_FILTER_HOME_URL', true ) ) { + add_filter( 'home_url', array( $this, 'home_url' ), 10, 2 ); + } + + if ( $this->options['force_lang'] > 1 ) { + // Rewrites next and previous post links when not automatically done by WordPress + add_filter( 'get_pagenum_link', array( $this, 'archive_link' ), 20 ); + + add_filter( 'get_shortlink', array( $this, 'shortlink' ), 20, 2 ); + + // Rewrites ajax url + add_filter( 'admin_url', array( $this, 'admin_url' ), 10, 2 ); + } + + add_filter( 'oembed_endpoint_url', array( $this, 'add_current_language_url_query' ) ); + } + + /** + * Modifies the author and date links to add the language parameter (as well as feed link). + * + * @since 0.4 + * + * @param string $link The permalink to the archive. + * @return string The modified link. + */ + public function archive_link( $link ) { + return $this->links_model->switch_language_in_link( $link, $this->curlang ); + } + + /** + * Modifies page links + * and caches the result + * + * @since 1.7 + * + * @param string $link The page link. + * @param int $post_id The post ID. + * @return string The modified page link. + */ + public function _get_page_link( $link, $post_id ) { + $cache_key = "post:{$post_id}:{$link}"; + if ( false === $_link = $this->cache->get( $cache_key ) ) { + $_link = parent::_get_page_link( $link, $post_id ); + $this->cache->set( $cache_key, $_link ); + } + return $_link; + } + + /** + * Modifies attachment links + * and caches the result + * + * @since 1.6.2 + * + * @param string $link The attachment link. + * @param int $post_id The attachment post ID. + * @return string The modified attachment link. + */ + public function attachment_link( $link, $post_id ) { + $cache_key = "post:{$post_id}:{$link}"; + if ( false === $_link = $this->cache->get( $cache_key ) ) { + $_link = parent::attachment_link( $link, $post_id ); + $this->cache->set( $cache_key, $_link ); + } + return $_link; + } + + /** + * Modifies custom posts links + * and caches the result. + * + * @since 1.6 + * + * @param string $link The post link. + * @param WP_Post $post The post object. + * @return string The modified post link. + */ + public function post_type_link( $link, $post ) { + $cache_key = "post:{$post->ID}:{$link}"; + if ( false === $_link = $this->cache->get( $cache_key ) ) { + $_link = parent::post_type_link( $link, $post ); + $this->cache->set( $cache_key, $_link ); + } + return $_link; + } + + /** + * Modifies filtered taxonomies ( post format like ) and translated taxonomies links + * and caches the result. + * + * @since 0.7 + * + * @param string $link The term link. + * @param WP_Term $term The term object. + * @param string $tax The taxonomy name. + * @return string The modified link. + */ + public function term_link( $link, $term, $tax ) { + $cache_key = "term:{$term->term_id}:{$link}"; + if ( false === $_link = $this->cache->get( $cache_key ) ) { + if ( in_array( $tax, $this->model->get_filtered_taxonomies() ) ) { + $_link = $this->links_model->switch_language_in_link( $link, $this->curlang ); + + /** This filter is documented in src/filters-links.php */ + $_link = apply_filters( 'pll_term_link', $_link, $this->curlang, $term ); + } + + else { + $_link = parent::term_link( $link, $term, $tax ); + } + $this->cache->set( $cache_key, $_link ); + } + return $_link; + } + + /** + * Modifies the post short link when using one domain or subdomain per language. + * + * @since 2.6.9 + * + * @param string $link Post permalink. + * @param int $post_id Post id. + * @return string Post permalink with the correct domain. + */ + public function shortlink( $link, $post_id ) { + $post_type = get_post_type( $post_id ); + return $this->model->is_translated_post_type( $post_type ) ? $this->links_model->switch_language_in_link( $link, $this->model->post->get_language( $post_id ) ) : $link; + } + + /** + * Outputs references to translated pages ( if exists ) in the html head section + * + * @since 0.1 + * + * @return void + */ + public function wp_head() { + // Don't output anything on paged archives: see https://wordpress.org/support/topic/hreflang-on-page2 + // Don't output anything on paged pages and paged posts + if ( is_paged() || ( is_singular() && ( $page = get_query_var( 'page' ) ) && $page > 1 ) ) { + return; + } + + $urls = array(); + + // Google recommends to include self link https://support.google.com/webmasters/answer/189077?hl=en + foreach ( $this->model->get_languages_list() as $language ) { + if ( $url = $this->links->get_translation_url( $language ) ) { + $urls[ $language->get_locale( 'display' ) ] = $url; + } + } + + // Outputs the section only if there are translations ( $urls always contains self link ) + if ( ! empty( $urls ) && count( $urls ) > 1 ) { + $languages = array(); + $hreflangs = array(); + + // Prepare the list of languages to remove the country code + foreach ( array_keys( $urls ) as $locale ) { + $split = explode( '-', $locale ); + $languages[ $locale ] = reset( $split ); + } + + $count = array_count_values( $languages ); + + foreach ( $urls as $locale => $url ) { + $lang = $count[ $languages[ $locale ] ] > 1 ? $locale : $languages[ $locale ]; // Output the country code only when necessary + $hreflangs[ $lang ] = $url; + } + + // Adds the site root url when the default language code is not hidden + // See https://wordpress.org/support/topic/implementation-of-hreflangx-default + if ( is_front_page() && ! $this->options['hide_default'] && $this->options['force_lang'] < 3 ) { + $hreflangs['x-default'] = home_url( '/' ); + } + + /** + * Filters the list of rel hreflang attributes + * + * @since 2.1 + * + * @param array $hreflangs Array of urls with language codes as keys + */ + $hreflangs = apply_filters( 'pll_rel_hreflang_attributes', $hreflangs ); + + foreach ( $hreflangs as $lang => $url ) { + printf( '' . "\n", esc_url( $url ), esc_attr( $lang ) ); + } + } + } + + /** + * Filters the home url to get the right language. + * + * @since 0.4 + * + * @param string $url The home URL including scheme and path. + * @param string $path Path relative to the home URL. + * @return string + */ + public function home_url( $url, $path ) { + if ( ! ( did_action( 'template_redirect' ) || did_action( 'login_init' ) ) || rtrim( $url, '/' ) != $this->links_model->home ) { + return $url; + } + + // We *want* to filter the home url in these cases + if ( empty( $this->white_list ) ) { + // On Windows get_theme_root() mixes / and \ + // We want only \ for the comparison with debug_backtrace + $theme_root = get_theme_root(); + $theme_root = ( false === strpos( $theme_root, '\\' ) ) ? $theme_root : str_replace( '/', '\\', $theme_root ); + + $white_list = array( + array( 'file' => $theme_root ), + array( 'function' => 'wp_nav_menu' ), + array( 'function' => 'login_footer' ), + array( 'function' => 'get_custom_logo' ), + array( 'function' => 'render_block_core_site_title' ), + array( 'function' => 'render_block_core_home_link' ), + ); + + if ( 3 === $this->options['force_lang'] ) { + $white_list[] = array( 'function' => 'redirect_canonical' ); + } + + /** + * Filters the white list of the Polylang 'home_url' filter. + * + * @since 1.1.2 + * + * @param string[][] $white_list An array of arrays each of them having a 'file' key + * and/or a 'function' key to decide which functions in + * which files using home_url() calls must be filtered. + */ + $this->white_list = apply_filters( 'pll_home_url_white_list', $white_list ); + } + + // We don't want to filter the home url in these cases. + if ( empty( $this->black_list ) ) { + $black_list = array( + array( 'file' => 'searchform.php' ), // Since WP 3.6 searchform.php is passed through get_search_form. + array( 'function' => 'get_search_form' ), + ); + + /** + * Filters the black list of the Polylang 'home_url' filter. + * + * @since 1.1.2 + * + * @param string[][] $black_list An array of arrays each of them having a 'file' key + * and/or a 'function' key to decide which functions in + * which files using home_url() calls must be filtered. + */ + $this->black_list = apply_filters( 'pll_home_url_black_list', $black_list ); + } + + $traces = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions + unset( $traces[0], $traces[1] ); // We don't need the last 2 calls: this function + call_user_func_array (or apply_filters on PHP7+) + + foreach ( $traces as $trace ) { + // Black list first + foreach ( $this->black_list as $v ) { + if ( ( isset( $trace['file'], $v['file'] ) && false !== strpos( $trace['file'], $v['file'] ) ) || ( ! empty( $v['function'] ) && $trace['function'] === $v['function'] ) ) { + return $url; + } + } + + foreach ( $this->white_list as $v ) { + if ( ( ! empty( $v['function'] ) && $trace['function'] === $v['function'] ) || + ( isset( $trace['file'], $v['file'] ) && false !== strpos( $trace['file'], $v['file'] ) && in_array( $trace['function'], array( 'home_url', 'get_home_url', 'bloginfo', 'get_bloginfo' ) ) ) ) { + $ok = true; + } + } + } + + return empty( $ok ) ? $url : ( empty( $path ) ? rtrim( $this->links->get_home_url( $this->curlang ), '/' ) : $this->links->get_home_url( $this->curlang ) ); + } + + /** + * Rewrites the ajax url when using domains or subdomains. + * + * @since 1.5 + * + * @param string $url The admin url with path evaluated by WordPress. + * @param string $path Path relative to the admin URL. + * @return string + */ + public function admin_url( $url, $path ) { + return 'admin-ajax.php' === $path ? $this->links_model->switch_language_in_link( $url, $this->curlang ) : $url; + } + + /** + * Adds the current language to URL query. + * + * @since 3.7.5 + * + * @param string $url The oEmbed endpoint URL. + * @return string The oEmbed endpoint URL with the language. + */ + public function add_current_language_url_query( $url ) { + if ( empty( $this->curlang ) ) { + return $url; + } + + return add_query_arg( 'lang', $this->curlang->slug, $url ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-search.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-search.php new file mode 100644 index 0000000..cad7e22 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-search.php @@ -0,0 +1,183 @@ +links_model = &$polylang->links_model; + $this->curlang = &$polylang->curlang; + + // Adds the language information in the search form + // Low priority in case the search form is created using the same filter as described in http://codex.wordpress.org/Function_Reference/get_search_form + add_filter( 'get_search_form', array( $this, 'get_search_form' ), 99 ); + + // Adds the language information in the search block. + add_filter( 'render_block_core/search', array( $this, 'get_search_form' ) ); + + // Adds the language information in admin bar search form + add_action( 'add_admin_bar_menus', array( $this, 'add_admin_bar_menus' ) ); + + + // Adds javascript at the end of the document + // Was used for WP < 3.6. kept just in case + if ( defined( 'PLL_SEARCH_FORM_JS' ) && PLL_SEARCH_FORM_JS ) { + add_action( 'wp_footer', array( $this, 'wp_print_footer_scripts' ) ); + } + } + + /** + * Adds the language information in the search form. + * + * Does not work if searchform.php ( prior to WP 3.6 ) is used or if the search form is hardcoded in another template file + * + * @since 0.1 + * + * @param string $form The search form HTML. + * @return string Modified search form. + */ + public function get_search_form( $form ) { + if ( empty( $form ) || empty( $this->curlang ) ) { + return $form; + } + + if ( $this->links_model->using_permalinks ) { + // Take care to modify only the url in the
    tag. + preg_match( '##s', $form, $matches ); + $old = reset( $matches ); + if ( empty( $old ) ) { + return $form; + } + // Replace action attribute (a text with no space and no closing tag within double quotes or simple quotes or without quotes). + $new = preg_replace( '#\saction=("[^"\r\n]+"|\'[^\'\r\n]+\'|[^\'"][^>\s]+)#', ' action="' . esc_url( $this->curlang->get_search_url() ) . '"', $old ); + if ( empty( $new ) ) { + return $form; + } + $form = str_replace( $old, $new, $form ); + } else { + $form = str_replace( '', '', $form ); + } + + return $form; + } + + /** + * Adds the language information in the admin bar search form. + * + * @since 1.2 + * + * @return void + */ + public function add_admin_bar_menus() { + // Backward compatibility with WP < 6.6. The priority was 4 before this version, 9999 since then. + $priority = has_action( 'admin_bar_menu', 'wp_admin_bar_search_menu' ); + if ( ! is_int( $priority ) ) { + return; + } + + remove_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', $priority ); + add_action( 'admin_bar_menu', array( $this, 'admin_bar_search_menu' ), $priority ); + } + + /** + * Rewrites the admin bar search form to pass our get_search_form filter. See #21342. + * Code last checked: WP 5.4.1. + * + * @since 0.9 + * + * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance, passed by reference. + * @return void + */ + public function admin_bar_search_menu( $wp_admin_bar ) { + $form = '
    '; + $form .= ''; + $form .= ''; + $form .= ''; + $form .= '
    '; + + $wp_admin_bar->add_node( + array( + 'parent' => 'top-secondary', + 'id' => 'search', + 'title' => $this->get_search_form( $form ), // Pass the get_search_form filter. + 'meta' => array( + 'class' => 'admin-bar-search', + 'tabindex' => -1, + ), + ) + ); + } + + /** + * Allows modifying the search form if it does not pass get_search_form. + * + * @since 0.1 + * + * @return void + */ + public function wp_print_footer_scripts() { + /* + * Don't use directly e[0] just in case there is somewhere else an element named 's' + * Check before if the hidden input has not already been introduced by get_search_form ( FIXME: is there a way to improve this ) ? + * Thanks to AndyDeGroo for improving the code for compatibility with old browsers + * http://wordpress.org/support/topic/development-of-polylang-version-08?replies=6#post-2645559 + */ + $lang = esc_js( $this->curlang->slug ); + $js = "e = document.getElementsByName( 's' ); + for ( i = 0; i < e.length; i++ ) { + if ( e[i].tagName.toUpperCase() == 'INPUT' ) { + s = e[i].parentNode.parentNode.children; + l = 0; + for ( j = 0; j < s.length; j++ ) { + if ( s[j].name == 'lang' ) { + l = 1; + } + } + if ( l == 0 ) { + var ih = document.createElement( 'input' ); + ih.type = 'hidden'; + ih.name = 'lang'; + ih.value = '{$lang}'; + e[i].parentNode.appendChild( ih ); + } + } + }"; + + $type_attr = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"'; + + if ( $type_attr ) { + $js = "/* */"; + } + + echo "\n{$js}\n\n"; // phpcs:ignore WordPress.Security.EscapeOutput + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-widgets.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-widgets.php new file mode 100644 index 0000000..bcdf907 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters-widgets.php @@ -0,0 +1,153 @@ + + */ + public $cache; + + /** + * Current language. + * + * @var PLL_Language|null + */ + public $curlang; + + /** + * Constructor: setups filters and actions. + * + * @since 1.2 + * + * @param object $polylang The Polylang object. + */ + public function __construct( &$polylang ) { + $this->curlang = &$polylang->curlang; + $this->cache = new PLL_Cache(); + + add_filter( 'sidebars_widgets', array( $this, 'sidebars_widgets' ) ); + } + + /** + * Remove widgets from sidebars if they are not visible in the current language + * Needed to allow is_active_sidebar() to return false if all widgets are not for the current language. See #54 + * + * @since 2.1 + * @since 2.4 The result is cached as the function can be very expensive in case there are a lot of widgets + * + * @param array $sidebars_widgets An associative array of sidebars and their widgets + * @return array + */ + public function sidebars_widgets( $sidebars_widgets ) { + global $wp_registered_widgets; + + if ( empty( $wp_registered_widgets ) ) { + return $sidebars_widgets; + } + + $cache_key = $this->cache->get_unique_key( 'sidebars_widgets_', $sidebars_widgets ); + $_sidebars_widgets = $this->cache->get( $cache_key ); + + if ( false !== $_sidebars_widgets ) { + return $_sidebars_widgets; + } + + $sidebars_widgets = $this->filter_widgets_sidebars( $sidebars_widgets, $wp_registered_widgets ); + + return $this->cache->set( $cache_key, $sidebars_widgets ); + } + + /** + * Method that handles the removal of widgets in the sidebars depending on their display language. + * + * @since 3.1 + * + * @param array $widget_data An array containing the widget data + * @param array $sidebars_widgets An associative array of sidebars and their widgets + * @param string $sidebar Sidebar name + * @param int $key Widget number + * @return array An associative array of sidebars and their widgets + */ + public function handle_widget_in_sidebar_callback( $widget_data, $sidebars_widgets, $sidebar, $key ) { + // Remove the widget if not visible in the current language + if ( ! empty( $widget_data['settings'][ $widget_data['number'] ]['pll_lang'] ) && $widget_data['settings'][ $widget_data['number'] ]['pll_lang'] !== $this->curlang->slug ) { + unset( $sidebars_widgets[ $sidebar ][ $key ] ); + } + return $sidebars_widgets; + } + + /** + * Browse the widgets sidebars and sort the ones that should be displayed or not. + * + * @since 3.1 + * + * @param array $sidebars_widgets An associative array of sidebars and their widgets + * @param array $wp_registered_widgets Array of all registered widgets. + * @return array An associative array of sidebars and their widgets + */ + public function filter_widgets_sidebars( $sidebars_widgets, $wp_registered_widgets ) { + foreach ( $sidebars_widgets as $sidebar => $widgets ) { + if ( 'wp_inactive_widgets' === $sidebar || empty( $widgets ) ) { + continue; + } + + foreach ( $widgets as $key => $widget ) { + if ( ! $this->is_widget_object( $wp_registered_widgets, $widget ) ) { + continue; + } + + $widget_data = $this->get_widget_data( $wp_registered_widgets, $widget ); + + $sidebars_widgets = $this->handle_widget_in_sidebar_callback( $widget_data, $sidebars_widgets, $sidebar, $key ); + } + } + return $sidebars_widgets; + } + + /** + * Test if the widget is an object. + * + * @since 3.1 + * + * @param array $wp_registered_widgets Array of all registered widgets. + * @param string $widget String that identifies the widget. + * @return bool True if object, false otherwise. + */ + protected function is_widget_object( $wp_registered_widgets, $widget ) { + // Nothing can be done if the widget is created using pre WP2.8 API :( + // There is no object, so we can't access it to get the widget options + return isset( $wp_registered_widgets[ $widget ]['callback'] ) && + is_array( $wp_registered_widgets[ $widget ]['callback'] ) && + isset( $wp_registered_widgets[ $widget ]['callback'][0] ) && + is_object( $wp_registered_widgets[ $widget ]['callback'][0] ) && + method_exists( $wp_registered_widgets[ $widget ]['callback'][0], 'get_settings' ); + } + + /** + * Get widgets settings and number. + * + * @since 3.1 + * + * @param array $wp_registered_widgets Array of all registered widgets. + * @param string $widget String that identifies the widget. + * @return array An array containing the widget settings and number. + */ + protected function get_widget_data( $wp_registered_widgets, $widget ) { + $widget_settings = $wp_registered_widgets[ $widget ]['callback'][0]->get_settings(); + $number = $wp_registered_widgets[ $widget ]['params'][0]['number']; + + return array( + 'settings' => $widget_settings, + 'number' => $number, + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters.php new file mode 100644 index 0000000..4cc4745 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-filters.php @@ -0,0 +1,216 @@ +options['media_support'] ) { + add_filter( 'widget_media_image_instance', array( $this, 'widget_media_instance' ), 1 ); // Since WP 4.8 + } + + // Strings translation ( must be applied before WordPress applies its default formatting filters ) + foreach ( array( 'widget_text', 'widget_title' ) as $filter ) { + add_filter( $filter, 'pll__', 1 ); + } + + // Translates biography + add_filter( 'get_user_metadata', array( $this, 'get_user_metadata' ), 10, 4 ); + + if ( Polylang::is_ajax_on_front() ) { + add_filter( 'load_textdomain_mofile', array( $this, 'load_textdomain_mofile' ) ); + } + } + + /** + * Returns the locale based on current language + * + * @since 0.1 + * + * @return string + */ + public function get_locale() { + return $this->curlang->locale; + } + + /** + * Filters sticky posts by current language. + * + * @since 0.8 + * + * @param int[] $posts List of sticky posts ids. + * @return int[] Modified list of sticky posts ids. + */ + public function option_sticky_posts( $posts ) { + global $wpdb; + + // Do not filter sticky posts on REST requests as $this->curlang is *not* the 'lang' parameter set in the request. + if ( defined( 'REST_REQUEST' ) || empty( $this->curlang ) || empty( $posts ) ) { + return $posts; + } + + $_posts = wp_cache_get( 'sticky_posts', 'options' ); // This option is usually cached in 'all_options' by WP. + $tt_id = $this->curlang->get_tax_prop( 'language', 'term_taxonomy_id' ); + + if ( ! empty( $_posts ) && is_array( $_posts ) && ! empty( $_posts[ $tt_id ] ) && is_array( $_posts[ $tt_id ] ) ) { + return $_posts[ $tt_id ]; + } + + $languages = array(); + foreach ( $this->model->get_languages_list() as $language ) { + $languages[] = $language->get_tax_prop( 'language', 'term_taxonomy_id' ); + } + + $relations = $wpdb->get_results( + $wpdb->prepare( + sprintf( + "SELECT object_id, term_taxonomy_id FROM {$wpdb->term_relationships} WHERE object_id IN (%s) AND term_taxonomy_id IN (%s)", + implode( ',', array_fill( 0, count( $posts ), '%d' ) ), + implode( ',', array_fill( 0, count( $languages ), '%d' ) ) + ), + array_merge( $posts, $languages ) + ) + ); + + $_posts = array_fill_keys( $languages, array() ); // Init with empty arrays. + + foreach ( $relations as $relation ) { + $_posts[ $relation->term_taxonomy_id ][] = (int) $relation->object_id; + } + + wp_cache_add( 'sticky_posts', $_posts, 'options' ); + return $_posts[ $tt_id ]; + } + + /** + * Modifies the sql request for wp_get_archives to filter by the current language + * + * @since 1.9 + * + * @param string $sql JOIN clause + * @param array $r wp_get_archives arguments + * @return string modified JOIN clause + */ + public function getarchives_join( $sql, $r ) { + return ! empty( $r['post_type'] ) && $this->model->is_translated_post_type( $r['post_type'] ) ? $sql . $this->model->post->join_clause() : $sql; + } + + /** + * Modifies the sql request for wp_get_archives to filter by the current language + * + * @since 1.9 + * + * @param string $sql WHERE clause + * @param array $r wp_get_archives arguments + * @return string modified WHERE clause + */ + public function getarchives_where( $sql, $r ) { + if ( ! $this->curlang instanceof PLL_Language ) { + return $sql; + } + + if ( empty( $r['post_type'] ) || ! $this->model->is_translated_post_type( $r['post_type'] ) ) { + return $sql; + } + + return $sql . $this->model->post->where_clause( $this->curlang ); + } + + /** + * Filters the widgets according to the current language + * Don't display if a language filter is set and this is not the current one + * Needed for {@see https://developer.wordpress.org/reference/functions/the_widget/ the_widget()}. + * + * @since 0.3 + * + * @param array $instance Widget settings + * @return bool|array false if we hide the widget, unmodified $instance otherwise + */ + public function widget_display_callback( $instance ) { + return ! empty( $instance['pll_lang'] ) && $instance['pll_lang'] != $this->curlang->slug ? false : $instance; + } + + /** + * Translates media in media widgets + * + * @since 2.1.5 + * + * @param array $instance Widget instance data + * @return array + */ + public function widget_media_instance( $instance ) { + if ( empty( $instance['pll_lang'] ) && $instance['attachment_id'] && $tr_id = pll_get_post( $instance['attachment_id'] ) ) { + $instance['attachment_id'] = $tr_id; + $attachment = get_post( $tr_id ); + + if ( $instance['caption'] && ! empty( $attachment->post_excerpt ) ) { + $instance['caption'] = $attachment->post_excerpt; + } + + if ( $instance['alt'] && $alt_text = get_post_meta( $tr_id, '_wp_attachment_image_alt', true ) ) { + $instance['alt'] = $alt_text; + } + + if ( $instance['image_title'] && ! empty( $attachment->post_title ) ) { + $instance['image_title'] = $attachment->post_title; + } + } + return $instance; + } + + /** + * Translates the biography. + * + * @since 0.9 + * + * @param null $null Expecting the default null value. + * @param int $id The user id. + * @param string $meta_key The metadata key. + * @param bool $single Whether to return only the first value of the specified $meta_key. + * @return string|null + */ + public function get_user_metadata( $null, $id, $meta_key, $single ) { + return 'description' === $meta_key && ! empty( $this->curlang ) && ! $this->curlang->is_default ? get_user_meta( $id, 'description_' . $this->curlang->slug, $single ) : $null; + } + + /** + * Filters the translation files to load when doing ajax on front + * This is needed because WP the language files associated to the user locale when a user is logged in + * + * @since 2.2.6 + * + * @param string $mofile Translation file name + * @return string + */ + public function load_textdomain_mofile( $mofile ) { + $user_locale = get_user_locale(); + return str_replace( "{$user_locale}.mo", "{$this->curlang->locale}.mo", $mofile ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-links.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-links.php new file mode 100644 index 0000000..a424263 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-links.php @@ -0,0 +1,228 @@ + + */ + public $cache; + + /** + * Constructor + * + * @since 1.2 + * + * @param PLL_Frontend $polylang The Polylang object. + */ + public function __construct( &$polylang ) { + parent::__construct( $polylang ); + + $this->curlang = &$polylang->curlang; + $this->cache = new PLL_Cache(); + } + + /** + * Returns the url of the translation (if it exists) of the current page. + * + * @since 0.1 + * + * @param PLL_Language $language Language object. + * @return string + */ + public function get_translation_url( $language ) { + global $wp_query; + + if ( false !== $translation_url = $this->cache->get( 'translation_url:' . $language->slug ) ) { + return $translation_url; + } + + // Make sure that we have the queried object + // See https://wordpress.org/support/topic/patch-for-fixing-a-notice + $queried_object_id = $wp_query->get_queried_object_id(); + + /** + * Filters the translation url before Polylang attempts to find one. + * Internally used by Polylang for the static front page and posts page. + * + * @since 1.8 + * + * @param string $url Empty string or the url of the translation of the current page. + * @param PLL_Language $language Language of the translation. + * @param int $queried_object_id Queried object ID. + */ + if ( ! $url = apply_filters( 'pll_pre_translation_url', '', $language, $queried_object_id ) ) { + $qv = $wp_query->query_vars; + + // Post and attachment + if ( is_single() && ( $this->options['media_support'] || ! is_attachment() ) && ( $id = $this->model->post->get( $queried_object_id, $language ) ) && $this->model->post->current_user_can_read( $id ) ) { + $url = get_permalink( $id ); + } + + // Page + elseif ( is_page() && ( $id = $this->model->post->get( $queried_object_id, $language ) ) && $this->model->post->current_user_can_read( $id ) ) { + $url = get_page_link( $id ); + } + + elseif ( is_search() ) { + $url = $this->get_archive_url( $language ); + + // Special case for search filtered by translated taxonomies: taxonomy terms are translated in the translation url + if ( ! empty( $wp_query->tax_query->queries ) ) { + foreach ( $wp_query->tax_query->queries as $tax_query ) { + if ( ! empty( $tax_query['taxonomy'] ) && $this->model->is_translated_taxonomy( $tax_query['taxonomy'] ) ) { + + $tax = get_taxonomy( $tax_query['taxonomy'] ); + $terms = get_terms( array( 'taxonomy' => $tax->name, 'fields' => 'id=>slug' ) ); // Filtered by current language + + foreach ( $tax_query['terms'] as $slug ) { + $term_id = array_search( $slug, $terms ); // What is the term_id corresponding to taxonomy term? + if ( $term_id && $term_id = $this->model->term->get_translation( $term_id, $language ) ) { // Get the translated term_id + $term = get_term( $term_id, $tax->name ); + + if ( ! $term instanceof WP_Term ) { + continue; + } + + $url = str_replace( $slug, $term->slug, $url ); + } + } + } + } + } + } + + // Translated taxonomy + // Take care that is_tax() is false for categories and tags + elseif ( ( is_category() || is_tag() || is_tax() ) && ( $term = get_queried_object() ) && $this->model->is_translated_taxonomy( $term->taxonomy ) ) { + $lang = $this->model->term->get_language( $term->term_id ); + + if ( ! $lang || $language->slug == $lang->slug ) { + $url = get_term_link( $term, $term->taxonomy ); // Self link + } + + elseif ( $tr_id = $this->model->term->get_translation( $term->term_id, $language ) ) { + $tr_term = get_term( $tr_id, $term->taxonomy ); + if ( $tr_term instanceof WP_Term ) { + // Check if translated term ( or children ) have posts + $count = $tr_term->count || ( is_taxonomy_hierarchical( $term->taxonomy ) && array_sum( wp_list_pluck( get_terms( array( 'taxonomy' => $term->taxonomy, 'child_of' => $tr_term->term_id, 'lang' => $language->slug ) ), 'count' ) ) ); + + /** + * Filter whether to hide an archive translation url + * + * @since 2.2.4 + * + * @param bool $hide True to hide the translation url. + * defaults to true when the translated archive is empty, false otherwise. + * @param string $lang The language code of the translation + * @param array $args Arguments used to evaluated the number of posts in the archive + */ + if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count, $language->slug, array( 'taxonomy' => $term->taxonomy ) ) ) { + $url = get_term_link( $tr_term, $term->taxonomy ); + } + } + } + } + + // Post type archive + elseif ( is_post_type_archive() ) { + if ( $this->model->is_translated_post_type( $qv['post_type'] ) ) { + $args = array( 'post_type' => $qv['post_type'] ); + $count = $this->model->count_posts( $language, $args ); + + /** This filter is documented in src/frontend/frontend-links.php */ + if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count, $language->slug, $args ) ) { + $url = $this->get_archive_url( $language ); + } + } + } + + // Other archives + elseif ( is_archive() ) { + $keys = array( 'post_type', 'm', 'year', 'monthnum', 'day', 'author', 'author_name' ); + $keys = array_merge( $keys, $this->model->get_filtered_taxonomies_query_vars() ); + $args = array_intersect_key( $qv, array_flip( $keys ) ); + $count = $this->model->count_posts( $language, $args ); + + /** This filter is documented in src/frontend/frontend-links.php */ + if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count, $language->slug, $args ) ) { + $url = $this->get_archive_url( $language ); + } + } + + // Front page when it is the list of posts + elseif ( is_front_page() ) { + $url = $this->get_home_url( $language ); + } + } + + $url = ! empty( $url ) && ! is_wp_error( $url ) ? $url : null; + + /** + * Filter the translation url of the current page before Polylang caches it + * + * @since 1.1.2 + * + * @param null|string $url The translation url, null if none was found + * @param string $language The language code of the translation + */ + $translation_url = (string) apply_filters( 'pll_translation_url', $url, $language->slug ); + + // Don't cache before template_redirect to avoid a conflict with Barrel + WP Bakery Page Builder + if ( did_action( 'template_redirect' ) ) { + $this->cache->set( 'translation_url:' . $language->slug, $translation_url ); + } + + return $translation_url; + } + + /** + * Get the translation of the current archive url + * used also for search + * + * @since 1.2 + * + * @param PLL_Language $language An object representing a language. + * @return string + */ + public function get_archive_url( $language ) { + $url = pll_get_requested_url(); + $url = $this->links_model->switch_language_in_link( $url, $language ); + $url = $this->links_model->remove_paged_from_link( $url ); + + /** + * Filter the archive url + * + * @since 1.6 + * + * @param string $url Url of the archive + * @param object $language Language of the archive + */ + return apply_filters( 'pll_get_archive_url', $url, $language ); + } + + /** + * Returns the home url in the right language. + * + * @since 0.1 + * + * @param PLL_Language|string $language Optional, defaults to current language. + * @param bool $is_search Optional, whether we need the home url for a search form, defaults to false. + */ + public function get_home_url( $language = '', $is_search = false ) { + if ( empty( $language ) ) { + $language = $this->curlang; + } + + return parent::get_home_url( $language, $is_search ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-nav-menu.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-nav-menu.php new file mode 100644 index 0000000..cf575b7 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-nav-menu.php @@ -0,0 +1,341 @@ +curlang = &$polylang->curlang; + + // Split the language switcher menu item in several language menu items + add_filter( 'wp_get_nav_menu_items', array( $this, 'wp_get_nav_menu_items' ), 20 ); // after the customizer menus + add_filter( 'wp_nav_menu_objects', array( $this, 'wp_nav_menu_objects' ) ); + add_filter( 'nav_menu_link_attributes', array( $this, 'nav_menu_link_attributes' ), 10, 2 ); + + // Filters menus by language + add_filter( 'theme_mod_nav_menu_locations', array( $this, 'nav_menu_locations' ), 20 ); + add_filter( 'wp_nav_menu_args', array( $this, 'wp_nav_menu_args' ) ); + + // The customizer + if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + add_filter( 'wp_nav_menu_args', array( $this, 'filter_args_before_customizer' ) ); + add_filter( 'wp_nav_menu_args', array( $this, 'filter_args_after_customizer' ), 2000 ); + } + } + + /** + * Sorts menu items by menu order. + * + * @since 1.7.9 + * + * @param stdClass $a The first object to compare. + * @param stdClass $b The second object to compare. + * @return int -1 or 1 if $a is considered to be respectively less than or greater than $b. + */ + protected function usort_menu_items( $a, $b ) { + return ( $a->menu_order < $b->menu_order ) ? -1 : 1; + } + + /** + * Format a language switcher menu item title based on options + * + * @since 2.2.6 + * + * @param string $flag Formatted flag + * @param string $name Language name + * @param array $options Language switcher options + * @return string Formatted menu item title + */ + protected function get_item_title( $flag, $name, $options ) { + if ( $options['show_flags'] ) { + if ( $options['show_names'] ) { + $title = sprintf( '%1$s%3$s', $flag, is_rtl() ? 'right' : 'left', esc_html( $name ) ); + } else { + $title = $flag; + } + } else { + $title = esc_html( $name ); + } + return $title; + } + + /** + * Splits the one language switcher menu item of backend in several menu items on frontend. + * Takes care to menu_order as it is used later in wp_nav_menu(). + * + * @since 1.1.1 + * + * @param stdClass[] $items Menu items. + * @return stdClass[] Modified menu items. + */ + public function wp_get_nav_menu_items( $items ) { + if ( empty( $this->curlang ) ) { + return $items; + } + + if ( doing_action( 'customize_register' ) ) { // needed since WP 4.3, doing_action available since WP 3.9 + return $items; + } + + // The customizer menus does not sort the items and we need them to be sorted before splitting the language switcher + usort( $items, array( $this, 'usort_menu_items' ) ); + + $new_items = array(); + + $offset = 0; + + foreach ( $items as $item ) { + if ( $options = get_post_meta( $item->ID, '_pll_menu_item', true ) ) { + /** This filter is documented in src/switcher.php */ + $options = apply_filters( 'pll_the_languages_args', $options ); // Honor the filter here for 'show_flags', 'show_names' and 'dropdown'. + + $switcher = new PLL_Switcher(); + $args = array_merge( array( 'raw' => 1 ), $options ); + + /** @var array */ + $the_languages = $switcher->the_languages( PLL()->links, $args ); + + // parent item for dropdown + if ( ! empty( $options['dropdown'] ) ) { + $name = isset( $options['display_names_as'] ) && 'slug' === $options['display_names_as'] ? $this->curlang->slug : $this->curlang->name; + $item->title = $this->get_item_title( $this->curlang->get_display_flag( empty( $options['show_names'] ) ? 'alt' : 'no-alt' ), $name, $options ); + $item->attr_title = ''; + $item->classes = array( 'pll-parent-menu-item' ); + $item->menu_order += $offset; + $new_items[] = $item; + ++$offset; + } + + $i = 0; // for incrementation of menu order only in case of dropdown + foreach ( $the_languages as $lang ) { + ++$i; + $lang_item = clone $item; + $lang_item->ID = $lang_item->ID . '-' . $lang['slug']; // A unique ID + $lang_item->title = $this->get_item_title( $lang['flag'], $lang['name'], $options ); + $lang_item->attr_title = ''; + $lang_item->url = $lang['url']; + $lang_item->lang = $lang['locale']; // Save this for use in nav_menu_link_attributes + $lang_item->classes = $lang['classes']; + if ( ! empty( $options['dropdown'] ) ) { + $lang_item->menu_order = $item->menu_order + $i; + $lang_item->menu_item_parent = $item->db_id; + $lang_item->db_id = 0; // to avoid recursion + } else { + $lang_item->menu_order += $offset; + } + $new_items[] = $lang_item; + ++$offset; + } + --$offset; + } else { + $item->menu_order += $offset; + $new_items[] = $item; + } + } + return $new_items; + } + + /** + * Returns the ancestors of a menu item. + * + * @since 1.1.1 + * + * @param stdClass $item Menu item. + * @return int[] Ancestors ids. + */ + public function get_ancestors( $item ) { + $ids = array(); + $ancestor_id = (int) $item->db_id; + while ( ( $ancestor_id = get_post_meta( $ancestor_id, '_menu_item_menu_item_parent', true ) ) && ! in_array( $ancestor_id, $ids ) ) { + $ids[] = $ancestor_id; + } + return $ids; + } + + /** + * Removes current-menu and current-menu-ancestor classes to lang switcher when not on the home page. + * + * @since 1.1.1 + * + * @param stdClass[] $items An array of menu items. + * @return stdClass[] + */ + public function wp_nav_menu_objects( $items ) { + $k_ids = array(); + $r_ids = array(); + + foreach ( $items as $item ) { + if ( ! empty( $item->classes ) && is_array( $item->classes ) ) { + if ( in_array( 'current-lang', $item->classes ) ) { + $item->current = false; + $item->classes = array_diff( $item->classes, array( 'current-menu-item' ) ); + $r_ids = array_merge( $r_ids, $this->get_ancestors( $item ) ); // Remove the classes for these ancestors. + } elseif ( in_array( 'current-menu-item', $item->classes ) ) { + $k_ids = array_merge( $k_ids, $this->get_ancestors( $item ) ); // Keep the classes for these ancestors. + } + } + } + + $r_ids = array_diff( $r_ids, $k_ids ); + + foreach ( $items as $item ) { + if ( ! empty( $item->db_id ) && in_array( $item->db_id, $r_ids ) ) { + $item->classes = array_diff( $item->classes, array( 'current-menu-ancestor', 'current-menu-parent', 'current_page_parent', 'current_page_ancestor' ) ); + } + } + + return $items; + } + + /** + * Adds hreflang attribute for the language switcher menu items. + * available since WP 3.6. + * + * @since 1.1 + * + * @param string[] $atts HTML attributes applied to the menu item's `` element. + * @param stdClass $item Menu item. + * @return string[] Modified attributes. + */ + public function nav_menu_link_attributes( $atts, $item ) { + if ( isset( $item->lang ) ) { + $atts['lang'] = esc_attr( $item->lang ); + $atts['hreflang'] = $atts['lang']; + } + return $atts; + } + + /** + * Fills the theme nav menus locations with the right menu in the right language + * Needs to wait for the language to be defined + * + * @since 1.2 + * + * @param array|bool $menus list of nav menus locations, false if menu locations have not been filled yet + * @return array|bool modified list of nav menus locations + */ + public function nav_menu_locations( $menus ) { + if ( is_array( $menus ) && ! empty( $this->curlang ) ) { + // First get multilingual menu locations from DB + $theme = get_option( 'stylesheet' ); + + foreach ( array_keys( $menus ) as $loc ) { + $menus[ $loc ] = empty( $this->options['nav_menus'][ $theme ][ $loc ][ $this->curlang->slug ] ) ? 0 : $this->options['nav_menus'][ $theme ][ $loc ][ $this->curlang->slug ]; + } + + // Support for theme customizer + if ( is_customize_preview() ) { + global $wp_customize; + foreach ( $wp_customize->unsanitized_post_values() as $key => $value ) { + if ( false !== strpos( $key, 'nav_menu_locations[' ) ) { + $loc = substr( trim( $key, ']' ), 19 ); + $infos = $this->explode_location( $loc ); + if ( $infos['lang'] === $this->curlang->slug ) { + $menus[ $infos['location'] ] = (int) $value; + } elseif ( $this->curlang->is_default ) { + $menus[ $loc ] = (int) $value; + } + } + } + } + } + return $menus; + } + + /** + * Attempts to translate the nav menu when it is hardcoded or when no location is defined in wp_nav_menu(). + * + * @since 1.7.10 + * + * @param array $args Array of `wp_nav_menu()` arguments. + * @return array + */ + public function wp_nav_menu_args( $args ) { + $theme = get_option( 'stylesheet' ); + + if ( empty( $this->curlang ) || empty( $this->options['nav_menus'][ $theme ] ) ) { + return $args; + } + + // Get the nav menu based on the requested menu + $menu = wp_get_nav_menu_object( $args['menu'] ); + + // Attempt to find a translation of this menu + // This obviously does not work if the nav menu has no associated theme location + if ( $menu ) { + foreach ( $this->options['nav_menus'][ $theme ] as $menus ) { + if ( in_array( $menu->term_id, $menus ) && ! empty( $menus[ $this->curlang->slug ] ) ) { + $args['menu'] = $menus[ $this->curlang->slug ]; + return $args; + } + } + } + + // Get the first menu that has items and and is in the current language if we still can't find a menu + if ( ! $menu && ! $args['theme_location'] ) { + $menus = wp_get_nav_menus(); + foreach ( $menus as $menu_maybe ) { + if ( wp_get_nav_menu_items( $menu_maybe->term_id, array( 'update_post_term_cache' => false ) ) ) { + foreach ( $this->options['nav_menus'][ $theme ] as $menus ) { + if ( in_array( $menu_maybe->term_id, $menus ) && ! empty( $menus[ $this->curlang->slug ] ) ) { + $args['menu'] = $menus[ $this->curlang->slug ]; + return $args; + } + } + } + } + } + + return $args; + } + + /** + * Filters the nav menu location before the customizer so that it matches the temporary location in the customizer + * + * @since 1.8 + * + * @param array $args wp_nav_menu $args + * @return array modified $args + */ + public function filter_args_before_customizer( $args ) { + if ( ! empty( $this->curlang ) ) { + $args['theme_location'] = $this->combine_location( $args['theme_location'], $this->curlang ); + } + return $args; + } + + /** + * Filters the nav menu location after the customizer to get back the true nav menu location for the theme + * + * @since 1.8 + * + * @param array $args wp_nav_menu $args + * @return array modified $args + */ + public function filter_args_after_customizer( $args ) { + $infos = $this->explode_location( $args['theme_location'] ); + $args['theme_location'] = $infos['location']; + return $args; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-static-pages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-static-pages.php new file mode 100644 index 0000000..1bf1440 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend-static-pages.php @@ -0,0 +1,320 @@ +links_model = &$polylang->links_model; + $this->links = &$polylang->links; + $this->options = $polylang->options; + + add_action( 'pll_home_requested', array( $this, 'pll_home_requested' ) ); + + // Manages the redirection of the homepage. + add_filter( 'redirect_canonical', array( $this, 'redirect_canonical' ) ); + + add_filter( 'pll_pre_translation_url', array( $this, 'pll_pre_translation_url' ), 10, 3 ); + add_filter( 'pll_check_canonical_url', array( $this, 'pll_check_canonical_url' ) ); + + add_filter( 'pll_set_language_from_query', array( $this, 'page_on_front_query' ), 10, 2 ); + add_filter( 'pll_set_language_from_query', array( $this, 'page_for_posts_query' ), 10, 2 ); + + // Specific cases for the customizer. + add_action( 'customize_register', array( $this, 'filter_customizer' ) ); + } + + /** + * Translates the page_id query var when the site root page is requested + * + * @since 1.8 + * + * @return void + */ + public function pll_home_requested() { + set_query_var( 'page_id', $this->curlang->page_on_front ); + } + + /** + * Manages the canonical redirect of the homepage when using a page on front. + * + * @since 0.1 + * + * @param string $redirect_url The redirect url. + * @return string|false The modified url, false if the redirect is canceled. + */ + public function redirect_canonical( $redirect_url ) { + if ( is_page() && ! is_feed() && get_queried_object_id() == $this->curlang->page_on_front ) { + $url = is_paged() ? $this->links_model->add_paged_to_link( $this->links->get_home_url(), get_query_var( 'page' ) ) : $this->links->get_home_url(); + + // Don't forget additional query vars + $query = wp_parse_url( $redirect_url, PHP_URL_QUERY ); + if ( ! empty( $query ) ) { + parse_str( $query, $query_vars ); + $query_vars = rawurlencode_deep( $query_vars ); // WP encodes query vars values + $url = add_query_arg( $query_vars, $url ); + } + + return $url; + } + + return $redirect_url; + } + + /** + * Translates the url of the page on front and page for posts. + * + * @since 1.8 + * + * @param string $url Empty string or the url of the translation of the current page. + * @param PLL_Language $language Language of the translation. + * @param int $queried_object_id Queried object ID. + * @return string The translation url. + */ + public function pll_pre_translation_url( $url, $language, $queried_object_id ) { + if ( empty( $queried_object_id ) ) { + return $url; + } + + // Page for posts. + if ( $GLOBALS['wp_query']->is_posts_page ) { + $id = $this->model->post->get( $queried_object_id, $language ); + + if ( ! empty( $id ) ) { + return (string) get_permalink( $id ); + } + } + + // Page on front. + if ( is_front_page() && ! empty( $language->page_on_front ) ) { + $id = $this->model->post->get( $queried_object_id, $language ); + + if ( $language->page_on_front === $id ) { + return $language->get_home_url(); + } + } + + return $url; + } + + /** + * Prevents the canonical redirect if we are on a static front page. + * + * @since 1.8 + * + * @param string $redirect_url The redirect url. + * @return string|false + */ + public function pll_check_canonical_url( $redirect_url ) { + return $this->options['redirect_lang'] && ! $this->options['force_lang'] && ! empty( $this->curlang->page_on_front ) && is_page( $this->curlang->page_on_front ) ? false : $redirect_url; + } + + /** + * Is the query for a the static front page (redirected from the language page)? + * + * @since 2.3 + * + * @param WP_Query $query The WP_Query object. + * @return bool + */ + protected function is_front_page( $query ) { + $query = array_diff( array_keys( $query->query ), array( 'preview', 'page', 'paged', 'cpage', 'orderby' ) ); + return 1 === count( $query ) && in_array( 'lang', $query ); + } + + /** + * Setups query vars when requesting a static front page + * + * @since 1.8 + * + * @param PLL_Language|false $lang The current language, false if it is not set yet. + * @param WP_Query $query The main WP query. + * @return PLL_Language|false + */ + public function page_on_front_query( $lang, $query ) { + if ( ! empty( $lang ) || ! $this->page_on_front ) { + return $lang; + } + + // Redirect the language page to the homepage when using a static front page + if ( ( $this->options['redirect_lang'] || $this->options['hide_default'] ) && $this->is_front_page( $query ) && $lang = $this->model->get_language( get_query_var( 'lang' ) ) ) { + $query->is_archive = false; + $query->is_tax = false; + if ( 'page' === get_option( 'show_on_front' ) && ! empty( $lang->page_on_front ) ) { + $query->set( 'page_id', $lang->page_on_front ); + $query->is_singular = true; + $query->is_page = true; + unset( $query->query_vars['lang'], $query->queried_object ); // Reset queried object + } else { + // Handle case where the static front page hasn't be translated to avoid a possible infinite redirect loop. + $query->is_home = true; + } + } + + // Fix paged static front page in plain permalinks when Settings > Reading doesn't match the default language + elseif ( ! $this->links_model->using_permalinks && count( $query->query ) === 1 && ! empty( $query->query['page'] ) ) { + $lang = $this->model->get_default_language(); + if ( empty( $lang ) ) { + return $lang; + } + $query->set( 'page_id', $lang->page_on_front ); + $query->is_singular = true; + $query->is_page = true; + $query->is_archive = false; + $query->is_tax = false; + unset( $query->query_vars['lang'], $query->queried_object ); // Reset queried object + } + + // Set the language when requesting a static front page + else { + $page_id = $this->get_page_id( $query ); + $languages = $this->model->get_languages_list(); + $pages = wp_list_pluck( $languages, 'page_on_front' ); + + if ( ! empty( $page_id ) && false !== $n = array_search( $page_id, $pages ) ) { + $lang = $languages[ $n ]; + } + } + + // Fix for page_on_front + if ( ( $this->options['force_lang'] < 2 || ! $this->options['redirect_lang'] ) && $this->links_model->using_permalinks && ! empty( $lang ) && isset( $query->query['paged'] ) ) { + $query->set( 'page', $query->query['paged'] ); + unset( $query->query['paged'] ); + } elseif ( ! $this->links_model->using_permalinks && ! empty( $query->query['page'] ) ) { + $query->is_paged = true; + } + + return $lang; + } + + /** + * Setups query vars when requesting a posts page + * + * @since 1.8 + * + * @param PLL_Language|false $lang The current language, false if it is not set yet. + * @param WP_Query $query The main WP query. + * @return PLL_Language|false + */ + public function page_for_posts_query( $lang, $query ) { + if ( ! empty( $lang ) || ! $this->page_for_posts ) { + return $lang; + } + + $page_id = $this->get_page_id( $query ); + + if ( empty( $page_id ) ) { + return $lang; + } + + $pages = $this->model->get_languages_list( array( 'fields' => 'page_for_posts' ) ); + $pages = array_filter( $pages ); + + if ( in_array( $page_id, $pages ) ) { + _prime_post_caches( $pages ); // Fill the cache with all pages for posts to avoid one query per page later. + + $lang = $this->model->post->get_language( $page_id ); + $query->is_singular = false; + $query->is_page = false; + $query->is_home = true; + $query->is_posts_page = true; + } + + return $lang; + } + + /** + * Get the queried page_id (if it exists ). + * + * If permalinks are used, WordPress does set and use `$query->queried_object_id` and sets `$query->query_vars['page_id']` to 0, + * and does set and use `$query->query_vars['page_id']` if permalinks are not used :(. + * + * @since 1.5 + * + * @param WP_Query $query Instance of WP_Query. + * @return int The page_id. + */ + protected function get_page_id( $query ) { + if ( ! empty( $query->query_vars['pagename'] ) && isset( $query->queried_object_id ) ) { + return $query->queried_object_id; + } + + return $query->query_vars['page_id'] ?? 0; // No page queried. + } + + /** + * Adds support for the theme customizer. + * + * @since 3.4.2 + * + * @return void + */ + public function filter_customizer() { + add_filter( 'pre_option_page_on_front', array( $this, 'customize_page' ), 20 ); // After the customizer. + add_filter( 'pre_option_page_for_post', array( $this, 'customize_page' ), 20 ); + + add_filter( 'pll_pre_translation_url', array( $this, 'customize_translation_url' ), 20, 2 ); // After the generic hook in this class. + } + + /** + * Translates the page ID when customized. + * + * @since 3.4.2 + * + * @param int|false $pre A page ID if the setting is customized, false otherwise. + * @return int|false + */ + public function customize_page( $pre ) { + return is_numeric( $pre ) ? pll_get_post( (int) $pre ) : $pre; + } + + /** + * Fixes the translation URL if the option 'show_on_front' is customized. + * + * @since 3.4.2 + * + * @param string $url An empty string or the URL of the translation of the current page. + * @param PLL_Language $language The language of the translation. + * @return string + */ + public function customize_translation_url( $url, $language ) { + if ( 'posts' === get_option( 'show_on_front' ) && is_front_page() ) { + // When the page on front displays posts, the home URL is the same as the search URL. + return $language->get_search_url(); + } + return $url; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend.php new file mode 100644 index 0000000..59f17eb --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/frontend/frontend.php @@ -0,0 +1,319 @@ +static_pages = new PLL_Frontend_Static_Pages( $this ); + } + + $this->model->set_languages_ready(); + } + + /** + * Setups the language chooser based on options + * + * @since 1.2 + */ + public function init() { + parent::init(); + + $this->links = new PLL_Frontend_Links( $this ); + + $this->default_term = new PLL_Default_Term( $this ); + $this->default_term->add_hooks(); + + // Setup the language chooser + $c = array( 'Content', 'Url', 'Url', 'Domain' ); + $class = 'PLL_Choose_Lang_' . $c[ $this->options['force_lang'] ]; + $this->choose_lang = new $class( $this ); + $this->choose_lang->init(); + + // Need to load nav menu class early to correctly define the locations in the customizer when the language is set from the content + $this->nav_menu = new PLL_Frontend_Nav_Menu( $this ); + } + + /** + * Setups filters and nav menus once the language has been defined + * + * @since 1.2 + * + * @return void + */ + public function pll_language_defined() { + // Filters + $this->filters_links = new PLL_Frontend_Filters_Links( $this ); + $this->filters = new PLL_Frontend_Filters( $this ); + $this->filters_search = new PLL_Frontend_Filters_Search( $this ); + $this->filters_widgets = new PLL_Frontend_Filters_Widgets( $this ); + + /* + * Redirects to canonical url before WordPress redirect_canonical + * but after Nextgen Gallery which hacks $_SERVER['REQUEST_URI'] !!! + * and restores it in 'template_redirect' with priority 1. + */ + $this->canonical = new PLL_Canonical( $this ); + add_action( 'template_redirect', array( $this->canonical, 'check_canonical_url' ), 4 ); + + // Auto translate for Ajax + if ( ( ! defined( 'PLL_AUTO_TRANSLATE' ) || PLL_AUTO_TRANSLATE ) && wp_doing_ajax() ) { + $this->auto_translate(); + } + } + + /** + * When querying multiple taxonomies, makes sure that the language is not the queried object. + * + * @since 1.8 + * + * @param WP_Query $query WP_Query object. + * @return void + */ + public function parse_tax_query( $query ) { + $pll_query = new PLL_Query( $query, $this->model ); + $queried_taxonomies = $pll_query->get_queried_taxonomies(); + + if ( ! empty( $queried_taxonomies ) && 'language' == reset( $queried_taxonomies ) ) { + $query->tax_query->queried_terms['language'] = array_shift( $query->tax_query->queried_terms ); + } + } + + /** + * Prevents unnecessary queries to the database by transforming + * a language query by `slug` to a language query by `term_taxonomy_id`. + * + * These extra queries occur when the language slug is displayed in the current's page URL, because WP wants a list + * of `term_taxonomy_id`. + * + * @since 3.8 + * + * @param WP_Query $query WP_Query object. + * @return void + */ + public function transform_query( $query ): void { + ( new PLL_Query( $query, $this->model ) )->transform_query(); + } + + /** + * Modifies some query vars to "hide" that the language is a taxonomy and avoid conflicts. + * + * @since 1.2 + * + * @param WP_Query $query WP_Query object. + * @return void + */ + public function parse_query( $query ) { + $qv = $query->query_vars; + $pll_query = new PLL_Query( $query, $this->model ); + $taxonomies = $pll_query->get_queried_taxonomies(); + + // Allow filtering recent posts and secondary queries by the current language + if ( ! empty( $this->curlang ) ) { + $pll_query->filter_query( $this->curlang ); + } + + // Modifies query vars when the language is queried + if ( ! empty( $qv['lang'] ) || ( ! empty( $taxonomies ) && array( 'language' ) == array_values( $taxonomies ) ) ) { + // Do we query a custom taxonomy? + $taxonomies = array_diff( $taxonomies, array( 'language', 'category', 'post_tag' ) ); + + // Remove pages query when the language is set unless we do a search + // Take care not to break the single page, attachment and taxonomies queries! + if ( empty( $qv['post_type'] ) && ! $query->is_search && ! $query->is_singular && empty( $taxonomies ) && ! $query->is_category && ! $query->is_tag ) { + $query->set( 'post_type', 'post' ); + } + + // Unset the is_archive flag for language pages to prevent loading the archive template + // Keep archive flag for comment feed otherwise the language filter does not work + if ( empty( $taxonomies ) && ! $query->is_comment_feed && ! $query->is_post_type_archive && ! $query->is_date && ! $query->is_author && ! $query->is_category && ! $query->is_tag ) { + $query->is_archive = false; + } + + // Unset the is_tax flag except if another custom tax is queried + if ( empty( $taxonomies ) && ( $query->is_category || $query->is_tag || $query->is_author || $query->is_post_type_archive || $query->is_date || $query->is_search || $query->is_feed ) ) { + $query->is_tax = false; + unset( $query->queried_object ); // FIXME useless? + } + } + } + + /** + * Auto translate posts and terms ids + * + * @since 1.2 + * + * @return void + */ + public function auto_translate() { + $this->auto_translate = new PLL_Frontend_Auto_Translate( $this ); + } + + /** + * Resets some variables when the blog is switched. + * Overrides the parent method. + * + * @since 1.5.1 + * + * @param int $new_blog_id New blog ID. + * @param int $prev_blog_id Previous blog ID. + * @return void + */ + public function switch_blog( $new_blog_id, $prev_blog_id ) { + if ( (int) $new_blog_id === (int) $prev_blog_id ) { + // Do nothing if same blog. + return; + } + + parent::switch_blog( $new_blog_id, $prev_blog_id ); + + // Need to check that some languages are defined when user is logged in, has several blogs, some without any languages. + if ( ! $this->is_active_on_current_site() || ! $this->model->has_languages() || ! did_action( 'pll_language_defined' ) ) { + return; + } + + static $restore_curlang; + + if ( empty( $restore_curlang ) ) { + $restore_curlang = $this->curlang->slug; // To always remember the current language through blogs. + } + + $lang = $this->model->get_language( $restore_curlang ); + $this->curlang = $lang ?: $this->model->get_default_language(); + if ( empty( $this->curlang ) ) { + return; + } + + if ( isset( $this->static_pages ) ) { + $this->static_pages->init(); + } + + // Send the slug instead of the locale here to avoid conflicts with same locales. + $this->load_strings_translations( $this->curlang->slug ); + } + + /** + * Remove the customize admin bar on front-end when using a block theme. + * + * WordPress removes the Customizer menu if a block theme is activated and no other plugins interact with it. + * As Polylang interacts with the Customizer, we have to delete this menu ourselves in the case of a block theme, + * unless another plugin than Polylang interacts with the Customizer. + * + * @since 3.2 + * + * @return void + */ + public function remove_customize_admin_bar() { + if ( ! $this->should_customize_menu_be_removed() ) { + return; + } + + global $wp_admin_bar; + + remove_action( 'wp_before_admin_bar_render', 'wp_customize_support_script' ); // To avoid the script launch. + $wp_admin_bar->remove_menu( 'customize' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/functions.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/functions.php new file mode 100644 index 0000000..d6dfc1c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/functions.php @@ -0,0 +1,174 @@ +has_errors() ) { + return; + } + + foreach ( $error->get_error_codes() as $error_code ) { + // Extract the "error" type. + $data = $error->get_error_data( $error_code ); + $type = empty( $data ) || ! is_string( $data ) ? 'error' : $data; + + $message = wp_kses( + implode( '
    ', $error->get_error_messages( $error_code ) ), + array( + 'a' => array( 'href' => true ), + 'br' => array(), + 'code' => array(), + 'em' => array(), + ) + ); + + add_settings_error( 'polylang', $error_code, $message, $type ); + } +} + +/** + * Tells if the given REST request is in the edit context. + * + * @since 3.5 + * + * @param WP_REST_Request $request A REST request. + * @return bool + * + * @phpstan-param WP_REST_Request $request + */ +function pll_is_edit_rest_request( WP_REST_Request $request ): bool { + if ( in_array( $request->get_method(), array( 'PATCH', 'POST', 'PUT' ), true ) ) { + return true; + } + + return 'GET' === $request->get_method() && 'edit' === $request->get_param( 'context' ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-activable.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-activable.php new file mode 100644 index 0000000..55019df --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-activable.php @@ -0,0 +1,73 @@ + 'ids', 'number' => 0 ) ) as $blog_id ) { + switch_to_blog( $blog_id ); + static::process(); + } + restore_current_blog(); + } else { + // Single blog. + static::process(); + } + } + + /** + * Returns the plugin's basename. + * + * @since 3.8 + * + * @return string + */ + public static function get_plugin_basename(): string { + return pll_get_constant( 'POLYLANG_BASENAME', '' ); + } + + /** + * Returns the plugin's version. + * + * @since 3.8 + * + * @return string + */ + public static function get_plugin_version(): string { + return pll_get_constant( 'POLYLANG_VERSION', '' ); + } + + /** + * The process to run on plugin (de)activation. + * + * @since 0.5 + * @since 3.8 Moved from the class `PLL_Install_Base`. + * Renamed from `_activate()`/`_deactivate()`. + * Made it `static` and `abstract`. + * + * @return void + */ + abstract protected static function process(): void; +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-activate.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-activate.php new file mode 100644 index 0000000..b9473eb --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-activate.php @@ -0,0 +1,43 @@ +id ); + static::process(); + restore_current_blog(); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-deactivate.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-deactivate.php new file mode 100644 index 0000000..584e3f4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/abstract-deactivate.php @@ -0,0 +1,36 @@ +can_activate(); + } + } else { + $options['version'] = static::get_plugin_version(); + } + + $options->save(); // Force save here to prevent any conflicts with another instance of `Options`. + + add_option( + 'pll_language_from_content_available', + 0 === $options['force_lang'] ? 'yes' : 'no' + ); + + // Avoid 1 query on every pages if no wpml strings is registered. + add_option( 'polylang_wpml_strings', array() ); + + add_option( 'pll_language_taxonomies', array() ); + + /* + * Don't use flush_rewrite_rules at network activation. See #32471. + * Thanks to RavanH for the trick. See https://polylang.wordpress.com/2015/06/10/polylang-1-7-6-and-multisite/. + * Rewrite rules are created at next page load. + */ + delete_option( 'rewrite_rules' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/deactivate.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/deactivate.php new file mode 100644 index 0000000..71746d7 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/deactivate.php @@ -0,0 +1,27 @@ +api_url = trailingslashit( $_api_url ); + $this->api_data = $_api_data; + $this->plugin_file = $_plugin_file; + $this->name = plugin_basename( $_plugin_file ); + $this->slug = basename( dirname( $_plugin_file ) ); + $this->version = $_api_data['version']; + $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false; + $this->beta = ! empty( $this->api_data['beta'] ) ? true : false; + $this->failed_request_cache_key = 'edd_sl_failed_http_' . md5( $this->api_url ); + + $edd_plugin_data[ $this->slug ] = $this->api_data; + + /** + * Fires after the $edd_plugin_data is setup. + * + * @since x.x.x + * + * @param array $edd_plugin_data Array of EDD SL plugin data. + */ + do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data ); + + // Set up hooks. + $this->init(); + } + + /** + * Set up WordPress filters to hook into WP's update process. + * + * @uses add_filter() + * + * @return void + */ + public function init() { + + add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) ); + add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 ); + add_action( 'after_plugin_row', array( $this, 'show_update_notification' ), 10, 2 ); + add_action( 'admin_init', array( $this, 'show_changelog' ) ); + } + + /** + * Check for Updates at the defined API endpoint and modify the update array. + * + * This function dives into the update API just when WordPress creates its update array, + * then adds a custom API call and injects the custom plugin data retrieved from the API. + * It is reassembled from parts of the native WordPress plugin update code. + * See wp-includes/update.php line 121 for the original wp_update_plugins() function. + * + * @uses api_request() + * + * @param array $_transient_data Update array build by WordPress. + * @return array Modified update array with custom plugin data. + */ + public function check_update( $_transient_data ) { + + if ( ! is_object( $_transient_data ) ) { + $_transient_data = new stdClass(); + } + + if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) { + return $_transient_data; + } + + $current = $this->get_update_transient_data(); + if ( false !== $current && is_object( $current ) && isset( $current->new_version ) ) { + if ( version_compare( $this->version, $current->new_version, '<' ) ) { + $_transient_data->response[ $this->name ] = $current; + } else { + // Populating the no_update information is required to support auto-updates in WordPress 5.5. + $_transient_data->no_update[ $this->name ] = $current; + } + } + $_transient_data->last_checked = time(); + $_transient_data->checked[ $this->name ] = $this->version; + + return $_transient_data; + } + + /** + * Get repo API data from store. + * Save to cache. + * + * @return \stdClass + */ + public function get_repo_api_data() { + $version_info = $this->get_cached_version_info(); + + if ( false === $version_info ) { + $version_info = $this->api_request( + 'plugin_latest_version', + array( + 'slug' => $this->slug, + 'beta' => $this->beta, + ) + ); + if ( ! $version_info ) { + return false; + } + + // This is required for your plugin to support auto-updates in WordPress 5.5. + $version_info->plugin = $this->name; + $version_info->id = $this->name; + $version_info->tested = $this->get_tested_version( $version_info ); + if ( ! isset( $version_info->requires ) ) { + $version_info->requires = ''; + } + if ( ! isset( $version_info->requires_php ) ) { + $version_info->requires_php = ''; + } + + $this->set_version_info_cache( $version_info ); + } + + // Added by Polylang. + $defaults = array( + 'url' => '', + 'package' => '', + 'new_version' => '', + 'tested' => '', + 'requires' => '', + 'requires_php' => '', + 'icons' => new stdClass(), + 'banners' => new stdClass(), + ); + + $version_info = (object) array_merge( $defaults, (array) $version_info ); + // End of added by Polylang. + + return $version_info; + } + + /** + * Gets a limited set of data from the API response. + * This is used for the update_plugins transient. + * + * @since 3.8.12 + * @return \stdClass|false + */ + private function get_update_transient_data() { + $version_info = $this->get_repo_api_data(); + + if ( ! $version_info ) { + return false; + } + + $limited_data = new \stdClass(); + $limited_data->slug = $this->slug; + $limited_data->plugin = $this->name; + $limited_data->url = $version_info->url; + $limited_data->package = $version_info->package; + $limited_data->icons = $this->convert_object_to_array( $version_info->icons ); + $limited_data->banners = $this->convert_object_to_array( $version_info->banners ); + $limited_data->new_version = $version_info->new_version; + $limited_data->tested = $version_info->tested; + $limited_data->requires = $version_info->requires; + $limited_data->requires_php = $version_info->requires_php; + + return $limited_data; + } + + /** + * Gets the plugin's tested version. + * + * @since 1.9.2 + * @param object $version_info + * @return null|string + */ + private function get_tested_version( $version_info ) { + + // There is no tested version. + if ( empty( $version_info->tested ) ) { + return null; + } + + // Strip off extra version data so the result is x.y or x.y.z. + list( $current_wp_version ) = explode( '-', get_bloginfo( 'version' ) ); + + // The tested version is greater than or equal to the current WP version, no need to do anything. + if ( version_compare( $version_info->tested, $current_wp_version, '>=' ) ) { + return $version_info->tested; + } + $current_version_parts = explode( '.', $current_wp_version ); + $tested_parts = explode( '.', $version_info->tested ); + + // The current WordPress version is x.y.z, so update the tested version to match it. + if ( isset( $current_version_parts[2] ) && $current_version_parts[0] === $tested_parts[0] && $current_version_parts[1] === $tested_parts[1] ) { + $tested_parts[2] = $current_version_parts[2]; + } + + return implode( '.', $tested_parts ); + } + + /** + * Show the update notification on multisite subsites. + * + * @param string $file + * @param array $plugin + */ + public function show_update_notification( $file, $plugin ) { + + // Return early if in the network admin, or if this is not a multisite install. + if ( is_network_admin() || ! is_multisite() ) { + return; + } + + // Allow single site admins to see that an update is available. + if ( ! current_user_can( 'activate_plugins' ) ) { + return; + } + + if ( $this->name !== $file ) { + return; + } + + // Do not print any message if update does not exist. + $update_cache = get_site_transient( 'update_plugins' ); + + if ( ! isset( $update_cache->response[ $this->name ] ) ) { + if ( ! is_object( $update_cache ) ) { + $update_cache = new stdClass(); + } + $update_cache->response[ $this->name ] = $this->get_repo_api_data(); + } + + // Return early if this plugin isn't in the transient->response or if the site is running the current or newer version of the plugin. + if ( empty( $update_cache->response[ $this->name ] ) || version_compare( $this->version, $update_cache->response[ $this->name ]->new_version, '>=' ) ) { + return; + } + + printf( + '', + $this->slug, + $file, + in_array( $this->name, $this->get_active_plugins(), true ) ? 'active' : 'inactive' + ); + + echo ''; + echo '

    '; + + $changelog_link = ''; + if ( ! empty( $update_cache->response[ $this->name ]->sections->changelog ) ) { + $changelog_link = add_query_arg( + array( + 'edd_sl_action' => 'view_plugin_changelog', + 'plugin' => urlencode( $this->name ), + 'slug' => urlencode( $this->slug ), + 'TB_iframe' => 'true', + 'width' => 77, + 'height' => 911, + ), + self_admin_url( 'index.php' ) + ); + } + $update_link = add_query_arg( + array( + 'action' => 'upgrade-plugin', + 'plugin' => urlencode( $this->name ), + ), + self_admin_url( 'update.php' ) + ); + + printf( + /* translators: the plugin name. */ + esc_html__( 'There is a new version of %1$s available.', 'polylang' ), + esc_html( $plugin['Name'] ) + ); + + if ( ! current_user_can( 'update_plugins' ) ) { + echo ' '; + esc_html_e( 'Contact your network administrator to install the update.', 'polylang' ); + } elseif ( empty( $update_cache->response[ $this->name ]->package ) && ! empty( $changelog_link ) ) { + echo ' '; + printf( + /* translators: 1. opening anchor tag, do not translate 2. the new plugin version 3. closing anchor tag, do not translate. */ + __( '%1$sView version %2$s details%3$s.', 'polylang' ), + '', + esc_html( $update_cache->response[ $this->name ]->new_version ), + '' + ); + } elseif ( ! empty( $changelog_link ) ) { + echo ' '; + printf( + /* translators: 1. and 4. are opening anchor tags 2. the new plugin version 3. and 5. are closing anchor tags. */ + __( '%1$sView version %2$s details%3$s or %4$supdate now%5$s.', 'polylang' ), + '', + esc_html( $update_cache->response[ $this->name ]->new_version ), + '', + '', + '' + ); + } else { + printf( + ' %1$s%2$s%3$s', + '', + esc_html__( 'Update now.', 'polylang' ), + '' + ); + } + + do_action( "in_plugin_update_message-{$file}", $plugin, $plugin ); + + echo '

    '; + } + + /** + * Gets the plugins active in a multisite network. + * + * @return array + */ + private function get_active_plugins() { + $active_plugins = (array) get_option( 'active_plugins' ); + $active_network_plugins = (array) get_site_option( 'active_sitewide_plugins' ); + + return array_merge( $active_plugins, array_keys( $active_network_plugins ) ); + } + + /** + * Updates information on the "View version x.x details" page with custom data. + * + * @uses api_request() + * + * @param mixed $_data + * @param string $_action + * @param object $_args + * @return object $_data + */ + public function plugins_api_filter( $_data, $_action = '', $_args = null ) { + + if ( 'plugin_information' !== $_action ) { + + return $_data; + + } + + if ( ! isset( $_args->slug ) || ( $_args->slug !== $this->slug ) ) { + + return $_data; + + } + + $to_send = array( + 'slug' => $this->slug, + 'is_ssl' => is_ssl(), + 'fields' => array( + 'banners' => array(), + 'reviews' => false, + 'icons' => array(), + ), + ); + + // Get the transient where we store the api request for this plugin for 24 hours + $edd_api_request_transient = $this->get_cached_version_info(); + + //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now. + if ( empty( $edd_api_request_transient ) ) { + + $api_response = $this->api_request( 'plugin_information', $to_send ); + if ( empty( $api_response ) ) { + return $_data; + } + + // Expires in 3 hours + $this->set_version_info_cache( $api_response ); + + $_data = $api_response; + } else { + $_data = $edd_api_request_transient; + } + + // Convert sections into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) { + $_data->sections = $this->convert_object_to_array( $_data->sections ); + } + + // Convert banners into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) { + $_data->banners = $this->convert_object_to_array( $_data->banners ); + } + + // Convert icons into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) { + $_data->icons = $this->convert_object_to_array( $_data->icons ); + } + + // Convert contributors into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->contributors ) && ! is_array( $_data->contributors ) ) { + $_data->contributors = $this->convert_object_to_array( $_data->contributors ); + } + + if ( ! isset( $_data->plugin ) ) { + $_data->plugin = $this->name; + } + + if ( ! isset( $_data->version ) && ! empty( $_data->new_version ) ) { + $_data->version = $_data->new_version; + } + + return $_data; + } + + /** + * Convert some objects to arrays when injecting data into the update API + * + * Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON + * decoding, they are objects. This method allows us to pass in the object and return an associative array. + * + * @since 3.6.5 + * + * @param stdClass $data + * + * @return array + */ + private function convert_object_to_array( $data ) { + if ( ! is_array( $data ) && ! is_object( $data ) ) { + return array(); + } + $new_data = array(); + foreach ( $data as $key => $value ) { + $new_data[ $key ] = is_object( $value ) ? $this->convert_object_to_array( $value ) : $value; + } + + return $new_data; + } + + /** + * Disable SSL verification in order to prevent download update failures + * + * @param array $args + * @param string $url + * @return object $array + */ + public function http_request_args( $args, $url ) { + + if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) { + $args['sslverify'] = $this->verify_ssl(); + } + return $args; + } + + /** + * Calls the API and, if successfull, returns the object delivered by the API. + * + * @uses get_bloginfo() + * @uses wp_remote_post() + * @uses is_wp_error() + * + * @param string $_action The requested action. + * @param array $_data Parameters for the API action. + * @return false|object|void + */ + private function api_request( $_action, $_data ) { + $data = array_merge( $this->api_data, $_data ); + + if ( $data['slug'] !== $this->slug ) { + return; + } + + // Don't allow a plugin to ping itself + if ( trailingslashit( home_url() ) === $this->api_url ) { + return false; + } + + if ( $this->request_recently_failed() ) { + return false; + } + + return $this->get_version_from_remote(); + } + + /** + * Determines if a request has recently failed. + * + * @since 1.9.1 + * + * @return bool + */ + private function request_recently_failed() { + $failed_request_details = get_option( $this->failed_request_cache_key ); + + // Request has never failed. + if ( empty( $failed_request_details ) || ! is_numeric( $failed_request_details ) ) { + return false; + } + + /* + * Request previously failed, but the timeout has expired. + * This means we're allowed to try again. + */ + if ( time() > $failed_request_details ) { + delete_option( $this->failed_request_cache_key ); + + return false; + } + + return true; + } + + /** + * Logs a failed HTTP request for this API URL. + * We set a timestamp for 1 hour from now. This prevents future API requests from being + * made to this domain for 1 hour. Once the timestamp is in the past, API requests + * will be allowed again. This way if the site is down for some reason we don't bombard + * it with failed API requests. + * + * @see EDD_SL_Plugin_Updater::request_recently_failed + * + * @since 1.9.1 + */ + private function log_failed_request() { + update_option( $this->failed_request_cache_key, strtotime( '+1 hour' ) ); + } + + /** + * If available, show the changelog for sites in a multisite install. + */ + public function show_changelog() { + + if ( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' !== $_REQUEST['edd_sl_action'] ) { + return; + } + + if ( empty( $_REQUEST['plugin'] ) ) { + return; + } + + if ( empty( $_REQUEST['slug'] ) || $this->slug !== $_REQUEST['slug'] ) { + return; + } + + if ( ! current_user_can( 'update_plugins' ) ) { + wp_die( esc_html__( 'You do not have permission to install plugin updates', 'polylang' ), esc_html__( 'Error', 'polylang' ), array( 'response' => 403 ) ); + } + + $version_info = $this->get_repo_api_data(); + if ( isset( $version_info->sections ) ) { + $sections = $this->convert_object_to_array( $version_info->sections ); + if ( ! empty( $sections['changelog'] ) ) { + echo '
    ' . wp_kses_post( $sections['changelog'] ) . '
    '; + } + } + + exit; + } + + /** + * Gets the current version information from the remote site. + * + * @return array|false + */ + private function get_version_from_remote() { + $api_params = array( + 'edd_action' => 'get_version', + 'license' => ! empty( $this->api_data['license'] ) ? $this->api_data['license'] : '', + 'item_name' => isset( $this->api_data['item_name'] ) ? $this->api_data['item_name'] : false, + 'item_id' => isset( $this->api_data['item_id'] ) ? $this->api_data['item_id'] : false, + 'version' => isset( $this->api_data['version'] ) ? $this->api_data['version'] : false, + 'slug' => $this->slug, + 'author' => $this->api_data['author'], + 'url' => home_url(), + 'beta' => $this->beta, + 'php_version' => phpversion(), + 'wp_version' => get_bloginfo( 'version' ), + ); + + /** + * Filters the parameters sent in the API request. + * + * @param array $api_params The array of data sent in the request. + * @param array $this->api_data The array of data set up in the class constructor. + * @param string $this->plugin_file The full path and filename of the file. + */ + $api_params = apply_filters( 'edd_sl_plugin_updater_api_params', $api_params, $this->api_data, $this->plugin_file ); + + $request = wp_remote_post( + $this->api_url, + array( + 'timeout' => 15, + 'sslverify' => $this->verify_ssl(), + 'body' => $api_params, + ) + ); + + if ( is_wp_error( $request ) || ( 200 !== wp_remote_retrieve_response_code( $request ) ) ) { + $this->log_failed_request(); + + return false; + } + + $request = json_decode( wp_remote_retrieve_body( $request ) ); + + if ( $request && isset( $request->sections ) ) { + $request->sections = maybe_unserialize( $request->sections ); + } else { + $request = false; + } + + if ( $request && isset( $request->banners ) ) { + $request->banners = maybe_unserialize( $request->banners ); + } + + if ( $request && isset( $request->icons ) ) { + $request->icons = maybe_unserialize( $request->icons ); + } + + if ( ! empty( $request->sections ) ) { + foreach ( $request->sections as $key => $section ) { + $request->$key = (array) $section; + } + } + + return $request; + } + + /** + * Get the version info from the cache, if it exists. + * + * @param string $cache_key + * @return object + */ + public function get_cached_version_info( $cache_key = '' ) { + + if ( empty( $cache_key ) ) { + $cache_key = $this->get_cache_key(); + } + + $cache = get_option( $cache_key ); + + // Cache is expired + if ( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) { + return false; + } + + // We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point. + $cache['value'] = json_decode( $cache['value'] ); + if ( ! empty( $cache['value']->icons ) ) { + $cache['value']->icons = (array) $cache['value']->icons; + } + + return $cache['value']; + } + + /** + * Adds the plugin version information to the database. + * + * @param string $value + * @param string $cache_key + */ + public function set_version_info_cache( $value = '', $cache_key = '' ) { + + if ( empty( $cache_key ) ) { + $cache_key = $this->get_cache_key(); + } + + $data = array( + 'timeout' => strtotime( '+3 hours', time() ), + 'value' => wp_json_encode( $value ), + ); + + update_option( $cache_key, $data, 'no' ); + + // Delete the duplicate option + delete_option( 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ) ); + } + + /** + * Returns if the SSL of the store should be verified. + * + * @since 1.6.13 + * @return bool + */ + private function verify_ssl() { + return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this ); + } + + /** + * Gets the unique key (option name) for a plugin. + * + * @since 1.9.0 + * @return string + */ + private function get_cache_key() { + $string = $this->slug . $this->api_data['license'] . $this->beta; + + return 'edd_sl_' . md5( serialize( $string ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/t15s.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/t15s.php new file mode 100644 index 0000000..e24376c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/t15s.php @@ -0,0 +1,237 @@ +slug = $slug; + $this->api_url = $api_url; + + add_action( 'init', array( self::class, 'register_clean_translations_cache' ), 9999 ); + add_filter( 'translations_api', array( $this, 'translations_api' ), 10, 3 ); + add_filter( 'site_transient_update_plugins', array( $this, 'site_transient_update_plugins' ) ); + } + + /** + * Short-circuits translations API requests for private projects. + * + * @since 2.6 + * + * @param bool|array $result The result object. Default false. + * @param string $requested_type The type of translations being requested. + * @param object $args Translation API arguments. + * @return bool|array + */ + public function translations_api( $result, $requested_type, $args ) { + if ( 'plugins' === $requested_type && $this->slug === $args['slug'] ) { + return self::get_translations( $args['slug'], $this->api_url ); + } + + return $result; + } + + /** + * Filters the translations transients to include the private plugin or theme. + * + * @see wp_get_translation_updates() + * + * @since 2.6 + * + * @param bool|array $value The transient value. + * @return bool|array + */ + public function site_transient_update_plugins( $value ) { + if ( ! $value ) { + $value = new stdClass(); + } + + if ( ! isset( $value->translations ) ) { + $value->translations = array(); + } + + $translations = self::get_translations( $this->slug, $this->api_url ); + + if ( ! isset( $translations['translations'] ) ) { + return $value; + } + + $installed_translations = self::get_installed_translations(); + + foreach ( (array) $translations['translations'] as $translation ) { + if ( in_array( $translation['language'], self::get_available_languages() ) ) { + if ( isset( $installed_translations[ $this->slug ][ $translation['language'] ] ) && $translation['updated'] ) { + $local = new DateTime( $installed_translations[ $this->slug ][ $translation['language'] ]['PO-Revision-Date'] ); + $remote = new DateTime( $translation['updated'] ); + + if ( $local >= $remote ) { + continue; + } + } + + $translation['type'] = 'plugin'; + $translation['slug'] = $this->slug; + + $value->translations[] = $translation; + } + } + + return $value; + } + + /** + * Registers actions for clearing translation caches. + * + * @since 2.6 + * + * @return void + */ + public static function register_clean_translations_cache() { + add_action( 'set_site_transient_update_plugins', array( self::class, 'clean_translations_cache' ) ); + add_action( 'delete_site_transient_update_plugins', array( self::class, 'clean_translations_cache' ) ); + } + + /** + * Clears existing translation cache. + * + * @since 2.6 + * + * @return void + */ + public static function clean_translations_cache() { + $translations = get_site_transient( self::TRANSIENT_KEY_PLUGIN ); + + if ( ! is_object( $translations ) ) { + return; + } + + /* + * Don't delete the cache if the transient gets changed multiple times + * during a single request. Set cache lifetime to maximum 15 seconds. + */ + $cache_lifespan = 15; + $time_not_changed = isset( $translations->_last_checked ) && ( time() - $translations->_last_checked ) > $cache_lifespan; + + if ( ! $time_not_changed ) { + return; + } + + delete_site_transient( self::TRANSIENT_KEY_PLUGIN ); + } + + /** + * Gets the translations for a given project. + * + * @since 2.6 + * + * @param string $slug Project directory slug. + * @param string $url Full GlotPress API URL for the project. + * @return array Translation data. + */ + private static function get_translations( $slug, $url ) { + $translations = get_site_transient( self::TRANSIENT_KEY_PLUGIN ); + + if ( ! is_object( $translations ) ) { + $translations = new stdClass(); + } + + if ( isset( $translations->{$slug} ) && is_array( $translations->{$slug} ) ) { + return $translations->{$slug}; + } + + $result = json_decode( wp_remote_retrieve_body( wp_remote_get( $url, array( 'timeout' => 3 ) ) ), true ); + + // Nothing found. + if ( ! is_array( $result ) ) { + $result = array(); + } + + $translations->{$slug} = $result; + $translations->_last_checked = time(); + + set_site_transient( self::TRANSIENT_KEY_PLUGIN, $translations ); + return $result; + } + + /** + * Returns installed translations. + * + * Used to cache the result of wp_get_installed_translations() as it is very expensive. + * + * @since 2.8 + * + * @return array + */ + private static function get_installed_translations() { + if ( null === self::$installed_translations ) { + self::$installed_translations = wp_get_installed_translations( 'plugins' ); + } + return self::$installed_translations; + } + + /** + * Returns available languages. + * + * Used to cache the result of get_available_languages() as it is very expensive. + * + * @since 2.8 + * + * @return array + */ + private static function get_available_languages() { + if ( null === self::$available_languages ) { + self::$available_languages = get_available_languages(); + } + return self::$available_languages; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/upgrade.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/upgrade.php new file mode 100644 index 0000000..f861f73 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/upgrade.php @@ -0,0 +1,387 @@ +options = $options; + } + + /** + * Check if upgrade is possible otherwise die to avoid activation + * + * @since 1.2 + * + * @return void + */ + public function can_activate() { + if ( ! $this->can_upgrade() ) { + ob_start(); + $this->admin_notices(); // FIXME the error message is displayed two times + die( ob_get_contents() ); // phpcs:ignore WordPress.Security.EscapeOutput + } + } + + /** + * Upgrades if possible otherwise returns false to stop Polylang loading + * + * @since 1.2 + * + * @return bool true if upgrade is possible, false otherwise + */ + public function upgrade() { + if ( ! $this->can_upgrade() ) { + add_action( 'all_admin_notices', array( $this, 'admin_notices' ) ); + return false; + } + + add_action( 'admin_init', array( $this, '_upgrade' ) ); + return true; + } + + + /** + * Check if we the previous version is not too old + * Upgrades if OK + * /!\ never start any upgrade before admin_init as it is likely to conflict with some other plugins + * + * @since 1.2 + * + * @return bool true if upgrade is possible, false otherwise + */ + public function can_upgrade() { + // Don't manage upgrade from version < 1.8 + return version_compare( $this->options['version'], '1.8', '>=' ); + } + + /** + * Displays a notice when upgrading from a too old version + * + * @since 1.0 + * + * @return void + */ + public function admin_notices() { + load_plugin_textdomain( 'polylang' ); + printf( + '

    %s

    %s

    ', + esc_html__( 'Polylang has been deactivated because you upgraded from a too old version.', 'polylang' ), + sprintf( + /* translators: %1$s and %2$s are Polylang version numbers */ + esc_html__( 'Before upgrading to %2$s, please upgrade to %1$s.', 'polylang' ), + '2.9', + POLYLANG_VERSION // phpcs:ignore WordPress.Security.EscapeOutput + ) + ); + } + + /** + * Upgrades the plugin depending on the previous version + * + * @since 1.2 + * + * @return void + */ + public function _upgrade() { + /* + * Delete the transient precisely at this point (`admin_init`) + * to ensure `Model\Languages` callbacks do their job. + * i.e. delete the transient from the options table when external object cache is used. + */ + delete_transient( 'pll_languages_list' ); + + foreach ( array( '2.0.8', '2.1', '2.7', '3.4', '3.7', '3.8' ) as $version ) { + if ( version_compare( $this->options['version'], $version, '<' ) ) { + $method_to_call = array( $this, 'upgrade_' . str_replace( '.', '_', $version ) ); + if ( is_callable( $method_to_call ) ) { + call_user_func( $method_to_call ); + } + } + } + + /** + * Fires after Polylang has been upgraded and before the new version is saved in options. + * + * @since 3.7 + */ + do_action( 'pll_upgrade' ); + + $this->options['previous_version'] = $this->options['version']; // Remember the previous version of Polylang since v1.7.7 + $this->options['version'] = POLYLANG_VERSION; + } + + /** + * Upgrades if the previous version is < 2.0.8 + * Changes the user meta 'user_lang' to 'locale' to match WP 4.7 choice + * + * @since 2.0.8 + * + * @return void + */ + protected function upgrade_2_0_8() { + global $wpdb; + $wpdb->update( $wpdb->usermeta, array( 'meta_key' => 'locale' ), array( 'meta_key' => 'user_lang' ) ); + } + + /** + * Upgrades if the previous version is < 2.1. + * Moves strings translations from polylang_mo post_content to post meta _pll_strings_translations. + * + * @since 2.1 + * + * @return void + */ + protected function upgrade_2_1() { + $posts = get_posts( + array( + 'post_type' => 'polylang_mo', + 'post_status' => 'any', + 'numberposts' => -1, + 'nopaging' => true, + ) + ); + + if ( is_array( $posts ) ) { + foreach ( $posts as $post ) { + $meta = get_post_meta( $post->ID, '_pll_strings_translations', true ); + + if ( empty( $meta ) ) { + $strings = maybe_unserialize( $post->post_content ); + if ( is_array( $strings ) ) { + update_post_meta( $post->ID, '_pll_strings_translations', $strings ); + } + } + } + } + } + + /** + * Upgrades if the previous version is < 2.7 + * Replace numeric keys by hashes in WPML registered strings + * Dismiss the wizard notice for existing sites + * + * @since 2.7 + * + * @return void + */ + protected function upgrade_2_7() { + $strings = get_option( 'polylang_wpml_strings' ); + if ( is_array( $strings ) ) { + $new_strings = array(); + + foreach ( $strings as $string ) { + $context = $string['context']; + $name = $string['name']; + + $key = md5( "$context | $name" ); + $new_strings[ $key ] = $string; + } + update_option( 'polylang_wpml_strings', $new_strings ); + } + + PLL_Admin_Notices::dismiss( 'wizard' ); + } + + /** + * Upgrades if the previous version is < 3.4.0. + * + * @since 3.4 + * + * @return void + */ + protected function upgrade_3_4() { + $this->migrate_locale_fallback_to_language_description(); + + $this->migrate_strings_translations(); + } + + /** + * Upgrades if the previous version is < 3.7. + * Hides the "The language is set from content" option if it isn't the one selected. + * Cleans up strings translations so we don't store translations duplicated from the source. + * + * @since 3.7 + * + * @return void + */ + protected function upgrade_3_7() { + $this->allow_to_hide_language_from_content(); + $this->empty_duplicated_strings_translations(); + } + + /** + * Upgrades if the previous version is < 3.8. + * Migrates language taxonomies from `polylang` option to `pll_language_taxonomies` option. + * + * @since 3.8 + * + * @return void + */ + protected function upgrade_3_8() { + $options = get_option( 'polylang' ); + + $language_taxonomies = array(); + if ( is_array( $options ) && isset( $options['language_taxonomies'] ) && is_array( $options['language_taxonomies'] ) ) { + $language_taxonomies = $options['language_taxonomies']; + } + + update_option( 'pll_language_taxonomies', $language_taxonomies ); + } + + /** + * Moves strings translations from post meta to term meta _pll_strings_translations. + * + * @since 3.4 + * + * @return void + */ + protected function migrate_strings_translations() { + $posts = get_posts( + array( + 'post_type' => 'polylang_mo', + 'post_status' => 'any', + 'numberposts' => -1, + 'nopaging' => true, + ) + ); + + if ( ! is_array( $posts ) ) { + return; + } + + foreach ( $posts as $post ) { + $meta = get_post_meta( $post->ID, '_pll_strings_translations', true ); + + $term_id = (int) substr( $post->post_title, 12 ); + + // Do not delete post metas in case a user needs to rollback to Polylang < 3.4. + + if ( empty( $meta ) || ! is_array( $meta ) ) { + continue; + } + + update_term_meta( $term_id, '_pll_strings_translations', wp_slash( $meta ) ); + } + } + + /** + * Migrate locale fallback to language term description. + * + * @since 3.4 + * + * @return void + */ + protected function migrate_locale_fallback_to_language_description() { + // Migrate locale fallbacks from term metas to language term description. + $terms = get_terms( + array( + 'taxonomy' => 'language', + 'hide_empty' => false, + 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query + array( + 'key' => 'fallback', + 'compare_key' => 'EXISTS', + ), + ), + ) + ); + + if ( ! is_array( $terms ) ) { + return; + } + + foreach ( $terms as $term ) { + $fallbacks = get_term_meta( $term->term_id, 'fallback', true ); + + delete_term_meta( $term->term_id, 'fallback' ); + + if ( empty( $fallbacks ) || ! is_array( $fallbacks ) ) { + // Empty or invalid value, should not happen. + continue; + } + + $description = maybe_unserialize( $term->description ); + $description = is_array( $description ) ? $description : array(); + + $description['fallbacks'] = $fallbacks; + /** @var string */ + $description = maybe_serialize( $description ); + + wp_update_term( $term->term_id, 'language', array( 'description' => $description ) ); + } + } + + /** + * Hides the language from content option if it is not the one selected. + * + * @since 3.7 + * + * @return void + */ + private function allow_to_hide_language_from_content() { + update_option( + 'pll_language_from_content_available', + 0 === $this->options['force_lang'] ? 'yes' : 'no' + ); + } + + /** + * Cleans up strings translations so we don't store translations duplicated from the source. + * + * @since 3.7 + * + * @return void + */ + private function empty_duplicated_strings_translations() { + $terms = get_terms( + array( + 'taxonomy' => 'language', + 'hide_empty' => false, + ) + ); + + if ( ! is_array( $terms ) ) { + return; + } + + foreach ( $terms as $term ) { + $strings = get_term_meta( $term->term_id, '_pll_strings_translations', true ); + + if ( empty( $strings ) || ! is_array( $strings ) ) { + continue; + } + + foreach ( $strings as $i => $tuple ) { + if ( $tuple[0] !== $tuple[1] ) { + continue; + } + + $strings[ $i ][1] = ''; + } + + update_term_meta( $term->term_id, '_pll_strings_translations', $strings ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/usable.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/usable.php new file mode 100644 index 0000000..c977791 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/install/usable.php @@ -0,0 +1,123 @@ +

    %s

    ', + sprintf( + /* translators: 1: Plugin name 2: Current PHP version 3: Required PHP version */ + esc_html__( '%1$s has deactivated itself because you are using an old version of PHP. You are using using PHP %2$s. %1$s requires PHP %3$s.', 'polylang' ), + esc_html( static::get_plugin_name() ), + esc_html( pll_get_constant( 'PHP_VERSION', '' ) ), + esc_html( static::get_min_php_version() ) + ) + ); + } + + /** + * Displays a notice if WP min version is not met. + * + * @since 2.6.7 + * @since 3.8 Moved from the class `PLL_Install`. + * Made it `static`. + * + * @return void + */ + public static function wp_version_notice() { + global $wp_version; + + load_plugin_textdomain( 'polylang' ); // Plugin i18n. + + printf( + '

    %s

    ', + sprintf( + /* translators: 1: Plugin name 2: Current WordPress version 3: Required WordPress version */ + esc_html__( '%1$s has deactivated itself because you are using an old version of WordPress. You are using using WordPress %2$s. %1$s requires at least WordPress %3$s.', 'polylang' ), + esc_html( static::get_plugin_name() ), + esc_html( $wp_version ), + esc_html( static::get_min_wp_version() ) + ) + ); + } + + /** + * Returns the minimal php version required to run the plugin. + * + * @since 3.8 + * + * @return string + */ + public static function get_min_php_version() { + return pll_get_constant( 'PLL_MIN_PHP_VERSION', '' ); + } + + /** + * Returns the minimal WP version required to run the plugin. + * + * @since 3.8 + * + * @return string + */ + public static function get_min_wp_version() { + return pll_get_constant( 'PLL_MIN_WP_VERSION', '' ); + } + + /** + * Returns the plugin's name. + * + * @since 3.8 + * + * @return string + */ + public static function get_plugin_name() { + return pll_get_constant( 'POLYLANG', '' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/aqua-resizer/aqua-resizer.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/aqua-resizer/aqua-resizer.php new file mode 100644 index 0000000..99f9307 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/aqua-resizer/aqua-resizer.php @@ -0,0 +1,32 @@ + 'aq_resize' ) ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/aqua-resizer/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/aqua-resizer/load.php new file mode 100644 index 0000000..1325476 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/aqua-resizer/load.php @@ -0,0 +1,13 @@ +aq_resizer = new PLL_Aqua_Resizer(); +PLL_Integrations::instance()->aq_resizer->init(); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/cache/cache-compat.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/cache/cache-compat.php new file mode 100644 index 0000000..dad279b --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/cache/cache-compat.php @@ -0,0 +1,108 @@ +options['force_lang'] ) ? wp_parse_url( PLL()->links_model->home, PHP_URL_HOST ) : COOKIE_DOMAIN; + $samesite = ( 3 === PLL()->options['force_lang'] ) ? 'None' : 'Lax'; + + /** This filter is documented in src/cookie.php */ + $expiration = (int) apply_filters( 'pll_cookie_expiration', YEAR_IN_SECONDS ); + + if ( 0 !== $expiration ) { + $format = 'var expirationDate = new Date(); + expirationDate.setTime( expirationDate.getTime() + %7$d * 1000 ); + document.cookie = "%1$s=%2$s; expires=" + expirationDate.toUTCString() + "; path=%3$s%4$s%5$s%6$s";'; + } else { + $format = 'document.cookie = "%1$s=%2$s; path=%3$s%4$s%5$s%6$s";'; + } + + $js = sprintf( + "(function() { + {$format} + }());\n", + esc_js( PLL_COOKIE ), + esc_js( pll_current_language() ), + esc_js( COOKIEPATH ), + $domain ? '; domain=' . esc_js( $domain ) : '', + is_ssl() ? '; secure' : '', + '; SameSite=' . $samesite, + esc_js( $expiration ) + ); + + // Need to register prior to enqueue empty script and add extra code to it. + wp_register_script( 'pll_cookie_script', '', array(), POLYLANG_VERSION, true ); + wp_enqueue_script( 'pll_cookie_script' ); + wp_add_inline_script( 'pll_cookie_script', $js ); + } + + /** + * Informs cache plugins not to cache the home in the default language + * When the detection of the browser preferred language is active + * + * @since 2.3 + */ + public function do_not_cache_site_home() { + if ( ! defined( 'DONOTCACHEPAGE' ) && PLL()->options['browser'] && PLL()->options['hide_default'] && is_front_page() && pll_current_language() === pll_default_language() ) { + define( 'DONOTCACHEPAGE', true ); + } + } + + /** + * Allows cache plugins to clean the right post type archive cache when cleaning a post cache. + * + * @since 3.0.5 + * + * @param int $post_id Post id. + */ + public function clean_post_cache( $post_id ) { + $lang = PLL()->model->post->get_language( $post_id ); + + if ( $lang ) { + $filter_callback = function ( $link, $post_type ) use ( $lang ) { + return pll_is_translated_post_type( $post_type ) && 'post' !== $post_type ? PLL()->links_model->switch_language_in_link( $link, $lang ) : $link; + }; + add_filter( 'post_type_archive_link', $filter_callback, 99, 2 ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/cache/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/cache/load.php new file mode 100644 index 0000000..3042f81 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/cache/load.php @@ -0,0 +1,20 @@ +cache_compat = new PLL_Cache_Compat(), 'init' ) ); + } + }, + 0 +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/custom-field-template/cft.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/custom-field-template/cft.php new file mode 100644 index 0000000..1ce9a6b --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/custom-field-template/cft.php @@ -0,0 +1,35 @@ +ID; + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/custom-field-template/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/custom-field-template/load.php new file mode 100644 index 0000000..cb57809 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/custom-field-template/load.php @@ -0,0 +1,21 @@ +cft = new PLL_Cft(); + PLL_Integrations::instance()->cft->init(); + } + }, + 0 +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/domain-mapping/domain-mapping.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/domain-mapping/domain-mapping.php new file mode 100644 index 0000000..7acc2ca --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/domain-mapping/domain-mapping.php @@ -0,0 +1,81 @@ +options['force_lang'] > 1 ) { + // Don't redirect the main site + if ( is_main_site() ) { + return; + } + + // Don't redirect post previews + if ( isset( $_GET['preview'] ) && 'true' === $_GET['preview'] ) { // phpcs:ignore WordPress.Security.NonceVerification + return; + } + + // Don't redirect theme customizer + if ( isset( $_POST['customize'] ) && isset( $_POST['theme'] ) && 'on' === $_POST['customize'] ) { // phpcs:ignore WordPress.Security.NonceVerification + return; + } + + // If we can't associate the requested domain to a language, redirect to the default domain + $requested_url = pll_get_requested_url(); + $requested_host = wp_parse_url( $requested_url, PHP_URL_HOST ); + + $hosts = PLL()->links_model->get_hosts(); + $lang = array_search( $requested_host, $hosts ); + + if ( empty( $lang ) ) { + $status = get_site_option( 'dm_301_redirect' ) ? '301' : '302'; // Honor status redirect option + $redirect = str_replace( '://' . $requested_host, '://' . $hosts[ PLL()->options['default_lang'] ], $requested_url ); + wp_safe_redirect( $redirect, $status ); + exit; + } + } else { + // Otherwise rely on MU Domain Mapping + redirect_to_mapped_domain(); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/domain-mapping/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/domain-mapping/load.php new file mode 100644 index 0000000..ff6d610 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/domain-mapping/load.php @@ -0,0 +1,12 @@ +dm = new PLL_Domain_Mapping(); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/duplicate-post/duplicate-post.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/duplicate-post/duplicate-post.php new file mode 100644 index 0000000..f738735 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/duplicate-post/duplicate-post.php @@ -0,0 +1,37 @@ +duplicate_post = new PLL_Duplicate_Post(); + PLL_Integrations::instance()->duplicate_post->init(); + } + }, + 0 +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/integration-build.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/integration-build.php new file mode 100644 index 0000000..854b92c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/integration-build.php @@ -0,0 +1,20 @@ +init(); + } + + return self::$instance; + } + + /** + * Requires integrations. + * + * @since 3.7 + * + * @return void + */ + protected function init(): void { + $load_scripts = require __DIR__ . '/integration-build.php'; + + foreach ( $load_scripts as $load_script ) { + require_once __DIR__ . "/{$load_script}/load.php"; + } + } +} + +class_alias( 'PLL_Integrations', 'PLL_Plugins_Compat' ); // For Backward compatibility. diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/featured-content.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/featured-content.php new file mode 100644 index 0000000..9310a43 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/featured-content.php @@ -0,0 +1,121 @@ +is_active() || false !== $featured_ids ) { + return $featured_ids; + } + + $settings = Featured_Content::get_setting(); + + if ( ! $term = get_term_by( 'name', $settings['tag-name'], 'post_tag' ) ) { + return $featured_ids; + } + + // Get featured tag translations + $tags = PLL()->model->term->get_translations( $term->term_id ); + $ids = array(); + + // Query for featured posts in all languages + // One query per language to get the correct number of posts per language + foreach ( $tags as $tag ) { + $args = array( + 'lang' => 0, // Avoid language filters. + 'fields' => 'ids', + 'numberposts' => Featured_Content::$max_posts, + 'tax_query' => array( + array( + 'taxonomy' => 'post_tag', + 'terms' => (int) $tag, + ), + ), + ); + + // Available in Jetpack, but not in Twenty Fourteen. + if ( isset( Featured_Content::$post_types ) ) { + $args['post_type'] = Featured_Content::$post_types; + } + + $_ids = get_posts( $args ); + $ids = array_merge( $ids, $_ids ); + } + + $ids = array_map( 'absint', $ids ); + set_transient( 'featured_content_ids', $ids ); + + return $ids; + } + + /** + * Translates the featured tag id in featured content settings + * Mainly to allow hiding it when requested in featured content options + * Acts only on frontend + * + * @since 1.4 + * + * @param array $settings featured content settings + * @return array modified $settings + */ + public function option_featured_content( $settings ) { + if ( $this->is_active() && PLL() instanceof PLL_Frontend && $settings['tag-id'] && $tr = pll_get_term( $settings['tag-id'] ) ) { + $settings['tag-id'] = $tr; + } + + return $settings; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/jetpack.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/jetpack.php new file mode 100644 index 0000000..a4f9897 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/jetpack.php @@ -0,0 +1,137 @@ +options['force_lang'] > 1 ) { + add_filter( 'infinite_scroll_ajax_url', array( PLL()->links_model, 'site_url' ) ); + add_filter( 'infinite_scroll_js_settings', array( $this, 'jetpack_infinite_scroll_js_settings' ) ); + } + } + + /** + * Filter the Top Posts and Pages by language. + * Adapted from the same function in jetpack-3.0.2/3rd-party/wpml.php + * + * @since 1.5.4 + * + * @param array $posts Array of the most popular posts. + * @return array + */ + public function jetpack_widget_get_top_posts( $posts ) { + foreach ( $posts as $k => $post ) { + if ( pll_current_language() !== pll_get_post_language( $post['post_id'] ) ) { + unset( $posts[ $k ] ); + } + } + + return $posts; + } + + /** + * Filter the HTML of the Contact Form and output the one requested by language. + * Adapted from the same function in jetpack-3.0.2/3rd-party/wpml.php + * Keeps using 'icl_translate' as the function registers the string. + * + * @since 1.5.4 + * + * @param string $r Contact Form HTML output. + * @param string $field_label Field label. + * @return string + */ + public function grunion_contact_form_field_html_filter( $r, $field_label ) { + if ( function_exists( 'icl_translate' ) ) { + if ( pll_current_language() !== pll_default_language() ) { + $label_translation = icl_translate( 'jetpack ', $field_label . '_label', $field_label ); + $r = str_replace( $field_label, $label_translation, $r ); + } + } + + return $r; + } + + /** + * Adds opengraph support for locale and translations. + * + * @since 1.6 + * + * @param array $tags Opengraph tags to output. + * @return array + */ + public function jetpack_ogp( $tags ) { + if ( did_action( 'pll_init' ) ) { + foreach ( PLL()->model->get_languages_list() as $language ) { + if ( PLL()->curlang->slug !== $language->slug && PLL()->links->get_translation_url( $language ) && isset( $language->facebook ) ) { + $tags['og:locale:alternate'][] = $language->facebook; + } + if ( PLL()->curlang->slug === $language->slug && isset( $language->facebook ) ) { + $tags['og:locale'] = $language->facebook; + } + } + } + return $tags; + } + + /** + * Allows to make sure that related posts are in the correct language. + * + * @since 1.8 + * + * @param array $filters Array of ElasticSearch filters based on the post_id and args. + * @param string $post_id Post ID of the post for which we are retrieving Related Posts. + * @return array + */ + public function jetpack_relatedposts_filter_filters( $filters, $post_id ) { + $slug = sanitize_title( pll_get_post_language( $post_id, 'slug' ) ); + $filters[] = array( 'term' => array( 'taxonomy.language.slug' => $slug ) ); + return $filters; + } + + /** + * Fixes the settings history host for infinite scroll when using subdomains or multiple domains. + * + * @since 2.1 + * + * @param array $settings Infinite scroll JS settings outputted in the head. + * @return array + */ + public function jetpack_infinite_scroll_js_settings( $settings ) { + $settings['history']['host'] = wp_parse_url( pll_home_url(), PHP_URL_HOST ); // Jetpack uses get_option( 'home' ). + return $settings; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/load.php new file mode 100644 index 0000000..9ed9766 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/jetpack/load.php @@ -0,0 +1,14 @@ +jetpack = new PLL_Jetpack(); // Must be loaded before the plugin is active. +add_action( 'pll_init', array( PLL_Integrations::instance()->featured_content = new PLL_Featured_Content(), 'init' ) ); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/no-category-base/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/no-category-base/load.php new file mode 100644 index 0000000..6cc3722 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/no-category-base/load.php @@ -0,0 +1,13 @@ +no_category_base = new PLL_No_Category_Base(); +PLL_Integrations::instance()->no_category_base->init(); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/no-category-base/no-category-base.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/no-category-base/no-category-base.php new file mode 100644 index 0000000..703ac6b --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/no-category-base/no-category-base.php @@ -0,0 +1,36 @@ +twenty_seventeen = new PLL_Twenty_Seventeen(), 'init' ) ); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/twenty-seventeen/twenty-seven-teen.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/twenty-seventeen/twenty-seven-teen.php new file mode 100644 index 0000000..a75540f --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/twenty-seventeen/twenty-seven-teen.php @@ -0,0 +1,30 @@ + 1 ), array( 'context' => 'Twenty Seventeen' ) ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/load.php new file mode 100644 index 0000000..fca8ee3 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/load.php @@ -0,0 +1,12 @@ +wp_importer = new PLL_WordPress_Importer(); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/wordpress-importer.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/wordpress-importer.php new file mode 100644 index 0000000..42fe91e --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/wordpress-importer.php @@ -0,0 +1,70 @@ +getFileName() ) ) . '/languages' ); + + $GLOBALS['wp_import'] = new PLL_WP_Import(); + register_importer( 'wordpress', 'WordPress', __( 'Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.', 'polylang' ), array( $GLOBALS['wp_import'], 'dispatch' ) ); // phpcs:ignore WordPress.WP.CapitalPDangit.MisspelledInText + } + + /** + * Sets the flag when importing a language and the file has been exported with Polylang < 1.8. + * + * @since 1.8 + * + * @param array $terms An array of arrays containing terms information form the WXR file. + * @return array + */ + public function wp_import_terms( $terms ) { + $languages = include POLYLANG_DIR . '/src/settings/languages.php'; + + foreach ( $terms as $key => $term ) { + if ( 'language' === $term['term_taxonomy'] ) { + $description = maybe_unserialize( $term['term_description'] ); + if ( empty( $description['flag_code'] ) && isset( $languages[ $description['locale'] ] ) ) { + $description['flag_code'] = $languages[ $description['locale'] ]['flag']; + $terms[ $key ]['term_description'] = maybe_serialize( $description ); + } + } + } + return $terms; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/wp-import.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/wp-import.php new file mode 100644 index 0000000..f7b561f --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-importer/wp-import.php @@ -0,0 +1,231 @@ +terms. + foreach ( $this->terms as $term ) { + if ( 'post_translations' == $term['term_taxonomy'] ) { + $this->post_translations[] = $term; + } + if ( 'term_translations' == $term['term_taxonomy'] ) { + $term_translations[] = $term; + } + + if ( 'language' === $term['term_taxonomy'] ) { + $term_languages[] = $term; + } + } + + parent::process_terms(); + + // First reset the core terms cache as WordPress Importer calls wp_suspend_cache_invalidation( true ); + wp_cache_set_terms_last_changed(); + + // Assign the default language in case the importer created the first language. + if ( empty( PLL()->options['default_lang'] ) ) { + $languages = get_terms( array( 'taxonomy' => 'language', 'hide_empty' => false, 'orderby' => 'term_id' ) ); + $default_lang = reset( $languages ); + PLL()->options['default_lang'] = $default_lang->slug; + } + + /* + * Merge strings translations for an already existing language. + * + * Term metas are handled by the importer when creating a term, + * but not when updating an existing term. + */ + foreach ( $term_languages as $term ) { + if ( empty( $this->processed_terms[ $term['term_id'] ] ) || empty( $term['termmeta'] ) ) { + continue; + } + + foreach ( $term['termmeta'] as $term_meta ) { + if ( '_pll_strings_translations' !== $term_meta['key'] ) { + continue; + } + + $language = PLL()->model->languages->get( $term['term_id'] ); + if ( empty( $language ) ) { + continue; + } + + $strings = maybe_unserialize( $term_meta['value'] ); + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + foreach ( $strings as $msg ) { + $mo->add_entry_or_merge( $mo->make_entry( $msg[0], $msg[1] ) ); + } + $mo->export_to_db( $language ); + } + } + + // Clean languages cache in case some of them were created during import. + PLL()->model->languages->clean_cache(); + + $this->remap_terms_relations( $term_translations ); + $this->remap_translations( $term_translations, $this->processed_terms ); + } + + /** + * Overrides WP_Import::process_post to remap posts translations + * Also merges strings translations from the WXR file to the existing ones + * + * @since 1.2 + */ + public function process_posts() { + $menu_items = array(); + + // Store this for future usage as parent function unset $this->posts + foreach ( $this->posts as $post ) { + if ( 'nav_menu_item' == $post['post_type'] ) { + $menu_items[] = $post; + } + } + + parent::process_posts(); + + PLL()->model->languages->clean_cache(); // To update the posts count in (cached) languages list. + + $this->remap_translations( $this->post_translations, $this->processed_posts ); + unset( $this->post_translations ); + + // Language switcher menu items + foreach ( $menu_items as $item ) { + foreach ( $item['postmeta'] as $meta ) { + if ( '_pll_menu_item' == $meta['key'] ) { + update_post_meta( $this->processed_menu_items[ $item['post_id'] ], '_pll_menu_item', maybe_unserialize( $meta['value'] ) ); + } + } + } + } + + /** + * Remaps terms languages. + * + * @since 1.2 + * + * @param array $terms array of terms in 'term_translations' taxonomy. + */ + protected function remap_terms_relations( &$terms ) { + global $wpdb; + + $term_relationships = array(); + + foreach ( $terms as $term ) { + $translations = maybe_unserialize( $term['term_description'] ); + foreach ( $translations as $slug => $old_id ) { + if ( $old_id && ! empty( $this->processed_terms[ $old_id ] ) && $lang = PLL()->model->get_language( $slug ) ) { + // Language relationship. + $term_relationships[] = array( $this->processed_terms[ $old_id ], $lang->get_tax_prop( 'term_language', 'term_taxonomy_id' ) ); + + // Translation relationship. + $term_relationships[] = array( $this->processed_terms[ $old_id ], get_term( $this->processed_terms[ $term['term_id'] ], 'term_translations' )->term_taxonomy_id ); + } + } + } + + // Insert term_relationships. + if ( ! empty( $term_relationships ) ) { + // Make sure we don't attempt to insert already existing term relationships. + $existing_term_relationships = $wpdb->get_results( + "SELECT tr.object_id, tr.term_taxonomy_id FROM {$wpdb->term_relationships} AS tr + INNER JOIN {$wpdb->term_taxonomy} AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id + WHERE tt.taxonomy IN ( 'term_language', 'term_translations' )" + ); + + foreach ( $existing_term_relationships as $key => $tr ) { + $existing_term_relationships[ $key ] = array( $tr->object_id, $tr->term_taxonomy_id ); + } + + $term_relationships = array_udiff( + $term_relationships, + $existing_term_relationships, + function ( $a, $b ) { + return strcmp( implode( ',', $a ), implode( ',', $b ) ); // An easy way to compare arrays (ok if values are int or numeric strings). + } + ); + + if ( ! empty( $term_relationships ) ) { + $wpdb->query( + $wpdb->prepare( // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber + sprintf( + "INSERT INTO {$wpdb->term_relationships} ( object_id, term_taxonomy_id ) VALUES %s", + implode( ',', array_fill( 0, count( $term_relationships ), '( %d, %d )' ) ) + ), + array_merge( ...$term_relationships ) + ) + ); + } + } + } + + /** + * Remaps translations for both posts and terms. + * + * @since 1.2 + * + * @param array $terms Array of terms in 'post_translations' or 'term_translations' taxonomies? + * @param array $processed_objects Array of posts or terms processed by WordPress Importer. + */ + protected function remap_translations( &$terms, &$processed_objects ) { + global $wpdb; + + $languages = pll_languages_list(); + $to_update = array(); + + foreach ( $terms as $term ) { + $translations = maybe_unserialize( $term['term_description'] ); + $new_translations = array(); + foreach ( $translations as $slug => $old_id ) { + if ( in_array( $slug, $languages, true ) && $old_id && ! empty( $processed_objects[ $old_id ] ) ) { + $new_translations[ $slug ] = $processed_objects[ $old_id ]; + } else { + $new_translations[ $slug ] = $old_id; // Preserve values for all keys which are not our language slugs. + } + } + + if ( ! empty( $new_translations ) ) { + $to_update['case'][] = array( $this->processed_terms[ $term['term_id'] ], maybe_serialize( $new_translations ) ); + $to_update['in'][] = (int) $this->processed_terms[ $term['term_id'] ]; + } + } + + if ( ! empty( $to_update ) ) { + $wpdb->query( + $wpdb->prepare( + sprintf( + "UPDATE {$wpdb->term_taxonomy} + SET description = ( CASE term_id %s END ) + WHERE term_id IN (%s)", + implode( ' ', array_fill( 0, count( $to_update['case'] ), 'WHEN %d THEN %s' ) ), + implode( ',', array_fill( 0, count( $to_update['in'] ), '%d' ) ) + ), + array_merge( array_merge( ...$to_update['case'] ), $to_update['in'] ) + ) + ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-offload-media/as3cf.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-offload-media/as3cf.php new file mode 100644 index 0000000..33d5518 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-offload-media/as3cf.php @@ -0,0 +1,72 @@ +is_media_translated[ $post_id ] = ( count( pll_get_post_translations( $post_id ) ) > 1 ); + } + + /** + * Deletes the WP Offload Media information from the attachment being deleted. + * That way WP Offload Media won't delete the file stored in the cloud. + * Done after Polylang has deleted the translations information, to avoid the synchronization of the deletion + * and of course before WP Offload Media deletes the file, normally at priority 20. + * + * @since 2.6 + * + * @param int $post_id Id of the attachment being deleted. + */ + public function prevent_file_deletion( $post_id ) { + if ( ! empty( $this->is_media_translated[ $post_id ] ) ) { + delete_post_meta( $post_id, 'amazonS3_info' ); + delete_post_meta( $post_id, 'as3cf_filesize_total' ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-offload-media/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-offload-media/load.php new file mode 100644 index 0000000..15acfd0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-offload-media/load.php @@ -0,0 +1,20 @@ +as3cf = new PLL_AS3CF(), 'init' ) ); + } + }, + 0 +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-sweep/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-sweep/load.php new file mode 100644 index 0000000..0ce0e17 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-sweep/load.php @@ -0,0 +1,21 @@ +wp_sweep = new PLL_WP_Sweep(); + PLL_Integrations::instance()->wp_sweep->init(); + } + }, + 0 +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-sweep/wp-sweep.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-sweep/wp-sweep.php new file mode 100644 index 0000000..b9a195d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wp-sweep/wp-sweep.php @@ -0,0 +1,62 @@ +model->get_languages_list() as $language ) { + $excluded_term_ids = array_merge( + $excluded_term_ids, + array_values( $language->get_tax_props( 'term_id' ) ) + ); + } + + return array_unique( $excluded_term_ids ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/load.php new file mode 100644 index 0000000..3965a23 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/load.php @@ -0,0 +1,20 @@ +wpseo = new PLL_WPSEO(), 'init' ) ); + } + }, + 0 +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/wpseo-ogp.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/wpseo-ogp.php new file mode 100644 index 0000000..4b6e701 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/wpseo-ogp.php @@ -0,0 +1,54 @@ +locale = $locale; + } + + /** + * Returns the meta Opengraph alternate locale meta tag + * + * @since 2.7.3 + * + * @return string + */ + public function present() { + return sprintf( '', esc_attr( $this->get() ) ); + } + + /** + * Returns the alternate locale + * + * @since 2.7.3 + * + * @return string + */ + public function get() { + return $this->locale; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/wpseo.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/wpseo.php new file mode 100644 index 0000000..934a4fe --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/wpseo/wpseo.php @@ -0,0 +1,517 @@ +options['force_lang'] > 1 ) { + add_filter( 'wpseo_enable_xml_sitemap_transient_caching', '__return_false' ); // Disable cache! otherwise WPSEO keeps only one domain (thanks to Junaid Bhura) + add_filter( 'home_url', array( $this, 'wpseo_home_url' ), 10, 2 ); // Fix home_url + add_action( 'setup_theme', array( $this, 'maybe_deactivate_sitemap' ) ); // Deactivate sitemaps for inactive languages. + } else { + // Get all terms in all languages when the language is set from the content or directory name + add_filter( 'get_terms_args', array( $this, 'wpseo_remove_terms_filter' ) ); + add_action( 'pre_get_posts', array( $this, 'before_sitemap' ), 0 ); // Needs to be fired before WPSEO_Sitemaps::redirect() + } + + add_filter( 'pll_home_url_white_list', array( $this, 'wpseo_home_url_white_list' ) ); + add_filter( 'wpseo_frontend_presenters', array( $this, 'wpseo_frontend_presenters' ) ); + add_filter( 'wpseo_canonical', array( $this, 'wpseo_canonical' ) ); + add_filter( 'wpseo_frontend_presentation', array( $this, 'frontend_presentation' ) ); + add_filter( 'wpseo_breadcrumb_indexables', array( $this, 'breadcrumb_indexables' ) ); + } else { + add_filter( 'pll_copy_post_metas', array( $this, 'copy_post_metas' ), 10, 4 ); + add_filter( 'pll_translate_post_meta', array( $this, 'translate_post_meta' ), 10, 3 ); + add_filter( 'pll_post_metas_to_export', array( $this, 'export_post_metas' ) ); + + // Yoast SEO adds the columns hooks only for the 'inline-save' action. We need them for 'pll_update_post_rows' too. + if ( wp_doing_ajax() && isset( $_POST['action'] ) && 'pll_update_post_rows' === $_POST['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing + $GLOBALS['wpseo_meta_columns'] = new WPSEO_Meta_Columns(); + } + } + } + + /** + * Registers options for translation. + * + * @since 2.9 + */ + public function wpseo_translate_options() { + if ( method_exists( 'WPSEO_Options', 'clear_cache' ) ) { + WPSEO_Options::clear_cache(); + } + + $keys = array( + 'title-*', + 'metadesc-*', + 'bctitle-*', + 'breadcrumbs-sep', + 'breadcrumbs-home', + 'breadcrumbs-prefix', + 'breadcrumbs-archiveprefix', + 'breadcrumbs-searchprefix', + 'breadcrumbs-404crumb', + 'company_name', + 'rssbefore', + 'rssafter', + 'social-title-*', + 'social-description-*', + ); + + new PLL_Translate_Option( 'wpseo_titles', array_fill_keys( $keys, 1 ), array( 'context' => 'wordpress-seo' ) ); + + $keys = array( + 'og_frontpage_title', + 'og_frontpage_desc', + ); + + new PLL_Translate_Option( 'wpseo_social', array_fill_keys( $keys, 1 ), array( 'context' => 'wordpress-seo' ) ); + } + + /** + * Fixes the home url as well as the stylesheet url, + * only when using multiple domains or subdomains. + * + * @since 1.6.4 + * + * @param string $url The complete URL including scheme and path. + * @param string $path Path relative to the home URL. + * @return $url + */ + public function wpseo_home_url( $url, $path ) { + if ( empty( $path ) ) { + $path = ltrim( (string) wp_parse_url( pll_get_requested_url(), PHP_URL_PATH ), '/' ); + } + + if ( preg_match( '#sitemap(_index)?\.xml|([^\/]+?)-?sitemap([0-9]+)?\.xml|([a-z]+)?-?sitemap\.xsl#', $path ) ) { + $url = PLL()->links_model->switch_language_in_link( $url, PLL()->curlang ); + } + + return $url; + } + + /** + * Get active languages for the sitemaps + * + * @since 2.0 + * + * @return array list of active language slugs, empty if all languages are active + */ + protected function wpseo_get_active_languages() { + $languages = PLL()->model->get_languages_list(); + if ( wp_list_filter( $languages, array( 'active' => false ) ) ) { + return wp_list_pluck( wp_list_filter( $languages, array( 'active' => false ), 'NOT' ), 'slug' ); + } + return array(); + } + + /** + * Modifies the sql request for posts sitemaps. + * + * @since 1.6.4 + * + * @param string $sql JOIN clause. + * @param string $post_type Post type. + * @return string + */ + public function wpseo_posts_join( $sql, $post_type ) { + return pll_is_translated_post_type( $post_type ) ? $sql . PLL()->model->post->join_clause() : $sql; + } + + /** + * Modifies the sql request for posts sitemaps. + * + * @since 1.6.4 + * + * @param string $sql WHERE clause. + * @param string $post_type Post type. + * @return string + */ + public function wpseo_posts_where( $sql, $post_type ) { + if ( ! pll_is_translated_post_type( $post_type ) ) { + return $sql; + } + + if ( PLL()->options['force_lang'] > 1 && PLL()->curlang instanceof PLL_Language ) { + return $sql . PLL()->model->post->where_clause( PLL()->curlang ); + } + + $languages = $this->wpseo_get_active_languages(); + + if ( empty( $languages ) ) { // Empty when all languages are active. + $languages = pll_languages_list(); + } + + return $sql . PLL()->model->post->where_clause( $languages ); + } + + /** + * Removes the language filter (and remove inactive languages) for the taxonomy sitemaps + * Only when the language is set from the content or directory name + * + * @since 1.0.3 + * + * @param array $args get_terms arguments + * @return array modified list of arguments + */ + public function wpseo_remove_terms_filter( $args ) { + if ( isset( $GLOBALS['wp_query']->query['sitemap'] ) ) { + $args['lang'] = implode( ',', $this->wpseo_get_active_languages() ); + } + return $args; + } + + /** + * Deactivates the sitemap for inactive languages when using subdomains or multiple domains + * + * @since 2.6.1 + */ + public function maybe_deactivate_sitemap() { + global $wpseo_sitemaps; + + if ( isset( $wpseo_sitemaps ) ) { + $active_languages = $this->wpseo_get_active_languages(); + if ( ! empty( $active_languages ) && ! in_array( pll_current_language(), $active_languages ) ) { + remove_action( 'pre_get_posts', array( $wpseo_sitemaps, 'redirect' ), 1 ); + } + } + } + + /** + * Add filters before the sitemap is evaluated and outputted. + * + * @since 2.6 + * + * @param WP_Query $query Instance of WP_Query being filtered. + */ + public function before_sitemap( $query ) { + $type = $query->get( 'sitemap' ); + + // Add the post post type archives in all languages to the sitemap + // Add the homepages for all languages to the sitemap when the front page displays posts + if ( $type && pll_is_translated_post_type( $type ) && ( 'post' !== $type || ! get_option( 'page_on_front' ) ) ) { + add_filter( "wpseo_sitemap_{$type}_content", array( $this, 'add_post_type_archive' ) ); + } + } + + /** + * Generates a post type archive sitemap url + * + * @since 2.6.1 + * + * @param string $link The url. + * @param string $post_type The post type name. + * @return string Formatted sitemap url. + */ + protected function format_sitemap_url( $link, $post_type ) { + global $wpseo_sitemaps; + + return $wpseo_sitemaps->renderer->sitemap_url( + array( + 'loc' => $link, + 'mod' => WPSEO_Sitemaps::get_last_modified_gmt( $post_type ), + 'pri' => 1, + 'chf' => 'daily', + ) + ); + } + + /** + * Adds the home and post type archives urls for all (active) languages to the sitemap + * + * @since 2.6 + * + * @param string $str additional urls to sitemap post + * @return string + */ + public function add_post_type_archive( $str ) { + $post_type = substr( substr( current_filter(), 14 ), 0, -8 ); + $post_type_obj = get_post_type_object( $post_type ); + $languages = wp_list_filter( PLL()->model->get_languages_list(), array( 'active' => false ), 'NOT' ); + + if ( 'post' === $post_type ) { + if ( ! empty( PLL()->options['hide_default'] ) ) { + // The home url is of course already added by WPSEO. + $languages = wp_list_filter( $languages, array( 'slug' => pll_default_language() ), 'NOT' ); + } + + foreach ( $languages as $lang ) { + $str .= $this->format_sitemap_url( pll_home_url( $lang->slug ), $post_type ); + } + } elseif ( $post_type_obj->has_archive ) { + // Exclude cases where a post type archive is attached to a page (ex: WooCommerce). + $slug = ( true === $post_type_obj->has_archive ) ? $post_type_obj->rewrite['slug'] : $post_type_obj->has_archive; + + if ( ! wpcom_vip_get_page_by_path( $slug ) ) { + // The post type archive in the current language is already added by WPSEO. + $languages = wp_list_filter( $languages, array( 'slug' => pll_current_language() ), 'NOT' ); + + foreach ( $languages as $lang ) { + PLL()->curlang = $lang; // Switch the language to get the correct archive link. + $link = get_post_type_archive_link( $post_type ); + $str .= $this->format_sitemap_url( $link, $post_type ); + } + } + } + + return $str; + } + + /** + * Filters the home url. + * + * @since 1.1.2 + * + * @param array $arr The list of files or functions for which `home_url()` must be filtered. + * @return array + */ + public function wpseo_home_url_white_list( $arr ) { + return array_merge( $arr, array( array( 'file' => 'wordpress-seo' ) ) ); + } + + /** + * Get alternate language codes for Opengraph. + * + * @since 2.7.3 + * + * @return string[] + */ + protected function get_ogp_alternate_languages() { + $alternates = array(); + + foreach ( PLL()->model->get_languages_list() as $language ) { + if ( isset( PLL()->curlang ) && PLL()->curlang->slug !== $language->slug && PLL()->links->get_translation_url( $language ) && isset( $language->facebook ) ) { + $alternates[] = $language->facebook; + } + } + + // There is a risk that 2 languages have the same Facebook locale. So let's make sure to output each locale only once. + return array_unique( $alternates ); + } + + /** + * Adds opengraph support for translations + * + * @since 2.7.3 + * + * @param array $presenters An array of objects implementing Abstract_Indexable_Presenter + * @return array + */ + public function wpseo_frontend_presenters( $presenters ) { + $_presenters = array(); + + foreach ( $presenters as $presenter ) { + $_presenters[] = $presenter; + if ( $presenter instanceof Yoast\WP\SEO\Presenters\Open_Graph\Locale_Presenter ) { + foreach ( $this->get_ogp_alternate_languages() as $lang ) { + $_presenters[] = new PLL_WPSEO_OGP( $lang ); + } + } + } + return $_presenters; + } + + /** + * Fixes the canonical front page url as unlike WP, WPSEO does not add a trailing slash to the canonical front page url. + * + * @since 1.7.10 + * + * @param string $url The canonical URL evaluated by Yoast SEO. + * @return $url + */ + public function wpseo_canonical( $url ) { + return is_front_page( $url ) && get_option( 'permalink_structure' ) ? trailingslashit( $url ) : $url; + } + + /** + * Fixes the links and strings stored in the indexable table since Yoast SEO 14.0 + * + * @since 2.8.2 + * + * @param object $presentation The indexable presentation. + * @return object + */ + public function frontend_presentation( $presentation ) { + switch ( $presentation->model->object_type ) { + case 'home-page': + $presentation->model->title = WPSEO_Options::get( 'title-home-wpseo' ); + $presentation->model->description = WPSEO_Options::get( 'metadesc-home-wpseo' ); + $presentation->model->open_graph_title = WPSEO_Options::get( 'og_frontpage_title' ); + $presentation->model->open_graph_description = WPSEO_Options::get( 'og_frontpage_desc' ); + break; + + case 'post-type-archive': + if ( pll_is_translated_post_type( $presentation->model->object_sub_type ) ) { + $presentation->model->title = WPSEO_Options::get( 'title-ptarchive-' . $presentation->model->object_sub_type ); + $presentation->model->description = WPSEO_Options::get( 'metadesc-ptarchive-' . $presentation->model->object_sub_type ); + } + break; + + case 'system-page': + switch ( $presentation->model->object_sub_type ) { + case '404': + $presentation->model->title = WPSEO_Options::get( 'title-404-wpseo' ); + break; + case 'search-result': + $presentation->model->title = WPSEO_Options::get( 'title-search-wpseo' ); + break; + } + break; + } + + return $presentation; + } + + /** + * Fixes the breadcrumb links and strings stored in the indexable table since Yoast SEO 14.0. + * + * In version 17.0, the breadcrumb links do not honor the filter `wpseo_dynamic_permalinks_enabled`. + * + * @since 2.8.3 + * + * @param array $indexables An array of Indexable objects. + * @return array + */ + public function breadcrumb_indexables( $indexables ) { + foreach ( $indexables as &$indexable ) { + if ( 'home-page' === $indexable->object_type || ( 'post' === $indexable->object_type && 'page' === $indexable->object_sub_type && get_option( 'page_on_front' ) === $indexable->object_id ) ) { + // Handles both when the front page displays the list of posts or a static page. + $indexable->permalink = pll_home_url(); + $indexable->breadcrumb_title = pll__( WPSEO_Options::get( 'breadcrumbs-home' ) ); + } elseif ( 'post' === $indexable->object_type && 'page' === $indexable->object_sub_type && get_option( 'page_for_posts' ) === $indexable->object_id ) { + $indexable->permalink = get_permalink( $indexable->object_id ); + } elseif ( 'post-type-archive' === $indexable->object_type && pll_is_translated_post_type( $indexable->object_sub_type ) ) { + $indexable->permalink = get_post_type_archive_link( $indexable->object_sub_type ); + $breadcrumb_title = WPSEO_Options::get( 'bctitle-ptarchive-' . $indexable->object_sub_type ); + $breadcrumb_title = $breadcrumb_title ?: $indexable->breadcrumb_title; // The option may be empty. + $indexable->breadcrumb_title = pll__( $breadcrumb_title ); + } elseif ( 'term' === $indexable->object_type && pll_is_translated_taxonomy( $indexable->object_sub_type ) ) { + $indexable->permalink = get_term_link( $indexable->object_id ); + } + } + + return $indexables; + } + + /** + * Copies or synchronizes the metas. + * + * @since 2.3.3 + * + * @param string[] $keys List of custom fields names. + * @param bool $sync True if it is synchronization, false if it is a copy. + * @param int $from Id of the post from which we copy information. + * @param int $to Id of the post to which we paste information. + * @return array + */ + public function copy_post_metas( $keys, $sync, $from, $to ) { + if ( ! $sync ) { + // Text requiring translation. + $keys = array_merge( $keys, $this->get_translatable_meta_keys() ); + + // Copy the image urls. + $keys[] = '_yoast_wpseo_opengraph-image'; + $keys[] = '_yoast_wpseo_twitter-image'; + + $keys[] = '_yoast_wpseo_meta-robots-noindex'; + $keys[] = '_yoast_wpseo_meta-robots-nofollow'; + $keys[] = '_yoast_wpseo_meta-robots-adv'; + } + + $taxonomies = get_taxonomies( + array( + 'hierarchical' => true, + 'public' => true, + ) + ); + + $sync_taxonomies = PLL()->sync->taxonomies->get_taxonomies_to_copy( $sync, $from, $to ); + + $taxonomies = array_intersect( $taxonomies, $sync_taxonomies ); + + foreach ( $taxonomies as $taxonomy ) { + $keys[] = '_yoast_wpseo_primary_' . $taxonomy; + } + + return $keys; + } + + /** + * Translate the primary term during the synchronization process + * + * @since 2.3.3 + * + * @param int $value Meta value. + * @param string $key Meta key. + * @param string $lang Language of target. + * @return int + */ + public function translate_post_meta( $value, $key, $lang ) { + if ( 0 !== strpos( $key, '_yoast_wpseo_primary_' ) ) { + return $value; + } + + $taxonomy = str_replace( '_yoast_wpseo_primary_', '', $key ); + if ( ! PLL()->model->is_translated_taxonomy( $taxonomy ) ) { + return $value; + } + + return pll_get_term( $value, $lang ); + } + + /** + * Adds the yoast translatable metas to export. + * + * @param array $metas An array of post metas (keyed with meta keys) to export. + * @return array The modified array of post metas to export. + */ + public function export_post_metas( $metas ) { + $metas_to_export = array_fill_keys( $this->get_translatable_meta_keys(), 1 ); + + return array_merge( $metas, $metas_to_export ); + } + + /** + * Returns the meta keys with translatable text. + * + * @since 3.3 + * + * @return string[] + */ + protected function get_translatable_meta_keys() { + return array( + '_yoast_wpseo_title', + '_yoast_wpseo_metadesc', + '_yoast_wpseo_bctitle', + '_yoast_wpseo_focuskw', + '_yoast_wpseo_opengraph-title', + '_yoast_wpseo_opengraph-description', + '_yoast_wpseo_twitter-title', + '_yoast_wpseo_twitter-description', + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/yarpp/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/yarpp/load.php new file mode 100644 index 0000000..68d5484 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/yarpp/load.php @@ -0,0 +1,20 @@ +yarpp = new PLL_Yarpp(), 'init' ) ); + } + }, + 0 +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/yarpp/yarpp.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/yarpp/yarpp.php new file mode 100644 index 0000000..11e66d6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/integrations/yarpp/yarpp.php @@ -0,0 +1,20 @@ +yarpp_support = 1; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language-deprecated.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language-deprecated.php new file mode 100644 index 0000000..33e3964 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language-deprecated.php @@ -0,0 +1,255 @@ + array( 'language', 'term_taxonomy_id' ), + 'count' => array( 'language', 'count' ), + 'tl_term_id' => array( 'term_language', 'term_id' ), + 'tl_term_taxonomy_id' => array( 'term_language', 'term_taxonomy_id' ), + 'tl_count' => array( 'term_language', 'count' ), + ); + + /** + * List of deprecated URL properties and related getter to use. + * + * @private + * + * @var string[] + */ + public const DEPRECATED_URL_PROPERTIES = array( + 'home_url' => 'get_home_url', + 'search_url' => 'get_search_url', + ); + + /** + * Returns a language term property value (term ID, term taxonomy ID, or count). + * + * @since 3.4 + * + * @param string $taxonomy_name Name of the taxonomy. + * @param string $prop_name Name of the property: 'term_taxonomy_id', 'term_id', 'count'. + * @return int + * + * @phpstan-param non-empty-string $taxonomy_name + * @phpstan-param 'term_taxonomy_id'|'term_id'|'count' $prop_name + * @phpstan-return int<0, max> + */ + abstract public function get_tax_prop( $taxonomy_name, $prop_name ); + + /** + * Returns language's home URL. Takes care to render it dynamically if no cache is allowed. + * + * @since 3.4 + * + * @return string Language home URL. + * + * @phpstan-return non-empty-string + */ + abstract public function get_home_url(); + + /** + * Returns language's search URL. Takes care to render it dynamically if no cache is allowed. + * + * @since 3.4 + * + * @return string Language search URL. + * + * @phpstan-return non-empty-string + */ + abstract public function get_search_url(); + + /** + * Throws a depreciation notice if someone tries to get one of the following properties: + * `term_taxonomy_id`, `count`, `tl_term_id`, `tl_term_taxonomy_id` or `tl_count`. + * + * Backward compatibility with Polylang < 3.4. + * + * @since 3.4 + * + * @param string $property Property to get. + * @return mixed Required property value. + */ + public function __get( $property ) { + // Deprecated property. + if ( $this->is_deprecated_term_property( $property ) ) { + $this->deprecated_property( + $property, + sprintf( + "get_tax_prop( '%s', '%s' )", + self::DEPRECATED_TERM_PROPERTIES[ $property ][0], + self::DEPRECATED_TERM_PROPERTIES[ $property ][1] + ) + ); + + return $this->get_deprecated_term_property( $property ); + } + + if ( $this->is_deprecated_url_property( $property ) ) { + $this->deprecated_property( $property, "get_{$property}()" ); + + return $this->get_deprecated_url_property( $property ); + } + + // Undefined property. + if ( ! property_exists( $this, $property ) ) { + return null; + } + + // The property is defined. + $ref = new ReflectionProperty( $this, $property ); + + // Public property. + if ( $ref->isPublic() ) { + return $this->{$property}; + } + + // Protected or private property. + $visibility = $ref->isPrivate() ? 'private' : 'protected'; + $trace = debug_backtrace(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection, WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace + $file = $trace[0]['file'] ?? ''; + $line = $trace[0]['line'] ?? 0; + trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error + esc_html( + sprintf( + "Cannot access %s property %s::$%s in %s on line %d.\nError handler", + $visibility, + get_class( $this ), + $property, + $file, + $line + ) + ) + ); + } + + /** + * Checks for a deprecated property. + * Is triggered by calling `isset()` or `empty()` on inaccessible (protected or private) or non-existing properties. + * + * Backward compatibility with Polylang < 3.4. + * + * @since 3.4 + * + * @param string $property A property name. + * @return bool + */ + public function __isset( $property ) { + return $this->is_deprecated_term_property( $property ) || $this->is_deprecated_url_property( $property ); + } + + /** + * Tells if the given term property is deprecated. + * + * @since 3.4 + * @see PLL_Language::DEPRECATED_TERM_PROPERTIES for the list of deprecated properties. + * + * @param string $property A property name. + * @return bool + * + * @phpstan-assert-if-true key-of $property + */ + protected function is_deprecated_term_property( $property ) { + return array_key_exists( $property, self::DEPRECATED_TERM_PROPERTIES ); + } + + /** + * Returns a deprecated term property's value. + * + * @since 3.4 + * @see PLL_Language::DEPRECATED_TERM_PROPERTIES for the list of deprecated properties. + * + * @param string $property A property name. + * @return int + * + * @phpstan-param key-of $property + * @phpstan-return int<0, max> + */ + protected function get_deprecated_term_property( $property ) { + return $this->get_tax_prop( + self::DEPRECATED_TERM_PROPERTIES[ $property ][0], + self::DEPRECATED_TERM_PROPERTIES[ $property ][1] + ); + } + + /** + * Tells if the given URL property is deprecated. + * + * @since 3.4 + * @see PLL_Language::DEPRECATED_URL_PROPERTIES for the list of deprecated properties. + * + * @param string $property A property name. + * @return bool + * + * @phpstan-assert-if-true key-of $property + */ + protected function is_deprecated_url_property( $property ) { + return array_key_exists( $property, self::DEPRECATED_URL_PROPERTIES ); + } + + /** + * Returns a deprecated URL property's value. + * + * @since 3.4 + * @see PLL_Language::DEPRECATED_URL_PROPERTIES for the list of deprecated properties. + * + * @param string $property A property name. + * @return string + * + * @phpstan-param key-of $property + * @phpstan-return non-empty-string + */ + protected function get_deprecated_url_property( $property ) { + return $this->{self::DEPRECATED_URL_PROPERTIES[ $property ]}(); + } + + /** + * Triggers a deprecated an error for a deprecated property. + * + * @since 3.4 + * + * @param string $property Deprecated property name. + * @param string $replacement Method or property name to use instead. + * @return void + */ + private function deprecated_property( $property, $replacement ) { + /** + * Filters whether to trigger an error for deprecated properties. + * + * The filter name is intentionally not prefixed to use the same as WordPress + * in case it is added in the future. + * + * @since 3.4 + * + * @param bool $trigger Whether to trigger the error for deprecated properties. Default true. + */ + if ( ! WP_DEBUG || ! apply_filters( 'deprecated_property_trigger_error', true ) ) { + return; + } + + trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error + sprintf( + "Class property %1\$s::\$%2\$s is deprecated, use %1\$s::%3\$s instead.\nError handler", + esc_html( get_class( $this ) ), + esc_html( $property ), + esc_html( $replacement ) + ), + E_USER_DEPRECATED + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language-factory.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language-factory.php new file mode 100644 index 0000000..1ec2e63 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language-factory.php @@ -0,0 +1,341 @@ +> + */ + private static $languages; + + /** + * Polylang's options. + * + * @var Options + */ + private $options; + + /** + * Constructor. + * + * @since 3.4 + * @since 3.7 The `$options` parameter is an instance of `Options`. + * + * @param Options $options Poylang's options. + * @return void + */ + public function __construct( Options $options ) { + $this->options = $options; + } + + /** + * Returns a language object matching the given data, looking up in cached transient. + * + * @since 3.4 + * + * @param array $language_data Language object properties stored as an array. See `PLL_Language::__construct()` + * for information on accepted properties. + * + * @return PLL_Language A language object if given data pass sanitization. + * + * @phpstan-param LanguageData $language_data + */ + public function get( $language_data ) { + return new PLL_Language( $this->sanitize_data( $language_data ) ); + } + + /** + * Returns a language object based on terms. + * + * @since 3.4 + * + * @param WP_Term[] $terms List of language terms, with the language taxonomy names as array keys. + * `language` is a mandatory key for the object to be created, + * `term_language` should be too in a fully operational environment. + * @return PLL_Language|null Language object on success, `null` on failure. + * + * @phpstan-param array{language?:WP_Term}&array $terms + */ + public function get_from_terms( array $terms ) { + if ( ! isset( $terms['language'] ) ) { + return null; + } + + $languages = $this->get_languages(); + $data = array( + 'name' => $terms['language']->name, + 'slug' => $terms['language']->slug, + 'term_group' => $terms['language']->term_group, + 'term_props' => array(), + 'is_default' => $this->options['default_lang'] === $terms['language']->slug, + ); + + foreach ( $terms as $term ) { + $data['term_props'][ $term->taxonomy ] = array( + 'term_id' => $term->term_id, + 'term_taxonomy_id' => $term->term_taxonomy_id, + 'count' => $term->count, + ); + } + + // The description fields can contain any property. + $description = maybe_unserialize( $terms['language']->description ); + + if ( is_array( $description ) ) { + $description = array_intersect_key( + $description, + array( 'locale' => null, 'rtl' => null, 'flag_code' => null, 'active' => null, 'fallbacks' => null ) + ); + + foreach ( $description as $prop => $value ) { + if ( 'rtl' === $prop ) { + $data['is_rtl'] = $value; + } else { + $data[ $prop ] = $value; + } + } + } + + if ( ! empty( $data['locale'] ) ) { + if ( isset( $languages[ $data['locale'] ]['w3c'] ) ) { + $data['w3c'] = $languages[ $data['locale'] ]['w3c']; + } else { + $data['w3c'] = str_replace( '_', '-', $data['locale'] ); + } + + if ( isset( $languages[ $data['locale'] ]['facebook'] ) ) { + $data['facebook'] = $languages[ $data['locale'] ]['facebook']; + } + } + + $flag_props = $this->get_flag( $data['flag_code'], $data['name'], $data['slug'], $data['locale'] ); + $data = array_merge( $data, $flag_props ); + + $additional_data = array(); + /** + * Filters additional data to add to the language before it is created. + * + * `home_url`, `search_url`, `page_on_front` and `page_for_posts` are only allowed. + * + * @since 3.4 + * + * @param array $additional_data. + * @param array $data Language data. + * + * @phpstan-param array $additional_data + * @phpstan-param non-empty-array $data + */ + $additional_data = apply_filters( 'pll_additional_language_data', $additional_data, $data ); + + $allowed_additional_data = array( + 'home_url' => '', + 'search_url' => '', + 'page_on_front' => 0, + 'page_for_posts' => 0, + ); + + $data = array_merge( $data, array_intersect_key( $additional_data, $allowed_additional_data ) ); + + return new PLL_Language( $this->sanitize_data( $data ) ); + } + + /** + * Sanitizes data, to be ready to be used in the constructor. + * This doesn't verify that the language terms exist. + * + * @since 3.4 + * + * @param array $data Data to process. See `PLL_Language::__construct()` for information on accepted data. + * @return array Sanitized Data. + * + * @phpstan-return LanguageData + */ + private function sanitize_data( array $data ) { + foreach ( $data['term_props'] as $tax => $props ) { + $data['term_props'][ $tax ] = array_map( 'absint', $props ); + } + + $data['is_rtl'] = ! empty( $data['is_rtl'] ) ? 1 : 0; + + $positive_fields = array( 'term_group', 'page_on_front', 'page_for_posts' ); + + foreach ( $positive_fields as $field ) { + $data[ $field ] = ! empty( $data[ $field ] ) ? absint( $data[ $field ] ) : 0; + } + + $data['active'] = isset( $data['active'] ) ? (bool) $data['active'] : true; + + if ( array_key_exists( 'fallbacks', $data ) && ! is_array( $data['fallbacks'] ) ) { + unset( $data['fallbacks'] ); + } + + /** + * @var LanguageData + */ + return $data; + } + + /** + * Returns predefined languages data. + * + * @since 3.4 + * + * @return array[] + * + * @phpstan-return array> + */ + private function get_languages() { + if ( empty( self::$languages ) ) { + self::$languages = include POLYLANG_DIR . '/src/settings/languages.php'; + } + + return self::$languages; + } + + + /** + * Creates flag_url and flag language properties. Also takes care of custom flag. + * + * @since 1.2 + * @since 3.4 Moved from `PLL_Language`to `PLL_Language_Factory` and renamed + * in favor of `get_flag()` (formerly `set_flag()`). + * + * @param string $flag_code Flag code. + * @param string $name Language name. + * @param string $slug Language slug. + * @param string $locale Language locale. + * @return array { + * Array of the flag properties. + * @type string $flag_url URL of the flag. + * @type string $flag HTML markup of the flag. + * @type string $custom_flag_url Optional. URL of the custom flag if it exists. + * @type string $custom_flag Optional. HTML markup of the custom flag if it exists. + * } + * + * @phpstan-return array{ + * flag_url: string, + * flag: string, + * custom_flag_url?: non-empty-string, + * custom_flag?: non-empty-string + * } + */ + private function get_flag( $flag_code, $name, $slug, $locale ) { + $flags = array( + 'flag' => PLL_Language::get_flag_information( $flag_code ), + ); + + // Custom flags? + $directories = array( + PLL_LOCAL_DIR, + get_stylesheet_directory() . '/polylang', + get_template_directory() . '/polylang', + ); + + foreach ( $directories as $dir ) { + if ( is_readable( $file = "{$dir}/{$locale}.png" ) || is_readable( $file = "{$dir}/{$locale}.jpg" ) || is_readable( $file = "{$dir}/{$locale}.jpeg" ) || is_readable( $file = "{$dir}/{$locale}.svg" ) ) { + $flags['custom_flag'] = array( + 'url' => content_url( '/' . str_replace( WP_CONTENT_DIR, '', $file ) ), + ); + break; + } + } + + /** + * Filters the custom flag information. + * + * @since 2.4 + * + * @param array|null $flag { + * Information about the custom flag. + * + * @type string $url Flag url. + * @type string $src Optional, src attribute value if different of the url, for example if base64 encoded. + * @type int $width Optional, flag width in pixels. + * @type int $height Optional, flag height in pixels. + * } + * @param string $code Flag code. + */ + $flags['custom_flag'] = apply_filters( 'pll_custom_flag', empty( $flags['custom_flag'] ) ? null : $flags['custom_flag'], $flag_code ); + + if ( ! empty( $flags['custom_flag']['url'] ) ) { + if ( empty( $flags['custom_flag']['src'] ) ) { + $flags['custom_flag']['src'] = esc_url( set_url_scheme( $flags['custom_flag']['url'], 'relative' ) ); + } + + $flags['custom_flag']['url'] = sanitize_url( $flags['custom_flag']['url'] ); + } else { + unset( $flags['custom_flag'] ); + } + + /** + * Filters the flag title attribute. + * Defaults to the language name. + * + * @since 0.7 + * + * @param string $title The flag title attribute. + * @param string $slug The language code. + * @param string $locale The language locale. + */ + $title = apply_filters( 'pll_flag_title', $name, $slug, $locale ); + $return = array(); + + /** + * @var array{ + * flag: array{ + * url: string, + * src: string, + * width?: positive-int, + * height?: positive-int + * }, + * custom_flag?: array{ + * url: non-empty-string, + * src: non-empty-string, + * width?: positive-int, + * height?: positive-int + * } + * } $flags + */ + foreach ( $flags as $key => $flag ) { + $return[ "{$key}_url" ] = $flag['url']; + + /** + * Filters the html markup of a flag. + * + * @since 1.0.2 + * + * @param string $flag Html markup of the flag or empty string. + * @param string $slug Language code. + */ + $return[ $key ] = apply_filters( + 'pll_get_flag', + PLL_Language::get_flag_html( $flag, $title, $name ), + $slug + ); + } + + /** + * @var array{ + * flag_url: string, + * flag: string, + * custom_flag_url?: non-empty-string, + * custom_flag?: non-empty-string + * } $return + */ + return $return; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language.php new file mode 100644 index 0000000..1e498dd --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/language.php @@ -0,0 +1,670 @@ + + * } + * @phpstan-type LanguageData array{ + * term_props: array{ + * language: LanguagePropData, + * }&array, + * name: non-empty-string, + * slug: non-empty-string, + * locale: non-empty-string, + * w3c: non-empty-string, + * flag_code: non-empty-string, + * term_group: int, + * is_rtl: int<0, 1>, + * facebook?: string, + * home_url: non-empty-string, + * search_url: non-empty-string, + * host: non-empty-string, + * flag_url: non-empty-string, + * flag: non-empty-string, + * custom_flag_url?: string, + * custom_flag?: string, + * page_on_front: int<0, max>, + * page_for_posts: int<0, max>, + * active: bool, + * fallbacks?: array, + * is_default: bool + * } + */ +class PLL_Language extends PLL_Language_Deprecated { + + /** + * Language name. Ex: English. + * + * @var string + * + * @phpstan-var non-empty-string + */ + public $name; + + /** + * Language code used in URL. Ex: en. + * + * @var string + * + * @phpstan-var non-empty-string + */ + public $slug; + + /** + * Order of the language when displayed in a list of languages. + * + * @var int + */ + public $term_group; + + /** + * ID of the term in 'language' taxonomy. + * Duplicated from `$this->term_props['language']['term_id'], + * but kept to facilitate the use of it. + * + * @var int + * + * @phpstan-var int<1, max> + */ + public $term_id; + + /** + * WordPress language locale. Ex: en_US. + * + * @var string + * + * @phpstan-var non-empty-string + */ + public $locale; + + /** + * 1 if the language is rtl, 0 otherwise. + * + * @var int + * + * @phpstan-var int<0, 1> + */ + public $is_rtl; + + /** + * W3C locale. + * + * @var string + * + * @phpstan-var non-empty-string + */ + public $w3c; + + /** + * Facebook locale. + * + * @var string + */ + public $facebook = ''; + + /** + * Home URL in this language. + * + * @var string + * + * @phpstan-var non-empty-string + */ + private $home_url; + + /** + * Home URL to use in search forms. + * + * @var string + * + * @phpstan-var non-empty-string + */ + private $search_url; + + /** + * Host corresponding to this language. + * + * @var string + * + * @phpstan-var non-empty-string + */ + public $host; + + /** + * ID of the page on front in this language (set from pll_additional_language_data filter). + * + * @var int + * + * @phpstan-var int<0, max> + */ + public $page_on_front = 0; + + /** + * ID of the page for posts in this language (set from pll_additional_language_data filter). + * + * @var int + * + * @phpstan-var int<0, max> + */ + public $page_for_posts = 0; + + /** + * Code of the flag. + * + * @var string + * + * @phpstan-var non-empty-string + */ + public $flag_code; + + /** + * URL of the flag. Always set to the main domain. + * + * @var string + * + * @phpstan-var non-empty-string + */ + public $flag_url; + + /** + * HTML markup of the flag. + * + * @var string + * + * @phpstan-var non-empty-string + */ + public $flag; + + /** + * URL of the custom flag if it exists. Always set to the main domain. + * + * @var string + */ + public $custom_flag_url = ''; + + /** + * HTML markup of the custom flag if it exists. + * + * @var string + */ + public $custom_flag = ''; + + /** + * Whether or not the language is active. Default `true`. + * + * @var bool + */ + public $active = true; + + /** + * List of WordPress language locales. Ex: array( 'en_GB' ). + * + * @var string[] + * + * @phpstan-var list + */ + public $fallbacks = array(); + + /** + * Whether the language is the default one. + * + * @var bool + */ + public $is_default; + + /** + * Stores language term properties (like term IDs and counts) for each language taxonomy (`language`, + * `term_language`, etc). + * This stores the values of the properties `$term_id` + `$term_taxonomy_id` + `$count` (`language`), `$tl_term_id` + * + `$tl_term_taxonomy_id` + `$tl_count` (`term_language`), and the `term_id` + `term_taxonomy_id` + `count` for + * other language taxonomies. + * + * @var array[] Array keys are language term names. + * + * @example array( + * 'language' => array( + * 'term_id' => 7, + * 'term_taxonomy_id' => 8, + * 'count' => 11, + * ), + * 'term_language' => array( + * 'term_id' => 11, + * 'term_taxonomy_id' => 12, + * 'count' => 6, + * ), + * 'foo_language' => array( + * 'term_id' => 33, + * 'term_taxonomy_id' => 34, + * 'count' => 0, + * ), + * ) + * + * @phpstan-var array{ + * language: LanguagePropData, + * } + * &array + */ + protected $term_props; + + /** + * Constructor: builds a language object given the corresponding data. + * + * @since 1.2 + * @since 3.4 Only accepts one argument. + * + * @param array $language_data { + * Language object properties stored as an array. + * + * @type array[] $term_props An array of language term properties. Array keys are language taxonomy names + * (`language` and `term_language` are mandatory), array values are arrays of + * language term properties (`term_id`, `term_taxonomy_id`, and `count`). + * @type string $name Language name. Ex: English. + * @type string $slug Language code used in URL. Ex: en. + * @type string $locale WordPress language locale. Ex: en_US. + * @type string $w3c W3C locale. + * @type string $flag_code Code of the flag. + * @type int $term_group Order of the language when displayed in a list of languages. + * @type int $is_rtl `1` if the language is rtl, `0` otherwise. + * @type string $facebook Optional. Facebook locale. + * @type string $home_url Home URL in this language. + * @type string $search_url Home URL to use in search forms. + * @type string $host Host corresponding to this language. + * @type string $flag_url URL of the flag. + * @type string $flag HTML markup of the flag. + * @type string $custom_flag_url Optional. URL of the custom flag if it exists. + * @type string $custom_flag Optional. HTML markup of the custom flag if it exists. + * @type int $page_on_front Optional. ID of the page on front in this language. + * @type int $page_for_posts Optional. ID of the page for posts in this language. + * @type bool $active Whether or not the language is active. Default `true`. + * @type string[] $fallbacks List of WordPress language locales. Ex: array( 'en_GB' ). + * @type bool $is_default Whether or not the language is the default one. + * } + * + * @phpstan-param LanguageData $language_data + */ + public function __construct( array $language_data ) { + foreach ( $language_data as $prop => $value ) { + $this->$prop = $value; + } + + $this->term_id = $this->term_props['language']['term_id']; + } + + /** + * Returns a language term property value (term ID, term taxonomy ID, or count). + * + * @since 3.4 + * + * @param string $taxonomy_name Name of the taxonomy. + * @param string $prop_name Name of the property: 'term_taxonomy_id', 'term_id', 'count'. + * @return int + * + * @phpstan-param non-empty-string $taxonomy_name + * @phpstan-param 'term_taxonomy_id'|'term_id'|'count' $prop_name + * @phpstan-return int<0, max> + */ + public function get_tax_prop( $taxonomy_name, $prop_name ) { + return $this->term_props[ $taxonomy_name ][ $prop_name ] ?? 0; + } + + /** + * Returns the language term props for all content types. + * + * @since 3.4 + * + * @param string $property Name of the field to return. An empty string to return them all. + * @return (int[]|int)[] Array keys are taxonomy names, array values depend of `$property`. + * + * @phpstan-param 'term_taxonomy_id'|'term_id'|'count'|'' $property + * @phpstan-return array : + * positive-int + * ) : + * LanguagePropData + * )> + */ + public function get_tax_props( $property = '' ) { + if ( empty( $property ) ) { + return $this->term_props; + } + + $term_props = array(); + + foreach ( $this->term_props as $taxonomy_name => $props ) { + $term_props[ $taxonomy_name ] = $props[ $property ]; + } + + return $term_props; + } + + /** + * Returns the flag information. + * + * @since 2.6 + * + * @param string $code Flag code. + * @return array { + * Flag information. + * + * @type string $url Flag url. + * @type string $src Optional, src attribute value if different of the url, for example if base64 encoded. + * @type int $width Optional, flag width in pixels. + * @type int $height Optional, flag height in pixels. + * } + * + * @phpstan-return array{ + * url: string, + * src: string, + * width?: positive-int, + * height?: positive-int + * } + */ + public static function get_flag_information( $code ) { + $default_flag = array( + 'url' => '', + 'src' => '', + ); + + // Polylang builtin flags. + if ( ! empty( $code ) && is_readable( POLYLANG_DIR . ( $file = '/flags/' . $code . '.png' ) ) ) { + $default_flag['url'] = plugins_url( $file, POLYLANG_FILE ); + + // If base64 encoded flags are preferred. + if ( pll_get_constant( 'PLL_ENCODED_FLAGS', true ) ) { + $imagesize = getimagesize( POLYLANG_DIR . $file ); + if ( is_array( $imagesize ) ) { + list( $default_flag['width'], $default_flag['height'] ) = $imagesize; + } + $file_contents = file_get_contents( POLYLANG_DIR . $file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents + $default_flag['src'] = 'data:image/png;base64,' . base64_encode( $file_contents ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode + } + } + + /** + * Filters flag information: + * + * @since 2.4 + * + * @param array $flag { + * Information about the flag. + * + * @type string $url Flag url. + * @type string $src Optional, src attribute value if different of the url, for example if base64 encoded. + * @type int $width Optional, flag width in pixels. + * @type int $height Optional, flag height in pixels. + * } + * @param string $code Flag code. + */ + $flag = apply_filters( 'pll_flag', $default_flag, $code ); + + $flag['url'] = sanitize_url( $flag['url'] ); + + if ( empty( $flag['src'] ) || ( $flag['src'] === $default_flag['src'] && $flag['url'] !== $default_flag['url'] ) ) { + $flag['src'] = esc_url( set_url_scheme( $flag['url'], 'relative' ) ); + } + + return $flag; + } + + /** + * Returns HTML code for flag. + * + * @since 2.7 + * + * @param array $flag Flag properties: src, width and height. + * @param string $title Optional title attribute. + * @param string $alt Optional alt attribute. + * @return string + * + * @phpstan-param array{ + * src: string, + * width?: int|numeric-string, + * height?: int|numeric-string + * } $flag + */ + public static function get_flag_html( $flag, $title = '', $alt = '' ) { + if ( empty( $flag['src'] ) ) { + return ''; + } + + $alt_attr = empty( $alt ) ? '' : sprintf( ' alt="%s"', esc_attr( $alt ) ); + $width_attr = empty( $flag['width'] ) ? '' : sprintf( ' width="%s"', (int) $flag['width'] ); + $height_attr = empty( $flag['height'] ) ? '' : sprintf( ' height="%s"', (int) $flag['height'] ); + + $style = ''; + $sizes = array_intersect_key( $flag, array_flip( array( 'width', 'height' ) ) ); + + if ( ! empty( $sizes ) ) { + array_walk( + $sizes, + function ( &$value, $key ) { + $value = sprintf( '%s: %dpx;', esc_attr( $key ), (int) $value ); + } + ); + $style = sprintf( ' style="%s"', implode( ' ', $sizes ) ); + } + + return sprintf( + '', + $flag['src'], + $alt_attr, + $width_attr, + $height_attr, + $style + ); + } + + /** + * Returns the html of the custom flag if any, or the default flag otherwise. + * + * @since 2.8 + * @since 3.5.3 Added the `$alt` parameter. + * + * @param string $alt Whether or not the alternative text should be set. Accepts 'alt' and 'no-alt'. + * + * @return string + * + * @phpstan-param 'alt'|'no-alt' $alt + */ + public function get_display_flag( $alt = 'alt' ) { + $flag = empty( $this->custom_flag ) ? $this->flag : $this->custom_flag; + + if ( 'alt' === $alt ) { + return $flag; + } + + return (string) preg_replace( '/(?<=\salt=\")([^"]+)(?=\")/', '', $flag ); + } + + /** + * Returns the url of the custom flag if any, or the default flag otherwise. + * + * @since 2.8 + * + * @return string + */ + public function get_display_flag_url() { + $flag_url = empty( $this->custom_flag_url ) ? $this->flag_url : $this->custom_flag_url; + + /** + * Filters `flag_url` property. + * + * @since 3.4.4 + * + * @param string $flag_url Flag URL. + * @param PLL_Language $language Current `PLL_language` instance. + */ + return apply_filters( 'pll_language_flag_url', $flag_url, $this ); + } + + /** + * Updates post and term count. + * + * @since 1.2 + * + * @return void + */ + public function update_count() { + foreach ( $this->term_props as $taxonomy => $props ) { + wp_update_term_count( $props['term_taxonomy_id'], $taxonomy ); + } + } + + /** + * Returns the language locale. + * Converts WP locales to W3C valid locales for display. + * + * @since 1.8 + * + * @param string $filter Either 'display' or 'raw', defaults to raw. + * @return string + * + * @phpstan-param 'display'|'raw' $filter + * @phpstan-return non-empty-string + */ + public function get_locale( $filter = 'raw' ) { + return 'display' === $filter ? $this->w3c : $this->locale; + } + + /** + * Returns the values of this instance's properties, which can be filtered if required. + * + * @since 3.4 + * + * @param string $context Whether or not properties should be filtered. Accepts `db` or `display`. + * Default to `display` which filters some properties. + * + * @return array Array of language object properties. + * + * @phpstan-return LanguageData + */ + public function to_array( $context = 'display' ) { + $language = get_object_vars( $this ); + + if ( 'db' !== $context ) { + $language['home_url'] = $this->get_home_url(); + $language['search_url'] = $this->get_search_url(); + } + + /** @phpstan-var LanguageData $language */ + return $language; + } + + /** + * Converts current `PLL_language` into a `stdClass` object. Mostly used to allow dynamic properties. + * + * @since 3.4 + * + * @return stdClass Converted `PLL_Language` object. + */ + public function to_std_class() { + return (object) $this->to_array(); + } + + /** + * Returns a predefined HTML flag. + * + * @since 3.4 + * + * @param string $flag_code Flag code to render. + * @return string HTML code for the flag. + */ + public static function get_predefined_flag( $flag_code ) { + $flag = self::get_flag_information( $flag_code ); + + return self::get_flag_html( $flag ); + } + + /** + * Returns language's home URL. Takes care to render it dynamically if no cache is allowed. + * + * @since 3.4 + * + * @return string Language home URL. + */ + public function get_home_url() { + if ( ! pll_get_constant( 'PLL_CACHE_LANGUAGES', true ) || ! pll_get_constant( 'PLL_CACHE_HOME_URL', true ) ) { + /** + * Filters current `PLL_Language` instance `home_url` property. + * + * @since 3.4.4 + * + * @param string $home_url The `home_url` prop. + * @param array $language Current Array of `PLL_Language` properties. + */ + return apply_filters( 'pll_language_home_url', $this->home_url, $this->to_array( 'db' ) ); + } + + return $this->home_url; + } + + /** + * Returns language's search URL. Takes care to render it dynamically if no cache is allowed. + * + * @since 3.4 + * + * @return string Language search URL. + */ + public function get_search_url() { + if ( ! pll_get_constant( 'PLL_CACHE_LANGUAGES', true ) || ! pll_get_constant( 'PLL_CACHE_HOME_URL', true ) ) { + /** + * Filters current `PLL_Language` instance `search_url` property. + * + * @since 3.4.4 + * + * @param string $search_url The `search_url` prop. + * @param array $language Current Array of `PLL_Language` properties. + */ + return apply_filters( 'pll_language_search_url', $this->search_url, $this->to_array( 'db' ) ); + } + + return $this->search_url; + } + + /** + * Returns the value of a language property. + * This is handy to get a property's value without worrying about triggering a deprecation warning or anything. + * + * @since 3.4 + * + * @param string $property A property name. A composite value can be used for language term property values, in the + * form of `{language_taxonomy_name}:{property_name}` (see {@see PLL_Language::get_tax_prop()} + * for the possible values). Ex: `term_language:term_taxonomy_id`. + * @return string|int|bool|string[] The requested property for the language, `false` if the property doesn't exist. + * + * @phpstan-return ( + * $property is 'slug' ? non-empty-string : string|int|bool|list + * ) + */ + public function get_prop( $property ) { + // Deprecated property. + if ( $this->is_deprecated_term_property( $property ) ) { + return $this->get_deprecated_term_property( $property ); + } + + if ( $this->is_deprecated_url_property( $property ) ) { + return $this->get_deprecated_url_property( $property ); + } + + // Composite property like 'term_language:term_taxonomy_id'. + if ( preg_match( '/^(?.{1,32}):(?term_id|term_taxonomy_id|count)$/', $property, $matches ) ) { + /** @var array{tax:non-empty-string, field:'term_id'|'term_taxonomy_id'|'count'} $matches */ + return $this->get_tax_prop( $matches['tax'], $matches['field'] ); + } + + return $this->$property ?? false; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/license.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/license.php new file mode 100644 index 0000000..ca54b64 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/license.php @@ -0,0 +1,366 @@ +id = sanitize_title( $item_name ); + $this->file = $file; + $this->name = $item_name; + $this->version = $version; + $this->author = $author; + $this->api_url = empty( $api_url ) ? $this->api_url : $api_url; + + $licenses = (array) get_option( 'polylang_licenses', array() ); + $license = isset( $licenses[ $this->id ] ) && is_array( $licenses[ $this->id ] ) ? $licenses[ $this->id ] : array(); + $this->license_key = ! empty( $license['key'] ) ? (string) $license['key'] : ''; + + if ( ! empty( $license['data'] ) ) { + $this->license_data = (object) $license['data']; + } + + // Updater + $this->auto_updater(); + + // Register settings + add_filter( 'pll_settings_licenses', array( $this, 'settings' ) ); + + // Weekly schedule + if ( ! wp_next_scheduled( 'polylang_check_licenses' ) ) { + wp_schedule_event( time(), 'weekly', 'polylang_check_licenses' ); + } + + add_action( 'polylang_check_licenses', array( $this, 'check_license' ) ); + } + + /** + * Auto updater + * + * @since 1.9 + * + * @return void + */ + public function auto_updater() { + $args = array( + 'version' => $this->version, + 'license' => $this->license_key, + 'author' => $this->author, + 'item_name' => $this->name, + ); + + // Setup the updater + new PLL_Plugin_Updater( $this->api_url, $this->file, $args ); + } + + /** + * Registers the licence in the Settings. + * + * @since 1.9 + * + * @param PLL_License[] $items Array of objects allowing to manage a license. + * @return PLL_License[] + */ + public function settings( $items ) { + $items[ $this->id ] = $this; + return $items; + } + + /** + * Activates the license key. + * + * @since 1.9 + * + * @param string $license_key Activation key. + * @return PLL_License Updated PLL_License object. + */ + public function activate_license( + #[\SensitiveParameter] // phpcs:ignore PHPCompatibility.Attributes.NewAttributes.PHPNativeAttributeFound + string $license_key + ): self { + $this->license_key = $license_key; + $this->api_request( 'activate_license' ); + + // Tell WordPress to look for updates. + delete_site_transient( 'update_plugins' ); + return $this; + } + + + /** + * Deactivates the license key. + * + * @since 1.9 + * + * @return PLL_License Updated PLL_License object. + */ + public function deactivate_license() { + $this->api_request( 'deactivate_license' ); + return $this; + } + + /** + * Checks if the license key is valid. + * + * @since 1.9 + * + * @return void + */ + public function check_license() { + $this->api_request( 'check_license' ); + } + + /** + * Sends an api request to check, activate or deactivate the license + * Updates the licenses option according to the status + * + * @since 1.9 + * + * @param string $request check_license | activate_license | deactivate_license + * @return void + */ + private function api_request( $request ) { + $licenses = get_option( 'polylang_licenses' ); + + if ( is_array( $licenses ) ) { + unset( $licenses[ $this->id ] ); + } else { + $licenses = array(); + } + unset( $this->license_data ); + + if ( ! empty( $this->license_key ) ) { + // Data to send in our API request + $api_params = array( + 'edd_action' => $request, + 'license' => $this->license_key, + 'item_name' => urlencode( $this->name ), + 'url' => home_url(), + ); + + // Call the API + $response = wp_remote_post( + $this->api_url, + array( + 'timeout' => 3, + 'sslverify' => false, + 'body' => $api_params, + ) + ); + + // Update the option only if we got a response + if ( is_wp_error( $response ) ) { + return; + } + + // Save new license info + $licenses[ $this->id ] = array( 'key' => $this->license_key ); + $data = (object) json_decode( wp_remote_retrieve_body( $response ) ); + + if ( isset( $data->license ) && 'deactivated' !== $data->license ) { + $licenses[ $this->id ]['data'] = $data; + $this->license_data = $data; + } + } + + update_option( 'polylang_licenses', $licenses ); // FIXME called multiple times when saving all licenses + } + + /** + * Get the html form field in a table row (one per license key) for display + * + * @since 2.7 + * + * @return string + */ + public function get_form_field() { + if ( ! empty( $this->license_data ) ) { + $license = $this->license_data; + } + + $class = 'license-null'; + $message = ''; + + $out = sprintf( + '' . + '', + esc_attr( $this->id ), + esc_attr( $this->name ), + esc_html( $this->license_key ) + ); + + if ( ! empty( $license ) && is_object( $license ) ) { + $now = time(); + $expiration = isset( $license->expires ) ? strtotime( $license->expires ) : false; + + // Special case: the license expired after the last check + if ( $license->success && $expiration && $expiration < $now ) { + $license->success = false; + $license->error = 'expired'; + } + + if ( false === $license->success ) { + $class = 'notice-error notice-alt'; + + switch ( $license->error ) { + case 'expired': + $message = sprintf( + /* translators: %1$s is a date, %2$s is link start tag, %3$s is link end tag. */ + esc_html__( 'Your license key expired on %1$s. Please %2$srenew your license key%3$s.', 'polylang' ), + esc_html( date_i18n( get_option( 'date_format' ), $expiration ) ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + break; + + case 'disabled': + case 'revoked': + $message = esc_html__( 'Your license key has been disabled.', 'polylang' ); + break; + + case 'missing': + $message = sprintf( + /* translators: %1$s is link start tag, %2$s is link end tag. */ + esc_html__( 'Invalid license. Please %1$svisit your account page%2$s and verify it.', 'polylang' ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + break; + + case 'invalid': + case 'site_inactive': + $message = sprintf( + /* translators: %1$s is a product name, %2$s is link start tag, %3$s is link end tag. */ + esc_html__( 'Your %1$s license key is not active for this URL. Please %2$svisit your account page%3$s to manage your license key URLs.', 'polylang' ), + esc_html( $this->name ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + break; + + case 'item_name_mismatch': + /* translators: %s is a product name */ + $message = sprintf( esc_html__( 'This is not a %s license key.', 'polylang' ), esc_html( $this->name ) ); + break; + + case 'no_activations_left': + $message = sprintf( + /* translators: %1$s is link start tag, %2$s is link end tag */ + esc_html__( 'Your license key has reached its activation limit. %1$sView possible upgrades%2$s now.', 'polylang' ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + break; + } + } else { + $class = 'license-valid'; + + $out .= sprintf( '', esc_attr( $this->id ), esc_html__( 'Deactivate', 'polylang' ) ); + + if ( 'lifetime' === $license->expires ) { + $message = esc_html__( 'The license key never expires.', 'polylang' ); + } elseif ( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) { + $class = 'notice-warning notice-alt'; + $message = sprintf( + /* translators: %1$s is a date, %2$s is link start tag, %3$s is link end tag. */ + esc_html__( 'Your license key will expire soon! Precisely, it will expire on %1$s. %2$sRenew your license key today!%3$s', 'polylang' ), + esc_html( date_i18n( get_option( 'date_format' ), $expiration ) ), + sprintf( '', self::ACCOUNT_URL ), + '' + ); + } else { + $message = sprintf( + /* translators: %s is a date */ + esc_html__( 'Your license key expires on %s.', 'polylang' ), + esc_html( date_i18n( get_option( 'date_format' ), $expiration ) ) + ); + } + } + } + + if ( ! empty( $message ) ) { + $out .= '

    ' . $message . '

    '; + } + + return sprintf( '%s', esc_attr( $this->id ), $class, $out ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-abstract-domain.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-abstract-domain.php new file mode 100644 index 0000000..d17fa5e --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-abstract-domain.php @@ -0,0 +1,114 @@ +get_hosts() ); + + return is_string( $lang ) ? $lang : ''; + } + + /** + * Modifies an url to use the domain associated to the current language. + * + * @since 1.8 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + public function site_url( $url ) { + $lang = $this->get_language_from_url(); + + $lang = $this->model->get_language( $lang ); + + return $this->add_language_to_link( $url, $lang ); + } + + /** + * Fixes the domain for the upload directory. + * + * @since 2.0.6 + * + * @param array $uploads Array of information about the upload directory. @see wp_upload_dir(). + * @return array + */ + public function upload_dir( $uploads ) { + $lang = $this->get_language_from_url(); + $lang = $this->model->get_language( $lang ); + $uploads['url'] = $this->add_language_to_link( $uploads['url'], $lang ); + $uploads['baseurl'] = $this->add_language_to_link( $uploads['baseurl'], $lang ); + return $uploads; + } + + /** + * Adds home and search URLs to language data before the object is created. + * + * @since 3.4.1 + * + * @param array $additional_data Array of language additional data. + * @param array $language Language data. + * @return array Language data with home and search URLs added. + */ + public function set_language_home_urls( $additional_data, $language ) { + $language = array_merge( $language, $additional_data ); + $additional_data['search_url'] = $this->home_url( $language['slug'] ); + $additional_data['home_url'] = $additional_data['search_url']; + return $additional_data; + } + + /** + * Returns language home URL property according to the current domain. + * + * @since 3.4.4 + * + * @param string $url Home URL. + * @param array $language Array of language props. + * @return string Filtered home URL. + */ + public function set_language_home_url( $url, $language ) { + return $this->home_url( $language['slug'] ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-default.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-default.php new file mode 100644 index 0000000..687715f --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-default.php @@ -0,0 +1,116 @@ +slug; + } + + return empty( $language ) || ( $this->options['hide_default'] && $this->options['default_lang'] === $language ) ? $url : add_query_arg( 'lang', $language, $url ); + } + + /** + * Removes the language information from an url. + * + * @since 1.2 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + public function remove_language_from_link( $url ) { + return remove_query_arg( 'lang', $url ); + } + + /** + * Returns the link to the first page. + * + * @since 1.2 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + public function remove_paged_from_link( $url ) { + return remove_query_arg( 'paged', $url ); + } + + /** + * Returns the link to the paged page. + * + * @since 1.5 + * + * @param string $url The url to modify. + * @param int $page The page number. + * @return string The modified url. + */ + public function add_paged_to_link( $url, $page ) { + return add_query_arg( array( 'paged' => $page ), $url ); + } + + /** + * Gets the language slug from the url if present. + * + * @since 1.2 + * @since 2.0 Add the $url argument. + * + * @param string $url Optional, defaults to the current url. + * @return string Language slug. + */ + public function get_language_from_url( $url = '' ) { + if ( empty( $url ) ) { + $url = pll_get_requested_url(); + } + + $pattern = sprintf( + '#[?&]lang=(?%s)(?:$|&)#', + implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) + ); + return preg_match( $pattern, $url, $matches ) ? $matches['lang'] : ''; // $matches['lang'] is the slug of the requested language. + } + + /** + * Returns the static front page url in the given language. + * + * @since 1.8 + * @since 3.4 Accepts now an array of language properties. + * + * @param PLL_Language|array $language Language object or array of language properties. + * @return string The static front page url. + */ + public function front_page_url( $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->to_array(); + } + + if ( $this->options['hide_default'] && $language['is_default'] ) { + return trailingslashit( $this->home ); + } + $url = home_url( '/?page_id=' . $language['page_on_front'] ); + return $this->options['force_lang'] ? $this->add_language_to_link( $url, $language['slug'] ) : $url; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-directory.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-directory.php new file mode 100644 index 0000000..9f89fd1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-directory.php @@ -0,0 +1,292 @@ +home_relative = home_url( '/', 'relative' ); + } + + /** + * Adds hooks for rewrite rules. + * + * @since 1.6 + * + * @return void + */ + public function init() { + add_action( 'pll_prepare_rewrite_rules', array( $this, 'prepare_rewrite_rules' ) ); // Ensure it's hooked before `self::do_prepare_rewrite_rules()` is called. + + parent::init(); + } + + /** + * Adds the language code in a url. + * + * @since 1.2 + * @since 3.4 Accepts now a language slug. + * + * @param string $url The url to modify. + * @param PLL_Language|string|false $language Language object or slug. + * @return string The modified url. + */ + public function add_language_to_link( $url, $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->slug; + } + + if ( ! empty( $language ) ) { + $base = $this->options['rewrite'] ? '' : 'language/'; + $slug = $this->options['default_lang'] === $language && $this->options['hide_default'] ? '' : $base . $language . '/'; + $root = ( false === strpos( $url, '://' ) ) ? $this->home_relative . $this->root : preg_replace( '#^https?://#', '://', $this->home . '/' . $this->root ); + + if ( false === strpos( $url, $new = $root . $slug ) ) { + $pattern = preg_quote( $root, '#' ); + $pattern = '#' . $pattern . '#'; + return preg_replace( $pattern, $new, $url, 1 ); // Only once. + } + } + return $url; + } + + /** + * Returns the url without the language code. + * + * @since 1.2 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + public function remove_language_from_link( $url ) { + $languages = $this->model->languages + ->filter( $this->options['hide_default'] ? 'hide_default' : '' ) + ->get_list( array( 'fields' => 'slug' ) ); + + if ( ! empty( $languages ) ) { + $root = ( false === strpos( $url, '://' ) ) ? $this->home_relative . $this->root : preg_replace( '#^https?://#', '://', $this->home . '/' . $this->root ); + + $pattern = preg_quote( $root, '@' ); + $pattern = '@' . $pattern . ( $this->options['rewrite'] ? '' : 'language/' ) . '(' . implode( '|', $languages ) . ')(([?#])|(/|$))@'; + $url = preg_replace( $pattern, $root . '$3', $url ); + } + return $url; + } + + /** + * Returns the language based on the language code in the url. + * + * @since 1.2 + * @since 2.0 Add the $url argument. + * + * @param string $url Optional, defaults to the current url. + * @return string The language slug. + */ + public function get_language_from_url( $url = '' ) { + if ( empty( $url ) ) { + $url = pll_get_requested_url(); + } + + $path = (string) wp_parse_url( $url, PHP_URL_PATH ); + $root = ( false === strpos( $url, '://' ) ) ? $this->home_relative . $this->root : $this->home . '/' . $this->root; + + $pattern = (string) wp_parse_url( $root . ( $this->options['rewrite'] ? '' : 'language/' ), PHP_URL_PATH ); + $pattern = preg_quote( $pattern, '#' ); + $pattern = '#^' . $pattern . '(' . implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) . ')(/|$)#'; + return preg_match( $pattern, trailingslashit( $path ), $matches ) ? $matches[1] : ''; // $matches[1] is the slug of the requested language. + } + + /** + * Returns the home url in a given language. + * + * @since 1.3.1 + * @since 3.4 Accepts now a language slug. + * + * @param PLL_Language|string $language Language object or slug. + * @return string + */ + public function home_url( $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->slug; + } + + $base = $this->options['rewrite'] ? '' : 'language/'; + $slug = $this->options['default_lang'] === $language && $this->options['hide_default'] ? '' : '/' . $this->root . $base . $language; + return trailingslashit( $this->home . $slug ); + } + + /** + * Prepares the rewrite rules filters. + * + * @since 0.8.1 + * @since 3.5 Hooked to `pll_prepare_rewrite_rules` and remove `$pre` parameter. + * + * @return void + */ + public function prepare_rewrite_rules() { + /* + * Don't modify the rules if there is no languages created yet and make sure + * to add the filters only once and if all custom post types and taxonomies + * have been registered. + */ + if ( ! $this->model->has_languages() || ! did_action( 'wp_loaded' ) || ! self::$can_filter_rewrite_rules ) { + return; + } + + foreach ( $this->get_rewrite_rules_filters_with_callbacks() as $rule => $callback ) { + add_filter( $rule, $callback ); + } + } + + /** + * The rewrite rules ! + * + * Always make sure that the default language is at the end in case the language information is hidden for default language. + * Thanks to brbrbr http://wordpress.org/support/topic/plugin-polylang-rewrite-rules-not-correct. + * + * @since 0.8.1 + * + * @param string[] $rules Rewrite rules. + * @return string[] Modified rewrite rules. + */ + public function rewrite_rules( $rules ) { + $filter = str_replace( '_rewrite_rules', '', (string) current_filter() ); + + global $wp_rewrite; + $newrules = array(); + + $languages = $this->model->get_languages_list( array( 'fields' => 'slug' ) ); + if ( $this->options['hide_default'] ) { + $languages = array_diff( $languages, array( $this->options['default_lang'] ) ); + } + + if ( ! empty( $languages ) ) { + $slug = $wp_rewrite->root . ( $this->options['rewrite'] ? '' : 'language/' ) . '(' . implode( '|', $languages ) . ')/'; + } + + // For custom post type archives. + $cpts = array_intersect( $this->model->get_translated_post_types(), get_post_types( array( '_builtin' => false ) ) ); + $cpts = $cpts ? '#post_type=(' . implode( '|', $cpts ) . ')#' : ''; + + foreach ( $rules as $key => $rule ) { + if ( ! is_string( $rule ) || ! is_string( $key ) ) { + // Protection against a bug in Sendinblue for WooCommerce. See: https://wordpress.org/support/topic/bug-introduced-in-rewrite-rules/ + continue; + } + + // Special case for translated post types and taxonomies to allow canonical redirection. + if ( $this->options['force_lang'] && in_array( $filter, array_merge( $this->model->get_translated_post_types(), $this->model->get_translated_taxonomies() ) ) ) { + + /** + * Filters the rewrite rules to modify. + * + * @since 1.9.1 + * + * @param bool $modify Whether to modify or not the rule, defaults to true. + * @param array $rule Original rewrite rule. + * @param string $filter Current set of rules being modified. + * @param string|bool $archive Custom post post type archive name or false if it is not a cpt archive. + */ + if ( isset( $slug ) && apply_filters( 'pll_modify_rewrite_rule', true, array( $key => $rule ), $filter, false ) ) { + $newrules[ $slug . str_replace( $wp_rewrite->root, '', ltrim( $key, '^' ) ) ] = str_replace( + array( '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '[1]', '?' ), + array( '[9]', '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '?lang=$matches[1]&' ), + $rule + ); // Should be enough! + } + + $newrules[ $key ] = $rule; + } + + // Rewrite rules filtered by language. + elseif ( in_array( $filter, $this->always_rewrite ) || in_array( $filter, $this->model->get_filtered_taxonomies() ) || ( $cpts && preg_match( $cpts, $rule, $matches ) && ! strpos( $rule, 'name=' ) ) || ( 'rewrite_rules_array' != $filter && $this->options['force_lang'] ) ) { + + /** This filter is documented in src/links-directory.php */ + if ( apply_filters( 'pll_modify_rewrite_rule', true, array( $key => $rule ), $filter, empty( $matches[1] ) ? false : $matches[1] ) ) { + if ( isset( $slug ) ) { + $newrules[ $slug . str_replace( $wp_rewrite->root, '', ltrim( $key, '^' ) ) ] = str_replace( + array( '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '[1]', '?' ), + array( '[9]', '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '?lang=$matches[1]&' ), + $rule + ); // Should be enough! + } + + if ( $this->options['hide_default'] ) { + $newrules[ $key ] = str_replace( '?', '?lang=' . $this->options['default_lang'] . '&', $rule ); + } + } else { + $newrules[ $key ] = $rule; + } + } + + // Unmodified rules. + else { + $newrules[ $key ] = $rule; + } + } + + // The home rewrite rule. + if ( 'root' == $filter && isset( $slug ) ) { + $newrules[ $slug . '?$' ] = $wp_rewrite->index . '?lang=$matches[1]'; + } + + return $newrules; + } + + /** + * Removes hooks to filter rewrite rules, called when switching blog @see {PLL_Base::switch_blog()}. + * See `self::prepare_rewrite_rules()` for added hooks. + * + * @since 3.5 + * + * @return void + */ + public function remove_filters() { + parent::remove_filters(); + + foreach ( $this->get_rewrite_rules_filters_with_callbacks() as $rule => $callback ) { + remove_filter( $rule, $callback ); + } + } + + /** + * Returns *all* rewrite rules filters with their associated callbacks. + * + * @since 3.5 + * + * @return callable[] Array of hook names as key and callbacks as values. + */ + protected function get_rewrite_rules_filters_with_callbacks() { + $filters = array( + 'rewrite_rules_array' => array( $this, 'rewrite_rules' ), // Needed for post type archives. + ); + + foreach ( $this->get_rewrite_rules_filters() as $type ) { + $filters[ $type . '_rewrite_rules' ] = array( $this, 'rewrite_rules' ); + } + + return $filters; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-domain.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-domain.php new file mode 100644 index 0000000..44ead99 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-domain.php @@ -0,0 +1,117 @@ +hosts = $this->get_hosts(); + + // Filters the site url (mainly to get the correct login form). + add_filter( 'site_url', array( $this, 'site_url' ) ); + } + + + /** + * Switches the primary domain to a secondary domain in the url. + * + * @since 1.2 + * @since 3.4 Accepts now a language slug. + * + * @param string $url The url to modify. + * @param PLL_Language|string|false $language Language object or slug. + * @return string The modified url. + */ + public function add_language_to_link( $url, $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->slug; + } + + if ( ! empty( $language ) && ! empty( $this->hosts[ $language ] ) ) { + $url = preg_replace( '#://(' . wp_parse_url( $this->home, PHP_URL_HOST ) . ')($|/.*)#', '://' . $this->hosts[ $language ] . '$2', $url ); + } + return $url; + } + + /** + * Returns the url with the primary domain. + * + * @since 1.2 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + public function remove_language_from_link( $url ) { + if ( ! empty( $this->hosts ) ) { + $url = preg_replace( '#://(' . implode( '|', $this->hosts ) . ')($|/.*)#', '://' . wp_parse_url( $this->home, PHP_URL_HOST ) . '$2', $url ); + } + return $url; + } + + /** + * Returns the home url in a given language. + * + * @since 1.3.1 + * @since 3.4 Accepts now a language slug. + * + * @param PLL_Language|string $language Language object or slug. + * @return string + */ + public function home_url( $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->slug; + } + + return trailingslashit( empty( $this->options['domains'][ $language ] ) ? $this->home : $this->options['domains'][ $language ] ); + } + + /** + * Get the hosts managed on the website. + * + * @since 1.5 + * + * @return string[] List of hosts. + */ + public function get_hosts() { + $hosts = array(); + foreach ( (array) $this->options['domains'] as $lang => $domain ) { + $host = wp_parse_url( $domain, PHP_URL_HOST ); + + if ( ! is_string( $host ) ) { + continue; + } + + // The function idn_to_ascii() is much faster than the WordPress method. + if ( function_exists( 'idn_to_ascii' ) && defined( 'INTL_IDNA_VARIANT_UTS46' ) ) { + $hosts[ $lang ] = (string) idn_to_ascii( $host, 0, INTL_IDNA_VARIANT_UTS46 ); + } else { + $hosts[ $lang ] = \WpOrg\Requests\IdnaEncoder::encode( $host ); // Since WP 6.2. + } + } + + return $hosts; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-model.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-model.php new file mode 100644 index 0000000..dca3136 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-model.php @@ -0,0 +1,264 @@ +model = &$model; + $this->options = $model->options; + + $this->home = home_url(); + + // Hooked with normal priority because it needs to be run after static pages is set in language data. Must be done early (before languages objects are created). + add_filter( 'pll_additional_language_data', array( $this, 'set_language_home_urls' ), 10, 2 ); + + // Adds our domains or subdomains to allowed hosts for safe redirection. + add_filter( 'allowed_redirect_hosts', array( $this, 'allowed_redirect_hosts' ) ); + + // Allows secondary domains for home and search URLs in `PLL_Language`. + add_filter( 'pll_language_home_url', array( $this, 'set_language_home_url' ), 10, 2 ); + add_filter( 'pll_language_search_url', array( $this, 'set_language_search_url' ), 10, 2 ); + + if ( did_action( 'pll_init' ) ) { + $this->init(); + } else { + add_action( 'pll_init', array( $this, 'init' ) ); + } + } + + /** + * Initializes the links model. + * Does nothing by default. + * + * @since 3.5 + * + * @return void + */ + public function init() {} + + /** + * Adds the language code in url. + * + * @since 1.2 + * @since 3.4 Accepts now a language slug. + * + * @param string $url The url to modify. + * @param PLL_Language|string|false $lang Language object or slug. + * @return string The modified url. + */ + abstract public function add_language_to_link( $url, $lang ); + + /** + * Returns the url without language code. + * + * @since 1.2 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + abstract public function remove_language_from_link( $url ); + + /** + * Returns the link to the first page. + * + * @since 1.2 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + abstract public function remove_paged_from_link( $url ); + + /** + * Returns the link to a paged page. + * + * @since 1.5 + * + * @param string $url The url to modify. + * @param int $page The page number. + * @return string The modified url. + */ + abstract public function add_paged_to_link( $url, $page ); + + /** + * Returns the language based on the language code in the url. + * + * @since 1.2 + * @since 2.0 Add the $url argument. + * + * @param string $url Optional, defaults to the current url. + * @return string The language slug. + */ + abstract public function get_language_from_url( $url = '' ); + + /** + * Returns the static front page url in a given language. + * + * @since 1.8 + * @since 3.4 Accepts now an array of language properties. + * + * @param PLL_Language|array $language Language object or array of language properties. + * @return string The static front page url. + */ + abstract public function front_page_url( $language ); + + /** + * Changes the language code in url. + * + * @since 1.5 + * + * @param string $url The url to modify. + * @param PLL_Language $lang The language object. + * @return string The modified url. + */ + public function switch_language_in_link( $url, $lang ) { + $url = $this->remove_language_from_link( $url ); + return $this->add_language_to_link( $url, $lang ); + } + + /** + * Get the hosts managed on the website. + * + * @since 1.5 + * + * @return string[] The list of hosts. + */ + public function get_hosts() { + return array( wp_parse_url( $this->home, PHP_URL_HOST ) ); + } + + /** + * Returns the home url in a given language. + * + * @since 1.3.1 + * @since 3.4 Accepts now a language slug. + * + * @param PLL_Language|string $language Language object or slug. + * @return string + */ + public function home_url( $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->slug; + } + + $url = trailingslashit( $this->home ); + + return $this->options['hide_default'] && $language === $this->options['default_lang'] ? $url : $this->add_language_to_link( $url, $language ); + } + + /** + * Adds home and search URLs to language data before the object is created. + * + * @since 3.4 + * + * @param array $additional_data Array of language additional data. + * @param array $language Language data. + * @return array Language data with home and search URLs added. + */ + public function set_language_home_urls( $additional_data, $language ) { + $language = array_merge( $language, $additional_data ); + $additional_data['search_url'] = $this->set_language_search_url( '', $language ); + $additional_data['home_url'] = $this->set_language_home_url( '', $language ); + + return $additional_data; + } + + /** + * Adds our domains or subdomains to allowed hosts for safe redirect. + * + * @since 1.4.3 + * + * @param string[] $hosts Allowed hosts. + * @return string[] Modified list of allowed hosts. + */ + public function allowed_redirect_hosts( $hosts ) { + return array_unique( array_merge( $hosts, array_values( $this->get_hosts() ) ) ); + } + + /** + * Returns language home URL property according to the current domain. + * + * @since 3.4.4 + * + * @param string $url Home URL. + * @param array $language Array of language props. + * @return string Filtered home URL. + */ + public function set_language_home_url( $url, $language ) { + if ( empty( $language['page_on_front'] ) || $this->options['redirect_lang'] ) { + return $this->home_url( $language['slug'] ); + } + + return $this->front_page_url( $language ); + } + + /** + * Returns language search URL property according to the current domain. + * + * @since 3.4.4 + * + * @param string $url Search URL. + * @param array $language Array of language props. + * @return string Filtered search URL. + */ + public function set_language_search_url( $url, $language ) { + return $this->home_url( $language['slug'] ); + } + + /** + * Used to remove hooks in child classes, called when switching blog @see {PLL_Base::switch_blog()}. + * Does nothing by default. + * + * @since 3.5 + * + * @return void + */ + public function remove_filters() { + self::$can_filter_rewrite_rules = false; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-permalinks.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-permalinks.php new file mode 100644 index 0000000..c79f9dd --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-permalinks.php @@ -0,0 +1,219 @@ +root = preg_match( '#^/*' . $this->index . '#', $permalink_structure ) ? $this->index . '/' : ''; + $this->use_trailing_slashes = ( '/' == substr( $permalink_structure, -1, 1 ) ); + } + + /** + * Initializes permalinks. + * + * @since 3.5 + * + * @return void + */ + public function init() { + parent::init(); + + if ( did_action( 'wp_loaded' ) ) { + $this->do_prepare_rewrite_rules(); + } else { + add_action( 'wp_loaded', array( $this, 'do_prepare_rewrite_rules' ), 9 ); // Just before WordPress callback `WP_Rewrite::flush_rules()`. + } + } + + /** + * Fires our own action telling Polylang plugins + * and third parties are able to prepare rewrite rules. + * + * @since 3.5 + * + * @return void + */ + public function do_prepare_rewrite_rules() { + self::$can_filter_rewrite_rules = true; + + /** + * Tells when Polylang is able to prepare rewrite rules filters. + * Action fired right after `wp_loaded` and just before WordPress `WP_Rewrite::flush_rules()` callback. + * + * @since 3.5 + * + * @param PLL_Links_Permalinks $links Current links object. + */ + do_action( 'pll_prepare_rewrite_rules', $this ); + } + + /** + * Returns the link to the first page when using pretty permalinks. + * + * @since 1.2 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + public function remove_paged_from_link( $url ) { + /** + * Filters an url after the paged part has been removed. + * + * @since 2.0.6 + * + * @param string $modified_url The link to the first page. + * @param string $original_url The link to the original paged page. + */ + return apply_filters( 'pll_remove_paged_from_link', preg_replace( '#/page/[0-9]+/?#', $this->use_trailing_slashes ? '/' : '', $url ), $url ); + } + + /** + * Returns the link to the paged page when using pretty permalinks. + * + * @since 1.5 + * + * @param string $url The url to modify. + * @param int $page The page number. + * @return string The modified url. + */ + public function add_paged_to_link( $url, $page ) { + /** + * Filters an url after the paged part has been added. + * + * @since 2.0.6 + * + * @param string $modified_url The link to the paged page. + * @param string $original_url The link to the original first page. + * @param int $page The page number. + */ + return apply_filters( 'pll_add_paged_to_link', user_trailingslashit( trailingslashit( $url ) . 'page/' . $page, 'paged' ), $url, $page ); + } + + /** + * Returns the home url in a given language. + * + * @since 1.3.1 + * @since 3.4 Accepts now a language slug. + * + * @param PLL_Language|string $language Language object or slug. + * @return string + */ + public function home_url( $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->slug; + } + + return trailingslashit( parent::home_url( $language ) ); + } + + /** + * Returns the static front page url. + * + * @since 1.8 + * @since 3.4 Accepts now an array of language properties. + * + * @param PLL_Language|array $language Language object or array of language properties. + * @return string The static front page url. + */ + public function front_page_url( $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->to_array(); + } + + if ( $this->options['hide_default'] && $language['is_default'] ) { + return trailingslashit( $this->home ); + } + $url = home_url( $this->root . get_page_uri( $language['page_on_front'] ) ); + $url = $this->use_trailing_slashes ? trailingslashit( $url ) : untrailingslashit( $url ); + return $this->options['force_lang'] ? $this->add_language_to_link( $url, $language['slug'] ) : $url; + } + + /** + * Prepares rewrite rules filters. + * + * @since 1.6 + * + * @return string[] + */ + public function get_rewrite_rules_filters() { + // Make sure that we have the right post types and taxonomies. + $types = array_values( array_merge( $this->model->get_translated_post_types(), $this->model->get_translated_taxonomies(), $this->model->get_filtered_taxonomies() ) ); + $types = array_merge( $this->always_rewrite, $types ); + + /** + * Filters the list of rewrite rules filters to be used by Polylang. + * + * @since 0.8.1 + * + * @param array $types The list of filters (without '_rewrite_rules' at the end). + */ + return apply_filters( 'pll_rewrite_rules', $types ); + } + + /** + * Removes hooks to filter rewrite rules, called when switching blog @see {PLL_Base::switch_blog()}. + * + * @since 3.5 + * + * @return void + */ + public function remove_filters() { + parent::remove_filters(); + + remove_all_actions( 'pll_prepare_rewrite_rules' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-subdomain.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-subdomain.php new file mode 100644 index 0000000..0ef2636 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links-subdomain.php @@ -0,0 +1,89 @@ +www = ( false === strpos( $this->home, '://www.' ) ) ? '://' : '://www.'; + } + + /** + * Adds the language code in a url. + * + * @since 1.2 + * @since 3.4 Accepts now a language slug. + * + * @param string $url The url to modify. + * @param PLL_Language|string|false $language Language object or slug. + * @return string The modified url. + */ + public function add_language_to_link( $url, $language ) { + if ( $language instanceof PLL_Language ) { + $language = $language->slug; + } + + if ( ! empty( $language ) && false === strpos( $url, '://' . $language . '.' ) ) { + $url = $this->options['default_lang'] === $language && $this->options['hide_default'] ? $url : str_replace( $this->www, '://' . $language . '.', $url ); + } + return $url; + } + + /** + * Returns the url without the language code. + * + * @since 1.2 + * + * @param string $url The url to modify. + * @return string The modified url. + */ + public function remove_language_from_link( $url ) { + $languages = $this->model->languages + ->filter( $this->options['hide_default'] ? 'hide_default' : '' ) + ->get_list( array( 'fields' => 'slug' ) ); + + if ( ! empty( $languages ) ) { + $url = preg_replace( '#://(' . implode( '|', $languages ) . ')\.#', $this->www, $url ); + } + + return $url; + } + + /** + * Get the hosts managed on the website. + * + * @since 1.5 + * + * @return string[] The list of hosts. + */ + public function get_hosts() { + $hosts = array(); + foreach ( $this->model->get_languages_list() as $lang ) { + $host = wp_parse_url( $this->home_url( $lang ), PHP_URL_HOST ); + $hosts[ $lang->slug ] = $host ?: ''; + } + return $hosts; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links.php new file mode 100644 index 0000000..b190120 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/links.php @@ -0,0 +1,72 @@ +links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = $polylang->options; + } + + /** + * Returns the home url in the requested language. + * + * @since 1.3 + * + * @param PLL_Language|string $language The language. + * @param bool $is_search Optional, whether we need the home url for a search form, defaults to false. + * @return string + */ + public function get_home_url( $language, $is_search = false ) { + if ( ! $language instanceof PLL_Language ) { + $language = $this->model->get_language( $language ); + } + + if ( empty( $language ) ) { + return home_url( '/' ); + } + + return $is_search ? $language->get_search_url() : $language->get_home_url(); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/mo.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/mo.php new file mode 100644 index 0000000..3d1fe98 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/mo.php @@ -0,0 +1,131 @@ + + */ + private static $cache; + + /** + * Constructor, initializes the cache if not already done. + * + * @since 3.7 + */ + public function __construct() { + if ( empty( self::$cache ) ) { + self::$cache = new PLL_Cache(); + } + } + + /** + * Writes the strings into a term meta. + * + * @since 1.2 + * + * @param PLL_Language $lang The language in which we want to export strings. + * @return void + */ + public function export_to_db( $lang ) { + /* + * It would be convenient to store the whole object, but it would take a huge space in DB. + * So let's keep only the strings in an array. + * The strings are slashed to avoid breaking slashed strings in update_term_meta. + * @see https://codex.wordpress.org/Function_Reference/update_post_meta#Character_Escaping. + */ + $strings = array(); + foreach ( $this->entries as $entry ) { + if ( '' !== $entry->singular ) { + $strings[] = wp_slash( array( $entry->singular, $this->translate( $entry->singular ) ) ); + } + } + + update_term_meta( $lang->term_id, '_pll_strings_translations', $strings ); + + self::$cache->clean( $lang->slug ); + } + + /** + * Reads a PLL_MO object from the term meta. + * + * @since 1.2 + * @since 3.4 Reads a PLL_MO from the term meta. + * + * @param PLL_Language $lang The language in which we want to get strings. + * @return void + */ + public function import_from_db( $lang ) { + $this->set_header( 'Language', $lang->slug ); + + if ( ! empty( self::$cache->get( $lang->slug ) ) ) { + $this->entries = self::$cache->get( $lang->slug ); + return; + } + + $strings = get_term_meta( $lang->term_id, '_pll_strings_translations', true ); + if ( empty( $strings ) || ! is_array( $strings ) ) { + self::$cache->set( $lang->slug, array() ); + return; + } + + foreach ( $strings as $msg ) { + if ( '' === $msg[0] || '' === $msg[1] ) { + continue; + } + + $entry = $this->make_entry( $msg[0], $msg[1] ); + + if ( '' !== $entry->singular ) { + $this->add_entry( $entry ); + } + } + + self::$cache->set( $lang->slug, $this->entries ); + } + + /** + * Deletes a string + * + * @since 2.9 + * + * @param string $string The source string to remove from the translations. + * @return void + */ + public function delete_entry( $string ) { + unset( $this->entries[ $string ] ); + } + + /** + * Translates a string or returns false if the translation is not found. + * Contrary to `self::translate()`, this method doesn't fallback to the source string but returns empty string instead. + * + * @since 3.7 + * + * @param string $source The source string to translate. + * @return string The translated string or empty string if not found. + */ + public function translate_if_any( string $source ) { + $entry = new Translation_Entry( array( 'singular' => $source ) ); + $entry = $this->translate_entry( $entry ); + + if ( ! $entry instanceof Translation_Entry || empty( $entry->translations ) ) { + return ''; + } + + return $entry->translations[0]; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/model.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/model.php new file mode 100644 index 0000000..5b2f987 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/model.php @@ -0,0 +1,616 @@ + + */ + public $cache; + + /** + * Stores the plugin options. + * + * @var Options + */ + public $options; + + /** + * Translatable objects registry. + * + * @since 3.4 + * + * @var PLL_Translatable_Objects + */ + public $translatable_objects; + + /** + * Translated post model. + * + * @var PLL_Translated_Post + */ + public $post; + + /** + * Translated term model. + * + * @var PLL_Translated_Term + */ + public $term; + + /** + * Model for the languages. + * + * @var Model\Languages + */ + public $languages; + + /** + * Model for taxonomies translated by Polylang. + * + * @var Model\Post_Types + */ + public $post_types; + + /** + * Model for taxonomies filtered/translated by Polylang. + * + * @var Model\Taxonomies + */ + public $taxonomies; + + /** + * Constructor. + * Setups translated objects sub models. + * Setups filters and actions. + * + * @since 1.2 + * @since 3.7 Type of parameter `$options` changed from `array` to `Options`. + * + * @param Options $options Polylang options. + */ + public function __construct( Options $options ) { + $this->options = $options; + $this->cache = new PLL_Cache(); + $this->translatable_objects = new PLL_Translatable_Objects(); + $this->languages = new Model\Languages( $this->options, $this->translatable_objects, $this->cache ); + + $this->languages->register_proxy( new Model\Hide_Empty() ); + $this->languages->register_proxy( new Model\Hide_Default() ); + + $this->post = $this->translatable_objects->register( new PLL_Translated_Post( $this ) ); // Translated post sub model. + $this->term = $this->translatable_objects->register( new PLL_Translated_Term( $this ) ); // Translated term sub model. + + $this->post_types = new Model\Post_Types( $this->post ); + $this->taxonomies = new Model\Taxonomies( $this->term ); + + // We need to clean languages cache when editing a language and when modifying the permalink structure. + add_action( 'edited_term_taxonomy', array( $this, 'clean_languages_cache' ), 10, 2 ); + add_action( 'update_option_permalink_structure', array( $this, 'clean_languages_cache' ) ); + add_action( 'update_option_siteurl', array( $this, 'clean_languages_cache' ) ); + add_action( 'update_option_home', array( $this, 'clean_languages_cache' ) ); + + add_filter( 'get_terms_args', array( $this, 'get_terms_args' ) ); + + // Just in case someone would like to display the language description ;). + add_filter( 'language_description', '__return_empty_string' ); + + add_action( 'delete_transient_' . Model\Languages::TRANSIENT_NAME, array( $this->languages, 'delete_transient_from_options_table' ) ); + } + + /** + * Backward compatibility for methods that have been moved to sub-models. + * + * @since 3.7 + * + * @throws BadMethodCallException If the method is not found. + * + * @param string $name Name of the method being called. + * @param array $arguments Enumerated array containing the parameters passed to the $name'ed method. + * @return mixed + */ + public function __call( string $name, array $arguments ) { + $methods = array( + // Languages. + 'has_languages' => array( $this->languages, 'has' ), + 'get_languages_list' => array( $this->languages, 'get_list' ), + 'are_languages_ready' => array( $this->languages, 'are_ready' ), + 'set_languages_ready' => array( $this->languages, 'set_ready' ), + 'get_language' => array( $this->languages, 'get' ), + 'add_language' => array( $this->languages, 'add' ), + 'delete_language' => array( $this->languages, 'delete' ), + 'update_language' => array( $this->languages, 'update' ), + 'get_default_language' => array( $this->languages, 'get_default' ), + 'update_default_lang' => array( $this->languages, 'update_default' ), + 'maybe_create_language_terms' => array( $this->languages, 'maybe_create_terms' ), + // Post types. + 'get_translated_post_types' => array( $this->post_types, 'get_translated' ), + 'is_translated_post_type' => array( $this->post_types, 'is_translated' ), + // Taxonomies. + 'get_translated_taxonomies' => array( $this->taxonomies, 'get_translated' ), + 'is_translated_taxonomy' => array( $this->taxonomies, 'is_translated' ), + 'get_filtered_taxonomies' => array( $this->taxonomies, 'get_filtered' ), + 'is_filtered_taxonomy' => array( $this->taxonomies, 'is_filtered' ), + 'get_filtered_taxonomies_query_vars' => array( $this->taxonomies, 'get_filtered_query_vars' ), + ); + + if ( isset( $methods[ $name ] ) ) { + return call_user_func_array( $methods[ $name ], $arguments ); + } + + $debug = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions + throw new BadMethodCallException( + sprintf( + 'Call to undefined method PLL()->model->%1$s() in %2$s on line %3$s' . "\nError handler", + esc_html( $name ), + esc_html( $debug[0]['file'] ?? '' ), + absint( $debug[0]['line'] ?? 0 ) + ) + ); + } + + /** + * Cleans language cache + * can be called directly with no parameter + * called by the 'edited_term_taxonomy' filter with 2 parameters when count needs to be updated + * + * @since 1.2 + * + * @param int $term not used + * @param string $taxonomy taxonomy name + * @return void + */ + public function clean_languages_cache( $term = 0, $taxonomy = null ): void { + if ( empty( $taxonomy ) || 'language' === $taxonomy ) { + $this->languages->clean_cache(); + } + } + + /** + * Don't query term metas when only our taxonomies are queried + * + * @since 2.3 + * + * @param array $args WP_Term_Query arguments + * @return array + */ + public function get_terms_args( $args ) { + $taxonomies = $this->translatable_objects->get_taxonomy_names(); + + if ( isset( $args['taxonomy'] ) && ! array_diff( (array) $args['taxonomy'], $taxonomies ) ) { + $args['update_term_meta_cache'] = false; + } + return $args; + } + + /** + * Adds terms clauses to the term query to filter them by languages. + * + * @since 1.2 + * @since 3.8 Accepts an object or an array of objects for the second param. + * + * @param string[] $clauses The list of sql clauses in terms query. + * @param PLL_Language[]|PLL_Language $languages `PLL_Language` object or array of `PLL_Language` objects. + * @return string[] Modified list of clauses. + */ + public function terms_clauses( $clauses, $languages ) { + if ( ! empty( $languages ) && false === strpos( $clauses['join'], 'pll_tr' ) ) { + $clauses['join'] .= $this->term->join_clause(); + $clauses['where'] .= $this->term->where_clause( $languages ); + } + return $clauses; + } + + /** + * It is possible to have several terms with the same name in the same taxonomy ( one per language ) + * but the native term_exists() will return true even if only one exists. + * So here the function adds the language parameter. + * + * @since 1.4 + * + * @param string $term_name The term name. + * @param string $taxonomy Taxonomy name. + * @param int $parent Parent term id. + * @param string|PLL_Language $language The language slug or object. + * @return int The `term_id` of the found term. 0 otherwise. + * + * @phpstan-return int<0, max> + */ + public function term_exists( $term_name, $taxonomy, $parent, $language ): int { + global $wpdb; + + $language = $this->languages->get( $language ); + if ( empty( $language ) ) { + return 0; + } + + $term_name = trim( wp_unslash( $term_name ) ); + $term_name = _wp_specialchars( $term_name ); + + $select = "SELECT t.term_id FROM $wpdb->terms AS t"; + $join = " INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id"; + $join .= $this->term->join_clause(); + $where = $wpdb->prepare( ' WHERE tt.taxonomy = %s AND t.name = %s', $taxonomy, $term_name ); + $where .= $this->term->where_clause( $language ); + + if ( $parent > 0 ) { + $where .= $wpdb->prepare( ' AND tt.parent = %d', $parent ); + } + + // PHPCS:ignore WordPress.DB.PreparedSQL.NotPrepared + $term_id = $wpdb->get_var( $select . $join . $where ); + return max( 0, (int) $term_id ); + } + + /** + * Checks if a term slug exists in a given language, taxonomy, hierarchy. + * + * @since 1.9 + * @since 2.8 Moved from PLL_Share_Term_Slug::term_exists() to PLL_Model::term_exists_by_slug(). + * @since 3.8 Refactored to use `get_terms()` instead of direct SQL query. + * + * @param string $slug The term slug to test. + * @param string|PLL_Language $language The language slug or object. + * @param string $taxonomy Optional taxonomy name. + * @param int $parent Optional parent term id. + * @return int The `term_id` of the found term. 0 otherwise. + */ + public function term_exists_by_slug( $slug, $language, $taxonomy = '', $parent = 0 ): int { + $language = $this->languages->get( $language ); + if ( empty( $language ) ) { + return 0; + } + + $args = array( + 'slug' => $slug, + 'hide_empty' => false, + 'fields' => 'ids', + 'lang' => $language->slug, + 'update_term_meta_cache' => false, + ); + + if ( ! empty( $taxonomy ) ) { + $args['taxonomy'] = $taxonomy; + } + + if ( $parent > 0 ) { + $args['parent'] = $parent; + } + + $terms = get_terms( $args ); + + return ! empty( $terms ) && is_array( $terms ) ? (int) reset( $terms ) : 0; + } + + /** + * Returns the number of posts per language in a date, author or post type archive. + * + * @since 1.2 + * + * @param PLL_Language $lang PLL_Language instance. + * @param array $q { + * WP_Query arguments: + * + * @type string|string[] $post_type Post type or array of post types. + * @type int $m Combination YearMonth. Accepts any four-digit year and month. + * @type int $year Four-digit year. + * @type int $monthnum Two-digit month. + * @type int $day Day of the month. + * @type int $author Author id. + * @type string $author_name User 'user_nicename'. + * @type string $post_format Post format. + * @type string $post_status Post status. + * } + * @return int + * + * @phpstan-param array{ + * post_type?: non-falsy-string|array, + * post_status?: non-falsy-string, + * m?: numeric-string, + * year?: positive-int, + * monthnum?: int<1, 12>, + * day?: int<1, 31>, + * author?: int<1, max>, + * author_name?: non-falsy-string, + * post_format?: non-falsy-string + * } $q + * @phpstan-return int<0, max> + */ + public function count_posts( $lang, $q = array() ): int { + global $wpdb; + + $q = array_merge( array( 'post_type' => 'post', 'post_status' => 'publish' ), $q ); + + if ( ! is_array( $q['post_type'] ) ) { + $q['post_type'] = array( $q['post_type'] ); + } + + foreach ( $q['post_type'] as $key => $type ) { + if ( ! post_type_exists( $type ) ) { + unset( $q['post_type'][ $key ] ); + } + } + + if ( empty( $q['post_type'] ) ) { + $q['post_type'] = array( 'post' ); // We *need* a post type. + } + + $cache_key = $this->cache->get_unique_key( 'pll_count_posts_', $q ); + $counts = wp_cache_get( $cache_key, 'counts' ); + + if ( ! is_array( $counts ) ) { + $counts = array(); + $select = "SELECT pll_tr.term_taxonomy_id, COUNT( * ) AS num_posts FROM {$wpdb->posts}"; + $join = $this->post->join_clause(); + $where = sprintf( " WHERE post_status = '%s'", esc_sql( $q['post_status'] ) ); + $where .= sprintf( " AND {$wpdb->posts}.post_type IN ( '%s' )", implode( "', '", esc_sql( $q['post_type'] ) ) ); + $where .= $this->post->where_clause( $this->languages->get_list() ); + $groupby = ' GROUP BY pll_tr.term_taxonomy_id'; + + if ( ! empty( $q['m'] ) ) { + $q['m'] = '' . preg_replace( '|[^0-9]|', '', $q['m'] ); + $where .= $wpdb->prepare( " AND YEAR( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 0, 4 ) ); + if ( strlen( $q['m'] ) > 5 ) { + $where .= $wpdb->prepare( " AND MONTH( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 4, 2 ) ); + } + if ( strlen( $q['m'] ) > 7 ) { + $where .= $wpdb->prepare( " AND DAYOFMONTH( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 6, 2 ) ); + } + } + + if ( ! empty( $q['year'] ) ) { + $where .= $wpdb->prepare( " AND YEAR( {$wpdb->posts}.post_date ) = %d", $q['year'] ); + } + + if ( ! empty( $q['monthnum'] ) ) { + $where .= $wpdb->prepare( " AND MONTH( {$wpdb->posts}.post_date ) = %d", $q['monthnum'] ); + } + + if ( ! empty( $q['day'] ) ) { + $where .= $wpdb->prepare( " AND DAYOFMONTH( {$wpdb->posts}.post_date ) = %d", $q['day'] ); + } + + if ( ! empty( $q['author_name'] ) ) { + $author = get_user_by( 'slug', sanitize_title_for_query( $q['author_name'] ) ); + if ( $author ) { + $q['author'] = $author->ID; + } + } + + if ( ! empty( $q['author'] ) ) { + $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_author = %d", $q['author'] ); + } + + // Filtered taxonomies ( post_format ). + foreach ( $this->taxonomies->get_filtered_query_vars() as $tax_qv ) { + + if ( ! empty( $q[ $tax_qv ] ) ) { + $join .= " INNER JOIN {$wpdb->term_relationships} AS tr ON tr.object_id = {$wpdb->posts}.ID"; + $join .= " INNER JOIN {$wpdb->term_taxonomy} AS tt ON tt.term_taxonomy_id = tr.term_taxonomy_id"; + $join .= " INNER JOIN {$wpdb->terms} AS t ON t.term_id = tt.term_id"; + $where .= $wpdb->prepare( ' AND t.slug = %s', $q[ $tax_qv ] ); + } + } + + // PHPCS:ignore WordPress.DB.PreparedSQL.NotPrepared + $res = $wpdb->get_results( $select . $join . $where . $groupby, ARRAY_A ); + foreach ( (array) $res as $row ) { + $counts[ $row['term_taxonomy_id'] ] = $row['num_posts']; + } + + wp_cache_set( $cache_key, $counts, 'counts' ); + } + + $term_taxonomy_id = $lang->get_tax_prop( 'language', 'term_taxonomy_id' ); + return empty( $counts[ $term_taxonomy_id ] ) ? 0 : $counts[ $term_taxonomy_id ]; + } + + /** + * Setup the links model based on options. + * + * @since 1.2 + * + * @return PLL_Links_Model + */ + public function get_links_model(): PLL_Links_Model { + $c = array( 'Directory', 'Directory', 'Subdomain', 'Domain' ); + $class = get_option( 'permalink_structure' ) ? 'PLL_Links_' . $c[ $this->options['force_lang'] ] : 'PLL_Links_Default'; + + /** + * Filters the links model class to use. + * /!\ this filter is fired *before* the $polylang object is available. + * + * @since 2.1.1 + * + * @param string $class A class name: PLL_Links_Default, PLL_Links_Directory, PLL_Links_Subdomain, PLL_Links_Domain. + */ + $class = apply_filters( 'pll_links_model', $class ); + + return new $class( $this ); + } + + /** + * Returns a list of object IDs without language (used in settings and wizard). + * + * @since 0.9 + * @since 2.2.6 Added the `$limit` parameter. + * @since 3.4 Added the `$types` parameter. + * + * @param int $limit Optional. Max number of IDs to return. Defaults to -1 (no limit). + * @param string[] $types Optional. Types to handle (@see PLL_Translatable_Object::get_type()). Defaults to + * an empty array (all types). + * @return int[][]|false { + * IDs of objects without language. + * + * @type int[] $posts Array of post ids. + * @type int[] $terms Array of term ids. + * } + * + * @phpstan-param -1|positive-int $limit + */ + public function get_objects_with_no_lang( $limit = -1, array $types = array() ) { + /** + * Filters the max number of IDs to return when searching objects with no language. + * This filter can be used to decrease the memory usage in case the number of objects + * without language is too big. Using a negative value is equivalent to have no limit. + * + * @since 2.2.6 + * @since 3.4 Added the `$types` parameter. + * + * @param int $limit Max number of IDs to retrieve from the database. + * @param string[] $types Types to handle (@see PLL_Translatable_Object::get_type()). An empty array means all + * types. + */ + $limit = apply_filters( 'get_objects_with_no_lang_limit', $limit, $types ); + $limit = $limit < 1 ? -1 : max( (int) $limit, 1 ); + $objects = array(); + + foreach ( $this->translatable_objects as $type => $object ) { + if ( ! empty( $types ) && ! in_array( $type, $types, true ) ) { + continue; + } + + $ids = $object->get_objects_with_no_lang( $limit ); + + if ( empty( $ids ) ) { + continue; + } + + // The trailing 's' in the array key is for backward compatibility. + $objects[ "{$type}s" ] = $ids; + } + + $objects = ! empty( $objects ) ? $objects : false; + + /** + * Filters the list of IDs of untranslated objects. + * + * @since 0.9 + * @since 3.4 Added the `$limit` and `$types` parameters. + * + * @param int[][]|false $objects List of lists of object IDs, `false` if no IDs found. + * @param int $limit Max number of IDs to retrieve from the database. + * @param string[] $types Types to handle (@see PLL_Translatable_Object::get_type()). An empty array + * means all types. + */ + return apply_filters( 'pll_get_objects_with_no_lang', $objects, $limit, $types ); + } + + /** + * Returns ids of post without language. + * + * @since 3.1 + * + * @param string|string[] $post_types A translated post type or an array of translated post types. + * @param int $limit Max number of objects to return. `-1` to return all of them. + * @return int[] + * + * @phpstan-param -1|positive-int $limit + * @phpstan-return list + */ + public function get_posts_with_no_lang( $post_types, $limit ): array { + return $this->translatable_objects->get( 'post' )->get_objects_with_no_lang( $limit, (array) $post_types ); + } + + /** + * Returns ids of terms without language. + * + * @since 3.1 + * + * @param string|string[] $taxonomies A translated taxonomy or an array of taxonomies post types. + * @param int $limit Max number of objects to return. `-1` to return all of them. + * @return int[] + * + * @phpstan-param -1|positive-int $limit + * @phpstan-return list + */ + public function get_terms_with_no_lang( $taxonomies, $limit ): array { + return $this->translatable_objects->get( 'term' )->get_objects_with_no_lang( $limit, (array) $taxonomies ); + } + + /** + * Assigns the default language to objects in mass. + * + * @since 1.2 + * @since 3.4 Moved from PLL_Admin_Model class. + * Removed `$limit` parameter, added `$lang` and `$types` parameters. + * + * @param PLL_Language|null $lang Optional. The language to assign to objects. Defaults to `null` (default language). + * @param string[] $types Optional. Types to handle (@see PLL_Translatable_Object::get_type()). Defaults + * to an empty array (all types). + * @return void + */ + public function set_language_in_mass( $lang = null, array $types = array() ): void { + if ( ! $lang instanceof PLL_Language ) { + $lang = $this->languages->get_default(); + + if ( empty( $lang ) ) { + return; + } + } + + // 1000 is an arbitrary value that will be filtered by `get_objects_with_no_lang_limit`. + $nolang = $this->get_objects_with_no_lang( 1000, $types ); + + if ( empty( $nolang ) ) { + return; + } + + /** + * Keep track of types where we set the language: + * those are types where we may have more items to process if we have more than 1000 items in total. + * This will prevent unnecessary SQL queries in the next recursion: if we have 0 items in this recursion for + * a type, we'll still have 0 in the next one, no need for a new query. + */ + $types_with_objects = array(); + + foreach ( $this->translatable_objects as $type => $object ) { + if ( empty( $nolang[ "{$type}s" ] ) ) { + continue; + } + + if ( ! empty( $types ) && ! in_array( $type, $types, true ) ) { + continue; + } + + $object->set_language_in_mass( $nolang[ "{$type}s" ], $lang ); + $types_with_objects[] = $type; + } + + if ( empty( $types_with_objects ) ) { + return; + } + + $this->set_language_in_mass( $lang, $types_with_objects ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Abstract_Block.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Abstract_Block.php new file mode 100644 index 0000000..27eb974 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Abstract_Block.php @@ -0,0 +1,241 @@ +model = &$polylang->model; + $this->links = &$polylang->links; + $this->current_language = &$polylang->curlang; + } + + /** + * Adds the required hooks. + * + * @since 3.2 + * + * @return self + */ + public function init() { + // Use rest_pre_dispatch_filter to get additional parameters for language switcher block. + add_filter( 'rest_pre_dispatch', array( $this, 'get_rest_query_params' ), 10, 3 ); + + // Register language switcher block. + add_action( 'init', array( $this, 'register' ) ); + + return $this; + } + + /** + * Returns the block name with the Polylang's namespace. + * + * @since 3.2 + * + * @return string The block name. + */ + abstract protected function get_block_name(); + + /** + * Renders the Polylang's block on server. + * + * @since 3.2 + * @since 3.3 Accepts two new parameters, $content and $block. + * + * @param array $attributes The block attributes. + * @param string $content The saved content. + * @param \WP_Block $block The parsed block. + * @return string The HTML string output to serve. + */ + abstract public function render( $attributes, $content, $block ); + + + + /** + * Returns the path to the block JSON file directory. + * The directory name being used to register a block. + * + * @since 3.8 + * + * @return string The path to the block. + */ + abstract protected function get_path(): string; + + /** + * Registers the Polylang's block. + * + * @since 2.8 + * @since 3.2 Renamed and now handle any type of block registration based on a dynamic name. + * + * @return void + */ + public function register() { + if ( WP_Block_Type_Registry::get_instance()->is_registered( $this->get_block_name() ) ) { + // Don't register a block more than once or WordPress send an error. See https://github.com/WordPress/wordpress-develop/blob/5.9/src/wp-includes/class-wp-block-type-registry.php#L82-L90 + return; + } + + if ( ! register_block_type( + $this->get_path(), + array( + 'render_callback' => array( $this, 'render' ), + ) + ) ) { + return; + } + + $script_handle = 'pll_blocks'; + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $script_filename = 'js/build/blocks' . $suffix . '.js'; + + wp_register_script( + $script_handle, + plugins_url( $script_filename, POLYLANG_ROOT_FILE ), + array( + 'wp-block-editor', + 'wp-blocks', + 'wp-components', + 'wp-element', + 'wp-i18n', + 'wp-server-side-render', + 'lodash', + 'wp-editor', + ), + POLYLANG_VERSION, + true + ); + + wp_localize_script( $script_handle, 'pll_block_editor_blocks_settings', PLL_Switcher::get_switcher_options( 'block', 'string' ) ); + + // Translated strings used in JS code + wp_set_script_translations( $script_handle, 'polylang' ); + + // No need to render the JS variable if Polylang Pro is installed, the editor will use `lang` REST field instead. + if ( class_exists( 'WP_Syntex\Polylang_Pro\REST\Translated\Post' ) ) { + return; + } + + // Fallback to default language if current language is not set, usually happens in Site Editor. + $current_language = $this->current_language; + + if ( ! $current_language ) { + $current_language = $this->model->get_default_language(); + } + + if ( ! $current_language ) { + // Should not happen since the module is loaded only if there are languages. + return; + } + + if ( str_contains( wp_scripts()->get_inline_script_data( $script_handle, 'after' ), 'pllEditorCurrentLanguageSlug' ) ) { + return; + } + + wp_add_inline_script( + $script_handle, + 'let pllEditorCurrentLanguageSlug = ' . wp_json_encode( $current_language->slug ) . ';', + 'after' + ); + } + + /** + * Returns the REST parameters for language switcher block. + * Used to store the request's language and context locally. + * Previously was in the `PLL_Block_Editor_Switcher_Block` class. + * + * @see WP_REST_Server::dispatch() + * + * @since 2.8 + * + * @param mixed $result Response to replace the requested version with. Can be anything + * a normal endpoint can return, or null to not hijack the request. + * @param \WP_REST_Server $server Server instance. + * @param \WP_REST_Request $request Request used to generate the response. + * @return mixed + * @template T of \WP_REST_Request + * @phpstan-param T $request + */ + public function get_rest_query_params( $result, $server, $request ) { + if ( pll_is_edit_rest_request( $request ) ) { + $this->is_edit_context = true; + + $lang = $request->get_param( 'lang' ); + if ( is_string( $lang ) && ! empty( $lang ) ) { + $this->admin_current_lang = $lang; + } + } + return $result; + } + + /** + * Adds the attributes to render the block correctly. + * Also specifies not to echo the switcher in any case. + * + * @since 3.2 + * + * @param array $attributes The attributes of the currently rendered block. + * @return array The modified attributes. + */ + protected function set_attributes_for_block( $attributes ) { + $attributes['echo'] = 0; + if ( $this->is_edit_context ) { + $attributes['admin_render'] = 1; + $attributes['admin_current_lang'] = $this->admin_current_lang; + $attributes['hide_if_empty'] = 0; + $attributes['hide_if_no_translation'] = 0; // Force not to hide the language for the block preview even if the option is checked. + } + return $attributes; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/Block.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/Block.php new file mode 100644 index 0000000..165064d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/Block.php @@ -0,0 +1,304 @@ +set_attributes_for_block( $attributes ); + $switcher = new PLL_Switcher(); + $switcher_elements = (array) $switcher->the_languages( $this->links, array_merge( $attributes, array( 'raw' => true ) ) ); + + if ( empty( $switcher_elements ) ) { + return ''; + } + + if ( $attributes['dropdown'] ) { + $inner_nav_link_blocks = array(); + $top_level_lang = reset( $switcher_elements ); + foreach ( $switcher_elements as $switcher_element ) { + $nav_link_block_args = array( + 'blockName' => 'core/navigation-link', + 'attrs' => $this->get_core_block_attributes( $attributes, $switcher_element ), + ); + + $inner_nav_link_blocks[] = new WP_Block( $nav_link_block_args, $block->context ); + + if ( $switcher_element['current_lang'] && ! $attributes['hide_current'] ) { + $top_level_lang = $switcher_element; + } + } + + $attributes = $this->get_core_block_attributes( $attributes, $top_level_lang ); + $attributes['className'] .= ' ' . wp_apply_generated_classname_support( $block->block_type )['class']; + $submenu_block_args = array( + 'blockName' => 'core/navigation-submenu', + 'attrs' => $attributes, + 'innerBlocks' => $inner_nav_link_blocks, + ); + + $submenu_block = new WP_Block( $submenu_block_args, $block->context ); + $output = $submenu_block->render(); + } else { + $output = ''; + + foreach ( $switcher_elements as $switcher_element ) { + $link_attributes = $this->get_core_block_attributes( $attributes, $switcher_element ); + $link_attributes['className'] .= ' ' . wp_apply_generated_classname_support( $block->block_type )['class']; + $nav_link_block_args = array( + 'blockName' => 'core/navigation-link', + 'attrs' => $link_attributes, + ); + + $link_block = new WP_Block( $nav_link_block_args, $block->context ); + $output .= $link_block->render(); + } + } + + return $output; + } + + /** + * Register switcher menu item meta options as a REST API field. + * + * @since 3.2 + * + * @return void + */ + public function register_switcher_menu_item_options_meta_rest_field() { + register_post_meta( + 'nav_menu_item', + '_pll_menu_item', + array( + 'object_subtype' => 'nav_menu_item', + 'description' => __( 'Language switcher settings', 'polylang' ), + 'single' => true, + 'show_in_rest' => array( + 'schema' => array( + 'type' => 'object', + 'additionalProperties' => array( + 'type' => 'boolean', + ), + ), + ), + ) + ); + } + + /** + * Filters core/navigation-link and core/navigation-submenu attributes during registration to add our own. + * + * @since 3.6 + * + * @param array $metadata Metadata for registering a block type. + * + * @return array The filtered metadata if about a core/navigation-link. + */ + public function register_custom_attributes( $metadata ) { + if ( 'core/navigation-link' === $metadata['name'] || 'core/navigation-submenu' === $metadata['name'] ) { + $pll_attributes = array( + 'hreflang' => array( + 'type' => 'string', + ), + 'lang' => array( + 'type' => 'string', + ), + 'pll_show_flags' => array( + 'type' => 'boolean', + ), + 'pll_show_names' => array( + 'type' => 'boolean', + ), + 'pll_flag' => array( + 'type' => 'string', + ), + 'pll_name' => array( + 'type' => 'string', + ), + ); + $metadata['attributes'] = array_merge( $metadata['attributes'], $pll_attributes ); + } + + return $metadata; + } + + /** + * Renders a core/naviagation-link or core/naviagation-submenu block by adding hreflang and lang attributes to the tag + * and also the language flag if required. + * + * @since 3.6 + * + * @param string $block_content The block content. + * @param array $block The full block, including name and attributes. + * @param WP_Block $instance The block instance. + * + * @return string A formatted HTML string representing the core/navigation-link or core/navigation-submenu block. + */ + public function render_custom_attributes( $block_content, $block, $instance ) { + if ( ! isset( + $instance->attributes['pll_show_flags'], + $instance->attributes['pll_show_names'], + $instance->attributes['pll_flag'], + $instance->attributes['pll_name'], + $instance->attributes['lang'], + $instance->attributes['hreflang'] + ) + ) { + return $block_content; + } + + $content_tags = new WP_HTML_Tag_Processor( $block_content ); + + if ( 'core/navigation-submenu' === $instance->name ) { + // If `openSubmenusOnClick`, the submenu is rendered as a button, so there are no `` to process. + if ( empty( $instance->context['openSubmenusOnClick'] ) && $content_tags->next_tag( array( 'tag_name' => 'a' ) ) ) { + $content_tags->set_attribute( 'hreflang', $instance->attributes['hreflang'] ); + $content_tags->set_attribute( 'lang', $instance->attributes['lang'] ); + } + if ( $content_tags->next_tag( array( 'tag_name' => 'button' ) ) ) { + $content_tags->set_attribute( + 'aria-label', + str_replace( + static::PLACEHOLDER, + __( 'Languages', 'polylang' ), + (string) $content_tags->get_attribute( 'aria-label' ) + ) + ); + } + } elseif ( $content_tags->next_tag( array( 'tag_name' => 'a' ) ) ) { + $content_tags->set_attribute( 'hreflang', $instance->attributes['hreflang'] ); + $content_tags->set_attribute( 'lang', $instance->attributes['lang'] ); + } + + $overridden_block_content = $content_tags->get_updated_html(); + + $link_label = ''; + + if ( $instance->attributes['pll_show_flags'] ) { + $link_label .= $instance->attributes['pll_flag']; + } + + if ( $instance->attributes['pll_show_names'] ) { + $link_label .= $instance->attributes['pll_show_flags'] ? ' ' . $instance->attributes['pll_name'] : $instance->attributes['pll_name']; + } + + return str_replace( + static::PLACEHOLDER, + $link_label, + $overridden_block_content + ); + } + + /** + * Returns the path to the block JSON file directory. + * The directory name being used to register a block. + * + * @since 3.8 + * + * @return string The path to the block. + */ + protected function get_path(): string { + return __DIR__; + } + + /** + * Returns attributes that fit for core/navigation-link or core/navigation-submenu and specific to polylang/navigation-language-switcher. + * + * @since 3.6 + * + * @param array $attributes Array of polylang/navigation-language-switcher attributes. + * @param array $switcher_item Array of a switcher item data. + * @return array Attributes to be rendered by core. + */ + private function get_core_block_attributes( $attributes, $switcher_item ) { + return array( + 'label' => static::PLACEHOLDER, + 'url' => $switcher_item['url'], + 'pll_show_flags' => $attributes['show_flags'], + 'pll_show_names' => $attributes['show_names'], + 'lang' => $switcher_item['locale'], + 'hreflang' => $switcher_item['locale'], + 'pll_flag' => $switcher_item['flag'], + 'pll_name' => $switcher_item['name'], + 'className' => trim( implode( ' ', (array) $switcher_item['classes'] ) ), + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/block.json b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/block.json new file mode 100644 index 0000000..c576f03 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Navigation/block.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "polylang/navigation-language-switcher", + "version": "3.8", + "title": "Navigation Language Switcher", + "category": "design", + "parent": [ "core/navigation" ], + "description": "Language switcher suitable for navigation.", + "example": {}, + "attributes": { + "dropdown": { + "type": "boolean", + "default": 0 + }, + "show_names": { + "type": "boolean", + "default": 1 + }, + "show_flags": { + "type": "boolean", + "default": 0 + }, + "force_home": { + "type": "boolean", + "default": 0 + }, + "hide_current": { + "type": "boolean", + "default": 0 + }, + "hide_if_no_translation": { + "type": "boolean", + "default": 0 + }, + "className": { + "type": "string", + "default": "" + } + }, + "usesContext": [ + "textColor", + "customTextColor", + "backgroundColor", + "customBackgroundColor", + "overlayTextColor", + "customOverlayTextColor", + "overlayBackgroundColor", + "customOverlayBackgroundColor", + "fontSize", + "customFontSize", + "showSubmenuIcon", + "maxNestingLevel", + "openSubmenusOnClick", + "style", + "isResponsive", + "submenuVisibility" + ], + "supports": { + "contentRole": true + }, + "textdomain": "polylang", + "editorScript": "pll_blocks", + "editorStyle": "pll-navigation-language-switcher-editor-style" +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/Block.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/Block.php new file mode 100644 index 0000000..f0d4c63 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/Block.php @@ -0,0 +1,85 @@ +set_attributes_for_block( $attributes ); + + $attributes['raw'] = false; + $switcher = new PLL_Switcher(); + $switcher_output = $switcher->the_languages( $this->links, $attributes ); + + if ( empty( $switcher_output ) ) { + return ''; + } + + $aria_label = __( 'Choose a language', 'polylang' ); + if ( $attributes['dropdown'] ) { + $switcher_output = '' . $switcher_output; + + $wrap_tag = '
    %2$s
    '; + } else { + $wrap_tag = ''; + } + + $wrap_attributes = get_block_wrapper_attributes(); + + return sprintf( $wrap_tag, $wrap_attributes, $switcher_output ); + } + + /** + * Returns the path to the block JSON file directory. + * The directory name being used to register a block. + * + * @since 3.8 + * + * @return string The path to the block. + */ + protected function get_path(): string { + return __DIR__; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/block.json b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/block.json new file mode 100644 index 0000000..8e970ca --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/Language_Switcher/Standard/block.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "polylang/language-switcher", + "version": "3.8", + "title": "Language Switcher", + "category": "widgets", + "description": "Language switcher to insert in content or as a widget.", + "example": {}, + "attributes": { + "dropdown": { + "type": "boolean", + "default": 0 + }, + "show_names": { + "type": "boolean", + "default": 1 + }, + "show_flags": { + "type": "boolean", + "default": 0 + }, + "force_home": { + "type": "boolean", + "default": 0 + }, + "hide_current": { + "type": "boolean", + "default": 0 + }, + "hide_if_no_translation": { + "type": "boolean", + "default": 0 + }, + "className": { + "type": "string", + "default": "" + } + }, + "textdomain": "polylang", + "editorScript": "pll_blocks" +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/load.php new file mode 100644 index 0000000..cfa0431 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/Blocks/load.php @@ -0,0 +1,23 @@ +model->has_languages() ) { + $polylang->switcher_block = ( new Standard_Block( $polylang ) )->init(); + $polylang->navigation_block = ( new Navigation_Block( $polylang ) )->init(); + } + } +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/API.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/API.php new file mode 100644 index 0000000..7af7e38 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/API.php @@ -0,0 +1,62 @@ +model = $model; + } + + /** + * Adds hooks and registers endpoints. + * + * @since 3.7 + * + * @return void + */ + public function init(): void { + $this->languages = new V1\Languages( $this->model ); + $this->languages->register_routes(); + + $this->settings = new V1\Settings( $this->model ); + $this->settings->register_routes(); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/Abstract_Controller.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/Abstract_Controller.php new file mode 100644 index 0000000..ca85dd4 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/Abstract_Controller.php @@ -0,0 +1,32 @@ +add_data( array( 'status' => $status_code ) ); + return $error; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/Request.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/Request.php new file mode 100644 index 0000000..89fc16c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/Request.php @@ -0,0 +1,266 @@ +|null + */ + private $request; + + /** + * @var array|null + */ + private $handler; + + /** + * @var PLL_Model + */ + private $model; + + /** + * Constructor. + * + * @since 3.8 + * + * @param PLL_Model $model Instance of PLL_Model. + */ + public function __construct( PLL_Model $model ) { + $this->model = $model; + + /* + * Priorities 0 and 10000 allow to have a stored request from the very beginning until the very end of the + * process. This allows to filter queries (see `Filtered_Object\Post::parse_query()` for example) that may be located + * in callbacks hooked to `rest_request_before_callbacks` and `rest_request_after_callbacks`. + */ + add_filter( 'rest_request_before_callbacks', Closure::fromCallable( array( $this, 'save_request' ) ), 0, 3 ); + add_filter( 'rest_request_after_callbacks', Closure::fromCallable( array( $this, 'reset_request' ) ), 10000 ); + } + + /** + * Stores the request to use, for example, parameters when filtering queries. + * + * @since 3.2 + * @since 3.8 Added the `$server` parameter. + * Hooked to `rest_pre_dispatch`. + * Moved from PLL_REST_Filtered_Object. + * + * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client. + * @param array $handler Route handler used for the request. + * @param WP_REST_Request $request Request used to generate the response. + * @return WP_REST_Response|WP_HTTP_Response|WP_Error|mixed Response to send to the client. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + private function save_request( $response, $handler, $request ) { + $this->request = $request; + $this->handler = $handler; + + return $response; + } + + /** + * Resets the stored request. + * Prevents to keep it after the request ends. + * + * @since 3.8 + * + * @param mixed $result Response. + * @return mixed + */ + private function reset_request( $result ) { + $this->request = null; + $this->handler = null; + + return $result; + } + + /** + * Returns a parameter from the current request if defined. + * + * @since 3.8 + * + * @param string $param Parameter name. + * @return mixed|null Parameter value or null if not defined. + */ + public function get_param( string $param ) { + if ( ! $this->request ) { + return null; + } + + return $this->request->get_param( $param ); + } + + /** + * Returns the parameters of the current request. + * + * @since 3.8 + * + * @return array Parameters of the current request if any. + */ + public function get_params(): array { + if ( ! $this->request ) { + return array(); + } + + return $this->request->get_params(); + } + + /** + * Returns the language of the current request. + * + * @since 3.8 + * + * @return PLL_Language|null Language of the current request, or null if no request is set or the language is not found. + */ + public function get_language(): ?PLL_Language { + if ( ! $this->request ) { + return null; + } + + $lang = $this->get_param( 'lang' ); + + if ( empty( $lang ) || ! is_string( $lang ) ) { + return null; + } + + $lang = $this->model->get_language( $lang ); + + if ( ! $lang ) { + return null; + } + + return $lang; + } + + /** + * Returns the ID of the current requested object if defined. + * + * @since 3.8 + * + * @return int|null ID of the current requested object, or null if no request is set or the ID is not defined. + */ + public function get_id(): ?int { + if ( ! $this->request ) { + return null; + } + + $id = $this->get_param( 'id' ); + if ( empty( $id ) || ! is_numeric( $id ) ) { + return null; + } + + return (int) $id; + } + + /** + * Returns the attributes of the current request. + * + * @since 3.8 + * + * @return array|null Attributes of the current request, or null if no request is set. + */ + public function get_attributes(): ?array { + if ( ! $this->request ) { + return null; + } + + return $this->request->get_attributes(); + } + + /** + * Tells if the current request is a "read only" request, i.e. not `POST`, `PUT`, `PATCH`, `DELETE`. + * + * @since 3.8 + * + * @return bool + */ + public function is_read_only(): bool { + return ! empty( $this->request ) && ! in_array( $this->request->get_method(), array( 'POST', 'PUT', 'PATCH', 'DELETE' ), true ); + } + + /** + * Returns the object type of the current request. + * + * @since 3.8 + * + * @return string|null Object type of the current request, or null if not defined. + * Returned values are 'post' and 'term'. + * + * @phpstan-return 'post'|'term'|null + */ + public function get_object_type(): ?string { + if ( ! $this->request || ! $this->handler ) { + return null; + } + + /** + * Filters the object type of the current request. + * + * @since 3.8 + * + * @param string|null $type Object type of the current request, or null if not defined. + * @param array $handler Route handler used for the request. + * @param WP_REST_Request $request Request used to generate the response. + * Accepted values are 'post' and 'term'. + */ + $type = apply_filters( 'pll_rest_request_object_type', null, $this->handler, $this->request ); + + if ( in_array( $type, array( 'post', 'term' ), true ) ) { + return $type; + } + + if ( ! is_array( $this->handler['callback'] ) ) { + return null; + } + + $controller = reset( $this->handler['callback'] ); + if ( $controller instanceof WP_REST_Posts_Controller ) { + return 'post'; + } elseif ( $controller instanceof WP_REST_Terms_Controller ) { + return 'term'; + } + + return null; + } + + /** + * Returns the route of the current request. + * + * @since 3.8 + * + * @return string Route of the current request, or empty string if no request is set. + */ + public function get_route(): string { + return $this->request && is_string( $this->request->get_route() ) ? $this->request->get_route() : ''; + } + + /** + * Returns the HTTP method of the current request. + * + * @since 3.8 + * + * @return string + */ + public function get_method(): string { + return $this->request ? $this->request->get_method() : ''; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/V1/Languages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/V1/Languages.php new file mode 100644 index 0000000..07237eb --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/V1/Languages.php @@ -0,0 +1,706 @@ +namespace = 'pll/v1'; + $this->rest_base = 'languages'; + $this->languages = $model->languages; + $this->translatable_objects = $model->translatable_objects; + } + + /** + * Registers the routes for languages. + * + * @since 3.7 + * + * @return void + */ + public function register_routes(): void { + register_rest_route( + $this->namespace, + "/{$this->rest_base}", + array( + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_items' ), + 'permission_callback' => array( $this, 'get_items_permissions_check' ), + ), + array( + 'methods' => WP_REST_Server::CREATABLE, + 'callback' => array( $this, 'create_item' ), + 'permission_callback' => array( $this, 'create_item_permissions_check' ), + 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ), + ), + 'schema' => array( $this, 'get_public_item_schema' ), + 'allow_batch' => array( 'v1' => true ), + ) + ); + + $readable = array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_item' ), + 'permission_callback' => array( $this, 'get_item_permissions_check' ), + 'args' => array( + 'context' => $this->get_context_param( array( 'default' => 'view' ) ), + ), + ); + + register_rest_route( + $this->namespace, + "/{$this->rest_base}/(?P[\d]+)", + array( + 'args' => array( + 'term_id' => array( + 'description' => __( 'Unique identifier for the language.', 'polylang' ), + 'type' => 'integer', + ), + ), + $readable, + array( + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => array( $this, 'update_item' ), + 'permission_callback' => array( $this, 'update_item_permissions_check' ), + 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ), + ), + array( + 'methods' => WP_REST_Server::DELETABLE, + 'callback' => array( $this, 'delete_item' ), + 'permission_callback' => array( $this, 'delete_item_permissions_check' ), + ), + 'schema' => array( $this, 'get_public_item_schema' ), + 'allow_batch' => array( 'v1' => true ), + ) + ); + register_rest_route( + $this->namespace, + sprintf( '/%1$s/(?P%2$s)', $this->rest_base, Languages_Model::INNER_SLUG_PATTERN ), + array( + 'args' => array( + 'slug' => array( + 'description' => __( 'Language code - preferably 2-letters ISO 639-1 (for example: en).', 'polylang' ), + 'type' => 'string', + ), + ), + $readable, + 'schema' => array( $this, 'get_public_item_schema' ), + 'allow_batch' => array( 'v1' => true ), + ) + ); + } + + /** + * Retrieves all languages. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function get_items( $request ) { + $response = array(); + + foreach ( $this->languages->get_list() as $language ) { + $language = $this->prepare_item_for_response( $language, $request ); + $response[] = $this->prepare_response_for_collection( $language ); + } + + return rest_ensure_response( $response ); + } + + /** + * Creates one language from the collection. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function create_item( $request ) { + if ( isset( $request['term_id'] ) ) { + return new WP_Error( + 'rest_exists', + __( 'Cannot create existing language.', 'polylang' ), + array( 'status' => 400 ) + ); + } + + /** + * @phpstan-var array{ + * locale: non-empty-string, + * slug?: non-empty-string, + * name?: non-empty-string, + * is_rtl?: bool, + * term_group?: int, + * flag?: non-empty-string, + * no_default_cat?: bool + * } $args + */ + $args = $request->get_params(); + $language = $this->languages->add( $args ); + + if ( is_wp_error( $language ) ) { + return $this->add_status_to_error( $language ); + } + + return $this->prepare_item_for_response( $language, $request ); + } + + /** + * Retrieves one language from the collection. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function get_item( $request ) { + $language = $this->get_language( $request ); + + if ( is_wp_error( $language ) ) { + return $language; + } + + return $this->prepare_item_for_response( $language, $request ); + } + + /** + * Updates one language from the collection. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function update_item( $request ) { + $language = $this->get_language( $request ); + if ( is_wp_error( $language ) ) { + return $language; + } + + /** + * @phpstan-var array{ + * term_id: int, + * locale?: non-empty-string, + * slug?: non-empty-string, + * name?: non-empty-string, + * is_rtl?: bool, + * term_group?: int, + * flag?: non-empty-string + * } $args + */ + $args = $request->get_params(); + $args['lang_id'] = $language->term_id; + $language = $this->languages->update( $args ); + + if ( is_wp_error( $language ) ) { + return $this->add_status_to_error( $language ); + } + + return $this->prepare_item_for_response( $language, $request ); + } + + /** + * Deletes one language from the collection. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function delete_item( $request ) { + $language = $this->get_language( $request ); + + if ( is_wp_error( $language ) ) { + return $language; + } + + $this->languages->delete( $language->term_id ); + + $previous = $this->prepare_item_for_response( $language, $request ); + $response = new WP_REST_Response(); + $response->set_data( + array( + 'deleted' => true, + 'previous' => $previous->get_data(), + ) + ); + + return $response; + } + + /** + * Checks if a given request has access to get the languages. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return true|WP_Error True if the request has read access, WP_Error object otherwise. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function get_items_permissions_check( $request ) { + if ( 'edit' === $request['context'] && ! $this->check_update_permission() ) { + return new WP_Error( + 'rest_forbidden_context', + __( 'Sorry, you are not allowed to edit languages.', 'polylang' ), + array( 'status' => rest_authorization_required_code() ) + ); + } + return true; + } + + /** + * Checks if a given request has access to create a language. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return true|WP_Error True if the request has access to create languages, WP_Error object otherwise. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function create_item_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + if ( ! $this->check_update_permission() ) { + return new WP_Error( + 'rest_cannot_create', + __( 'Sorry, you are not allowed to create a language.', 'polylang' ), + array( 'status' => rest_authorization_required_code() ) + ); + } + return true; + } + + /** + * Checks if a given request has access to get a specific language. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return true|WP_Error True if the request has read access for the language, WP_Error object otherwise. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function get_item_permissions_check( $request ) { + return $this->get_items_permissions_check( $request ); + } + + /** + * Checks if a given request has access to update a specific language. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return true|WP_Error True if the request has access to update the language, WP_Error object otherwise. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function update_item_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + if ( ! $this->check_update_permission() ) { + return new WP_Error( + 'rest_cannot_update', + __( 'Sorry, you are not allowed to edit this language.', 'polylang' ), + array( 'status' => rest_authorization_required_code() ) + ); + } + return true; + } + + /** + * Checks if a given request has access to delete a specific language. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return true|WP_Error True if the request has access to delete the language, WP_Error object otherwise. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function delete_item_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + if ( ! $this->check_update_permission() ) { + return new WP_Error( + 'rest_cannot_delete', + __( 'Sorry, you are not allowed to delete this language.', 'polylang' ), + array( 'status' => rest_authorization_required_code() ) + ); + } + return true; + } + + /** + * Prepares the language for the REST response. + * + * @since 3.7 + * + * @param PLL_Language $item Language object. + * @param WP_REST_Request $request Request object. + * @return WP_REST_Response Response object. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function prepare_item_for_response( $item, $request ) { + $data = $item->to_array(); + $fields = $this->get_fields_for_response( $request ); + $response = array(); + + $data['is_rtl'] = (bool) $data['is_rtl']; + $data['host'] = (string) $data['host']; + + foreach ( $data as $language_prop => $prop_value ) { + if ( rest_is_field_included( $language_prop, $fields ) ) { + $response[ $language_prop ] = $prop_value; + } + } + + /** @var WP_REST_Response */ + return rest_ensure_response( $response ); + } + + /** + * Retrieves the language's schema, conforming to JSON Schema. + * + * @since 3.7 + * + * @return array Item schema data. + */ + public function get_item_schema(): array { + if ( $this->schema ) { + return $this->add_additional_fields_schema( $this->schema ); + } + + $this->schema = array( + '$schema' => 'http://json-schema.org/draft-04/schema#', + 'title' => 'language', + 'type' => 'object', + 'properties' => array( + 'term_id' => array( + 'description' => __( 'Unique identifier for the language.', 'polylang' ), + 'type' => 'integer', + 'minimum' => 1, + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'name' => array( + 'description' => __( 'The name is how it is displayed on your site (for example: English).', 'polylang' ), + 'type' => 'string', + 'minLength' => 1, + 'context' => array( 'view', 'edit' ), + ), + 'slug' => array( + 'description' => __( 'Language code - preferably 2-letters ISO 639-1 (for example: en).', 'polylang' ), + 'type' => 'string', + 'pattern' => Languages_Model::SLUG_PATTERN, + 'context' => array( 'view', 'edit' ), + ), + 'locale' => array( + 'description' => __( 'WordPress Locale for the language (for example: en_US).', 'polylang' ), + 'type' => 'string', + 'pattern' => Languages_Model::LOCALE_PATTERN, + 'context' => array( 'view', 'edit' ), + ), + 'w3c' => array( + 'description' => __( 'W3C Locale for the language (for example: en-US).', 'polylang' ), + 'type' => 'string', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'facebook' => array( + 'description' => __( 'Facebook Locale for the language (for example: en_US).', 'polylang' ), + 'type' => 'string', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'is_rtl' => array( + 'description' => sprintf( + /* translators: %s is a value. */ + __( 'Text direction. %s for right-to-left.', 'polylang' ), + '`true`' + ), + 'type' => 'boolean', + 'context' => array( 'view', 'edit' ), + ), + 'term_group' => array( + 'description' => __( 'Position of the language in the language switcher.', 'polylang' ), + 'type' => 'integer', + 'context' => array( 'view', 'edit' ), + ), + 'flag_code' => array( + 'description' => __( 'Flag code corresponding to ISO 3166-1 (for example: us for the United States flag).', 'polylang' ), + 'type' => 'string', + 'context' => array( 'view', 'edit' ), + ), + 'flag_url' => array( + 'description' => __( 'Flag URL.', 'polylang' ), + 'type' => 'string', + 'format' => 'uri', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'flag' => array( + 'description' => __( 'HTML tag for the flag.', 'polylang' ), + 'type' => 'string', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'custom_flag_url' => array( + 'description' => __( 'Custom flag URL.', 'polylang' ), + 'type' => 'string', + 'format' => 'uri', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'custom_flag' => array( + 'description' => __( 'HTML tag for the custom flag.', 'polylang' ), + 'type' => 'string', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'is_default' => array( + 'description' => __( 'Tells whether the language is the default one.', 'polylang' ), + 'type' => 'boolean', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'active' => array( + 'description' => __( 'Tells whether the language is active.', 'polylang' ), + 'type' => 'boolean', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'home_url' => array( + 'description' => __( 'Home URL in this language.', 'polylang' ), + 'type' => 'string', + 'format' => 'uri', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'search_url' => array( + 'description' => __( 'Search URL in this language.', 'polylang' ), + 'type' => 'string', + 'format' => 'uri', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'host' => array( + 'description' => __( 'Host for this language.', 'polylang' ), + 'type' => 'string', + 'format' => 'uri', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'page_on_front' => array( + 'description' => __( 'Page on front ID in this language.', 'polylang' ), + 'type' => 'integer', + 'minimum' => 0, + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'page_for_posts' => array( + 'description' => __( 'Identifier of the page for posts in this language.', 'polylang' ), + 'type' => 'integer', + 'minimum' => 0, + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'fallbacks' => array( + 'description' => __( 'List of language locale fallbacks.', 'polylang' ), + 'type' => 'array', + 'uniqueItems' => true, + 'items' => array( + 'type' => 'string', + 'pattern' => Languages_Model::LOCALE_PATTERN, + ), + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'term_props' => array( + 'description' => __( 'Language properties.', 'polylang' ), + 'type' => 'object', + 'properties' => array(), + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'no_default_cat' => array( + 'description' => __( 'Tells whether the default category must be created when creating a new language.', 'polylang' ), + 'type' => 'boolean', + 'context' => array( 'edit' ), + 'default' => false, + ), + ), + ); + + foreach ( $this->translatable_objects as $translatable_object ) { + $this->schema['properties']['term_props']['properties'][ $translatable_object->get_tax_language() ] = array( + 'description' => $translatable_object->get_rest_description(), + 'type' => 'object', + 'properties' => array( + 'term_id' => array( + /* translators: %s is the name of the term property (`term_id` or `term_taxonomy_id`). */ + 'description' => sprintf( __( 'The %s of the language term for this translatable entity.', 'polylang' ), '`term_id`' ), + 'type' => 'integer', + 'minimum' => 1, + ), + 'term_taxonomy_id' => array( + /* translators: %s is the name of the term property (`term_id` or `term_taxonomy_id`). */ + 'description' => sprintf( __( 'The %s of the language term for this translatable entity.', 'polylang' ), '`term_taxonomy_id`' ), + 'type' => 'integer', + 'minimum' => 1, + ), + 'count' => array( + 'description' => __( 'Number of items of this type of content in this language.', 'polylang' ), + 'type' => 'integer', + 'minimum' => 0, + ), + ), + ); + } + + return $this->add_additional_fields_schema( $this->schema ); + } + + /** + * Retrieves an array of endpoint arguments from the item schema for the controller. + * Ensures that the `no_default_cat` property is returned only for `CREATABLE` requests. + * + * @since 3.7 + * + * @param string $method Optional. HTTP method of the request. Default WP_REST_Server::CREATABLE. + * @return array Endpoint arguments. + */ + public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) { + $schema = $this->get_item_schema(); + if ( WP_REST_Server::CREATABLE !== $method ) { + unset( $schema['properties']['no_default_cat'] ); + } else { + $schema['properties']['locale']['required'] = true; + } + + return rest_get_endpoint_args_for_schema( $schema, $method ); + } + + /** + * Tells if languages can be edited. + * + * @since 3.7 + * + * @return bool + */ + protected function check_update_permission(): bool { + return current_user_can( Capabilities::LANGUAGES ); + } + + /** + * Returns the language, if the ID is valid. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return PLL_Language|WP_Error Language object if the ID or slug is valid, WP_Error otherwise. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + private function get_language( WP_REST_Request $request ) { + if ( isset( $request['term_id'] ) ) { + $error = new WP_Error( + 'rest_invalid_id', + __( 'Invalid language ID', 'polylang' ), + array( 'status' => 404 ) + ); + + if ( $request['term_id'] <= 0 ) { + return $error; + } + + $language = $this->languages->get( (int) $request['term_id'] ); + + if ( ! $language instanceof PLL_Language ) { + return $error; + } + + return $language; + } + + if ( isset( $request['slug'] ) ) { + $language = $this->languages->get( (string) $request['slug'] ); + + if ( ! $language instanceof PLL_Language ) { + return new WP_Error( + 'rest_invalid_slug', + __( 'Invalid language slug', 'polylang' ), + array( 'status' => 404 ) + ); + } + + return $language; + } + + // Should not happen. + return new WP_Error( + 'rest_invalid_identifier', + __( 'Invalid language identifier', 'polylang' ), + array( 'status' => 404 ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/V1/Settings.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/V1/Settings.php new file mode 100644 index 0000000..0d255ec --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/V1/Settings.php @@ -0,0 +1,204 @@ +namespace = 'pll/v1'; + $this->rest_base = 'settings'; + $this->options = $model->options; + $this->languages = $model->languages; + } + + /** + * Registers the routes for options. + * + * @since 3.7 + * + * @return void + */ + public function register_routes(): void { + register_rest_route( + $this->namespace, + "/{$this->rest_base}", + array( + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_item' ), + 'permission_callback' => array( $this, 'update_item_permissions_check' ), + ), + array( + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => array( $this, 'update_item' ), + 'permission_callback' => array( $this, 'update_item_permissions_check' ), + 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ), + ), + 'schema' => array( $this, 'get_public_item_schema' ), + 'allow_batch' => array( 'v1' => true ), + ) + ); + } + + /** + * Retrieves all options. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function get_item( $request ) { + return $this->prepare_item_for_response( $this->options->get_all(), $request ); + } + + /** + * Updates option(s). + * This allows to update one or several options. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function update_item( $request ) { + $errors = new WP_Error(); + $schema = $this->options->get_schema(); + $options = array_intersect_key( + $request->get_params(), + rest_get_endpoint_args_for_schema( $schema, WP_REST_Server::EDITABLE ) // Remove fields with `readonly`. + ); + + foreach ( $options as $option_name => $new_value ) { + $previous_value = $this->options->get( $option_name ); + + if ( 'default_lang' === $option_name ) { + $result = $this->languages->update_default( $new_value ); + } else { + $result = $this->options->set( $option_name, $new_value ); + } + + if ( $result->has_errors() ) { + $errors->merge_from( $result ); + continue; + } + + if ( $this->options->get( $option_name ) === $previous_value ) { + continue; + } + + switch ( $option_name ) { + case 'rewrite': + case 'force_lang': + case 'hide_default': + flush_rewrite_rules(); + } + } + + if ( $errors->has_errors() ) { + return $this->add_status_to_error( $errors ); + } + + return $this->prepare_item_for_response( $this->options->get_all(), $request ); + } + + /** + * Checks if a given request has access to update the options. + * + * @since 3.7 + * + * @param WP_REST_Request $request Full details about the request. + * @return true|WP_Error True if the request has access to update the option, WP_Error object otherwise. + * + * @phpstan-template T of array + * @phpstan-param WP_REST_Request $request + */ + public function update_item_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + if ( ! current_user_can( 'manage_options' ) ) { + return new WP_Error( + 'rest_forbidden_context', + __( 'Sorry, you are not allowed to edit options.', 'polylang' ), + array( 'status' => rest_authorization_required_code() ) + ); + } + return true; + } + + /** + * Prepares the option value for the REST response. + * + * @since 3.7 + * + * @param array $item Option values. + * @param WP_REST_Request $request Request object. + * @return WP_REST_Response Response object. + * + * @phpstan-template T of array + * @phpstan-param array $item + * @phpstan-param WP_REST_Request $request + */ + public function prepare_item_for_response( $item, $request ) { + $fields = $this->get_fields_for_response( $request ); + $response = array(); + + foreach ( $item as $option => $value ) { + if ( rest_is_field_included( $option, $fields ) ) { + $response[ $option ] = $value; + } + } + + /** @var WP_REST_Response */ + return rest_ensure_response( $response ); + } + + /** + * Retrieves the options' schema, conforming to JSON Schema. + * + * @since 3.7 + * + * @return array Item schema data. + */ + public function get_item_schema(): array { + return $this->add_additional_fields_schema( $this->options->get_schema() ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/load.php new file mode 100644 index 0000000..b2af91b --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/REST/load.php @@ -0,0 +1,16 @@ +rest = new API( $polylang->model ); + add_action( 'rest_api_init', array( $polylang->rest, 'init' ) ); + } +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/machine-translation/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/machine-translation/load.php new file mode 100644 index 0000000..ea9e04f --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/machine-translation/load.php @@ -0,0 +1,18 @@ +model->has_languages() ) { + add_filter( + 'pll_settings_modules', + function ( $modules ) { + $modules[] = 'PLL_Settings_Preview_Machine_Translation'; + return $modules; + } + ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/machine-translation/settings-preview-machine-translation.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/machine-translation/settings-preview-machine-translation.php new file mode 100644 index 0000000..9651433 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/machine-translation/settings-preview-machine-translation.php @@ -0,0 +1,46 @@ + 'machine_translation', + 'title' => __( 'Machine Translation', 'polylang' ), + 'description' => __( 'Allows linkage to DeepL Translate.', 'polylang' ), + 'active_option' => 'preview', + ); + + parent::__construct( $polylang, array_merge( $default, $args ) ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/module-build.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/module-build.php new file mode 100644 index 0000000..320cafb --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/module-build.php @@ -0,0 +1,17 @@ +model->has_languages() ) { + add_filter( + 'pll_settings_modules', + function ( $modules ) { + $modules[] = 'PLL_Settings_Preview_Share_Slug'; + return $modules; + } + ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/share-slug/settings-preview-share-slug.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/share-slug/settings-preview-share-slug.php new file mode 100644 index 0000000..17f6913 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/share-slug/settings-preview-share-slug.php @@ -0,0 +1,56 @@ + 'share-slugs', + 'title' => __( 'Share slugs', 'polylang' ), + 'description' => $this->get_description(), + 'active_option' => 'preview', + ); + + parent::__construct( $polylang, array_merge( $default, $args ) ); + } + + /** + * Returns the module description. + * + * @since 3.1 + * + * @return string + */ + protected function get_description() { + return __( 'Allows to share the same URL slug across languages for posts and terms.', 'polylang' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/site-health/admin-site-health.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/site-health/admin-site-health.php new file mode 100644 index 0000000..b11a51e --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/site-health/admin-site-health.php @@ -0,0 +1,387 @@ +model = &$polylang->model; + $this->static_pages = &$polylang->static_pages; + + // Information tab. + add_filter( 'debug_information', array( $this, 'info_options' ), 15 ); + add_filter( 'debug_information', array( $this, 'info_languages' ), 15 ); + add_filter( 'debug_information', array( $this, 'info' ), 15 ); + + // Tests Tab. + add_filter( 'site_status_tests', array( $this, 'status_tests' ) ); + add_filter( 'site_status_test_php_modules', array( $this, 'site_status_test_php_modules' ) ); // Require simplexml in Site health. + } + + /** + * Returns a list of keys to exclude from the site health information. + * + * @since 2.8 + * + * @return string[] List of option keys to ignore. + */ + protected function exclude_options_keys() { + return array( + 'uninstall', + 'first_activation', + ); + } + + /** + * Returns a list of keys to exclude from the site health information. + * + * @since 2.8 + * + * @return string[] List of language keys to ignore. + */ + protected function exclude_language_keys() { + return array( + 'flag', + 'host', + 'taxonomy', + 'description', + 'parent', + 'filter', + 'custom_flag', + ); + } + + /** + * Add Polylang Options to Site Health Information tab. + * + * @since 2.8 + * @param array $debug_info The debug information to be added to the core information page. + * + * @return array + */ + public function info_options( $debug_info ) { + $fields = $this->model->options->get_site_health_info(); + + // Get effective translated post types and taxonomies. The options doesn't show all translated ones. + if ( ! empty( $this->model->get_translated_post_types() ) ) { + $fields['cpt']['label'] = __( 'Translated post types', 'polylang' ); + $fields['cpt']['value'] = implode( ', ', $this->model->get_translated_post_types() ); + } + if ( ! empty( $this->model->get_translated_taxonomies() ) ) { + $fields['taxonomies']['label'] = __( 'Translated taxonomies', 'polylang' ); + $fields['taxonomies']['value'] = implode( ', ', $this->model->get_translated_taxonomies() ); + } + + $debug_info['pll_options'] = array( + /* translators: placeholder is the plugin name */ + 'label' => sprintf( __( '%s options', 'polylang' ), POLYLANG ), + 'fields' => $fields, + ); + + return $debug_info; + } + + /** + * Adds Polylang Languages settings to Site Health Information tab. + * + * @since 2.8 + * + * @param array $debug_info The debug information to be added to the core information page. + * @return array + */ + public function info_languages( $debug_info ) { + foreach ( $this->model->get_languages_list() as $language ) { + $fields = array(); + + foreach ( $language->to_array() as $key => $value ) { + if ( in_array( $key, $this->exclude_language_keys(), true ) ) { + continue; + } + + if ( empty( $value ) ) { + $value = '0'; + } + + $fields[ $key ]['label'] = $key; + + if ( 'term_props' === $key && is_array( $value ) ) { + $fields[ $key ]['value'] = $this->get_info_term_props( $value ); + } else { + $fields[ $key ]['value'] = $value; + } + + if ( 'term_group' === $key ) { + $fields[ $key ]['label'] = 'order'; // Changed for readability but not translated as other keys are not. + } + } + + $debug_info[ 'pll_language_' . $language->slug ] = array( + /* translators: %1$s placeholder is the language name, %2$s is the language code */ + 'label' => sprintf( __( 'Language: %1$s - %2$s', 'polylang' ), $language->name, $language->slug ), + /* translators: placeholder is the flag image */ + 'description' => sprintf( esc_html__( 'Flag used in the language switcher: %s', 'polylang' ), $this->get_flag( $language ) ), + 'fields' => $fields, + ); + } + + return $debug_info; + } + + /** + * Adds term props data to the info languages array. + * + * @since 3.4 + * + * @param array $value The term props data. + * @return array The term props data formatted for the info languages tab. + */ + protected function get_info_term_props( $value ) { + $return_value = array(); + + foreach ( $value as $language_taxonomy => $item ) { + $language_taxonomy_array = array_fill( 0, count( $item ), $language_taxonomy ); + + $keys_with_language_taxonomy = array_map( + function ( $key, $language_taxonomy ) { + return "{$language_taxonomy}/{$key}"; + }, + array_keys( $item ), + $language_taxonomy_array + ); + + $value = array_combine( $keys_with_language_taxonomy, $item ); + if ( is_array( $value ) ) { + $return_value = array_merge( $return_value, $value ); + } + } + return $return_value; + } + + /** + * Returns the flag used in the language switcher. + * + * @since 2.8 + * + * @param PLL_Language $language Language object. + * @return string + */ + protected function get_flag( $language ) { + $flag = $language->get_display_flag(); + return empty( $flag ) ? '' . esc_html__( 'Undefined', 'polylang' ) . '' : $flag; + } + + /** + * Add a Site Health test on homepage translation. + * + * @since 2.8 + * + * @param array $tests Array with tests declaration data. + * @return array + */ + public function status_tests( $tests ) { + // Add the test only if the homepage displays static page. + if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_on_front' ) ) { + $tests['direct']['pll_homepage'] = array( + 'label' => esc_html__( 'Homepage translated', 'polylang' ), + 'test' => array( $this, 'homepage_test' ), + ); + } + return $tests; + } + + /** + * Test if the home page is translated or not. + * + * @since 2.8 + * + * @return array $result Array with test results. + */ + public function homepage_test() { + $result = array( + 'label' => __( 'All languages have a translated homepage', 'polylang' ), + 'status' => 'good', + 'badge' => array( + 'label' => POLYLANG, + 'color' => 'blue', + ), + 'description' => sprintf( + '

    %s

    ', + esc_html__( 'It is mandatory to translate the static front page in all languages.', 'polylang' ) + ), + 'actions' => '', + 'test' => 'pll_homepage', + ); + + $message = $this->static_pages->get_must_translate_message(); + + if ( ! empty( $message ) ) { + $result['status'] = 'critical'; + $result['label'] = __( 'The homepage is not translated in all languages', 'polylang' ); + $result['description'] = sprintf( '

    %s

    ', $message ); + } + return $result; + } + + /** + * Add Polylang Warnings to Site Health Information tab. + * + * @since 3.1 + * + * @param array $debug_info The debug information to be added to the core information page. + * @return array + */ + public function info( $debug_info ) { + $fields = array(); + + // Add Post Types without languages. + $posts_no_lang = $this->get_post_ids_without_lang(); + + if ( ! empty( $posts_no_lang ) ) { + $fields['post-no-lang']['label'] = __( 'Posts without language', 'polylang' ); + $fields['post-no-lang']['value'] = $posts_no_lang; + } + + $terms_no_lang = $this->get_term_ids_without_lang(); + + if ( ! empty( $terms_no_lang ) ) { + $fields['term-no-lang']['label'] = __( 'Terms without language', 'polylang' ); + $fields['term-no-lang']['value'] = $terms_no_lang; + } + + // Add WPML files. + $wpml_files = PLL_WPML_Config::instance()->get_files(); + if ( ! empty( $wpml_files ) ) { + $fields['wpml']['label'] = 'wpml-config.xml files'; + $fields['wpml']['value'] = $wpml_files; + + if ( ! extension_loaded( 'simplexml' ) ) { + $fields['simplexml']['label'] = __( 'PHP SimpleXML extension', 'polylang' ); + $fields['simplexml']['value'] = __( 'Not loaded. Contact your host provider.', 'polylang' ); + } + } + + // Multisite + if ( is_multisite() ) { + if ( is_plugin_active_for_network( POLYLANG_BASENAME ) ) { + $network_activated = __( 'Yes', 'polylang' ); + } else { + $network_activated = __( 'No', 'polylang' ); + } + $fields['network_activated'] = array( + 'label' => __( 'Network activated', 'polylang' ), + 'value' => $network_activated, + ); + } + + // Create the section. + if ( ! empty( $fields ) ) { + $debug_info['pll_warnings'] = array( + /* translators: placeholder is the plugin name */ + 'label' => sprintf( __( '%s information', 'polylang' ), POLYLANG ), + 'fields' => $fields, + ); + } + + return $debug_info; + } + + /** + * Get an array with post_type as key and post ids as value. + * + * @since 3.1 + * + * @param int $limit Max number of posts to show per post type. `-1` to return all of them. Default is 5. + * + * @return string[] An associative array where the keys are post types and the values + * are comma-separated strings of post IDs without a language. + * + * @phpstan-param -1|positive-int $limit * + */ + public function get_post_ids_without_lang( $limit = 5 ) { + $posts = array(); + + foreach ( $this->model->get_translated_post_types() as $post_type ) { + $post_ids_with_no_language = $this->model->get_posts_with_no_lang( $post_type, $limit ); + + if ( ! empty( $post_ids_with_no_language ) ) { + $posts[ $post_type ] = implode( ',', $post_ids_with_no_language ); + } + } + return $posts; + } + + /** + * Get an array with taxonomy as key and term ids as value. + * + * @since 3.1 + * @param int $limit Max number of terms to show per post type. `-1` to return all of them. Default is 5. + * + * @return string[] An associative array where the keys are post types and the values + * are comma-separated strings of post IDs without a language. + * @phpstan-param -1|positive-int $limit + */ + public function get_term_ids_without_lang( $limit = 5 ) { + $terms = array(); + + foreach ( $this->model->get_translated_taxonomies() as $taxonomy ) { + $term_ids_with_no_language = $this->model->get_terms_with_no_lang( $taxonomy, $limit ); + + if ( ! empty( $term_ids_with_no_language ) ) { + $terms[ $taxonomy ] = implode( ',', $term_ids_with_no_language ); + } + } + return $terms; + } + + /** + * Requires the simplexml PHP module when a wpml-config.xml has been found. + * + * @since 3.1 + * @since 3.2 Moved from PLL_WPML_Config + * + * @param array $modules An associative array of modules to test for. + * @return array + */ + public function site_status_test_php_modules( $modules ) { + $files = PLL_WPML_Config::instance()->get_files(); + if ( ! empty( $files ) ) { + $modules['simplexml'] = array( + 'extension' => 'simplexml', + 'required' => true, + ); + } + return $modules; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/site-health/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/site-health/load.php new file mode 100644 index 0000000..09edf1f --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/site-health/load.php @@ -0,0 +1,14 @@ +model->has_languages() ) { + $polylang->site_health = new PLL_Admin_Site_Health( $polylang ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/abstract-sitemaps.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/abstract-sitemaps.php new file mode 100644 index 0000000..76098ac --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/abstract-sitemaps.php @@ -0,0 +1,37 @@ + 'class-wp-sitemaps-posts' ); + return $whitelist; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/load.php new file mode 100644 index 0000000..9185676 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/load.php @@ -0,0 +1,17 @@ +model->has_languages() ) { + if ( $polylang->links_model instanceof PLL_Links_Abstract_Domain ) { + $polylang->sitemaps = new PLL_Sitemaps_Domain( $polylang ); + } else { + $polylang->sitemaps = new PLL_Sitemaps( $polylang ); + } + $polylang->sitemaps->init(); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/multilingual-sitemaps-provider.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/multilingual-sitemaps-provider.php new file mode 100644 index 0000000..adf6e45 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/multilingual-sitemaps-provider.php @@ -0,0 +1,218 @@ +name = $provider->name; + $this->object_type = $provider->object_type; + + $this->provider = $provider; + $this->links_model = &$links_model; + $this->model = &$links_model->model; + } + + /** + * Gets a URL list for a sitemap. + * + * @since 2.8 + * + * @param int $page_num Page of results. + * @param string $object_subtype Optional. Object subtype name. Default empty. + * @return array Array of URLs for a sitemap. + */ + public function get_url_list( $page_num, $object_subtype = '' ) { + return $this->provider->get_url_list( $page_num, $object_subtype ); + } + + /** + * Gets the max number of pages available for the object type. + * + * @since 2.8 + * + * @param string $object_subtype Optional. Object subtype. Default empty. + * @return int Total number of pages. + */ + public function get_max_num_pages( $object_subtype = '' ) { + return $this->provider->get_max_num_pages( $object_subtype ); + } + + /** + * Filters the query arguments to add the language. + * + * @since 2.8 + * + * @param array $args Sitemap provider WP_Query or WP_Term_Query arguments. + * @return array + */ + public static function query_args( $args ) { + if ( ! empty( self::$filter_lang ) ) { + $args['lang'] = self::$filter_lang; + } + return $args; + } + + /** + * Gets data for a given sitemap type. + * + * @since 2.8 + * + * @param string $object_subtype_name Object subtype name if any. + * @param string $lang Optional language name. + * @return array + */ + protected function get_sitemap_data( $object_subtype_name, $lang = '' ) { + $object_subtype_name = (string) $object_subtype_name; + + if ( ! empty( $lang ) ) { + self::$filter_lang = $lang; + } + + $return = array( + 'name' => implode( '-', array_filter( array( $object_subtype_name, $lang ) ) ), + 'pages' => $this->get_max_num_pages( $object_subtype_name ), + ); + + self::$filter_lang = ''; + return $return; + } + + /** + * Gets data about each sitemap type. + * + * @since 2.8 + * + * @return array[] Array of sitemap types including object subtype name and number of pages. + */ + public function get_sitemap_type_data() { + $sitemap_data = array(); + + add_filter( 'wp_sitemaps_posts_query_args', array( self::class, 'query_args' ) ); + add_filter( 'wp_sitemaps_taxonomies_query_args', array( self::class, 'query_args' ) ); + + $object_subtypes = $this->get_object_subtypes(); + + if ( empty( $object_subtypes ) ) { + foreach ( $this->model->get_languages_list( array( 'fields' => 'slug' ) ) as $language ) { + $sitemap_data[] = $this->get_sitemap_data( '', $language ); + } + } + + switch ( $this->provider->name ) { + case 'posts': + $func = array( $this->model, 'is_translated_post_type' ); + break; + case 'taxonomies': + $func = array( $this->model, 'is_translated_taxonomy' ); + break; + default: + return $sitemap_data; + } + + foreach ( array_keys( $object_subtypes ) as $object_subtype_name ) { + if ( call_user_func( $func, $object_subtype_name ) ) { + foreach ( $this->model->get_languages_list( array( 'fields' => 'slug' ) ) as $language ) { + $sitemap_data[] = $this->get_sitemap_data( $object_subtype_name, $language ); + } + } else { + $sitemap_data[] = $this->get_sitemap_data( $object_subtype_name ); + } + } + + return $sitemap_data; + } + + /** + * Gets the URL of a sitemap entry. + * + * @since 2.8 + * + * @param string $name The name of the sitemap. + * @param int $page The page of the sitemap. + * @return string The composed URL for a sitemap entry. + */ + public function get_sitemap_url( $name, $page ) { + // Check if a language was added in $name. + $pattern = '#(' . implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) . ')$#'; + if ( preg_match( $pattern, $name, $matches ) ) { + $lang = $this->model->get_language( $matches[1] ); + + if ( ! empty( $lang ) ) { + $name = preg_replace( '#(-?' . $lang->slug . ')$#', '', $name ); + $url = $this->provider->get_sitemap_url( $name, $page ); + return $this->links_model->add_language_to_link( $url, $lang ); + } + } + + // If no language is present in $name, we may attempt to get the current sitemap url (e.g. in redirect_canonical() ). + if ( get_query_var( 'lang' ) ) { + $lang = $this->model->get_language( get_query_var( 'lang' ) ); + $url = $this->provider->get_sitemap_url( $name, $page ); + return $this->links_model->add_language_to_link( $url, $lang ); + } + + return $this->provider->get_sitemap_url( $name, $page ); + } + + /** + * Returns the list of supported object subtypes exposed by the provider. + * + * @since 2.8 + * + * @return array List of object subtypes objects keyed by their name. + */ + public function get_object_subtypes() { + return $this->provider->get_object_subtypes(); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/sitemaps-domain.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/sitemaps-domain.php new file mode 100644 index 0000000..6294547 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/sitemaps-domain.php @@ -0,0 +1,71 @@ +links_model = &$polylang->links_model; + } + + /** + * Setups actions and filters. + * + * @since 3.0 + * + * @return void + */ + public function init() { + parent::init(); + + add_filter( 'wp_sitemaps_index_entry', array( $this, 'index_entry' ) ); + add_filter( 'wp_sitemaps_stylesheet_url', array( $this->links_model, 'site_url' ) ); + add_filter( 'wp_sitemaps_stylesheet_index_url', array( $this->links_model, 'site_url' ) ); + add_filter( 'home_url', array( $this, 'sitemap_url' ) ); + } + + /** + * Filters the sitemap index entries for subdomains and multiple domains. + * + * @since 2.8 + * + * @param array $sitemap_entry Sitemap entry for the post. + * @return array + */ + public function index_entry( $sitemap_entry ) { + $sitemap_entry['loc'] = $this->links_model->site_url( $sitemap_entry['loc'] ); + return $sitemap_entry; + } + + /** + * Makes sure that the sitemap urls are always evaluated on the current domain. + * + * @since 2.8.4 + * + * @param string $url A sitemap url. + * @return string + */ + public function sitemap_url( $url ) { + if ( false !== strpos( $url, '/wp-sitemap' ) ) { + $url = $this->links_model->site_url( $url ); + } + return $url; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/sitemaps.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/sitemaps.php new file mode 100644 index 0000000..66c7538 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sitemaps/sitemaps.php @@ -0,0 +1,126 @@ +links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = $polylang->options; + } + + /** + * Setups actions and filters. + * + * @since 2.8 + * + * @return void + */ + public function init() { + parent::init(); + + add_filter( 'pll_set_language_from_query', array( $this, 'set_language_from_query' ), 10, 2 ); + add_filter( 'rewrite_rules_array', array( $this, 'rewrite_rules' ) ); + add_filter( 'wp_sitemaps_add_provider', array( $this, 'replace_provider' ) ); + } + + /** + * Assigns the current language to the default language when the sitemap url + * doesn't include any language. + * + * @since 2.8 + * @since 3.8 Returns a language object instead of a language slug. + * + * @param PLL_Language|false $lang Current language code, false if not set yet. + * @param WP_Query $query Main WP query object. + * @return PLL_Language|false + */ + public function set_language_from_query( $lang, $query ) { + if ( isset( $query->query['sitemap'] ) && empty( $query->query['lang'] ) ) { + return $this->model->languages->get_default(); + } + return $lang; + } + + /** + * Filters the sitemaps rewrite rules to take the languages into account. + * + * @since 2.8 + * + * @param string[] $rules Rewrite rules. + * @return string[] Modified rewrite rules. + */ + public function rewrite_rules( $rules ) { + global $wp_rewrite; + + $languages = $this->model->languages + ->filter( $this->options['hide_default'] ? 'hide_default' : '' ) + ->get_list( array( 'fields' => 'slug' ) ); + + if ( empty( $languages ) ) { + return $rules; + } + + $slug = $wp_rewrite->root . ( $this->options['rewrite'] ? '^' : '^language/' ) . '(' . implode( '|', $languages ) . ')/'; + + $newrules = array(); + + foreach ( $rules as $key => $rule ) { + if ( false !== strpos( $rule, 'sitemap=$matches[1]' ) ) { + $newrules[ str_replace( '^wp-sitemap', $slug . 'wp-sitemap', $key ) ] = str_replace( + array( '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '[1]', '?' ), + array( '[9]', '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '?lang=$matches[1]&' ), + $rule + ); // Should be enough! + } + + $newrules[ $key ] = $rule; + } + return $newrules; + } + + /** + * Replaces a sitemap provider by our decorator. + * + * @since 2.8 + * + * @param WP_Sitemaps_Provider $provider Instance of a WP_Sitemaps_Provider. + * @return WP_Sitemaps_Provider + */ + public function replace_provider( $provider ) { + if ( $provider instanceof WP_Sitemaps_Provider ) { + $provider = new PLL_Multilingual_Sitemaps_Provider( $provider, $this->links_model ); + } + return $provider; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/admin-sync.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/admin-sync.php new file mode 100644 index 0000000..1c87fa5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/admin-sync.php @@ -0,0 +1,248 @@ +links = &$polylang->links; + + add_filter( 'wp_insert_post_parent', array( $this, 'wp_insert_post_parent' ) ); + add_filter( 'wp_insert_post_data', array( $this, 'wp_insert_post_data' ) ); + add_filter( 'use_block_editor_for_post', array( $this, 'new_post_translation' ), 5000 ); // After content duplication. + } + + /** + * Translates the post parent if it exists when using "Add new" (translation). + * + * @since 0.6 + * @since 3.8 Removed second and third parameters. + * + * @param int $post_parent Post parent ID. + * @return int + */ + public function wp_insert_post_parent( $post_parent ) { + $context_data = $this->links->get_data_from_new_post_translation_request(); + + if ( empty( $context_data ) ) { + return $post_parent; + } + + // Make sure not to impact media translations created at the same time. + $parent_id = wp_get_post_parent_id( $context_data['from_post'] ); + + if ( empty( $parent_id ) ) { + return $post_parent; + } + + $tr_parent = $this->model->post->get_translation( $parent_id, $context_data['new_lang'] ); + + if ( empty( $tr_parent ) ) { + return $post_parent; + } + + return $tr_parent; + } + + /** + * Copies menu order, comment, ping status and optionally the date when creating a new translation. + * + * @since 2.5 + * + * @param array $data An array of slashed post data. + * @return array + */ + public function wp_insert_post_data( $data ) { + $context_data = $this->links->get_data_from_new_post_translation_request(); + + if ( empty( $context_data ) ) { + return $data; + } + + foreach ( array( 'menu_order', 'comment_status', 'ping_status' ) as $property ) { + $data[ $property ] = $context_data['from_post']->$property; + } + + // Copy the date only if the synchronization is activated. + if ( in_array( 'post_date', $this->options['sync'], true ) ) { + $data['post_date'] = $context_data['from_post']->post_date; + $data['post_date_gmt'] = $context_data['from_post']->post_date_gmt; + } + + return $data; + } + + /** + * Copies post metas and taxonomies when using "Add new" (translation). + * + * @since 2.5 + * @since 3.1 Use of use_block_editor_for_post filter instead of rest_api_init which is triggered too early in WP 5.8. + * + * @param bool $is_block_editor Whether the post can be edited or not. + * @return bool + */ + public function new_post_translation( $is_block_editor ) { + global $post; + static $done = array(); + + if ( empty( $post ) ) { + return $is_block_editor; + } + + $context_data = $this->links->get_data_from_new_post_translation_request(); + + if ( empty( $context_data ) || ! empty( $done[ $context_data['from_post']->ID ] ) ) { + return $is_block_editor; + } + + $lang = $this->model->get_language( $context_data['new_lang'] ); + + if ( empty( $lang ) ) { + return $is_block_editor; + } + + $done[ $context_data['from_post']->ID ] = true; // Avoid a second duplication in the block editor. Using an array only to allow multiple phpunit tests. + + $this->taxonomies->copy( $context_data['from_post']->ID, $post->ID, $lang->slug ); + $this->post_metas->copy( $context_data['from_post']->ID, $post->ID, $lang->slug ); + + if ( is_sticky( $context_data['from_post']->ID ) ) { + stick_post( $post->ID ); + } + + return $is_block_editor; + } + + /** + * Get post fields to synchronize. + * + * @since 2.4 + * + * @param WP_Post $post Post object. + * @return array Fields to synchronize. + */ + protected function get_fields_to_sync( $post ) { + global $wpdb; + + $postarr = parent::get_fields_to_sync( $post ); + $context_data = $this->links->get_data_from_new_post_translation_request(); + + // For new drafts, save the date now otherwise it is overridden by WP. Thanks to JoryHogeveen. See #32. + if ( ! empty( $context_data ) && in_array( 'post_date', $this->options['sync'], true ) ) { + unset( $postarr['post_date'] ); + unset( $postarr['post_date_gmt'] ); + + $wpdb->update( + $wpdb->posts, + array( + 'post_date' => $context_data['from_post']->post_date, + 'post_date_gmt' => $context_data['from_post']->post_date_gmt, + ), + array( 'ID' => $post->ID ) + ); + } + + if ( isset( $GLOBALS['post_type'] ) ) { + $post_type = $GLOBALS['post_type']; + } elseif ( isset( $_REQUEST['post_type'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + // 2nd case for quick edit. + $post_type = sanitize_key( $_REQUEST['post_type'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended + } + + // Make sure not to impact media translations when creating them at the same time as post + if ( in_array( 'post_parent', $this->options['sync'], true ) && ( ! isset( $post_type ) || $post_type !== $post->post_type ) ) { + unset( $postarr['post_parent'] ); + } + + return $postarr; + } + + /** + * Synchronizes post fields in translations. + * + * @since 1.2 + * + * @param int $post_id Post id. + * @param WP_Post $post Post object. + * @param int[] $translations Post translations. + */ + public function pll_save_post( $post_id, $post, $translations ) { + parent::pll_save_post( $post_id, $post, $translations ); + + // Sticky posts + if ( in_array( 'sticky_posts', $this->options['sync'] ) ) { + $stickies = get_option( 'sticky_posts' ); + if ( isset( $_REQUEST['sticky'] ) && 'sticky' === $_REQUEST['sticky'] ) { // phpcs:ignore WordPress.Security.NonceVerification + $stickies = array_merge( $stickies, array_values( $translations ) ); + } else { + $stickies = array_diff( $stickies, array_values( $translations ) ); + } + update_option( 'sticky_posts', array_unique( $stickies ) ); + } + } + + /** + * Some backward compatibility with Polylang < 2.3 + * allows to call PLL()->sync->copy_post_metas() and PLL()->sync->copy_taxonomies() + * used for example in Polylang for WooCommerce + * the compatibility is however only partial as the 4th argument $sync is lost + * + * @since 2.3 + * + * @throws BadMethodCallException If the method is not found. + * + * @param string $func Function name + * @param array $args Function arguments + * @return mixed|void + */ + public function __call( $func, $args ) { + $obj = substr( $func, 5 ); + + if ( is_object( $this->$obj ) && method_exists( $this->$obj, 'copy' ) ) { + if ( WP_DEBUG ) { + $debug = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions + $i = 1 + empty( $debug[1]['line'] ); // The file and line are in $debug[2] if the function was called using call_user_func + + trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions + sprintf( + '%1$s was called incorrectly in %3$s on line %4$s: the call to PLL()->sync->%1$s() has been deprecated in Polylang 2.3, use PLL()->sync->%2$s->copy() instead.' . "\nError handler", + esc_html( $func ), + esc_html( $obj ), + esc_html( $debug[ $i ]['file'] ), + absint( $debug[ $i ]['line'] ) + ) + ); + } + return call_user_func_array( array( $this->$obj, 'copy' ), $args ); + } + + $debug = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions + throw new BadMethodCallException( + sprintf( + 'Call to undefined method PLL()->sync->%1$s() in %2$s on line %3$s' . "\nError handler", + esc_html( $func ), + esc_html( $debug[0]['file'] ), + absint( $debug[0]['line'] ) + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/load.php new file mode 100644 index 0000000..6978cd6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/load.php @@ -0,0 +1,26 @@ +model->has_languages() ) { + if ( $polylang instanceof PLL_Admin_Base ) { + $polylang->sync = new PLL_Admin_Sync( $polylang ); + } else { + $polylang->sync = new PLL_Sync( $polylang ); + } + + add_filter( + 'pll_settings_modules', + function ( $modules ) { + $modules[] = 'PLL_Settings_Sync'; + return $modules; + } + ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/settings-sync.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/settings-sync.php new file mode 100644 index 0000000..28456f5 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/settings-sync.php @@ -0,0 +1,116 @@ + 'sync', + 'title' => __( 'Synchronization', 'polylang' ), + 'description' => __( 'The synchronization options allow to maintain exact same values (or translations in the case of taxonomies and page parent) of meta content between the translations of a post or page.', 'polylang' ), + ) + ); + } + + /** + * Deactivates the module + * + * @since 1.8 + */ + public function deactivate() { + $this->options['sync'] = array(); + } + + /** + * Displays the settings form + * + * @since 1.8 + */ + protected function form() { + ?> +
      + $str ) { + printf( + '
    • ', + esc_attr( $key ), + checked( in_array( $key, $this->options['sync'] ), true, false ), + esc_html( $str ) + ); + } + ?> +
    + empty( $options['sync'] ) ? array() : array_keys( $options['sync'], 1 ) ); + } + + /** + * Get the row actions. + * + * @since 1.8 + * + * @return string[] Row actions. + */ + protected function get_actions() { + return empty( $this->options['sync'] ) ? array( 'configure' ) : array( 'configure', 'deactivate' ); + } + + /** + * Get the list of synchronization settings. + * + * @since 1.0 + * + * @return string[] Array synchronization options. + * + * @phpstan-return non-empty-array + */ + public static function list_metas_to_sync() { + return array( + 'taxonomies' => __( 'Taxonomies', 'polylang' ), + 'post_meta' => __( 'Custom fields', 'polylang' ), + 'comment_status' => __( 'Comment status', 'polylang' ), + 'ping_status' => __( 'Ping status', 'polylang' ), + 'sticky_posts' => __( 'Sticky posts', 'polylang' ), + 'post_date' => __( 'Published date', 'polylang' ), + 'post_format' => __( 'Post format', 'polylang' ), + 'post_parent' => __( 'Page parent', 'polylang' ), + '_wp_page_template' => __( 'Page template', 'polylang' ), + 'menu_order' => __( 'Page order', 'polylang' ), + '_thumbnail_id' => __( 'Featured image', 'polylang' ), + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-metas.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-metas.php new file mode 100644 index 0000000..822e763 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-metas.php @@ -0,0 +1,406 @@ +model = &$polylang->model; + + add_filter( "add_{$this->meta_type}_metadata", array( $this, 'can_synchronize_metadata' ), 1, 3 ); + add_filter( "update_{$this->meta_type}_metadata", array( $this, 'can_synchronize_metadata' ), 1, 3 ); + add_filter( "delete_{$this->meta_type}_metadata", array( $this, 'can_synchronize_metadata' ), 1, 3 ); + + $this->add_all_meta_actions(); + + add_action( "pll_save_{$this->meta_type}", array( $this, 'save_object' ), 10, 3 ); + } + + /** + * Removes "added_{$this->meta_type}_meta" action + * + * @since 2.3 + * + * @return void + */ + protected function remove_add_meta_action() { + remove_action( "added_{$this->meta_type}_meta", array( $this, 'add_meta' ) ); + } + + /** + * Removes all meta synchronization actions and filters + * + * @since 2.3 + * + * @return void + */ + public function remove_all_meta_actions() { + $this->remove_add_meta_action(); + + remove_filter( "update_{$this->meta_type}_metadata", array( $this, 'update_metadata' ), 999 ); + remove_action( "update_{$this->meta_type}_meta", array( $this, 'update_meta' ) ); + + remove_action( "delete_{$this->meta_type}_meta", array( $this, 'store_metas_to_sync' ) ); + remove_action( "deleted_{$this->meta_type}_meta", array( $this, 'delete_meta' ) ); + } + + /** + * Adds "added_{$this->meta_type}_meta" action + * + * @since 2.3 + * + * @return void + */ + protected function restore_add_meta_action() { + add_action( "added_{$this->meta_type}_meta", array( $this, 'add_meta' ), 10, 4 ); + } + + /** + * Adds meta synchronization actions and filters + * + * @since 2.3 + * + * @return void + */ + public function add_all_meta_actions() { + $this->restore_add_meta_action(); + + add_filter( "update_{$this->meta_type}_metadata", array( $this, 'update_metadata' ), 999, 5 ); // Very late in case a filter prevents the meta to be updated + add_action( "update_{$this->meta_type}_meta", array( $this, 'update_meta' ), 10, 4 ); + + add_action( "delete_{$this->meta_type}_meta", array( $this, 'store_metas_to_sync' ), 10, 2 ); + add_action( "deleted_{$this->meta_type}_meta", array( $this, 'delete_meta' ), 10, 4 ); + } + + /** + * Maybe modify ("translate") a meta value when it is copied or synchronized + * + * @since 2.3 + * + * @param mixed $value Meta value + * @param string $key Meta key + * @param int $from Id of the source + * @param int $to Id of the target + * @param string $lang Language of target + * @return mixed + */ + protected function maybe_translate_value( $value, $key, $from, $to, $lang ) { + /** + * Filter a meta value before is copied or synchronized + * + * @since 2.3 + * + * @param mixed $value Meta value + * @param string $key Meta key + * @param string $lang Language of target + * @param int $from Id of the source + * @param int $to Id of the target + */ + return apply_filters( "pll_translate_{$this->meta_type}_meta", $value, $key, $lang, $from, $to ); + } + + /** + * Get the custom fields to copy or synchronize. + * + * @since 2.3 + * + * @param int $from Id of the post from which we copy information. + * @param int $to Id of the post to which we paste information. + * @param string $lang Language slug. + * @param bool $sync True if it is synchronization, false if it is a copy. + * @return string[] List of meta keys. + */ + protected function get_metas_to_copy( $from, $to, $lang, $sync = false ) { + /** + * Filters the custom fields to copy or synchronize. + * + * @since 0.6 + * @since 1.9.2 The `$from`, `$to`, `$lang` parameters were added. + * + * @param string[] $keys List of custom fields names. + * @param bool $sync True if it is synchronization, false if it is a copy. + * @param int $from Id of the post from which we copy information. + * @param int $to Id of the post to which we paste information. + * @param string $lang Language slug. + */ + return array_unique( apply_filters( "pll_copy_{$this->meta_type}_metas", array(), $sync, $from, $to, $lang ) ); + } + + /** + * Disallow modifying synchronized meta if the current user can not modify translations + * + * @since 2.6 + * + * @param null|bool $check Whether to allow adding/updating/deleting metadata. + * @param int $id Object ID. + * @param string $meta_key Meta key. + * @return null|bool + */ + public function can_synchronize_metadata( $check, $id, $meta_key ) { + if ( ! $this->model->{$this->meta_type}->current_user_can_synchronize( $id ) ) { + $tr_ids = $this->model->{$this->meta_type}->get_translations( $id ); + + foreach ( $tr_ids as $lang => $tr_id ) { + if ( $tr_id != $id ) { + $to_copy = $this->get_metas_to_copy( $id, $tr_id, $lang, true ); + if ( in_array( $meta_key, $to_copy ) ) { + return false; + } + } + } + } + return $check; + } + + /** + * Synchronize added metas across translations + * + * @since 2.3 + * + * @param int $mid Meta id. + * @param int $id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. Must be serializable if non-scalar. + * @return void + */ + public function add_meta( $mid, $id, $meta_key, $meta_value ) { + static $avoid_recursion = false; + + if ( ! $avoid_recursion ) { + $avoid_recursion = true; + $tr_ids = $this->model->{$this->meta_type}->get_translations( $id ); + + foreach ( $tr_ids as $lang => $tr_id ) { + if ( $tr_id != $id ) { + $to_copy = $this->get_metas_to_copy( $id, $tr_id, $lang, true ); + if ( in_array( $meta_key, $to_copy ) ) { + $meta_value = $this->maybe_translate_value( $meta_value, $meta_key, $id, $tr_id, $lang ); + add_metadata( $this->meta_type, $tr_id, wp_slash( $meta_key ), is_object( $meta_value ) ? $meta_value : wp_slash( $meta_value ) ); + } + } + } + + $avoid_recursion = false; + } + } + + /** + * Stores the previous value when updating metas + * + * @since 2.3 + * + * @param null|bool $r Not used + * @param int $id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. Must be serializable if non-scalar. + * @param mixed $prev_value If specified, only update existing metadata entries with the specified value. + * @return null|bool Unchanged + */ + public function update_metadata( $r, $id, $meta_key, $meta_value, $prev_value ) { + if ( null === $r ) { + $hash = md5( "$id|$meta_key|" . maybe_serialize( $meta_value ) ); + $this->prev_value[ $hash ] = $prev_value; + } + return $r; + } + + /** + * Synchronize updated metas across translations + * + * @since 2.3 + * + * @param int $mid Meta id. + * @param int $id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. Must be serializable if non-scalar. + * @return void + */ + public function update_meta( $mid, $id, $meta_key, $meta_value ) { + static $avoid_recursion = false; + $id = (int) $id; + + if ( ! $avoid_recursion ) { + $avoid_recursion = true; + $hash = md5( "$id|$meta_key|" . maybe_serialize( $meta_value ) ); + + $prev_meta = get_metadata_by_mid( $this->meta_type, $mid ); + + if ( $prev_meta ) { + $this->remove_add_meta_action(); // We don't want to sync back the new metas + $tr_ids = $this->model->{$this->meta_type}->get_translations( $id ); + + foreach ( $tr_ids as $lang => $tr_id ) { + if ( $tr_id != $id && in_array( $meta_key, $this->get_metas_to_copy( $id, $tr_id, $lang, true ) ) ) { + if ( empty( $this->prev_value[ $hash ] ) || $this->prev_value[ $hash ] === $prev_meta->meta_value ) { + $prev_value = $this->maybe_translate_value( $prev_meta->meta_value, $meta_key, $id, $tr_id, $lang ); + $meta_value = $this->maybe_translate_value( $meta_value, $meta_key, $id, $tr_id, $lang ); + update_metadata( $this->meta_type, $tr_id, wp_slash( $meta_key ), is_object( $meta_value ) ? $meta_value : wp_slash( $meta_value ), $prev_value ); + } + } + } + $this->restore_add_meta_action(); + } + + unset( $this->prev_value[ $hash ] ); + $avoid_recursion = false; + } + } + + /** + * Store metas to synchronize before deleting them. + * + * @since 2.3 + * + * @param int[] $mids Not used. + * @param int $id Object ID. + * @return void + */ + public function store_metas_to_sync( $mids, $id ) { + $tr_ids = $this->model->{$this->meta_type}->get_translations( $id ); + + foreach ( $tr_ids as $lang => $tr_id ) { + $this->to_copy[ $id ][ $tr_id ] = $this->get_metas_to_copy( $id, $tr_id, $lang, true ); + } + } + + /** + * Synchronizes deleted meta across translations. + * + * @since 2.3 + * + * @param int[] $mids Not used. + * @param int $id Object ID. + * @param string $key Meta key. + * @param mixed $value Meta value. + * @return void + */ + public function delete_meta( $mids, $id, $key, $value ) { + static $avoid_recursion = false; + + if ( ! $avoid_recursion ) { + $avoid_recursion = true; + + $tr_ids = $this->model->{$this->meta_type}->get_translations( $id ); + + foreach ( $tr_ids as $lang => $tr_id ) { + if ( $tr_id != $id ) { + if ( in_array( $key, $this->to_copy[ $id ][ $tr_id ] ) ) { + if ( '' !== $value && null !== $value && false !== $value ) { // Same test as WP + $value = $this->maybe_translate_value( $value, $key, $id, $tr_id, $lang ); + } + delete_metadata( $this->meta_type, $tr_id, wp_slash( $key ), is_object( $value ) ? $value : wp_slash( $value ) ); + } + } + } + } + + $avoid_recursion = false; + } + + /** + * Copy or synchronize metas + * + * @since 2.3 + * + * @param int $from Id of the source object + * @param int $to Id of the target object + * @param string $lang Language code of the target object + * @param bool $sync Optional, defaults to true. True if it is synchronization, false if it is a copy + * @return void + */ + public function copy( $from, $to, $lang, $sync = false ) { + $this->remove_all_meta_actions(); + + $to_copy = $this->get_metas_to_copy( $from, $to, $lang, $sync ); + $metas = get_metadata( $this->meta_type, $from ); + $metas = is_array( $metas ) ? $metas : array(); + $tr_metas = get_metadata( $this->meta_type, $to ); + $tr_metas = is_array( $tr_metas ) ? $tr_metas : array(); + + foreach ( $to_copy as $key ) { + if ( empty( $metas[ $key ] ) ) { + if ( ! empty( $tr_metas[ $key ] ) ) { + // If the meta key is not present in the source object, delete all values + delete_metadata( $this->meta_type, $to, wp_slash( $key ) ); + } + } elseif ( ! empty( $tr_metas[ $key ] ) && 1 === count( $metas[ $key ] ) && 1 === count( $tr_metas[ $key ] ) ) { + // One custom field to update + $value = reset( $metas[ $key ] ); + $value = maybe_unserialize( $value ); + $to_value = $this->maybe_translate_value( $value, $key, $from, $to, $lang ); + update_metadata( $this->meta_type, $to, wp_slash( $key ), is_object( $to_value ) ? $to_value : wp_slash( $to_value ) ); + } else { + // Multiple custom fields, either in the source or the target + if ( ! empty( $tr_metas[ $key ] ) ) { + // The synchronization of multiple values custom fields is easier if we delete all metas first + delete_metadata( $this->meta_type, $to, wp_slash( $key ) ); + } + + foreach ( $metas[ $key ] as $value ) { + $value = maybe_unserialize( $value ); + $to_value = $this->maybe_translate_value( $value, $key, $from, $to, $lang ); + add_metadata( $this->meta_type, $to, wp_slash( $key ), is_object( $to_value ) ? $to_value : wp_slash( $to_value ) ); + } + } + } + + $this->add_all_meta_actions(); + } + + /** + * If synchronized custom fields were previously not synchronized, it is expected + * that saving a post (or term) will synchronize them. + * + * @since 2.3 + * + * @param int $object_id Id of the object being saved. + * @param object $obj Not used. + * @param int[] $translations The list of translations object ids. + * @return void + */ + public function save_object( $object_id, $obj, $translations ) { + foreach ( $translations as $tr_lang => $tr_id ) { + if ( $tr_id != $object_id ) { + $this->copy( $object_id, $tr_id, $tr_lang, true ); + } + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-post-metas.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-post-metas.php new file mode 100644 index 0000000..e11e939 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-post-metas.php @@ -0,0 +1,99 @@ +meta_type = 'post'; + + parent::__construct( $polylang ); + + $this->options = $polylang->options; + + add_filter( 'pll_translate_post_meta', array( $this, 'translate_thumbnail_id' ), 10, 3 ); + } + + /** + * Get the custom fields to copy or synchronize. + * + * @since 2.3 + * + * @param int $from Id of the post from which we copy information. + * @param int $to Id of the post to which we paste information. + * @param string $lang Language slug. + * @param bool $sync True if it is synchronization, false if it is a copy. + * @return string[] List of meta keys. + */ + protected function get_metas_to_copy( $from, $to, $lang, $sync = false ) { + $keys = array(); + + // Get public meta keys ( including from translated post in case we just deleted a custom field ). + if ( ! $sync || in_array( 'post_meta', $this->options['sync'] ) ) { + $from_keys = (array) get_post_custom_keys( $from ); + $to_keys = (array) get_post_custom_keys( $to ); + + $keys = array_unique( array_merge( $from_keys, $to_keys ) ); + foreach ( $keys as $k => $meta_key ) { + if ( is_protected_meta( $meta_key ) ) { + unset( $keys[ $k ] ); + } + } + } + + // Add page template and featured image. + foreach ( array( '_wp_page_template', '_thumbnail_id' ) as $meta ) { + if ( ! $sync || in_array( $meta, $this->options['sync'] ) ) { + $keys[] = $meta; + } + } + + if ( $this->options['media_support'] ) { + $keys[] = '_wp_attached_file'; + $keys[] = '_wp_attachment_metadata'; + $keys[] = '_wp_attachment_backup_sizes'; + $keys[] = '_wp_attachment_is_custom_header'; // Random header image. + } + + /** This filter is documented in src/modules/sync/sync-metas.php */ + return array_unique( apply_filters( 'pll_copy_post_metas', $keys, $sync, $from, $to, $lang ) ); + } + + /** + * Translates the thumbnail id. + * + * @since 2.3 + * + * @param int $value Thumbnail id. + * @param string $key Meta key. + * @param string $lang Language code. + * @return int + */ + public function translate_thumbnail_id( $value, $key, $lang ) { + if ( ! $this->options['media_support'] || '_thumbnail_id' !== $key ) { + return $value; + } + + $to_value = $this->model->post->get_translation( $value, $lang ); + return $to_value ?: $value; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-tax.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-tax.php new file mode 100644 index 0000000..cc59984 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-tax.php @@ -0,0 +1,310 @@ +model = &$polylang->model; + $this->options = $polylang->options; + + add_action( 'set_object_terms', array( $this, 'set_object_terms' ), 10, 5 ); + add_action( 'pll_save_term', array( $this, 'create_term' ), 10, 3 ); + add_action( 'pre_delete_term', array( $this, 'pre_delete_term' ) ); + add_action( 'delete_term', array( $this, 'delete_term' ) ); + } + + /** + * Get the list of taxonomies to copy or to synchronize. + * + * @since 1.7 + * @since 2.1 The `$from`, `$to`, `$lang` parameters were added. + * @since 3.2 Changed visibility from protected to public. + * + * @param bool $sync True if it is synchronization, false if it is a copy. + * @param int $from Id of the post from which we copy information, optional, defaults to null. + * @param int $to Id of the post to which we paste information, optional, defaults to null. + * @param string $lang Language slug, optional, defaults to null. + * @return string[] List of taxonomy names. + */ + public function get_taxonomies_to_copy( $sync, $from = null, $to = null, $lang = null ) { + $taxonomies = ! $sync || in_array( 'taxonomies', $this->options['sync'] ) ? $this->model->get_translated_taxonomies() : array(); + if ( ! $sync || in_array( 'post_format', $this->options['sync'] ) ) { + $taxonomies[] = 'post_format'; + } + + /** + * Filters the taxonomies to copy or synchronize. + * + * @since 1.7 + * @since 2.1 The `$from`, `$to`, `$lang` parameters were added. + * + * @param string[] $taxonomies List of taxonomy names. + * @param bool $sync True if it is synchronization, false if it is a copy. + * @param int $from Id of the post from which we copy information. + * @param int $to Id of the post to which we paste information. + * @param string $lang Language slug. + */ + return array_unique( apply_filters( 'pll_copy_taxonomies', $taxonomies, $sync, $from, $to, $lang ) ); + } + + /** + * When copying or synchronizing terms, translate terms in translatable taxonomies + * + * @since 2.3 + * + * @param int $object_id Object ID. + * @param int[] $terms List of terms ids assigned to the source post. + * @param string $taxonomy Taxonomy name. + * @param string $lang Language slug. + * @return int[] List of terms ids to assign to the target post. + */ + protected function maybe_translate_terms( $object_id, $terms, $taxonomy, $lang ) { + if ( is_array( $terms ) && $this->model->is_translated_taxonomy( $taxonomy ) ) { + $newterms = array(); + + // Convert to term ids if we got tag names + $strings = array_map( 'is_string', $terms ); + if ( in_array( true, $strings, true ) ) { + $terms = get_the_terms( $object_id, $taxonomy ); + $terms = wp_list_pluck( $terms, 'term_id' ); + } + + foreach ( $terms as $term ) { + /** + * Filter the translated term when a post translation is created or synchronized + * + * @since 2.3 + * + * @param int $tr_term Translated term id + * @param int $term Source term id + * @param string $lang Language slug + */ + if ( $term_id = apply_filters( 'pll_maybe_translate_term', (int) $this->model->term->get_translation( $term, $lang ), $term, $lang ) ) { + $newterms[] = (int) $term_id; // Cast is important otherwise we get 'numeric' tags + } + } + + return $newterms; + } + + return $terms; // Empty $terms or untranslated taxonomy + } + + /** + * Maybe copy taxonomy terms from one post to the other. + * + * @since 2.6 + * + * @param int $object_id Source object ID. + * @param int $tr_id Target object ID. + * @param string $lang Target language. + * @param array $terms An array of object terms. + * @param string $taxonomy Taxonomy slug. + * @param bool $append Whether to append new terms to the old terms. + * @return void + */ + protected function copy_object_terms( $object_id, $tr_id, $lang, $terms, $taxonomy, $append ) { + $to_copy = $this->get_taxonomies_to_copy( true, $object_id, $tr_id, $lang ); + + if ( in_array( $taxonomy, $to_copy ) ) { + $newterms = $this->maybe_translate_terms( $object_id, $terms, $taxonomy, $lang ); + + // For some reasons, the user may have untranslated terms in the translation. Don't forget them. + if ( $this->model->is_translated_taxonomy( $taxonomy ) ) { + $tr_terms = get_the_terms( $tr_id, $taxonomy ); + if ( is_array( $tr_terms ) ) { + foreach ( $tr_terms as $term ) { + if ( ! $this->model->term->get_translation( $term->term_id, $this->model->post->get_language( $object_id ) ) ) { + $newterms[] = (int) $term->term_id; + } + } + } + } + + wp_set_object_terms( $tr_id, $newterms, $taxonomy, $append ); + } + } + + /** + * When assigning terms to a post, assign translated terms to the translated posts (synchronisation). + * + * @since 2.3 + * + * @param int $object_id Object ID. + * @param array $terms An array of object terms. + * @param int[] $tt_ids An array of term taxonomy IDs. + * @param string $taxonomy Taxonomy slug. + * @param bool $append Whether to append new terms to the old terms. + * @return void + */ + public function set_object_terms( $object_id, $terms, $tt_ids, $taxonomy, $append ) { + static $avoid_recursion = false; + $taxonomy_object = get_taxonomy( $taxonomy ); + + // Make sure that the taxonomy is registered for a post type + if ( ! $avoid_recursion && ! empty( $taxonomy_object ) && array_filter( $taxonomy_object->object_type, 'post_type_exists' ) ) { + $avoid_recursion = true; + + $tr_ids = $this->model->post->get_translations( $object_id ); + + foreach ( $tr_ids as $lang => $tr_id ) { + if ( $tr_id !== $object_id ) { + if ( $this->model->post->current_user_can_synchronize( $object_id ) ) { + $this->copy_object_terms( $object_id, $tr_id, $lang, $terms, $taxonomy, $append ); + } else { + // No permission to synchronize, so let's synchronize in reverse order + $orig_lang = array_search( $object_id, $tr_ids ); + $tr_terms = get_the_terms( $tr_id, $taxonomy ); + + if ( false === $tr_terms ) { + $tr_terms = array(); + } + + if ( is_string( $orig_lang ) && is_array( $tr_terms ) ) { + $tr_terms = wp_list_pluck( $tr_terms, 'term_id' ); + $this->copy_object_terms( $tr_id, $object_id, $orig_lang, $tr_terms, $taxonomy, $append ); + } + break; + } + } + } + + $avoid_recursion = false; + } + } + + /** + * Copy terms from one post to a translation, does not sync + * + * @since 2.3 + * + * @param int $from Id of the source post + * @param int $to Id of the target post + * @param string $lang Language slug + * @return void + */ + public function copy( $from, $to, $lang ) { + remove_action( 'set_object_terms', array( $this, 'set_object_terms' ) ); + + // Get taxonomies to sync for this post type + $taxonomies = array_intersect( get_post_taxonomies( $from ), $this->get_taxonomies_to_copy( false, $from, $to, $lang ) ); + + // Update the term cache to reduce the number of queries in the loop + update_object_term_cache( array( $from ), get_post_type( $from ) ); + + // Copy + foreach ( $taxonomies as $tax ) { + if ( $terms = get_the_terms( $from, $tax ) ) { + $terms = array_map( 'intval', wp_list_pluck( $terms, 'term_id' ) ); + $newterms = $this->maybe_translate_terms( $from, $terms, $tax, $lang ); + + if ( ! empty( $newterms ) ) { + wp_set_object_terms( $to, $newterms, $tax ); + } + } + } + + add_action( 'set_object_terms', array( $this, 'set_object_terms' ), 10, 5 ); + } + + /** + * When creating a new term, associate it to posts having translations associated to the translated terms. + * + * @since 2.3 + * + * @param int $term_id Id of the created term. + * @param string $taxonomy Taxonomy. + * @param int[] $translations Ids of the translations of the created term. + * @return void + */ + public function create_term( $term_id, $taxonomy, $translations ) { + if ( doing_action( 'create_term' ) && in_array( $taxonomy, $this->get_taxonomies_to_copy( true ) ) ) { + // Get all posts associated to the translated terms + $tr_posts = get_posts( + array( + 'numberposts' => -1, + 'nopaging' => true, + 'post_type' => 'any', + 'post_status' => 'any', + 'fields' => 'ids', + 'tax_query' => array( + array( + 'taxonomy' => $taxonomy, + 'field' => 'id', + 'terms' => array_merge( array( $term_id ), array_values( $translations ) ), + 'include_children' => false, + ), + ), + ) + ); + + $lang = $this->model->term->get_language( $term_id ); // Language of the created term + $posts = array(); + + foreach ( $tr_posts as $post_id ) { + $post = $this->model->post->get_translation( $post_id, $lang ); + + if ( $post ) { + $posts[] = $post; + } + } + + $posts = array_unique( $posts ); + + foreach ( $posts as $post_id ) { + if ( current_user_can( 'assign_term', $term_id ) ) { + wp_set_object_terms( $post_id, $term_id, $taxonomy, true ); + } + } + } + } + + /** + * Deactivate the synchronization of terms before deleting a term + * to avoid translated terms to be removed from translated posts + * + * @since 2.3.2 + * + * @return void + */ + public function pre_delete_term() { + remove_action( 'set_object_terms', array( $this, 'set_object_terms' ) ); + } + + /** + * Re-activate the synchronization of terms after a term is deleted + * + * @since 2.3.2 + * + * @return void + */ + public function delete_term() { + add_action( 'set_object_terms', array( $this, 'set_object_terms' ), 10, 5 ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-term-metas.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-term-metas.php new file mode 100644 index 0000000..8dffb06 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync-term-metas.php @@ -0,0 +1,25 @@ +meta_type = 'term'; + + parent::__construct( $polylang ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync.php new file mode 100644 index 0000000..45a8938 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/sync/sync.php @@ -0,0 +1,279 @@ +model = &$polylang->model; + $this->options = $polylang->options; + + $this->taxonomies = new PLL_Sync_Tax( $polylang ); + $this->post_metas = new PLL_Sync_Post_Metas( $polylang ); + $this->term_metas = new PLL_Sync_Term_Metas( $polylang ); + + add_filter( 'wp_insert_post_parent', array( $this, 'can_sync_post_parent' ), 10, 3 ); + add_filter( 'wp_insert_post_data', array( $this, 'can_sync_post_data' ), 10, 2 ); + + add_action( 'pll_save_post', array( $this, 'pll_save_post' ), 10, 3 ); + add_action( 'created_term', array( $this, 'sync_term_parent' ), 10, 3 ); + add_action( 'edited_term', array( $this, 'sync_term_parent' ), 10, 3 ); + + add_action( 'pll_duplicate_term', array( $this->term_metas, 'copy' ), 10, 3 ); + + if ( $this->options['media_support'] ) { + add_action( 'pll_translate_media', array( $this->taxonomies, 'copy' ), 10, 3 ); + add_action( 'pll_translate_media', array( $this->post_metas, 'copy' ), 10, 3 ); + add_action( 'edit_attachment', array( $this, 'edit_attachment' ) ); + } + + add_filter( 'pre_update_option_sticky_posts', array( $this, 'sync_sticky_posts' ), 10, 2 ); + } + + /** + * Get post fields to synchronize. + * + * @since 2.4 + * + * @param WP_Post $post Post object. + * @return array + */ + protected function get_fields_to_sync( $post ) { + $postarr = array(); + + foreach ( array( 'comment_status', 'ping_status', 'menu_order' ) as $property ) { + if ( in_array( $property, $this->options['sync'] ) ) { + $postarr[ $property ] = $post->$property; + } + } + + if ( in_array( 'post_date', $this->options['sync'] ) ) { + $postarr['post_date'] = $post->post_date; + $postarr['post_date_gmt'] = $post->post_date_gmt; + } + + if ( in_array( 'post_parent', $this->options['sync'] ) ) { + $postarr['post_parent'] = wp_get_post_parent_id( $post->ID ); + } + + return $postarr; + } + + /** + * Prevents synchronized post parent modification if the current user hasn't enough rights + * + * @since 2.6 + * + * @param int $post_parent Post parent ID + * @param int $post_id Post ID, unused + * @param array $postarr Array of parsed post data + * @return int + */ + public function can_sync_post_parent( $post_parent, $post_id, $postarr ) { + if ( ! empty( $postarr['ID'] ) && ! $this->model->post->current_user_can_synchronize( $postarr['ID'] ) ) { + $tr_ids = $this->model->post->get_translations( $postarr['ID'] ); + foreach ( $tr_ids as $tr_id ) { + if ( $tr_id !== $postarr['ID'] && $post = get_post( $tr_id ) ) { + $post_parent = $post->post_parent; + break; + } + } + } + return $post_parent; + } + + /** + * Prevents synchronized post data modification if the current user hasn't enough rights + * + * @since 2.6 + * + * @param array $data An array of slashed post data. + * @param array $postarr An array of sanitized, but otherwise unmodified post data. + * @return array + */ + public function can_sync_post_data( $data, $postarr ) { + if ( ! empty( $postarr['ID'] ) && ! $this->model->post->current_user_can_synchronize( $postarr['ID'] ) ) { + foreach ( $this->model->post->get_translations( $postarr['ID'] ) as $tr_id ) { + if ( $tr_id !== $postarr['ID'] && $post = get_post( $tr_id ) ) { + $to_sync = $this->get_fields_to_sync( $post ); + $data = array_merge( $data, $to_sync ); + break; + } + } + } + return $data; + } + + /** + * Synchronizes post fields in translations. + * + * @since 2.4 + * + * @param int $post_id Post id. + * @param WP_Post $post Post object. + * @param int[] $translations Post translations. + * @return void + */ + public function pll_save_post( $post_id, $post, $translations ) { + global $wpdb; + + if ( $this->model->post->current_user_can_synchronize( $post_id ) ) { + $postarr = $this->get_fields_to_sync( $post ); + + if ( ! empty( $postarr ) ) { + foreach ( $translations as $lang => $tr_id ) { + if ( ! $tr_id || $tr_id === $post_id ) { + continue; + } + + $tr_arr = $postarr; + unset( $tr_arr['post_parent'] ); + + // Do not update the translation parent if the user set a parent with no translation. + if ( isset( $postarr['post_parent'] ) ) { + $post_parent = $postarr['post_parent'] ? $this->model->post->get_translation( $postarr['post_parent'], $lang ) : 0; + if ( ! ( $postarr['post_parent'] && ! $post_parent ) ) { + $tr_arr['post_parent'] = $post_parent; + } + } + + // Update all the rows at once. + if ( ! empty( $tr_arr ) ) { + // Don't use wp_update_post to avoid infinite loop. + $wpdb->update( $wpdb->posts, $tr_arr, array( 'ID' => $tr_id ) ); + clean_post_cache( $tr_id ); + } + } + } + } + } + + /** + * Synchronize term parent in translations. + * Calling clean_term_cache *after* this is mandatory otherwise the $taxonomy_children option is not correctly updated + * + * @since 2.3 + * + * @param int $term_id Term id. + * @param int $tt_id Term taxonomy id, not used. + * @param string $taxonomy Taxonomy name. + * @return void + */ + public function sync_term_parent( $term_id, $tt_id, $taxonomy ) { + global $wpdb; + + if ( ! is_taxonomy_hierarchical( $taxonomy ) || ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return; + } + + $term = get_term( $term_id ); + if ( ! $term instanceof WP_Term ) { + return; + } + + $translations = $this->model->term->get_translations( $term_id ); + + foreach ( $translations as $lang => $tr_id ) { + if ( $tr_id === $term_id ) { + continue; + } + + $tr_parent = $this->model->term->get_translation( $term->parent, $lang ); + $tr_term = get_term( (int) $tr_id, $taxonomy ); + + if ( str_starts_with( (string) current_filter(), 'created_' ) && 0 === $tr_parent ) { + // Do not remove the existing hierarchy of translations when creating new term without parent. + continue; + } + + if ( $tr_term instanceof WP_Term && ! ( $term->parent && empty( $tr_parent ) ) ) { + $wpdb->update( + $wpdb->term_taxonomy, + array( 'parent' => $tr_parent ?: 0 ), + array( 'term_taxonomy_id' => $tr_term->term_taxonomy_id ) + ); + + clean_term_cache( $tr_id, $taxonomy ); // OK since WP 3.9. + } + } + } + + /** + * Synchronizes terms and metas in translations for media + * + * @since 1.8 + * + * @param int $post_id post id + * @return void + */ + public function edit_attachment( $post_id ) { + $this->pll_save_post( $post_id, get_post( $post_id ), $this->model->post->get_translations( $post_id ) ); + } + + /** + * Synchronize sticky posts. + * + * @since 2.3 + * + * @param int[] $value New option value. + * @param int[] $old_value Old option value. + * @return int[] + */ + public function sync_sticky_posts( $value, $old_value ) { + if ( in_array( 'sticky_posts', $this->options['sync'] ) ) { + // Stick post + if ( $sticked = array_diff( $value, $old_value ) ) { + $translations = $this->model->post->get_translations( reset( $sticked ) ); + $value = array_unique( array_merge( $value, array_values( $translations ) ) ); + } + + // Unstick post + if ( $unsticked = array_diff( $old_value, $value ) ) { + $translations = $this->model->post->get_translations( reset( $unsticked ) ); + $value = array_unique( array_diff( $value, array_values( $translations ) ) ); + } + } + + return $value; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/translate-slugs/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/translate-slugs/load.php new file mode 100644 index 0000000..0a14423 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/translate-slugs/load.php @@ -0,0 +1,20 @@ +model->has_languages() ) { + add_filter( + 'pll_settings_modules', + function ( $modules ) { + $modules[] = 'PLL_Settings_Preview_Translate_Slugs'; + return $modules; + } + ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/translate-slugs/settings-preview-translate-slugs.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/translate-slugs/settings-preview-translate-slugs.php new file mode 100644 index 0000000..a17d741 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/translate-slugs/settings-preview-translate-slugs.php @@ -0,0 +1,56 @@ + 'translate-slugs', + 'title' => __( 'Translate slugs', 'polylang' ), + 'description' => $this->get_description(), + 'active_option' => 'preview', + ); + + parent::__construct( $polylang, array_merge( $default, $args ) ); + } + + /** + * Returns the module description. + * + * @since 3.1 + * + * @return string + */ + protected function get_description() { + return __( 'Allows to translate custom post types and taxonomies slugs in URLs.', 'polylang' ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/html-wizard-notice.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/html-wizard-notice.php new file mode 100644 index 0000000..d2ef5a9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/html-wizard-notice.php @@ -0,0 +1,49 @@ + 'mlang_wizard', + ), + admin_url( 'admin.php' ) +); +?> +

    + + + + +

    +

    + + + + +

    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/images/media-screen-rtl.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/images/media-screen-rtl.png new file mode 100644 index 0000000000000000000000000000000000000000..293e18f4f922e56c08d7f736f3333b4c30880dd3 GIT binary patch literal 21885 zcmZ^~cRZDE{0Ds9XW$@?y>*ZgG9%k5dt}Rq%#cl15qA=@vx|@v*(19+MJR=2&m$QX z*^&92zQ5=BJ+Id@{<`n`I@kJquJ`->`P}z)od-q+TBj)4DFFbdbhOn?06>v$5yccp z(nXxIf0}f$HPScJI6ORDTU*=O+B!KonV6bg{_$gEY;y1KUiclj;92pvZ{PaA3^&(S zew_M7c-JK@tLWnFnwXmXylr4(?921?`;(oow~miODn4#UCv1z#AD|hxn_Js8_0LDw zkFcF_Ze()>)Xdnde5TFD`07d}D|Eq}j8UezC`aCaRVWfD+Z>-JB_;CBrak4_}mBv4% zb^W=A;$x+Qt+C=(s<2Ypx7x* zkmF#Emyn$cS?B_#jGyXL{1?+oOq3r}Ye*$=!127UQg8(_8)79Bi}g&9V+&a|wrvSx z;vjn%`TTA3-LAJXat{^C7aWijhQePT$-sMyfHXroO|aYy?vWAmUd{Nrvk-N@yO7zla-F$2>M2rJ@av9) zF{kFwsFAOOx>fOV#yOBUc)^KS5eZpEms45Tr)$-3Igyr3m*PJ3oA}y_A4Xx zqTcla$T@?p)=v;!o7?L8H_siUr4qmDMBB{Nk;1{!GMNw@=aP1c%wykYRg9|QnGyB2& z$gHY~Po}P*14Z!5@O9|Y=dUM?>(pw|Z%Pe`Lce`kR3F2#s*gxbzj9i?379pY|5(1MdfFb&ao z`z=>L;J&bb0VzRUJXNT3`}ucKwUFO0ErSn&oi=Zh;pD>TC1Rwt?rO;g()*T0{PWvK zA4YNuYqb8YpZ?Sj*|$XaMoRn?qf;Bp5q;^0y6@})S%_BNTGD_zu=rnn0td@fYXy6i zTf)0Im{S>kOdgidLjKo!z)x8v^~UcZI_ZdEFFf&f*eQ@!HwouEu!^6SUGO-YVYXIp z{(PrhUV^h$h)G$>f?VABN$AaGy8~{*qcm79h-*wDp(s}eTl=$!@!^^`nb~K{S6QJ& zQOzRGZzEPUa2*mvsh3~TX_{XSq>I>X>Dm;K;b z&Cy(Y9>f}L{K&xv!QLfKNfyd9wwE}qFyM9y0KQ z_PJ0lX-@#30@V_nYZ{fcH^Smn6vbR<3pghmDeXZ*G#4jl=}Wu{Wa&eHQjUXM3bi%Ge__VdR^{I=r7XU z`*=+fBXa~nM^=zr5>>%ibU(G;X$}b;<$1eHdrTU%L6DpnJWEf3L!faeeK+&Goa&Lg zmzqk|M_Jcp-cG10)`SF!Lj%K`=N27)SUnxCW^T-5oAdjsrD?&Qw@W1w+WsNqwV@dU zp`8&Vcc6()ARLnwjg?N0rgP$1k?cY~?X;}YC8~@zTNX((UoF#3K4V$W_x_PdVhx?Z z`PNmuWI7varoD?*Y7{dHF}CL4eXiT;?Pyj+ zb0a&q6jB?a$J;Xac5&GbBS6>0=_YOd#TZax_Mg}6{M}iZ?{O-7Po|h6)M##eT5j0D zYKL+#H+6rdX9-p04=k&neAzvjLdd;sbHF>Oo#Zv*I>~+6)6$WqKS*yfd6pAz^`t0TKIRnp`%dnDkyi&o3@R9FK;b02g4~IYs9cwucBU1LxNdsw2gT`E zYXY%PCx^Z7W;xLKCiBto73D1`C`45Ybtz>6ZoZNWqS=zK-URZ`M6-staq9s(T+P8B zG1zqeYy+yg8RX8+BZORb2l;M)|8*b@Z>Mw-e_;sgZ$Q!`V2NO*hX+K&SoJ{NHOB{0 z4AE|4w$cDF;MbTa@G)!RsdA+%0fzd3sR<9So?RGnSe82vn8m{o%&k4gp+XHBPE zZE4F}b}RES6~PZWj5eK|9EdjknW8!EJ#BO*IYhU2F#HVsXi8U6#(pQu_d6++3cCUg z1S8)&O=Hys+YhdSZa*l6i*p4;>mV zY73poE3$w(_Ro&rY@WGKdRRPg&!|+Xcih-8eZb}WAMa|E#b;#0_4_|NS+Z>f+Rkqg z;$&Y}?Xe49Olox9DqoM;^Lr*!vBPIQKk8Z0^2Y0MYQxIseNfn5@a-9&98g$FXFHtK z_>d2>8G85Wu2%kkuCo&Qy|=sWmQa-|*`>e7HmxflRwF>h(vp_1nnpY8Th&~-kv zn~NA<_*X9?h8?UQyeGt9;=|Vu=nr|0-qMLds!@V_aqZYnKj<}u*`?BEXLf!+VZXn) z3=?SyM}A`ZftReA(X^h9#bXgClaGC7l-$39A?%!Vafxh~v=a-wCENtIS%qH+IGU9Q zP!(Gb#j0F**fb`~;c~adnnmIIiw1{6>s#hXf-Nl>|2reEkV|LnQ(II}M%-4EVqodI zFQk3@m)(qkqTB+nmJdgkT-lAWnw@(w_g9DBTyT-s?Ytre`8M8bWtK!l_XW`CsBeda zuPwz;8Pr%)?wQeTutdsL-KQeF8{x=rV2Ky7qABR)mDE%;cuNnoYt8Z2J_I!o5<1_# zCVKi)QF3EME_)0+-*%74`!fO34+$E{!)plNYjiC5%zKf_Xo)kcXMO*^vqZ=(G@*=K z1y#`!{;clx9)0ztnNvFywi?%w!CulYvvUh;T-J>qxXb@!A$h>R33yK!eP7lr?!=vX z85Iu4aGsCP0!fZ@E3{CoGrf7n&<=(tqf$CtMByPat?*H`rPuK#?9zK*s3-;`J$27~ zS!VgYuB^+{4TB#NQbJV^219O(rU4`BGJm>vLrV(n;FxkgJnt%-ur#U%Dj~IJP)EfQ=$J~?H|Aiz?GwGI4_LjJG2pv1j zpCInPN&Sb?*Uaf2Z=h@jNS_T~A~P?-ITCGJp%_jZ5=nk*nw}}m?Ad#`TZ)L}A@VKh zj{ocRn4|H^Ylyv6K zDE^^MK8@M70ZhMRMk^kP}ti}q7Wm`ia+s*!zYb%?w$R_%C5##xbj?> z2pQ4L;mnt4K|N3u)ILT3tfcETlk$vd1Wzn!()Xgc*XHj5ylr6^7H@^9PK;Rzag80? zy;0+(ud!QJ^l*`JHwMUlL0XdWtg}f+U_nW&!M90%m^1i4qn{aFSl`luV*qSjh8EpB z!Vp+5C|-#u2rPM$iX91%iDoQuyL|ROb_dip@B`ha9@KRMxbo!4I;@YDVI$oRnM zBU9?SbJYKJck|@PHTpcazdgrh7sb_|iIUC35*~lLin(n>%T1`ksn(sI;`2Qa+}mK1-oOZds!vE}Qf_w5pG!dfihJqj|C|ey%=8^uc?V%J_eZUk zXY@-faXIx*;$yGtM_0t^=}&j+SFVl>Hy8!*Y!Ixw`C+TnN*2E>F(2;?4`VUeiWt5ui4%QyRiQU?1(2rv|-&?^ZGbDd}->& zqXBafW~DX>W;K@JPDgCU&(r8|9!?hg^)PZfVpjU6J(^OseEZVpWboVUv+YTMvl~rF zh#)`7_v!w0y8r)6r%9ub=rMbbo8__!dYkiveEI9|=O`j6xih6zsee)`e2R+ljburg z`ZpeTjOt>eH?fd>h9|e`k1BZ}N%f;l+52yBki>j>BD=SA)RcBRR$~mK{iDVJg>!}3 z@-b&^G{Pxi6ObbOgxyXbB+Vn_ZeL}1bBag*QfAi_hpCSSYX<@d`vZ-i^$nAc-`Qk* z3aPafQF;H)I%6G6nBjo5L*)OZpm=_IHv`^8zb_nh=LVQSz$K9K!b3` zvr9#mg-D;z*Pz58;2T*{eec4ECEzEQ^Q33!Nx;0J!gV#2v%0p8uRTW6smJ9Cn85fn`Vcy^~R96rjt+p|Es+JcQWulAUlnlUT&<~n!e&UxhJpOeY(cBgKv5!kGyT| zTmRMn2+raAVEbjH$p)RuDvfYqSzU?qqU41=h?AB$;!5j#P5EgF=bm7w&-TWj!9AJ( zK+5YMCN|~Q#itV{QcEjua6^ZEUi#%PD1kLDdSHI#t&$PyIu-InhOVSU+)DaiLmQxl3%e4b`j88V{Df{r&(Mxt|D3}DX-=_53e2@L9|7VIPVQb_LC zlW3=cb&+RsgFsKvovp2r$won-@*FySLXEF(GT_}goWm51(d4E!@YLOMQkG~QPO$MX zrYd|M#FSVcd*(m)Q~CM;7M)KQMX9~iM5JjyP}eAa*f0lSy8JCIF`PFUiX@r&>9;yK z?NjebI+OEk%Z3`AVQj7~jIK=UGH$0^Bjr%y-w*>j4}>-ND?iIvTO>xkFRkCwr4bWe zonHb?oi+Yl&K1-ef?Z3)YPJh|Lf`>@x$N0Br|iUkO^Jxuv(IOKPc}&QdmPneI~8KR zow^;vrM(lpLMI#6R501K<}+8?Ldrv~g5x1hDef_(jAG%9ncdyv#}T?m-F(yD{HhQ45BS!M zXVMx01;L}JvURbiJvLS;=zROSD1F^Znsch(w;wtzted%yV$@}bfdVe?9L0@168g!JVQ7u&W$Vcn3wB4ZdecUg2T%tfc>4y zb#dTwZ~=oiHUo)gtR*5=E>q!7r=m9>`s-wYMM>fS*RQMSqb^QrQ zNEORO$jx^#9pE_+8ByfGRQL!!Y@QFXS&<)|mVyTHn+ zkP`p*t1%?E_%NI2t(1!%ENTUNcp_lxtnut9GHInA$kK8|--GHGJG`m&43WZ5>HL{B zl7HPqtmFC{6rLsq4fNFlz5^0uV|ew`-G2aantK; zr@$OMO@mM{)spn)zZ0i>oRpU07!K!AhQ3`$*Ss%h9X$_Me;2| zLV+_yOO3F{`fWsgK6W%6b|L`JH8U$yfTV@s7Kl_G zk$pLA1yFzPN{WgQNcW}9Sz+500?o8{=C(Q~FBNRQrNO%^RpCMy@zZgDbs#&A!4_$h zZb*sG+^j`fUS@oKiJMG4is9?hDOv>Uiu?=9-OzeQ&h-6Su~8FMUI0-9l(C&g;hr0C zTzqi~-fJ=cLW4I}ISUUD@W8{GpQ5WDN0B$(uR=fhU~}#+h2ZP4EH3!dB%APiA3EQw z@;;+pWeKh*M7SxSo@waNX}ipeZKnqexO$_?$Roy#pDG^UpAm5OAR1SO=?aE=JSk}e z$n>el7bt$XxP7Q~x#a2$WVd+WvTe@rj zc`h*a;4cGoeL>SX8ntt&4bZ959Rb*e{NY_a5x$Oz!gDv~%``><su$!!O=bvJXanh*{~UAux8DG_3xq3>3NQ_k8FwIBQyk>7DLq*wM}jp%7CbUDA$jg<9W_De3CnFcSh32>fY0L z@;jG{+PB*wriDh-|H)N^kr{}qgoH@+ZKu;FVSyx%!k`Z$ZuOaA=Ayoh^!y`-vmwaZ zE9-_mGC$b~CnTm41ac`9JTk@U@Isr{=nfhBe$1lx3`orHxpQ8X0@vIM#_A5^fxt;6 z*s}t>A)h%Aa%r1UWX~l_K^vrj#(5Nym_WfUl8;CkcMY*Ag*T z3?Pai=lX71(w<6G($sF`@Zde*;&eG(n#`)O;9^58CDDTvQ38Ti>7_ng1_FKK$lhDM zaStSF_<5Y){&k+qSmF$ZEH&>jGbB6SNo_S}!75Y1-iU%cRMwmFTXJaMAzSIHMIDz8 zUp;zBLxN*y0p+BD&}%&WRCdn-Wi;WK4>)7%FQMvC^Jj15>N(vH+i ze`a2JkwW#I5$@$)Qeo}pIgKDVr#dbA)vU%`xX;q@_G6s_Uhl>8f!m3pQ}qMbat;>p z7P9qv(juB-%j=uHj+8&X9-Hds3J`K`{r-N86AGrl*{MrJeHsbUi&CjiDd2kwa+P8E z?z}sny?!@SH2r?QwMuzz@Luh9XG2!k07r_lljN$`L56Ot;cD=Uo%|C+TT7PY>jY%G${fNQgn)_f`mv9=mL_fNIF~cAB)TY3IG3< zQs1L+PC;sOTmpq{52zIfp|zBN=q@W_-vUDkSYCQ#22NzY9SUWoZMk?U_CN;ee{lFt zubbYSS{H8Tn^eo9LI=B#hI<<4=L;P4XW5TdPHKXqL%n_}aW*h$C5c+JKggIqdEVyp zSU5v|)geY;Tzlsg{%mzE?d`p*HC`?)gbNfVY>s&t-8R2lbE#q=eQaU96cKw}sN>7; zFQMRo-cnsS!$AlTY*>s=PyKA!JbY=>``3CRZMwI7xG$vU?|6aMT1Bx^{sp7ktz1k zV*NiYUT6ip4SN(j9)+>3FZDJ)wUO~dv3tK1!MdrmPASj%{mz9Z5ahzz49>j|qaE1o zT@sA!?QV7v57sy>fHrY&JFi+V1h(tQ0HP)SR>j{OONrMdz;QWQqel#Wf{_q=P6moD z@E#2eao%W-(5xi`YPzLBO@|i#AxnP0OtIX~KJs~6IoN;p@C|wO1&P`#Cu?f^b2Tg` z2-CNCP3nD@kL_bQXTy*F3MjzlRCI+@M4=GG7}sO;dTXFzuo>Qd)(UAe)7bA}%TW$l zW8fs5_OwG28KN}X7W9)|6QL=c^-=3Lu6H%bg1#5zTdi1JMW5fP@}Z>$DaUU)DN7ue z5PQO6fCV0js9mTE*7ll9yL^aJAEmu*LF@LWzds^O>aH;USKIk|)!9V;6+w~&fmU!0 z55_~mB;i@mUz6G+8AZ4;uxi-QdiNA?Zg)axPp?ZlzQPpv!79ag)8qF_OUuEHW^xPHf(-IRs`Psnlhl`Wg1%Z-6?(qudL42L>n0^{lvPZ&Dv8=As8wI8CeJ$Xsj*ZFj-JgAB`N`ZQMRdraZ}& zJ)S&`Zj$Df;H}2Tf2Mp-X}_EtPgP)a9+BPtG<{ha4z%at4b70 z52Ao0?75gkT9TpXhF~_@X#d$agiuFHi&Xm7*{t(i4q-oAEb08#QPpHm#Sqz&5qqQW zGvB;W*h)E8-dENe$#e4w?cyYYE-mwp z?G^BA_OITDul1ik%Oa1KTJJ`sw8~M}P+l}4pnU_N?_xt%;N;|tS%Phbo&2VPGGGCz zw$I7Wd>X@9{@rAlnLHQnp1(f-Y+YI={l%=A-83-%VBGTUuz zFbx;4s~odxz4b%H(?TN*@S7gZS_^sQe2^*#cTnLLZ*jC>^-4F(Xyt9zZ-HOfYFP^i z?%GyH87V=pha3w`=z0Y_AR7==GkpOIeyj!F=TZ2~m+ z1mWpN=z@ro_KOIiMA8A6l(4JoRo@WnDElQS0~Ha;VSnxDFG02Cl(+n^b{GjJ|<5A=8kVs#E5R?t8P@L!Seoom^?i~`lw37ioYfO7cpffGqymQ0gY5M$mH z_Vi#!5o>JJ8}WP5(1=OrsNKW`%BFzpRi(sWB|*4n206Aag%d>(!$VUk8fTgnV2zIv z`k?3Nt{=oGmW3MF$pa1aa7E|G&>__c3on*k-9sM)_UAtd$-S<08G}m}WFZ8R@`{)> zKA5KF<(#wFPbir+yqyFfxfW1*So#eyW&^725EPi4eta%4RtaD{`qxD zqYad=FZ7zv@P5mVHA(D$yz>$R>hKWaG4MpKqlgIB=qDqH5CrUj8auR4ad6iDc%+Fl z=X_1FXY8g-fgsF=V{2$f*|SFk(*rk6&1yj6B9YIgXO(W0mS- zbsP&!MG!~2^IZ9Kl6-_ zfXw|}(rv6wu?_e2gNeJ`XUFc1`~Q(i_CvL9UjP{>66p;FBg zN$9Y>D^*8DAjy^GDeRy^E^)%EjXis1vtt{|#-%?!DIy13Ts@8G+0!fp2i7Q}3;6c< zAm%&IuAv%VT4wcARtOt^%uZW{5SkDhJIw;`0vdcV$95m09lOS>T0e0eNpp+EI{7)9DIDb&G7&B)!rdg#t{gn2-2Fz7IrX0!CkGC7FsS@x7Gc zt{`{t5CTJQ_LS+GpL4ajXEPZ*SEIt(L&K)@UnM*$5AEChb^ZZ-MqAxXi>ANLv2xV` zwV-xX_n9r39&aT{Qij*$L_~Hmgj0Ile((I#jl&P4oRfF%c>ZNb&OV6wgpk--vw;4a z75v#8bj>*&3(DYEugG%_3FFbIto=2WzkxEOMC}S`e-ELZb?}S}lGa0;gml)v>y0xL z$kvfiQy1MAQMz`jNtBZmO8!$SGg%qSn%1l3)B*Q2aNGS-W^~THxO3q+$00V5j5}ip z#K0OZ2vZz-oumf7nFhQ5LZ$@+jPw{n2cIH@p6%qC>$x z-7hz;J%DFBKa~_7#9&uHXwS@EfGc)ZF;n`--f4TQQt9bsE2I$5cZb;VV<*x90|EG> z7+m#@6tv-NP0s3~wx?4+Pgll}yLTI$sumXp=#sV-^#XbukO%V4B$Y!aefor`ohv5{ z1=xqa#|#LZ7s>IYu!9Imb#SiZ>mi32D*~q z#DU%sn~c@bYB81{0UxUG`<+ZYlZEiSmD9a{fPWxF3SVc*9F7iXPNP!FMpPeN4ij6J z37J#ngHstn<;MLSn6#CQA+p6$+9Oiw@VF>-O(1{}eJ^-D0$P5GUl>M%^n=%tk+!4> zXLj5jZpHYM8Nfc)a!)Lcy@pHY=Uzu>@ zqu{Q{c?=Gk|3w4w1|F?PLH}^YI(`@^7CY4%r5DK3lew$5#hP)HK?n)0{+1|nLYaQ7Q(2fA}k24rt z#`SXp@dhaWk)NdKIlz5NNa6w*BZIf?86sqW?)U|$s1O5UOQ{Hd*)@R*EuaSv2cCbF zcpikn7KJWv76_;B>Vx;WG{@Tw#D5DigB*DF*7xT!-6ez~s7@d9m%%4SxKkL}1*(#= zAm3LxyWkHCJk5|&z4+th3*?^UVU{D!l8wPuhqo5Aj0Nzuy#OLTZI=WoDeF^ru#`Q( zm9R>WG(c`OS;QfPL`@pBnF@4Gpn)<<`ySiA?%M|p7y`Ol6pe5^t2CJK1Y!SWzg?LY zJh+~G#ooo>}Fp7j^jW-2{LA3E6oLdm2!k z!oB$g3!*H8axhK$>YO&f?mY>?_HF2+-g`kuc7vN@!H)q8JD*t;7c+9a42XU~uXDDs z573fdc3~_S_W3z$uMQRkU2&3wix_;wDN+I*f>`H<*-%34zrC83d%(-PQ4J~|2ev`1 zr2-2jl|ebz#69}tu@dUD?TSL&IXpa)K~vfxdZYNojT z6)Lho7&jqmd;>Z0=0x`wBtmu+?#4`UbEbrX;=>;t>6OA0qNbJ))}6EC39zNPMGwk( zNuF^pwL9I>9pIBS$3Ymoba(a2GDy7)0#-Wi+5%O&=QECkb&@qloRUHEOMxVj8W@zx zLay!X_8w6e%ucz0r>j@QAOGk>^?u8?Bu4b`{Kv@IODuiGcQuoiHV&D459D%ZXRd3z`a_;6fM}px z2E~oEztsfDGZQX1QYcALQG^0_9BZ33i@u&aqpAMTR4Yr1b##@a1~@lKzGFo?!v0*I zH0&FH=bdohxEce@X+@HUJ|9~lR43ky5_>W0=E+U<$oeIc-ch3f?Tdpc9fqmS6gN93qH zKtoEyg`Rg-#!DV2zmc~09bg>e)oKLg&I zQo-Wf&tne!?&jJjTss97dEy6H8trS1(1wbD6eN0ZnG=ucmc1BqmqFFH4GPOdr65=Z z(J5*`3NCDoT746~7ja6$(3Q&mf$F(psQUvqUI6X`8&o^(UuBL_lim>@K;z`i`IwxO zB~h5o!T`$E6oB=CUkCcV>}|B$X(L+S01Wa~cX7mY{OB!jjw;!MhsZbz90LLKZvyH3 zzgwE`(BliP-u2w|Z(EG)XCwZ}_4KM5EvuL9_oxVbVy9&%{mPj%-&}Dx7fpcNp?kEH zM2q=>rE!AmU*kis%Hi40(bR+e$EWjAMp971LuHr||CI-?Klcz4y3MUSk>%gWMYFj< z6gNGpZD_a>eDkgk$L0UbKYW82!=gLih@N`2dVyPacWT3&|v}*YU)IyTzcZhvZT4?D+bxewZsV z(Ld`*4SgZb>XiMjGPk3CG2AKIkx_+dssEYoG-AN~@bJ~8&pCu(MAM^qQ1n8QF!eJn ztFlf#V$v}96jb%s?|`gV)Z*2+DOgHFG*Oz~Ogj`m2QKdwBm&c-Qb|Hr9OPYZK1<=n z+9P3q&083VL<3z)qP_`u1c+&fqQf_O;4Ujph0S@Wy;)-o_V}wASXIHq1Xjr#Z|Oh@ zDgWGi9?B+zE8oeimvIT%UX;RnRm?Ol8^^cL-3n(s^Haqi5A^XxB-==6T5jBbsAW8~ z_+>^5B5x{WBaC>3x68)wTae?J^4c11(L?Gtc^L?-XWmm65erf<_9-inGomCKa+Z|PJDIY%NZS2ed$AO(chAde+XcX2m3B|rgOWspWuE&7M<*7%;>+`Y={0&to(sXH8^XNEh-=7f6gsSojo z1cdDQ8<{|EV}bHQl=wZ>2OUMg1Uw#S_1VWFhvu;bO>BY^mqNZqFh~|Yq`}dTy{u3U zf*7d>Ou#*7T3imC9#IS%vJoW^omZQG_qRBb8 z!6&3}sxdwvl^dE#z1h@xFBW+6Ggermie0?xulus(XdZ)#yvRRkAqNxru2he=xd z`0(_;yHcD1QRE6@G1I|h*;ne_3RsR`hvFTTMym8EMK>_nMRv` z_g{vTJatGeVx7N;h>bJLrZ%#%SG43VJO|@Jjy4{Mc-IEfB zCS1!`U}9bIHsVZp3hr}Re=&$0X}9j)zF!jVrNsJhVRM$s_Y&DZ@&(Md+kZh-Pqz$* z-<1^U8BnR@Y`mBjr#DxU-s=puwnvs3Ra^wpL z&sCsEqh6tMl;f1T-4?h}ONiyv)M#XmNV|LRS> zxbcCTVA#b6F~+Y+lK`wcA^tJOVGetF#2*{KWnu zKOyBS3THqkk^ua#5GLRF-8!ahHXyR%`rNXZ@TmyaV%aC()qwpOFfHEWhLD5s4vz|` zQ7x!}3W!1>0tb5t!e`JDeG}iOvmUmx7xd7fuuO(s776>K(ZJw~4xSFb%8$MKRth>Z zj$~bIkbUWoSq@m1f3Z_FyE3PVu$o)n-(cpXS_*CO5LVo)p26is#qCj5g z=jVj}*$BP9@4JkIBu1%t|K}kxKwZQCOkATLH8wHgEiC`u0JOZcr?7vM4t^)ES-le6 zywhygidjy)A*1^% zlW&i>Ta<+8Zru_@rQ;D>!iPpJ_B*WlbI%I}(A?gy{^aR|2FojJ4s*Tml9``A{oa9r=} zh>X#q&DGD;1>+efW$4HxCUw{CS5~`qA3q&Pk^Uy4g!BF&f3weigt}2`DOR?B1jO7y z5j_V4cdGlG%V8bOQzJDGnhwqa?O-26Q(wA)XdV#k=|akoarKGwTM_kImromT?za!z zaX7M8UeeaZm>jf6le+yKrlY5su$-#bdp%LfSk|w>r5VKql}~AHN83ttWeB{tYWZe^ zgw+ZP)52a-6sx4Yl3g&0iZ~FtWOI=kwFD z=N*dJ(i2)JM9wDHkjk>rM)dvG-&z;f(PbJmA$N&it2$U|BD=0G^V8=CeA*o|s%{Nl zmreLK_NJcveo}(gF>d8lZ3QS?1o%Tq%ptz9dcF1rgTHQKSK$=*bL$R8N{jdG!HJU= zAf2E8;Ks}kxR$6#Sw5fyg8tk$M0vdO#VoGGsmT3Ju-Xdr;3Ze<6T4YGx8T|N{cHUqKKCT91xmt2D^=7b2c0{|vZv^36V3YT}KDewFr%Ux^=LL3j)>5{QjJ z6Lsluzftzjr6ta}y1bxxt^U!C1@6&f?yUw3Y_~X|%v2mAFM~3BE@y`A|4PL-^EK-V=|q{{I8_YqREIlp4hu7_LNf2tRU93`fZnd&9j`l z*%_4*bk#NeVj$aCKD=VcYTuhRFr{EQZ{r6GwOqEv>xipHY@<(szX6Ft@wiZV&+Wv# z0V9r{l&{lLL$o9BWYsQxMy9{5>?K3~`GF?54w(k7LnpP#&WY<#6YVoyIBj&a{HgKZAlfzm; z_{r9VRXXU9`W_FEP1~FmOAw!=*@=wM;7~nJ6=fE7cAFo? zP~&2-HaEEf_6KL4&4|az@xoQ4dcKa!V%_H5UPHvani)s)Kdtm`j{$M*VJq|I#(dQK zOLmVvw_U%3aQH12_?3H)|2Ci#e#yLV+g9%sGfGD|;4G$m-t=|3A4{qL=Qq(6^mloj zs4nhtIesMLu>4bLHTn1&MUt4(xBn{m%t<>f?3uK^Fhp=po|gwqzodWvve~tGcGotk zrb|=}kg0(-wT}s>jw17i86fuVtr?i;J z`P%HcE&2I2Z;pwaodkIIDDL*pHEF7T5zy6a*OC0 zX=zWFRk-b9vm)PUw1045SJp?(Rky=-R^_#?ut93=4dKbP68#U<&|bUK``!nzEZ8Jt z{GQF>eHkYl>01DfnOepVTVMT(xcOHP;hZwtrGUh$F%R!=l_OG8^(t}oT2(!M6a>}I zABIg1HZA#o{G5Wt^Si&L8hwXLSh~5xjQE8bJ%2*>>Xjw(gyQgP9D1AZ|d+PFv^R%yLUlBe_2SxiH zv5s8xdHs4?W|4nadd-mYT^_tmVC`u^M2*P(*FIU}>d$Xn> zaCH}MSUznpK+!#T@&ZAT4k%`xMr=PIoxRSRhTuy+;(IK)q|?8GzEH{u={rT3sSQXW z;6i6#Cw2J!k*PY`bM9ZWBOQ^waVQAhazNfZd+zT9FJN{Z8L@e=4d~n2GlXYk*;H-! zimH|p@xi5DwKM02oTHJSQdd~NM@GEhi=bGR>!%{(%wEjz;$xCJ-qg)c+ck1&{aJRa zeRny77Ez#xkW1aJIgFv&k4M0t*59Crd(r^0tVN_s3^Ld^*yj!v-??Wy7^-Mun529| zTz_7sHTY`ch8H68OB!FnDiFFOq+2|M#?OZ?nS=9=Ecn~43|#jKmF2UJ&V0$i0JX;< zBrQJcLr&bI!TF**rM#r(yF`oVe4@O(U5YI#jX9eQR%Vu{erxzYxU&U6ddAHA z-O{V&eO&q8Up0dIgeXRmh%CwEN0I&&>`{jV>YVZU`XH#Y+|}rPoa}@6 zK5uKGJn>P3M|DM)XF{2oYZd!|edDW3LXP?HW8V?h@MElm)~X(Mka1m?fIRYS1>bhV z$Vgs=@%VbM8KLIzR3L4c$?xT*SaXA=_!l~?bWs<#b!ipw`;=A!`n6Z0v9&H1%eEzf zBUo+Tc(+srL>&hBeq5rmVj~?ki)K0d_&woddK=EM@fT0L=jO>prc@V*Zi`Zwty-LLz&R_Y+zW*&|fx>v<_kB2BZ$BF0d&mYd*$f&a>T*L;W%O!AN<WfQHF^k=HmxC}TMVvi=6*sX z&K+O~8(ajOYb}~0r}I*V$9ND_jlt>t@?cuPf*Cr%Ae@82T|?s-gu#BHEwGl)AB8u? zV7=;3NT^(ST>$oF0>KccWZ1d|+%loqJ=*eTmC(f;S?*PG-@h|u)fB~b67-*queNO1 zAnhW1#a{Mot;a>*xAe{UF$_;!l%HM}^Nk=+xz590ECvgd8CVvb(fx`^C}q;J?QbwI zD7vmawrQ@JXwV8|AE^J#5q+7rbl&N8P5D>0Q8w84L{2mG9UAX4X z`ApPF?5#e3)kO3sCo6+b#ePEr!Bddju>}zLt=Gd{`7{@kLlOU}=bh-Uoz2>vKDyig zM<-_j4Q2N~@H>wg#x5dR1{Ebj2%|75B&MWSlx>8vN7gKP^pcVyWzB2LE^D$gBm1th zy%cI}m3=SE{GRdqFXw;$=RN0t{^y>1pPA?RKKFj_z29^1bMF0qZZ>GN#JC0}ozTUA zKelS5ci>*VpE*a?&dIvh5qRdcwyX|NBIm*^SMYNuozz@;38!OY9aDLJa7`)975AV) zr)^t?v{<;&#mAMd_*Bg^pR~R3H?{7-|3F;7dN;!b4Ef&BuqKNka*u zVs&tSIoECW{Dkh8#=(*jT|~RTeM+v(tXz998B@Z=Z{%_JeR>1Yu^F>!HyLGX7}ge+ z=6UPY1=o*pU#4!P=c6OrxpQq^J#;IH&{|K;tYb*2J`KlOVb6}aepD?Sk+-_vWoLIV zqf@M=bZ}eM4ogN9p-BNv-r1v@0{|CFttj`y7K=QqQ{PT%p%Os!25I5UvPkAyeME6Y z5JzVtVTo>-5RK`}uf>y#7%Qd5!>mKx) zdqz(9$EPs2-N zp~%dDqmwxZvhojnEy5!T(V>n10p0%7O@!J(B* z$(`U4hI;Q|9FYZESya;5N=n>Jl zuUMmbudl320@$$%Y}Kc^U5Dxz;^RAh7BjS76@6wEF<~EMSz5AG$_n4@WG)Q%m<94; z#8BslMVHm=yv|jz5PGII>R%oh&Z>3NL#i$VYaID53$L#XK2_y7cYqMRHkY@>Li8Ap z-RNz2e(4}5s*l^1n$4_7q@wMD-B8Ys=x|kRG^mU;`aAOE~BOD zB`0Oz$mOWH%)fdwl{VO#xU(F6_6iwesM`KI6!GV&R)v9~QmxN#z8I6RUC@Q5-vY6H zp;bUpl62!(VM3ZCEydaT1Gg0weTuR6$VHxUw+=O9W2s7uJ292=GeXaI-!k|*SSP&+ z&=NEm?cdKunR*j+SNc8va%%Kmm-XxzkM;Go>q!OkD?ODoEuD<# zt6%~5*kj0Scy0kv-@fDT*s}Y3(UD`uQ^gEJ!TP{l`Nq8)rJ{YFtr&q%)gV${#{gxw zFJITT>e^RcNttu+!kP7bIG!@m&CLe_b~T{?9V|;qo|-0 z5o-4N_7Aeu>)Kdy3T~|P7Q4kjgqn|W)8^m}FLOdC@O#=HrTW-`?cI#W6HS?3`w*p* zjs{W&vCSyr39s1RJD2k>icw}y(*g4RmHTfEWNM(__^RL0lFe9+d15!nG8kgYMik{R z=bux({`?e)@ARD7j&SJyybH6F`JFN_k@QLZJAQaQET{8n^v%M$o(0K_F|tG9OAGN9 z8Boa=o%Eojk!p*0^`^&_r+~^?_+$2VcHgQ-!n}W_Go%#()BQHYL8Xo~>m) ze)XC5$A+9HHoM#I6_;KaVzYx&m-3?9ZC+PI4~cvwo*}18XN-BU*@agQUh<9p*1iAk zK~2%J=l(k>tmt;HRWgJaTNXC#l$UR9=`E(QXMa(TpNQ7!qDB1@hjrRU4k_ARf43ms z!^`+n$jPZ)=u^6_?pDFyugBd6WR)H#NOL{h_%R3)_qe--EZz7;n)OJa0V$1V{Pg>M z0(wGAoOaTN^GC|bfqQ@(ctBq4UAn(P8>;5~GUO~8{(d6-d+Kmhu1m!|T1#htrfgb8 zFZTSF|GeiF&RyrIN1XNKwPns-R)hfh&mal_>VHQHt&17Kpy&a1&LDtXEil!RCGWF} zPBBE2?)%Dw9EA*yLgOOI9bZ3S3Gc9!tIV^gAuJ&T3wLQSEcUT)R;)b+ec_nJ8RFs< zB_6n{7}ShYv4lAj06~C{!o0c2d_ZIcLmnf|l9f`vrM%Em zEz1XBjHtaqIY$dCrP1<6F&QFx4bWeX^#0-prCf?QK=78W?`Z1r1Nw~vQ>7?i0#0VU zoK!;<#bq`C=@*YpgbGk5r+F571dyy!%rE8)nsy5_k=pbUI3SYS5JQpvAdu$F;s6w= zH?d@tr9)*#qjW?B6?x|SG8OScc@o&&aE7C-2W9$N!w~>J*emCgpbSlMMkX#7)32Dr zNM@omeQv1{Mw7a_G9q3F+t#e!D+=IAR6?AX2!cCL%&f;hrn`A;-F7oHZy~Ov4@Vrb z@5N8~^8@m;lS=umyKdZgPkP3xI~@suG`Wy7Ik}S+-=oU$?78kZv-=ghn_oBGK&o@o zdFj&nM*n06WC__vh_XzL;0iu9clUSK?hc-FIO|J=FypxFz~z#O&&+g*Bjb9*9)r^< z?w=H6Pbd-v6WYx4T(ew+UrE%={SA+9t$hmtDIC(^HonO%98WCwW~?gfp{|D{vtx@u zUqYO_(}U4vN#%952qv&-2E1j3IKj9NkOuH!s2I@~ptAR?$ihOJML=h%g$BWTe;9vnV3>*Ogyzg+wzcI8%ex(O&XY9vi zbR)Fh1ryfPm3NE)P3R1cEjf^*h){Zy1Vn}&ToaHJ!w~!Vj|e03{|=iy@NotJjgMRg z5GX(hy?+P9`vBqO{y#A#3~aY29V{w))=2O2PD@^@TQQ@5E>;=-b~yO_CX1!`c*KOLAbDQY-a)@MeK>6PaHFIbf;Bq`#Y= zVk6H!zEI9c`W1pgEBWF_smLtHXb`kwQYS!Z8tYK+GsbXyOGoKTD4Zn61cCXM;D0_1yB;zc~r$9x_F$4oyII25zE*+MhzAWh*; z_%YwlEtM#%zkUpzXGZgOhY@?K9FxtYtN2COU?*(K+nb$t$Om6ZyEqx+%_5qNj*E`x z@gJDVoeGE!QHYSGiIr)U2~yGqT91kC^#l*$rF=%GSyOscZi@&z{37~#x@>zb4ps@n z-)g+m9C!8Gp<9y3T7dCUOLo!~+bN0BLc=KI{<-2Bn{(QCM+}8Db@d&7PFfLximyXy zY98Mlt)7`7PX8A4h}-+eWOJi-;gt@`TU_Rq26atdyT0Uk`2)CUO&`P+M_Q=HNkRJM zIwt7pz;C1W7P}_`#mI*!c60O=g2GHrZpkBbZFcecpB)=<}87d}n71c=w zEc|`>FQL~WrnU0rH<_v$s;Q^<^mLV65_RQ@#z?i?F8K(g+%!h+Xsb=nCO6d?)x@O7 zjnP=fKd)Y&y!KdO$cUTg^u3+X+O1wU;m}mMnlq0yDIcyqM5BZ^cSPK6i7pFY;yQY2 zU+-Rhv29$4ImQe3WERFOsHJam|4vf-y)MEewkaBPd|=gbYxedJ1;3L9IbeUjF+&VO zh3-HG$3ez_CE|;`Y4krmXGfNFy_y{RY~{LzV8i3!(3m8M@oUlhHX+Gia1lc=TI%&3 zKXH?2Ikx(B?h8<{II3&0+JCl$shgiJo>Xb|+#_&nu3GvNgRHo2pcKfBB2dhVhvrj# z9-k-Bi*!|gKkFg=t?O`6F#8AV=a-E2Q{lxzjr3YJN-?Xv8AHs65+;rl_nsObRoO~l z;^Ku3Q7X?bT-3A7BcQblj7~`?XDfWKx!KOqN*XPKxCna2q>ci3-*6nNQMK!&mKUne zN5d;b;5B4$DIJpIzr;kU(UxD9k<+$`wLw?+DopMJ*u?U~;Qib_IID6FYQ6udnH8>| zvjr*bWI6sHdj;~KygzC+e!t*Q(k4o&p1ALa9+!b_l;Xn&4}<#P4{ItEi72*xMUF*< z)y{E@vhtGEIKL8l15R`A`!ilwzOu$_;)WU&)VAr7V2u&ouwlv6mXM5T@fU8jIUp2; zf6jg)zQ!Jt@&~vi;p9<{k5x(t_i$%www;gn=jTXu|5R?!3JV0d9Ft%d#0^hfnNjTx z{i@sgd08wjacWOPv3~2a=GGHblbuCBo?!9QeP&C)@wsv(PkwBTiI6Ig>Lbbw*lbNm zx`=F=T~V%Q%HHX55snk(4+i|i!x)+2z|Wan+m##N(GVw@9iYYsRJj2%lJ7y<02~2; z0R5jX>9+v@%!nWTe_xvL)5=9le4vaWC42U98WzB7AUo~$ZxuB#z>v~DFBGSP2m?T2 zLXywJc_p_c5^(@5qObs%jF4+r459?l500^EvSagg>=$UXzDMjT(~XtMAK~-1YUQ_$ zJRhpTA|X%;hyzaC5`bk~gBS3?9ZzgIVaTToB0+N9b30~m9G53n4lG{)A7f6U43LL|YOwF{DT^L~&>vwV zv(!VMA{Qbwa{;crEJXnwunvv^7MPhJJ>D?c`z8-{fH5nO|b zb9J+4ffb_WF?ik=*edJP2vm1&J?VHd@-a2f-8M4jAXoZXw9*?6Rcp(q&#S@R9ObpG zs_)@p^zw}nGnmSg#y$oFw8O@C`UT;?DyvFT@g8WRjtwQaQoX<{nxZu{eMspyW`k zhfx*hLMJeclG1HisgeG8bYueP&JNUV%dFq3Kg#gaO5dX0nxonIM?Ag0DR0rPV-e=Y z6XKU*v+Jp6x7seB`|Mdc`p{K1)Nq8~BgPf|$~)k!w;Iwk5Q&rEx;3Uo3jh0$*ZD7; zH8|bT{cFD!AN+|b`X0rmzt(^;R7QFS(Hc1ze6T~4%wGA05&hzZv^_- zTcwzjRj%uNS>5ZWaAtC-BEJq&h4C>7qV;d#@E6{}NFKYM&10)s_1aV{(j40>CJTWL vE?<7q4GWu!yr@at2OXmwTNe})7$eAD} literal 0 HcmV?d00001 diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/images/media-screen.png b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/images/media-screen.png new file mode 100644 index 0000000000000000000000000000000000000000..a90bf5c565c2fa9ab07e03e32af91fe5e665d1df GIT binary patch literal 27311 zcmb5Vc{tS3`#*f%vtTS^U$Rb=eXE45Q<8nD6tYc3h^&$Qt?Xs5sK}HoNl1#UqlD}` zA!OgOm!03c&-eTMmgjdpe>~S**UXu--sfIk_c`}DC)(Ihi-DG#768DYqkaAo02m~R zW}-nOKXJt~uaTbsV|^3Ny}iA|!^6J*q2ZsS^Ru(->+8RM{o35!+uZ!y*4`s1Ea~eP zRQvVY^74{{t^J3OW$J2L8)I!_8=L(lNe^S=U%kq9iz!&@eEVZ?q^oD(`_x8YZc9qd zNLBKkRG;hly-Q}dlGjsG)>KqB<>i;XyuTS3%B42qJ@TqKj+}cPeFgxhWu5b9P3}UA z>A#*lmuHQ*Nl)75WBL&ND8D9fGbEis=>1R08&w@XzhAU@`M1#$&xMRMTt2Eisn|A( z%}B*}cU&Kg z8Z>xRqL89ZNHK1L9iC9ErW#X>GX-%ITWbGLS^s}^LduT3_w>6*pa5mY9SWOcrqR$i zFT~^|fV88~ko@VP5?K?fK}bTj45T%%P`XplsI8rCb|3;0`@>b&Z_>aD7?ND+vW+pJ z0;EN%YvTysIg;qPWo&50kff)8{$3L=?54HxM9hA$sH1KCBG_4_1*Pg0;DJnnhy^S zv5M=a%x47N0Ac1+pq*jxK6p|Q$qauq0}o5FMJq&NATBYWh*_J zNd8t;bR0B&{5fED)kT!{{uOb(WJT1(17Jof@#f^^q$E!rj;X;vz-U{A1ndm|+|HpX zVRIfx5+w_63wClxJE3fo>@T*pkl)i1#9#I4i4X=uC`D-nb0!O;98lC9YM1YuK=IMZ*-@hND)*{wJN+HJpCbjn288T_q|mzJ2XMKLnE^UG{APb`JaF(uIMm_ zkOQ}?h-!HZI>GpknG88*E_n$sFDM>_n;q(hX9QtZCQc}9C)ndP9laf)&;Q+LDY$+x zCfo)qTRXr6TXnMjL^ohbQH}9-?3CEO%OSg`$N14VxGoGA0JaX5Vo((xcpT0`-4%ja zn&*lD3)2}FI?A*Z=PL%t_*RhMnYJp7`&ZEVYwz-I+Xb@E<^}SzLfwHp;JKfju=oxr z_R$hnzu=*PclYNa%g)t3042lyt~BJn6HK0I%DAxz=$Y?&$YKT1sn^7c?1=ukViCJg zauF&rE0c__$|@ec0)_ea4IBk=GKC_B3+b?H(1w!*=(|8@_?!${z|7BGP;GG#AH*YT zZ2y|^^7w7~Z`dQ+dxH!p6$@Jf;G{Flq;?hRxf8Nb%mVXuM}WH~Y^#=>nybcl$H?0JAa#s5n6t>(sPQj?uO%yyE=T(v(F3B&0QeOl7?Zx^;}zcJB|)<#VfEwr1n;pDmNcIn|F&(Md2B-nW&4`QI>_eq8072}Y6EA;>#pCjiI@ z6rL`8bG|rC3pQO?5fp~kb43G-P=pu818hWVSFE-6uhx^{I8t3p5&fXs5?WTSBS10k zP|z52Qp!@-y#g~Uo6$&nBRhdzsR-B)YGC9_`;K~A@t5sg1$C}{pS8aJxyDWm+;$FK z+2IVmkWI^Y6+{1W_$Vx2mqPRUJ=&I;SV2S3&vGF73pA{TaKcYbsavvY`}{u}5B-UF zhc8JBUfh_L_LAB&eNCy*cSqHU_}~`AW(CM3LrTF0LB7EG>9|*Uuj7|Q3VtfNP|k;po67P zi_XnEjt^etVETKFc6US$RVVgGc@ec|f!_EzDhT1}4q)oU(X@$2D<$?AS6iVpbZ zpUWKV<-!q+S=#KcoV4MjM{{wp!h+11+g&Oht3y1*=f6Z+PKUHMXGvts)06E;V}&K$anymZ24%;Ovt3M$_75L51b z|30|z-XU08?d!-@2I628G#1HmESszCOO@){N4izddM_@@16zF%{EUhA4my|Zji2h9 zCqB*+0-AbHqwPgJZ_E*CN|wFb&->q>#k{7Q@wanoJMk3Pc18F$o7D+3U(PuyjmQ1P z%H@hrs>mm(##1f6srrjW^UuFT#l+?}=0V5QraryZb{GrJf)?m_2p1=>Fc9NjO?{w9 zKw%TcXwix*p&dTbe|EwiFI@-d!d-?jN+g7-YBo2DQqet-Z@>I8b@of_rb9M&)e^&# zhw-7xe6bRN&L1rMA8U-{1Y|uorJ;7qiMTMi5X#+r(UsfnoQ!9>dc!v5SDknG3z0Qj zKr=39EX{X5s@uPK8pB(7iLB=Bp%fj{*Ot$hDlV%3c%9g_(C4!*3#WWb1!-QJb|{K& zbMXr8!@6B(*|SIHevu@^)cpGH>_R|CNx|)>D4Mr6KKn>$)r ztj}!L_9$wl-m?C#SBgwuW}jiK8~D_RQ^*<&;JdW72so5M7bzdAc;{nEo>bhR@9zdh zJTSXhera(JSa}YSxrlB<4CFs75*8uo!*4QF#*FH{Dwh?2{m)m?MreeWmV`k@-9Tv0^Fc(VdECpRvH?FE7pfE(|IqzmA8Wvo zZsn%%E4yWVNZFX_IE=meCeak6i@99oxoBYif|a6su+C11+6?OxW8oK%nCiG-ga+vc zPFxfTJAL4#0L-G(7P|j5iOpk(ZNaBNu6J4LjIQ;Y?+(NvW6Q6V{d7g2d@n!RyM51m z?xgK8bpyaFpYbMr%W-M9sF)e}B zVYrjqGnAItiCHOYG_6jhF#$2cKod)LL>d1lIaOo+|H|1-%=sm_MV*N3cF*qCoDVF`SEYPjgP z$RK`uKVkWfNB1zd>r{q1wJs;qfuWS`GK456Cn3|Y;fGJ;vJBTx`5I2fSQ;6Q5B`3~ zmyGU6eDRT%c=5m+RYprmGD_sAhE#yO9UIVk;JH{O!N9@#O!42Iof%g2^f~aJh%|Tb^IYl~oC8bI3vWz`ubCpid z3$BTC4o=N2foIaRuIcJkWVBCs9bqcp&u=did||XN7G#XfNWc(O7yNF13fHIpF29MM z^w;V?FJ$l1wmu++BY#d?!_Ji*9il1nmTIjJ-ioXHDEH{2InY74x@LA0b%9_0g}VWe z>Q`(s2Z?R3RSx$RP_vh$e!m03DnTLss8`g-{2zt;N&Tx2=b(Hy1ldm-X!R4v8`%wB zv%0r5HwBtCCj~%_J`bWVc^%?I{T`DI2BJOy?|uxC@u>-j4|_F=I{#Ny)jjC7dLrIH zZt>~D>$%NH*o~D^_fml^Om1T+FHn6$?`e2lwZQm8JygQ&=lbHXddw>vS=HQy*N`$t z)41yGU;k8$lVV;B7Uw42Uxc6x`FT7QwS!RZ8{6S)?VT?$p2G#++XvoE9kxO{cGY6H zet&mu&B@FK{9K6A>2`Mt(GgepQ50(}t8#B|uQ!^9KHKNtqVAfp{bU&UlV;CJ85QA+ z7uhjYj<$P!tozCvJk-S1wwWEr-k@NY?YH2y4Jk8RD8zgIy%4BZ!h$T6=ltdS7 zG^=^Ncu_xNnNmiJ;jAR%PGuis@-LYdD-bO;u>3dhcO0<*M~-$9+!cf^g{jXDCD)@} zkHuSdde7`e%b7wO$2heo6M3TQjfQM_JD5O zqAp*xyb6ihgbM>4Z-x=?1E7RALTl-NZGWO8*}6(Bps}1!z44YWZWzntw^RK`s3>G` znpqlU_LaWpJO}*thB`wo4;HJJvW)WE>@1ioY>0&H6_1={)nbR&>>W`F6e^k$Dbwi8 zNx}2Myn;XL*i%0#&FFr*r9~ZJ2tG}r;LJ2edOn+AtXa-6np3l2+fTHUKZ;)lX*p#P z94>Lk5+j2W)o5PjdPqy$)|G>}pmIUb{8|5Vv|Pk(9w^J&Y%@#!?`2J>E-ZmJOo&z! zu=GE}d#5_?D1K#mf-l7paFg7$P0uYEnXKR-QH`3gBN=fBl%0Z1)7tmwbP8~A0BX!k zrxCS6eA8akr#tozTqUW?6j>hSgh(fU(sZ2O5WG(HrK`1!o$?4%MoTQ81dp-;OrjRP ziCAM-ejrLHxt+PBsAo9wNmU&^P=D))SIOzQ!N6Dx)h-JQyYaLIP4Fc96JP&ZAZ(2# znL8WKW=+$VL~|(LdC`1|g|jD1(z~&wMSThBsN;B`{D0I`e^?vFuRyQ=Cf*IbT zj33Di&=FuV4KesM_2;;d_I<(6Z$}x%cbfa;(|M)}b_6uAj;J}^0Rb7^ z7cFli0}r}?6Z((c?CnJtPB$RY7BaHcy!pAl{dSfg~frd4>q5WiUQYN+|QG!;gFd+K72s;Ix zIs1mfD^FmjtlB6F@k%{yvVV6D^<}{2E5bP?{W*)?&Nu(?q8;r%P~^i2w`QI@GL5q+ zYx})kYlL(BLSv>>RK2v|7X5@j^%A!E3U-A?w8;iX=wOGuZ&cq9)R9Shu0m#Rwj_>u zIvETwF2pW8(!I_JXSMg6ycFi=Lcjt?vU_3$SWOpo)EK40J}d@Dl|+3v@K!((H^BI% z`rm$eQ&a5P69{fTMDTBU7r`Z;H+gOjY(OeD1!>6HWBJzkmDaR4_{>Tyry*VV{4T_2 zLmbw+(0LOG_S-;$r!>K*L}6wvPZ|c1mXEY$<4c0j~XRH_EZBjZap6f$i|vKG?@4=H$$1 zDixSQkAiLP2rl)=3rLRdj1uL7 z=i{Lenn{rZ0Y8?1zS#vu4A=i)m6t~^4!QGPDeiqP-k#Yc@!G%F|8`^Z^89BH^x;JW zWM5T42pIkMH;#y4+%te={~s%Z|80>FifGe8DGO}Eb1$|{u~Ls!tF~fzznjv0CxoX_ z?x1+a)FA2kQc-=C_=Yvom%s>J(RF`FNvZNdr3^T$Zl`Xc-R4$=VkyYEudlPh{eHSj zZd6Xw)5Tp+FERjG^*oASrczN6Kqud)8JXF?!gAy$`AFJ88KtZFe5CYQrTYv|llHE# znwDgJ7kn5yxg*8!&uPA?fS$)a&_~Nk`Y4_?yidJ0b*$*C*Ym=uz9uIgU1fS|=#z)J zSi|)SUe2@A17SyqOS2B%LLGJXyXYS80F>g?!Ej9XPPtf1(sR<)mo?Mj@-_V*D0s)n z{Ft1*Pg-IqNBq~Ze*@L7gD|_^PIF=IxXuKAdCxJLX0`shB#n)!BSi8K@q|=;BPGn= z{o%>Zr?NIwdI!mL=NRFGG_Z4hOz=9!bH6}r=v=YXF=z07>@n`PF!lyNIg@ZRmj z-S%SrH-ToMvb22e)wSmtOCCKTK3~auqc`w;T1>}!wjiYaT>`d)Wn;FUmW&Q!RV9eS zjISJ#%b^^t8L8`+H0HWJ7W@Di_5=lF-v9HXlj+>U(y2>BI1G>bj4wcRql! z7gg}^GBLhrSV2d7sUM{cyG$sJQk|mvQnbH6e$6^uE0FD<)sd$pr!>@1oKS+pggDSP z+7X10DM|?HEQNVTtn)y1?>|5MD!2hxsi76)D=yA1J#$IJCcFwSEAji3Wr=|w0O5iJ z(oU=(aAK&U9n(Pcu#Ve*5mlxGP&A0kl?3GRN*qyX$1ARe1|(?juB}~HI}{J`@+k|O zS~Gv5_bhTsZp2*UZ}x3Wn0i)ar@C#RKa1(gr#t}VRv?$5^`0OcEj{YT29fQg( zSe~+8XDNbf^OH9Z+*Z?{-t8`{aPCi%2;JW+DrFlFUeByC{vckS4Zxl}xlpPxW8UF2 z3I#YQm-PGSAWFI|l-q=T1c0d-ARw_Ak_UtYKrl#(35muK0TKoI|C3P!i2tHBNN8uw z<4~DqlL?8aJenw_rUNQyB)9#479&GQf`6q%P}GGTE2Pl{MS0kjiLKzu!3X`3EFj+z z@?LJ(T&P{W4@jDHV-s67GjGqT@Z%`2el0^=M@{b&!4rl!uoo$hA)x7Cfb@q#`lF!) zLI2x7gcbff?~X&NMbm-e~4M4|Vh%zyr{uy+RLAD-8IA&o=Ij8nGutaqb*^Ek1{ z^c{EZm3hAIA2gDtL&`))Uwl!`-=BPi3i+?A#ANN!oi{~Q%iPW@;2ClLtS$ZIz@ zB2fQ0;pm_<|6_kQ#X{3rxlzW}ep|67Qx`nJOM=r2n&%iS(L zTfOQrc7)OuiZyP3-&+gFpq&TVJcc_@f2?>iw|TX75fxS0&Z4*L3f6f9Zj)aMQ2xKeYf)cMdTmca(Jw@e2Z0zu6D-&AHlaLSH9LMnC|FO zRe!eJ{Mp$c-ZUm4$xTOouDRyBw?R*+5*XItmCN?}sFqUuAYw*=E~6cI@>1bAx)^54 zuhwu7UFXhOMH|X|Vx2kyIO4IgA7x}@`a-aTYkk4NK}HZwVee2W(6-Vk|7m{p4cl=L zu3dCd7tum9ISyh`e`$Zeb4MXoR;BFx#L8z-@;oSI>3b=_4E-?dVn}J+Mm2Jd59xy< zlqBrH@!e*v7?hi5eX_nIbd!$!wo?8K_|Weuh5ry$df#~keG`Fm~>ExCET%hh)gJ$@=a;;qk@my zL5gB&Pfjh%9bP=>>9)GFT{q?RCntkd=IL~X%Buh0Ln!bd(hPta25kU>c@hxA3;J(^ z8b0>FtZ9WFQL-WcUO}&(9oV}~X9$&C-lZ?nzi#4SLKK>E^kl(Kwy<;u^yneD@A|aC8QhV(OMZ$2fyhjP{y{K{-|ZJ-N;SUDnFWyQMx@!{dj0yFW^3)xu*!M zJE?N*+&x~xUijLs<0M`UibM^TY?oHn_68nJ}7rnt(#-h^W4H= zp#nd==$hW0+}Jt-RO1$&ZShkRXvV=`)0|iKZ1nQ}C2IBp7=nB2B~Lyh(cXHt5H|Ri zDMVuqz%G}VGtLwP5B*dIi&re#}Z82stID0RF6uF&lD(9LmxvNQ2ka-Rb~;#TGW zzB4yHr0PF%v;97Fi=L{Si;wS7Z0B$gRmUnbIeP_zyA#_z57w%>2i?aa-rTPUqAH?# z8Q+;AALvPOrylY2b8=JT19B&*)}0|Hj0eyU-!!pL-n0*DDU6<%rqu|GbYPo&HRGx~ zm+W&Gui{(|5g(g}Xd1{_#|m2sxvU!>(r{yV#B z=zmjTCUEm`&f1aJNp@pm%eHczuRk={@KJPf&Zs*67QNuqqs(>f_jUU|{Ad3@I?ED+ z`$3&jA|-#FPlwak2Ml#4!;=sIqAm#>19}uk~Ebn&qu#<0pR4z05@obdo-*jLd zaPPx}Tl)cGIp>|>w#Sr7Sl ztiN)IBoDo*cFdKzTKjE$r_DOOAXoYm)xARTUMK2~@*VfnnxM>XD3A5G5rb+_=-J&J z;$ubSa&BgLRFjFi2n@oq9sEouo*m@|n$5lF@YM(CTt9eVVIZtX6ukU@ZEyX>?;zSxMeJZSb_Xj6b)JU7Gg!uQYMZ#UN$B3aS!lSG( z&Yd2d{{38Ae@Je3dR4ikK+~tnZY^cBX{bjtg086{w$h8sRX{e zO*)e9d`rp@(NL^F`J?+wyw>j+pm;SUhyw)YzwO&(Hu0-8?K3-+ zYu)R>sQddOgc60XoeeK}!&<=?&h$2KT>Q%NCxaA4H?b_^p1@MN{et&M`m(uDd{(Rja0}s|MVB2Xwjil9C;KBipL1T&p6;{w1@AF+| zY%!OmY>klZq-s(`HtY9@7-!PFFJkWVOPN9!ju_W+PxuII` zAr^mHl5y%YV`0)+ph^2-Xz5c)nt}y!va5#O1GI%JUN`FJV#uiSx?5I&hYwGzk{b@n z61JD(-`Nipd}hXKr8M8YwfYvV7`MMzmamSs9>nqU5_R9ZnTdU&jcydKO<++?=`9n`}BVjDPMmYHZd__ z=XINV4Hc9pU3_9hOlv-n6%*0CJhr=`8mMu99E>!LAqRc4D#YJgiwSK5it&l#O`TK` zYRYip*=l+3#Re~3-oW{~L2zUcm7C~AH%dj$30@S9{aNkk)hcVTd%eEN{nMv1SpVuPzkQ9Z^$$V93@d$>8y# zK7t&ssBqIkBe0|WX|&J57IM8)y4D|5@@1lr3SBhRd^CF}-v-ma zz~}*%Z>$-eos5oi{@#E+Std<;^{y!;$3oa*mq&58VOM~17*OYzsE)BU8T$Q6U~;ry zY+Nk+MB94HO1e z9ZCFH`qs*$Cg~Yzf3tXea7z_%!7omSG`@6u_F0n|yxQqtFkpIbxEPzQFE1ic#&AZ4 z=OEaS|N6mxyGnNT7hMl6wF0qE*!J_Ui~8J)=l+=UQq*fn8nS?<(Dp?Whm00lJ(9Oj zYy0xp;d|fuTe0){T=5XWkEJo^x#NXW{$<3`vP9scp7eEhbt}nKU}weL;YWp_MH^2cKG2p0Bu=cC-<<1PsuySJg zu+gM2EU)Cmec&ZkV_|J|kCbP>6@QI;Uvt)oU55tV(wRI(3}H`-;4w`O9$gha!Ny<3u}xkV3lK{5Rjki+)U2RNMt zUx*=2F5)e!Uj+>aS(UP201~~(C+4y8mi=^Ic_kMhOeiE(k;LdX&u;x~SP%5r29Vvf zV6NWE^Du%_BFaoL!mJ2Apj#0?uf1PpnUlMgpZ*{k>QGb{hC1(uI2~T}FK@+kYuJ9- z5IaY?6d**HNiJ^ok7Q;8rbQtAMk~k(s06EAX{x@O!mbQZl(pjzejQ#ZL#Io9 zEWu9TP7uH9PY{mjRKtq0e0WJAP**PLd}Qv4(S52~zgqm*xB)oYvsHY1?IlIxm2OTf z(-9Dxx)prp4j<%+eaYBk7Ue~b)vsGx(YX4QERyF=~b1x1@ zHp4}a4}RM9uiH16)8g(x1R-G>t+&QEfLY-HWT~xqwC0jD``;tetJU7=Vv$ex_8))x z@P=b1py11os%gOk#l*rtRw1im>@+Q!D%}PlZ{@vzHr&el{eE|J!7inGzRyu1&7Vs|}WenbJe@PtUIgF$f(sF~84n{{)Sv!}X0UKA;R^V3E^( zdwLl^B_Oh46q9b2u1aCh-t?=W?Kb%tz`|iNl-1aVe^uKQ^5bGI_s$Ied*_>ZyNMws zmt?lre$;`Lv$s+qGQJ*@GVZ}ruv_Zdcp~qOx`5^>l-;8q%YHehQS)~%pA<{K_Blp( zoMZ2ZUUGEhuOHwNtQa0ge^< z@>L`6#ofQ0pRU!rsjme@m3sx$d~^ipVXwS3JOj)tB*K03tH?G}zV!SxX9HKyBsv@M zr+>{-OfvK&b>q|DiB0e|{>YzT0LVCb#ZPUN0EX!HS2NQe9Ft!x4nUU0BAs#ue>d%d z$u;(p2Udw_?S}owBgZyadNu0+`9w)}o!K|OZ(>1(CKmlH)X>Wt7yImET{k{mvb`)~ z*9ozup$FO^`m^eauv*;ZJel94r+{qU&`Tb7&Y~HajQzP65%_~oA)?D&UaqEiuw^_) z?Z70bac9M({llT~8`rm|9ze2l9?7J6yNnC{aS{8^Soog;NJl+=?nUnyh`3X3 zveR@F^c1Mi6{C&g%i?54I#rMBxvlM}_@%TTd_R7$Zkp{2T07_x8duUPHL5j#)1${+ zE=__CqMqvp!vP-+T(YVNyY@V}GW3?)3*1euo{yh>eOPyC%=|93)fFeL&2f*@OLG>L z;e3?vXTYrNGP3Cj^No@%0h9?K&o&M4q6&-$-L_y%``U`a95{DCmn%wRX7e6Bpg(mT zRHmkhZyCir2iy>o8z<-;fzBTTu-gyFCHrcjrS#jwS6rah`Q1%C(LX4;x3ybWZHbnWa45zzUgguqu37wBOyV^esJ$yZK?V2ej<{|%mvfUWcgrikh< zpd2G1uz`8c1A^FmK+Jy)@!>O2SO7gVu%O!_Fl2iG5honox*^JpHShuXS3Goz+J&G8TvgSYfW+_R zf-XWU8c4ptTavLfe}(zrv{(!(0l~hv<85_+KoQx{y_62zAR<()i4RtEEn|p!Ks0H* z6-Ct3d5d0Agc(ds=5L!^=|xKB__Dz5LCCQLXagJq3dQ1&m|D|a&b_gr1$NA!^f##N zCUOvNLkK0dxuXv&ct+XKq+{?0g@NZz%wQ47U-r;iU0p!9Jp}1P@Q2Vc&aoRO02k1# zsW}TutXVoiL=wNQc}9qHV#G3>J~VT*Ai+RlsK51`)D+ z&LXqZr3X}?7ZdyEF(1X~34J#m0AUn73{ik${u8ib(+EZ7_0;Z?A6$CFDoa8;UK?@L zMn$Z+#|%L3c$kk^>5M1NksdO(DUBXkzVG@i(dg0@G%w9cA%c74ELCN=;)*gKHO%K| zih_$r?kcR%C&R&96m2u%Pd) zPR$v>^Z>mGf?rn>-L6FE`T21;1DGks3;4c3b3K^TCQ;%3%?iUbwK3Js1=^#RAKhS_iZn4X&>mXnD}#Bg zN(!1pP4bk1b;}eTu8@+HoKu<8Tv@s5?$yiLL_k zstgR}rpN*&!Hc>`43xYlh}~Y@S53yaXRE3_g!w2(dUH3#x)P233YYHk0%dT9n)2y* z?Y)NUQEdBchdng1e`kfk3@~JFr@BF%Fp*IYY1bSDk38gPoK_DS=vcg0escr44oiX$ z$ccg|XW+SozOPTDfRqRQNvsU+cVIE_X9qnP61Dq1E`%9L!a!6Ze`fiF^F<8Mon_!4 zc~594yv;58~HCvC6%k`V7>W&@eUXbJ1L(7MgI}*op;3l&Rzz76)sr zxs7;|6=E!~uj~iF@(BaW`9BQ7nWQVeqOChyK3%Cu1Go+95a48<0ZV7uA;19B^Pni) z#AKPHI6c-R^uQ4M9pghR%ZLNQ(}6yShKlk|&oAeuE9|O;QkFSU#|)A#pgLM$diYBn zIs`eUFG7zABj)h{BCA7`+h_2`^(X2=o02bw1S?&j9{U3cWOk~$P$O{hdE&xI>tAJv zaIWJr9pShOBYc9IzznqEW1b)~0`<}Q-VN%ak3B^{n`>-vurP+w83RN;lor*~)5nzo0`i)lafDN#h{<de&G2&~p*dHi|7UiKqLM%fTL^_*|>VcRDmqDqbYn{Y2RHQCjhH} zSWsu=oWd)&@mQwh;i=o&Wh&sV{8+k6%@Kft60j^Kks7|7BYM7V8_!-?!1u0Fr{Yn? z>6fV?CM`fvX=6mhsKT?te|%Vknlv7omM#yy-Vlyi-w&REnM^voNln18;^BGE`)?Q_(mpmnQq*{VFP zGZQ`A);Evt-_XTMjteyJ@+|^ zGC%9hsp5l(cfx`YeHEudFh$P`3c!}K99AWOgM8tNkF|G|_o#M`w+Zz2t>7W!n^b!N zh?$5E*+2;R8B%oEwB2grLJChDM5cT&w2`=?e8>nf|;Qjez(bt$1~+ zV4P_`O|2pW{@zGI({mCQZ#?fc9Wc=MiX{NCzO&_Vy@ z9v{VHr@QLo?~MNWWPWuf6yh%!00~2+vGt43+Ef>&qq=^RVr~Wd)Nay#QoEk(N0Y!u zG|-E7v_U*=e#-5KL0KjTEdhVFI&+=(gl+24h`T@$?+c?8Wu7cg>FiyGY9xQB-&HIO z%N?Y>e`o?0rQopB$OMg-Lsn<27RnWRD=UKC^3?ZdKFrGGS*aCTtL>n>Wx>+Lrh%i& z5q%@lbjuXAgXg0a)eun^SosLi*~ zAZ}H?{S0+SMsDCp@~9|HC3tKA;_X}d{C$^q zEE7FY)yhj$x()MIDlzRCBP24t)r-A{KJqQ2&N`HQea+DV}!Svr|>wQ2$c_rrfqat{NT&z+?r$(w|nLw8)TK~9)*Io&O%1H*L} zfyqLJb>Wqo-REGX?+^7GSGWqiQ74$tz&Cvmj}5;mmB|52gU#ohQIuB^o7J^e)LJ|tHo9C204gm?A7tKb_d>^hdRtYcoJdD&l zkrw$j8|ne@Gb)tk_cJi-W3W;of<6ImU{WiaE!;ADbmUA#B^uP<)jyRYmfd!mFc+bW z0hBWQ0W}uv1?Yk9l0iL`%QU{RpTXYUN9Vii{-Hiv;(*!T8=O7^Bdm}+9m7YFK?9EI zl*_=R=d*MUA22^LF8x4~CJrHv2v6*Pj(gh3S0ql05XM<2%HCoh-=wJD3B z?;9SLKph8lRcQBW|03%z$S&dZ!Fq%swek7r$6rc3=KasW+z|QWUnylkMLA&$NU&W{ ze7PKc!*sRg7(jvJ$@#dC1Ki-L;h$qz@;fBtkpB-oSJtO$p-Q}U`?xwjMeOfQ_Of;R zGuPq24ihG%xd$#r^H0&aNL6G#YRP`rdV!HbJ>kvrm~IqJa8kSwdsh7eH1?2{2U)sN z)$zg%hzy;O)eC6U@NaE7kYNSyQ<>r0=cc}gPEDUd7KZM;OpcrwW%%^Jy+A0CHG>Ds zw}%8q4<`>IS@%+n7{wC+Q=n9VJRS+i-e+AzY9Ux`0Kv8N%`5S2E7)S7J}!bHi{++^ z6#&ozO*&68E+XQlfGzcanW0RTILxX(kD27ndN-HvL8FKFNA5Fn+KVhEScE^;K6K#6 z^x+FXNlYEs)%YvR`oS?P;=Eu{-4b~x(N1L zuAsZ|q%aWqHy~1D%xO=LdF~Wka0|L74$HL?LjCD(*^-KH0M>^PVX|%H=oks!kq;9_BG*Tm^ed#Ej@y$?c z7KC_VAWwgcEkDY}f9Uu=C!TD8oVC!;VB0H}QHE#3v)M~&5W-jiEBvIy^a$CGxI~)w zX~E!&Yr{1&*0x(p@)Z$UTVe+Vek9@hi z?SuYaoF{&7tLw+P(vk2K3`uz!L|9cio&q%MYPCikA4b?C;u$$(ufO=~in;rUzZF90 zK~IA%C+TKd@Eko)SMB}hY!nT-TVwefTv!zq%?sz|{SzFIEH$Ow?eD52D0hbLzAWp6 zicpJY^r@^YPoAJ>YjY$EM`xo-!h2eN>UdkiV2KBmM>Jg>Glpu$g`hH z<9V6$Bz?x1Y40DJpqSPT>QRDPAs0dj-!Np^F&^J|8;>{}3l?&%>N%;N@6;WhwVY1F z8c=p5D7)msfpCE*u@ve1TAgR4OdRcP6+!-$-=XbS@7zb}D_EPXh=Xsul*3RQQN@!T z;Kwe7TxcQzV8elN9F-*=FYot(y1mt`dfF9iAAV3b2zicPiHW=51)iV>I1WP;i_q}g z%$5wJNXI20Sf0u%dVBx+Xz2COY)~_L7;M6`mk`nWkj_ZKtZ33%-lmEeD{L!$0MON`|IpprkP(ojq3!(&L zcRXVc3pMD7mw_P?-*N9~=K8^VxX)KxC(58UwJc(EcqVK1%03HwYdagsP@FNA`QpFX z-3>R{KTPBay_fRw7^P!c$llMA@HLY%p_*AaDA*HO<~(C0)*?8Mv&U-JW@ONUh-XM# zYZ?>?FcB{A`VRBLg^6e?Y9g&MX4U33g^9pG2oJhPGkQvipH0}SF(gQ;BjKYX=l-?Y zhCSAer-00Ju`a+11WZT^e0zzdJno&fG1&-{A_j?F0#|4zBUmoI3{5}NB9Rh!!93zn z6gnEL&JJ9l9$v~wU+#upHs`UD;cAAiP>aFTU zm@TeLp9^SU%JnEm1OitCtisZIm6DVIc}7;lNn^U%J_|9Q){qw zf%c$W8aT?YIGv;>rGmZs&$N_tkaI#3nn@b-kYv$e0SB-JWaVB+Jvcj)AQorU)OCc4 z_Am?8GLr>px)Sr$jHbau&J)ze^;?B2X7MWa?!fVg2_Jn`KhIh&RokzN43*jWQhVW8 zVm})p@~#y-+;>ZEM#c-&)1{(eU*Q;@_#I5%=1gVRdUcP$g_j_<0;4isq9~A5(SB?) z@a*1Y+C&5Dp!E6#Er=wx7VHZZi4#4h?A)_>`yt6>@bxUeBUOR+e&g~5C)v>2xx!ZbQF@dWzl`l4d1L96bN<>Fr; zXfFm?pV?ZD-S1Ho^}?@ioSur>T9(A@VI@H?dS=ds4Z(?-1?ualj!o336B(U=tU_&u zzQDmxe2*h)!Run*eam-4jy|hRaF9jrFGRo0r-dtZKtAireMNT>Lf6e%%yvCp5#?H~(t$D{@0sxn*wwt)1~1z9#~5?plRF-Mn9eqR-?SOpL+b;5u%aJ<0{)L!W8P6>dlRPW zUJCH9VZHnDI-yennKmW5aLy01i5}DqVJL0r0cut-@OP@UCbsvt$`^qOc!s58hV}_H zz4j(fPcumepGaS-kz@u#i94r zC-p_YI-zrqlV6jIz;B*T*4dhB#Gkjh{*#d~@(GXsjk=HAgQ)s4kbE>ZwEgE<;=)N6 zwWq;>_5Rdun2sa4cjIlx-p~R`B0G3aHGB^T|ACkmp_t65D-@&aj;KuXCjOvjaxKP_6ehiLI12p%+ef`)kv2G3Tf{-x;R=wA-_$SD+f zADepn(eVMgs9E!-=G9xV(@wL z$R8uAErVp#ojRLA53AZNt@ra(i!mDIF{`6t5#pALa?xP zT*;O4T{;kh&J_aU2QMcqzN!|eZ9{ew$xmupE2gUXmwyRG@QjZ9*^18i+#vh&+%;RE z)idXi43QH$#A$O44`ZIbx@oKzoNoE*N_w`c>GG$yHILq)nT9aNR3ujL4N6_Ls~_EC z3)mZtg!G#Q$aEl8oU})N4g>g>-8p{xy|wn`aS(^RT>Y{pLA}y)5B!hLz5^P||8Mwv z-HYtK$8BY0WN)|1-c(8nMUjz=DC-J^2#L^7+)2pZGu&ksA!J0{(y(XtdawTPd*0_c z@B2LGInQ(Mb3W&Lo$LCp&v$(G=QfJwV4}2GN2hy(d}gBH-l*rR`d!gQh-7%s>#ar$ zGoisRqi?2*vxABpxjx{1?EPnZJHNC$3K;<-Th4SyDou9{Aol?S9W^TBLD2{5tajr7@#i4hbeJ;8%5FUr0vrT(2#5iq6i}(` z2~`7DKG0d8!ldJrJO3~(8gs+$-M2U&kI$fHk}2K@@91~GhAggv&#V69LLY$#SS2P)TTh=5=_g2fcv2fSDl-wPLg3VwkfpEW-QYiVvY;NQh1HP3^> zP4JnO;n+zrr+y%YShMOM?pZ9(*Y8bTn_C{cyz`Sk5lyyHT-hJPsQ0b*R_>p^4Jd}> zQTPqW$+k&N0B`eE-YW+D*i51qJS;2nde7iWL99U=@i~acI=P#0sIz_WRRL8jvdPj$n7#@+>vzJrVNdq-LDCoa-G*Co70@64 z8M;~QqVLW9kT(5W8}7rmwZ4 z;-GdeJQ@Hda0X>a>u}!!y%73_DbE-xR=Y-g3RDdx;iG6!2o4Dv8TzVFMq8i+f##Fw z2qgil?FN5DZ}0gn{PqZvzeD5FLOKYrtT*k`=qp8S+azp;GL!h@d-Xuqd%nh;uKUh! zGk-_lXF2*%tZj>BsQJ#sMo1<<_z0XUc^xoQ15{)w4SEu0#qJoW&<@~g-t`Z-C!6<@ z!mjhG_H(X>LflY+lA~^&4bXU!?iTxcHI|h`qru!~10RT`Wb2=)M${Y$fAFUi7S~eL z)ju3ckNkXnfi+wHe%SVz-;6g>R+!vs=^dEP12YucH>ev$&bpr^qIS9ApJ%;pLHOOO zL$$Ly6>bWEw<#&j_W{4q7Yt{Kh9#T0p_Lhgm#C_)?e;1^p zPF2Vd{&2XL!V3EUA6W>=)9{Y!1nu+Juhe)L!kZ}iOd`UsMY?|iDA3|_weQfHF~h9zF%rhY zk^m$&1|}S42Tt$bUzQZ9*}e&T)u)iXE&i+DfWy~5*AmXa8M>wWBL+UNGO!S1mO-k zg>HflXWvT#i@_hl2T!HFh+`lykkNxIY~xV%RRo)e!x~=N!%pR97e|e~rkA{IK}nWD zXhtzNXGBD+=8P`!so{!eu~a+P*iEb~`tR5Gw)L}FLnvj)aiIMRAz)6XVN8*5pyi@; zlN}eK)}ht}B%)`JQIV@IK_( zDOlJ900HZqi0uDD@RrMcOlDO2JRrY7fm7!nco)S{Q}<&50fl#^gqc*9dacx0BUnj1 zCSZc@?czb@khhk|D82%E@udw-2%9X>DPApc3DR+-C!ieE#BHG>aNPmHzDBjC#Hq!g z?_e<4j<5~IFduPGu{gm?y53OXsQ8ayOK@ybXv@rno4O=3(6L&IATbq8Ou1b$ zPFD+hWw1Yd#FPao2NU+9rLldISPgRKL`U;JE>&3}mif`f-3$Mk!L8N0#VVQ<5!h_) zgsPzpZstbT@3QHJgGmNXH7lAuV@~Ih>vX87OQ=$m7b1z_12m0A;RJFp`XEKu>lw>Y z(K&E%S{Os3_?DjCDb%8iI*axCdrDJ54i}UFhqKE*@EiU*N}H`CJtfmFAO>7{7c$F= zQW^FS2vGgmRw_ieMWwdhcETnIabMtISt+HTzgy(#ciSJMc0g@Y1Oy$bU_s$n)9{7<(JL0{ESetg@O8Qm>crb6 znLxmP=3aih!fhuD4o79Of(e*x=F?6ET5*dqn>~a!M+O|xY@n|^0Ft#hI?|W19LvC8 zTfmWiRis?9yNMQZHNnbQF&+PUid0H5B7bTmin>z#>;39D|E;=~_=%3YZV%k&T9}9j zn#P;YE~Qh)&!JvQxAIH}?hiiJxlT(yI8z(!1H6net))*CuNr

    HM7dage?7s4bd{ zDfV;FlbY!o6v+u|e&SIZs*Ae)^4-&!1_t4aE*CJ+Gyby zxqAFb3lKOfqN$b22`2PL&USj>;FQ}&7(kOJnAsc1+$tgUbmqddTEf|vGuqDL6fUQ^ zZ*1Lhec`kX=Qq@Q7wGF1#*{t(bwkb#EO(qc%Cv?PY4E$$ z`}RYjk2K*13}O%g7mwmonwc2@2ORojtNqFFo0fPA2r(KsM@jA*41 z1@C_bNc>2OF$XYt=&wjp#*j=Q^hn6T);uf3iy}XSA+J^bT0!1#7Jr+#jVY#_wEA1B zl~ZN{0O!T`w}XH6^1s0^`Nf!N?thKqoMDDL5q*KPDS4|)D#IeUQ0uaQ8c5zMGd7H#u5LoG;g>wN% zs$M94fp($Ou+NRnHWsjeCdDq)Zw4@z9=|xa=Cm|7dF73gxW0cZ39P!WMt5OPZ*h~V4Ow=SkP|L$XI%m3{waPyUlL~+hiUek+-S$UB zXFly1*q?O!fiOWx!)9dX19#vX9>QNm7jM-3@n+-3(M0Ag8xI$?scSU{{;tSWOKpn= z$IzWEcBi%T9&Rt1lJ36CFLQp)E~Xt7lr}04^-khG%(ot4*5# z&=BR0pL{q0KNcp8S4BR&NzPP+O-ris7h*Oz+RHpTUiR)rsGf0AOW5rnpvN(wV0Z1U zOdYA4R@eUtIf=o6rT0L>nwhbgA9TFs1aoa+yf&{fq_9%YFF8Xcr;o;_`^IX`ml zPRgYZXy<#2w_nqF_l=f~Kh~LQdRh@)g5*ZnrWDR`6-tU3b509*AH_cJfn4j^#(iq%^13_3!+*m4^Ebfv{29`JRs^ zrnj*0H_t_)jd^vjmA&^~f{WMU8lmz3vP3- zK;A;>#4i5x57E0u+%Lw8_zjtWqn3BL*n?zOH;=6rwMiN^Vr7Z8hq38U<}am23~cwi zI{VAL0j)*fnkUrDOE>l%YS}k*T_)@rHXi;J3b-`uRJK7T0aOr&y3>>jZR=tmkUkn~Kj1cII|1OjM!} zNdUyohF)dv+mt~QhCGzC;u1qRW-{JzNpz(p*Jljn;(wd81m%)(&t^EH`D2`r>~#3C z$Pae6Y!{!OJg-sxxrakOA);ka)^wpMvRM>E@O<3CwtWKB3Zb_h*LIyjtocz{K`)ln zm%Q3b0aHN^{yxA&->ClegkoCJ`jkE}DNs!3`&Hncr>XDR_p-ihZ_o@%FjiL8ruFOf zjpDnwJf>h;BV2Z}H&qHntk8YJHfwD`jZhV8G+FvdG7kkSqHKO|M$8%UpwQw53m<1p zKwb?kX~iBD|I!f zsK}17olig)e-0Br@!`{+S)?Z1tz`Qp+i;Vq{Gn6RY{nI~{TxwKd#70|K2PX9?_1ya zwaMUNxs2fEZq-B&E>&ayenEjXL6F^_m}Bzo)8CUqx%#zaNv3IhS66EZ&8BOvFeGL{ z*$`x0kI%~g*_~pf*BD4m=vi{k4E55&c3W^v<|y?}{Agh#n^D(EIb&^^(4~8gyq)~V z11n}v3;TxCDD55OBwZMx30!|sC^gPNLteQfsQxf&@%8iVkkNqjPUX{62Vvvw_N1YE zbU^OT6TG+Q-NWgqfGE~y5Dh=%rw07^Jlz6bd|SVkjv60t|RYAe$}^ss5_ zn{HF>pE_P>YI>3qVHgRYdUItCA55RtmC`q9^a(D0@Jha7ZeZ4IUi4MVs%4pqHje{6 zxJ*gou%Wyf5DopMRXf@X^Q)78e60A|(|HP|16rIoRw6L0(Z1}Gf01`y7YY=lb?$;g=1sC(lYt#t1>DRqce ze{tjT4u{ypdf;~=U`B^g^&$9B?2l*3oEs_@flX5RwTBoyJ z6Ux>7sAnuS_D^tG*QGaXZO>ck`6-OrYCK#chNu736Dt$4M&ur6H}bRiEalR$r^LN2 zp^}0U7UysO;=P+q0})jZH)(Nzq=8%M!nV37(3%>4-_Y-+sd!XfKXcNa?@=!ss z=$8A(vnag0l#l28H%%r_KY;BqwWEg!&RTF5EPF4HD+L>%#YfX|aI`b+dO%mEDC2EU zg~zq$oeny7)IDx;ilJ{VJ#UGD?5|$^aBQGcSn6rw&WGX1kxU!8a}UK{d2yzccIO|s zq@Cpo7B_O_V)E51L}I-WWD`faKIT6x>R6DwI5PeMM-Vq|TotO9^In|ggO_`{145)A z2Aly?s)q^le(e&IV45G-SmZi4-5ciOx3=u3&lC%!`7LxYYpW=#AH#8)4Ws|c1&;Kx z%7KnHv}ahFxxn!!jI<3I8lpIh2kRX`R*oQ%E^4*aTBoi41X#2VT$p8iO=JKcUGjf$ zon{fte%e5J3~nr)MkoqQPuX45L zG%&GiU9UcL0t@<l>2wz3;zgDq6DD$NP-|k{lrhl-PZ7aVwG!Dy(-A|`^kT1 zLD9{>o+6=hN1S5a#w5_*vUTdb{n|U5)4-sKVLm+thlj|BV_^A$>h)_kj4y6?A>8EU zQBcbr)F#xhV-@9T{92O^c(+?KtBae_;L|4!K*W7F>kca=;ZD`lidZn~RrCO|_&ql8 z3Pg!O64R?_Z`EVS=3zyY+aXThS4d1ihU<4eL;I%)fezCkTRw^0TzPZa$YQj0@AyYK zE@W{^4ip?H0Stiujw^`+LJC`MAOa8oyr&4R9{>Bo0f4{w{%-)!cEn2&;XVEhe3wK# zHGpS7C@(n*;aJ(=76K$%F8J_XGCP_bcP;TwWVReS8N;$kV_J2mW%}JAP0Y60)0U{_&S=w0V&I&XSmw= zkU5OMfn1Kk_Se9iVHE$BceM2Mqf0CP4a*~FK#u2vuN3`QNIqY{dd#X=L0oa@ba;mP zsh?8lnL>P5kdCs(nLDZLWOalS-hPU+NE1G(*mhhwT0G6*WBcIv4!VaTt4BFiEtV%y zD^~V5Eq<*a=)*Xx?kx_|b>TMTes69ALuDm&EM4DwO%_A_&+M=u0kjEBZN;m+jS&Rx zxV6ULv}AX1qW*7OrT) zlV}*~l+so|O@Zz-UD(^V)Y^W;DaeG{}(ZQNRfyt+@|$n+zd14SXq+ytk{ z?G*{aaaY-EObD^uzvloxOteUkiq5)&?AI?>^}lW#DKqT!FBs?aENnUVGaI-4S#G3~ zr64$6a@CqZTX+NBj~c&fkqL>ljpsogd#y|qYJUvs_R5cc z-?;Osd}YT~^3~)RI+Yeb{ZkjdidAv82sOGi&|I5>6uv68*@@tysr2Vt3b+>qR*+~- zSbkdk%Dh2P$Keev>IBhKM+wTW=7tXiOds7|HMag8TJxdlS)PlCU?N8*cAE#$esox} zG=6>8e|t0+vad}26~zB{+qpF}ip@_`EcK*mHPMrgMjFDCAHKxXyfQSMyDXb0St3n+ z_sE9jU88~8l$q*{&rR=o^(mS8p2rZz#(MwJv0sAVe_&4(+XIvrGXo1!CW0VNN){Le zuzkz7B;^1R5jKwwKimKo$Ou>vp%@E81jymMMJQpf*VF?2|82`!QXE2 z)ZD@mDY1kwSx_Ygn2=fs+kkZd1c(Evh5Iia6RC*Wx6dF-aKuA1<6r&!S2h0Q=JTIx zjTt|`lV%BU4i1Z4Cq<%bt2vQTJgmAbI50T$x2X3e#o$ZI-x3YMlnOsoq00eVQ;{+n7xAm!qRY^I2-oiBIrn3@(2zkDP0-cG5htMOl-IKCL$d*VW3l~wb0 zcl39*OpS>!yZ9sRJ{B=fDuqGGDf=3QyBCjsQA{lK%?I2zKqPK`3bz~^$hV7?v2>$K_{!n?La@U? zPhLIF>XF_>VJlZ>xAt=P>)=(L%1L7h^6fW@xiv)((1G9Zh2iH<4VqoyF_Y7gjMHfK zfw+EDIT(BjPw_4En4a$jA8UYFCX$yw3nbVCCV|bu$eLS1e%-J@%#!kPo?l7sxxZAV zTdQo}#c^I$8;LSE>AceWCTZUEl30f@Dr$F*vFLG5XT8J$nR-A*9_;njDx(NYW1DfY zBeq{M+VkpSwl%HPR`OgP^JMwGB=X9Qy*NfbC*)@d=tbZ+mMU`T*Yo~KlN)z!LL+D) zl-x0k1?{Y0#NVVrW%rS|vj%PV$~ujMws+DG4RnAdYGro(oCz;;AB(F@agJXsPJNGy zn9qB0{*taZL>Rwy9Td2PrdJXW>PPkJakOGbZdkt_cMO`)ZX|7BruGZSb~|ARz5P|% zNVe1rJ~^})CP9Bw;X!UqO>WS{{VNt>^QtRN0>HmbPKMoAnGxA-tivAJXF%afYslrX z5#6)C8hgqQ3qk46HhRYJqd=6!Wg&2e)*@=&cqO@B4;0RXzJL}=m|%B5b`)Mg$pGV! zC!?K&DXX#&grDCyN<0RRsNO!~B!#mQyhimzfNn)1BnQ=Ifx{V7Qfaxq2vCz2X7F*G z`(8?fAEuS=86r8>=rhFt_R2YsO@(ef#KWJzUP*&YOlgyy*epf+1z^cWKlu_K1N6l1YU=6hIp(tubfRTXV z7}?iZ)Az9%k1-D%7X$Pl;_ZdyGeFV_mC6J;bYXY{-Ap_%L{`?Kvq95QiY1`oiW)Gb zk-d&WV%(9HULghoX-2rcvyty>wd-}_7VFq`&%GEF>6eND(RHll)Dnx+#(SE_IVES9 zIE0B`s37ET25x5bV&Fj5Zmx?7xSUE&xn<5$Dy6#>x1jF~)@%1nAqPbxqg&E*homQk zpDWtlI9~~?`B-q1s;JU^87gJ#xN*@x8hB+kV+nGo(zs{O)TSKbPN{c$oRMU(RF@L_ zHc_kHi>Z1Y+DStkM|)j_crf=Z=;bLPQUk}XSUMvq@1kVg0OjC)Y;KO|obZUEw8w>e z0`MhPfcmMv3cR8j98l4@)o34uXstvkB=mxHV)G~4*|!ADb)I1Jb8y?81PP6@$}fh8QQbW#lYIota4VaYOI%qn=d_vz(+|4B7JvTd!wXqNg?Iry#+?iU;V`k zsF|?b8F}(~#B*06_ltUz#{qexG19#OWO)C{jv4)m>-Y|T?Z&LcMijgKlXGx-zG!~q zCyfcXSuy0!U!q2aq{APtccyUE4D?+OQtY{9`*GPw?jOPpT3+vP^3#N_^8rogzUVs==7SXEAM zwqk+B!=dhbGpXHnVdfjJJR5#+eqo+s0PcDUuR+GsU*2`TWA~(nN6*zxWUX*r>3N62 zA8OtE=)8zBcx~$s1r$yDqbxeL0w@XE*wSrXz2Vcq&$E`1;8jM)0tA{xpu99pW)oM8 zxWubv8?l0`XsWBh9s-v|Ko#c&I;b@`g&WGN(Xs^1Xv9;dI%W*>X-J_?@8&z6hK|PxO3)f+&LC@7iy=KEIPnCaC)Y68WL zrwPC6!hC;a7qD;Jan9x{Cd5PzvW=%_c`L9C~pCy|5h5*$ZF6~K#!qPFkN z1WuwOoe6I7X%f%X=~S4WW_8!4>6RWr;Y`W`BmUf!Bd&^xXkIjqsF^5&1%f!c%o*{L zpEq$59pNGe1sCCQ5akR+5{L;ISs-%{Dh?tMEQ_Bo99m9Dc#2vE`9njz)fdGN`K^ZhuEz3m_u zd0Rnc8-!>PMA|k8(ISYfgUU9zL3G~iirTR$!ut=`Vg2@$Tljkb0000wizard = new PLL_Wizard( $polylang ); +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-page.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-page.php new file mode 100644 index 0000000..ac52948 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-page.php @@ -0,0 +1,122 @@ + + +> + + + + + <?php + printf( + /* translators: %s is the plugin name */ + esc_html__( '%s › Setup', 'polylang' ), + esc_html( POLYLANG ) + ); + ?> + + + + + + + +

    + + + + +

    +
      + $step ) { + $is_completed = array_search( $current_step, array_keys( $steps ), true ) > array_search( $step_key, array_keys( $steps ), true ); + + if ( $step_key === $current_step ) { + ?> +
    1. + +
    2. + + + +
    3. + +
    4. + +
    +
    +
    "> + + +

    + +

    + +
    +
    + + + diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-home-page.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-home-page.php new file mode 100644 index 0000000..8d689ba --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-home-page.php @@ -0,0 +1,125 @@ + + + + +

    +

    + ' . esc_html( $home_page->post_title ) . '' + ); + ?> +
    + flag . ' ' . esc_html( $home_page_language->name ) . ' ' . esc_html( $home_page_language->locale ) . '' //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ); + ?> +
    + +

    +

    + +

    + + + + + + + + + languages->get( $lang ); + if ( empty( $language ) ) { + continue; + } + ?> + + + + + +
    + flag; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo ' ' . esc_html( $language->name ) . ' ' . esc_html( $language->locale ) . ' '; + ?> + is_default ) : ?> + + + + + + + +
    + + + + + = 1 ) : ?> + + + + + + + + + + + + + + + + + + + +
    + + +
    + flag; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo ' ' . esc_html( $lg->name ) . ' ' . esc_html( $lg->locale ) . ' '; + ?> + is_default ) : ?> + + + + + + + +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-languages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-languages.php new file mode 100644 index 0000000..6877f1e --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-languages.php @@ -0,0 +1,136 @@ +languages->get_list(); +$default_language = $model->languages->get_default(); +$languages_list = array_diff_key( + PLL_Settings::get_predefined_languages(), + wp_list_pluck( $existing_languages, 'locale', 'locale' ) +); +?> +
    +

    + +

    +

    + +

    +

    +
    +
    +
    + +
    + +
    + +
    +
    +
    + + + + + + + + + +
    + + + + + + + + + + + ' . "\n", + esc_attr( $lg->locale ), + esc_html( $lg->name ), + $lg->flag, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + $lg->is_default ? ' ' . esc_html__( 'Default language', 'polylang' ) . '' : '' + ); + } + ?> + +
    %3$s%2$s - %1$s %4$s
    + +
    +

    + ', + '' + ); + ?> +

    +

    + +

    +
      +
    • + ' . esc_html__( 'Yes', 'polylang' ) . '' + ); + ?> +
    • +
    • + ' . esc_html__( 'No', 'polylang' ) . '' + ); + ?> +
    • +
    • + ' . esc_html__( 'Ignore', 'polylang' ) . '' + ); + ?> +
    • +
    +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-last.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-last.php new file mode 100644 index 0000000..503889d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-last.php @@ -0,0 +1,112 @@ + +

    + +
    +

    +
    +

    + + + +

    +
    +
    + +
      +
    • +
      +

      +

      +

      + +

      +
      +
      +

      + + + +

      +
      +
    • +
    • +
      +

      +

      +

      +
      +
      +

      + + + +

      +
      +
    • + +
    • +
      +

      +

      +

      + +

      +
      +
      +

      + + + +

      +
      +
    • + + +
    • +
      +

      +

      +

      + ' . esc_html__( 'Polylang Business Pack', 'polylang' ) . '' + ); + ?> +

      +
      +
      +

      + + + +

      +
      +
    • + +
    • +
      +

      + + + +

      +
      +
    • +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-licenses.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-licenses.php new file mode 100644 index 0000000..ec4feb6 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-licenses.php @@ -0,0 +1,42 @@ + +

    + + +

    +

    +
    + +

    + +
    +
    + + + get_form_field(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + ?> + +
    +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-media.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-media.php new file mode 100644 index 0000000..c8734ca --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-media.php @@ -0,0 +1,58 @@ + +

    +

    + + + +

    +

    + +

    +
      +
    • +
      + + + /> + +
      +
      +

      + +

      +
      +
    • +
    • +
      +

      + + + + + +

      +
      +
    • +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-untranslated-contents.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-untranslated-contents.php new file mode 100644 index 0000000..2c6dc79 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/view-wizard-step-untranslated-contents.php @@ -0,0 +1,37 @@ +languages->get_list(); +?> +

    +

    +
    +
    + +

    +
    + + +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/wizard.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/wizard.php new file mode 100644 index 0000000..088a719 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wizard/wizard.php @@ -0,0 +1,888 @@ +options = $polylang->options; + $this->model = &$polylang->model; + + // Display Wizard page before any other action to ensure displaying it outside the WordPress admin context. + // Hooked on admin_init with priority 40 to ensure PLL_Wizard_Pro is correctly initialized. + add_action( 'admin_init', array( $this, 'setup_wizard_page' ), 40 ); + // Add Wizard submenu. + add_filter( 'pll_settings_tabs', array( $this, 'settings_tabs' ), 10, 1 ); + // Add filter to select screens where to display the notice. + add_filter( 'pll_can_display_notice', array( $this, 'can_display_notice' ), 10, 2 ); + + // Default steps. + add_filter( 'pll_wizard_steps', array( $this, 'add_step_licenses' ), 100 ); + add_filter( 'pll_wizard_steps', array( $this, 'add_step_languages' ), 200 ); + add_filter( 'pll_wizard_steps', array( $this, 'add_step_media' ), 300 ); + add_filter( 'pll_wizard_steps', array( $this, 'add_step_untranslated_contents' ), 400 ); + add_filter( 'pll_wizard_steps', array( $this, 'add_step_home_page' ), 500 ); + add_filter( 'pll_wizard_steps', array( $this, 'add_step_last' ), 999 ); + } + + /** + * Save an activation transient when Polylang is activating to redirect to the wizard + * + * @since 2.7 + * + * @param bool $network_wide if activated for all sites in the network. + * @return void + */ + public static function start_wizard( $network_wide ) { + $options = (array) get_option( Options::OPTION_NAME, array() ); + + if ( wp_doing_ajax() || $network_wide || ! empty( $options['version'] ) ) { + return; + } + set_transient( 'pll_activation_redirect', 1, 30 ); + } + + /** + * Redirect to the wizard depending on the context + * + * @since 2.7 + * + * @return void + */ + public function redirect_to_wizard() { + if ( get_transient( 'pll_activation_redirect' ) ) { + $do_redirect = true; + if ( ( isset( $_GET['page'] ) && 'mlang_wizard' === sanitize_key( $_GET['page'] ) ) || isset( $_GET['activate-multi'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + delete_transient( 'pll_activation_redirect' ); + $do_redirect = false; + } + + if ( $do_redirect ) { + wp_safe_redirect( + sanitize_url( + add_query_arg( + array( + 'page' => 'mlang_wizard', + ), + admin_url( 'admin.php' ) + ) + ) + ); + exit; + } + } + } + + /** + * Add an admin Polylang submenu to access the wizard + * + * @since 2.7 + * + * @param string[] $tabs Submenus list. + * @return string[] Submenus list updated. + */ + public function settings_tabs( $tabs ) { + $tabs['wizard'] = esc_html__( 'Setup', 'polylang' ); + return $tabs; + } + + /** + * Returns true if the media step is displayable, false otherwise. + * + * @since 2.7 + * + * @param PLL_Language[] $languages List of language objects. + * @return bool + */ + public function is_media_step_displayable( $languages ) { + $media = array(); + // If there is no language or only one the media step is displayable. + if ( ! $languages || count( $languages ) < 2 ) { + return true; + } + foreach ( $languages as $language ) { + $media[ $language->slug ] = $this->model->count_posts( + $language, + array( + 'post_type' => array( 'attachment' ), + 'post_status' => 'inherit', + ) + ); + } + return count( array_filter( $media ) ) === 0; + } + + /** + * Check if the licenses step is displayable + * + * @since 2.7 + * + * @return bool + */ + public function is_licenses_step_displayable() { + $licenses = apply_filters( 'pll_settings_licenses', array() ); + return count( $licenses ) > 0; + } + + /** + * Setup the wizard page + * + * @since 2.7 + * + * @return void + */ + public function setup_wizard_page() { + + PLL_Admin_Notices::add_notice( 'wizard', $this->wizard_notice() ); + + $this->redirect_to_wizard(); + if ( ! Polylang::is_wizard() ) { + return; + } + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( esc_html__( 'Sorry, you are not allowed to manage options for this site.', 'polylang' ) ); + } + + // Enqueue scripts and styles especially for the wizard. + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + + $this->steps = apply_filters( 'pll_wizard_steps', $this->steps ); + $step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification + + $this->current_step = $step && array_key_exists( $step, $this->steps ) ? $step : current( array_keys( $this->steps ) ); + + $has_languages = $this->model->has_languages(); + + if ( ! $has_languages && ! in_array( $this->current_step, array( 'licenses', 'languages' ) ) ) { + wp_safe_redirect( sanitize_url( $this->get_step_link( 'languages' ) ) ); + exit; + } + + if ( $has_languages && $this->model->get_objects_with_no_lang( 1 ) && ! in_array( $this->current_step, array( 'licenses', 'languages', 'media', 'untranslated-contents' ) ) ) { + wp_safe_redirect( sanitize_url( $this->get_step_link( 'untranslated-contents' ) ) ); + exit; + } + + // Call the handler of the step for going to the next step. + // Be careful nonce verification with check_admin_referer must be done in each handler. + if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->current_step ]['handler'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing + call_user_func( $this->steps[ $this->current_step ]['handler'] ); + } + + $this->display_wizard_page(); + // Ensure nothing is done after including the page. + exit; + } + + /** + * Adds some admin screens where to display the wizard notice + * + * @since 2.7 + * + * @param bool $can_display_notice Whether the notice can be displayed. + * @param string $notice The notice name. + * @return bool + */ + public function can_display_notice( $can_display_notice, $notice ) { + if ( ! $can_display_notice && 'wizard' === $notice ) { + $screen = get_current_screen(); + $can_display_notice = ! empty( $screen ) && in_array( + $screen->base, + array( + 'edit', + 'upload', + 'options-general', + ) + ); + } + return $can_display_notice; + } + + /** + * Return html code of the wizard notice + * + * @since 2.7 + * + * @return string + */ + public function wizard_notice() { + ob_start(); + include __DIR__ . '/html-wizard-notice.php'; + return ob_get_clean(); + } + + /** + * Display the wizard page + * + * @since 2.7 + * + * @return void + */ + public function display_wizard_page() { + set_current_screen( 'pll-wizard' ); + do_action( 'admin_enqueue_scripts' ); + $steps = $this->steps; + $current_step = $this->current_step; + $styles = $this->styles; + include __DIR__ . '/view-wizard-page.php'; + } + + /** + * Enqueue scripts and styles for the wizard + * + * @since 2.7 + * + * @return void + */ + public function enqueue_scripts() { + wp_enqueue_style( 'polylang_admin', plugins_url( '/css/build/admin' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array(), POLYLANG_VERSION ); + wp_enqueue_style( 'pll-wizard', plugins_url( '/css/build/wizard' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array( 'dashicons', 'install', 'common', 'forms' ), POLYLANG_VERSION ); + + $this->styles = array( 'polylang_admin', 'pll-wizard' ); + } + + /** + * Get the suffix to enqueue non minified files in a Debug context + * + * @since 2.7 + * + * @return string Empty when SCRIPT_DEBUG equal to true + * otherwise .min + */ + public function get_suffix() { + return defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + } + + /** + * Get the URL for the step's screen. + * + * @since 2.7 + * + * @param string $step slug (default: current step). + * @return string URL for the step if it exists. + * Empty string on failure. + */ + public function get_step_link( $step = '' ) { + if ( ! $step ) { + $step = $this->current_step; + } + + $keys = array_keys( $this->steps ); + + $step_index = array_search( $step, $keys, true ); + if ( false === $step_index ) { + return ''; + } + + return add_query_arg( 'step', $keys[ $step_index ], remove_query_arg( 'activate_error' ) ); + } + + /** + * Get the URL for the next step's screen. + * + * @since 2.7 + * + * @param string $step slug (default: current step). + * @return string URL for next step if a next step exists. + * Admin URL if it's the last step. + * Empty string on failure. + */ + public function get_next_step_link( $step = '' ) { + if ( ! $step ) { + $step = $this->current_step; + } + + $keys = array_keys( $this->steps ); + if ( end( $keys ) === $step ) { + return admin_url(); + } + + $step_index = array_search( $step, $keys, true ); + if ( false === $step_index ) { + return ''; + } + + return add_query_arg( 'step', $keys[ $step_index + 1 ], remove_query_arg( 'activate_error' ) ); + } + + /** + * Add licenses step to the wizard + * + * @since 2.7 + * + * @param array $steps List of steps. + * @return array List of steps updated. + */ + public function add_step_licenses( $steps ) { + // Add ajax action on deactivate button in licenses step. + add_action( 'wp_ajax_pll_deactivate_license', array( $this, 'deactivate_license' ) ); + + // Be careful `settings` script is enqueued here without dependency except jquery because only code useful for deactivate license button is needed. + // To be really loaded the script needs to be passed to the `$steps['licenses']['scripts']` array below with the same handle than in `wp_enqueue_script()`. + wp_enqueue_script( 'pll_settings', plugins_url( '/js/build/settings' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery' ), POLYLANG_VERSION, true ); + wp_localize_script( 'pll_settings', 'pll_settings', array( 'dismiss_notice' => esc_html__( 'Dismiss this notice.', 'polylang' ) ) ); + + if ( $this->is_licenses_step_displayable() ) { + $steps['licenses'] = array( + 'name' => esc_html__( 'Licenses', 'polylang' ), + 'view' => array( $this, 'display_step_licenses' ), + 'handler' => array( $this, 'save_step_licenses' ), + 'scripts' => array( 'pll_settings' ), // Polylang admin script used by deactivate license button. + 'styles' => array(), + ); + } + return $steps; + } + + /** + * Display the languages step form + * + * @since 2.7 + * + * @return void + */ + public function display_step_licenses() { + include __DIR__ . '/view-wizard-step-licenses.php'; + } + + /** + * Execute the languages step + * + * @since 2.7 + * + * @return void + */ + public function save_step_licenses() { + check_admin_referer( 'pll-wizard', '_pll_nonce' ); + + $redirect = $this->get_next_step_link(); + $licenses = apply_filters( 'pll_settings_licenses', array() ); + + foreach ( $licenses as $license ) { + if ( ! empty( $_POST['licenses'][ $license->id ] ) ) { + $updated_license = $license->activate_license( sanitize_key( $_POST['licenses'][ $license->id ] ) ); + if ( ! empty( $updated_license->license_data ) && false === $updated_license->license_data->success ) { + // Stay on this step with an error. + $redirect = add_query_arg( + array( + 'step' => $this->current_step, + 'activate_error' => 'i18n_license_key_error', + ) + ); + } + } + } + + wp_safe_redirect( sanitize_url( $redirect ) ); + exit; + } + + /** + * Ajax method to deactivate a license + * + * @since 2.7 + * + * @return void + */ + public function deactivate_license() { + check_ajax_referer( 'pll-wizard', '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( ! isset( $_POST['id'] ) ) { + wp_die( 0 ); + } + + $id = substr( sanitize_text_field( wp_unslash( $_POST['id'] ) ), 11 ); + $licenses = apply_filters( 'pll_settings_licenses', array() ); + $license = $licenses[ $id ]; + $license->deactivate_license(); + + wp_send_json( + array( + 'id' => $id, + 'html' => $license->get_form_field(), + ) + ); + } + + /** + * Add languages step to the wizard + * + * @since 2.7 + * + * @param array $steps List of steps. + * @return array List of steps updated. + */ + public function add_step_languages( $steps ) { + wp_deregister_script( 'pll_settings' ); // Deregister after the licenses step enqueue to update jquery-ui-selectmenu dependency. + // The wp-ajax-response and postbox dependencies is useless in wizard steps especially postbox which triggers a javascript error otherwise. + // To be really loaded the script needs to be passed to the `$steps['languages']['scripts']` array below with the same handle than in `wp_enqueue_script()`. + wp_enqueue_script( 'pll_settings', plugins_url( '/js/build/settings' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true ); + wp_localize_script( 'pll_settings', 'pll_settings', array( 'dismiss_notice' => esc_html__( 'Dismiss this notice.', 'polylang' ) ) ); + wp_register_script( 'pll-wizard-languages', plugins_url( '/js/build/languages-step' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery', 'jquery-ui-dialog' ), POLYLANG_VERSION, true ); + wp_localize_script( + 'pll-wizard-languages', + 'pll_wizard_params', + array( + 'i18n_no_language_selected' => esc_html__( 'You need to select a language to be added.', 'polylang' ), + 'i18n_language_already_added' => esc_html__( 'You already added this language.', 'polylang' ), + 'i18n_no_language_added' => esc_html__( 'You need to add at least one language.', 'polylang' ), + 'i18n_add_language_needed' => esc_html__( 'You selected a language, however, to be able to continue, you need to add it.', 'polylang' ), + 'i18n_pll_add_language' => esc_html__( 'Impossible to add the language.', 'polylang' ), + 'i18n_pll_invalid_locale' => esc_html__( 'Enter a valid WordPress locale', 'polylang' ), + 'i18n_pll_invalid_slug' => esc_html__( 'The language code contains invalid characters', 'polylang' ), + 'i18n_pll_non_unique_slug' => esc_html__( 'The language code must be unique', 'polylang' ), + 'i18n_pll_invalid_name' => esc_html__( 'The language must have a name', 'polylang' ), + 'i18n_pll_invalid_flag' => esc_html__( 'The flag does not exist', 'polylang' ), + 'i18n_dialog_title' => esc_html__( "A language wasn't added.", 'polylang' ), + 'i18n_dialog_yes_button' => esc_html__( 'Yes', 'polylang' ), + 'i18n_dialog_no_button' => esc_html__( 'No', 'polylang' ), + 'i18n_dialog_ignore_button' => esc_html__( 'Ignore', 'polylang' ), + 'i18n_remove_language_icon' => esc_html__( 'Remove this language', 'polylang' ), + ) + ); + wp_enqueue_script( 'pll-wizard-languages' ); + wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/build/selectmenu' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array( 'dashicons', 'install', 'common', 'wp-jquery-ui-dialog' ), POLYLANG_VERSION ); + $steps['languages'] = array( + 'name' => esc_html__( 'Languages', 'polylang' ), + 'view' => array( $this, 'display_step_languages' ), + 'handler' => array( $this, 'save_step_languages' ), + 'scripts' => array( 'pll-wizard-languages', 'pll_settings' ), + 'styles' => array( 'pll-wizard-selectmenu' ), + ); + return $steps; + } + + /** + * Display the languages step form + * + * @since 2.7 + * + * @return void + */ + public function display_step_languages() { + $model = $this->model; + include __DIR__ . '/view-wizard-step-languages.php'; + } + + /** + * Execute the languages step + * + * @since 2.7 + * + * @return void + */ + public function save_step_languages() { + check_admin_referer( 'pll-wizard', '_pll_nonce' ); + + $all_languages = include POLYLANG_DIR . '/src/settings/languages.php'; + $languages = isset( $_POST['languages'] ) && is_array( $_POST['languages'] ) ? array_map( 'sanitize_locale_name', $_POST['languages'] ) : false; + $saved_languages = array(); + + // If there is no language added or defined. + if ( empty( $languages ) && ! $this->model->has_languages() ) { + // Stay on this step with an error. + wp_safe_redirect( + sanitize_url( + add_query_arg( + array( + 'step' => $this->current_step, + 'activate_error' => 'i18n_no_language_added', + ) + ) + ) + ); + exit; + } + + // Otherwise process the languages to add or skip the step if no language has been added. + if ( ! empty( $languages ) ) { + require_once ABSPATH . 'wp-admin/includes/translation-install.php'; + // Remove duplicate values. + $languages = array_unique( $languages ); + // For each language add it in Polylang settings. + foreach ( $languages as $locale ) { + $saved_languages = $all_languages[ $locale ]; + + $saved_languages['slug'] = $saved_languages['code']; + $saved_languages['rtl'] = (int) ( 'rtl' === $saved_languages['dir'] ); + $saved_languages['term_group'] = 0; // Default term_group. + + $language_added = $this->model->add_language( $saved_languages ); + + if ( $language_added instanceof WP_Error && array_key_exists( 'pll_non_unique_slug', $language_added->errors ) ) { + // Get the slug from the locale : lowercase and dash instead of underscore. + $saved_languages['slug'] = strtolower( str_replace( '_', '-', $saved_languages['locale'] ) ); + $language_added = $this->model->add_language( $saved_languages ); + } + + if ( $language_added instanceof WP_Error ) { + // Stay on this step with an error. + $error_keys = array_keys( $language_added->errors ); + wp_safe_redirect( + sanitize_url( + add_query_arg( + array( + 'step' => $this->current_step, + 'activate_error' => 'i18n_' . reset( $error_keys ), + ) + ) + ) + ); + exit; + } + + if ( 'en_US' !== $locale && current_user_can( 'install_languages' ) ) { + wp_download_language_pack( $locale ); + } + } + } + wp_safe_redirect( sanitize_url( $this->get_next_step_link() ) ); + exit; + } + + /** + * Add the media step to the wizard. + * + * @since 2.7 + * + * @param array $steps List of steps. + * @return array List of steps updated. + */ + public function add_step_media( $steps ) { + $languages = $this->model->get_languages_list(); + + if ( $this->is_media_step_displayable( $languages ) ) { + $steps['media'] = array( + 'name' => esc_html__( 'Media', 'polylang' ), + 'view' => array( $this, 'display_step_media' ), + 'handler' => array( $this, 'save_step_media' ), + 'scripts' => array(), + 'styles' => array(), + ); + } + return $steps; + } + + /** + * Display the media step form + * + * @since 2.7 + * + * @return void + */ + public function display_step_media() { + $options = $this->options; + include __DIR__ . '/view-wizard-step-media.php'; + } + + /** + * Execute the media step + * + * @since 2.7 + * + * @return void + */ + public function save_step_media() { + check_admin_referer( 'pll-wizard', '_pll_nonce' ); + + $media_support = isset( $_POST['media_support'] ) ? sanitize_key( $_POST['media_support'] ) === 'yes' : false; + + $this->options['media_support'] = $media_support; + + update_option( 'polylang', $this->options ); + + wp_safe_redirect( sanitize_url( $this->get_next_step_link() ) ); + exit; + } + + /** + * Add untranslated contents step to the wizard + * + * @since 2.7 + * + * @param array $steps List of steps. + * @return array List of steps updated. + */ + public function add_step_untranslated_contents( $steps ) { + if ( ! $this->model->has_languages() || $this->model->get_objects_with_no_lang( 1 ) ) { + // Even if `pll_settings` is already enqueued with the same dependencies by the languages step, it is interesting to keep that it's also useful for the untranslated-contents step. + // To be really loaded the script needs to be passed to the `$steps['untranslated-contents']['scripts']` array below with the same handle than in `wp_enqueue_script()`. + wp_enqueue_script( 'pll_settings', plugins_url( '/js/build/settings' . $this->get_suffix() . '.js', POLYLANG_ROOT_FILE ), array( 'jquery', 'jquery-ui-selectmenu' ), POLYLANG_VERSION, true ); + wp_localize_script( 'pll_settings', 'pll_settings', array( 'dismiss_notice' => esc_html__( 'Dismiss this notice.', 'polylang' ) ) ); + wp_enqueue_style( 'pll-wizard-selectmenu', plugins_url( '/css/build/selectmenu' . $this->get_suffix() . '.css', POLYLANG_ROOT_FILE ), array( 'dashicons', 'install', 'common' ), POLYLANG_VERSION ); + $steps['untranslated-contents'] = array( + 'name' => esc_html__( 'Content', 'polylang' ), + 'view' => array( $this, 'display_step_untranslated_contents' ), + 'handler' => array( $this, 'save_step_untranslated_contents' ), + 'scripts' => array( 'pll_settings' ), + 'styles' => array( 'pll-wizard-selectmenu' ), + ); + } + return $steps; + } + + /** + * Display the untranslated contents step form + * + * @since 2.7 + * + * @return void + */ + public function display_step_untranslated_contents() { + $model = $this->model; + include __DIR__ . '/view-wizard-step-untranslated-contents.php'; + } + + /** + * Execute the untranslated contents step + * + * @since 2.7 + * + * @return void + */ + public function save_step_untranslated_contents() { + check_admin_referer( 'pll-wizard', '_pll_nonce' ); + + $lang = ! empty( $_POST['language'] ) && is_string( $_POST['language'] ) ? sanitize_locale_name( $_POST['language'] ) : false; + + if ( empty( $lang ) ) { + $lang = $this->options['default_lang']; + } + + $language = $this->model->get_language( $lang ); + + if ( $language instanceof PLL_Language ) { + $this->model->set_language_in_mass( $language ); + } + + wp_safe_redirect( sanitize_url( $this->get_next_step_link() ) ); + exit; + } + + /** + * Add home page step to the wizard + * + * @since 2.7 + * + * @param array $steps List of steps. + * @return array List of steps updated. + */ + public function add_step_home_page( $steps ) { + $languages = $this->model->get_languages_list(); + $home_page_id = get_option( 'page_on_front' ); + + $translations = $this->model->post->get_translations( $home_page_id ); + + if ( $home_page_id > 0 && ( ! $languages || count( $languages ) === 1 || count( $translations ) !== count( $languages ) ) ) { + $steps['home-page'] = array( + 'name' => esc_html__( 'Homepage', 'polylang' ), + 'view' => array( $this, 'display_step_home_page' ), + 'handler' => array( $this, 'save_step_home_page' ), + 'scripts' => array(), + 'styles' => array(), + ); + } + return $steps; + } + + /** + * Display the home page step form + * + * @since 2.7 + * + * @return void + */ + public function display_step_home_page() { + $model = $this->model; + $languages = $model->languages->get_list(); + $home_page_id = get_option( 'page_on_front' ); + $home_page_id = is_numeric( $home_page_id ) ? (int) $home_page_id : 0; + $translations = $model->post->get_translations( $home_page_id ); + $home_page = $home_page_id > 0 ? get_post( $home_page_id ) : null; + $home_page_language = $model->post->get_language( $home_page_id ); + $untranslated_languages = array(); + + if ( empty( $home_page ) ) { + return; + } + + foreach ( $languages as $language ) { + if ( ! $model->post->get( $home_page_id, $language ) ) { + $untranslated_languages[] = $language; + } + } + include __DIR__ . '/view-wizard-step-home-page.php'; + } + + /** + * Execute the home page step + * + * @since 2.7 + * + * @return void + */ + public function save_step_home_page() { + check_admin_referer( 'pll-wizard', '_pll_nonce' ); + + $default_language = $this->model->has_languages() ? $this->options['default_lang'] : null; + $home_page = isset( $_POST['home_page'] ) ? sanitize_key( $_POST['home_page'] ) : false; + $home_page_title = isset( $_POST['home_page_title'] ) ? sanitize_text_field( wp_unslash( $_POST['home_page_title'] ) ) : esc_html__( 'Homepage', 'polylang' ); + $home_page_language = isset( $_POST['home_page_language'] ) ? sanitize_key( $_POST['home_page_language'] ) : false; + + $untranslated_languages = isset( $_POST['untranslated_languages'] ) ? array_map( 'sanitize_key', $_POST['untranslated_languages'] ) : array(); + + call_user_func( + apply_filters( 'pll_wizard_create_home_page_translations', array( $this, 'create_home_page_translations' ) ), + $default_language, + $home_page, + $home_page_title, + $home_page_language, + $untranslated_languages + ); + + $this->model->clean_languages_cache(); + + wp_safe_redirect( sanitize_url( $this->get_next_step_link() ) ); + exit; + } + + /** + * Create home page translations for each language defined. + * + * @since 2.7 + * + * @param string $default_language Slug of the default language; null if no default language is defined. + * @param int $home_page Post ID of the home page if it's defined, false otherwise. + * @param string $home_page_title Home page title if it's defined, 'Homepage' otherwise. + * @param string $home_page_language Slug of the home page if it's defined, false otherwise. + * @param string[] $untranslated_languages Array of languages which needs to have a home page translated. + * @return void + */ + public function create_home_page_translations( $default_language, $home_page, $home_page_title, $home_page_language, $untranslated_languages ) { + $translations = $this->model->post->get_translations( $home_page ); + + foreach ( $untranslated_languages as $language ) { + $language_properties = $this->model->get_language( $language ); + $id = wp_insert_post( + array( + 'post_title' => $home_page_title . ' - ' . $language_properties->name, + 'post_type' => 'page', + 'post_status' => 'publish', + ) + ); + $translations[ $language ] = $id; + pll_set_post_language( $id, $language ); + } + pll_save_post_translations( $translations ); + } + + /** + * Add last step to the wizard + * + * @since 2.7 + * + * @param array $steps List of steps. + * @return array List of steps updated. + */ + public function add_step_last( $steps ) { + $steps['last'] = array( + 'name' => esc_html__( 'Ready!', 'polylang' ), + 'view' => array( $this, 'display_step_last' ), + 'handler' => array( $this, 'save_step_last' ), + 'scripts' => array(), + 'styles' => array(), + ); + return $steps; + } + + /** + * Display the last step form + * + * @since 2.7 + * + * @return void + */ + public function display_step_last() { + // We ran the wizard once. So we can dismiss its notice. + PLL_Admin_Notices::dismiss( 'wizard' ); + include __DIR__ . '/view-wizard-step-last.php'; + } + + /** + * Execute the last step + * + * @since 2.7 + * + * @return void + */ + public function save_step_last() { + check_admin_referer( 'pll-wizard', '_pll_nonce' ); + + wp_safe_redirect( sanitize_url( $this->get_next_step_link() ) ); + exit; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/load.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/load.php new file mode 100644 index 0000000..0cd81b0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/load.php @@ -0,0 +1,17 @@ +model->has_languages() ) { + if ( ! defined( 'PLL_WPML_COMPAT' ) || PLL_WPML_COMPAT ) { + PLL_WPML_Compat::instance(); // WPML API. + PLL_WPML_Config::instance(); // wpml-config.xml. + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-api.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-api.php new file mode 100644 index 0000000..16d8f38 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-api.php @@ -0,0 +1,500 @@ + not applicable. + add_filter( 'wpml_current_language', 'pll_current_language', 10, 0 ); + add_filter( 'wpml_default_language', 'pll_default_language', 10, 0 ); + // wpml_add_language_selector => not implemented. + // wpml_footer_language_selector => not applicable. + add_action( 'wpml_add_language_form_field', array( $this, 'wpml_add_language_form_field' ) ); + add_filter( 'wpml_language_is_active', array( $this, 'wpml_language_is_active' ), 10, 2 ); + add_filter( 'wpml_is_rtl', array( $this, 'wpml_is_rtl' ) ); + // wpml_language_form_input_field => See wpml_add_language_form_field + // wpml_language_has_switched => See wpml_switch_language + add_filter( 'wpml_element_trid', array( $this, 'wpml_element_trid' ), 10, 3 ); + add_filter( 'wpml_get_element_translations', array( $this, 'wpml_get_element_translations' ), 10, 3 ); + // wpml_language_switcher => not implemented. + // wpml_browser_redirect_language_params => not implemented. + // wpml_enqueue_browser_redirect_language => not applicable. + // wpml_enqueued_browser_redirect_language => not applicable. + // wpml_encode_string => not applicable. + // wpml_decode_string => not applicable. + + /* + * Retrieving Language Information for Content. + */ + add_filter( 'wpml_post_language_details', 'wpml_get_language_information', 10, 2 ); + add_action( 'wpml_switch_language', array( self::class, 'wpml_switch_language' ), 10, 2 ); + add_filter( 'wpml_element_language_code', array( $this, 'wpml_element_language_code' ), 10, 2 ); + // wpml_element_language_details => not applicable. + + /* + * Retrieving Localized Content. + */ + add_filter( 'wpml_home_url', 'pll_home_url', 10, 0 ); + add_filter( 'wpml_element_link', 'icl_link_to_element', 10, 7 ); + add_filter( 'wpml_object_id', 'icl_object_id', 10, 4 ); + add_filter( 'wpml_translate_single_string', array( $this, 'wpml_translate_single_string' ), 10, 4 ); + // wpml_translate_string => not applicable. + // wpml_unfiltered_admin_string => not implemented. + add_filter( 'wpml_permalink', array( $this, 'wpml_permalink' ), 10, 2 ); + // wpml_elements_without_translations => not implemented. + add_filter( 'wpml_get_translated_slug', array( $this, 'wpml_get_translated_slug' ), 10, 3 ); + + /* + * Finding the Translation State of Content. + */ + // wpml_element_translation_type => not implemented. + add_filter( 'wpml_element_has_translations', array( $this, 'wpml_element_has_translations' ), 10, 3 ); + // wpml_master_post_from_duplicate => not applicable. + // wpml_post_duplicates => not applicable. + + /* + * Inserting Content. + */ + // wpml_admin_make_post_duplicates => not applicable. + // wpml_make_post_duplicates => not applicable. + add_action( 'wpml_register_single_string', 'icl_register_string', 10, 3 ); + // wpml_register_string => not applicable. + // wpml_register_string_packages => not applicable. + // wpml_delete_package_action => not applicable. + // wpml_show_package_language_ui => not applicable. + // wpml_set_element_language_details => not implemented. + // wpml_multilingual_options => not applicable. + + /* + * Miscellaneous + */ + // wpml_element_type => not applicable. + // wpml_setting => not applicable. + // wpml_sub_setting => not applicable. + // wpml_editor_cf_to_display => not applicable. + // wpml_tm_save_translation_cf => not implemented. + // wpml_tm_xliff_export_translated_cf => not applicable. + // wpml_tm_xliff_export_original_cf => not applicable. + // wpml_duplicate_generic_string => not applicable. + // wpml_translatable_user_meta_fields => not implemented. + // wpml_cross_domain_language_data => not applicable. + // wpml_get_cross_domain_language_data => not applicable. + // wpml_loaded => not applicable. + // wpml_st_loaded => not applicable. + // wpml_tm_loaded => not applicable. + // wpml_hide_management_column (3.4.1) => not applicable. + // wpml_ls_directories_to_scan => not applicable. + // wpml_ls_model_css_classes => not applicable. + // wpml_ls_model_language_css_classes => not applicable. + // wpml_tf_feedback_open_link => not applicable. + // wpml_sync_custom_field => not implemented. + // wpml_sync_all_custom_fields => not implemented. + // wpml_is_redirected => not implemented. + + /* + * Updating Content + */ + // wpml_set_translation_mode_for_post_type => not implemented. + + /* + * Undocumented + */ + add_filter( 'wpml_is_translated_post_type', array( $this, 'wpml_is_translated_post_type' ), 10, 2 ); + add_filter( 'wpml_is_translated_taxonomy', array( $this, 'wpml_is_translated_taxonomy' ), 10, 2 ); + } + + /** + * Get a list of the languages enabled for a site. + * + * @since 2.0 + * + * @param mixed $null Not used. + * @param array| string $args See arguments of icl_get_languages(). + * @return array Array of arrays per language. + */ + public function wpml_active_languages( $null, $args = '' ) { + return icl_get_languages( $args ); + } + + /** + * In WPML, get a language's native and translated name for display in a custom language switcher + * Since Polylang does not implement the translated name, always returns only the native name, + * so the 3rd, 4th and 5th parameters are not used. + * + * @since 2.2 + * + * @param mixed $null Not used. + * @param string $native_name The language native name. + * @return string + */ + public function wpml_display_language_names( $null, $native_name ) { + return $native_name; + } + + /** + * Returns an HTML hidden input field with name=”lang” and as value the current language. + * + * @since 2.0 + * + * @return void + */ + public function wpml_add_language_form_field() { + $lang = pll_current_language(); + + if ( empty( $lang ) ) { + return; + } + + $field = sprintf( '', esc_attr( $lang ) ); + $field = apply_filters( 'wpml_language_form_input_field', $field, $lang ); + echo $field; // phpcs:ignore WordPress.Security.EscapeOutput + } + + /** + * Find out if a specific language is enabled for the site. + * + * @since 2.0 + * + * @param mixed $null Not used. + * @param string $slug Language code. + * @return bool + */ + public function wpml_language_is_active( $null, $slug ) { + $language = PLL()->model->get_language( $slug ); + return ! empty( $language ) && $language->active; + } + + /** + * Find out whether the current language text direction is RTL or not. + * + * @since 2.0 + * + * @return bool + */ + public function wpml_is_rtl() { + return pll_current_language( 'is_rtl' ); + } + + /** + * Returns the id of the translation group of a translated element. + * + * @since 3.4 + * + * @param mixed $empty_value Not used. + * @param int $element_id The id of the item, post id for posts, term_taxonomy_id for terms. + * @param string $element_type Optional. The type of an element. + * @return int + */ + public function wpml_element_trid( $empty_value, $element_id, $element_type = 'post_post' ) { + if ( 0 === strpos( $element_type, 'tax_' ) ) { + $element = get_term_by( 'term_taxonomy_id', $element_id ); + if ( $element instanceof WP_Term ) { + $tr_term = PLL()->model->term->get_object_term( $element->term_id, 'term_translations' ); + } + } + + if ( 0 === strpos( $element_type, 'post_' ) ) { + $tr_term = PLL()->model->post->get_object_term( $element_id, 'post_translations' ); + } + + if ( isset( $tr_term ) && $tr_term instanceof WP_Term ) { + return $tr_term->term_id; + } + + return 0; + } + + /** + * Returns the element translations info using the ID of the translation group. + * + * @since 3.4 + * + * @param mixed $empty_value Not used. + * @param int $trid The ID of the translation group. + * @param string $element_type Optional. The type of an element. + * @return stdClass[] + */ + public function wpml_get_element_translations( $empty_value, $trid, $element_type = 'post_post' ) { + $return = array(); + + if ( 0 === strpos( $element_type, 'tax_' ) ) { + $translations = PLL()->model->term->get_translations_from_term_id( $trid ); + if ( empty( $translations ) ) { + return array(); + } + + $original = min( $translations ); // We suppose that the original is the first term created. + $source_lang = array_search( $original, $translations ); + + $args = array( + 'include' => $translations, + 'hide_empty' => false, + ); + $_terms = get_terms( $args ); + + if ( ! is_array( $_terms ) ) { + return array(); + } + + $terms = array(); + foreach ( $_terms as $term ) { + $terms[ $term->term_id ] = $term; + } + + foreach ( $translations as $lang => $term_id ) { + if ( empty( $terms[ $term_id ] ) ) { + continue; + } + + /* + * It seems that WPML fills the `instances` property with the total number of posts + * related to this term, while `WP_Term::$count` includes only *published* posts. + * We intentionally accept this difference to avoid extra DB queries. + */ + $return[ $lang ] = (object) array( + 'translation_id' => '0', // We have nothing equivalent. + 'language_code' => $lang, + 'element_id' => (string) $terms[ $term_id ]->term_taxonomy_id, + 'source_language_code' => $source_lang === $lang ? null : $source_lang, + 'element_type' => $element_type, + 'original' => $original === $term_id ? '1' : '0', + 'name' => $terms[ $term_id ]->name, + 'term_id' => (string) $term_id, + 'instances' => (string) $terms[ $term_id ]->count, + ); + } + } + + if ( 0 === strpos( $element_type, 'post_' ) ) { + $translations = PLL()->model->post->get_translations_from_term_id( $trid ); + if ( empty( $translations ) ) { + return array(); + } + + $original = min( $translations ); // We suppose that the original is the first post created. + $source_lang = array_search( $original, $translations ); + + $args = array( + 'post__in' => $translations, + 'no_paging' => true, + 'posts_per_page' => -1, + 'update_post_meta_cache' => false, + 'update_post_term_cache' => false, + 'lang' => '', + ); + $_posts = get_posts( $args ); + + $posts = array(); + foreach ( $_posts as $post ) { + $posts[ $post->ID ] = $post; + } + + foreach ( $translations as $lang => $post_id ) { + if ( empty( $posts[ $post_id ] ) ) { + continue; + } + + $return[ $lang ] = (object) array( + 'translation_id' => '0', // We have nothing equivalent. + 'language_code' => $lang, + 'element_id' => (string) $post_id, + 'source_language_code' => $source_lang === $lang ? null : $source_lang, + 'element_type' => $element_type, + 'original' => $original === $post_id ? '1' : '0', + 'post_title' => $posts[ $post_id ]->post_title, + 'post_status' => $posts[ $post_id ]->post_status, + ); + } + } + + return $return; + } + + /** + * Switches whole site to the given language or restores the language that was set when first calling this function. + * Unlike the WPML original action, it is not possible to set the current language and the cookie to different values. + * + * @since 2.7 + * + * @param null|string $lang Language code to switch into, restores the original language if null. + * @param bool|string $cookie Optionally also switches the cookie. + * @return void + */ + public static function wpml_switch_language( $lang = null, $cookie = false ) { + if ( null === self::$original_language ) { + self::$original_language = PLL()->curlang; + } + + if ( empty( $lang ) ) { + PLL()->curlang = self::$original_language; + } elseif ( 'all' === $lang ) { + PLL()->curlang = null; + } elseif ( in_array( $lang, pll_languages_list() ) ) { + PLL()->curlang = PLL()->model->get_language( $lang ); + } + + if ( $cookie && isset( PLL()->choose_lang ) ) { + PLL()->choose_lang->maybe_setcookie(); + } + + do_action( 'wpml_language_has_switched', $lang, $cookie, self::$original_language ); + } + + /** + * Get the language code for a translatable element. + * + * @since 2.0 + * + * @param mixed $language_code A 2-letter language code. + * @param array $args An array with two keys element_id => post_id or term_taxonomy_id, element_type => post type or taxonomy + * @return string|null + */ + public function wpml_element_language_code( $language_code, $args ) { + $type = $args['element_type']; + $id = $args['element_id']; + + if ( 'post' === $type || pll_is_translated_post_type( $type ) ) { + $language = pll_get_post_language( $id ); + return is_string( $language ) ? $language : null; + } + + if ( 'term' === $type || pll_is_translated_taxonomy( $type ) ) { + $term = get_term_by( 'term_taxonomy_id', $id ); + if ( $term instanceof WP_Term ) { + $id = $term->term_id; + } + $language = pll_get_term_language( $id ); + return is_string( $language ) ? $language : null; + } + + return null; + } + + /** + * Translates a string. + * + * @since 2.0 + * + * @param string $string The string's original value. + * @param string $context The string's registered context. + * @param string $name The string's registered name. + * @param null|string $lang Optional, return the translation in this language, defaults to current language. + * @return string The translated string. + */ + public function wpml_translate_single_string( $string, $context, $name, $lang = null ) { + $has_translation = null; // Passed by reference. + return icl_translate( $context, $name, $string, false, $has_translation, $lang ); + } + + /** + * Converts a permalink to a language specific permalink. + * + * @since 2.2 + * + * @param string $url The url to filter. + * @param null|string $lang Language code, optional, defaults to the current language. + * @return string + */ + public function wpml_permalink( $url, $lang = '' ) { + $lang = PLL()->model->get_language( $lang ); + + if ( empty( $lang ) && ! empty( PLL()->curlang ) ) { + $lang = PLL()->curlang; + } + + return empty( $lang ) ? $url : PLL()->links_model->switch_language_in_link( $url, $lang ); + } + + /** + * Translates a post type slug. + * + * @since 2.2 + * + * @param string $slug Post type slug. + * @param string $post_type Post type name. + * @param string $lang Optional language code (defaults to current language). + * @return string + */ + public function wpml_get_translated_slug( $slug, $post_type, $lang = null ) { + if ( isset( PLL()->translate_slugs ) ) { + if ( empty( $lang ) ) { + $lang = pll_current_language(); + } + + $slug = PLL()->translate_slugs->slugs_model->get_translated_slug( $post_type, $lang ); + } + return $slug; + } + + /** + * Find out whether a post type or a taxonomy term is translated. + * + * @since 2.0 + * + * @param mixed $null Not used. + * @param int $id The post_id or term_id. + * @param string $type The post type or taxonomy. + * @return bool + */ + public function wpml_element_has_translations( $null, $id, $type ) { + if ( 'post' === $type || pll_is_translated_post_type( $type ) ) { + return count( pll_get_post_translations( $id ) ) > 1; + } elseif ( 'term' === $type || pll_is_translated_taxonomy( $type ) ) { + return count( pll_get_term_translations( $id ) ) > 1; + } + + return false; + } + + /** + * Returns true if languages and translations are managed for this post type. + * + * @since 3.4 + * + * @param mixed $value Not used. + * @param string $post_type The post type name. + * @return bool + */ + public function wpml_is_translated_post_type( $value, $post_type ) { + return pll_is_translated_post_type( $post_type ); + } + + /** + * Returns true if languages and translations are managed for this taxonomy. + * + * @since 3.4 + * + * @param mixed $value Not used. + * @param string $taxonomy The taxonomy name. + * @return bool + */ + public function wpml_is_translated_taxonomy( $value, $taxonomy ) { + return pll_is_translated_taxonomy( $taxonomy ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-compat.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-compat.php new file mode 100644 index 0000000..8b29c1c --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-compat.php @@ -0,0 +1,193 @@ +api = new PLL_WPML_API(); + + $strings = get_option( 'polylang_wpml_strings' ); + + if ( is_array( $strings ) ) { + self::$strings = $strings; + add_filter( 'pll_get_strings', array( $this, 'get_strings' ) ); + } + + add_action( 'pll_language_defined', array( $this, 'define_constants' ) ); + add_action( 'pll_no_language_defined', array( $this, 'define_constants' ) ); + } + + /** + * Access to the single instance of the class + * + * @since 1.7 + * + * @return PLL_WPML_Compat + */ + public static function instance() { + if ( empty( self::$instance ) ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * Defines two WPML constants once the language has been defined + * The compatibility with WPML is not perfect on admin side as the constants are defined + * in 'setup_theme' by Polylang (based on user info) and 'plugins_loaded' by WPML (based on cookie). + * + * @since 0.9.5 + * + * @return void + */ + public function define_constants() { + if ( ! empty( PLL()->curlang ) ) { + if ( ! defined( 'ICL_LANGUAGE_CODE' ) ) { + define( 'ICL_LANGUAGE_CODE', PLL()->curlang->slug ); + } + + if ( ! defined( 'ICL_LANGUAGE_NAME' ) ) { + define( 'ICL_LANGUAGE_NAME', PLL()->curlang->name ); + } + } elseif ( ! PLL() instanceof PLL_Frontend ) { + if ( ! defined( 'ICL_LANGUAGE_CODE' ) ) { + define( 'ICL_LANGUAGE_CODE', 'all' ); + } + + if ( ! defined( 'ICL_LANGUAGE_NAME' ) ) { + define( 'ICL_LANGUAGE_NAME', '' ); + } + } + } + + /** + * Unlike pll_register_string, icl_register_string stores the string in database + * so we need to do the same as some plugins or themes may expect this. + * We use a serialized option to store these strings. + * + * @since 1.0.2 + * + * @param string|string[] $context The group in which the string is registered. + * @param string $name A unique name for the string. + * @param string $string The string to register. + * @return void + */ + public function register_string( $context, $name, $string ) { + if ( ! $string || ! is_scalar( $string ) ) { + return; + } + + /* + * WPML accepts arrays as context and internally converts them to strings. + * See WPML_Register_String_Filter::truncate_name_and_context(). + * This possibility is used by Types. + */ + if ( is_array( $context ) ) { + $name = isset( $context['context'] ) ? $name . $context['context'] : $name; + $context = $context['domain'] ?? ''; + } + + // If a string has already been registered with the same name and context, let's replace it. + $exist_string = $this->get_string_by_context_and_name( $context, $name ); + if ( $exist_string && $exist_string !== $string ) { + $languages = PLL()->model->get_languages_list(); + + // Assign translations of the old string to the new string, except for the default language. + foreach ( $languages as $language ) { + if ( $language->is_default ) { + continue; + } + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + $mo->add_entry( $mo->make_entry( $string, $mo->translate( $exist_string ) ) ); + $mo->export_to_db( $language ); + } + $this->unregister_string( $context, $name ); + } + + // Registers the string if it does not exist yet (multiline as in WPML). + $to_register = array( 'context' => $context, 'name' => $name, 'string' => $string, 'multiline' => true, 'icl' => true ); + if ( ! in_array( $to_register, self::$strings ) ) { + $key = md5( "$context | $name" ); + self::$strings[ $key ] = $to_register; + update_option( 'polylang_wpml_strings', self::$strings ); + } + } + + /** + * Removes a string from the registered strings list + * + * @since 1.0.2 + * + * @param string $context The group in which the string is registered. + * @param string $name A unique name for the string. + * @return void + */ + public function unregister_string( $context, $name ) { + $key = md5( "$context | $name" ); + if ( isset( self::$strings[ $key ] ) ) { + unset( self::$strings[ $key ] ); + update_option( 'polylang_wpml_strings', self::$strings ); + } + } + + /** + * Adds strings registered by icl_register_string to those registered by pll_register_string + * + * @since 1.0.2 + * + * @param array $strings existing registered strings + * @return array registered strings with added strings through WPML API + */ + public function get_strings( $strings ) { + return empty( self::$strings ) ? $strings : array_merge( $strings, self::$strings ); + } + + /** + * Get a registered string by its context and name + * + * @since 2.0 + * + * @param string $context The group in which the string is registered. + * @param string $name A unique name for the string. + * @return string The registered string, empty if none was found. + */ + public function get_string_by_context_and_name( $context, $name ) { + $key = md5( "$context | $name" ); + return isset( self::$strings[ $key ] ) ? self::$strings[ $key ]['string'] : ''; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-config.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-config.php new file mode 100644 index 0000000..826707d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-config.php @@ -0,0 +1,1075 @@ + + * @phpstan-type BlockXPath array> + * @phpstan-type BlockKey array> + * @phpstan-type BlockEncoding array> + */ +class PLL_WPML_Config { + /** + * Singleton instance + * + * @var PLL_WPML_Config|null + */ + protected static $instance; + + /** + * The content of all read xml files. + * + * @var SimpleXMLElement[] + */ + protected $xmls = array(); + + /** + * The list of xml file paths. + * + * @var string[]|null + * + * @phpstan-var array|null + */ + protected $files; + + /** + * List of rules to extract strings to translate from blocks. + * + * @var array + * + * @phpstan-var array{ + * xpath?: BlockXPath, + * key?: BlockKey, + * encoding?: BlockEncoding + * }|null + */ + protected $parsing_rules = null; + + /** + * Contains the list of path in `open_basedir`. + * + * @var string[]|null + */ + private $open_basedir_paths; + + /** + * Cache for parsed metas. + * + * @var array + * + * @phpstan-var array + */ + private $parsed_metas = array(); + + /** + * Constructor + * + * @since 1.0 + */ + public function __construct() { + if ( extension_loaded( 'simplexml' ) ) { + $this->init(); + } + } + + /** + * Access to the single instance of the class + * + * @since 1.7 + * + * @return PLL_WPML_Config + */ + public static function instance() { + if ( empty( self::$instance ) ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * Finds the wpml-config.xml files to parse and setup filters + * + * @since 1.0 + * + * @return void + */ + public function init() { + $this->xmls = array(); + $files = $this->get_files(); + + if ( empty( $files ) ) { + return; + } + + if ( ! extension_loaded( 'simplexml' ) ) { + return; + } + + // Read all files. + foreach ( $files as $context => $file ) { + $xml = simplexml_load_file( $file ); + if ( false !== $xml ) { + $this->xmls[ $context ] = $xml; + } + } + + if ( empty( $this->xmls ) ) { + return; + } + + add_filter( 'pll_copy_post_metas', array( $this, 'copy_post_metas' ), 20, 2 ); + add_filter( 'pll_copy_term_metas', array( $this, 'copy_term_metas' ), 20, 2 ); + add_filter( 'pll_get_post_types', array( $this, 'translate_types' ), 10, 2 ); + add_filter( 'pll_get_taxonomies', array( $this, 'translate_taxonomies' ), 10, 2 ); + + // Export. + add_filter( 'pll_post_metas_to_export', array( $this, 'post_metas_to_export' ) ); + add_filter( 'pll_term_metas_to_export', array( $this, 'term_metas_to_export' ) ); + add_filter( 'pll_post_meta_encodings', array( $this, 'add_post_meta_encodings' ), 20 ); + add_filter( 'pll_term_meta_encodings', array( $this, 'add_term_meta_encodings' ), 20 ); + add_filter( 'pll_blocks_xpath_rules', array( $this, 'translate_blocks' ) ); + add_filter( 'pll_blocks_rules_for_attributes', array( $this, 'translate_blocks_attributes' ) ); + add_filter( 'pll_block_attribute_encodings', array( $this, 'decode_blocks_attributes' ), 20 ); + + $matcher = new PLL_Format_Util(); + + foreach ( $this->xmls as $context => $xml ) { + $keys = $xml->xpath( 'admin-texts/key' ); + + if ( ! is_array( $keys ) ) { + continue; + } + + foreach ( $keys as $key ) { + $name = $this->get_field_attribute( $key, 'name' ); + + if ( ! $matcher->is_format( $name ) ) { + $this->register_or_translate_option( $context, $name, $key ); + continue; + } + + $names = $matcher->filter_list( (array) wp_load_alloptions(), $name ); + + foreach ( $names as $_name => $_val ) { + $this->register_or_translate_option( $context, $_name, $key ); + } + } + } + } + + /** + * Returns all wpml-config.xml files in MU plugins, plugins, theme, child theme, and Polylang custom directory. + * + * @since 3.1 + * + * @return string[] A context identifier as array key, a file path as array value. + * + * @phpstan-return array + */ + public function get_files() { + if ( is_array( $this->files ) ) { + return $this->files; + } + + $this->files = array_merge( + // Plugins. + $this->get_plugin_files(), + // Theme and child theme. + $this->get_theme_files(), + // MU Plugins. + $this->get_mu_plugin_files(), + // Custom. + $this->get_custom_files() + ); + + return $this->files; + } + + /** + * Adds post metas to the list of metas to copy when creating a new translation. + * + * @since 1.0 + * + * @param string[] $metas The list of post metas to copy or synchronize. + * @param bool $sync True for sync, false for copy. + * @return string[] The list of post metas to copy or synchronize. + * + * @phpstan-param array $metas + */ + public function copy_post_metas( $metas, $sync ) { + return $this->filter_metas_to_copy( (array) $metas, 'custom-fields/custom-field', (bool) $sync ); + } + + /** + * Adds term metas to the list of metas to copy when creating a new translation. + * + * @since 2.6 + * + * @param string[] $metas The list of term metas to copy or synchronize. + * @param bool $sync True for sync, false for copy. + * @return string[] The list of term metas to copy or synchronize. + * + * @phpstan-param array $metas + */ + public function copy_term_metas( $metas, $sync ) { + return $this->filter_metas_to_copy( (array) $metas, 'custom-term-fields/custom-term-field', (bool) $sync ); + } + + /** + * Adds post meta keys to export. + * + * @since 3.3 + * @see PLL_Export_Metas + * + * @param array $keys { + * A recursive array containing nested meta sub-keys to translate. + * Ex: array( + * 'meta_to_translate_1' => 1, + * 'meta_to_translate_2' => 1, + * 'meta_to_translate_3' => array( + * 'sub_key_to_translate_1' => 1, + * 'sub_key_to_translate_2' => array( + * 'sub_sub_key_to_translate_1' => 1, + * ), + * ), + * ) + * } + * @return array + * + * @phpstan-param array $keys + * @phpstan-return array + */ + public function post_metas_to_export( $keys ) { + // Add keys that have the `action` attribute set to `translate`. + $keys = $this->add_metas_to_export( (array) $keys, 'custom-fields/custom-field' ); + + // Deal with sub-field translations. + foreach ( $this->xmls as $xml ) { + $fields = $xml->xpath( 'custom-fields-texts/key' ); + + if ( ! is_array( $fields ) ) { + // No 'custom-fields-texts' nodes. + continue; + } + + foreach ( $fields as $field ) { + $name = $this->get_field_attribute( $field, 'name' ); + + if ( '' === $name ) { + // Wrong configuration: empty `name` attribute (meta name). + continue; + } + + if ( ! array_key_exists( $name, $keys ) ) { + // Wrong configuration: the field is not in `custom-fields/custom-field`. + continue; + } + + $keys = $this->xml_to_array( $field, $keys, 1 ); + } + } + + return $keys; + } + + /** + * Adds term meta keys to export. + * Note: sub-key translations are not currently supported by WPML. + * + * @since 3.3 + * @see PLL_Export_Metas + * + * @param array $keys { + * An array containing meta keys to translate. + * Ex: array( + * 'meta_to_translate_1' => 1, + * 'meta_to_translate_2' => 1, + * 'meta_to_translate_3' => 1, + * ) + * } + * @return array + * + * @phpstan-param array $keys + * @phpstan-return array + */ + public function term_metas_to_export( $keys ) { + // Add keys that have the `action` attribute set to `translate`. + return $this->add_metas_to_export( (array) $keys, 'custom-term-fields/custom-term-field' ); + } + + /** + * Specifies the encoding for post metas. + * + * @since 3.6 + * + * @param string[] $metas An array containing meta names as array keys, and their encoding as array values. + * @return string[] + * + * @phpstan-param array $metas + */ + public function add_post_meta_encodings( $metas ) { + return $this->add_metas_encodings( (array) $metas, 'custom-fields/custom-field' ); + } + + /** + * Specifies the encoding for term metas. + * + * @since 3.6 + * + * @param string[] $metas An array containing meta names as array keys, and their encoding as array values. + * @return string[] + * + * @phpstan-param array $metas + */ + public function add_term_meta_encodings( $metas ) { + return $this->add_metas_encodings( (array) $metas, 'custom-term-fields/custom-term-field' ); + } + + /** + * Language and translation management for custom post types. + * + * @since 1.0 + * + * @param string[] $types The list of post type names for which Polylang manages language and translations. + * @param bool $hide True when displaying the list in Polylang settings. + * @return string[] The list of post type names for which Polylang manages language and translations. + */ + public function translate_types( $types, $hide ) { + foreach ( $this->xmls as $xml ) { + $pts = $xml->xpath( 'custom-types/custom-type' ); + + if ( ! is_array( $pts ) ) { + continue; + } + + foreach ( $pts as $pt ) { + $translate = $this->get_field_attribute( $pt, 'translate' ); + + if ( '1' === $translate && ! $hide ) { + $types[ (string) $pt ] = (string) $pt; + } else { + unset( $types[ (string) $pt ] ); // The theme/plugin author decided what to do with the post type so don't allow the user to change this + } + } + } + + return $types; + } + + /** + * Language and translation management for custom taxonomies. + * + * @since 1.0 + * + * @param string[] $taxonomies The list of taxonomy names for which Polylang manages language and translations. + * @param bool $hide True when displaying the list in Polylang settings. + * @return string[] The list of taxonomy names for which Polylang manages language and translations. + */ + public function translate_taxonomies( $taxonomies, $hide ) { + foreach ( $this->xmls as $xml ) { + $taxos = $xml->xpath( 'taxonomies/taxonomy' ); + + if ( ! is_array( $taxos ) ) { + continue; + } + + foreach ( $taxos as $tax ) { + $translate = $this->get_field_attribute( $tax, 'translate' ); + + if ( '1' === $translate && ! $hide ) { + $taxonomies[ (string) $tax ] = (string) $tax; + } else { + unset( $taxonomies[ (string) $tax ] ); // the theme/plugin author decided what to do with the taxonomy so don't allow the user to change this + } + } + } + + return $taxonomies; + } + + /** + * Translation management for strings in blocks content. + * + * @since 3.3 + * + * @param string[][] $parsing_rules Rules as Xpath expressions to evaluate in the blocks content. + * @return string[][] Rules completed with ones from wpml-config file. + * + * @phpstan-param BlockXPath $parsing_rules + * @phpstan-return BlockXPath + */ + public function translate_blocks( $parsing_rules ) { + return array_merge( $parsing_rules, $this->get_blocks_parsing_rules( 'xpath' ) ); + } + + /** + * Translation management for block attributes. + * + * @since 3.3 + * @since 3.6 Format changed from `array` to `array>`. + * + * @param array $parsing_rules Rules for blocks attributes to translate. + * @return array Rules completed with ones from wpml-config file. + * + * @phpstan-param BlockKey $parsing_rules + * @phpstan-return BlockKey + */ + public function translate_blocks_attributes( $parsing_rules ) { + return array_merge( $parsing_rules, $this->get_blocks_parsing_rules( 'key' ) ); + } + + /** + * Encoding management for block attributes. + * + * @since 3.8 + * + * @param string[][] $keys An array containing attribute names to encode/decode and their format(s), by block name. + * @return string[][] + * + * @phpstan-param BlockEncoding $keys + * @phpstan-return BlockEncoding + */ + public function decode_blocks_attributes( $keys ) { + return array_merge( $keys, $this->get_blocks_parsing_rules( 'encoding' ) ); + } + + /** + * Returns rules to extract translatable strings from blocks. + * + * @since 3.3 + * + * @param string $rule_tag Tag name to extract. + * @return string[][] The rules. + * + * @phpstan-param 'xpath'|'key'|'encoding' $rule_tag + * @phpstan-return ( + * $rule_tag is 'xpath' ? BlockXPath : + * ( $rule_tag is 'key' ? BlockKey : + * BlockEncoding + * ) + * ) + * ) + */ + protected function get_blocks_parsing_rules( $rule_tag ) { + + if ( null === $this->parsing_rules ) { + $this->parsing_rules = $this->extract_blocks_parsing_rules(); + } + + return $this->parsing_rules[ $rule_tag ] ?? array(); + } + + /** + * Extract all rules from WPML config file to translate strings for blocks. + * + * @since 3.3 + * + * @return array Rules completed with ones from wpml-config file. + * + * @phpstan-return array{ + * xpath?: BlockXPath, + * key?: BlockKey, + * encoding?: BlockEncoding + * } + */ + protected function extract_blocks_parsing_rules() { + $parsing_rules = array(); + + foreach ( $this->xmls as $xml ) { + $blocks = $xml->xpath( 'gutenberg-blocks/gutenberg-block' ); + + if ( ! is_array( $blocks ) ) { + continue; + } + + foreach ( $blocks as $block ) { + $translate = $this->get_field_attribute( $block, 'translate' ); + + if ( '1' !== $translate ) { + continue; + } + + $block_name = $this->get_field_attribute( $block, 'type' ); + + if ( empty( $block_name ) ) { + continue; + } + + foreach ( $block->children() as $child ) { + $rule = ''; + $child_tag = $child->getName(); + + switch ( $child_tag ) { + case 'xpath': + $rule = trim( (string) $child ); + + if ( ! empty( $rule ) ) { + $parsing_rules['xpath'][ $block_name ][] = $rule; + } + break; + + case 'key': + $rule = $this->get_field_attributes( $child ); + + if ( empty( $rule ) ) { + break; + } + + if ( isset( $parsing_rules['key'][ $block_name ] ) ) { + $parsing_rules['key'][ $block_name ] = $this->array_merge_recursive( $parsing_rules['key'][ $block_name ], $rule ); + } else { + $parsing_rules['key'][ $block_name ] = $rule; + } + + $encoding = $this->get_field_attribute( $child, 'encoding' ); + + if ( 'json' !== $encoding ) { + break; + } + + // For WPML, `json` means `json,urlencode` (and is the only format supported in this context). + $parsing_rules['encoding'][ $block_name ][ key( $rule ) ] = 'json,urlencode'; + break; + } + } + } + } + + return $parsing_rules; + } + + /** + * Merges two arrays recursively. + * Unlike `array_merge_recursive()`, this method doesn't change the type of the values. + * + * @since 3.6 + * + * @param array $array1 Array to merge into. + * @param array $array2 Array to merge. + * @return array + */ + protected function array_merge_recursive( array $array1, array $array2 ): array { + foreach ( $array2 as $key => $value ) { + if ( is_array( $value ) && isset( $array1[ $key ] ) && is_array( $array1[ $key ] ) ) { + $array1[ $key ] = $this->array_merge_recursive( $array1[ $key ], $value ); + } else { + $array1[ $key ] = $value; + } + } + + return $array1; + } + + /** + * Registers or translates the strings for an option + * + * @since 2.8 + * + * @param string $context The group in which the strings will be registered. + * @param string $name Option name. + * @param SimpleXMLElement $key XML node. + * @return void + */ + protected function register_or_translate_option( $context, $name, $key ) { + $option_keys = $this->xml_to_array( $key ); + new PLL_Translate_Option( $name, reset( $option_keys ), array( 'context' => $context ) ); + } + + /** + * Recursively transforms xml nodes to an array, ready for PLL_Translate_Option. + * + * @since 2.9 + * @since 3.3 Type-hinted the parameters `$key` and `$arr`. + * @since 3.3 `$arr` is not passed by reference anymore. + * @since 3.3 Added the parameter `$fill_value`. + * + * @param SimpleXMLElement $key XML node. + * @param array $arr Array of option keys to translate. + * @param mixed $fill_value Value to use when filling entries. Default is true. + * @return array + */ + protected function xml_to_array( SimpleXMLElement $key, array $arr = array(), $fill_value = true ) { + $name = $this->get_field_attribute( $key, 'name' ); + + if ( '' === $name ) { + return $arr; + } + + $children = $key->children(); + + if ( count( $children ) ) { + foreach ( $children as $child ) { + if ( ! isset( $arr[ $name ] ) || ! is_array( $arr[ $name ] ) ) { + $arr[ $name ] = array(); + } + + $arr[ $name ] = $this->xml_to_array( $child, $arr[ $name ], $fill_value ); + } + } else { + $arr[ $name ] = $fill_value; // Multiline as in WPML. + } + + return $arr; + } + + /** + * Get the value of an attribute. + * + * @since 3.3 + * + * @param SimpleXMLElement $field A XML node. + * @param string $attribute_name Node of the attribute. + * @return string + */ + private function get_field_attribute( SimpleXMLElement $field, $attribute_name ) { + $attributes = $field->attributes(); + + if ( empty( $attributes ) || ! isset( $attributes[ $attribute_name ] ) ) { + return ''; + } + + return trim( (string) $attributes[ $attribute_name ] ); + } + + /** + * Gets attributes values recursively. + * + * @since 3.6 + * + * @param SimpleXMLElement $field A XML node. + * @return array An array of attributes. + * + * @phpstan-return array + */ + private function get_field_attributes( SimpleXMLElement $field ): array { + $name = $this->get_field_attribute( $field, 'name' ); + + if ( '' === $name ) { + return array(); + } + + $children = $field->children(); + + if ( 0 === $children->count() ) { + return array( $name => true ); + } + + $sub_attributes = array(); + + foreach ( $children as $child ) { + $sub = $this->get_field_attributes( $child ); + + if ( empty( $sub ) ) { + continue; + } + + $sub_attributes[ $name ] = array_merge( $sub_attributes[ $name ] ?? array(), $sub ); + } + + return $sub_attributes; + } + + /** + * Returns all wpml-config.xml files in MU plugins. + * + * @since 3.3 + * + * @return string[] A context identifier as array key, a file path as array value. + * + * @phpstan-return array + */ + private function get_mu_plugin_files() { + if ( ! is_readable( WPMU_PLUGIN_DIR ) || ! is_dir( WPMU_PLUGIN_DIR ) ) { + return array(); + } + + $files = array(); + + // Search for top level wpml-config.xml file. + $file_path = WPMU_PLUGIN_DIR . '/wpml-config.xml'; + + if ( is_readable( $file_path ) ) { + $files['mu-plugins'] = $file_path; + } + + // Search in proxy loaded MU plugins. + foreach ( new DirectoryIterator( WPMU_PLUGIN_DIR ) as $file_info ) { + if ( ! $this->is_dir( $file_info ) ) { + continue; + } + + $file_path = $file_info->getPathname() . '/wpml-config.xml'; + + if ( is_readable( $file_path ) ) { + $files[ 'mu-plugins/' . $file_info->getFilename() ] = $file_path; + } + } + + return $files; + } + + /** + * Returns all wpml-config.xml files in plugins. + * + * @since 3.3 + * + * @return string[] A context identifier as array key, a file path as array value. + * + * @phpstan-return array + */ + private function get_plugin_files() { + $files = array(); + $plugins = array(); + + if ( is_multisite() ) { + // Don't forget sitewide active plugins thanks to Reactorshop http://wordpress.org/support/topic/polylang-and-yoast-seo-plugin/page/2?replies=38#post-4801829. + $sitewide_plugins = get_site_option( 'active_sitewide_plugins', array() ); + + if ( ! empty( $sitewide_plugins ) && is_array( $sitewide_plugins ) ) { + $plugins = array_keys( $sitewide_plugins ); + } + } + + // By-site plugins. + $active_plugins = get_option( 'active_plugins', array() ); + + if ( ! empty( $active_plugins ) && is_array( $active_plugins ) ) { + $plugins = array_merge( $plugins, $active_plugins ); + } + + $plugin_path = trailingslashit( WP_PLUGIN_DIR ) . '%s/wpml-config.xml'; + + foreach ( $plugins as $plugin ) { + if ( ! is_string( $plugin ) || '' === $plugin ) { + continue; + } + + $file_dir = dirname( $plugin ); + $file_path = sprintf( $plugin_path, $file_dir ); + + if ( is_readable( $file_path ) ) { + $files[ "plugins/{$file_dir}" ] = $file_path; + } + } + + return $files; + } + + /** + * Returns all wpml-config.xml files in theme and child theme. + * + * @since 3.3 + * + * @return string[] A context identifier as array key, a file path as array value. + * + * @phpstan-return array + */ + private function get_theme_files() { + $files = array(); + + // Theme. + $template_path = get_template_directory(); + $file_path = "{$template_path}/wpml-config.xml"; + + if ( is_readable( $file_path ) ) { + $files[ 'themes/' . get_template() ] = $file_path; + } + + // Child theme. + $stylesheet_path = get_stylesheet_directory(); + $file_path = "{$stylesheet_path}/wpml-config.xml"; + + if ( $stylesheet_path !== $template_path && is_readable( $file_path ) ) { + $files[ 'themes/' . get_stylesheet() ] = $file_path; + } + + return $files; + } + + /** + * Returns the wpml-config.xml file in Polylang custom directory. + * + * @since 3.3 + * + * @return string[] A context identifier as array key, a file path as array value. + * + * @phpstan-return array + */ + private function get_custom_files() { + $file_path = PLL_LOCAL_DIR . '/wpml-config.xml'; + + if ( ! is_readable( $file_path ) ) { + return array(); + } + + return array( + 'Polylang' => $file_path, + ); + } + + /** + * Tells if the given "file info" object represents a directory. + * This takes care of not triggering a `open_basedir` restriction error when the file symlinks a file that is not in + * `open_basedir`. + * + * @see https://wordpress.org/support/topic/fatal-error-open_basedir-restricton/ + * + * @since 3.5.1 + * + * @param DirectoryIterator $file_info A "file info" object that we know its path (but maybe not its real path) is + * in `open_basedir`. + * @return bool + */ + private function is_dir( DirectoryIterator $file_info ): bool { + if ( $file_info->isDot() ) { + return false; + } + + if ( $file_info->getPathname() === $file_info->getRealPath() ) { + // Not a symlink: not going to trigger a `open_basedir` restriction error. + return $file_info->isDir(); + } + + /* + * Symlink: make sure the file's real path is in `open_basedir` before checking it is a dir. + * Which means that the `open_basedir` check is done only for symlinked files. + */ + return $this->is_allowed_dir( $file_info->getRealPath() ) && $file_info->isDir(); + } + + /** + * Checks whether access to a given directory is allowed. + * This takes into account the PHP `open_basedir` restrictions, so that Polylang does not try to access directories + * it is not allowed to. + * + * Inspired by `WP_Automatic_Updater::is_allowed_dir()` and `wp-includes/ID3/getid3.php`. + * + * @since 3.5.1 + * + * @param string $dir The directory to check. + * @return bool True if access to the directory is allowed, false otherwise. + */ + private function is_allowed_dir( string $dir ): bool { + $dir = trim( $dir ); + + if ( '' === $dir ) { + return false; + } + + $open_basedir_paths = $this->get_open_basedir_paths(); + + if ( empty( $open_basedir_paths ) ) { + return true; + } + + $dir = $this->normalize_path( $dir ); + + foreach ( $open_basedir_paths as $path ) { + if ( str_starts_with( $dir, $path ) ) { + return true; + } + } + + return false; + } + + /** + * Returns the list of paths in `open_basedir`. The purpose is to compare a formatted path to this list. + * Note: all paths are suffixed by `DIRECTORY_SEPARATOR`, even paths to files. + * + * @since 3.5.1 + * + * @return string[] An array of formatted paths. + */ + private function get_open_basedir_paths(): array { + if ( is_array( $this->open_basedir_paths ) ) { + return $this->open_basedir_paths; + } + + $this->open_basedir_paths = array(); + $open_basedir = ini_get( 'open_basedir' ); // Can be `false` or an empty string. + + if ( empty( $open_basedir ) ) { + return $this->open_basedir_paths; + } + + $open_basedir_list = explode( PATH_SEPARATOR, $open_basedir ); + + foreach ( $open_basedir_list as $basedir ) { + $basedir = trim( $basedir ); + + if ( '' === $basedir ) { + continue; + } + + $this->open_basedir_paths[] = $this->normalize_path( $basedir ); + } + + $this->open_basedir_paths = array_unique( $this->open_basedir_paths ); + + return $this->open_basedir_paths; + } + + /** + * Formats a path for string comparison. + * 1. Slashes and back-slashes are replaced by `DIRECTORY_SEPARATOR`. + * 2. The path is suffixed by `DIRECTORY_SEPARATOR` (even non-directory elements). + * + * @since 3.5.1 + * + * @param string $path A file path. + * @return string + * + * @phpstan-param non-empty-string $path + * @phpstan-return non-empty-string + */ + private function normalize_path( string $path ): string { + $path = str_replace( array( '/', '\\' ), DIRECTORY_SEPARATOR, $path ); + + if ( substr( $path, -1, 1 ) !== DIRECTORY_SEPARATOR ) { + $path .= DIRECTORY_SEPARATOR; + } + + return $path; + } + + /** + * Adds (or removes) meta names to the list of metas to copy or synchronize. + * + * @since 3.6 + * + * @param string[] $metas The list of meta names to copy or synchronize. + * @param string $xpath Xpath to the meta fields in the xml files. + * @param bool $sync Either sync is enabled or not. + * @return string[] + * + * @phpstan-param array $metas + * @phpstan-param non-falsy-string $xpath + */ + private function filter_metas_to_copy( array $metas, string $xpath, bool $sync ): array { + $parsed_metas = $this->parse_xml_metas( $xpath ); + $metas_to_remove = array(); + + foreach ( $parsed_metas as $name => $parsed_meta ) { + if ( 'copy' === $parsed_meta['action'] || ( ! $sync && in_array( $parsed_meta['action'], array( 'translate', 'copy-once' ), true ) ) ) { + $metas[] = $name; + } else { + $metas_to_remove[] = $name; + } + } + + return array_diff( $metas, $metas_to_remove ); + } + + /** + * Adds meta keys to export. + * + * @since 3.6 + * + * @param array $metas { + * An array containing meta keys to translate. + * Ex: array( + * 'meta_to_translate_1' => 1, + * 'meta_to_translate_2' => 1, + * 'meta_to_translate_3' => array( ... ), + * ) + * } + * @param string $xpath Xpath to the meta fields in the xml files. + * @return array + * + * @phpstan-param array $metas + * @phpstan-param non-falsy-string $xpath + * @phpstan-return array + */ + private function add_metas_to_export( array $metas, string $xpath ) { + $fields = $this->parse_xml_metas( $xpath ); + + foreach ( $fields as $name => $field ) { + if ( 'translate' === $field['action'] ) { + $metas[ $name ] = 1; + } + } + + return $metas; + } + + /** + * Adds encoding of metas. + * + * @since 3.6 + * + * @param string[] $metas The list of encodings for each metas. Meta names are array keys, encodings are array values. + * @param string $xpath Xpath to the meta fields in the xml files. + * @return string[] + * + * @phpstan-param array $metas + * @phpstan-param non-falsy-string $xpath + */ + private function add_metas_encodings( array $metas, string $xpath ): array { + $parsed_metas = $this->parse_xml_metas( $xpath ); + + foreach ( $parsed_metas as $name => $parsed_meta ) { + if ( ! empty( $parsed_meta['encoding'] ) ) { + $metas[ $name ] = $parsed_meta['encoding']; + } + } + + return $metas; + } + + /** + * Parses all xml files for metas. + * Results are cached for each `$xpath`. + * + * @since 3.6 + * + * @param string $xpath Xpath to the meta fields in the xml files. + * @return array + * + * @phpstan-param non-falsy-string $xpath + * @phpstan-return ParsedMetas + */ + private function parse_xml_metas( string $xpath ): array { + if ( isset( $this->parsed_metas[ $xpath ] ) ) { + return $this->parsed_metas[ $xpath ]; + } + + $this->parsed_metas[ $xpath ] = array(); + + foreach ( $this->xmls as $xml ) { + $custom_fields = $xml->xpath( $xpath ); + + if ( ! is_array( $custom_fields ) ) { + continue; + } + + foreach ( $custom_fields as $custom_field ) { + $name = (string) $custom_field; + + if ( empty( $name ) ) { + continue; + } + + $this->parsed_metas[ $xpath ][ $name ] = array( + 'action' => $this->get_field_attribute( $custom_field, 'action' ), + 'encoding' => $this->get_field_attribute( $custom_field, 'encoding' ), + ); + } + } + + return $this->parsed_metas[ $xpath ]; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-legacy-api.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-legacy-api.php new file mode 100644 index 0000000..0faf27a --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/modules/wpml/wpml-legacy-api.php @@ -0,0 +1,437 @@ + whether to skip missing translation or not, 0 or 1, defaults to 0 + * orderby => 'id', 'code', 'name', defaults to 'id' + * order => 'ASC' or 'DESC', defaults to 'ASC' + * link_empty_to => link to use when the translation is missing {$lang} is replaced by the language code + * + * List of parameters returned per language: + * + * id => the language id + * active => whether this is the active language or no, 0 or 1 + * native_name => the language name + * missing => whether the translation is missing or not, 0 or 1 + * translated_name => empty, does not exist in Polylang + * language_code => the language code ( slug ) + * country_flag_url => the url of the flag + * url => the url of the translation + * + * @since 1.0 + * + * @param string|array $args optional + * @return array array of arrays per language + */ + function icl_get_languages( $args = '' ) { + $args = wp_parse_args( $args, array( 'skip_missing' => 0, 'orderby' => 'id', 'order' => 'ASC' ) ); + $orderby = ( isset( $args['orderby'] ) && 'code' == $args['orderby'] ) ? 'slug' : ( isset( $args['orderby'] ) && 'name' == $args['orderby'] ? 'name' : 'id' ); + $order = ( ! empty( $args['order'] ) && 'desc' == $args['order'] ) ? 'DESC' : 'ASC'; + + $arr = array(); + + // NB: When 'skip_missing' is false, WPML returns all languages even if there is no content + $languages = PLL()->model->languages + ->filter( $args['skip_missing'] ? 'hide_empty' : '' ) + ->get_list(); + $languages = wp_list_sort( $languages, $orderby, $order ); // Since WP 4.7 + + foreach ( $languages as $lang ) { + // We can find a translation only on frontend once the global $wp_query object has been instantiated + if ( PLL()->links instanceof PLL_Frontend_Links && ! empty( $GLOBALS['wp_query'] ) ) { + $url = PLL()->links->get_translation_url( $lang ); + } + + // It seems that WPML does not bother of skip_missing parameter on admin side and before the $wp_query object has been filled + if ( empty( $url ) && ! empty( $args['skip_missing'] ) && ! is_admin() && did_action( 'parse_query' ) ) { + continue; + } + + $arr[ $lang->slug ] = array( + 'id' => $lang->term_id, + 'active' => isset( PLL()->curlang->slug ) && PLL()->curlang->slug == $lang->slug ? 1 : 0, + 'native_name' => $lang->name, + 'missing' => empty( $url ) ? 1 : 0, + 'translated_name' => '', // Does not exist in Polylang + 'language_code' => $lang->slug, + 'country_flag_url' => $lang->get_display_flag_url(), + 'url' => ! empty( $url ) ? $url : + ( empty( $args['link_empty_to'] ) ? $lang->get_home_url() : + str_replace( '{$lang}', $lang->slug, $args['link_empty_to'] ) ), + ); + } + + // Apply undocumented WPML filter + $arr = apply_filters( 'icl_ls_languages', $arr ); + + return $arr; + } +} + +if ( ! function_exists( 'icl_link_to_element' ) ) { + /** + * Used for creating language dependent links in themes + * + * @since 1.0 + * @since 2.0 add support for arguments 6 and 7 + * + * @param int $id object id + * @param string $type optional, post type or taxonomy name of the object, defaults to 'post' + * @param string $text optional, the link text. If not specified will produce the name of the element in the current language + * @param array $args optional, an array of arguments to add to the link, defaults to empty + * @param string $anchor optional, the anchor to add to the link, defaults to empty + * @param bool $echo optional, whether to echo the link, defaults to true + * @param bool $return_original_if_missing optional, whether to return a value if the translation is missing + * @return string a language dependent link + */ + function icl_link_to_element( $id, $type = 'post', $text = '', $args = array(), $anchor = '', $echo = true, $return_original_if_missing = true ) { + if ( 'tag' == $type ) { + $type = 'post_tag'; + } + + $pll_type = ( 'post' == $type || pll_is_translated_post_type( $type ) ) ? 'post' : ( 'term' == $type || pll_is_translated_taxonomy( $type ) ? 'term' : false ); + if ( $pll_type && ( $lang = pll_current_language() ) && ( $tr_id = PLL()->model->$pll_type->get_translation( $id, $lang ) ) && ( 'term' === $pll_type || PLL()->model->post->current_user_can_read( $tr_id ) ) ) { + $id = $tr_id; + } elseif ( ! $return_original_if_missing ) { + return ''; + } + + if ( post_type_exists( $type ) ) { + $link = get_permalink( $id ); + if ( empty( $text ) ) { + $text = get_the_title( $id ); + } + } elseif ( taxonomy_exists( $type ) ) { + $link = get_term_link( $id, $type ); + if ( empty( $text ) && ( $term = get_term( $id, $type ) ) && $term instanceof WP_Term ) { + $text = $term->name; + } + } + + if ( empty( $link ) || is_wp_error( $link ) ) { + return ''; + } + + if ( ! empty( $args ) ) { + $link .= ( false === strpos( $link, '?' ) ? '?' : '&' ) . http_build_query( $args ); + } + + if ( ! empty( $anchor ) ) { + $link .= '#' . $anchor; + } + + $link = sprintf( '%s', esc_url( $link ), esc_html( $text ) ); + + if ( $echo ) { + echo $link; // phpcs:ignore WordPress.Security.EscapeOutput + } + + return $link; + } +} + +if ( ! function_exists( 'icl_object_id' ) ) { + /** + * Returns an element’s ID in the current language or in another specified language. + * + * @since 0.9.5 + * + * @param int $element_id Object id. + * @param string $element_type Optional, post type or taxonomy name of the object, defaults to 'post'. + * @param bool $return_original_if_missing Optional, true if Polylang should return the original id if the translation is missing, defaults to false. + * @param string|null $ulanguage_code Optional, language code, defaults to the current language. + * @return int|null The object id of the translation, null if the translation is missing and $return_original_if_missing set to false. + */ + function icl_object_id( $element_id, $element_type = 'post', $return_original_if_missing = false, $ulanguage_code = null ) { + if ( empty( $element_id ) ) { + return null; + } + + $element_id = (int) $element_id; + + if ( 'any' === $element_type ) { + $element_type = get_post_type( $element_id ); + } + + if ( empty( $element_type ) ) { + return null; + } + + if ( empty( $ulanguage_code ) ) { + $ulanguage_code = pll_current_language(); + } + + if ( empty( $ulanguage_code ) ) { + return $return_original_if_missing ? $element_id : null; + } + + if ( 'nav_menu' === $element_type ) { + $tr_id = false; + $theme = get_option( 'stylesheet' ); + if ( isset( PLL()->options['nav_menus'][ $theme ] ) ) { + foreach ( PLL()->options['nav_menus'][ $theme ] as $menu ) { + if ( array_search( $element_id, $menu ) && ! empty( $menu[ $ulanguage_code ] ) ) { + $tr_id = $menu[ $ulanguage_code ]; + break; + } + } + } + } elseif ( pll_is_translated_post_type( $element_type ) ) { + $tr_id = PLL()->model->post->get_translation( $element_id, $ulanguage_code ); + } elseif ( pll_is_translated_taxonomy( $element_type ) ) { + $tr_id = PLL()->model->term->get_translation( $element_id, $ulanguage_code ); + } else { + return $element_id; // WPML doesn't honor $return_original_if_missing if the post type or taxonomy is not translated, @see {SitePress::get_object_id()}. + } + + if ( empty( $tr_id ) ) { + if ( $return_original_if_missing ) { + return $element_id; + } + + return null; + } + + return (int) $tr_id; + } +} + +if ( ! function_exists( 'wpml_object_id_filter' ) ) { + /** + * Undocumented alias of `icl_object_id` introduced in WPML 3.2, used by Yith WooCommerce compare + * + * @since 2.2.4 + * + * @param int $id object id + * @param string $type optional, post type or taxonomy name of the object, defaults to 'post' + * @param bool $return_original_if_missing optional, true if Polylang should return the original id if the translation is missing, defaults to false + * @param string $lang optional, language code, defaults to current language + * @return int|null the object id of the translation, null if the translation is missing and $return_original_if_missing set to false + */ + function wpml_object_id_filter( $id, $type = 'post', $return_original_if_missing = false, $lang = null ) { + return icl_object_id( $id, $type, $return_original_if_missing, $lang ); + } +} + +if ( ! function_exists( 'wpml_get_language_information' ) ) { + /** + * Undocumented function used by the theme Maya + * returns the post language + * + * @see https://wpml.org/forums/topic/canonical-urls-for-wpml-duplicated-posts/#post-52198 for the original WPML code + * + * @since 1.8 + * + * @param null $empty optional, not used + * @param int $post_id optional, post id, defaults to current post + * @return array|WP_Error + */ + function wpml_get_language_information( $empty = null, $post_id = null ) { + if ( null === $post_id ) { + $post_id = get_the_ID(); + } + if ( empty( $post_id ) ) { + return new WP_Error( 'missing_id', __( 'Missing post ID', 'polylang' ) ); + } + + $post = get_post( $post_id ); + if ( empty( $post ) ) { + /* translators: %d is a Post ID. */ + return new WP_Error( 'missing_post', sprintf( __( 'No such post for ID = %d', 'polylang' ), $post_id ) ); + } + + $lang = PLL()->model->post->get_language( $post_id ); + + // FIXME WPML may return a WP_Error object + return false === $lang ? array() : array( + 'language_code' => $lang->slug, + 'locale' => $lang->locale, + 'text_direction' => (bool) $lang->is_rtl, + 'display_name' => $lang->name, // Seems to be the post language name displayed in the current language, not a feature in Polylang + 'native_name' => $lang->name, + 'different_language' => pll_current_language() !== $lang->slug, + ); + } +} + +if ( ! function_exists( 'icl_register_string' ) ) { + /** + * Registers a string for translation in the "strings translation" panel + * + * The 4th and 5th parameters $allow_empty_value and $source_lang are not used by Polylang. + * + * @since 0.9.3 + * + * @param string $context the group in which the string is registered, defaults to 'polylang' + * @param string $name a unique name for the string + * @param string $string the string to register + * @return void + */ + function icl_register_string( $context, $name, $string ) { + PLL_WPML_Compat::instance()->register_string( $context, $name, $string ); + } +} + +if ( ! function_exists( 'icl_unregister_string' ) ) { + /** + * Removes a string from the "strings translation" panel + * + * @since 1.0.2 + * + * @param string $context the group in which the string is registered, defaults to 'polylang' + * @param string $name a unique name for the string + * @return void + */ + function icl_unregister_string( $context, $name ) { + PLL_WPML_Compat::instance()->unregister_string( $context, $name ); + } +} + +if ( ! function_exists( 'icl_t' ) ) { + /** + * Gets the translated value of a string ( previously registered with icl_register_string or pll_register_string ) + * + * @since 0.9.3 + * @since 1.9.2 argument 3 is optional + * @since 2.0 add support for arguments 4 to 6 + * + * @param string $context the group in which the string is registered + * @param string $name a unique name for the string + * @param string $string the string to translate, optional for strings registered with icl_register_string + * @param bool|null $has_translation optional, not supported in Polylang + * @param bool $bool optional, not used + * @param string|null $lang optional, return the translation in this language, defaults to current language + * @return string the translated string + */ + function icl_t( $context, $name, $string = '', &$has_translation = null, $bool = false, $lang = null ) { + return icl_translate( $context, $name, $string, false, $has_translation, $lang ); + } +} + +if ( ! function_exists( 'icl_translate' ) ) { + /** + * Undocumented function used by NextGen Gallery + * used in PLL_Plugins_Compat for Jetpack with only 3 arguments + * + * @since 1.0.2 + * @since 2.0 add support for arguments 5 and 6, strings are no more automatically registered + * + * @param string $context the group in which the string is registered + * @param string $name a unique name for the string + * @param string $string the string to translate, optional for strings registered with icl_register_string + * @param bool $bool optional, not used + * @param bool|null $has_translation optional, not supported in Polylang + * @param string|null $lang optional, return the translation in this language, defaults to current language + * @return string the translated string + */ + function icl_translate( $context, $name, $string = '', $bool = false, &$has_translation = null, $lang = null ) { + // FIXME WPML can automatically registers the string based on an option + if ( empty( $string ) ) { + $string = PLL_WPML_Compat::instance()->get_string_by_context_and_name( $context, $name ); + } + return empty( $lang ) ? pll__( $string ) : pll_translate_string( $string, $lang ); + } +} + +if ( ! function_exists( 'wpml_get_copied_fields_for_post_edit' ) ) { + /** + * Undocumented function used by Types + * FIXME: tested only with Types + * probably incomplete as Types locks the custom fields for a new post, but not when edited + * This is probably linked to the fact that WPML has always an original post in the default language and not Polylang :) + * + * @since 1.1.2 + * + * @return array + */ + function wpml_get_copied_fields_for_post_edit() { + if ( empty( $_GET['from_post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + return array(); + } + + $arr = array( 'original_post_id' => (int) $_GET['from_post'] ); // phpcs:ignore WordPress.Security.NonceVerification + + // Don't know what WPML does but Polylang does copy all public meta keys by default. + $keys = get_post_custom_keys( $arr['original_post_id'] ); + if ( is_array( $keys ) ) { + foreach ( $keys as $k => $meta_key ) { + if ( is_protected_meta( $meta_key ) ) { + unset( $keys[ $k ] ); + } + } + } + + // Apply our filter and fill the expected output ( see /types/embedded/includes/fields-post.php ) + /** This filter is documented in src/modules/sync/admin-sync.php */ + $arr['fields'] = array_unique( apply_filters( 'pll_copy_post_metas', empty( $keys ) ? array() : $keys, false ) ); + return $arr; + } +} + +if ( ! function_exists( 'icl_get_default_language' ) ) { + /** + * Undocumented function used by Warp 6 by Yootheme + * + * @since 1.0.5 + * + * @return string|false default language code + */ + function icl_get_default_language() { + return pll_default_language(); + } +} + +if ( ! function_exists( 'wpml_get_default_language' ) ) { + /** + * Undocumented function reported to be used by Table Rate Shipping for WooCommerce + * + * @see https://wordpress.org/support/topic/add-wpml-compatibility-function + * + * @since 1.8.2 + * + * @return string|false default language code + */ + function wpml_get_default_language() { + return pll_default_language(); + } +} + +if ( ! function_exists( 'icl_get_current_language' ) ) { + /** + * Undocumented function used by Ultimate Member + * + * @since 2.2.4 + * + * @return string Current language code + */ + function icl_get_current_language() { + return (string) pll_current_language(); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/nav-menu.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/nav-menu.php new file mode 100644 index 0000000..12778ee --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/nav-menu.php @@ -0,0 +1,178 @@ +model = &$polylang->model; + $this->options = $polylang->options; + + $this->theme = get_option( 'stylesheet' ); + + add_filter( 'wp_setup_nav_menu_item', array( $this, 'wp_setup_nav_menu_item' ) ); + + // Integration with WP customizer + add_action( 'customize_register', array( $this, 'create_nav_menu_locations' ), 5 ); + + // Filter _wp_auto_add_pages_to_menu by language + add_action( 'transition_post_status', array( $this, 'auto_add_pages_to_menu' ), 5, 3 ); // before _wp_auto_add_pages_to_menu + } + + /** + * Assigns the title and label to the language switcher menu items + * + * @since 2.6 + * + * @param stdClass $item Menu item. + * @return stdClass + */ + public function wp_setup_nav_menu_item( $item ) { + if ( isset( $item->url ) && '#pll_switcher' === $item->url ) { + $item->post_title = __( 'Languages', 'polylang' ); + $item->type_label = __( 'Language switcher', 'polylang' ); + } + return $item; + } + + /** + * Create temporary nav menu locations ( one per location and per language ) for all non-default language + * to do only one time + * + * @since 1.2 + * + * @return void + */ + public function create_nav_menu_locations() { + static $once; + global $_wp_registered_nav_menus; + + $arr = array(); + + if ( isset( $_wp_registered_nav_menus ) && ! $once ) { + foreach ( $_wp_registered_nav_menus as $loc => $name ) { + foreach ( $this->model->get_languages_list() as $lang ) { + $arr[ $this->combine_location( $loc, $lang ) ] = $name . ' ' . $lang->name; + } + } + + $_wp_registered_nav_menus = $arr; + $once = true; + } + } + + /** + * Creates a temporary nav menu location from a location and a language + * + * @since 1.8 + * + * @param string $loc Nav menu location. + * @param PLL_Language $lang Language object. + * @return string + */ + public function combine_location( $loc, $lang ) { + return $loc . ( strpos( $loc, '___' ) || $lang->is_default ? '' : '___' . $lang->slug ); + } + + /** + * Get nav menu locations and language from a temporary location. + * + * @since 1.8 + * + * @param string $loc Temporary location. + * @return string[] { + * @type string $location Nav menu location. + * @type string $lang Language code. + * } + */ + public function explode_location( $loc ) { + $infos = explode( '___', $loc ); + if ( 1 == count( $infos ) ) { + $infos[] = $this->options['default_lang']; + } + return array_combine( array( 'location', 'lang' ), $infos ); + } + + /** + * Filters the option nav_menu_options for auto added pages to menu. + * + * @since 0.9.4 + * + * @param array $options Options stored in the option nav_menu_options. + * @return array Modified options. + */ + public function nav_menu_options( $options ) { + $options['auto_add'] = array_intersect( $options['auto_add'], $this->auto_add_menus ); + return $options; + } + + /** + * Filters _wp_auto_add_pages_to_menu by language. + * + * @since 0.9.4 + * + * @param string $new_status Transition to this post status. + * @param string $old_status Previous post status. + * @param WP_Post $post Post object. + * @return void + */ + public function auto_add_pages_to_menu( $new_status, $old_status, $post ) { + if ( 'publish' != $new_status || 'publish' == $old_status || 'page' != $post->post_type || ! empty( $post->post_parent ) ) { + return; + } + + if ( ! empty( $this->options['nav_menus'][ $this->theme ] ) ) { + $lang = $this->model->post->get_language( $post->ID ); + $lang = empty( $lang ) ? $this->options['default_lang'] : $lang->slug; // If the page has no language yet, the default language will be assigned + + // Get all the menus in the page language + foreach ( $this->options['nav_menus'][ $this->theme ] as $loc ) { + if ( ! empty( $loc[ $lang ] ) ) { + $this->auto_add_menus[] = $loc[ $lang ]; + } + } + + add_filter( 'option_nav_menu_options', array( $this, 'nav_menu_options' ) ); + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/olt-manager.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/olt-manager.php new file mode 100644 index 0000000..5ef9985 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/olt-manager.php @@ -0,0 +1,107 @@ +query = &$query; + $this->model = &$model; + } + + /** + * Checks if the query already includes a language taxonomy. + * + * @since 3.0 + * + * @param array $qvars WP_Query query vars. + * @return bool + */ + protected function is_already_filtered( $qvars ) { + if ( isset( $qvars['lang'] ) ) { + return true; + } + + if ( ! empty( $qvars['tax_query'] ) && is_array( $qvars['tax_query'] ) ) { + foreach ( $qvars['tax_query'] as $tax_query ) { + if ( isset( $tax_query['taxonomy'] ) && 'language' === $tax_query['taxonomy'] ) { + return true; + } + } + } + + return false; + } + + /** + * Check if translated taxonomy is queried + * Compatible with nested queries introduced in WP 4.1 + * + * @see https://wordpress.org/support/topic/tax_query-bug + * + * @since 1.7 + * + * @param array $tax_queries An array of tax queries. + * @return bool + */ + protected function have_translated_taxonomy( $tax_queries ) { + if ( is_array( $tax_queries ) ) { + foreach ( $tax_queries as $tax_query ) { + if ( isset( $tax_query['taxonomy'] ) && $this->model->is_translated_taxonomy( $tax_query['taxonomy'] ) && ! ( isset( $tax_query['operator'] ) && 'NOT IN' === $tax_query['operator'] ) ) { + return true; + } + + // Nested queries + elseif ( is_array( $tax_query ) && $this->have_translated_taxonomy( $tax_query ) ) { + return true; + } + } + } + + return false; + } + + /** + * Get queried taxonomies + * + * @since 2.2 + * + * @return array queried taxonomies + */ + public function get_queried_taxonomies() { + return ! empty( $this->query->tax_query->queried_terms ) ? array_keys( wp_list_filter( $this->query->tax_query->queried_terms, array( 'operator' => 'NOT IN' ), 'NOT' ) ) : array(); + } + + /** + * Sets the language in query. + * Optimized for (and requires) WP 3.5+. + * + * @since 2.2 + * @since 3.3 Accepts now an array of languages. + * + * @param PLL_Language|PLL_Language[] $languages Language object(s). + * @return void + */ + public function set_language( $languages ) { + if ( ! is_array( $languages ) ) { + $languages = array( $languages ); + } + + $tt_ids = array(); + foreach ( $languages as $language ) { + $tt_ids[] = $language->get_tax_prop( 'language', 'term_taxonomy_id' ); + } + + // Defining directly the tax_query (rather than setting 'lang' avoids transforming the query by WP). + $lang_query = array( + 'taxonomy' => 'language', + 'field' => 'term_taxonomy_id', // Since WP 3.5 + 'terms' => $tt_ids, + 'operator' => 'IN', + ); + + $tax_query = &$this->query->query_vars['tax_query']; + + if ( isset( $tax_query['relation'] ) && 'OR' === $tax_query['relation'] ) { + $tax_query = array( + $lang_query, + $tax_query, + 'relation' => 'AND', + ); + } elseif ( is_array( $tax_query ) ) { + // The tax query is expected to be *always* an array, but it seems that 3rd parties fill it with a string + // Causing a fatal error if we don't check it. + // See https://wordpress.org/support/topic/fatal-error-2947/ + $tax_query[] = $lang_query; + } elseif ( empty( $tax_query ) ) { + // Supposing the tax query has been wrongly filled with an empty string + $tax_query = array( $lang_query ); + } + } + + /** + * Adds the language in the query after it has checked that it won't conflict with other query vars. + * + * @since 2.2 + * + * @param PLL_Language|false $lang Language. + * @return void + */ + public function filter_query( $lang ) { + $qvars = &$this->query->query_vars; + + if ( ! $this->is_already_filtered( $qvars ) ) { + $taxonomies = array_intersect( $this->model->get_translated_taxonomies(), get_taxonomies( array( '_builtin' => false ) ) ); + + foreach ( $taxonomies as $tax ) { + $tax_object = get_taxonomy( $tax ); + if ( ! empty( $tax_object ) && ! empty( $qvars[ $tax_object->query_var ] ) ) { + return; + } + } + + if ( ! empty( $qvars['tax_query'] ) && $this->have_translated_taxonomy( $qvars['tax_query'] ) ) { + return; + } + + // Filter queries according to the requested language + if ( ! empty( $lang ) ) { + $taxonomies = $this->get_queried_taxonomies(); + + if ( $taxonomies && ( empty( $qvars['post_type'] ) || 'any' === $qvars['post_type'] ) ) { + foreach ( $taxonomies as $taxonomy ) { + $tax_object = get_taxonomy( $taxonomy ); + if ( ! empty( $tax_object ) && $this->model->is_translated_post_type( $tax_object->object_type ) ) { + $this->set_language( $lang ); + break; + } + } + } elseif ( empty( $qvars['post_type'] ) || $this->model->is_translated_post_type( $qvars['post_type'] ) ) { + $this->set_language( $lang ); + } + } + } else { + $this->maybe_set_language_for_or_relation(); + + // Do not filter untranslatable post types such as nav_menu_item + if ( isset( $qvars['post_type'] ) && ! $this->model->is_translated_post_type( $qvars['post_type'] ) && ( empty( $qvars['tax_query'] ) || ! $this->have_translated_taxonomy( $qvars['tax_query'] ) ) ) { + unset( $qvars['lang'] ); + } + + // Unset 'all' query var (mainly for admin language filter). + if ( isset( $qvars['lang'] ) && 'all' === $qvars['lang'] ) { + unset( $qvars['lang'] ); + } + } + } + + /** + * Sets the language correctly if the current query is a 'OR' relation, + * since WordPress merges the language with the other query vars when the relation is OR. + * + * @since 3.3 + * + * @return void + */ + protected function maybe_set_language_for_or_relation() { + if ( ! $this->query->tax_query instanceof WP_Tax_Query ) { + return; + } + + if ( 'OR' !== $this->query->tax_query->relation ) { + return; + } + + if ( ! isset( $this->query->tax_query->queried_terms['language'] ) ) { + return; + } + + $langs = $this->query->tax_query->queried_terms['language']['terms']; + if ( is_string( $langs ) ) { + $langs = explode( ',', $langs ); + } + $langs = array_map( array( $this->model, 'get_language' ), $langs ); + $langs = array_filter( $langs ); + + if ( ! empty( $langs ) ) { + $this->set_language( $langs ); + unset( $this->query->query_vars['lang'] ); // Unset the language query var otherwise WordPress would add the language query by slug in WP_Query::parse_tax_query(). + } + } + + /** + * Transforms a language query by `slug` to a language query by `term_taxonomy_id`. + * + * Example: + * From: array( + * 'taxonomy' => 'language', + * 'terms' => array( 'en' ), + * 'field' => 'slug', + * 'operator' => 'IN', + * 'include_children' => 1, + * ) + * To: array( + * 'taxonomy' => 'language', + * 'terms' => array( 238 ), + * 'field' => 'term_taxonomy_id', + * 'operator' => 'IN', + * 'include_children' => 1, + * ) + * + * @since 3.8 + * + * @return void + */ + public function transform_query(): void { + if ( empty( $this->query->tax_query ) ) { + // Null. + return; + } + + foreach ( $this->query->tax_query->queries as &$tax_query ) { + if ( ! is_array( $tax_query ) || ! isset( $tax_query['taxonomy'], $tax_query['field'], $tax_query['terms'] ) ) { + // Can be a `relation` entry (string), or a sub-query. + continue; + } + + if ( 'language' !== $tax_query['taxonomy'] || 'slug' !== $tax_query['field'] ) { + // Not what we're looking for. + continue; + } + + $tax_query['field'] = 'term_taxonomy_id'; + + foreach ( $tax_query['terms'] as &$term ) { + $language = $this->model->get_language( $term ); + $term = ! empty( $language ) ? $language->get_tax_prop( 'language', 'term_taxonomy_id' ) : 0; + } + } + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/rest-request.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/rest-request.php new file mode 100644 index 0000000..339a42d --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/rest-request.php @@ -0,0 +1,164 @@ +static_pages = new PLL_Static_Pages( $this ); + } + + $this->model->set_languages_ready(); + } + + /** + * Setup filters. + * + * @since 2.6 + * + * @return void + */ + public function init() { + parent::init(); + + $this->default_term = new PLL_Default_Term( $this ); + $this->default_term->add_hooks(); + + if ( ! $this->model->has_languages() ) { + return; + } + + add_filter( 'rest_pre_dispatch', array( $this, 'set_language' ), 10, 3 ); + add_filter( 'rest_request_before_callbacks', array( $this, 'set_filters_sanitization' ) ); + + $this->filters_links = new PLL_Filters_Links( $this ); + $this->filters = new PLL_Filters( $this ); + $this->filters_widgets_options = new PLL_Filters_Widgets_Options( $this ); + + $this->links = new PLL_Admin_Links( $this ); + $this->nav_menu = new PLL_Frontend_Nav_Menu( $this ); // For auto added pages to menu. + } + + /** + * Sets the current language during a REST request if sent. + * + * @since 3.3 + * + * @param mixed $result Response to replace the requested version with. Remains untouched. + * @param WP_REST_Server $server Server instance. + * @param WP_REST_Request $request Request used to generate the response. + * @return mixed Untouched $result. + * + * @phpstan-param WP_REST_Request $request + */ + public function set_language( $result, $server, $request ) { + $lang = $request->get_param( 'lang' ); + + if ( ! empty( $lang ) && is_string( $lang ) ) { + $this->curlang = $this->model->get_language( sanitize_key( $lang ) ); + + if ( empty( $this->curlang ) && ! empty( $this->options['default_lang'] ) ) { + // A lang has been requested but it is invalid, let's fall back to the default one. + $this->curlang = $this->model->get_language( sanitize_key( $this->options['default_lang'] ) ); + } + } + + if ( ! empty( $this->curlang ) ) { + /** This action is documented in src/frontend/choose-lang.php */ + do_action( 'pll_language_defined', $this->curlang->slug, $this->curlang ); + } else { + /** This action is documented in src/class-polylang.php */ + do_action( 'pll_no_language_defined' ); // To load overridden textdomains. + } + + return $result; + } + + /** + * Initialize sanitization filters with the correct language locale. + * + * @see WP_REST_Server::dispatch() + * + * @since 2.9 + * @since 3.8 Moved from Polylang Pro and hooked on 'rest_request_before_callbacks' instead of 'rest_pre_dispatch'. + * + * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client. + * @return WP_REST_Response|WP_HTTP_Response|WP_Error|mixed + */ + public function set_filters_sanitization( $response ) { + $language = $this->request->get_language(); + if ( empty( $language ) ) { + $type = $this->request->get_object_type(); + $language = $type ? $this->model->$type->get_language( $this->request->get_id() ) : null; + } + + if ( ! empty( $language ) ) { + $this->filters_sanitization = new PLL_Filters_Sanitization( $language->locale ); + } + + return $response; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/flags.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/flags.php new file mode 100644 index 0000000..239ac50 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/flags.php @@ -0,0 +1,276 @@ + __( 'Andorra', 'polylang' ), + 'ae' => __( 'United Arab Emirates', 'polylang' ), + 'af' => __( 'Afghanistan', 'polylang' ), + 'ag' => __( 'Antigua and Barbuda', 'polylang' ), + 'ai' => __( 'Anguilla', 'polylang' ), + 'al' => __( 'Albania', 'polylang' ), + 'am' => __( 'Armenia', 'polylang' ), + 'an' => __( 'Netherlands Antilles', 'polylang' ), + 'ao' => __( 'Angola', 'polylang' ), + 'ar' => __( 'Argentina', 'polylang' ), + 'arab' => __( 'Arab league', 'polylang' ), + 'as' => __( 'American Samoa', 'polylang' ), + 'at' => __( 'Austria', 'polylang' ), + 'au' => __( 'Australia', 'polylang' ), + 'aw' => __( 'Aruba', 'polylang' ), + 'ax' => __( 'Åland Islands', 'polylang' ), + 'az' => __( 'Azerbaijan', 'polylang' ), + 'ba' => __( 'Bosnia and Herzegovina', 'polylang' ), + 'basque' => __( 'Basque Country', 'polylang' ), + 'bb' => __( 'Barbados', 'polylang' ), + 'bd' => __( 'Bangladesh', 'polylang' ), + 'be' => __( 'Belgium', 'polylang' ), + 'bf' => __( 'Burkina Faso', 'polylang' ), + 'bg' => __( 'Bulgaria', 'polylang' ), + 'bh' => __( 'Bahrain', 'polylang' ), + 'bi' => __( 'Burundi', 'polylang' ), + 'bj' => __( 'Benin', 'polylang' ), + 'bm' => __( 'Bermuda', 'polylang' ), + 'bn' => __( 'Brunei', 'polylang' ), + 'bo' => __( 'Bolivia', 'polylang' ), + 'br' => __( 'Brazil', 'polylang' ), + 'bs' => __( 'Bahamas', 'polylang' ), + 'bt' => __( 'Bhutan', 'polylang' ), + 'bw' => __( 'Botswana', 'polylang' ), + 'by' => __( 'Belarus', 'polylang' ), + 'bz' => __( 'Belize', 'polylang' ), + 'ca' => __( 'Canada', 'polylang' ), + 'catalonia' => __( 'Catalonia', 'polylang' ), + 'cc' => __( 'Cocos', 'polylang' ), + 'cd' => __( 'Democratic Republic of the Congo', 'polylang' ), + 'cf' => __( 'Central African Republic', 'polylang' ), + 'cg' => __( 'Congo', 'polylang' ), + 'ch' => __( 'Switzerland', 'polylang' ), + 'ci' => __( 'Ivory Coast', 'polylang' ), + 'ck' => __( 'Cook Islands', 'polylang' ), + 'cl' => __( 'Chile', 'polylang' ), + 'cm' => __( 'Cameroon', 'polylang' ), + 'cn' => __( 'China', 'polylang' ), + 'co' => __( 'Colombia', 'polylang' ), + 'cr' => __( 'Costa Rica', 'polylang' ), + 'cu' => __( 'Cuba', 'polylang' ), + 'cv' => __( 'Cape Verde', 'polylang' ), + 'cx' => __( 'Christmas Island', 'polylang' ), + 'cy' => __( 'Cyprus', 'polylang' ), + 'cz' => __( 'Czech Republic', 'polylang' ), + 'de' => __( 'Germany', 'polylang' ), + 'dj' => __( 'Djibouti', 'polylang' ), + 'dk' => __( 'Denmark', 'polylang' ), + 'dm' => __( 'Dominica', 'polylang' ), + 'do' => __( 'Dominican Republic', 'polylang' ), + 'dz' => __( 'Algeria', 'polylang' ), + 'ec' => __( 'Ecuador', 'polylang' ), + 'ee' => __( 'Estonia', 'polylang' ), + 'eg' => __( 'Egypt', 'polylang' ), + 'eh' => __( 'Western Sahara', 'polylang' ), + 'england' => __( 'England', 'polylang' ), + 'er' => __( 'Eritrea', 'polylang' ), + 'es' => __( 'Spain', 'polylang' ), + 'esperanto' => __( 'Esperanto', 'polylang' ), + 'et' => __( 'Ethiopia', 'polylang' ), + 'fi' => __( 'Finland', 'polylang' ), + 'fj' => __( 'Fiji', 'polylang' ), + 'fk' => __( 'Falkland Islands', 'polylang' ), + 'fm' => __( 'Micronesia', 'polylang' ), + 'fo' => __( 'Faroe Islands', 'polylang' ), + 'fr' => __( 'France', 'polylang' ), + 'ga' => __( 'Gabon', 'polylang' ), + 'galicia' => __( 'Galicia', 'polylang' ), + 'gb' => __( 'United Kingdom', 'polylang' ), + 'gd' => __( 'Grenada', 'polylang' ), + 'ge' => __( 'Georgia', 'polylang' ), + 'gh' => __( 'Ghana', 'polylang' ), + 'gi' => __( 'Gibraltar', 'polylang' ), + 'gl' => __( 'Greenland', 'polylang' ), + 'gm' => __( 'Gambia', 'polylang' ), + 'gn' => __( 'Guinea', 'polylang' ), + 'gp' => __( 'Guadeloupe', 'polylang' ), + 'gq' => __( 'Equatorial Guinea', 'polylang' ), + 'gr' => __( 'Greece', 'polylang' ), + 'gs' => __( 'South Georgia and the South Sandwich Islands', 'polylang' ), + 'gt' => __( 'Guatemala', 'polylang' ), + 'gu' => __( 'Guam', 'polylang' ), + 'gw' => __( 'Guinea-Bissau', 'polylang' ), + 'gy' => __( 'Guyana', 'polylang' ), + 'hk' => __( 'Hong Kong', 'polylang' ), + 'hm' => __( 'Heard Island and McDonald Islands', 'polylang' ), + 'hn' => __( 'Honduras', 'polylang' ), + 'hr' => __( 'Croatia', 'polylang' ), + 'ht' => __( 'Haiti', 'polylang' ), + 'hu' => __( 'Hungary', 'polylang' ), + 'id' => __( 'Indonesia', 'polylang' ), + 'ie' => __( 'Republic of Ireland', 'polylang' ), + 'il' => __( 'Israel', 'polylang' ), + 'in' => __( 'India', 'polylang' ), + 'io' => __( 'British Indian Ocean Territory', 'polylang' ), + 'iq' => __( 'Iraq', 'polylang' ), + 'ir' => __( 'Iran', 'polylang' ), + 'is' => __( 'Iceland', 'polylang' ), + 'it' => __( 'Italy', 'polylang' ), + 'jm' => __( 'Jamaica', 'polylang' ), + 'jo' => __( 'Jordan', 'polylang' ), + 'jp' => __( 'Japan', 'polylang' ), + 'ke' => __( 'Kenya', 'polylang' ), + 'kg' => __( 'Kyrgyzstan', 'polylang' ), + 'kh' => __( 'Cambodia', 'polylang' ), + 'ki' => __( 'Kiribati', 'polylang' ), + 'km' => __( 'Comoros', 'polylang' ), + 'kn' => __( 'Saint Kitts and Nevis', 'polylang' ), + 'kp' => __( 'North Korea', 'polylang' ), + 'kr' => __( 'South Korea', 'polylang' ), + 'kurdistan' => __( 'Kurdistan', 'polylang' ), + 'kw' => __( 'Kuwait', 'polylang' ), + 'ky' => __( 'Cayman Islands', 'polylang' ), + 'kz' => __( 'Kazakhstan', 'polylang' ), + 'la' => __( 'Laos', 'polylang' ), + 'lb' => __( 'Lebanon', 'polylang' ), + 'lc' => __( 'Saint Lucia', 'polylang' ), + 'li' => __( 'Liechtenstein', 'polylang' ), + 'lk' => __( 'Sri Lanka', 'polylang' ), + 'lr' => __( 'Liberia', 'polylang' ), + 'ls' => __( 'Lesotho', 'polylang' ), + 'lt' => __( 'Lithuania', 'polylang' ), + 'lu' => __( 'Luxembourg', 'polylang' ), + 'lv' => __( 'Latvia', 'polylang' ), + 'ly' => __( 'Libya', 'polylang' ), + 'ma' => __( 'Morocco', 'polylang' ), + 'mc' => __( 'Monaco', 'polylang' ), + 'md' => __( 'Moldova', 'polylang' ), + 'me' => __( 'Montenegro', 'polylang' ), + 'mg' => __( 'Madagascar', 'polylang' ), + 'mh' => __( 'Marshall Islands', 'polylang' ), + 'mk' => __( 'North Macedonia', 'polylang' ), + 'ml' => __( 'Mali', 'polylang' ), + 'mm' => __( 'Myanmar', 'polylang' ), + 'mn' => __( 'Mongolia', 'polylang' ), + 'mo' => __( 'Macao', 'polylang' ), + 'mp' => __( 'Northern Mariana Islands', 'polylang' ), + 'mq' => __( 'Martinique', 'polylang' ), + 'mr' => __( 'Mauritania', 'polylang' ), + 'ms' => __( 'Montserrat', 'polylang' ), + 'mt' => __( 'Malta', 'polylang' ), + 'mu' => __( 'Mauritius', 'polylang' ), + 'mv' => __( 'Maldives', 'polylang' ), + 'mw' => __( 'Malawi', 'polylang' ), + 'mx' => __( 'Mexico', 'polylang' ), + 'my' => __( 'Malaysia', 'polylang' ), + 'mz' => __( 'Mozambique', 'polylang' ), + 'na' => __( 'Namibia', 'polylang' ), + 'nc' => __( 'New Caledonia', 'polylang' ), + 'ne' => __( 'Niger', 'polylang' ), + 'nf' => __( 'Norfolk Island', 'polylang' ), + 'ng' => __( 'Nigeria', 'polylang' ), + 'ni' => __( 'Nicaragua', 'polylang' ), + 'nl' => __( 'Netherlands', 'polylang' ), + 'no' => __( 'Norway', 'polylang' ), + 'np' => __( 'Nepal', 'polylang' ), + 'nr' => __( 'Nauru', 'polylang' ), + 'nu' => __( 'Niue', 'polylang' ), + 'nz' => __( 'New Zealand', 'polylang' ), + 'occitania' => __( 'Occitania', 'polylang' ), + 'om' => __( 'Oman', 'polylang' ), + 'pa' => __( 'Panama', 'polylang' ), + 'pe' => __( 'Peru', 'polylang' ), + 'pf' => __( 'French Polynesia', 'polylang' ), + 'pg' => __( 'Papua New Guinea', 'polylang' ), + 'ph' => __( 'Philippines', 'polylang' ), + 'pk' => __( 'Pakistan', 'polylang' ), + 'pl' => __( 'Poland', 'polylang' ), + 'pm' => __( 'Saint Pierre and Miquelon', 'polylang' ), + 'pn' => __( 'Pitcairn', 'polylang' ), + 'pr' => __( 'Puerto Rico', 'polylang' ), + 'ps' => __( 'Palestinian Territory', 'polylang' ), + 'pt' => __( 'Portugal', 'polylang' ), + 'pw' => __( 'Belau', 'polylang' ), + 'py' => __( 'Paraguay', 'polylang' ), + 'qa' => __( 'Qatar', 'polylang' ), + 'quebec' => __( 'Quebec', 'polylang' ), + 'ro' => __( 'Romania', 'polylang' ), + 'rs' => __( 'Serbia', 'polylang' ), + 'ru' => __( 'Russia', 'polylang' ), + 'rw' => __( 'Rwanda', 'polylang' ), + 'sa' => __( 'Saudi Arabia', 'polylang' ), + 'sb' => __( 'Solomon Islands', 'polylang' ), + 'sc' => __( 'Seychelles', 'polylang' ), + 'scotland' => __( 'Scotland', 'polylang' ), + 'sd' => __( 'Sudan', 'polylang' ), + 'se' => __( 'Sweden', 'polylang' ), + 'sg' => __( 'Singapore', 'polylang' ), + 'sh' => __( 'Saint Helena', 'polylang' ), + 'si' => __( 'Slovenia', 'polylang' ), + 'sk' => __( 'Slovakia', 'polylang' ), + 'sl' => __( 'Sierra Leone', 'polylang' ), + 'sm' => __( 'San Marino', 'polylang' ), + 'sn' => __( 'Senegal', 'polylang' ), + 'so' => __( 'Somalia', 'polylang' ), + 'sr' => __( 'Suriname', 'polylang' ), + 'ss' => __( 'South Sudan', 'polylang' ), + 'st' => __( 'São Tomé and Príncipe', 'polylang' ), + 'sv' => __( 'El Salvador', 'polylang' ), + 'sy' => __( 'Syria', 'polylang' ), + 'sz' => __( 'Swaziland', 'polylang' ), + 'tc' => __( 'Turks and Caicos Islands', 'polylang' ), + 'td' => __( 'Chad', 'polylang' ), + 'tf' => __( 'French Southern Territories', 'polylang' ), + 'tg' => __( 'Togo', 'polylang' ), + 'th' => __( 'Thailand', 'polylang' ), + 'tibet' => __( 'Tibet', 'polylang' ), + 'tj' => __( 'Tajikistan', 'polylang' ), + 'tk' => __( 'Tokelau', 'polylang' ), + 'tl' => __( 'Timor-Leste', 'polylang' ), + 'tm' => __( 'Turkmenistan', 'polylang' ), + 'tn' => __( 'Tunisia', 'polylang' ), + 'to' => __( 'Tonga', 'polylang' ), + 'tr' => __( 'Turkey', 'polylang' ), + 'tt' => __( 'Trinidad and Tobago', 'polylang' ), + 'tv' => __( 'Tuvalu', 'polylang' ), + 'tw' => __( 'Taiwan', 'polylang' ), + 'tz' => __( 'Tanzania', 'polylang' ), + 'ua' => __( 'Ukraine', 'polylang' ), + 'ug' => __( 'Uganda', 'polylang' ), + 'us' => __( 'United States', 'polylang' ), + 'uy' => __( 'Uruguay', 'polylang' ), + 'uz' => __( 'Uzbekistan', 'polylang' ), + 'va' => __( 'Vatican', 'polylang' ), + 'vc' => __( 'Saint Vincent and the Grenadines', 'polylang' ), + 've' => __( 'Venezuela', 'polylang' ), + 'veneto' => __( 'Veneto', 'polylang' ), + 'vg' => __( 'British Virgin Islands', 'polylang' ), + 'vi' => __( 'United States Virgin Islands', 'polylang' ), + 'vn' => __( 'Vietnam', 'polylang' ), + 'vu' => __( 'Vanuatu', 'polylang' ), + 'wales' => __( 'Wales', 'polylang' ), + 'wf' => __( 'Wallis and Futuna', 'polylang' ), + 'ws' => __( 'Western Samoa', 'polylang' ), + 'ye' => __( 'Yemen', 'polylang' ), + 'yt' => __( 'Mayotte', 'polylang' ), + 'za' => __( 'South Africa', 'polylang' ), + 'zm' => __( 'Zambia', 'polylang' ), + 'zw' => __( 'Zimbabwe', 'polylang' ), +); + +/** + * Filter the list of predefined flags + * + * @since 1.8 + * + * @param array $flags + */ +return apply_filters( 'pll_predefined_flags', $flags ); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/languages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/languages.php new file mode 100644 index 0000000..2a0a4e2 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/languages.php @@ -0,0 +1,1550 @@ + ISO 639-1 language code + * [locale] => WordPress locale + * [name] => name + * [dir] => text direction + * [flag] => flag code + * [w3c] => W3C locale + * [facebook] => Facebook locale + * [deepl] => DeepL locale + * + * Facebook locales without equivalent WordPress locale: + * 'ay_BO' (Aymara) + * 'ck_US' (Cherokee) + * 'en_IN' (English India) + * 'gx_GR' (Classical Greek) + * 'ik_US' (Inupiak) + * 'iu_CA' (Inuktitut) + * 'ja_KS' (Japanese Kansai) + * 'ks_IN' (Cachemiri) + * 'nd_ZW' (Ndebele) + * 'nr_ZA' (Southern Ndebele) + * 'ns_ZA' (Northern Sotho) + * 'ny_MW' (Chewa) + * 'qc_GT' (Quiché) + * 'qu_PE' (Quechua) + * 'se_NO' (Northern Sami) + * 'ss_SZ' (Swazi) + * 'st_ZA' (Southern Sotho) + * 'tl_ST' (Klingon) + * 'tn_BW' (Tswana) + * 'ts_ZA' (Tsonga) + * 've_ZA' (Venda) + * 'yi_DE' (Yiddish) + * 'zz_TR' (Zazaki) + * + * DeepL locales without equivalent WordPress locale: + * 'ACE' (Acehnese) + * 'AY' (Aymara) + * 'GN' (Guarani) + * 'GOM' (Konkani) + * 'PAG' (Pangasinan) + * 'PAM' (Kapampangan) + * 'PRS' (Dari) + * 'QU' (Quechua) + * 'ST' (Sesotho) + * 'TN' (Tswana) + * 'TS' (Tsonga) + * 'YI' (Yiddish) + * 'YUE' (Cantonese) + */ +return array( + 'af' => array( + 'code' => 'af', + 'locale' => 'af', + 'name' => 'Afrikaans', + 'dir' => 'ltr', + 'flag' => 'za', + 'facebook' => 'af_ZA', + 'deepl' => 'AF', + ), + 'ak' => array( + 'facebook' => 'ak_GH', + ), + 'am' => array( + 'code' => 'am', + 'locale' => 'am', + 'name' => 'አማርኛ', + 'dir' => 'ltr', + 'flag' => 'et', + 'facebook' => 'am_ET', + ), + 'ar' => array( + 'code' => 'ar', + 'locale' => 'ar', + 'name' => 'العربية', + 'dir' => 'rtl', + 'flag' => 'arab', + 'facebook' => 'ar_AR', + 'deepl' => 'AR', + ), + 'arg' => array( + 'code' => 'an', + 'locale' => 'arg', + 'name' => 'Aragonés', + 'dir' => 'ltr', + 'flag' => 'es', + 'deepl' => 'AN', + ), + 'arq' => array( + 'facebook' => 'ar_AR', + ), + 'ary' => array( + 'code' => 'ar', + 'locale' => 'ary', + 'name' => 'العربية المغربية', + 'dir' => 'rtl', + 'flag' => 'ma', + 'facebook' => 'ar_AR', + 'deepl' => 'AR', + ), + 'as' => array( + 'code' => 'as', + 'locale' => 'as', + 'name' => 'অসমীয়া', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'as_IN', + 'deepl' => 'AS', + ), + 'az' => array( + 'code' => 'az', + 'locale' => 'az', + 'name' => 'Azərbaycan', + 'dir' => 'ltr', + 'flag' => 'az', + 'facebook' => 'az_AZ', + 'deepl' => 'AZ', + ), + 'azb' => array( + 'code' => 'az', + 'locale' => 'azb', + 'name' => 'گؤنئی آذربایجان', + 'dir' => 'rtl', + 'flag' => 'az', + ), + 'ba' => array( + 'code' => 'ba', + 'locale' => 'ba', + 'name' => 'башҡорт теле', + 'dir' => 'ltr', + 'flag' => 'ru', + 'w3c' => 'ba', + 'deepl' => 'BA', + ), + 'bel' => array( + 'code' => 'be', + 'locale' => 'bel', + 'name' => 'Беларуская мова', + 'dir' => 'ltr', + 'flag' => 'by', + 'w3c' => 'be', + 'facebook' => 'be_BY', + 'deepl' => 'BE', + ), + 'bg_BG' => array( + 'code' => 'bg', + 'locale' => 'bg_BG', + 'name' => 'български', + 'dir' => 'ltr', + 'flag' => 'bg', + 'facebook' => 'bg_BG', + 'deepl' => 'BG', + ), + 'bho' => array( + 'code' => 'bho', + 'locale' => 'bho', + 'name' => 'भोजपुरी', + 'dir' => 'ltr', + 'flag' => 'in', + 'w3c' => 'bho', + 'facebook' => 'bp_IN', + 'deepl' => 'BHO', + ), + 'bn_BD' => array( + 'code' => 'bn', + 'locale' => 'bn_BD', + 'name' => 'বাংলা', + 'dir' => 'ltr', + 'flag' => 'bd', + 'facebook' => 'bn_IN', + 'deepl' => 'BN', + ), + 'bo' => array( + 'code' => 'bo', + 'locale' => 'bo', + 'name' => 'བོད་ཡིག', + 'dir' => 'ltr', + 'flag' => 'tibet', + ), + 'bre' => array( + 'code' => 'br', + 'locale' => 'bre', + 'name' => 'Brezhoneg', + 'dir' => 'ltr', + 'flag' => 'fr', + 'w3c' => 'br', + 'facebook' => 'br_FR', + 'deepl' => 'BR', + ), + 'bs_BA' => array( + 'code' => 'bs', + 'locale' => 'bs_BA', + 'name' => 'Bosanski', + 'dir' => 'ltr', + 'flag' => 'ba', + 'facebook' => 'bs_BA', + 'deepl' => 'BS', + ), + 'ca' => array( + 'code' => 'ca', + 'locale' => 'ca', + 'name' => 'Català', + 'dir' => 'ltr', + 'flag' => 'catalonia', + 'facebook' => 'ca_ES', + 'deepl' => 'CA', + ), + 'ceb' => array( + 'code' => 'ceb', + 'locale' => 'ceb', + 'name' => 'Cebuano', + 'dir' => 'ltr', + 'flag' => 'ph', + 'facebook' => 'cx_PH', + 'deepl' => 'CEB', + ), + 'ckb' => array( + 'code' => 'ku', + 'locale' => 'ckb', + 'name' => 'کوردی', + 'dir' => 'rtl', + 'flag' => 'kurdistan', + 'facebook' => 'cb_IQ', + 'deepl' => 'CKB', + ), + 'co' => array( + 'facebook' => 'co_FR', + ), + 'cs_CZ' => array( + 'code' => 'cs', + 'locale' => 'cs_CZ', + 'name' => 'Čeština', + 'dir' => 'ltr', + 'flag' => 'cz', + 'facebook' => 'cs_CZ', + 'deepl' => 'CS', + ), + 'cy' => array( + 'code' => 'cy', + 'locale' => 'cy', + 'name' => 'Cymraeg', + 'dir' => 'ltr', + 'flag' => 'wales', + 'facebook' => 'cy_GB', + 'deepl' => 'CY', + ), + 'da_DK' => array( + 'code' => 'da', + 'locale' => 'da_DK', + 'name' => 'Dansk', + 'dir' => 'ltr', + 'flag' => 'dk', + 'facebook' => 'da_DK', + 'deepl' => 'DA', + ), + 'de_AT' => array( + 'code' => 'de', + 'locale' => 'de_AT', + 'name' => 'Deutsch', + 'dir' => 'ltr', + 'flag' => 'at', + 'facebook' => 'de_DE', + 'deepl' => 'DE', + ), + 'de_CH' => array( + 'code' => 'de', + 'locale' => 'de_CH', + 'name' => 'Deutsch', + 'dir' => 'ltr', + 'flag' => 'ch', + 'facebook' => 'de_DE', + 'deepl' => 'DE', + ), + 'de_CH_informal' => array( + 'code' => 'de', + 'locale' => 'de_CH_informal', + 'name' => 'Deutsch', + 'dir' => 'ltr', + 'flag' => 'ch', + 'w3c' => 'de-CH', + 'facebook' => 'de_DE', + 'deepl' => 'DE', + ), + 'de_DE' => array( + 'code' => 'de', + 'locale' => 'de_DE', + 'name' => 'Deutsch', + 'dir' => 'ltr', + 'flag' => 'de', + 'facebook' => 'de_DE', + 'deepl' => 'DE', + ), + 'de_DE_formal' => array( + 'code' => 'de', + 'locale' => 'de_DE_formal', + 'name' => 'Deutsch', + 'dir' => 'ltr', + 'flag' => 'de', + 'w3c' => 'de-DE', + 'facebook' => 'de_DE', + 'deepl' => 'DE', + ), + 'dsb' => array( + 'code' => 'dsb', + 'locale' => 'dsb', + 'name' => 'Dolnoserbšćina', + 'dir' => 'ltr', + 'flag' => 'de', + ), + 'dzo' => array( + 'code' => 'dz', + 'locale' => 'dzo', + 'name' => 'རྫོང་ཁ', + 'dir' => 'ltr', + 'flag' => 'bt', + 'w3c' => 'dz', + ), + 'el' => array( + 'code' => 'el', + 'locale' => 'el', + 'name' => 'Ελληνικά', + 'dir' => 'ltr', + 'flag' => 'gr', + 'facebook' => 'el_GR', + 'deepl' => 'EL', + ), + 'en_AU' => array( + 'code' => 'en', + 'locale' => 'en_AU', + 'name' => 'English', + 'dir' => 'ltr', + 'flag' => 'au', + 'facebook' => 'en_US', + 'deepl' => 'EN-US', + ), + 'en_CA' => array( + 'code' => 'en', + 'locale' => 'en_CA', + 'name' => 'English', + 'dir' => 'ltr', + 'flag' => 'ca', + 'facebook' => 'en_US', + 'deepl' => 'EN-US', + ), + 'en_GB' => array( + 'code' => 'en', + 'locale' => 'en_GB', + 'name' => 'English', + 'dir' => 'ltr', + 'flag' => 'gb', + 'facebook' => 'en_GB', + 'deepl' => 'EN-GB', + ), + 'en_NZ' => array( + 'code' => 'en', + 'locale' => 'en_NZ', + 'name' => 'English', + 'dir' => 'ltr', + 'flag' => 'nz', + 'facebook' => 'en_US', + 'deepl' => 'EN-US', + ), + 'en_US' => array( + 'code' => 'en', + 'locale' => 'en_US', + 'name' => 'English', + 'dir' => 'ltr', + 'flag' => 'us', + 'facebook' => 'en_US', + 'deepl' => 'EN-US', + ), + 'en_ZA' => array( + 'code' => 'en', + 'locale' => 'en_ZA', + 'name' => 'English', + 'dir' => 'ltr', + 'flag' => 'za', + 'facebook' => 'en_US', + 'deepl' => 'EN-US', + ), + 'eo' => array( + 'code' => 'eo', + 'locale' => 'eo', + 'name' => 'Esperanto', + 'dir' => 'ltr', + 'flag' => 'esperanto', + 'facebook' => 'eo_EO', + 'deepl' => 'EO', + ), + 'es_AR' => array( + 'code' => 'es', + 'locale' => 'es_AR', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'ar', + 'facebook' => 'es_LA', + 'deepl' => 'ES-419', + ), + 'es_CL' => array( + 'code' => 'es', + 'locale' => 'es_CL', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'cl', + 'facebook' => 'es_CL', + 'deepl' => 'ES-419', + ), + 'es_CO' => array( + 'code' => 'es', + 'locale' => 'es_CO', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'co', + 'facebook' => 'es_CO', + 'deepl' => 'ES-419', + ), + 'es_CR' => array( + 'code' => 'es', + 'locale' => 'es_CR', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'cr', + 'facebook' => 'es_LA', + 'deepl' => 'ES-419', + ), + 'es_DO' => array( + 'code' => 'es', + 'locale' => 'es_DO', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'do', + 'facebook' => 'es_LA', + 'deepl' => 'ES-419', + ), + 'es_EC' => array( + 'code' => 'es', + 'locale' => 'es_EC', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'ec', + 'facebook' => 'es_LA', + 'deepl' => 'ES-419', + ), + 'es_ES' => array( + 'code' => 'es', + 'locale' => 'es_ES', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'es', + 'facebook' => 'es_ES', + 'deepl' => 'ES', + ), + 'es_GT' => array( + 'code' => 'es', + 'locale' => 'es_GT', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'gt', + 'facebook' => 'es_LA', + 'deepl' => 'ES-419', + ), + 'es_MX' => array( + 'code' => 'es', + 'locale' => 'es_MX', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'mx', + 'facebook' => 'es_MX', + 'deepl' => 'ES-419', + ), + 'es_PE' => array( + 'code' => 'es', + 'locale' => 'es_PE', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'pe', + 'facebook' => 'es_LA', + 'deepl' => 'ES-419', + ), + 'es_PR' => array( + 'code' => 'es', + 'locale' => 'es_PR', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'pr', + 'facebook' => 'es_LA', + 'deepl' => 'ES-419', + ), + 'es_UY' => array( + 'code' => 'es', + 'locale' => 'es_UY', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 'uy', + 'facebook' => 'es_LA', + 'deepl' => 'ES-419', + ), + 'es_VE' => array( + 'code' => 'es', + 'locale' => 'es_VE', + 'name' => 'Español', + 'dir' => 'ltr', + 'flag' => 've', + 'facebook' => 'es_VE', + 'deepl' => 'ES-419', + ), + 'et' => array( + 'code' => 'et', + 'locale' => 'et', + 'name' => 'Eesti', + 'dir' => 'ltr', + 'flag' => 'ee', + 'facebook' => 'et_EE', + 'deepl' => 'ET', + ), + 'eu' => array( + 'code' => 'eu', + 'locale' => 'eu', + 'name' => 'Euskara', + 'dir' => 'ltr', + 'flag' => 'basque', + 'facebook' => 'eu_ES', + 'deepl' => 'EU', + ), + 'fa_AF' => array( + 'code' => 'fa', + 'locale' => 'fa_AF', + 'name' => 'فارسی', + 'dir' => 'rtl', + 'flag' => 'af', + 'facebook' => 'fa_IR', + 'deepl' => 'FA', + ), + 'fa_IR' => array( + 'code' => 'fa', + 'locale' => 'fa_IR', + 'name' => 'فارسی', + 'dir' => 'rtl', + 'flag' => 'ir', + 'facebook' => 'fa_IR', + 'deepl' => 'FA', + ), + 'fi' => array( + 'code' => 'fi', + 'locale' => 'fi', + 'name' => 'Suomi', + 'dir' => 'ltr', + 'flag' => 'fi', + 'facebook' => 'fi_FI', + 'deepl' => 'FI', + ), + 'fo' => array( + 'code' => 'fo', + 'locale' => 'fo', + 'name' => 'Føroyskt', + 'dir' => 'ltr', + 'flag' => 'fo', + 'facebook' => 'fo_FO', + ), + 'fr_BE' => array( + 'code' => 'fr', + 'locale' => 'fr_BE', + 'name' => 'Français', + 'dir' => 'ltr', + 'flag' => 'be', + 'facebook' => 'fr_FR', + 'deepl' => 'FR', + ), + 'fr_CA' => array( + 'code' => 'fr', + 'locale' => 'fr_CA', + 'name' => 'Français', + 'dir' => 'ltr', + 'flag' => 'quebec', + 'facebook' => 'fr_CA', + 'deepl' => 'FR', + ), + 'fr_FR' => array( + 'code' => 'fr', + 'locale' => 'fr_FR', + 'name' => 'Français', + 'dir' => 'ltr', + 'flag' => 'fr', + 'facebook' => 'fr_FR', + 'deepl' => 'FR', + ), + 'fuc' => array( + 'facebook' => 'ff_NG', + ), + 'fur' => array( + 'code' => 'fur', + 'locale' => 'fur', + 'name' => 'Furlan', + 'dir' => 'ltr', + 'flag' => 'it', + ), + 'fy' => array( + 'code' => 'fy', + 'locale' => 'fy', + 'name' => 'Frysk', + 'dir' => 'ltr', + 'flag' => 'nl', + 'facebook' => 'fy_NL', + ), + 'ga' => array( + 'code' => 'ga', + 'locale' => 'ga', + 'name' => 'Gaelige', + 'dir' => 'ltr', + 'flag' => 'ie', + 'w3c' => 'ga', + 'facebook' => 'ga_IE', + 'deepl' => 'GA', + ), + 'gax' => array( + 'code' => 'om', + 'locale' => 'gax', + 'name' => 'Afaan Oromoo', + 'dir' => 'ltr', + 'flag' => 'et', + 'w3c' => 'gax', + 'facebook' => 'om_ET', + 'deepl' => 'OM', + ), + 'gd' => array( + 'code' => 'gd', + 'locale' => 'gd', + 'name' => 'Gàidhlig', + 'dir' => 'ltr', + 'flag' => 'scotland', + ), + 'gl_ES' => array( + 'code' => 'gl', + 'locale' => 'gl_ES', + 'name' => 'Galego', + 'dir' => 'ltr', + 'flag' => 'galicia', + 'facebook' => 'gl_ES', + 'deepl' => 'GL', + ), + 'gn' => array( + 'facebook' => 'gn_PY', + ), + 'gu' => array( + 'code' => 'gu', + 'locale' => 'gu', + 'name' => 'ગુજરાતી', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'gu_IN', + 'deepl' => 'GU', + ), + 'hat' => array( + 'w3c' => 'ht', + 'facebook' => 'ht_HT', + 'deepl' => 'HT', + ), + 'hau' => array( + 'code' => 'ha', + 'locale' => 'hau', + 'name' => 'Harshen Hausa', + 'dir' => 'ltr', + 'flag' => 'ng', + 'w3c' => 'ha', + 'facebook' => 'ha_NG', + 'deepl' => 'HA', + ), + 'haz' => array( + 'code' => 'haz', + 'locale' => 'haz', + 'name' => 'هزاره گی', + 'dir' => 'rtl', + 'flag' => 'af', + ), + 'he_IL' => array( + 'code' => 'he', + 'locale' => 'he_IL', + 'name' => 'עברית', + 'dir' => 'rtl', + 'flag' => 'il', + 'facebook' => 'he_IL', + 'deepl' => 'HE', + ), + 'hi_IN' => array( + 'code' => 'hi', + 'locale' => 'hi_IN', + 'name' => 'हिन्दी', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'hi_IN', + 'deepl' => 'HI', + ), + 'hr' => array( + 'code' => 'hr', + 'locale' => 'hr', + 'name' => 'Hrvatski', + 'dir' => 'ltr', + 'flag' => 'hr', + 'facebook' => 'hr_HR', + 'deepl' => 'HR', + ), + 'hsb' => array( + 'code' => 'hsb', + 'locale' => 'hsb', + 'name' => 'Hornjoserbšćina', + 'dir' => 'ltr', + 'flag' => 'de', + ), + 'hu_HU' => array( + 'code' => 'hu', + 'locale' => 'hu_HU', + 'name' => 'Magyar', + 'dir' => 'ltr', + 'flag' => 'hu', + 'facebook' => 'hu_HU', + 'deepl' => 'HU', + ), + 'hy' => array( + 'code' => 'hy', + 'locale' => 'hy', + 'name' => 'Հայերեն', + 'dir' => 'ltr', + 'flag' => 'am', + 'facebook' => 'hy_AM', + 'deepl' => 'HY', + ), + 'ibo' => array( + 'code' => 'ig', + 'locale' => 'ibo', + 'name' => 'Asụsụ Igbo', + 'dir' => 'ltr', + 'flag' => 'ng', + 'w3c' => 'ig', + 'facebook' => 'ig_NG', + 'deepl' => 'IG', + ), + 'id_ID' => array( + 'code' => 'id', + 'locale' => 'id_ID', + 'name' => 'Bahasa Indonesia', + 'dir' => 'ltr', + 'flag' => 'id', + 'facebook' => 'id_ID', + 'deepl' => 'ID', + ), + 'ido' => array( + 'w3c' => 'io', + ), + 'is_IS' => array( + 'code' => 'is', + 'locale' => 'is_IS', + 'name' => 'Íslenska', + 'dir' => 'ltr', + 'flag' => 'is', + 'facebook' => 'is_IS', + 'deepl' => 'IS', + ), + 'it_IT' => array( + 'code' => 'it', + 'locale' => 'it_IT', + 'name' => 'Italiano', + 'dir' => 'ltr', + 'flag' => 'it', + 'facebook' => 'it_IT', + 'deepl' => 'IT', + ), + 'ja' => array( + 'code' => 'ja', + 'locale' => 'ja', + 'name' => '日本語', + 'dir' => 'ltr', + 'flag' => 'jp', + 'facebook' => 'ja_JP', + 'deepl' => 'JA', + ), + 'jv_ID' => array( + 'code' => 'jv', + 'locale' => 'jv_ID', + 'name' => 'Basa Jawa', + 'dir' => 'ltr', + 'flag' => 'id', + 'facebook' => 'jv_ID', + 'deepl' => 'JV', + ), + 'ka_GE' => array( + 'code' => 'ka', + 'locale' => 'ka_GE', + 'name' => 'ქართული', + 'dir' => 'ltr', + 'flag' => 'ge', + 'facebook' => 'ka_GE', + 'deepl' => 'KA', + ), + 'kab' => array( + 'code' => 'kab', + 'locale' => 'kab', + 'name' => 'Taqbaylit', + 'dir' => 'ltr', + 'flag' => 'dz', + ), + 'kin' => array( + 'code' => 'rw', + 'locale' => 'kin', + 'name' => 'Ikinyarwanda', + 'dir' => 'ltr', + 'flag' => 'rw', + 'w3c' => 'rw', + 'facebook' => 'rw_RW', + ), + 'kir' => array( + 'code' => 'ky', + 'locale' => 'kir', + 'name' => 'Кыргызча', + 'dir' => 'ltr', + 'flag' => 'kg', + 'deepl' => 'KY', + ), + 'kk' => array( + 'code' => 'kk', + 'locale' => 'kk', + 'name' => 'Қазақ тілі', + 'dir' => 'ltr', + 'flag' => 'kz', + 'facebook' => 'kk_KZ', + 'deepl' => 'KK', + ), + 'km' => array( + 'code' => 'km', + 'locale' => 'km', + 'name' => 'ភាសាខ្មែរ', + 'dir' => 'ltr', + 'flag' => 'kh', + 'facebook' => 'km_KH', + ), + 'kmr' => array( + 'deepl' => 'KMR', + ), + 'kn' => array( + 'code' => 'kn', + 'locale' => 'kn', + 'name' => 'ಕನ್ನಡ', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'kn_IN', + ), + 'ko_KR' => array( + 'code' => 'ko', + 'locale' => 'ko_KR', + 'name' => '한국어', + 'dir' => 'ltr', + 'flag' => 'kr', + 'facebook' => 'ko_KR', + 'deepl' => 'KO', + ), + 'ku' => array( + 'facebook' => 'ku_TR', + ), + 'ky_KY' => array( + 'facebook' => 'ky_KG', + ), + 'la' => array( + 'facebook' => 'la_VA', + 'deepl' => 'LA', + ), + 'lb_LU' => array( + 'code' => 'lb', + 'locale' => 'lb_LU', + 'name' => 'Lëtzebuergesch', + 'dir' => 'ltr', + 'flag' => 'lu', + 'w3c' => 'lb', + 'deepl' => 'LB', + ), + 'li' => array( + 'facebook' => 'li_NL', + ), + 'lin' => array( + 'code' => 'ln', + 'locale' => 'lin', + 'name' => 'Ngala', + 'dir' => 'ltr', + 'flag' => 'cd', + 'w3c' => 'ln', + 'facebook' => 'ln_CD', + 'deepl' => 'LN', + ), + 'lmo' => array( + 'code' => 'lmo', + 'locale' => 'lmo', + 'name' => 'Lombardo', + 'dir' => 'ltr', + 'flag' => 'it', + 'w3c' => 'lmo', + 'deepl' => 'LMO', + ), + 'lo' => array( + 'code' => 'lo', + 'locale' => 'lo', + 'name' => 'ພາສາລາວ', + 'dir' => 'ltr', + 'flag' => 'la', + 'facebook' => 'lo_LA', + ), + 'lt_LT' => array( + 'code' => 'lt', + 'locale' => 'lt_LT', + 'name' => 'Lietuviškai', + 'dir' => 'ltr', + 'flag' => 'lt', + 'facebook' => 'lt_LT', + 'deepl' => 'LT', + ), + 'lug' => array( + 'code' => 'lg', + 'locale' => 'lug', + 'name' => 'Oluganda', + 'dir' => 'ltr', + 'flag' => 'ug', + 'w3c' => 'lg', + 'facebook' => 'lg_UG', + ), + 'lv' => array( + 'code' => 'lv', + 'locale' => 'lv', + 'name' => 'Latviešu valoda', + 'dir' => 'ltr', + 'flag' => 'lv', + 'facebook' => 'lv_LV', + 'deepl' => 'LV', + ), + 'mai' => array( + 'code' => 'mai', + 'locale' => 'mai', + 'name' => 'मैथिली', + 'dir' => 'ltr', + 'flag' => 'in', + 'w3c' => 'mai', + 'deepl' => 'MAI', + ), + 'mg_MG' => array( + 'code' => 'mg', + 'locale' => 'mg_MG', + 'name' => 'malagasy', + 'dir' => 'ltr', + 'flag' => 'mg', + 'facebook' => 'mg_MG', + 'deepl' => 'MG', + ), + 'mk_MK' => array( + 'code' => 'mk', + 'locale' => 'mk_MK', + 'name' => 'македонски јазик', + 'dir' => 'ltr', + 'flag' => 'mk', + 'facebook' => 'mk_MK', + 'deepl' => 'MK', + ), + 'ml_IN' => array( + 'code' => 'ml', + 'locale' => 'ml_IN', + 'name' => 'മലയാളം', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'ml_IN', + 'deepl' => 'ML', + ), + 'mlt' => array( + 'code' => 'mt', + 'locale' => 'mlt', + 'name' => 'Malti', + 'dir' => 'ltr', + 'flag' => 'mt', + 'facebook' => 'mt_MT', + 'deepl' => 'MT', + ), + 'mn' => array( + 'code' => 'mn', + 'locale' => 'mn', + 'name' => 'Монгол хэл', + 'dir' => 'ltr', + 'flag' => 'mn', + 'facebook' => 'mn_MN', + 'deepl' => 'MN', + ), + 'mr' => array( + 'code' => 'mr', + 'locale' => 'mr', + 'name' => 'मराठी', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'mr_IN', + 'deepl' => 'MR', + ), + 'mri' => array( + 'code' => 'mi', + 'locale' => 'mri', + 'name' => 'Te reo Māori', + 'dir' => 'ltr', + 'flag' => 'nz', + 'w3c' => 'mi', + 'facebook' => 'mi_NZ', + 'deepl' => 'MI', + ), + 'ms_MY' => array( + 'code' => 'ms', + 'locale' => 'ms_MY', + 'name' => 'Bahasa Melayu', + 'dir' => 'ltr', + 'flag' => 'my', + 'facebook' => 'ms_MY', + 'deepl' => 'MS', + ), + 'my_MM' => array( + 'code' => 'my', + 'locale' => 'my_MM', + 'name' => 'ဗမာစာ', + 'dir' => 'ltr', + 'flag' => 'mm', + 'facebook' => 'my_MM', + 'deepl' => 'MY', + ), + 'nb_NO' => array( + 'code' => 'nb', + 'locale' => 'nb_NO', + 'name' => 'Norsk Bokmål', + 'dir' => 'ltr', + 'flag' => 'no', + 'facebook' => 'nb_NO', + 'deepl' => 'NB', + ), + 'ne_NP' => array( + 'code' => 'ne', + 'locale' => 'ne_NP', + 'name' => 'नेपाली', + 'dir' => 'ltr', + 'flag' => 'np', + 'facebook' => 'ne_NP', + 'deepl' => 'NE', + ), + 'nl_BE' => array( + 'code' => 'nl', + 'locale' => 'nl_BE', + 'name' => 'Nederlands', + 'dir' => 'ltr', + 'flag' => 'be', + 'facebook' => 'nl_BE', + 'deepl' => 'NL', + ), + 'nl_NL' => array( + 'code' => 'nl', + 'locale' => 'nl_NL', + 'name' => 'Nederlands', + 'dir' => 'ltr', + 'flag' => 'nl', + 'facebook' => 'nl_NL', + 'deepl' => 'NL', + ), + 'nl_NL_formal' => array( + 'code' => 'nl', + 'locale' => 'nl_NL_formal', + 'name' => 'Nederlands', + 'dir' => 'ltr', + 'flag' => 'nl', + 'w3c' => 'nl-NL', + 'facebook' => 'nl_NL', + 'deepl' => 'NL', + ), + 'nn_NO' => array( + 'code' => 'nn', + 'locale' => 'nn_NO', + 'name' => 'Norsk Nynorsk', + 'dir' => 'ltr', + 'flag' => 'no', + 'facebook' => 'nn_NO', + ), + 'oci' => array( + 'code' => 'oc', + 'locale' => 'oci', + 'name' => 'Occitan', + 'dir' => 'ltr', + 'flag' => 'occitania', + 'w3c' => 'oc', + 'deepl' => 'OC', + ), + 'ory' => array( + 'facebook' => 'or_IN', + ), + 'pa_IN' => array( + 'code' => 'pa', + 'locale' => 'pa_IN', + 'name' => 'ਪੰਜਾਬੀ', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'pa_IN', + 'deepl' => 'PA', + ), + 'pl_PL' => array( + 'code' => 'pl', + 'locale' => 'pl_PL', + 'name' => 'Polski', + 'dir' => 'ltr', + 'flag' => 'pl', + 'facebook' => 'pl_PL', + 'deepl' => 'PL', + ), + 'ps' => array( + 'code' => 'ps', + 'locale' => 'ps', + 'name' => 'پښتو', + 'dir' => 'rtl', + 'flag' => 'af', + 'facebook' => 'ps_AF', + 'deepl' => 'PS', + ), + 'pt_AO' => array( + 'code' => 'pt', + 'locale' => 'pt_AO', + 'name' => 'Português', + 'dir' => 'ltr', + 'flag' => 'ao', + 'facebook' => 'pt_PT', + 'deepl' => 'PT-PT', + ), + 'pt_BR' => array( + 'code' => 'pt', + 'locale' => 'pt_BR', + 'name' => 'Português', + 'dir' => 'ltr', + 'flag' => 'br', + 'facebook' => 'pt_BR', + 'deepl' => 'PT-BR', + ), + 'pt_PT' => array( + 'code' => 'pt', + 'locale' => 'pt_PT', + 'name' => 'Português', + 'dir' => 'ltr', + 'flag' => 'pt', + 'facebook' => 'pt_PT', + 'deepl' => 'PT-PT', + ), + 'pt_PT_ao90' => array( + 'code' => 'pt', + 'locale' => 'pt_PT_ao90', + 'name' => 'Português', + 'dir' => 'ltr', + 'flag' => 'pt', + 'facebook' => 'pt_PT', + 'deepl' => 'PT-PT', + ), + 'rhg' => array( + 'code' => 'rhg', + 'locale' => 'rhg', + 'name' => 'Ruáinga', + 'dir' => 'ltr', + 'flag' => 'mm', + ), + 'ro_RO' => array( + 'code' => 'ro', + 'locale' => 'ro_RO', + 'name' => 'Română', + 'dir' => 'ltr', + 'flag' => 'ro', + 'facebook' => 'ro_RO', + 'deepl' => 'RO', + ), + 'roh' => array( + 'w3c' => 'rm', + 'facebook' => 'rm_CH', + ), + 'ru_RU' => array( + 'code' => 'ru', + 'locale' => 'ru_RU', + 'name' => 'Русский', + 'dir' => 'ltr', + 'flag' => 'ru', + 'facebook' => 'ru_RU', + 'deepl' => 'RU', + ), + 'sa_IN' => array( + 'code' => 'sa', + 'locale' => 'sa_IN', + 'name' => 'संस्कृतम्', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'sa_IN', + 'deepl' => 'SA', + ), + 'sah' => array( + 'code' => 'sah', + 'locale' => 'sah', + 'name' => 'Сахалыы', + 'dir' => 'ltr', + 'flag' => 'ru', + ), + 'scn' => array( + 'code' => 'scn', + 'locale' => 'scn', + 'name' => 'Sicilianu', + 'dir' => 'ltr', + 'flag' => 'it', + 'w3c' => 'scn', + 'deepl' => 'SCN', + ), + 'si_LK' => array( + 'code' => 'si', + 'locale' => 'si_LK', + 'name' => 'සිංහල', + 'dir' => 'ltr', + 'flag' => 'lk', + 'facebook' => 'si_LK', + ), + 'sk_SK' => array( + 'code' => 'sk', + 'locale' => 'sk_SK', + 'name' => 'Slovenčina', + 'dir' => 'ltr', + 'flag' => 'sk', + 'facebook' => 'sk_SK', + 'deepl' => 'SK', + ), + 'skr' => array( + 'code' => 'skr', + 'locale' => 'skr', + 'name' => 'سرائیکی', + 'dir' => 'rtl', + 'flag' => 'pk', + ), + 'sl_SI' => array( + 'code' => 'sl', + 'locale' => 'sl_SI', + 'name' => 'Slovenščina', + 'dir' => 'ltr', + 'flag' => 'si', + 'facebook' => 'sl_SI', + 'deepl' => 'SL', + ), + 'sna' => array( + 'code' => 'sn', + 'locale' => 'sna', + 'name' => 'ChiShona', + 'dir' => 'ltr', + 'flag' => 'zw', + 'w3c' => 'sn', + 'facebook' => 'sn_ZW', + ), + 'snd' => array( + 'code' => 'sd', + 'locale' => 'snd', + 'name' => 'سنڌي', + 'dir' => 'rtl', + 'flag' => 'pk', + ), + 'so_SO' => array( + 'code' => 'so', + 'locale' => 'so_SO', + 'name' => 'Af-Soomaali', + 'dir' => 'ltr', + 'flag' => 'so', + 'facebook' => 'so_SO', + ), + 'sq' => array( + 'code' => 'sq', + 'locale' => 'sq', + 'name' => 'Shqip', + 'dir' => 'ltr', + 'flag' => 'al', + 'facebook' => 'sq_AL', + 'deepl' => 'SQ', + ), + 'sr_RS' => array( + 'code' => 'sr', + 'locale' => 'sr_RS', + 'name' => 'Српски језик', + 'dir' => 'ltr', + 'flag' => 'rs', + 'facebook' => 'sr_RS', + 'deepl' => 'SR', + ), + 'srd' => array( + 'w3c' => 'sc', + 'facebook' => 'sc_IT', + ), + 'su_ID' => array( + 'code' => 'su', + 'locale' => 'su_ID', + 'name' => 'Basa Sunda', + 'dir' => 'ltr', + 'flag' => 'id', + 'facebook' => 'su_ID', + 'deepl' => 'SU', + ), + 'sv_SE' => array( + 'code' => 'sv', + 'locale' => 'sv_SE', + 'name' => 'Svenska', + 'dir' => 'ltr', + 'flag' => 'se', + 'facebook' => 'sv_SE', + 'deepl' => 'SV', + ), + 'sw' => array( + 'code' => 'sw', + 'locale' => 'sw', + 'name' => 'Kiswahili', + 'dir' => 'ltr', + 'flag' => 'ke', + 'facebook' => 'sw_KE', + 'deepl' => 'SW', + ), + 'syr' => array( + 'facebook' => 'sy_SY', + ), + 'szl' => array( + 'code' => 'szl', + 'locale' => 'szl', + 'name' => 'Ślōnskŏ gŏdka', + 'dir' => 'ltr', + 'flag' => 'pl', + 'facebook' => 'sz_PL', + ), + 'ta_IN' => array( + 'code' => 'ta', + 'locale' => 'ta_IN', + 'name' => 'தமிழ்', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'ta_IN', + 'deepl' => 'TA', + ), + 'ta_LK' => array( + 'code' => 'ta', + 'locale' => 'ta_LK', + 'name' => 'தமிழ்', + 'dir' => 'ltr', + 'flag' => 'lk', + 'facebook' => 'ta_IN', + 'deepl' => 'TA', + ), + 'tah' => array( + 'code' => 'ty', + 'locale' => 'tah', + 'name' => 'Reo Tahiti', + 'dir' => 'ltr', + 'flag' => 'pf', + ), + 'te' => array( + 'code' => 'te', + 'locale' => 'te', + 'name' => 'తెలుగు', + 'dir' => 'ltr', + 'flag' => 'in', + 'facebook' => 'te_IN', + 'deepl' => 'TE', + ), + 'tg' => array( + 'code' => 'tg', + 'locale' => 'tg', + 'name' => 'Тоҷикӣ', + 'dir' => 'ltr', + 'flag' => 'tj', + 'facebook' => 'tg_TJ', + 'deepl' => 'TG', + ), + 'th' => array( + 'code' => 'th', + 'locale' => 'th', + 'name' => 'ไทย', + 'dir' => 'ltr', + 'flag' => 'th', + 'facebook' => 'th_TH', + 'deepl' => 'TH', + ), + 'tir' => array( + 'code' => 'ti', + 'locale' => 'tir', + 'name' => 'ትግርኛ', + 'dir' => 'ltr', + 'flag' => 'et', + 'w3c' => 'ti', + ), + 'tl' => array( + 'code' => 'tl', + 'locale' => 'tl', + 'name' => 'Tagalog', + 'dir' => 'ltr', + 'flag' => 'ph', + 'facebook' => 'tl_PH', + 'deepl' => 'TL', + ), + 'tr_TR' => array( + 'code' => 'tr', + 'locale' => 'tr_TR', + 'name' => 'Türkçe', + 'dir' => 'ltr', + 'flag' => 'tr', + 'facebook' => 'tr_TR', + 'deepl' => 'TR', + ), + 'tt_RU' => array( + 'code' => 'tt', + 'locale' => 'tt_RU', + 'name' => 'Татар теле', + 'dir' => 'ltr', + 'flag' => 'ru', + 'facebook' => 'tt_RU', + 'deepl' => 'TT', + ), + 'tuk' => array( + 'w3c' => 'tk', + 'facebook' => 'tk_TM', + 'deepl' => 'TK', + ), + 'tzm' => array( + 'facebook' => 'tz_MA', + ), + 'ug_CN' => array( + 'code' => 'ug', + 'locale' => 'ug_CN', + 'name' => 'Uyƣurqə', + 'dir' => 'ltr', + 'flag' => 'cn', + ), + 'uk' => array( + 'code' => 'uk', + 'locale' => 'uk', + 'name' => 'Українська', + 'dir' => 'ltr', + 'flag' => 'ua', + 'facebook' => 'uk_UA', + 'deepl' => 'UK', + ), + 'ur' => array( + 'code' => 'ur', + 'locale' => 'ur', + 'name' => 'اردو', + 'dir' => 'rtl', + 'flag' => 'pk', + 'facebook' => 'ur_PK', + 'deepl' => 'UR', + ), + 'uz_UZ' => array( + 'code' => 'uz', + 'locale' => 'uz_UZ', + 'name' => 'Oʻzbek', + 'dir' => 'ltr', + 'flag' => 'uz', + 'facebook' => 'uz_UZ', + 'deepl' => 'UZ', + ), + 'vec' => array( + 'code' => 'vec', + 'locale' => 'vec', + 'name' => 'Vèneto', + 'dir' => 'ltr', + 'flag' => 'veneto', + ), + 'vi' => array( + 'code' => 'vi', + 'locale' => 'vi', + 'name' => 'Tiếng Việt', + 'dir' => 'ltr', + 'flag' => 'vn', + 'facebook' => 'vi_VN', + 'deepl' => 'VI', + ), + 'wol' => array( + 'code' => 'wo', + 'locale' => 'wol', + 'name' => 'Wolof', + 'dir' => 'ltr', + 'flag' => 'sn', + 'w3c' => 'wo', + 'facebook' => 'wo_SN', + 'deepl' => 'WO', + ), + 'xho' => array( + 'code' => 'xh', + 'locale' => 'xho', + 'name' => 'isiXhosa', + 'dir' => 'ltr', + 'flag' => 'za', + 'w3c' => 'xh', + 'facebook' => 'xh_ZA', + 'deepl' => 'XH', + ), + 'yor' => array( + 'code' => 'yo', + 'locale' => 'yor', + 'name' => 'Yorùbá', + 'dir' => 'ltr', + 'flag' => 'ng', + 'w3c' => 'yo', + 'facebook' => 'yo_NG', + ), + 'zh_CN' => array( + 'code' => 'zh', + 'locale' => 'zh_CN', + 'name' => '中文 (中国)', + 'dir' => 'ltr', + 'flag' => 'cn', + 'facebook' => 'zh_CN', + 'deepl' => 'ZH-HANS', + ), + 'zh_HK' => array( + 'code' => 'zh', + 'locale' => 'zh_HK', + 'name' => '中文 (香港)', + 'dir' => 'ltr', + 'flag' => 'hk', + 'facebook' => 'zh_HK', + 'deepl' => 'ZH-HANT', + ), + 'zh_TW' => array( + 'code' => 'zh', + 'locale' => 'zh_TW', + 'name' => '中文 (台灣)', + 'dir' => 'ltr', + 'flag' => 'tw', + 'facebook' => 'zh_TW', + 'deepl' => 'ZH-HANT', + ), + 'zul' => array( + 'code' => 'zu', + 'locale' => 'zul', + 'name' => 'isiZulu', + 'dir' => 'ltr', + 'flag' => 'za', + 'w3c' => 'zu', + 'facebook' => 'zu_ZA', + 'deepl' => 'ZU', + ), +); diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-browser.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-browser.php new file mode 100644 index 0000000..57925d0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-browser.php @@ -0,0 +1,107 @@ +is_available()`, which is used before calling the parent's constructor. + $this->options = $polylang->options; + + parent::__construct( + $polylang, + array( + 'module' => 'browser', + 'title' => __( 'Detect browser language', 'polylang' ), + 'description' => __( 'When the front page is visited, redirects to itself in the browser preferred language. As this doesn\'t work if it is cached, Polylang will attempt to disable the front page cache for known cache plugins.', 'polylang' ), + 'active_option' => $this->is_available() ? 'browser' : 'none', + ) + ); + + if ( ! class_exists( 'PLL_Xdata_Domain', true ) ) { + add_action( 'admin_print_footer_scripts', array( $this, 'print_js' ) ); + } + } + + /** + * Tells if the option is available + * + * @since 2.0 + * + * @return bool + */ + protected function is_available() { + return ( 3 > $this->options['force_lang'] ) || class_exists( 'PLL_Xdata_Domain', true ); + } + + /** + * Tells if the module is active + * + * @since 1.8 + * + * @return bool + */ + public function is_active() { + return $this->is_available() ? parent::is_active() : false; + } + + /** + * Displays the javascript to handle dynamically the change in url modifications + * as the preferred browser language is not used when the language is set from different domains + * + * @since 1.8 + * + * @return void + */ + public function print_js() { + wp_enqueue_script( 'jquery' ); + + if ( parent::is_active() && 3 > $this->options['force_lang'] ) { + $func = 'removeClass( "inactive" ).addClass( "active" )'; + $link = sprintf( '%s', $this->action_links['deactivate'] ); + } + else { + $func = 'removeClass( "active" ).addClass( "inactive" )'; + $link = sprintf( '%s', $this->action_links['activate'] ); + } + + $deactivated = sprintf( '%s', $this->action_links['deactivated'] ); + + ?> + + 'cpt', + 'title' => __( 'Custom post types and Taxonomies', 'polylang' ), + 'description' => __( 'Activate languages and translations management for the custom post types and the taxonomies.', 'polylang' ), + ) + ); + + $public_post_types = get_post_types( array( 'public' => true, '_builtin' => false ) ); + /** This filter is documented in src/model.php */ + $this->post_types = array_unique( apply_filters( 'pll_get_post_types', $public_post_types, true ) ); + + /** This filter is documented in src/model.php */ + $programmatically_active_post_types = array_unique( apply_filters( 'pll_get_post_types', array(), false ) ); + $this->disabled_post_types = array_intersect( $programmatically_active_post_types, $this->post_types ); + + $public_taxonomies = get_taxonomies( array( 'public' => true, '_builtin' => false ) ); + $public_taxonomies = array_diff( $public_taxonomies, get_taxonomies( array( '_pll' => true ) ) ); + /** This filter is documented in src/model.php */ + $this->taxonomies = array_unique( apply_filters( 'pll_get_taxonomies', $public_taxonomies, true ) ); + + /** This filter is documented in src/model.php */ + $programmatically_active_taxonomies = array_unique( apply_filters( 'pll_get_taxonomies', array(), false ) ); + $this->disabled_taxonomies = array_intersect( $programmatically_active_taxonomies, $this->taxonomies ); + } + + /** + * Tells if the module is active + * + * @since 1.8 + * + * @return bool + */ + public function is_active() { + return ! empty( $this->post_types ) || ! empty( $this->taxonomies ); + } + + /** + * Displays the settings form + * + * @since 1.8 + */ + protected function form() { + if ( ! empty( $this->post_types ) ) {?> +

    +
      + post_types as $post_type ) { + $pt = get_post_type_object( $post_type ); + if ( ! empty( $pt ) ) { + $disabled = in_array( $post_type, $this->disabled_post_types ); + printf( + '
    • ', + esc_attr( $post_type ), + checked( $disabled || in_array( $post_type, $this->options['post_types'], true ), true, false ), + disabled( $disabled, true, false ), + esc_html( + sprintf( + /* translators: 1 is a post type or taxonomy label, 2 is a post type or taxonomy key. */ + _x( '%1$s (%2$s)', 'content type setting choice', 'polylang' ), + $pt->labels->name, + $pt->name + ) + ) + ); + } + } + ?> +
    +

    + taxonomies ) ) { + ?> +

    +
      + taxonomies as $taxonomy ) { + $tax = get_taxonomy( $taxonomy ); + if ( ! empty( $tax ) ) { + $disabled = in_array( $taxonomy, $this->disabled_taxonomies ); + printf( + '
    • ', + esc_attr( $taxonomy ), + checked( $disabled || in_array( $taxonomy, $this->options['taxonomies'], true ), true, false ), + disabled( $disabled, true, false ), + esc_html( + sprintf( + /* translators: 1 is a post type or taxonomy label, 2 is a post type or taxonomy key. */ + _x( '%1$s (%2$s)', 'content type setting choice', 'polylang' ), + $tax->labels->name, + $tax->name + ) + ) + ); + } + } + ?> +
    +

    + 'licenses', + 'title' => __( 'License keys', 'polylang' ), + 'description' => __( 'Manage licenses for Polylang Pro and add-ons.', 'polylang' ), + ) + ); + + $this->buttons['cancel'] = sprintf( '', __( 'Close', 'polylang' ) ); + + $this->items = apply_filters( 'pll_settings_licenses', array() ); + + add_action( 'wp_ajax_pll_deactivate_license', array( $this, 'deactivate_license' ) ); + } + + /** + * Tells if the module is active + * + * @since 1.9 + * + * @return bool + */ + public function is_active() { + return ! empty( $this->items ); + } + + /** + * Displays the settings form + * + * @since 1.9 + */ + protected function form() { + if ( ! empty( $this->items ) ) { ?> + + items as $item ) { + echo $this->get_row( $item ); // phpcs:ignore WordPress.Security.EscapeOutput + } + ?> +
    + get_form_field(); + } + + /** + * Ajax method to save the license keys and activate the licenses at the same time + * Overrides parent's method + * + * @since 1.9 + */ + public function save_options() { + check_ajax_referer( 'pll_options', '_pll_nonce' ); + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( isset( $_POST['module'] ) && $this->module === $_POST['module'] && ! empty( $_POST['licenses'] ) ) { + $x = new WP_Ajax_Response(); + foreach ( $this->items as $item ) { + if ( ! empty( $_POST['licenses'][ $item->id ] ) ) { + $updated_item = $item->activate_license( sanitize_key( $_POST['licenses'][ $item->id ] ) ); + $x->Add( array( 'what' => 'license-update', 'data' => $item->id, 'supplemental' => array( 'html' => $this->get_row( $updated_item ) ) ) ); + } + } + + // Updated message + pll_add_notice( new WP_Error( 'settings_updated', __( 'Settings saved.', 'polylang' ), 'success' ) ); + ob_start(); + settings_errors( 'polylang' ); + $x->Add( array( 'what' => 'success', 'data' => ob_get_clean() ) ); + $x->send(); + } + } + + /** + * Ajax method to deactivate a license + * + * @since 1.9 + * + * @return void + */ + public function deactivate_license() { + check_ajax_referer( 'pll_options', '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( ! isset( $_POST['id'] ) ) { + wp_die( 0 ); + } + + $id = substr( sanitize_text_field( wp_unslash( $_POST['id'] ) ), 11 ); + wp_send_json( + array( + 'id' => $id, + 'html' => $this->get_row( $this->items[ $id ]->deactivate_license() ), + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-media.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-media.php new file mode 100644 index 0000000..f6b3a12 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-media.php @@ -0,0 +1,37 @@ + 'media', + 'title' => __( 'Media', 'polylang' ), + 'description' => __( 'Activate languages and translations for media only if you need to translate the text attached to the media: the title, the alternative text, the caption, the description... Note that the file is not duplicated.', 'polylang' ), + 'active_option' => 'media_support', + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-module.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-module.php new file mode 100644 index 0000000..bdd8554 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-module.php @@ -0,0 +1,375 @@ +options = $polylang->options; + $this->model = &$polylang->model; + $this->links_model = &$polylang->links_model; + + $args = wp_parse_args( + $args, + array( + 'title' => '', + 'description' => '', + 'active_option' => 'none', + ) + ); + + if ( empty( $args['active_option'] ) ) { + // Backward compatibility. + $args['active_option'] = 'none'; + } + + foreach ( $args as $prop => $value ) { + $this->$prop = $value; + } + + // All possible action links, even if not always a link ;-) + $this->action_links = array( + 'configure' => sprintf( + '%s', + esc_attr__( 'Configure this module', 'polylang' ), + '#', + esc_html__( 'Settings', 'polylang' ) + ), + 'deactivate' => sprintf( + '%s', + esc_attr__( 'Deactivate this module', 'polylang' ), + esc_url( wp_nonce_url( '?page=mlang_settings&pll_action=deactivate&noheader=true&module=' . $this->module, 'pll_deactivate' ) ), + esc_html__( 'Deactivate', 'polylang' ) + ), + 'activate' => sprintf( + '%s', + esc_attr__( 'Activate this module', 'polylang' ), + esc_url( wp_nonce_url( '?page=mlang_settings&pll_action=activate&noheader=true&module=' . $this->module, 'pll_activate' ) ), + esc_html__( 'Activate', 'polylang' ) + ), + 'activated' => esc_html__( 'Activated', 'polylang' ), + 'deactivated' => esc_html__( 'Deactivated', 'polylang' ), + ); + + $this->buttons = array( + 'cancel' => sprintf( '', esc_html__( 'Cancel', 'polylang' ) ), + 'save' => sprintf( '', esc_html__( 'Save Changes', 'polylang' ) ), + ); + + // Ajax action to save options. + add_action( 'wp_ajax_pll_save_options', array( $this, 'save_options' ) ); + } + + /** + * Tells if the module is active. + * + * @since 1.8 + * + * @return bool + */ + public function is_active() { + return 'none' === $this->active_option || ( 'preview' !== $this->active_option && ! empty( $this->options[ $this->active_option ] ) ); + } + + /** + * Activates the module. + * + * @since 1.8 + * + * @return void + */ + public function activate() { + if ( 'none' !== $this->active_option && 'preview' !== $this->active_option ) { + $this->options[ $this->active_option ] = true; + } + } + + /** + * Deactivates the module. + * + * @since 1.8 + * + * @return void + */ + public function deactivate() { + if ( 'none' !== $this->active_option && 'preview' !== $this->active_option ) { + $this->options[ $this->active_option ] = false; + } + } + + /** + * Protected method to display a configuration form. + * + * @since 1.8 + * + * @return void + */ + protected function form() { + // Child classes can provide a form. + } + + /** + * Public method returning the form if any. + * + * @since 1.8 + * + * @return string + */ + public function get_form() { + if ( ! $this->is_active() ) { + return ''; + } + + // Read the form only once + if ( false === $this->form ) { + ob_start(); + $this->form(); + $this->form = ob_get_clean(); + } + + return $this->form; + } + + /** + * Allows child classes to prepare the received data before saving. + * + * @since 3.7 + * + * @param array $options Raw values to save. + * @return array + */ + protected function prepare_raw_data( array $options ): array { + return $options; + } + + /** + * Ajax method to save the options. + * + * @since 1.8 + * + * @return void + */ + public function save_options() { + check_ajax_referer( 'pll_options', '_pll_nonce' ); + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( isset( $_POST['module'] ) && $this->module === $_POST['module'] ) { + // It's up to the child class to decide which options are saved, whether there are errors or not + $posted_options = array_diff_key( $_POST, array_flip( array( 'action', 'module', 'pll_ajax_backend', 'pll_ajax_settings', '_pll_nonce' ) ) ); + $errors = $this->options->merge( $this->prepare_raw_data( $posted_options ) ); + + // Refresh language cache in case home urls have been modified + $this->model->clean_languages_cache(); + + // Refresh rewrite rules in case rewrite, hide_default, post types or taxonomies options have been modified + // Don't use flush_rewrite_rules as we don't have the right links model and permastruct + delete_option( 'rewrite_rules' ); + + ob_start(); + + if ( ! $errors->has_errors() ) { + // Send update message + pll_add_notice( new WP_Error( 'settings_updated', __( 'Settings saved.', 'polylang' ), 'success' ) ); + settings_errors( 'polylang' ); + $x = new WP_Ajax_Response( array( 'what' => 'success', 'data' => ob_get_clean() ) ); + $x->send(); + } else { + // Send error messages + pll_add_notice( $errors ); + settings_errors( 'polylang' ); + $x = new WP_Ajax_Response( array( 'what' => 'error', 'data' => ob_get_clean() ) ); + $x->send(); + } + } + } + + /** + * Get the row actions. + * + * @since 1.8 + * + * @return string[] + */ + protected function get_actions() { + $actions = array(); + + if ( $this->is_active() && $this->get_form() ) { + $actions[] = 'configure'; + } + + if ( 'none' !== $this->active_option && 'preview' !== $this->active_option ) { + $actions[] = $this->is_active() ? 'deactivate' : 'activate'; + } + + if ( empty( $actions ) ) { + $actions[] = $this->is_active() ? 'activated' : 'deactivated'; + } + + return $actions; + } + + /** + * Get the actions links. + * + * @since 1.8 + * + * @return string[] Action links. + */ + public function get_action_links() { + return array_intersect_key( $this->action_links, array_flip( $this->get_actions() ) ); + } + + /** + * Default upgrade message (to Pro version). + * + * @since 1.9 + * + * @return string + */ + protected function default_upgrade_message() { + return sprintf( + '%s %s', + __( 'To enable this feature, you need Polylang Pro.', 'polylang' ), + 'https://polylang.pro', + __( 'Upgrade now.', 'polylang' ) + ); + } + + /** + * Allows child classes to display an upgrade message. + * + * @since 1.9 + * + * @return string + */ + public function get_upgrade_message() { + return 'preview' === $this->active_option ? $this->default_upgrade_message() : ''; + } + + /** + * Get the buttons. + * + * @since 1.9 + * + * @return string[] An array of html fragment for the buttons. + */ + public function get_buttons() { + return $this->buttons; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-url.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-url.php new file mode 100644 index 0000000..43f8360 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings-url.php @@ -0,0 +1,279 @@ + 'url', + 'title' => __( 'URL modifications', 'polylang' ), + 'description' => __( 'Decide how your URLs will look like.', 'polylang' ), + ) + ); + + $this->page_on_front = &$polylang->static_pages->page_on_front; + } + + /** + * Displays the fieldset to choose how the language is set + * + * @since 1.8 + * + * @return void + */ + protected function force_lang() { + if ( 'yes' === get_option( 'pll_language_from_content_available' ) ) { + ?> +

    + +

    + +

    + + +
    + +

    ' . esc_html( home_url( $this->links_model->using_permalinks ? 'en/my-post/' : '?lang=en&p=1' ) ) . ''; ?>

    ' . esc_html( str_replace( array( '://', 'www.' ), array( '://en.', '' ), home_url( 'my-post/' ) ) ) . ''; ?>

    + + options['force_lang'] ? '' : 'style="display: none;"'; ?>> + model->get_languages_list() as $lg ) { + $url = $this->options['domains'][ $lg->slug ] ?? ( $lg->is_default ? $this->links_model->home : '' ); + printf( + '' . + '', + esc_attr( $lg->slug ), + esc_attr( $lg->name ), + esc_url( $url ) + ); + } + ?> +
    + + + + +

    ' . esc_html( home_url( 'en/' ) ) . ''; ?>

    + +

    ' . esc_html( home_url( 'language/en/' ) ) . ''; ?>

    + + +

    + model->post->get_language( $this->page_on_front ); + /** @var PLL_Language $lang */ + $lang = $lang ?: $this->model->get_default_language(); + printf( + /* translators: %1$s example url when the option is active. %2$s example url when the option is not active */ + esc_html__( 'Example: %1$s instead of %2$s', 'polylang' ), + '' . esc_html( $this->links_model->home_url( $lang ) ) . '', + '' . esc_html( _get_page_link( $this->page_on_front ) ) . '' + ); + ?> +

    + +
    +
    + force_lang(); ?> +
    +
    + +
    +
    $this->options['force_lang'] ? '' : 'style="display: none;"'; ?>> + hide_default(); ?> +
    + links_model->using_permalinks ) { + ?> +
    $this->options['force_lang'] ? '' : 'style="display: none;"'; ?>> + rewrite(); ?> +
    + page_on_front ) { + ?> +
    $this->options['force_lang'] ? '' : 'style="display: none;"'; ?>> + redirect_lang(); ?> +
    + +
    + 0, + 'domains' => array(), + 'hide_default' => 0, + 'rewrite' => 0, + 'redirect_lang' => 0, + ); + + return array_intersect_key( array_merge( $defaults, $options ), $defaults ); // Take care to return only validated options + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings.php new file mode 100644 index 0000000..d6c03da --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/settings.php @@ -0,0 +1,417 @@ +active_tab = 'mlang' === $_GET['page'] ? 'lang' : substr( sanitize_key( $_GET['page'] ), 6 ); // phpcs:ignore WordPress.Security.NonceVerification + } + + PLL_Admin_Strings::init(); + + add_action( 'admin_init', array( $this, 'register_settings_modules' ) ); + + // Adds screen options and the about box in the languages admin panel. + add_action( 'load-' . self::get_screen_id( 'lang' ), array( $this, 'load_page' ) ); + add_action( 'load-' . self::get_screen_id( 'strings' ), array( $this, 'load_page_strings' ) ); + + // Saves the per-page value in screen options. + add_filter( 'set_screen_option_pll_lang_per_page', array( $this, 'set_screen_option' ), 10, 3 ); + add_filter( 'set_screen_option_pll_strings_per_page', array( $this, 'set_screen_option' ), 10, 3 ); + } + + /** + * Initializes the modules + * + * @since 1.8 + * + * @return void + */ + public function register_settings_modules() { + $modules = array(); + + if ( $this->model->has_languages() ) { + $modules = array( + 'PLL_Settings_Url', + 'PLL_Settings_Browser', + 'PLL_Settings_Media', + 'PLL_Settings_CPT', + ); + } + + $modules[] = 'PLL_Settings_Licenses'; + + /** + * Filter the list of setting modules + * + * @since 1.8 + * + * @param array $modules the list of module classes + */ + $modules = apply_filters( 'pll_settings_modules', $modules ); + + foreach ( $modules as $key => $class ) { + $key = is_numeric( $key ) ? strtolower( str_replace( 'PLL_Settings_', '', $class ) ) : $key; + $this->modules[ $key ] = new $class( $this ); + } + } + + /** + * Loads the about metabox + * + * @since 0.8 + * + * @return void + */ + public function metabox_about() { + include __DIR__ . '/view-about.php'; + } + + /** + * Adds screen options and the about box in the languages admin panel + * + * @since 0.9.5 + * + * @return void + */ + public function load_page() { + if ( ! defined( 'PLL_DISPLAY_ABOUT' ) || PLL_DISPLAY_ABOUT ) { + add_meta_box( + 'pll-about-box', + __( 'About Polylang', 'polylang' ), + array( $this, 'metabox_about' ), + self::get_screen_id( 'lang' ), + 'normal' + ); + } + + add_screen_option( + 'per_page', + array( + 'label' => __( 'Languages', 'polylang' ), + 'default' => 10, + 'option' => 'pll_lang_per_page', + ) + ); + + add_action( 'admin_notices', array( $this, 'notice_objects_with_no_lang' ) ); + } + + /** + * Adds screen options in the strings translations admin panel + * + * @since 2.1 + * + * @return void + */ + public function load_page_strings() { + add_screen_option( + 'per_page', + array( + 'label' => __( 'Strings translations', 'polylang' ), + 'default' => 10, + 'option' => 'pll_strings_per_page', + ) + ); + } + + /** + * Saves the number of rows in the languages or strings table set by this user. + * + * @since 0.9.5 + * + * @param mixed $screen_option False or value returned by a previous filter, not used. + * @param string $option The name of the option, not used. + * @param int $value The new value of the option to save. + * @return int The new value of the option. + */ + public function set_screen_option( $screen_option, $option, $value ) { + return (int) $value; + } + + /** + * Manages the user input for the languages pages. + * + * @since 1.9 + * + * @param string $action The action name. + * @return void + * + * @phpstan-param non-empty-string $action + * @phpstan-return never + */ + public function handle_actions( string $action ): void { + switch ( $action ) { + case 'add': + check_admin_referer( 'add-lang', '_wpnonce_add-lang' ); + $language = $this->model->add_language( $_POST ); + + if ( is_wp_error( $language ) ) { + pll_add_notice( $language ); + } else { + pll_add_notice( new WP_Error( 'pll_languages_created', __( 'Language added.', 'polylang' ), 'success' ) ); + + if ( 'en_US' !== $language->locale && current_user_can( 'install_languages' ) ) { + // Attempts to install the language pack + require_once ABSPATH . 'wp-admin/includes/translation-install.php'; + if ( ! wp_download_language_pack( $language->locale ) ) { + pll_add_notice( new WP_Error( 'pll_download_mo', __( 'The language was created, but the WordPress language file was not downloaded. Please install it manually.', 'polylang' ), 'warning' ) ); + } + + // Force checking for themes and plugins translations updates + wp_clean_themes_cache(); + wp_clean_plugins_cache(); + } + } + break; + + case 'delete': + check_admin_referer( 'delete-lang' ); + + if ( ! empty( $_GET['lang'] ) && $this->model->delete_language( (int) $_GET['lang'] ) ) { + pll_add_notice( new WP_Error( 'pll_languages_deleted', __( 'Language deleted.', 'polylang' ), 'success' ) ); + } + + break; + + case 'update': + check_admin_referer( 'add-lang', '_wpnonce_add-lang' ); + $errors = $this->model->update_language( $_POST ); + + if ( is_wp_error( $errors ) ) { + pll_add_notice( $errors ); + } else { + pll_add_notice( new WP_Error( 'pll_languages_updated', __( 'Language updated.', 'polylang' ), 'success' ) ); + } + + break; + + case 'default-lang': + check_admin_referer( 'default-lang' ); + + if ( $lang = $this->model->get_language( (int) $_GET['lang'] ) ) { + $this->model->update_default_lang( $lang->slug ); + } + + break; + + case 'content-default-lang': + check_admin_referer( 'content-default-lang' ); + + $this->model->set_language_in_mass(); + + break; + + case 'activate': + check_admin_referer( 'pll_activate' ); + if ( isset( $_GET['module'] ) ) { + $module = sanitize_key( $_GET['module'] ); + if ( isset( $this->modules[ $module ] ) ) { + $this->modules[ $module ]->activate(); + } + } + break; + + case 'deactivate': + check_admin_referer( 'pll_deactivate' ); + if ( isset( $_GET['module'] ) ) { + $module = sanitize_key( $_GET['module'] ); + if ( isset( $this->modules[ $module ] ) ) { + $this->modules[ $module ]->deactivate(); + } + } + break; + + default: + /** + * Fires when a non default action has been sent to Polylang settings + * + * @since 1.8 + */ + do_action( "mlang_action_$action" ); + break; + } + + self::redirect(); + } + + /** + * Displays the 3 tabs pages: languages, strings translations, settings + * Also manages user input for these pages + * + * @since 0.1 + * + * @return void + */ + public function languages_page() { + switch ( $this->active_tab ) { + case 'lang': + // Prepare the list table of languages + $list_table = new PLL_Table_Languages(); + $list_table->prepare_items( $this->model->get_languages_list() ); + break; + + case 'strings': + $string_table = new PLL_Table_String( $this->model->languages ); + $string_table->prepare_items(); + break; + } + + // Handle user input. + $action = isset( $_REQUEST['pll_action'] ) && is_string( $_REQUEST['pll_action'] ) ? sanitize_key( $_REQUEST['pll_action'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification + if ( 'edit' === $action && ! empty( $_GET['lang'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + // phpcs:ignore WordPress.Security.NonceVerification, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $edit_lang = $this->model->get_language( (int) $_GET['lang'] ); + } elseif ( ! empty( $action ) ) { + $this->handle_actions( $action ); + } + + // Displays the page + $modules = $this->modules; + $active_tab = $this->active_tab; + include __DIR__ . '/view-languages.php'; + } + + /** + * Enqueues scripts and styles + * + * @return void + */ + public function admin_enqueue_scripts() { + parent::admin_enqueue_scripts(); + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_enqueue_script( 'pll_settings', plugins_url( '/js/build/settings' . $suffix . '.js', POLYLANG_ROOT_FILE ), array( 'jquery', 'wp-ajax-response', 'postbox', 'jquery-ui-selectmenu', 'wp-hooks' ), POLYLANG_VERSION, true ); + wp_localize_script( 'pll_settings', 'pll_settings', array( 'dismiss_notice' => esc_html__( 'Dismiss this notice.', 'polylang' ) ) ); + + wp_enqueue_style( 'pll_selectmenu', plugins_url( '/css/build/selectmenu' . $suffix . '.css', POLYLANG_ROOT_FILE ), array(), POLYLANG_VERSION ); + } + + /** + * Displays a notice when there are objects with no language assigned + * + * @since 1.8 + * + * @return void + */ + public function notice_objects_with_no_lang() { + if ( ! empty( $this->options['default_lang'] ) && $this->model->get_objects_with_no_lang( 1 ) ) { + printf( + '

    %s %s

    ', + esc_html__( 'There are posts, pages, categories or tags without language.', 'polylang' ), + esc_url( wp_nonce_url( '?page=mlang&pll_action=content-default-lang&noheader=true', 'content-default-lang' ) ), + esc_html__( 'You can set them all to the default language.', 'polylang' ) + ); + } + } + + /** + * Redirects to language page ( current active tab ) + * saves error messages in a transient for reuse in redirected page + * + * @since 1.5 + * + * @param array $args query arguments to add to the url + * @return void + * + * @phpstan-return never + */ + public static function redirect( array $args = array() ): void { + $errors = get_settings_errors( 'polylang' ); + if ( ! empty( $errors ) ) { + set_transient( 'settings_errors', $errors, 30 ); + $args['settings-updated'] = 1; + } + // Remove all known query args from the referer before redirecting. + $to_remove = array( 'lang', 'module', 'pll_action', 'noheader', '_wpnonce' ); + wp_safe_redirect( add_query_arg( $args, remove_query_arg( $to_remove, wp_get_referer() ) ) ); + exit; + } + + /** + * Get the list of predefined languages + * + * @since 2.3 + * + * @return string[][] { + * An array of array of language properties. + * + * @type string[] { + * @type string $code ISO 639-1 language code. + * @type string $locale WordPress locale. + * @type string $name Native language name. + * @type string $dir Text direction: 'ltr' or 'rtl'. + * @type string $flag Flag code, generally the country code. + * @type string $w3c W3C locale. + * @type string $facebook Facebook locale. + * } + * } + */ + public static function get_predefined_languages() { + require_once ABSPATH . 'wp-admin/includes/translation-install.php'; + + $languages = include __DIR__ . '/languages.php'; + $translations = wp_get_available_translations(); + + // Keep only languages with existing WP language pack + // Unless the transient has expired and we don't have an internet connection to refresh it + if ( ! empty( $translations ) ) { + $translations['en_US'] = ''; // Languages packs don't include en_US + $languages = array_intersect_key( $languages, $translations ); + } + + /** + * Filters the list of predefined languages. + * + * @see src/settings/languages.php the list of predefined languages. + * + * @since 1.7.10 + * @since 2.3 The languages arrays use associative keys instead of numerical keys. + * + * @param array $languages + */ + $languages = apply_filters( 'pll_predefined_languages', $languages ); + + // Keep only languages with all necessary information + foreach ( $languages as $k => $lang ) { + if ( ! isset( $lang['code'], $lang['locale'], $lang['name'], $lang['dir'], $lang['flag'] ) ) { + unset( $languages[ $k ] ); + } + } + + return $languages; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-languages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-languages.php new file mode 100644 index 0000000..c27b5b9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-languages.php @@ -0,0 +1,277 @@ + 'Languages', // Do not translate ( used for css class ) + 'ajax' => false, + ) + ); + } + + /** + * Generates content for a single row of the table. + * + * @since 1.8 + * + * @param PLL_Language $item The language item. + * @return void + */ + public function single_row( $item ) { + /** + * Filter the list of classes assigned a row in the languages list table + * + * @since 1.8 + * + * @param array $classes The list of class names. + * @param PLL_Language $item The language item. + */ + $classes = apply_filters( 'pll_languages_row_classes', array(), $item ); + echo '' : ' class="' . esc_attr( implode( ' ', $classes ) ) . '">' ); + $this->single_row_columns( $item ); + echo ''; + } + + /** + * Displays the item information in a column ( default case ). + * + * @since 0.1 + * + * @param PLL_Language $item The language item. + * @param string $column_name The column name. + * @return string|int + */ + public function column_default( $item, $column_name ) { + switch ( $column_name ) { + case 'locale': + case 'slug': + return esc_html( $item->$column_name ); + + case 'term_group': + return (int) $item->$column_name; + + case 'count': + return $item->get_tax_prop( 'language', $column_name ); + + default: + return $item->$column_name; // Flag. + } + } + + /** + * Displays the item information in the column 'name' + * Displays the edit and delete action links + * + * @since 0.1 + * + * @param PLL_Language $item The language item. + * @return string + */ + public function column_name( $item ) { + return sprintf( + '%s', + esc_attr__( 'Edit this language', 'polylang' ), + esc_url( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $item->term_id ) ), + esc_html( $item->name ) + ); + } + + /** + * Displays the item information in the default language + * Displays the 'make default' action link + * + * @since 1.8 + * + * @param PLL_Language $item The language item. + * @return string + */ + public function column_default_lang( $item ) { + if ( ! $item->is_default ) { + $s = sprintf( + '
    + %3$s +
    ', + esc_attr__( 'Select as default language', 'polylang' ), + wp_nonce_url( '?page=mlang&pll_action=default-lang&noheader=true&lang=' . $item->term_id, 'default-lang' ), + /* translators: accessibility text, %s is a native language name */ + esc_html( sprintf( __( 'Choose %s as default language', 'polylang' ), $item->name ) ) + ); + + /** + * Filters the default language row action in the languages list table. + * + * @since 1.8 + * + * @param string $s The html markup of the action. + * @param PLL_Language $item The language item. + */ + $s = apply_filters( 'pll_default_lang_row_action', $s, $item ); + } else { + $s = sprintf( + '%1$s', + /* translators: accessibility text */ + esc_html__( 'Default language', 'polylang' ) + ); + } + + return $s; + } + + /** + * Gets the list of columns + * + * @since 0.1 + * + * @return string[] The list of column titles. + */ + public function get_columns() { + return array( + 'name' => esc_html__( 'Full name', 'polylang' ), + 'locale' => esc_html__( 'Locale', 'polylang' ), + 'slug' => esc_html__( 'Code', 'polylang' ), + 'default_lang' => sprintf( '%2$s', esc_attr__( 'Default language', 'polylang' ), esc_html__( 'Default language', 'polylang' ) ), + 'term_group' => esc_html__( 'Order', 'polylang' ), + 'flag' => esc_html__( 'Flag', 'polylang' ), + 'count' => esc_html__( 'Posts', 'polylang' ), + ); + } + + /** + * Gets the list of sortable columns + * + * @since 0.1 + * + * @return array + */ + public function get_sortable_columns() { + return array( + 'name' => array( 'name', true ), // sorted by name by default + 'locale' => array( 'locale', false ), + 'slug' => array( 'slug', false ), + 'term_group' => array( 'term_group', false ), + 'count' => array( 'count', false ), + ); + } + + /** + * Gets the name of the default primary column. + * + * @since 2.1 + * + * @return string Name of the default primary column, in this case, 'name'. + */ + protected function get_default_primary_column_name() { + return 'name'; + } + + /** + * Generates and display row actions links for the list table. + * + * @since 1.8 + * + * @param PLL_Language $item The language item being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string The row actions output. + */ + protected function handle_row_actions( $item, $column_name, $primary ) { + if ( $primary !== $column_name ) { + return ''; + } + + $actions = array( + 'edit' => sprintf( + '%s', + esc_attr__( 'Edit this language', 'polylang' ), + esc_url( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $item->term_id ) ), + esc_html__( 'Edit', 'polylang' ) + ), + 'delete' => sprintf( + '%s', + esc_attr__( 'Delete this language and all its associated data', 'polylang' ), + wp_nonce_url( '?page=mlang&pll_action=delete&noheader=true&lang=' . $item->term_id, 'delete-lang' ), + esc_js( __( 'You are about to permanently delete this language. Are you sure?', 'polylang' ) ), + esc_html__( 'Delete', 'polylang' ) + ), + ); + + /** + * Filters the list of row actions in the languages list table. + * + * @since 1.8 + * + * @param array $actions A list of html markup actions. + * @param PLL_Language $item The language item. + */ + $actions = apply_filters( 'pll_languages_row_actions', $actions, $item ); + + return $this->row_actions( $actions ); + } + + /** + * Sorts language items. + * + * @since 0.1 + * + * @param PLL_Language $a The first language to compare. + * @param PLL_Language $b The second language to compare. + * @return int -1 or 1 if $a is considered to be respectively less than or greater than $b. + */ + protected function usort_reorder( $a, $b ) { + $orderby = ! empty( $_GET['orderby'] ) ? sanitize_key( $_GET['orderby'] ) : 'name'; // phpcs:ignore WordPress.Security.NonceVerification + // Determine sort order + if ( is_numeric( $a->$orderby ) ) { + $result = $a->$orderby > $b->$orderby ? 1 : -1; + } else { + $result = strcmp( $a->$orderby, $b->$orderby ); + } + // Send final sort direction to usort. + return ( empty( $_GET['order'] ) || 'asc' === $_GET['order'] ) ? $result : -$result; // phpcs:ignore WordPress.Security.NonceVerification + } + + /** + * Prepares the list of languages for display. + * + * @since 0.1 + * + * @param PLL_Language[] $data The list of languages. + * @return void + */ + public function prepare_items( $data = array() ) { + $per_page = $this->get_items_per_page( 'pll_lang_per_page' ); + $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() ); + + usort( $data, array( $this, 'usort_reorder' ) ); + + $total_items = count( $data ); + $this->items = array_slice( $data, ( $this->get_pagenum() - 1 ) * $per_page, $per_page ); + + $this->set_pagination_args( + array( + 'total_items' => $total_items, + 'per_page' => $per_page, + 'total_pages' => (int) ceil( $total_items / $per_page ), + ) + ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-settings.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-settings.php new file mode 100644 index 0000000..e11a89e --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-settings.php @@ -0,0 +1,194 @@ + 'Settings', // Do not translate ( used for css class ) + 'ajax' => false, + ) + ); + } + + /** + * Get the table classes for styling + * + * @since 1.8 + */ + protected function get_table_classes() { + return array( 'wp-list-table', 'widefat', 'plugins', 'pll-settings' ); // get the style of the plugins list table + one specific class + } + + /** + * Displays a single row. + * + * @since 1.8 + * + * @param PLL_Settings_Module $item Settings module item. + * @return void + */ + public function single_row( $item ) { + // Classes to reuse css from the plugins list table + $classes = $item->is_active() ? 'active' : 'inactive'; + if ( $message = $item->get_upgrade_message() ) { + $classes .= ' update'; + } + + // Display the columns + printf( '', esc_attr( $item->module ), esc_attr( $classes ) ); + $this->single_row_columns( $item ); + echo ''; + + // Display an upgrade message if there is any, reusing css from the plugins updates + if ( $message = $item->get_upgrade_message() ) { + printf( + ' + %s + ', + sprintf( '

    %s

    ', $message ) // phpcs:ignore WordPress.Security.EscapeOutput + ); + } + + // The settings if there are + // "inactive" class to reuse css from the plugins list table + if ( $form = $item->get_form() ) { + printf( + ' + + %s + %s +

    + %s +

    + + ', + esc_attr( $item->module ), + esc_html( $item->title ), + $form, // phpcs:ignore + implode( $item->get_buttons() ) // phpcs:ignore + ); + } + } + + /** + * Generates the columns for a single row of the table. + * + * @since 1.8 + * + * @param PLL_Settings_Module $item Settings module item. + * @return void + */ + protected function single_row_columns( $item ) { + $column_info = $this->get_column_info(); + $columns = $column_info[0]; + $primary = $column_info[3]; + + foreach ( array_keys( $columns ) as $column_name ) { + $classes = "$column_name column-$column_name"; + if ( $primary === $column_name ) { + $classes .= ' column-primary'; + } + + if ( 'cb' == $column_name ) { + echo ''; + echo $this->column_cb( $item ); // phpcs:ignore WordPress.Security.EscapeOutput + echo ''; + } else { + printf( '', esc_attr( $classes ) ); + echo $this->column_default( $item, $column_name ); // phpcs:ignore WordPress.Security.EscapeOutput + echo ''; + } + } + } + + /** + * Displays the item information in a column (default case). + * + * @since 1.8 + * + * @param PLL_Settings_Module $item Settings module item. + * @param string $column_name Column name. + * @return string The column name. + */ + protected function column_default( $item, $column_name ) { + if ( 'plugin-title' == $column_name ) { + return sprintf( '%s', esc_html( $item->title ) ) . $this->row_actions( $item->get_action_links(), true /*always visible*/ ); + } + return $item->$column_name; + } + + /** + * Gets the list of columns. + * + * @since 1.8 + * + * @return string[] The list of column titles. + */ + public function get_columns() { + return array( + 'cb' => '', // For the 4px border inherited from plugins when the module is activated + 'plugin-title' => esc_html__( 'Module', 'polylang' ), // plugin-title for styling + 'description' => esc_html__( 'Description', 'polylang' ), + ); + } + + /** + * Gets the name of the primary column. + * + * @since 1.8 + * + * @return string The name of the primary column. + */ + protected function get_primary_column_name() { + return 'plugin-title'; + } + + /** + * Prepares the list of items for displaying + * + * @since 1.8 + * + * @param PLL_Settings_Module[] $items Array of settings module items. + * @return void + */ + public function prepare_items( $items = array() ) { + $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns(), $this->get_primary_column_name() ); + + // Sort rows, lowest priority on top. + usort( + $items, + function ( $a, $b ) { + return $a->priority > $b->priority ? 1 : -1; + } + ); + $this->items = $items; + } + + /** + * Avoids displaying an empty tablenav + * + * @since 2.1 + * + * @param string $which 'top' or 'bottom' + * @return void + */ + protected function display_tablenav( $which ) {} // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-string.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-string.php new file mode 100644 index 0000000..d8d568f --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/table-string.php @@ -0,0 +1,473 @@ + 'Strings translations', // Do not translate ( used for css class ) + 'ajax' => false, + ) + ); + + $this->languages = $languages; + $this->strings = PLL_Admin_Strings::get_strings(); + $this->groups = array_unique( wp_list_pluck( $this->strings, 'context' ) ); + + $this->selected_group = -1; + + if ( ! empty( $_GET['group'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $group = sanitize_text_field( wp_unslash( $_GET['group'] ) ); // phpcs:ignore WordPress.Security.NonceVerification + if ( in_array( $group, $this->groups ) ) { + $this->selected_group = $group; + } + } + + add_action( 'mlang_action_string-translation', array( $this, 'save_translations' ) ); + } + + /** + * Displays the item information in a column (default case). + * + * @since 0.6 + * + * @param array $item Data related to the current string. + * @param string $column_name The current column name. + * @return string + */ + public function column_default( $item, $column_name ) { + return $item[ $column_name ]; + } + + /** + * Displays the checkbox in first column. + * + * @since 1.1 + * + * @param array $item Data related to the current string. + * @return string + */ + public function column_cb( $item ) { + return sprintf( + '', + esc_attr( $item['row'] ), + /* translators: accessibility text, %s is a string potentially in any language */ + sprintf( __( 'Select %s', 'polylang' ), format_to_edit( $item['string'] ) ), + disabled( empty( $item['icl'] ), true, false ) // Only strings registered with WPML API can be removed. + ); + } + + /** + * Displays the string to translate. + * + * @since 1.0 + * + * @param array $item Data related to the current string. + * @return string + */ + public function column_string( $item ) { + return format_to_edit( $item['string'] ); // Don't interpret special chars for the string column. + } + + /** + * Displays the translations to edit. + * + * @since 0.6 + * + * @param array $item Data related to the current string. + * @return string + */ + public function column_translations( $item ) { + $out = ''; + $languages = array(); + + foreach ( $this->languages->get_list() as $language ) { + $languages[ $language->slug ] = $language->name; + } + + foreach ( $item['translations'] as $key => $translation ) { + $input_type = $item['multiline'] ? + '' : + ''; + + $out .= sprintf( + '
    ' . $input_type . "
    \n", + esc_attr( $key ), + esc_attr( $item['row'] ), + esc_html( $languages[ $key ] ), + format_to_edit( $translation ), // Don't interpret special chars. + $item['disabled'][ $key ] + ); + } + + return $out; + } + + /** + * Gets the list of columns. + * + * @since 0.6 + * + * @return string[] The list of column titles. + */ + public function get_columns() { + return array( + 'cb' => '', // Checkbox. + 'string' => esc_html__( 'String', 'polylang' ), + 'name' => esc_html__( 'Name', 'polylang' ), + 'context' => esc_html__( 'Group', 'polylang' ), + 'translations' => esc_html__( 'Translations', 'polylang' ), + ); + } + + /** + * Gets the list of sortable columns + * + * @since 0.6 + * + * @return array + */ + public function get_sortable_columns() { + return array( + 'string' => array( 'string', false ), + 'name' => array( 'name', false ), + 'context' => array( 'context', false ), + ); + } + + /** + * Gets the name of the default primary column. + * + * @since 2.1 + * + * @return string Name of the default primary column, in this case, 'string'. + */ + protected function get_default_primary_column_name() { + return 'string'; + } + + /** + * Search for a string in translations. Case insensitive. + * + * @since 2.6 + * + * @param PLL_Language[] $languages An array of language objects. + * @param string $s Searched string. + * @return string[] Found strings. + */ + protected function search_in_translations( $languages, $s ) { + $founds = array(); + + foreach ( $languages as $language ) { + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + foreach ( wp_list_pluck( $mo->entries, 'translations' ) as $string => $translation ) { + if ( false !== stripos( $translation[0], $s ) ) { + $founds[] = $string; + } + } + } + + return array_unique( $founds ); + } + + /** + * Sorts registered string items. + * + * @since 0.6 + * + * @param array $a The first item to compare. + * @param array $b The second item to compare. + * @return int -1 or 1 if $a is considered to be respectively less than or greater than $b. + */ + protected function usort_reorder( $a, $b ) { + if ( ! empty( $_GET['orderby'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + $orderby = sanitize_key( $_GET['orderby'] ); // phpcs:ignore WordPress.Security.NonceVerification + if ( isset( $a[ $orderby ], $b[ $orderby ] ) ) { + $result = strcmp( $a[ $orderby ], $b[ $orderby ] ); // Determine sort order + return ( empty( $_GET['order'] ) || 'asc' === $_GET['order'] ) ? $result : -$result; // phpcs:ignore WordPress.Security.NonceVerification + } + } + + return 0; + } + + /** + * Prepares the list of registered strings for display. + * + * @since 0.6 + * + * @return void + */ + public function prepare_items() { + $languages = $this->languages->get_list(); + + // Is admin language filter active? + $filter = get_user_meta( get_current_user_id(), 'pll_filter_content', true ); + if ( $filter ) { + $languages = wp_list_filter( $languages, array( 'slug' => $filter ) ); + } + + $data = $this->strings; + + // Filter by selected group. + if ( -1 !== $this->selected_group ) { + $data = wp_list_filter( $data, array( 'context' => $this->selected_group ) ); + } + + // Filter by searched string. + $s = empty( $_GET['s'] ) ? '' : wp_unslash( $_GET['s'] ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput + + if ( ! empty( $s ) ) { + // Search in translations. + $in_translations = $this->search_in_translations( $languages, $s ); + + foreach ( $data as $key => $row ) { + if ( stripos( $row['name'], $s ) === false && stripos( $row['string'], $s ) === false && ! in_array( $row['string'], $in_translations ) ) { + unset( $data[ $key ] ); + } + } + } + + // Sorting. + uasort( $data, array( $this, 'usort_reorder' ) ); + + // Paging. + $per_page = $this->get_items_per_page( 'pll_strings_per_page' ); + $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() ); + + $total_items = count( $data ); + $this->items = array_slice( $data, ( $this->get_pagenum() - 1 ) * $per_page, $per_page, true ); + + $this->set_pagination_args( + array( + 'total_items' => $total_items, + 'per_page' => $per_page, + 'total_pages' => (int) ceil( $total_items / $per_page ), + ) + ); + + $allowed_language_slugs = $this->languages->filter( 'translator' )->get_list( array( 'fields' => 'slug' ) ); + + /* + * Translate strings. + * Kept for the end as it is a slow process. + */ + foreach ( $languages as $language ) { + $disabled = disabled( in_array( $language->slug, $allowed_language_slugs, true ), false, false ); + + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + foreach ( $this->items as $key => $row ) { + $this->items[ $key ]['translations'][ $language->slug ] = $mo->translate_if_any( $row['string'] ); + $this->items[ $key ]['row'] = $key; // Store the row number for convenience. + $this->items[ $key ]['disabled'][ $language->slug ] = $disabled; + } + } + } + + /** + * Get the list of possible bulk actions. + * + * @since 1.1 + * + * @return string[] Array of bulk actions. + */ + public function get_bulk_actions() { + if ( current_user_can( 'manage_options' ) ) { + return array( 'delete' => __( 'Delete', 'polylang' ) ); + } + return array(); + } + + /** + * Get the current action selected from the bulk actions dropdown. + * overrides parent function to avoid submit button to trigger bulk actions + * + * @since 1.8 + * + * @return string|false The action name or False if no action was selected + */ + public function current_action() { + return empty( $_POST['submit'] ) ? parent::current_action() : false; // phpcs:ignore WordPress.Security.NonceVerification + } + + /** + * Displays the dropdown list to filter strings per group + * + * @since 1.1 + * + * @param string $which only 'top' is supported + * @return void + */ + public function extra_tablenav( $which ) { + if ( 'top' !== $which ) { + return; + } + + echo '
    '; + printf( + '', + /* translators: accessibility text */ + esc_html__( 'Filter by group', 'polylang' ) + ); + echo '' . "\n"; + + submit_button( __( 'Filter', 'polylang' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + echo '
    '; + } + + /** + * Saves the strings translations in DB + * Optionally clean the DB + * + * @since 1.9 + * + * @return void + * + * @phpstan-return never + */ + public function save_translations() { + check_admin_referer( 'string-translation', '_wpnonce_string-translation' ); + + if ( ! empty( $_POST['submit'] ) ) { + foreach ( $this->languages->filter( 'translator' )->get_list() as $language ) { + if ( empty( $_POST['translation'][ $language->slug ] ) || ! is_array( $_POST['translation'][ $language->slug ] ) ) { // In case the language filter is active ( thanks to John P. Bloch ) + continue; + } + + $translations = array_map( 'trim', (array) wp_unslash( $_POST['translation'][ $language->slug ] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + + foreach ( $translations as $key => $translation ) { + /** + * Filters the string translation before it is saved in DB. + * Allows to sanitize strings registered with pll_register_string(). + * + * @since 1.6 + * @since 2.7 The translation passed to the filter is unslashed. + * @since 3.7 Add original string as 4th parameter. + * @since 3.8 Add previous string translation as 5th parameter. + * + * @param string $translation The string translation. + * @param string $name The name as defined in pll_register_string. + * @param string $context The context as defined in pll_register_string. + * @param string $original The original string to translate. + * @param string $previous The previous string translation. + */ + $translation = apply_filters( 'pll_sanitize_string_translation', $translation, $this->strings[ $key ]['name'], $this->strings[ $key ]['context'], $this->strings[ $key ]['string'], $mo->translate_if_any( $this->strings[ $key ]['string'] ) ); + $mo->add_entry( + $mo->make_entry( + $this->strings[ $key ]['string'], + $translation + ) + ); + } + + // Clean database (removes all strings which were registered some day but are no more). + if ( ! empty( $_POST['clean'] ) && current_user_can( 'manage_options' ) ) { + $new_mo = new PLL_MO(); + + foreach ( $this->strings as $string ) { + $new_mo->add_entry( $mo->make_entry( $string['string'], $mo->translate( $string['string'] ) ) ); + } + } + + isset( $new_mo ) ? $new_mo->export_to_db( $language ) : $mo->export_to_db( $language ); + } + + pll_add_notice( new WP_Error( 'pll_strings_translations_updated', __( 'Translations updated.', 'polylang' ), 'success' ) ); + + /** + * Fires after the strings translations are saved in DB + * + * @since 1.2 + */ + do_action( 'pll_save_strings_translations' ); + } + + // Unregisters strings registered through WPML API + if ( $this->current_action() === 'delete' && ! empty( $_POST['strings'] ) && function_exists( 'icl_unregister_string' ) && current_user_can( 'manage_options' ) ) { + foreach ( array_map( 'sanitize_key', $_POST['strings'] ) as $key ) { + icl_unregister_string( $this->strings[ $key ]['context'], $this->strings[ $key ]['name'] ); + } + } + + // To refresh the page ( possible thanks to the $_GET['noheader']=true ) + $args = array_intersect_key( $_REQUEST, array_flip( array( 's', 'paged', 'group' ) ) ); + if ( ! empty( $_GET['paged'] ) && ! empty( $_POST['submit'] ) ) { + $args['paged'] = (int) $_GET['paged']; // Don't rely on $_REQUEST['paged'] or $_POST['paged']. See #14 + } + if ( ! empty( $args['s'] ) ) { + $args['s'] = urlencode( $args['s'] ); // Searched string needs to be encoded as it comes from $_POST + } + PLL_Settings::redirect( $args ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-about.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-about.php new file mode 100644 index 0000000..0772d57 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-about.php @@ -0,0 +1,29 @@ + +

    + ', + '' + ); + if ( ! defined( 'POLYLANG_PRO' ) ) { + echo ' '; + printf( + /* translators: %1$s is link start tag, %2$s is link end tag. */ + esc_html__( 'Support and extra features are available to %1$sPolylang Pro%2$s users.', 'polylang' ), + '', + '' + ); + } + ?> +

    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-languages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-languages.php new file mode 100644 index 0000000..1317fd2 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-languages.php @@ -0,0 +1,35 @@ + +
    +

    + +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-lang.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-lang.php new file mode 100644 index 0000000..bcfd61a --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-lang.php @@ -0,0 +1,178 @@ + +
    +
    +
    + display(); + ?> +
    + +
    +
    +
    + +
    +
    + +
    +

    + +
    + + + + + + +
    + + +

    +
    + +
    + + ', + ! empty( $edit_lang ) ? esc_attr( $edit_lang->name ) : '' + ); + ?> +

    +
    + +
    + + ', + ! empty( $edit_lang ) ? esc_attr( $edit_lang->locale ) : '' + ); + ?> +

    +
    + +
    + + ', + ! empty( $edit_lang ) ? esc_attr( $edit_lang->slug ) : '' + ); + ?> +

    +
    + +
    + + %s', + checked( ! empty( $edit_lang ) && $edit_lang->is_rtl, false, false ), + esc_html__( 'left to right', 'polylang' ) + ); + printf( + '', + checked( ! empty( $edit_lang ) && $edit_lang->is_rtl, true, false ), + esc_html__( 'right to left', 'polylang' ) + ); + ?> +

    +
    + +
    + + +

    +
    + +
    + + ', + ! empty( $edit_lang ) ? esc_attr( $edit_lang->term_group ) : '' + ); + ?> +

    +
    + +
    +
    +
    +
    +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-settings.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-settings.php new file mode 100644 index 0000000..cc36cc0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-settings.php @@ -0,0 +1,19 @@ + +
    + prepare_items( $modules ); + $list_table->display(); + ?> +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-strings.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-strings.php new file mode 100644 index 0000000..0a1f205 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/settings/view-tab-strings.php @@ -0,0 +1,37 @@ + +
    +
    + + search_box( __( 'Search translations', 'polylang' ), 'translations' ); + wp_nonce_field( 'string-translation', '_wpnonce_string-translation' ); + $string_table->display(); + + if ( current_user_can( 'manage_options' ) ) { + printf( '
    ', esc_html__( 'Clean strings translation database', 'polylang' ) ); + ?> +

    + +
    +
    + +
    + +
    diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/static-pages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/static-pages.php new file mode 100644 index 0000000..4beebb1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/static-pages.php @@ -0,0 +1,230 @@ +model = &$polylang->model; + $this->curlang = &$polylang->curlang; + + $this->init(); + + add_filter( 'pll_additional_language_data', array( $this, 'set_static_pages' ), 5, 2 ); // Before PLL_Links_Model. + + // Clean the languages cache when editing page of front, page for posts. + add_action( 'update_option_show_on_front', array( $this, 'clean_cache' ) ); + add_action( 'update_option_page_on_front', array( $this, 'clean_cache' ) ); + add_action( 'update_option_page_for_posts', array( $this, 'clean_cache' ) ); + + // Refresh rewrite rules when the page on front is modified. + add_action( 'update_option_page_on_front', 'flush_rewrite_rules' ); + + // Add option filters when the current language is defined + add_action( 'pll_language_defined', array( $this, 'pll_language_defined' ) ); + + // Modifies the page link in case the front page is not in the default language. + add_filter( 'page_link', array( $this, 'page_link' ), 20, 2 ); + + // OEmbed. + add_filter( 'oembed_request_post_id', array( $this, 'oembed_request_post_id' ), 10, 2 ); + } + + /** + * Stores the page on front and page for posts ids. + * + * @since 1.8 + * + * @return void + */ + public function init() { + $this->page_on_front = 0; + $this->page_for_posts = 0; + + if ( 'page' !== get_option( 'show_on_front' ) ) { + return; + } + + $page_on_front = get_option( 'page_on_front' ); + if ( is_numeric( $page_on_front ) ) { + $this->page_on_front = (int) $page_on_front; + } + + $page_for_posts = get_option( 'page_for_posts' ); + if ( is_numeric( $page_for_posts ) ) { + $this->page_for_posts = (int) $page_for_posts; + } + } + + /** + * Returns the ID of the static page translation. + * + * @since 3.4 + * + * @param string $static_page Static page option name; `page_on_front` or `page_for_posts`. + * @param array $language Language data. + * @return int + */ + protected function get_translation( $static_page, $language ) { + $translations = $this->model->post->get_raw_translations( $this->$static_page ); + + // When the current static page doesn't have any translation, we must return itself for its language. + if ( empty( $translations ) ) { + $page_lang = $this->model->post->get_object_term( $this->$static_page, $this->model->post->get_tax_language() ); + + if ( ! empty( $page_lang ) && $page_lang->slug === $language['slug'] ) { + return $this->$static_page; + } + } + + if ( ! isset( $translations[ $language['slug'] ] ) ) { + return 0; + } + + return $translations[ $language['slug'] ]; + } + + /** + * Adds `page_on_front` and `page_for_posts` properties to language data before the object is created. + * + * @since 3.4 + * + * @param array $additional_data Array of language additional data. + * @param array $language Language data. + * @return array Language data with additional `page_on_front` and `page_for_posts` options added. + */ + public function set_static_pages( $additional_data, $language ) { + $additional_data['page_on_front'] = $this->get_translation( 'page_on_front', $language ); + $additional_data['page_for_posts'] = $this->get_translation( 'page_for_posts', $language ); + + return $additional_data; + } + + /** + * Cleans the language cache and resets the internal properties when options are updated. + * + * @since 3.4 + * + * @return void + */ + public function clean_cache() { + $this->model->clean_languages_cache(); + $this->init(); + } + + /** + * Init the hooks that filter the "page on front" and "page for posts" options. + * + * @since 3.3 + * + * @return void + */ + public function pll_language_defined() { + // Translates page for posts and page on front. + add_filter( 'option_page_on_front', array( $this, 'translate_page_id' ), 10, 2 ); + add_filter( 'option_page_for_posts', array( $this, 'translate_page_id' ), 10, 2 ); + } + + /** + * Translates the page on front or page for posts option. + * + * @since 3.6 Replaces `translate_page_on_front()` and `translate_page_for_posts()` methods. + * + * @param int $page_id ID of the page on front or page for posts. + * @param string $option Option name: `page_on_front` or `page_for_posts`. + * @return int + */ + public function translate_page_id( $page_id, $option ) { + + if ( empty( $this->curlang->{$option} ) ) { + return $page_id; + } + + if ( doing_action( "update_option_{$option}" ) || doing_action( 'switch_blog' ) || doing_action( 'before_delete_post' ) || doing_action( 'wp_trash_post' ) ) { + /* + * Don't attempt to translate in a 'switch_blog' action as there is a risk to call this function while initializing the languages cache. + * Don't translate while deleting a post or it will mess up `_reset_front_page_settings_for_post()`. + * Don't translate while updating the option itself. + */ + return $page_id; + } + + return $this->curlang->{$option}; + } + + /** + * Modifies the page link in case the front page is not in the default language. + * + * @since 0.7.2 + * + * @param string $link The link to the page. + * @param int $id The post ID of the page. + * @return string Modified link. + */ + public function page_link( $link, $id ) { + $lang = $this->model->post->get_language( $id ); + + if ( $lang && $id == $lang->page_on_front ) { + return $lang->get_home_url(); + } + return $link; + } + + /** + * Fixes the oembed for the translated static front page + * when the language page is redirected to the front page. + * + * @since 2.6 + * + * @param int $post_id The post ID. + * @param string $url The requested URL. + * @return int + */ + public function oembed_request_post_id( $post_id, $url ) { + foreach ( $this->model->get_languages_list() as $lang ) { + if ( is_string( $lang->get_home_url() ) && trailingslashit( $url ) === trailingslashit( $lang->get_home_url() ) ) { + return (int) $lang->page_on_front; + } + } + + return $post_id; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/switcher.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/switcher.php new file mode 100644 index 0000000..96729a1 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/switcher.php @@ -0,0 +1,295 @@ + 0, // Display as list and not as dropdown. + 'echo' => 1, // Echoes the list. + 'hide_if_empty' => 1, // Hides languages with no posts (or pages). + 'show_flags' => 0, // Don't show flags. + 'show_names' => 1, // Show language names. + 'display_names_as' => 'name', // Display the language name. + 'force_home' => 0, // Tries to find a translation. + 'hide_if_no_translation' => 0, // Don't hide the link if there is no translation. + 'hide_current' => 0, // Don't hide the current language. + 'post_id' => null, // Link to the translations of the current page. + 'raw' => 0, // Build the language switcher. + 'item_spacing' => 'preserve', // Preserve whitespace between list items. + 'admin_render' => 0, // Make the switcher in a frontend context. + 'admin_current_lang' => null, // Use the global current language. + ); + + /** + * @var PLL_Links|null + */ + protected $links; + + /** + * Returns options available for the language switcher - menu or widget + * either strings to display the options or default values + * + * @since 0.7 + * + * @param string $type optional either 'menu', 'widget' or 'block', defaults to 'widget' + * @param string $key optional either 'string' or 'default', defaults to 'string' + * @return array list of switcher options strings or default values + */ + public static function get_switcher_options( $type = 'widget', $key = 'string' ) { + $options = array( + 'dropdown' => array( 'string' => __( 'Displays as a dropdown', 'polylang' ), 'default' => 0 ), + 'show_names' => array( 'string' => __( 'Displays language names', 'polylang' ), 'default' => 1 ), + 'show_flags' => array( 'string' => __( 'Displays flags', 'polylang' ), 'default' => 0 ), + 'force_home' => array( 'string' => __( 'Forces link to front page', 'polylang' ), 'default' => 0 ), + 'hide_current' => array( 'string' => __( 'Hides the current language', 'polylang' ), 'default' => 0 ), + 'hide_if_no_translation' => array( 'string' => __( 'Hides languages with no translation', 'polylang' ), 'default' => 0 ), + ); + return wp_list_pluck( $options, $key ); + } + + /** + * Returns the current language code. + * + * @since 3.0 + * + * @param array $args Arguments passed to {@see PLL_Switcher::the_languages()}. + * @return string + */ + protected function get_current_language( $args ) { + if ( $args['admin_current_lang'] ) { + return $args['admin_current_lang']; + } + + if ( isset( $this->links->curlang ) ) { + return $this->links->curlang->slug; + } + + return $this->links->options['default_lang']; + } + + /** + * Returns the link for a given language. + * + * @since 3.0 + * + * @param PLL_Language $language Language. + * @param array $args Arguments passed to {@see PLL_Switcher::the_languages()}. + * @return string|null + */ + protected function get_link( $language, $args ) { + global $post; + + // Priority to the post passed in parameters. + if ( null !== $args['post_id'] ) { + $tr_id = $this->links->model->post->get( $args['post_id'], $language ); + if ( $tr_id && $this->links->model->post->current_user_can_read( $tr_id ) ) { + return get_permalink( $tr_id ); + } + } + + // If we are on frontend. + if ( $this->links instanceof PLL_Frontend_Links ) { + return $this->links->get_translation_url( $language ); + } + + // For blocks in posts in REST requests. + if ( $post instanceof WP_Post ) { + $tr_id = $this->links->model->post->get( $post->ID, $language ); + if ( $tr_id && $this->links->model->post->current_user_can_read( $tr_id ) ) { + return get_permalink( $tr_id ); + } + } + + return null; + } + + /** + * Get the language elements for use in a walker + * + * @since 1.2 + * + * @param array $args Arguments passed to {@see PLL_Switcher::the_languages()}. + * @return array Language switcher elements. + */ + protected function get_elements( $args ) { + $first = true; + $out = array(); + + $filter = $args['hide_if_empty'] ? 'hide_empty' : ''; + foreach ( $this->links->model->languages->filter( $filter )->get_list() as $language ) { + $id = (int) $language->term_id; + $order = (int) $language->term_group; + $slug = $language->slug; + $locale = $language->get_locale( 'display' ); + $is_rtl = $language->is_rtl; + $item_classes = array( 'lang-item', 'lang-item-' . $id, 'lang-item-' . esc_attr( $slug ) ); + $classes = isset( $args['classes'] ) && is_array( $args['classes'] ) ? + array_merge( + $item_classes, + $args['classes'] + ) : + $item_classes; + $link_classes = $args['link_classes'] ?? array(); + $current_lang = $this->get_current_language( $args ) === $slug; + + if ( $current_lang ) { + if ( $args['hide_current'] && ! ( $args['dropdown'] && ! $args['raw'] ) ) { + continue; // Hide current language except for dropdown + } else { + $classes[] = 'current-lang'; + } + } + + $url = $this->get_link( $language, $args ); + + if ( $no_translation = empty( $url ) ) { + $classes[] = 'no-translation'; + } + + /** + * Filter the link in the language switcher + * + * @since 0.7 + * + * @param string|null $url The link, null if no translation was found. + * @param string $slug The language code. + * @param string $locale The language locale + */ + $url = apply_filters( 'pll_the_language_link', $url, $slug, $language->locale ); + + // Hide if no translation exists + if ( empty( $url ) && $args['hide_if_no_translation'] ) { + continue; + } + + $url = empty( $url ) || $args['force_home'] ? $this->links->get_home_url( $language ) : $url; // If the page is not translated, link to the home page + + $name = $args['show_names'] || ! $args['show_flags'] || $args['raw'] ? ( 'slug' == $args['display_names_as'] ? $slug : $language->name ) : ''; + + if ( $args['raw'] && ! $args['show_flags'] ) { + $flag = $language->get_display_flag_url(); + } elseif ( $args['show_flags'] ) { + $flag = $language->get_display_flag( empty( $args['show_names'] ) ? 'alt' : 'no-alt' ); + } else { + $flag = ''; + } + + if ( $first ) { + $classes[] = 'lang-item-first'; + $first = false; + } + + $out[ $slug ] = compact( 'id', 'order', 'slug', 'locale', 'is_rtl', 'name', 'url', 'flag', 'current_lang', 'no_translation', 'classes', 'link_classes' ); + } + + return $out; + } + + /** + * Displays a language switcher + * or returns the raw elements to build a custom language switcher. + * + * @since 0.1 + * + * @param PLL_Links $links Instance of PLL_Links. + * @param array $args { + * Optional array of arguments. + * + * @type int $dropdown The list is displayed as dropdown if set, defaults to 0. + * @type int $echo Echoes the list if set to 1, defaults to 1. + * @type int $hide_if_empty Hides languages with no posts ( or pages ) if set to 1, defaults to 1. + * @type int $show_flags Displays flags if set to 1, defaults to 0. + * @type int $show_names Shows language names if set to 1, defaults to 1. + * @type string $display_names_as Whether to display the language name or its slug, valid options are 'slug' and 'name', defaults to name. + * @type int $force_home Will always link to home in translated language if set to 1, defaults to 0. + * @type int $hide_if_no_translation Hides the link if there is no translation if set to 1, defaults to 0. + * @type int $hide_current Hides the current language if set to 1, defaults to 0. + * @type int $post_id Returns links to the translations of the post defined by post_id if set, defaults not set. + * @type int $raw Return a raw array instead of html markup if set to 1, defaults to 0. + * @type string $item_spacing Whether to preserve or discard whitespace between list items, valid options are 'preserve' and 'discard', defaults to 'preserve'. + * @type int $admin_render Allows to force the current language code in an admin context if set, default to 0. Need to set the admin_current_lang argument below. + * @type string $admin_current_lang The current language code in an admin context. Need to set the admin_render to 1, defaults not set. + * @type string[] $classes A list of CSS classes to set to each elements outputted. + * @type string[] $link_classes A list of CSS classes to set to each link outputted. + * } + * @return string|array either the html markup of the switcher or the raw elements to build a custom language switcher + */ + public function the_languages( $links, $args = array() ) { + + $this->links = $links; + $args = wp_parse_args( $args, self::DEFAULTS ); + + /** + * Filter the arguments of the 'pll_the_languages' template tag + * + * @since 1.5 + * + * @param array $args + */ + $args = apply_filters( 'pll_the_languages_args', $args ); + + // Force not to hide the language for the widget preview even if the option is checked. + if ( $this->links instanceof PLL_Admin_Links ) { + $args['hide_if_no_translation'] = 0; + } + + // Prevents showing empty options in `' . "\n" . '%5$s' . "\n" . '' . "\n", + esc_attr( $args['name'] ), + isset( $args['id'] ) && ! $args['id'] ? '' : ' id="' . ( empty( $args['id'] ) ? esc_attr( $args['name'] ) : esc_attr( $args['id'] ) ) . '"', + empty( $args['class'] ) ? '' : ' class="' . esc_attr( $args['class'] ) . '"', + disabled( empty( $args['disabled'] ), false, false ), + parent::walk( $elements, $max_depth, $args ) + ); + + return $output; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker-list.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker-list.php new file mode 100644 index 0000000..1e0e1d0 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker-list.php @@ -0,0 +1,90 @@ + 'parent', 'id' => 'id' ); + + /** + * Outputs one element + * + * @since 1.2 + * + * @param string $output Passed by reference. Used to append additional content. + * @param stdClass $element The data object. + * @param int $depth Depth of the item. + * @param array $args An array of additional arguments. + * @param int $current_object_id ID of the current item. + * @return void + */ + public function start_el( &$output, $element, $depth = 0, $args = array(), $current_object_id = 0 ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // Link attributes. + $link_atts = sprintf( + 'lang="%1$s" hreflang="%1$s" href="%2$s"', + esc_attr( $element->locale ), + esc_url( $element->url ) + ); + + if ( ! empty( $element->link_classes ) ) { + $link_atts .= sprintf( + ' class="%s"', + esc_attr( implode( ' ', $element->link_classes ) ) + ); + } + if ( ! empty( $element->current_lang ) ) { + $link_atts .= ' aria-current="true"'; + } + + // Text label. + if ( $args['show_flags'] && $args['show_names'] ) { + $label = sprintf( + '%2$s', + is_rtl() ? 'right' : 'left', + esc_html( $element->name ) + ); + } else { + $label = esc_html( $element->name ); + } + + $output .= sprintf( + '%5$s
  • %3$s%4$s
  • %6$s', + esc_attr( implode( ' ', $element->classes ) ), + $link_atts, + $element->flag, + $label, + 'discard' === $args['item_spacing'] ? '' : "\t", + 'discard' === $args['item_spacing'] ? '' : "\n" + ); + } + + /** + * Overrides Walker:walk to set depth argument + * + * @since 1.2 + * @since 2.6.7 Use $max_depth and ...$args parameters to follow the move of WP 5.3 + * + * @param array $elements An array of elements. + * @param int $max_depth The maximum hierarchical depth. + * @param mixed ...$args Additional arguments. + * @return string The hierarchical item output. + */ + public function walk( $elements, $max_depth, ...$args ) { // phpcs:ignore WordPressVIPMinimum.Classes.DeclarationCompatibility.DeclarationCompatibility + $this->maybe_fix_walk_args( $max_depth, $args ); + + return parent::walk( $elements, $max_depth, $args ); + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker.php new file mode 100644 index 0000000..7a7f43f --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/walker.php @@ -0,0 +1,78 @@ + 'parent', 'id' => 'id' ); + + /** + * Overrides Walker::display_element as it expects an object with a parent property. + * + * @since 1.2 + * @since 3.4 Refactored and moved in `PLL_Walker`. + * + * @param PLL_Language|stdClass $element Data object. `PLL_language` in our case. + * @param array $children_elements List of elements to continue traversing. + * @param int $max_depth Max depth to traverse. + * @param int $depth Depth of current element. + * @param array $args An array of arguments. + * @param string $output Passed by reference. Used to append additional content. + * @return void + */ + public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { + if ( $element instanceof PLL_Language ) { + $element = $element->to_std_class(); + + // Sets the w3c locale as the main locale. + $element->locale = $element->w3c ?? $element->locale; + } + + // Don't care about this. + $element->id = 0; + $element->parent = 0; + + parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); + } + + /** + * Sets `PLL_Walker::walk()` arguments as it should + * and triggers an error in case of misuse of them. + * + * @since 3.4 + * + * @param array|int $max_depth The maximum hierarchical depth. Passed by reference. + * @param array $args Additional arguments. Passed by reference. + * @return void + */ + protected function maybe_fix_walk_args( &$max_depth, &$args ) { + if ( ! is_array( $max_depth ) ) { + $args = $args[0] ?? array(); + return; + } + + // Backward compatibility with Polylang < 2.6.7 + _doing_it_wrong( + self::class . '::walk()', + 'The method expects an integer as second parameter.', + '2.6.7' + ); + $args = $max_depth; + $max_depth = -1; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/widget-calendar.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/widget-calendar.php new file mode 100644 index 0000000..9c3e768 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/widget-calendar.php @@ -0,0 +1,355 @@ + not very efficient (add 4 to 5 sql queries). + * Method used since 0.5: remove the WP widget and replace it by our own -> our language filter will not work if get_calendar is called directly by a theme. + * + * @since 0.5 + */ +class PLL_Widget_Calendar extends WP_Widget_Calendar { + protected static $pll_instance = 0; // Can't use $instance of WP_Widget_Calendar as it's private :/. + + /** + * Outputs the content for the current Calendar widget instance. + * Modified version of the parent function to call our own get_calendar() method. + * + * @since 0.5 + * + * @param array $args Display arguments including 'before_title', 'after_title', + * 'before_widget', and 'after_widget'. + * @param array $instance The settings for the particular instance of the widget. + */ + public function widget( $args, $instance ) { + $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; + + /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + echo $args['before_widget']; + if ( $title ) { + echo $args['before_title'] . $title . $args['after_title']; + } + if ( 0 === self::$pll_instance ) { #modified# + echo '
    '; + } else { + echo '
    '; + } + empty( PLL()->curlang ) ? get_calendar() : self::get_calendar(); #modified# + echo '
    '; + echo $args['after_widget']; + + ++self::$pll_instance; #modified# + } + + /** + * Modified version of the WP `get_calendar()` function to filter the queries. + * + * @since 0.5 + * @since 3.8 New argument $args added, with backward compatibility (WP 6.8). + * + * @param array $args { + * Optional. Arguments for the `get_calendar` function. + * + * @type bool $initial Whether to use initial calendar names. Default true. + * @type bool $display Whether to display the calendar output. Default true. + * @type string $post_type Optional. Post type. Default 'post'. + * } + * @return void|string Void if `$display` argument is true, calendar HTML if `$display` is false. + */ + static function get_calendar( $args = array() ) { + global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; + + $defaults = array( + 'initial' => true, + 'display' => true, + 'post_type' => 'post', + ); + + $original_args = func_get_args(); + $args = array(); + + if ( ! empty( $original_args ) ) { + if ( ! is_array( $original_args[0] ) ) { + if ( isset( $original_args[0] ) && is_bool( $original_args[0] ) ) { + $defaults['initial'] = $original_args[0]; + } + if ( isset( $original_args[1] ) && is_bool( $original_args[1] ) ) { + $defaults['display'] = $original_args[1]; + } + } else { + $args = $original_args[0]; + } + } + + /** This filter is documented in wp-includes/general-template.php */ + $args = apply_filters( 'get_calendar_args', wp_parse_args( $args, $defaults ) ); + + $args['lang'] = PLL()->curlang->slug; #added# + + if ( ! post_type_exists( $args['post_type'] ) ) { + $args['post_type'] = 'post'; + } + + $w = 0; + if ( isset( $_GET['w'] ) ) { + $w = (int) $_GET['w']; + } + + /* + * Normalize the cache key. + * + * The following ensures the same cache key is used for the same parameter + * and parameter equivalents. This prevents `post_type > post, initial > true` + * from generating a different key from the same values in the reverse order. + * + * `display` is excluded from the cache key as the cache contains the same + * HTML regardless of this function's need to echo or return the output. + * + * The global values contain data generated by the URL query string variables. + */ + $cache_args = $args; + unset( $cache_args['display'] ); + + $cache_args['globals'] = array( + 'm' => $m, + 'monthnum' => $monthnum, + 'year' => $year, + 'week' => $w, + ); + + wp_recursive_ksort( $cache_args ); + $key = md5( serialize( $cache_args ) ); + $cache = wp_cache_get( 'get_calendar', 'calendar' ); + + if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { + /** This filter is documented in wp-includes/general-template.php */ + $output = apply_filters( 'get_calendar', $cache[ $key ], $args ); + + if ( $args['display'] ) { + echo $output; + return; + } + + return $output; + } + + if ( ! is_array( $cache ) ) { + $cache = array(); + } + + $post_type = $args['post_type']; + + // Quick check. If we have no posts at all, abort! + if ( ! $posts ) { + $prepared_query = $wpdb->prepare( "SELECT 1 as test FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' LIMIT 1", $post_type ); + $gotsome = $wpdb->get_var( $prepared_query ); + if ( ! $gotsome ) { + $cache[ $key ] = ''; + wp_cache_set( 'get_calendar', $cache, 'calendar' ); + return; + } + } + + // week_begins = 0 stands for Sunday. + $week_begins = (int) get_option( 'start_of_week' ); + + // Let's figure out when we are. + if ( ! empty( $monthnum ) && ! empty( $year ) ) { + $thismonth = zeroise( (int) $monthnum, 2 ); + $thisyear = (int) $year; + } elseif ( ! empty( $w ) ) { + // We need to get the month from MySQL. + $thisyear = (int) substr( $m, 0, 4 ); + // It seems MySQL's weeks disagree with PHP's. + $d = ( ( $w - 1 ) * 7 ) + 6; + $thismonth = $wpdb->get_var( "SELECT DATE_FORMAT((DATE_ADD('{$thisyear}0101', INTERVAL $d DAY) ), '%m')" ); + } elseif ( ! empty( $m ) ) { + $thisyear = (int) substr( $m, 0, 4 ); + if ( strlen( $m ) < 6 ) { + $thismonth = '01'; + } else { + $thismonth = zeroise( (int) substr( $m, 4, 2 ), 2 ); + } + } else { + $thisyear = current_time( 'Y' ); + $thismonth = current_time( 'm' ); + } + + $unixmonth = mktime( 0, 0, 0, $thismonth, 1, $thisyear ); + $last_day = gmdate( 't', $unixmonth ); + + $join_clause = PLL()->model->post->join_clause(); #added# + $where_clause = PLL()->model->post->where_clause( PLL()->curlang ); #added# + + // Get the next and previous month and year with at least one post. + $previous_prepared_query = $wpdb->prepare( + "SELECT MONTH(post_date) AS month, YEAR(post_date) AS year + FROM $wpdb->posts $join_clause + WHERE post_date < '$thisyear-$thismonth-01' + AND post_type = %s AND post_status = 'publish' $where_clause + ORDER BY post_date DESC + LIMIT 1", + $post_type + ); #modified# + $previous = $wpdb->get_row( $previous_prepared_query ); + + $next_prepared_query = $wpdb->prepare( + "SELECT MONTH(post_date) AS month, YEAR(post_date) AS year + FROM $wpdb->posts $join_clause + WHERE post_date > '$thisyear-$thismonth-{$last_day} 23:59:59' + AND post_type = %s AND post_status = 'publish' $where_clause + ORDER BY post_date ASC + LIMIT 1", + $post_type + ); #modified# + $next = $wpdb->get_row( $next_prepared_query ); + + /* translators: Calendar caption: 1: Month name, 2: 4-digit year. */ + $calendar_caption = _x( '%1$s %2$s', 'calendar caption' ); + $calendar_output = ' + + + '; + + $myweek = array(); + + for ( $wdcount = 0; $wdcount <= 6; $wdcount++ ) { + $myweek[] = $wp_locale->get_weekday( ( $wdcount + $week_begins ) % 7 ); + } + + foreach ( $myweek as $wd ) { + $day_name = $args['initial'] ? $wp_locale->get_weekday_initial( $wd ) : $wp_locale->get_weekday_abbrev( $wd ); + $wd = esc_attr( $wd ); + $calendar_output .= "\n\t\t"; + } + + $calendar_output .= ' + + + + '; + + $daywithpost = array(); + + // Get days with posts. + $dayswithposts_prepared_query = $wpdb->prepare( + "SELECT DISTINCT DAYOFMONTH(post_date) + FROM $wpdb->posts $join_clause WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' + AND post_type = %s AND post_status = 'publish' + AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59' $where_clause", + $post_type + ); #modified# + $dayswithposts = $wpdb->get_results( $dayswithposts_prepared_query, ARRAY_N ); + + if ( $dayswithposts ) { + foreach ( (array) $dayswithposts as $daywith ) { + $daywithpost[] = (int) $daywith[0]; + } + } + + // See how much we should pad in the beginning. + $pad = calendar_week_mod( (int) gmdate( 'w', $unixmonth ) - $week_begins ); + if ( 0 != $pad ) { + $calendar_output .= "\n\t\t" . ''; + } + + $newrow = false; + $daysinmonth = (int) gmdate( 't', $unixmonth ); + + for ( $day = 1; $day <= $daysinmonth; ++$day ) { + if ( $newrow ) { + $calendar_output .= "\n\t\n\t\n\t\t"; + } + $newrow = false; + + if ( current_time( 'j' ) == $day && + current_time( 'm' ) == $thismonth && + current_time( 'Y' ) == $thisyear ) { + $calendar_output .= ''; + + if ( 6 == calendar_week_mod( (int) gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ) ) { + $newrow = true; + } + } + + $pad = 7 - calendar_week_mod( (int) gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ); + if ( 0 != $pad && 7 != $pad ) { + $calendar_output .= "\n\t\t" . ''; + } + + $calendar_output .= "\n\t\n\t"; + + $calendar_output .= "\n\t
    ' . sprintf( + $calendar_caption, + $wp_locale->get_month( $thismonth ), + gmdate( 'Y', $unixmonth ) + ) . '
    $day_name
     
    '; + } else { + $calendar_output .= ''; + } + + if ( in_array( $day, $daywithpost, true ) ) { + // Any posts today? + $date_format = gmdate( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) ); + /* translators: Post calendar label. %s: Date. */ + $label = sprintf( __( 'Posts published on %s' ), $date_format ); + $calendar_output .= sprintf( + '%s', + get_day_link( $thisyear, $thismonth, $day ), + esc_attr( $label ), + $day + ); + } else { + $calendar_output .= $day; + } + + $calendar_output .= ' 
    "; + + $calendar_output .= ''; + + $cache[ $key ] = $calendar_output; + wp_cache_set( 'get_calendar', $cache, 'calendar' ); + + /** This filter is documented in wp-includes/general-template.php */ + $calendar_output = apply_filters( 'get_calendar', $calendar_output, $args ); + + if ( $args['display'] ) { + echo $calendar_output; + return; + } + + return $calendar_output; + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/widget-languages.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/widget-languages.php new file mode 100644 index 0000000..d82880a --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/src/widget-languages.php @@ -0,0 +1,174 @@ + + * @phpstan-template T of array{ + * title: string, + * dropdown: 0|1, + * show_names: 0|1, + * show_flags: 0|1, + * force_home: 0|1, + * hide_current: 0|1, + * hide_if_no_translation: 0|1 + * } + */ +class PLL_Widget_Languages extends WP_Widget { + + /** + * Constructor + * + * @since 0.1 + */ + public function __construct() { + parent::__construct( + 'polylang', + __( 'Language switcher', 'polylang' ), + array( + 'description' => __( 'Displays a language switcher', 'polylang' ), + 'customize_selective_refresh' => true, + ) + ); + } + + /** + * Displays the widget + * + * @since 0.1 + * + * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget. + * @param array $instance The settings for the particular instance of the widget + * @return void + * + * @phpstan-param array{ + * name: string, + * id: string, + * description: string, + * class: string, + * before_widget: string, + * after_widget: string, + * before_title: string, + * after_title: string, + * before_sidebar: string, + * after_sidebar: string, + * show_in_rest: boolean, + * widget_id: string, + * widget_name: string + * } $args + * @phpstan-param T $instance + */ + public function widget( $args, $instance ) { + // Sets a unique id for dropdown. + $instance['dropdown'] = empty( $instance['dropdown'] ) ? 0 : $this->id; + $instance['echo'] = 0; + $instance['raw'] = 0; + $list = pll_the_languages( $instance ); + + if ( $list ) { + $title = empty( $instance['title'] ) ? '' : $instance['title']; + + /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + echo $args['before_widget']; // phpcs:ignore WordPress.Security.EscapeOutput + + if ( $title ) { + echo $args['before_title'] . $title . $args['after_title']; // phpcs:ignore WordPress.Security.EscapeOutput + } + + // The title may be filtered: Strip out HTML and make sure the aria-label is never empty. + $aria_label = trim( wp_strip_all_tags( $title ) ); + if ( ! $aria_label ) { + $aria_label = __( 'Choose a language', 'polylang' ); + } + + if ( $instance['dropdown'] ) { + echo ''; + echo $list; // phpcs:ignore WordPress.Security.EscapeOutput + } else { + $format = current_theme_supports( 'html5', 'navigation-widgets' ) ? 'html5' : 'xhtml'; + + /** This filter is documented in wp-includes/widgets/class-wp-nav-menu-widget.php */ + $format = apply_filters( 'navigation_widgets_format', $format ); + + if ( 'html5' === $format ) { + echo ''; + } + } + + echo $args['after_widget']; // phpcs:ignore WordPress.Security.EscapeOutput + } + } + + /** + * Updates the widget options + * + * @since 0.4 + * + * @param array $new_instance New settings for this instance as input by the user via form() + * @param array $old_instance Old settings for this instance + * @return array Settings to save or bool false to cancel saving + * + * @phpstan-param T $new_instance + * @phpstan-param T $old_instance + */ + public function update( $new_instance, $old_instance ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $instance = array( 'title' => sanitize_text_field( $new_instance['title'] ) ); + foreach ( array_keys( PLL_Switcher::get_switcher_options( 'widget' ) ) as $key ) { + $instance[ $key ] = ! empty( $new_instance[ $key ] ) ? 1 : 0; + } + + return $instance; + } + + /** + * Displays the widget form. + * + * @since 0.4 + * + * @param array $instance Current settings. + * @return string + * + * @phpstan-param T $instance + */ + public function form( $instance ) { + // Default values + $instance = wp_parse_args( (array) $instance, array_merge( array( 'title' => '' ), PLL_Switcher::get_switcher_options( 'widget', 'default' ) ) ); + + // Title + printf( + '

    ', + esc_attr( $this->get_field_id( 'title' ) ), + esc_html__( 'Title:', 'polylang' ), + esc_attr( $this->get_field_name( 'title' ) ), + esc_attr( $instance['title'] ) + ); + + foreach ( PLL_Switcher::get_switcher_options( 'widget' ) as $key => $str ) { + printf( + '
    ', + esc_attr( $this->get_field_id( $key ) ), + esc_attr( $this->get_field_name( $key ) ), + checked( $instance[ $key ], true, false ), + esc_html( $str ), + in_array( $key, array( 'show_names', 'show_flags', 'hide_current' ) ) ? sprintf( ' class="no-dropdown-%s"', esc_attr( $this->id ) ) : '', + ( ! empty( $instance['dropdown'] ) && in_array( $key, array( 'show_names', 'show_flags', 'hide_current' ) ) ? ' style="display:none;"' : '' ), + esc_attr( 'pll-' . $key ) + ); + } + + return ''; // Because the parent class returns a string, however not used. + } +} diff --git a/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/uninstall.php b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/uninstall.php new file mode 100644 index 0000000..a3fe0b9 --- /dev/null +++ b/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/uninstall.php @@ -0,0 +1,193 @@ +get_col( "SELECT blog_id FROM $wpdb->blogs" ) as $blog_id ) { + switch_to_blog( $blog_id ); + $this->uninstall(); + } + restore_current_blog(); + } else { + $this->uninstall(); + } + } + + /** + * Removes **all** plugin data. + * + * @since 0.5 + */ + public function uninstall() { + global $wpdb; + + do_action( 'pll_uninstall' ); + + // We need to register the taxonomies. + $pll_taxonomies = array( + 'language', + 'term_language', + 'post_translations', + 'term_translations', + ); + + foreach ( $pll_taxonomies as $taxonomy ) { + register_taxonomy( + $taxonomy, + null, + array( + 'label' => false, + 'public' => false, + 'query_var' => false, + 'rewrite' => false, + ) + ); + } + + $languages = get_terms( + array( + 'taxonomy' => 'language', + 'hide_empty' => false, + ) + ); + + // Delete users options. + delete_metadata( 'user', 0, 'pll_filter_content', '', true ); + delete_metadata( 'user', 0, 'pll_dismissed_notices', '', true ); // Legacy meta. + foreach ( $languages as $lang ) { + delete_metadata( 'user', 0, "description_{$lang->slug}", '', true ); + } + + // Delete menu language switchers. + $ids = get_posts( + array( + 'post_type' => 'nav_menu_item', + 'numberposts' => -1, + 'nopaging' => true, + 'fields' => 'ids', + 'meta_key' => '_pll_menu_item', + ) + ); + + foreach ( $ids as $id ) { + wp_delete_post( $id, true ); + } + + /* + * Backward compatibility with Polylang < 3.4. + * Delete the legacy strings translations. + */ + register_post_type( + 'polylang_mo', + array( + 'rewrite' => false, + 'query_var' => false, + ) + ); + $ids = get_posts( + array( + 'post_type' => 'polylang_mo', + 'post_status' => 'any', + 'numberposts' => -1, + 'nopaging' => true, + 'fields' => 'ids', + ) + ); + foreach ( $ids as $id ) { + wp_delete_post( $id, true ); + } + + // Delete all what is related to languages and translations. + $term_ids = array(); + $tt_ids = array(); + + $terms = get_terms( + array( + 'taxonomy' => $pll_taxonomies, + 'hide_empty' => false, + ) + ); + + foreach ( $terms as $term ) { + $term_ids[] = (int) $term->term_id; + $tt_ids[] = (int) $term->term_taxonomy_id; + } + + if ( ! empty( $term_ids ) ) { + $term_ids = array_unique( $term_ids ); + $wpdb->query( + $wpdb->prepare( + sprintf( + "DELETE FROM {$wpdb->terms} WHERE term_id IN (%s)", + implode( ',', array_fill( 0, count( $term_ids ), '%d' ) ) + ), + $term_ids + ) + ); + $wpdb->query( + $wpdb->prepare( + sprintf( + "DELETE FROM {$wpdb->term_taxonomy} WHERE term_id IN (%s)", + implode( ',', array_fill( 0, count( $term_ids ), '%d' ) ) + ), + $term_ids + ) + ); + $wpdb->query( + $wpdb->prepare( + sprintf( + "DELETE FROM {$wpdb->termmeta} WHERE term_id IN (%s) AND meta_key='_pll_strings_translations'", + implode( ',', array_fill( 0, count( $term_ids ), '%d' ) ) + ), + $term_ids + ) + ); + } + + if ( ! empty( $tt_ids ) ) { + $tt_ids = array_unique( $tt_ids ); + $wpdb->query( $wpdb->prepare( sprintf( "DELETE FROM {$wpdb->term_relationships} WHERE term_taxonomy_id IN (%s)", implode( ',', array_fill( 0, count( $tt_ids ), '%d' ) ) ), $tt_ids ) ); + } + + // Delete options. + delete_option( 'polylang' ); + delete_option( 'widget_polylang' ); // Automatically created by WP. + delete_option( 'polylang_wpml_strings' ); // Strings registered with icl_register_string. + delete_option( 'polylang_licenses' ); + delete_option( 'pll_dismissed_notices' ); + delete_option( 'pll_language_from_content_available' ); + delete_option( 'pll_language_taxonomies' ); + + // Delete transients. + delete_option( '_transient_pll_languages_list' ); // Force deletion of the transient from the options table even in case external object cache is used. + } +} + +new PLL_Uninstall(); diff --git a/wp-content/themes/xmartica/footer-es.php b/wp-content/themes/xmartica/footer-es.php new file mode 100644 index 0000000..a599a9e --- /dev/null +++ b/wp-content/themes/xmartica/footer-es.php @@ -0,0 +1,178 @@ + esc_html__( 'Consultoría de Transformación Empresarial', 'html5blank' ), + 'path' => '/consultoria-de-transformacion-empresarial', + ), + array( + 'label' => esc_html__( 'Consultoría de Transformación Digital', 'html5blank' ), + 'path' => '/consultoria-de-transformacion-digital', + ), + array( + 'label' => esc_html__( 'Consultoría de Mejora de Procesos', 'html5blank' ), + 'path' => '/consultoria-de-mejora-de-procesos', + ), + array( + 'label' => esc_html__( 'Consultoría de Datos y Analítica', 'html5blank' ), + 'path' => '/consultoria-de-datos-y-analitica', + ), + array( + 'label' => esc_html__( 'Consultoría de Estrategia de IA', 'html5blank' ), + 'path' => '/consultoria-de-estrategia-de-ia', + ), + array( + 'label' => esc_html__( 'Consultoría de Gestión del Cambio', 'html5blank' ), + 'path' => '/consultoria-de-gestion-del-cambio', + ), + array( + 'label' => esc_html__( 'Estrategia de Experiencia de Cliente', 'html5blank' ), + 'path' => '/estrategia-de-experiencia-de-cliente', + ), +); + +if ( ! $xmartica_footer_privacy ) { + $xmartica_footer_privacy = home_url( '/privacy-policy/' ); +} +?> + + + + + + diff --git a/wp-content/themes/xmartica/footer.php b/wp-content/themes/xmartica/footer.php index a599a9e..72985bf 100644 --- a/wp-content/themes/xmartica/footer.php +++ b/wp-content/themes/xmartica/footer.php @@ -5,12 +5,21 @@ * @package Xmartica */ +$xmartica_language = function_exists( 'pll_current_language' ) + ? pll_current_language( 'slug' ) + : 'en'; + +if ( 'es' === $xmartica_language ) { + require get_theme_file_path( '/footer-es.php' ); + return; +} + $xmartica_footer_claim = get_post_meta( get_queried_object_id(), 'footer_claim', true ); $xmartica_footer_is_enterprise = is_page_template( 'page-consultoria-de-transformacion-empresarial.php' ) || is_page( 'consultoria-de-transformacion-empresarial' ); -$xmartica_footer_cta_text = esc_html__( 'Habla con un especialista', 'html5blank' ); +$xmartica_footer_cta_text = esc_html__( 'Talk to a specialist', 'html5blank' ); if ( ! is_string( $xmartica_footer_claim ) || '' === trim( $xmartica_footer_claim ) ) { - $xmartica_footer_claim = esc_html__( 'Transformación con ejecución real.', 'html5blank' ); + $xmartica_footer_claim = esc_html__( 'Transformation with real execution.', 'html5blank' ); } $xmartica_footer_claim = trim( wp_strip_all_tags( $xmartica_footer_claim ) ); @@ -33,7 +42,7 @@ if ( $xmartica_footer_words ) { } if ( $xmartica_footer_is_enterprise ) { - $xmartica_footer_cta_text = esc_html__( 'Habla con un consultor de transformación empresarial', 'html5blank' ); + $xmartica_footer_cta_text = esc_html__( 'Talk to a business transformation consultant', 'html5blank' ); } $xmartica_footer_logo_id = 18; @@ -55,32 +64,32 @@ $xmartica_footer_faqs = home_url( '/#preguntas-frecuentes' ); $xmartica_footer_privacy = get_privacy_policy_url(); $xmartica_footer_service_links = array( array( - 'label' => esc_html__( 'Consultoría de Transformación Empresarial', 'html5blank' ), - 'path' => '/consultoria-de-transformacion-empresarial', + 'label' => esc_html__( 'Business Transformation Consulting', 'html5blank' ), + 'path' => '/business-transformation-consulting/', ), array( - 'label' => esc_html__( 'Consultoría de Transformación Digital', 'html5blank' ), - 'path' => '/consultoria-de-transformacion-digital', + 'label' => esc_html__( 'Digital Transformation Consulting', 'html5blank' ), + 'path' => '/digital-transformation-consulting/', ), array( - 'label' => esc_html__( 'Consultoría de Mejora de Procesos', 'html5blank' ), - 'path' => '/consultoria-de-mejora-de-procesos', + 'label' => esc_html__( 'Process Improvement Consulting', 'html5blank' ), + 'path' => '/process-improvement-consulting/', ), array( - 'label' => esc_html__( 'Consultoría de Datos y Analítica', 'html5blank' ), - 'path' => '/consultoria-de-datos-y-analitica', + 'label' => esc_html__( 'Data & Analytics Consulting', 'html5blank' ), + 'path' => '/data-analytics-consulting/', ), array( - 'label' => esc_html__( 'Consultoría de Estrategia de IA', 'html5blank' ), - 'path' => '/consultoria-de-estrategia-de-ia', + 'label' => esc_html__( 'AI Strategy Consulting', 'html5blank' ), + 'path' => '/ai-strategy-consulting/', ), array( - 'label' => esc_html__( 'Consultoría de Gestión del Cambio', 'html5blank' ), - 'path' => '/consultoria-de-gestion-del-cambio', + 'label' => esc_html__( 'Change Management Consulting', 'html5blank' ), + 'path' => '/change-management-consulting/', ), array( - 'label' => esc_html__( 'Estrategia de Experiencia de Cliente', 'html5blank' ), - 'path' => '/estrategia-de-experiencia-de-cliente', + 'label' => esc_html__( 'Customer Experience Strategy', 'html5blank' ), + 'path' => '/customer-experience-strategy/', ), ); @@ -94,11 +103,11 @@ if ( ! $xmartica_footer_privacy ) {